vendor.js 1.3 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 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. /***/ 19:
  199. /*!******************************************************************!*\
  200. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  201. \******************************************************************/
  202. /*! no static exports found */
  203. /***/ (function(module, exports, __webpack_require__) {
  204. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  205. function _arrayWithoutHoles(arr) {
  206. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  207. }
  208. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  209. /***/ }),
  210. /***/ 2:
  211. /*!************************************************************!*\
  212. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  213. \************************************************************/
  214. /*! no static exports found */
  215. /***/ (function(module, exports, __webpack_require__) {
  216. "use strict";
  217. /* WEBPACK VAR INJECTION */(function(wx, global) {
  218. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  219. Object.defineProperty(exports, "__esModule", {
  220. value: true
  221. });
  222. exports.createApp = createApp;
  223. exports.createComponent = createComponent;
  224. exports.createPage = createPage;
  225. exports.createPlugin = createPlugin;
  226. exports.createSubpackageApp = createSubpackageApp;
  227. exports.default = void 0;
  228. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  229. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  230. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  231. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  232. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  233. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  234. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  235. 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; }
  236. 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; }
  237. var realAtob;
  238. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  239. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  240. if (typeof atob !== 'function') {
  241. realAtob = function realAtob(str) {
  242. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  243. if (!b64re.test(str)) {
  244. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  245. }
  246. // Adding the padding if missing, for semplicity
  247. str += '=='.slice(2 - (str.length & 3));
  248. var bitmap;
  249. var result = '';
  250. var r1;
  251. var r2;
  252. var i = 0;
  253. for (; i < str.length;) {
  254. 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++)));
  255. 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);
  256. }
  257. return result;
  258. };
  259. } else {
  260. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  261. realAtob = atob;
  262. }
  263. function b64DecodeUnicode(str) {
  264. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  265. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  266. }).join(''));
  267. }
  268. function getCurrentUserInfo() {
  269. var token = wx.getStorageSync('uni_id_token') || '';
  270. var tokenArr = token.split('.');
  271. if (!token || tokenArr.length !== 3) {
  272. return {
  273. uid: null,
  274. role: [],
  275. permission: [],
  276. tokenExpired: 0
  277. };
  278. }
  279. var userInfo;
  280. try {
  281. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  282. } catch (error) {
  283. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  284. }
  285. userInfo.tokenExpired = userInfo.exp * 1000;
  286. delete userInfo.exp;
  287. delete userInfo.iat;
  288. return userInfo;
  289. }
  290. function uniIdMixin(Vue) {
  291. Vue.prototype.uniIDHasRole = function (roleId) {
  292. var _getCurrentUserInfo = getCurrentUserInfo(),
  293. role = _getCurrentUserInfo.role;
  294. return role.indexOf(roleId) > -1;
  295. };
  296. Vue.prototype.uniIDHasPermission = function (permissionId) {
  297. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  298. permission = _getCurrentUserInfo2.permission;
  299. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  300. };
  301. Vue.prototype.uniIDTokenValid = function () {
  302. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  303. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  304. return tokenExpired > Date.now();
  305. };
  306. }
  307. var _toString = Object.prototype.toString;
  308. var hasOwnProperty = Object.prototype.hasOwnProperty;
  309. function isFn(fn) {
  310. return typeof fn === 'function';
  311. }
  312. function isStr(str) {
  313. return typeof str === 'string';
  314. }
  315. function isObject(obj) {
  316. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  317. }
  318. function isPlainObject(obj) {
  319. return _toString.call(obj) === '[object Object]';
  320. }
  321. function hasOwn(obj, key) {
  322. return hasOwnProperty.call(obj, key);
  323. }
  324. function noop() {}
  325. /**
  326. * Create a cached version of a pure function.
  327. */
  328. function cached(fn) {
  329. var cache = Object.create(null);
  330. return function cachedFn(str) {
  331. var hit = cache[str];
  332. return hit || (cache[str] = fn(str));
  333. };
  334. }
  335. /**
  336. * Camelize a hyphen-delimited string.
  337. */
  338. var camelizeRE = /-(\w)/g;
  339. var camelize = cached(function (str) {
  340. return str.replace(camelizeRE, function (_, c) {
  341. return c ? c.toUpperCase() : '';
  342. });
  343. });
  344. function sortObject(obj) {
  345. var sortObj = {};
  346. if (isPlainObject(obj)) {
  347. Object.keys(obj).sort().forEach(function (key) {
  348. sortObj[key] = obj[key];
  349. });
  350. }
  351. return !Object.keys(sortObj) ? obj : sortObj;
  352. }
  353. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  354. var globalInterceptors = {};
  355. var scopedInterceptors = {};
  356. function mergeHook(parentVal, childVal) {
  357. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  358. return res ? dedupeHooks(res) : res;
  359. }
  360. function dedupeHooks(hooks) {
  361. var res = [];
  362. for (var i = 0; i < hooks.length; i++) {
  363. if (res.indexOf(hooks[i]) === -1) {
  364. res.push(hooks[i]);
  365. }
  366. }
  367. return res;
  368. }
  369. function removeHook(hooks, hook) {
  370. var index = hooks.indexOf(hook);
  371. if (index !== -1) {
  372. hooks.splice(index, 1);
  373. }
  374. }
  375. function mergeInterceptorHook(interceptor, option) {
  376. Object.keys(option).forEach(function (hook) {
  377. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  378. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  379. }
  380. });
  381. }
  382. function removeInterceptorHook(interceptor, option) {
  383. if (!interceptor || !option) {
  384. return;
  385. }
  386. Object.keys(option).forEach(function (hook) {
  387. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  388. removeHook(interceptor[hook], option[hook]);
  389. }
  390. });
  391. }
  392. function addInterceptor(method, option) {
  393. if (typeof method === 'string' && isPlainObject(option)) {
  394. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  395. } else if (isPlainObject(method)) {
  396. mergeInterceptorHook(globalInterceptors, method);
  397. }
  398. }
  399. function removeInterceptor(method, option) {
  400. if (typeof method === 'string') {
  401. if (isPlainObject(option)) {
  402. removeInterceptorHook(scopedInterceptors[method], option);
  403. } else {
  404. delete scopedInterceptors[method];
  405. }
  406. } else if (isPlainObject(method)) {
  407. removeInterceptorHook(globalInterceptors, method);
  408. }
  409. }
  410. function wrapperHook(hook, params) {
  411. return function (data) {
  412. return hook(data, params) || data;
  413. };
  414. }
  415. function isPromise(obj) {
  416. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  417. }
  418. function queue(hooks, data, params) {
  419. var promise = false;
  420. for (var i = 0; i < hooks.length; i++) {
  421. var hook = hooks[i];
  422. if (promise) {
  423. promise = Promise.resolve(wrapperHook(hook, params));
  424. } else {
  425. var res = hook(data, params);
  426. if (isPromise(res)) {
  427. promise = Promise.resolve(res);
  428. }
  429. if (res === false) {
  430. return {
  431. then: function then() {}
  432. };
  433. }
  434. }
  435. }
  436. return promise || {
  437. then: function then(callback) {
  438. return callback(data);
  439. }
  440. };
  441. }
  442. function wrapperOptions(interceptor) {
  443. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  444. ['success', 'fail', 'complete'].forEach(function (name) {
  445. if (Array.isArray(interceptor[name])) {
  446. var oldCallback = options[name];
  447. options[name] = function callbackInterceptor(res) {
  448. queue(interceptor[name], res, options).then(function (res) {
  449. /* eslint-disable no-mixed-operators */
  450. return isFn(oldCallback) && oldCallback(res) || res;
  451. });
  452. };
  453. }
  454. });
  455. return options;
  456. }
  457. function wrapperReturnValue(method, returnValue) {
  458. var returnValueHooks = [];
  459. if (Array.isArray(globalInterceptors.returnValue)) {
  460. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  461. }
  462. var interceptor = scopedInterceptors[method];
  463. if (interceptor && Array.isArray(interceptor.returnValue)) {
  464. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  465. }
  466. returnValueHooks.forEach(function (hook) {
  467. returnValue = hook(returnValue) || returnValue;
  468. });
  469. return returnValue;
  470. }
  471. function getApiInterceptorHooks(method) {
  472. var interceptor = Object.create(null);
  473. Object.keys(globalInterceptors).forEach(function (hook) {
  474. if (hook !== 'returnValue') {
  475. interceptor[hook] = globalInterceptors[hook].slice();
  476. }
  477. });
  478. var scopedInterceptor = scopedInterceptors[method];
  479. if (scopedInterceptor) {
  480. Object.keys(scopedInterceptor).forEach(function (hook) {
  481. if (hook !== 'returnValue') {
  482. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  483. }
  484. });
  485. }
  486. return interceptor;
  487. }
  488. function invokeApi(method, api, options) {
  489. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  490. params[_key - 3] = arguments[_key];
  491. }
  492. var interceptor = getApiInterceptorHooks(method);
  493. if (interceptor && Object.keys(interceptor).length) {
  494. if (Array.isArray(interceptor.invoke)) {
  495. var res = queue(interceptor.invoke, options);
  496. return res.then(function (options) {
  497. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  498. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  499. });
  500. } else {
  501. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  502. }
  503. }
  504. return api.apply(void 0, [options].concat(params));
  505. }
  506. var promiseInterceptor = {
  507. returnValue: function returnValue(res) {
  508. if (!isPromise(res)) {
  509. return res;
  510. }
  511. return new Promise(function (resolve, reject) {
  512. res.then(function (res) {
  513. if (res[0]) {
  514. reject(res[0]);
  515. } else {
  516. resolve(res[1]);
  517. }
  518. });
  519. });
  520. }
  521. };
  522. 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/;
  523. var CONTEXT_API_RE = /^create|Manager$/;
  524. // Context例外情况
  525. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  526. // 同步例外情况
  527. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  528. var CALLBACK_API_RE = /^on|^off/;
  529. function isContextApi(name) {
  530. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  531. }
  532. function isSyncApi(name) {
  533. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  534. }
  535. function isCallbackApi(name) {
  536. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  537. }
  538. function handlePromise(promise) {
  539. return promise.then(function (data) {
  540. return [null, data];
  541. }).catch(function (err) {
  542. return [err];
  543. });
  544. }
  545. function shouldPromise(name) {
  546. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  547. return false;
  548. }
  549. return true;
  550. }
  551. /* eslint-disable no-extend-native */
  552. if (!Promise.prototype.finally) {
  553. Promise.prototype.finally = function (callback) {
  554. var promise = this.constructor;
  555. return this.then(function (value) {
  556. return promise.resolve(callback()).then(function () {
  557. return value;
  558. });
  559. }, function (reason) {
  560. return promise.resolve(callback()).then(function () {
  561. throw reason;
  562. });
  563. });
  564. };
  565. }
  566. function promisify(name, api) {
  567. if (!shouldPromise(name) || !isFn(api)) {
  568. return api;
  569. }
  570. return function promiseApi() {
  571. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  572. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  573. params[_key2 - 1] = arguments[_key2];
  574. }
  575. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  576. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  577. }
  578. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  579. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  580. success: resolve,
  581. fail: reject
  582. })].concat(params));
  583. })));
  584. };
  585. }
  586. var EPS = 1e-4;
  587. var BASE_DEVICE_WIDTH = 750;
  588. var isIOS = false;
  589. var deviceWidth = 0;
  590. var deviceDPR = 0;
  591. function checkDeviceWidth() {
  592. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  593. platform = _wx$getSystemInfoSync.platform,
  594. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  595. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  596. deviceWidth = windowWidth;
  597. deviceDPR = pixelRatio;
  598. isIOS = platform === 'ios';
  599. }
  600. function upx2px(number, newDeviceWidth) {
  601. if (deviceWidth === 0) {
  602. checkDeviceWidth();
  603. }
  604. number = Number(number);
  605. if (number === 0) {
  606. return 0;
  607. }
  608. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  609. if (result < 0) {
  610. result = -result;
  611. }
  612. result = Math.floor(result + EPS);
  613. if (result === 0) {
  614. if (deviceDPR === 1 || !isIOS) {
  615. result = 1;
  616. } else {
  617. result = 0.5;
  618. }
  619. }
  620. return number < 0 ? -result : result;
  621. }
  622. var LOCALE_ZH_HANS = 'zh-Hans';
  623. var LOCALE_ZH_HANT = 'zh-Hant';
  624. var LOCALE_EN = 'en';
  625. var LOCALE_FR = 'fr';
  626. var LOCALE_ES = 'es';
  627. var messages = {};
  628. var locale;
  629. {
  630. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  631. }
  632. function initI18nMessages() {
  633. if (!isEnableLocale()) {
  634. return;
  635. }
  636. var localeKeys = Object.keys(__uniConfig.locales);
  637. if (localeKeys.length) {
  638. localeKeys.forEach(function (locale) {
  639. var curMessages = messages[locale];
  640. var userMessages = __uniConfig.locales[locale];
  641. if (curMessages) {
  642. Object.assign(curMessages, userMessages);
  643. } else {
  644. messages[locale] = userMessages;
  645. }
  646. });
  647. }
  648. }
  649. initI18nMessages();
  650. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  651. var t = i18n.t;
  652. var i18nMixin = i18n.mixin = {
  653. beforeCreate: function beforeCreate() {
  654. var _this = this;
  655. var unwatch = i18n.i18n.watchLocale(function () {
  656. _this.$forceUpdate();
  657. });
  658. this.$once('hook:beforeDestroy', function () {
  659. unwatch();
  660. });
  661. },
  662. methods: {
  663. $$t: function $$t(key, values) {
  664. return t(key, values);
  665. }
  666. }
  667. };
  668. var setLocale = i18n.setLocale;
  669. var getLocale = i18n.getLocale;
  670. function initAppLocale(Vue, appVm, locale) {
  671. var state = Vue.observable({
  672. locale: locale || i18n.getLocale()
  673. });
  674. var localeWatchers = [];
  675. appVm.$watchLocale = function (fn) {
  676. localeWatchers.push(fn);
  677. };
  678. Object.defineProperty(appVm, '$locale', {
  679. get: function get() {
  680. return state.locale;
  681. },
  682. set: function set(v) {
  683. state.locale = v;
  684. localeWatchers.forEach(function (watch) {
  685. return watch(v);
  686. });
  687. }
  688. });
  689. }
  690. function isEnableLocale() {
  691. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  692. }
  693. function include(str, parts) {
  694. return !!parts.find(function (part) {
  695. return str.indexOf(part) !== -1;
  696. });
  697. }
  698. function startsWith(str, parts) {
  699. return parts.find(function (part) {
  700. return str.indexOf(part) === 0;
  701. });
  702. }
  703. function normalizeLocale(locale, messages) {
  704. if (!locale) {
  705. return;
  706. }
  707. locale = locale.trim().replace(/_/g, '-');
  708. if (messages && messages[locale]) {
  709. return locale;
  710. }
  711. locale = locale.toLowerCase();
  712. if (locale === 'chinese') {
  713. // 支付宝
  714. return LOCALE_ZH_HANS;
  715. }
  716. if (locale.indexOf('zh') === 0) {
  717. if (locale.indexOf('-hans') > -1) {
  718. return LOCALE_ZH_HANS;
  719. }
  720. if (locale.indexOf('-hant') > -1) {
  721. return LOCALE_ZH_HANT;
  722. }
  723. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  724. return LOCALE_ZH_HANT;
  725. }
  726. return LOCALE_ZH_HANS;
  727. }
  728. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  729. if (lang) {
  730. return lang;
  731. }
  732. }
  733. // export function initI18n() {
  734. // const localeKeys = Object.keys(__uniConfig.locales || {})
  735. // if (localeKeys.length) {
  736. // localeKeys.forEach((locale) =>
  737. // i18n.add(locale, __uniConfig.locales[locale])
  738. // )
  739. // }
  740. // }
  741. function getLocale$1() {
  742. // 优先使用 $locale
  743. if (isFn(getApp)) {
  744. var app = getApp({
  745. allowDefault: true
  746. });
  747. if (app && app.$vm) {
  748. return app.$vm.$locale;
  749. }
  750. }
  751. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  752. }
  753. function setLocale$1(locale) {
  754. var app = isFn(getApp) ? getApp() : false;
  755. if (!app) {
  756. return false;
  757. }
  758. var oldLocale = app.$vm.$locale;
  759. if (oldLocale !== locale) {
  760. app.$vm.$locale = locale;
  761. onLocaleChangeCallbacks.forEach(function (fn) {
  762. return fn({
  763. locale: locale
  764. });
  765. });
  766. return true;
  767. }
  768. return false;
  769. }
  770. var onLocaleChangeCallbacks = [];
  771. function onLocaleChange(fn) {
  772. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  773. onLocaleChangeCallbacks.push(fn);
  774. }
  775. }
  776. if (typeof global !== 'undefined') {
  777. global.getLocale = getLocale$1;
  778. }
  779. var interceptors = {
  780. promiseInterceptor: promiseInterceptor
  781. };
  782. var baseApi = /*#__PURE__*/Object.freeze({
  783. __proto__: null,
  784. upx2px: upx2px,
  785. getLocale: getLocale$1,
  786. setLocale: setLocale$1,
  787. onLocaleChange: onLocaleChange,
  788. addInterceptor: addInterceptor,
  789. removeInterceptor: removeInterceptor,
  790. interceptors: interceptors
  791. });
  792. function findExistsPageIndex(url) {
  793. var pages = getCurrentPages();
  794. var len = pages.length;
  795. while (len--) {
  796. var page = pages[len];
  797. if (page.$page && page.$page.fullPath === url) {
  798. return len;
  799. }
  800. }
  801. return -1;
  802. }
  803. var redirectTo = {
  804. name: function name(fromArgs) {
  805. if (fromArgs.exists === 'back' && fromArgs.delta) {
  806. return 'navigateBack';
  807. }
  808. return 'redirectTo';
  809. },
  810. args: function args(fromArgs) {
  811. if (fromArgs.exists === 'back' && fromArgs.url) {
  812. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  813. if (existsPageIndex !== -1) {
  814. var delta = getCurrentPages().length - 1 - existsPageIndex;
  815. if (delta > 0) {
  816. fromArgs.delta = delta;
  817. }
  818. }
  819. }
  820. }
  821. };
  822. var previewImage = {
  823. args: function args(fromArgs) {
  824. var currentIndex = parseInt(fromArgs.current);
  825. if (isNaN(currentIndex)) {
  826. return;
  827. }
  828. var urls = fromArgs.urls;
  829. if (!Array.isArray(urls)) {
  830. return;
  831. }
  832. var len = urls.length;
  833. if (!len) {
  834. return;
  835. }
  836. if (currentIndex < 0) {
  837. currentIndex = 0;
  838. } else if (currentIndex >= len) {
  839. currentIndex = len - 1;
  840. }
  841. if (currentIndex > 0) {
  842. fromArgs.current = urls[currentIndex];
  843. fromArgs.urls = urls.filter(function (item, index) {
  844. return index < currentIndex ? item !== urls[currentIndex] : true;
  845. });
  846. } else {
  847. fromArgs.current = urls[0];
  848. }
  849. return {
  850. indicator: false,
  851. loop: false
  852. };
  853. }
  854. };
  855. var UUID_KEY = '__DC_STAT_UUID';
  856. var deviceId;
  857. function useDeviceId(result) {
  858. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  859. if (!deviceId) {
  860. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  861. wx.setStorage({
  862. key: UUID_KEY,
  863. data: deviceId
  864. });
  865. }
  866. result.deviceId = deviceId;
  867. }
  868. function addSafeAreaInsets(result) {
  869. if (result.safeArea) {
  870. var safeArea = result.safeArea;
  871. result.safeAreaInsets = {
  872. top: safeArea.top,
  873. left: safeArea.left,
  874. right: result.windowWidth - safeArea.right,
  875. bottom: result.screenHeight - safeArea.bottom
  876. };
  877. }
  878. }
  879. function populateParameters(result) {
  880. var _result$brand = result.brand,
  881. brand = _result$brand === void 0 ? '' : _result$brand,
  882. _result$model = result.model,
  883. model = _result$model === void 0 ? '' : _result$model,
  884. _result$system = result.system,
  885. system = _result$system === void 0 ? '' : _result$system,
  886. _result$language = result.language,
  887. language = _result$language === void 0 ? '' : _result$language,
  888. theme = result.theme,
  889. version = result.version,
  890. platform = result.platform,
  891. fontSizeSetting = result.fontSizeSetting,
  892. SDKVersion = result.SDKVersion,
  893. pixelRatio = result.pixelRatio,
  894. deviceOrientation = result.deviceOrientation;
  895. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  896. var extraParam = {};
  897. // osName osVersion
  898. var osName = '';
  899. var osVersion = '';
  900. {
  901. osName = system.split(' ')[0] || '';
  902. osVersion = system.split(' ')[1] || '';
  903. }
  904. var hostVersion = version;
  905. // deviceType
  906. var deviceType = getGetDeviceType(result, model);
  907. // deviceModel
  908. var deviceBrand = getDeviceBrand(brand);
  909. // hostName
  910. var _hostName = getHostName(result);
  911. // deviceOrientation
  912. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  913. // devicePixelRatio
  914. var _devicePixelRatio = pixelRatio;
  915. // SDKVersion
  916. var _SDKVersion = SDKVersion;
  917. // hostLanguage
  918. var hostLanguage = language.replace(/_/g, '-');
  919. // wx.getAccountInfoSync
  920. var parameters = {
  921. appId: "__UNI__5FB7046",
  922. appName: "贞达市政工程",
  923. appVersion: "1.0.0",
  924. appVersionCode: "100",
  925. appLanguage: getAppLanguage(hostLanguage),
  926. uniCompileVersion: "3.8.12",
  927. uniRuntimeVersion: "3.8.12",
  928. uniPlatform: undefined || "mp-weixin",
  929. deviceBrand: deviceBrand,
  930. deviceModel: model,
  931. deviceType: deviceType,
  932. devicePixelRatio: _devicePixelRatio,
  933. deviceOrientation: _deviceOrientation,
  934. osName: osName.toLocaleLowerCase(),
  935. osVersion: osVersion,
  936. hostTheme: theme,
  937. hostVersion: hostVersion,
  938. hostLanguage: hostLanguage,
  939. hostName: _hostName,
  940. hostSDKVersion: _SDKVersion,
  941. hostFontSizeSetting: fontSizeSetting,
  942. windowTop: 0,
  943. windowBottom: 0,
  944. // TODO
  945. osLanguage: undefined,
  946. osTheme: undefined,
  947. ua: undefined,
  948. hostPackageName: undefined,
  949. browserName: undefined,
  950. browserVersion: undefined
  951. };
  952. Object.assign(result, parameters, extraParam);
  953. }
  954. function getGetDeviceType(result, model) {
  955. var deviceType = result.deviceType || 'phone';
  956. {
  957. var deviceTypeMaps = {
  958. ipad: 'pad',
  959. windows: 'pc',
  960. mac: 'pc'
  961. };
  962. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  963. var _model = model.toLocaleLowerCase();
  964. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  965. var _m = deviceTypeMapsKeys[index];
  966. if (_model.indexOf(_m) !== -1) {
  967. deviceType = deviceTypeMaps[_m];
  968. break;
  969. }
  970. }
  971. }
  972. return deviceType;
  973. }
  974. function getDeviceBrand(brand) {
  975. var deviceBrand = brand;
  976. if (deviceBrand) {
  977. deviceBrand = brand.toLocaleLowerCase();
  978. }
  979. return deviceBrand;
  980. }
  981. function getAppLanguage(defaultLanguage) {
  982. return getLocale$1 ? getLocale$1() : defaultLanguage;
  983. }
  984. function getHostName(result) {
  985. var _platform = 'WeChat';
  986. var _hostName = result.hostName || _platform; // mp-jd
  987. {
  988. if (result.environment) {
  989. _hostName = result.environment;
  990. } else if (result.host && result.host.env) {
  991. _hostName = result.host.env;
  992. }
  993. }
  994. return _hostName;
  995. }
  996. var getSystemInfo = {
  997. returnValue: function returnValue(result) {
  998. useDeviceId(result);
  999. addSafeAreaInsets(result);
  1000. populateParameters(result);
  1001. }
  1002. };
  1003. var showActionSheet = {
  1004. args: function args(fromArgs) {
  1005. if ((0, _typeof2.default)(fromArgs) === 'object') {
  1006. fromArgs.alertText = fromArgs.title;
  1007. }
  1008. }
  1009. };
  1010. var getAppBaseInfo = {
  1011. returnValue: function returnValue(result) {
  1012. var _result = result,
  1013. version = _result.version,
  1014. language = _result.language,
  1015. SDKVersion = _result.SDKVersion,
  1016. theme = _result.theme;
  1017. var _hostName = getHostName(result);
  1018. var hostLanguage = language.replace('_', '-');
  1019. result = sortObject(Object.assign(result, {
  1020. appId: "__UNI__5FB7046",
  1021. appName: "贞达市政工程",
  1022. appVersion: "1.0.0",
  1023. appVersionCode: "100",
  1024. appLanguage: getAppLanguage(hostLanguage),
  1025. hostVersion: version,
  1026. hostLanguage: hostLanguage,
  1027. hostName: _hostName,
  1028. hostSDKVersion: SDKVersion,
  1029. hostTheme: theme
  1030. }));
  1031. }
  1032. };
  1033. var getDeviceInfo = {
  1034. returnValue: function returnValue(result) {
  1035. var _result2 = result,
  1036. brand = _result2.brand,
  1037. model = _result2.model;
  1038. var deviceType = getGetDeviceType(result, model);
  1039. var deviceBrand = getDeviceBrand(brand);
  1040. useDeviceId(result);
  1041. result = sortObject(Object.assign(result, {
  1042. deviceType: deviceType,
  1043. deviceBrand: deviceBrand,
  1044. deviceModel: model
  1045. }));
  1046. }
  1047. };
  1048. var getWindowInfo = {
  1049. returnValue: function returnValue(result) {
  1050. addSafeAreaInsets(result);
  1051. result = sortObject(Object.assign(result, {
  1052. windowTop: 0,
  1053. windowBottom: 0
  1054. }));
  1055. }
  1056. };
  1057. var getAppAuthorizeSetting = {
  1058. returnValue: function returnValue(result) {
  1059. var locationReducedAccuracy = result.locationReducedAccuracy;
  1060. result.locationAccuracy = 'unsupported';
  1061. if (locationReducedAccuracy === true) {
  1062. result.locationAccuracy = 'reduced';
  1063. } else if (locationReducedAccuracy === false) {
  1064. result.locationAccuracy = 'full';
  1065. }
  1066. }
  1067. };
  1068. // import navigateTo from 'uni-helpers/navigate-to'
  1069. var compressImage = {
  1070. args: function args(fromArgs) {
  1071. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  1072. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  1073. fromArgs.compressHeight = fromArgs.compressedHeight;
  1074. }
  1075. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  1076. fromArgs.compressWidth = fromArgs.compressedWidth;
  1077. }
  1078. }
  1079. };
  1080. var protocols = {
  1081. redirectTo: redirectTo,
  1082. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  1083. previewImage: previewImage,
  1084. getSystemInfo: getSystemInfo,
  1085. getSystemInfoSync: getSystemInfo,
  1086. showActionSheet: showActionSheet,
  1087. getAppBaseInfo: getAppBaseInfo,
  1088. getDeviceInfo: getDeviceInfo,
  1089. getWindowInfo: getWindowInfo,
  1090. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1091. compressImage: compressImage
  1092. };
  1093. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1094. var canIUses = [];
  1095. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1096. function processCallback(methodName, method, returnValue) {
  1097. return function (res) {
  1098. return method(processReturnValue(methodName, res, returnValue));
  1099. };
  1100. }
  1101. function processArgs(methodName, fromArgs) {
  1102. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1103. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1104. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1105. if (isPlainObject(fromArgs)) {
  1106. // 一般 api 的参数解析
  1107. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1108. if (isFn(argsOption)) {
  1109. argsOption = argsOption(fromArgs, toArgs) || {};
  1110. }
  1111. for (var key in fromArgs) {
  1112. if (hasOwn(argsOption, key)) {
  1113. var keyOption = argsOption[key];
  1114. if (isFn(keyOption)) {
  1115. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1116. }
  1117. if (!keyOption) {
  1118. // 不支持的参数
  1119. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1120. } else if (isStr(keyOption)) {
  1121. // 重写参数 key
  1122. toArgs[keyOption] = fromArgs[key];
  1123. } else if (isPlainObject(keyOption)) {
  1124. // {name:newName,value:value}可重新指定参数 key:value
  1125. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1126. }
  1127. } else if (CALLBACKS.indexOf(key) !== -1) {
  1128. if (isFn(fromArgs[key])) {
  1129. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1130. }
  1131. } else {
  1132. if (!keepFromArgs) {
  1133. toArgs[key] = fromArgs[key];
  1134. }
  1135. }
  1136. }
  1137. return toArgs;
  1138. } else if (isFn(fromArgs)) {
  1139. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1140. }
  1141. return fromArgs;
  1142. }
  1143. function processReturnValue(methodName, res, returnValue) {
  1144. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1145. if (isFn(protocols.returnValue)) {
  1146. // 处理通用 returnValue
  1147. res = protocols.returnValue(methodName, res);
  1148. }
  1149. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1150. }
  1151. function wrapper(methodName, method) {
  1152. if (hasOwn(protocols, methodName)) {
  1153. var protocol = protocols[methodName];
  1154. if (!protocol) {
  1155. // 暂不支持的 api
  1156. return function () {
  1157. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1158. };
  1159. }
  1160. return function (arg1, arg2) {
  1161. // 目前 api 最多两个参数
  1162. var options = protocol;
  1163. if (isFn(protocol)) {
  1164. options = protocol(arg1);
  1165. }
  1166. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1167. var args = [arg1];
  1168. if (typeof arg2 !== 'undefined') {
  1169. args.push(arg2);
  1170. }
  1171. if (isFn(options.name)) {
  1172. methodName = options.name(arg1);
  1173. } else if (isStr(options.name)) {
  1174. methodName = options.name;
  1175. }
  1176. var returnValue = wx[methodName].apply(wx, args);
  1177. if (isSyncApi(methodName)) {
  1178. // 同步 api
  1179. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1180. }
  1181. return returnValue;
  1182. };
  1183. }
  1184. return method;
  1185. }
  1186. var todoApis = Object.create(null);
  1187. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1188. function createTodoApi(name) {
  1189. return function todoApi(_ref) {
  1190. var fail = _ref.fail,
  1191. complete = _ref.complete;
  1192. var res = {
  1193. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1194. };
  1195. isFn(fail) && fail(res);
  1196. isFn(complete) && complete(res);
  1197. };
  1198. }
  1199. TODOS.forEach(function (name) {
  1200. todoApis[name] = createTodoApi(name);
  1201. });
  1202. var providers = {
  1203. oauth: ['weixin'],
  1204. share: ['weixin'],
  1205. payment: ['wxpay'],
  1206. push: ['weixin']
  1207. };
  1208. function getProvider(_ref2) {
  1209. var service = _ref2.service,
  1210. success = _ref2.success,
  1211. fail = _ref2.fail,
  1212. complete = _ref2.complete;
  1213. var res = false;
  1214. if (providers[service]) {
  1215. res = {
  1216. errMsg: 'getProvider:ok',
  1217. service: service,
  1218. provider: providers[service]
  1219. };
  1220. isFn(success) && success(res);
  1221. } else {
  1222. res = {
  1223. errMsg: 'getProvider:fail service not found'
  1224. };
  1225. isFn(fail) && fail(res);
  1226. }
  1227. isFn(complete) && complete(res);
  1228. }
  1229. var extraApi = /*#__PURE__*/Object.freeze({
  1230. __proto__: null,
  1231. getProvider: getProvider
  1232. });
  1233. var getEmitter = function () {
  1234. var Emitter;
  1235. return function getUniEmitter() {
  1236. if (!Emitter) {
  1237. Emitter = new _vue.default();
  1238. }
  1239. return Emitter;
  1240. };
  1241. }();
  1242. function apply(ctx, method, args) {
  1243. return ctx[method].apply(ctx, args);
  1244. }
  1245. function $on() {
  1246. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1247. }
  1248. function $off() {
  1249. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1250. }
  1251. function $once() {
  1252. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1253. }
  1254. function $emit() {
  1255. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1256. }
  1257. var eventApi = /*#__PURE__*/Object.freeze({
  1258. __proto__: null,
  1259. $on: $on,
  1260. $off: $off,
  1261. $once: $once,
  1262. $emit: $emit
  1263. });
  1264. /**
  1265. * 框架内 try-catch
  1266. */
  1267. /**
  1268. * 开发者 try-catch
  1269. */
  1270. function tryCatch(fn) {
  1271. return function () {
  1272. try {
  1273. return fn.apply(fn, arguments);
  1274. } catch (e) {
  1275. // TODO
  1276. console.error(e);
  1277. }
  1278. };
  1279. }
  1280. function getApiCallbacks(params) {
  1281. var apiCallbacks = {};
  1282. for (var name in params) {
  1283. var param = params[name];
  1284. if (isFn(param)) {
  1285. apiCallbacks[name] = tryCatch(param);
  1286. delete params[name];
  1287. }
  1288. }
  1289. return apiCallbacks;
  1290. }
  1291. var cid;
  1292. var cidErrMsg;
  1293. var enabled;
  1294. function normalizePushMessage(message) {
  1295. try {
  1296. return JSON.parse(message);
  1297. } catch (e) {}
  1298. return message;
  1299. }
  1300. function invokePushCallback(args) {
  1301. if (args.type === 'enabled') {
  1302. enabled = true;
  1303. } else if (args.type === 'clientId') {
  1304. cid = args.cid;
  1305. cidErrMsg = args.errMsg;
  1306. invokeGetPushCidCallbacks(cid, args.errMsg);
  1307. } else if (args.type === 'pushMsg') {
  1308. var message = {
  1309. type: 'receive',
  1310. data: normalizePushMessage(args.message)
  1311. };
  1312. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1313. var callback = onPushMessageCallbacks[i];
  1314. callback(message);
  1315. // 该消息已被阻止
  1316. if (message.stopped) {
  1317. break;
  1318. }
  1319. }
  1320. } else if (args.type === 'click') {
  1321. onPushMessageCallbacks.forEach(function (callback) {
  1322. callback({
  1323. type: 'click',
  1324. data: normalizePushMessage(args.message)
  1325. });
  1326. });
  1327. }
  1328. }
  1329. var getPushCidCallbacks = [];
  1330. function invokeGetPushCidCallbacks(cid, errMsg) {
  1331. getPushCidCallbacks.forEach(function (callback) {
  1332. callback(cid, errMsg);
  1333. });
  1334. getPushCidCallbacks.length = 0;
  1335. }
  1336. function getPushClientId(args) {
  1337. if (!isPlainObject(args)) {
  1338. args = {};
  1339. }
  1340. var _getApiCallbacks = getApiCallbacks(args),
  1341. success = _getApiCallbacks.success,
  1342. fail = _getApiCallbacks.fail,
  1343. complete = _getApiCallbacks.complete;
  1344. var hasSuccess = isFn(success);
  1345. var hasFail = isFn(fail);
  1346. var hasComplete = isFn(complete);
  1347. Promise.resolve().then(function () {
  1348. if (typeof enabled === 'undefined') {
  1349. enabled = false;
  1350. cid = '';
  1351. cidErrMsg = 'uniPush is not enabled';
  1352. }
  1353. getPushCidCallbacks.push(function (cid, errMsg) {
  1354. var res;
  1355. if (cid) {
  1356. res = {
  1357. errMsg: 'getPushClientId:ok',
  1358. cid: cid
  1359. };
  1360. hasSuccess && success(res);
  1361. } else {
  1362. res = {
  1363. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1364. };
  1365. hasFail && fail(res);
  1366. }
  1367. hasComplete && complete(res);
  1368. });
  1369. if (typeof cid !== 'undefined') {
  1370. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1371. }
  1372. });
  1373. }
  1374. var onPushMessageCallbacks = [];
  1375. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1376. var onPushMessage = function onPushMessage(fn) {
  1377. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1378. onPushMessageCallbacks.push(fn);
  1379. }
  1380. };
  1381. var offPushMessage = function offPushMessage(fn) {
  1382. if (!fn) {
  1383. onPushMessageCallbacks.length = 0;
  1384. } else {
  1385. var index = onPushMessageCallbacks.indexOf(fn);
  1386. if (index > -1) {
  1387. onPushMessageCallbacks.splice(index, 1);
  1388. }
  1389. }
  1390. };
  1391. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1392. if (!baseInfo) {
  1393. baseInfo = wx.getSystemInfoSync();
  1394. }
  1395. var host = baseInfo ? baseInfo.host : null;
  1396. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1397. var api = /*#__PURE__*/Object.freeze({
  1398. __proto__: null,
  1399. shareVideoMessage: shareVideoMessage,
  1400. getPushClientId: getPushClientId,
  1401. onPushMessage: onPushMessage,
  1402. offPushMessage: offPushMessage,
  1403. invokePushCallback: invokePushCallback
  1404. });
  1405. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1406. function findVmByVueId(vm, vuePid) {
  1407. var $children = vm.$children;
  1408. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1409. for (var i = $children.length - 1; i >= 0; i--) {
  1410. var childVm = $children[i];
  1411. if (childVm.$scope._$vueId === vuePid) {
  1412. return childVm;
  1413. }
  1414. }
  1415. // 反向递归查找
  1416. var parentVm;
  1417. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1418. parentVm = findVmByVueId($children[_i], vuePid);
  1419. if (parentVm) {
  1420. return parentVm;
  1421. }
  1422. }
  1423. }
  1424. function initBehavior(options) {
  1425. return Behavior(options);
  1426. }
  1427. function isPage() {
  1428. return !!this.route;
  1429. }
  1430. function initRelation(detail) {
  1431. this.triggerEvent('__l', detail);
  1432. }
  1433. function selectAllComponents(mpInstance, selector, $refs) {
  1434. var components = mpInstance.selectAllComponents(selector) || [];
  1435. components.forEach(function (component) {
  1436. var ref = component.dataset.ref;
  1437. $refs[ref] = component.$vm || toSkip(component);
  1438. {
  1439. if (component.dataset.vueGeneric === 'scoped') {
  1440. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1441. selectAllComponents(scopedComponent, selector, $refs);
  1442. });
  1443. }
  1444. }
  1445. });
  1446. }
  1447. function syncRefs(refs, newRefs) {
  1448. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1449. var newKeys = Object.keys(newRefs);
  1450. newKeys.forEach(function (key) {
  1451. var oldValue = refs[key];
  1452. var newValue = newRefs[key];
  1453. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1454. return oldValue.includes(value);
  1455. })) {
  1456. return;
  1457. }
  1458. refs[key] = newValue;
  1459. oldKeys.delete(key);
  1460. });
  1461. oldKeys.forEach(function (key) {
  1462. delete refs[key];
  1463. });
  1464. return refs;
  1465. }
  1466. function initRefs(vm) {
  1467. var mpInstance = vm.$scope;
  1468. var refs = {};
  1469. Object.defineProperty(vm, '$refs', {
  1470. get: function get() {
  1471. var $refs = {};
  1472. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1473. // TODO 暂不考虑 for 中的 scoped
  1474. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1475. forComponents.forEach(function (component) {
  1476. var ref = component.dataset.ref;
  1477. if (!$refs[ref]) {
  1478. $refs[ref] = [];
  1479. }
  1480. $refs[ref].push(component.$vm || toSkip(component));
  1481. });
  1482. return syncRefs(refs, $refs);
  1483. }
  1484. });
  1485. }
  1486. function handleLink(event) {
  1487. var _ref3 = event.detail || event.value,
  1488. vuePid = _ref3.vuePid,
  1489. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1490. var parentVm;
  1491. if (vuePid) {
  1492. parentVm = findVmByVueId(this.$vm, vuePid);
  1493. }
  1494. if (!parentVm) {
  1495. parentVm = this.$vm;
  1496. }
  1497. vueOptions.parent = parentVm;
  1498. }
  1499. function markMPComponent(component) {
  1500. // 在 Vue 中标记为小程序组件
  1501. var IS_MP = '__v_isMPComponent';
  1502. Object.defineProperty(component, IS_MP, {
  1503. configurable: true,
  1504. enumerable: false,
  1505. value: true
  1506. });
  1507. return component;
  1508. }
  1509. function toSkip(obj) {
  1510. var OB = '__ob__';
  1511. var SKIP = '__v_skip';
  1512. if (isObject(obj) && Object.isExtensible(obj)) {
  1513. // 避免被 @vue/composition-api 观测
  1514. Object.defineProperty(obj, OB, {
  1515. configurable: true,
  1516. enumerable: false,
  1517. value: (0, _defineProperty2.default)({}, SKIP, true)
  1518. });
  1519. }
  1520. return obj;
  1521. }
  1522. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1523. function initWorkletMethods(mpMethods, vueMethods) {
  1524. if (vueMethods) {
  1525. Object.keys(vueMethods).forEach(function (name) {
  1526. var matches = name.match(WORKLET_RE);
  1527. if (matches) {
  1528. var workletName = matches[1];
  1529. mpMethods[name] = vueMethods[name];
  1530. mpMethods[workletName] = vueMethods[workletName];
  1531. }
  1532. });
  1533. }
  1534. }
  1535. var MPPage = Page;
  1536. var MPComponent = Component;
  1537. var customizeRE = /:/g;
  1538. var customize = cached(function (str) {
  1539. return camelize(str.replace(customizeRE, '-'));
  1540. });
  1541. function initTriggerEvent(mpInstance) {
  1542. var oldTriggerEvent = mpInstance.triggerEvent;
  1543. var newTriggerEvent = function newTriggerEvent(event) {
  1544. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1545. args[_key3 - 1] = arguments[_key3];
  1546. }
  1547. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1548. if (this.$vm || this.dataset && this.dataset.comType) {
  1549. event = customize(event);
  1550. } else {
  1551. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1552. var newEvent = customize(event);
  1553. if (newEvent !== event) {
  1554. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1555. }
  1556. }
  1557. return oldTriggerEvent.apply(this, [event].concat(args));
  1558. };
  1559. try {
  1560. // 京东小程序 triggerEvent 为只读
  1561. mpInstance.triggerEvent = newTriggerEvent;
  1562. } catch (error) {
  1563. mpInstance._triggerEvent = newTriggerEvent;
  1564. }
  1565. }
  1566. function initHook(name, options, isComponent) {
  1567. var oldHook = options[name];
  1568. options[name] = function () {
  1569. markMPComponent(this);
  1570. initTriggerEvent(this);
  1571. if (oldHook) {
  1572. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1573. args[_key4] = arguments[_key4];
  1574. }
  1575. return oldHook.apply(this, args);
  1576. }
  1577. };
  1578. }
  1579. if (!MPPage.__$wrappered) {
  1580. MPPage.__$wrappered = true;
  1581. Page = function Page() {
  1582. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1583. initHook('onLoad', options);
  1584. return MPPage(options);
  1585. };
  1586. Page.after = MPPage.after;
  1587. Component = function Component() {
  1588. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1589. initHook('created', options);
  1590. return MPComponent(options);
  1591. };
  1592. }
  1593. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1594. function initMocks(vm, mocks) {
  1595. var mpInstance = vm.$mp[vm.mpType];
  1596. mocks.forEach(function (mock) {
  1597. if (hasOwn(mpInstance, mock)) {
  1598. vm[mock] = mpInstance[mock];
  1599. }
  1600. });
  1601. }
  1602. function hasHook(hook, vueOptions) {
  1603. if (!vueOptions) {
  1604. return true;
  1605. }
  1606. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1607. return true;
  1608. }
  1609. vueOptions = vueOptions.default || vueOptions;
  1610. if (isFn(vueOptions)) {
  1611. if (isFn(vueOptions.extendOptions[hook])) {
  1612. return true;
  1613. }
  1614. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1615. return true;
  1616. }
  1617. return false;
  1618. }
  1619. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1620. return true;
  1621. }
  1622. var mixins = vueOptions.mixins;
  1623. if (Array.isArray(mixins)) {
  1624. return !!mixins.find(function (mixin) {
  1625. return hasHook(hook, mixin);
  1626. });
  1627. }
  1628. }
  1629. function initHooks(mpOptions, hooks, vueOptions) {
  1630. hooks.forEach(function (hook) {
  1631. if (hasHook(hook, vueOptions)) {
  1632. mpOptions[hook] = function (args) {
  1633. return this.$vm && this.$vm.__call_hook(hook, args);
  1634. };
  1635. }
  1636. });
  1637. }
  1638. function initUnknownHooks(mpOptions, vueOptions) {
  1639. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1640. findHooks(vueOptions).forEach(function (hook) {
  1641. return initHook$1(mpOptions, hook, excludes);
  1642. });
  1643. }
  1644. function findHooks(vueOptions) {
  1645. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1646. if (vueOptions) {
  1647. Object.keys(vueOptions).forEach(function (name) {
  1648. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1649. hooks.push(name);
  1650. }
  1651. });
  1652. }
  1653. return hooks;
  1654. }
  1655. function initHook$1(mpOptions, hook, excludes) {
  1656. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1657. mpOptions[hook] = function (args) {
  1658. return this.$vm && this.$vm.__call_hook(hook, args);
  1659. };
  1660. }
  1661. }
  1662. function initVueComponent(Vue, vueOptions) {
  1663. vueOptions = vueOptions.default || vueOptions;
  1664. var VueComponent;
  1665. if (isFn(vueOptions)) {
  1666. VueComponent = vueOptions;
  1667. } else {
  1668. VueComponent = Vue.extend(vueOptions);
  1669. }
  1670. vueOptions = VueComponent.options;
  1671. return [VueComponent, vueOptions];
  1672. }
  1673. function initSlots(vm, vueSlots) {
  1674. if (Array.isArray(vueSlots) && vueSlots.length) {
  1675. var $slots = Object.create(null);
  1676. vueSlots.forEach(function (slotName) {
  1677. $slots[slotName] = true;
  1678. });
  1679. vm.$scopedSlots = vm.$slots = $slots;
  1680. }
  1681. }
  1682. function initVueIds(vueIds, mpInstance) {
  1683. vueIds = (vueIds || '').split(',');
  1684. var len = vueIds.length;
  1685. if (len === 1) {
  1686. mpInstance._$vueId = vueIds[0];
  1687. } else if (len === 2) {
  1688. mpInstance._$vueId = vueIds[0];
  1689. mpInstance._$vuePid = vueIds[1];
  1690. }
  1691. }
  1692. function initData(vueOptions, context) {
  1693. var data = vueOptions.data || {};
  1694. var methods = vueOptions.methods || {};
  1695. if (typeof data === 'function') {
  1696. try {
  1697. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1698. } catch (e) {
  1699. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1700. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1701. }
  1702. }
  1703. } else {
  1704. try {
  1705. // 对 data 格式化
  1706. data = JSON.parse(JSON.stringify(data));
  1707. } catch (e) {}
  1708. }
  1709. if (!isPlainObject(data)) {
  1710. data = {};
  1711. }
  1712. Object.keys(methods).forEach(function (methodName) {
  1713. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1714. data[methodName] = methods[methodName];
  1715. }
  1716. });
  1717. return data;
  1718. }
  1719. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1720. function createObserver(name) {
  1721. return function observer(newVal, oldVal) {
  1722. if (this.$vm) {
  1723. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1724. }
  1725. };
  1726. }
  1727. function initBehaviors(vueOptions, initBehavior) {
  1728. var vueBehaviors = vueOptions.behaviors;
  1729. var vueExtends = vueOptions.extends;
  1730. var vueMixins = vueOptions.mixins;
  1731. var vueProps = vueOptions.props;
  1732. if (!vueProps) {
  1733. vueOptions.props = vueProps = [];
  1734. }
  1735. var behaviors = [];
  1736. if (Array.isArray(vueBehaviors)) {
  1737. vueBehaviors.forEach(function (behavior) {
  1738. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1739. if (behavior === 'uni://form-field') {
  1740. if (Array.isArray(vueProps)) {
  1741. vueProps.push('name');
  1742. vueProps.push('value');
  1743. } else {
  1744. vueProps.name = {
  1745. type: String,
  1746. default: ''
  1747. };
  1748. vueProps.value = {
  1749. type: [String, Number, Boolean, Array, Object, Date],
  1750. default: ''
  1751. };
  1752. }
  1753. }
  1754. });
  1755. }
  1756. if (isPlainObject(vueExtends) && vueExtends.props) {
  1757. behaviors.push(initBehavior({
  1758. properties: initProperties(vueExtends.props, true)
  1759. }));
  1760. }
  1761. if (Array.isArray(vueMixins)) {
  1762. vueMixins.forEach(function (vueMixin) {
  1763. if (isPlainObject(vueMixin) && vueMixin.props) {
  1764. behaviors.push(initBehavior({
  1765. properties: initProperties(vueMixin.props, true)
  1766. }));
  1767. }
  1768. });
  1769. }
  1770. return behaviors;
  1771. }
  1772. function parsePropType(key, type, defaultValue, file) {
  1773. // [String]=>String
  1774. if (Array.isArray(type) && type.length === 1) {
  1775. return type[0];
  1776. }
  1777. return type;
  1778. }
  1779. function initProperties(props) {
  1780. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1781. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1782. var options = arguments.length > 3 ? arguments[3] : undefined;
  1783. var properties = {};
  1784. if (!isBehavior) {
  1785. properties.vueId = {
  1786. type: String,
  1787. value: ''
  1788. };
  1789. {
  1790. if (options.virtualHost) {
  1791. properties.virtualHostStyle = {
  1792. type: null,
  1793. value: ''
  1794. };
  1795. properties.virtualHostClass = {
  1796. type: null,
  1797. value: ''
  1798. };
  1799. }
  1800. }
  1801. // scopedSlotsCompiler auto
  1802. properties.scopedSlotsCompiler = {
  1803. type: String,
  1804. value: ''
  1805. };
  1806. properties.vueSlots = {
  1807. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1808. type: null,
  1809. value: [],
  1810. observer: function observer(newVal, oldVal) {
  1811. var $slots = Object.create(null);
  1812. newVal.forEach(function (slotName) {
  1813. $slots[slotName] = true;
  1814. });
  1815. this.setData({
  1816. $slots: $slots
  1817. });
  1818. }
  1819. };
  1820. }
  1821. if (Array.isArray(props)) {
  1822. // ['title']
  1823. props.forEach(function (key) {
  1824. properties[key] = {
  1825. type: null,
  1826. observer: createObserver(key)
  1827. };
  1828. });
  1829. } else if (isPlainObject(props)) {
  1830. // {title:{type:String,default:''},content:String}
  1831. Object.keys(props).forEach(function (key) {
  1832. var opts = props[key];
  1833. if (isPlainObject(opts)) {
  1834. // title:{type:String,default:''}
  1835. var value = opts.default;
  1836. if (isFn(value)) {
  1837. value = value();
  1838. }
  1839. opts.type = parsePropType(key, opts.type);
  1840. properties[key] = {
  1841. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1842. value: value,
  1843. observer: createObserver(key)
  1844. };
  1845. } else {
  1846. // content:String
  1847. var type = parsePropType(key, opts);
  1848. properties[key] = {
  1849. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1850. observer: createObserver(key)
  1851. };
  1852. }
  1853. });
  1854. }
  1855. return properties;
  1856. }
  1857. function wrapper$1(event) {
  1858. // TODO 又得兼容 mpvue 的 mp 对象
  1859. try {
  1860. event.mp = JSON.parse(JSON.stringify(event));
  1861. } catch (e) {}
  1862. event.stopPropagation = noop;
  1863. event.preventDefault = noop;
  1864. event.target = event.target || {};
  1865. if (!hasOwn(event, 'detail')) {
  1866. event.detail = {};
  1867. }
  1868. if (hasOwn(event, 'markerId')) {
  1869. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1870. event.detail.markerId = event.markerId;
  1871. }
  1872. if (isPlainObject(event.detail)) {
  1873. event.target = Object.assign({}, event.target, event.detail);
  1874. }
  1875. return event;
  1876. }
  1877. function getExtraValue(vm, dataPathsArray) {
  1878. var context = vm;
  1879. dataPathsArray.forEach(function (dataPathArray) {
  1880. var dataPath = dataPathArray[0];
  1881. var value = dataPathArray[2];
  1882. if (dataPath || typeof value !== 'undefined') {
  1883. // ['','',index,'disable']
  1884. var propPath = dataPathArray[1];
  1885. var valuePath = dataPathArray[3];
  1886. var vFor;
  1887. if (Number.isInteger(dataPath)) {
  1888. vFor = dataPath;
  1889. } else if (!dataPath) {
  1890. vFor = context;
  1891. } else if (typeof dataPath === 'string' && dataPath) {
  1892. if (dataPath.indexOf('#s#') === 0) {
  1893. vFor = dataPath.substr(3);
  1894. } else {
  1895. vFor = vm.__get_value(dataPath, context);
  1896. }
  1897. }
  1898. if (Number.isInteger(vFor)) {
  1899. context = value;
  1900. } else if (!propPath) {
  1901. context = vFor[value];
  1902. } else {
  1903. if (Array.isArray(vFor)) {
  1904. context = vFor.find(function (vForItem) {
  1905. return vm.__get_value(propPath, vForItem) === value;
  1906. });
  1907. } else if (isPlainObject(vFor)) {
  1908. context = Object.keys(vFor).find(function (vForKey) {
  1909. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1910. });
  1911. } else {
  1912. console.error('v-for 暂不支持循环数据:', vFor);
  1913. }
  1914. }
  1915. if (valuePath) {
  1916. context = vm.__get_value(valuePath, context);
  1917. }
  1918. }
  1919. });
  1920. return context;
  1921. }
  1922. function processEventExtra(vm, extra, event, __args__) {
  1923. var extraObj = {};
  1924. if (Array.isArray(extra) && extra.length) {
  1925. /**
  1926. *[
  1927. * ['data.items', 'data.id', item.data.id],
  1928. * ['metas', 'id', meta.id]
  1929. *],
  1930. *[
  1931. * ['data.items', 'data.id', item.data.id],
  1932. * ['metas', 'id', meta.id]
  1933. *],
  1934. *'test'
  1935. */
  1936. extra.forEach(function (dataPath, index) {
  1937. if (typeof dataPath === 'string') {
  1938. if (!dataPath) {
  1939. // model,prop.sync
  1940. extraObj['$' + index] = vm;
  1941. } else {
  1942. if (dataPath === '$event') {
  1943. // $event
  1944. extraObj['$' + index] = event;
  1945. } else if (dataPath === 'arguments') {
  1946. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1947. } else if (dataPath.indexOf('$event.') === 0) {
  1948. // $event.target.value
  1949. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1950. } else {
  1951. extraObj['$' + index] = vm.__get_value(dataPath);
  1952. }
  1953. }
  1954. } else {
  1955. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1956. }
  1957. });
  1958. }
  1959. return extraObj;
  1960. }
  1961. function getObjByArray(arr) {
  1962. var obj = {};
  1963. for (var i = 1; i < arr.length; i++) {
  1964. var element = arr[i];
  1965. obj[element[0]] = element[1];
  1966. }
  1967. return obj;
  1968. }
  1969. function processEventArgs(vm, event) {
  1970. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1971. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1972. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1973. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1974. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1975. // fixed 用户直接触发 mpInstance.triggerEvent
  1976. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1977. if (isCustom) {
  1978. // 自定义事件
  1979. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1980. if (!args.length) {
  1981. // 无参数,直接传入 event 或 detail 数组
  1982. if (isCustomMPEvent) {
  1983. return [event];
  1984. }
  1985. return __args__;
  1986. }
  1987. }
  1988. var extraObj = processEventExtra(vm, extra, event, __args__);
  1989. var ret = [];
  1990. args.forEach(function (arg) {
  1991. if (arg === '$event') {
  1992. if (methodName === '__set_model' && !isCustom) {
  1993. // input v-model value
  1994. ret.push(event.target.value);
  1995. } else {
  1996. if (isCustom && !isCustomMPEvent) {
  1997. ret.push(__args__[0]);
  1998. } else {
  1999. // wxcomponent 组件或内置组件
  2000. ret.push(event);
  2001. }
  2002. }
  2003. } else {
  2004. if (Array.isArray(arg) && arg[0] === 'o') {
  2005. ret.push(getObjByArray(arg));
  2006. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  2007. ret.push(extraObj[arg]);
  2008. } else {
  2009. ret.push(arg);
  2010. }
  2011. }
  2012. });
  2013. return ret;
  2014. }
  2015. var ONCE = '~';
  2016. var CUSTOM = '^';
  2017. function isMatchEventType(eventType, optType) {
  2018. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  2019. }
  2020. function getContextVm(vm) {
  2021. var $parent = vm.$parent;
  2022. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  2023. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  2024. $parent = $parent.$parent;
  2025. }
  2026. return $parent && $parent.$parent;
  2027. }
  2028. function handleEvent(event) {
  2029. var _this2 = this;
  2030. event = wrapper$1(event);
  2031. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  2032. var dataset = (event.currentTarget || event.target).dataset;
  2033. if (!dataset) {
  2034. return console.warn('事件信息不存在');
  2035. }
  2036. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  2037. if (!eventOpts) {
  2038. return console.warn('事件信息不存在');
  2039. }
  2040. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  2041. var eventType = event.type;
  2042. var ret = [];
  2043. eventOpts.forEach(function (eventOpt) {
  2044. var type = eventOpt[0];
  2045. var eventsArray = eventOpt[1];
  2046. var isCustom = type.charAt(0) === CUSTOM;
  2047. type = isCustom ? type.slice(1) : type;
  2048. var isOnce = type.charAt(0) === ONCE;
  2049. type = isOnce ? type.slice(1) : type;
  2050. if (eventsArray && isMatchEventType(eventType, type)) {
  2051. eventsArray.forEach(function (eventArray) {
  2052. var methodName = eventArray[0];
  2053. if (methodName) {
  2054. var handlerCtx = _this2.$vm;
  2055. if (handlerCtx.$options.generic) {
  2056. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  2057. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  2058. }
  2059. if (methodName === '$emit') {
  2060. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  2061. return;
  2062. }
  2063. var handler = handlerCtx[methodName];
  2064. if (!isFn(handler)) {
  2065. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  2066. var path = _this2.route || _this2.is;
  2067. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  2068. }
  2069. if (isOnce) {
  2070. if (handler.once) {
  2071. return;
  2072. }
  2073. handler.once = true;
  2074. }
  2075. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  2076. params = Array.isArray(params) ? params : [];
  2077. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  2078. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  2079. // eslint-disable-next-line no-sparse-arrays
  2080. params = params.concat([,,,,,,,,,, event]);
  2081. }
  2082. ret.push(handler.apply(handlerCtx, params));
  2083. }
  2084. });
  2085. }
  2086. });
  2087. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2088. return ret[0];
  2089. }
  2090. }
  2091. var eventChannels = {};
  2092. function getEventChannel(id) {
  2093. var eventChannel = eventChannels[id];
  2094. delete eventChannels[id];
  2095. return eventChannel;
  2096. }
  2097. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2098. function initEventChannel() {
  2099. _vue.default.prototype.getOpenerEventChannel = function () {
  2100. // 微信小程序使用自身getOpenerEventChannel
  2101. {
  2102. return this.$scope.getOpenerEventChannel();
  2103. }
  2104. };
  2105. var callHook = _vue.default.prototype.__call_hook;
  2106. _vue.default.prototype.__call_hook = function (hook, args) {
  2107. if (hook === 'onLoad' && args && args.__id__) {
  2108. this.__eventChannel__ = getEventChannel(args.__id__);
  2109. delete args.__id__;
  2110. }
  2111. return callHook.call(this, hook, args);
  2112. };
  2113. }
  2114. function initScopedSlotsParams() {
  2115. var center = {};
  2116. var parents = {};
  2117. function currentId(fn) {
  2118. var vueIds = this.$options.propsData.vueId;
  2119. if (vueIds) {
  2120. var vueId = vueIds.split(',')[0];
  2121. fn(vueId);
  2122. }
  2123. }
  2124. _vue.default.prototype.$hasSSP = function (vueId) {
  2125. var slot = center[vueId];
  2126. if (!slot) {
  2127. parents[vueId] = this;
  2128. this.$on('hook:destroyed', function () {
  2129. delete parents[vueId];
  2130. });
  2131. }
  2132. return slot;
  2133. };
  2134. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2135. var slot = center[vueId];
  2136. if (slot) {
  2137. var params = slot[name] || [];
  2138. if (needAll) {
  2139. return params;
  2140. }
  2141. return params[0];
  2142. }
  2143. };
  2144. _vue.default.prototype.$setSSP = function (name, value) {
  2145. var index = 0;
  2146. currentId.call(this, function (vueId) {
  2147. var slot = center[vueId];
  2148. var params = slot[name] = slot[name] || [];
  2149. params.push(value);
  2150. index = params.length - 1;
  2151. });
  2152. return index;
  2153. };
  2154. _vue.default.prototype.$initSSP = function () {
  2155. currentId.call(this, function (vueId) {
  2156. center[vueId] = {};
  2157. });
  2158. };
  2159. _vue.default.prototype.$callSSP = function () {
  2160. currentId.call(this, function (vueId) {
  2161. if (parents[vueId]) {
  2162. parents[vueId].$forceUpdate();
  2163. }
  2164. });
  2165. };
  2166. _vue.default.mixin({
  2167. destroyed: function destroyed() {
  2168. var propsData = this.$options.propsData;
  2169. var vueId = propsData && propsData.vueId;
  2170. if (vueId) {
  2171. delete center[vueId];
  2172. delete parents[vueId];
  2173. }
  2174. }
  2175. });
  2176. }
  2177. function parseBaseApp(vm, _ref4) {
  2178. var mocks = _ref4.mocks,
  2179. initRefs = _ref4.initRefs;
  2180. initEventChannel();
  2181. {
  2182. initScopedSlotsParams();
  2183. }
  2184. if (vm.$options.store) {
  2185. _vue.default.prototype.$store = vm.$options.store;
  2186. }
  2187. uniIdMixin(_vue.default);
  2188. _vue.default.prototype.mpHost = "mp-weixin";
  2189. _vue.default.mixin({
  2190. beforeCreate: function beforeCreate() {
  2191. if (!this.$options.mpType) {
  2192. return;
  2193. }
  2194. this.mpType = this.$options.mpType;
  2195. this.$mp = (0, _defineProperty2.default)({
  2196. data: {}
  2197. }, this.mpType, this.$options.mpInstance);
  2198. this.$scope = this.$options.mpInstance;
  2199. delete this.$options.mpType;
  2200. delete this.$options.mpInstance;
  2201. if (this.mpType === 'page' && typeof getApp === 'function') {
  2202. // hack vue-i18n
  2203. var app = getApp();
  2204. if (app.$vm && app.$vm.$i18n) {
  2205. this._i18n = app.$vm.$i18n;
  2206. }
  2207. }
  2208. if (this.mpType !== 'app') {
  2209. initRefs(this);
  2210. initMocks(this, mocks);
  2211. }
  2212. }
  2213. });
  2214. var appOptions = {
  2215. onLaunch: function onLaunch(args) {
  2216. if (this.$vm) {
  2217. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2218. return;
  2219. }
  2220. {
  2221. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2222. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2223. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2224. }
  2225. }
  2226. this.$vm = vm;
  2227. this.$vm.$mp = {
  2228. app: this
  2229. };
  2230. this.$vm.$scope = this;
  2231. // vm 上也挂载 globalData
  2232. this.$vm.globalData = this.globalData;
  2233. this.$vm._isMounted = true;
  2234. this.$vm.__call_hook('mounted', args);
  2235. this.$vm.__call_hook('onLaunch', args);
  2236. }
  2237. };
  2238. // 兼容旧版本 globalData
  2239. appOptions.globalData = vm.$options.globalData || {};
  2240. // 将 methods 中的方法挂在 getApp() 中
  2241. var methods = vm.$options.methods;
  2242. if (methods) {
  2243. Object.keys(methods).forEach(function (name) {
  2244. appOptions[name] = methods[name];
  2245. });
  2246. }
  2247. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2248. initHooks(appOptions, hooks);
  2249. initUnknownHooks(appOptions, vm.$options);
  2250. return appOptions;
  2251. }
  2252. function parseApp(vm) {
  2253. return parseBaseApp(vm, {
  2254. mocks: mocks,
  2255. initRefs: initRefs
  2256. });
  2257. }
  2258. function createApp(vm) {
  2259. App(parseApp(vm));
  2260. return vm;
  2261. }
  2262. var encodeReserveRE = /[!'()*]/g;
  2263. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2264. return '%' + c.charCodeAt(0).toString(16);
  2265. };
  2266. var commaRE = /%2C/g;
  2267. // fixed encodeURIComponent which is more conformant to RFC3986:
  2268. // - escapes [!'()*]
  2269. // - preserve commas
  2270. var encode = function encode(str) {
  2271. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2272. };
  2273. function stringifyQuery(obj) {
  2274. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2275. var res = obj ? Object.keys(obj).map(function (key) {
  2276. var val = obj[key];
  2277. if (val === undefined) {
  2278. return '';
  2279. }
  2280. if (val === null) {
  2281. return encodeStr(key);
  2282. }
  2283. if (Array.isArray(val)) {
  2284. var result = [];
  2285. val.forEach(function (val2) {
  2286. if (val2 === undefined) {
  2287. return;
  2288. }
  2289. if (val2 === null) {
  2290. result.push(encodeStr(key));
  2291. } else {
  2292. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2293. }
  2294. });
  2295. return result.join('&');
  2296. }
  2297. return encodeStr(key) + '=' + encodeStr(val);
  2298. }).filter(function (x) {
  2299. return x.length > 0;
  2300. }).join('&') : null;
  2301. return res ? "?".concat(res) : '';
  2302. }
  2303. function parseBaseComponent(vueComponentOptions) {
  2304. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2305. isPage = _ref5.isPage,
  2306. initRelation = _ref5.initRelation;
  2307. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2308. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2309. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2310. VueComponent = _initVueComponent2[0],
  2311. vueOptions = _initVueComponent2[1];
  2312. var options = _objectSpread({
  2313. multipleSlots: true,
  2314. // styleIsolation: 'apply-shared',
  2315. addGlobalClass: true
  2316. }, vueOptions.options || {});
  2317. {
  2318. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2319. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2320. Object.assign(options, vueOptions['mp-weixin'].options);
  2321. }
  2322. }
  2323. var componentOptions = {
  2324. options: options,
  2325. data: initData(vueOptions, _vue.default.prototype),
  2326. behaviors: initBehaviors(vueOptions, initBehavior),
  2327. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2328. lifetimes: {
  2329. attached: function attached() {
  2330. var properties = this.properties;
  2331. var options = {
  2332. mpType: isPage.call(this) ? 'page' : 'component',
  2333. mpInstance: this,
  2334. propsData: properties
  2335. };
  2336. initVueIds(properties.vueId, this);
  2337. // 处理父子关系
  2338. initRelation.call(this, {
  2339. vuePid: this._$vuePid,
  2340. vueOptions: options
  2341. });
  2342. // 初始化 vue 实例
  2343. this.$vm = new VueComponent(options);
  2344. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2345. initSlots(this.$vm, properties.vueSlots);
  2346. // 触发首次 setData
  2347. this.$vm.$mount();
  2348. },
  2349. ready: function ready() {
  2350. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2351. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2352. if (this.$vm) {
  2353. this.$vm._isMounted = true;
  2354. this.$vm.__call_hook('mounted');
  2355. this.$vm.__call_hook('onReady');
  2356. }
  2357. },
  2358. detached: function detached() {
  2359. this.$vm && this.$vm.$destroy();
  2360. }
  2361. },
  2362. pageLifetimes: {
  2363. show: function show(args) {
  2364. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2365. },
  2366. hide: function hide() {
  2367. this.$vm && this.$vm.__call_hook('onPageHide');
  2368. },
  2369. resize: function resize(size) {
  2370. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2371. }
  2372. },
  2373. methods: {
  2374. __l: handleLink,
  2375. __e: handleEvent
  2376. }
  2377. };
  2378. // externalClasses
  2379. if (vueOptions.externalClasses) {
  2380. componentOptions.externalClasses = vueOptions.externalClasses;
  2381. }
  2382. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2383. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2384. componentOptions.methods[callMethod] = function (args) {
  2385. return this.$vm[callMethod](args);
  2386. };
  2387. });
  2388. }
  2389. if (needVueOptions) {
  2390. return [componentOptions, vueOptions, VueComponent];
  2391. }
  2392. if (isPage) {
  2393. return componentOptions;
  2394. }
  2395. return [componentOptions, VueComponent];
  2396. }
  2397. function parseComponent(vueComponentOptions, needVueOptions) {
  2398. return parseBaseComponent(vueComponentOptions, {
  2399. isPage: isPage,
  2400. initRelation: initRelation
  2401. }, needVueOptions);
  2402. }
  2403. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2404. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2405. function parseBasePage(vuePageOptions) {
  2406. var _parseComponent = parseComponent(vuePageOptions, true),
  2407. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2408. pageOptions = _parseComponent2[0],
  2409. vueOptions = _parseComponent2[1];
  2410. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2411. pageOptions.methods.onLoad = function (query) {
  2412. this.options = query;
  2413. var copyQuery = Object.assign({}, query);
  2414. delete copyQuery.__id__;
  2415. this.$page = {
  2416. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2417. };
  2418. this.$vm.$mp.query = query; // 兼容 mpvue
  2419. this.$vm.__call_hook('onLoad', query);
  2420. };
  2421. {
  2422. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2423. }
  2424. {
  2425. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2426. }
  2427. return pageOptions;
  2428. }
  2429. function parsePage(vuePageOptions) {
  2430. return parseBasePage(vuePageOptions);
  2431. }
  2432. function createPage(vuePageOptions) {
  2433. {
  2434. return Component(parsePage(vuePageOptions));
  2435. }
  2436. }
  2437. function createComponent(vueOptions) {
  2438. {
  2439. return Component(parseComponent(vueOptions));
  2440. }
  2441. }
  2442. function createSubpackageApp(vm) {
  2443. var appOptions = parseApp(vm);
  2444. var app = getApp({
  2445. allowDefault: true
  2446. });
  2447. vm.$scope = app;
  2448. var globalData = app.globalData;
  2449. if (globalData) {
  2450. Object.keys(appOptions.globalData).forEach(function (name) {
  2451. if (!hasOwn(globalData, name)) {
  2452. globalData[name] = appOptions.globalData[name];
  2453. }
  2454. });
  2455. }
  2456. Object.keys(appOptions).forEach(function (name) {
  2457. if (!hasOwn(app, name)) {
  2458. app[name] = appOptions[name];
  2459. }
  2460. });
  2461. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2462. wx.onAppShow(function () {
  2463. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2464. args[_key5] = arguments[_key5];
  2465. }
  2466. vm.__call_hook('onShow', args);
  2467. });
  2468. }
  2469. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2470. wx.onAppHide(function () {
  2471. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2472. args[_key6] = arguments[_key6];
  2473. }
  2474. vm.__call_hook('onHide', args);
  2475. });
  2476. }
  2477. if (isFn(appOptions.onLaunch)) {
  2478. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2479. vm.__call_hook('onLaunch', args);
  2480. }
  2481. return vm;
  2482. }
  2483. function createPlugin(vm) {
  2484. var appOptions = parseApp(vm);
  2485. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2486. wx.onAppShow(function () {
  2487. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2488. args[_key7] = arguments[_key7];
  2489. }
  2490. vm.__call_hook('onShow', args);
  2491. });
  2492. }
  2493. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2494. wx.onAppHide(function () {
  2495. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2496. args[_key8] = arguments[_key8];
  2497. }
  2498. vm.__call_hook('onHide', args);
  2499. });
  2500. }
  2501. if (isFn(appOptions.onLaunch)) {
  2502. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2503. vm.__call_hook('onLaunch', args);
  2504. }
  2505. return vm;
  2506. }
  2507. todos.forEach(function (todoApi) {
  2508. protocols[todoApi] = false;
  2509. });
  2510. canIUses.forEach(function (canIUseApi) {
  2511. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2512. if (!wx.canIUse(apiName)) {
  2513. protocols[canIUseApi] = false;
  2514. }
  2515. });
  2516. var uni = {};
  2517. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2518. uni = new Proxy({}, {
  2519. get: function get(target, name) {
  2520. if (hasOwn(target, name)) {
  2521. return target[name];
  2522. }
  2523. if (baseApi[name]) {
  2524. return baseApi[name];
  2525. }
  2526. if (api[name]) {
  2527. return promisify(name, api[name]);
  2528. }
  2529. {
  2530. if (extraApi[name]) {
  2531. return promisify(name, extraApi[name]);
  2532. }
  2533. if (todoApis[name]) {
  2534. return promisify(name, todoApis[name]);
  2535. }
  2536. }
  2537. if (eventApi[name]) {
  2538. return eventApi[name];
  2539. }
  2540. return promisify(name, wrapper(name, wx[name]));
  2541. },
  2542. set: function set(target, name, value) {
  2543. target[name] = value;
  2544. return true;
  2545. }
  2546. });
  2547. } else {
  2548. Object.keys(baseApi).forEach(function (name) {
  2549. uni[name] = baseApi[name];
  2550. });
  2551. {
  2552. Object.keys(todoApis).forEach(function (name) {
  2553. uni[name] = promisify(name, todoApis[name]);
  2554. });
  2555. Object.keys(extraApi).forEach(function (name) {
  2556. uni[name] = promisify(name, extraApi[name]);
  2557. });
  2558. }
  2559. Object.keys(eventApi).forEach(function (name) {
  2560. uni[name] = eventApi[name];
  2561. });
  2562. Object.keys(api).forEach(function (name) {
  2563. uni[name] = promisify(name, api[name]);
  2564. });
  2565. Object.keys(wx).forEach(function (name) {
  2566. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2567. uni[name] = promisify(name, wrapper(name, wx[name]));
  2568. }
  2569. });
  2570. }
  2571. wx.createApp = createApp;
  2572. wx.createPage = createPage;
  2573. wx.createComponent = createComponent;
  2574. wx.createSubpackageApp = createSubpackageApp;
  2575. wx.createPlugin = createPlugin;
  2576. var uni$1 = uni;
  2577. var _default = uni$1;
  2578. exports.default = _default;
  2579. /* 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)))
  2580. /***/ }),
  2581. /***/ 20:
  2582. /*!****************************************************************!*\
  2583. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2584. \****************************************************************/
  2585. /*! no static exports found */
  2586. /***/ (function(module, exports) {
  2587. function _iterableToArray(iter) {
  2588. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2589. }
  2590. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2591. /***/ }),
  2592. /***/ 21:
  2593. /*!******************************************************************!*\
  2594. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2595. \******************************************************************/
  2596. /*! no static exports found */
  2597. /***/ (function(module, exports) {
  2598. function _nonIterableSpread() {
  2599. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2600. }
  2601. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2602. /***/ }),
  2603. /***/ 22:
  2604. /*!*************************************************************!*\
  2605. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2606. \*************************************************************/
  2607. /*! no static exports found */
  2608. /***/ (function(module, exports, __webpack_require__) {
  2609. "use strict";
  2610. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2611. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2612. Object.defineProperty(exports, "__esModule", {
  2613. value: true
  2614. });
  2615. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2616. exports.compileI18nJsonStr = compileI18nJsonStr;
  2617. exports.hasI18nJson = hasI18nJson;
  2618. exports.initVueI18n = initVueI18n;
  2619. exports.isI18nStr = isI18nStr;
  2620. exports.isString = void 0;
  2621. exports.normalizeLocale = normalizeLocale;
  2622. exports.parseI18nJson = parseI18nJson;
  2623. exports.resolveLocale = resolveLocale;
  2624. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2625. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2626. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2627. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2628. var isObject = function isObject(val) {
  2629. return val !== null && (0, _typeof2.default)(val) === 'object';
  2630. };
  2631. var defaultDelimiters = ['{', '}'];
  2632. var BaseFormatter = /*#__PURE__*/function () {
  2633. function BaseFormatter() {
  2634. (0, _classCallCheck2.default)(this, BaseFormatter);
  2635. this._caches = Object.create(null);
  2636. }
  2637. (0, _createClass2.default)(BaseFormatter, [{
  2638. key: "interpolate",
  2639. value: function interpolate(message, values) {
  2640. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2641. if (!values) {
  2642. return [message];
  2643. }
  2644. var tokens = this._caches[message];
  2645. if (!tokens) {
  2646. tokens = parse(message, delimiters);
  2647. this._caches[message] = tokens;
  2648. }
  2649. return compile(tokens, values);
  2650. }
  2651. }]);
  2652. return BaseFormatter;
  2653. }();
  2654. exports.Formatter = BaseFormatter;
  2655. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2656. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2657. function parse(format, _ref) {
  2658. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2659. startDelimiter = _ref2[0],
  2660. endDelimiter = _ref2[1];
  2661. var tokens = [];
  2662. var position = 0;
  2663. var text = '';
  2664. while (position < format.length) {
  2665. var char = format[position++];
  2666. if (char === startDelimiter) {
  2667. if (text) {
  2668. tokens.push({
  2669. type: 'text',
  2670. value: text
  2671. });
  2672. }
  2673. text = '';
  2674. var sub = '';
  2675. char = format[position++];
  2676. while (char !== undefined && char !== endDelimiter) {
  2677. sub += char;
  2678. char = format[position++];
  2679. }
  2680. var isClosed = char === endDelimiter;
  2681. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2682. tokens.push({
  2683. value: sub,
  2684. type: type
  2685. });
  2686. }
  2687. // else if (char === '%') {
  2688. // // when found rails i18n syntax, skip text capture
  2689. // if (format[position] !== '{') {
  2690. // text += char
  2691. // }
  2692. // }
  2693. else {
  2694. text += char;
  2695. }
  2696. }
  2697. text && tokens.push({
  2698. type: 'text',
  2699. value: text
  2700. });
  2701. return tokens;
  2702. }
  2703. function compile(tokens, values) {
  2704. var compiled = [];
  2705. var index = 0;
  2706. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2707. if (mode === 'unknown') {
  2708. return compiled;
  2709. }
  2710. while (index < tokens.length) {
  2711. var token = tokens[index];
  2712. switch (token.type) {
  2713. case 'text':
  2714. compiled.push(token.value);
  2715. break;
  2716. case 'list':
  2717. compiled.push(values[parseInt(token.value, 10)]);
  2718. break;
  2719. case 'named':
  2720. if (mode === 'named') {
  2721. compiled.push(values[token.value]);
  2722. } else {
  2723. if (true) {
  2724. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2725. }
  2726. }
  2727. break;
  2728. case 'unknown':
  2729. if (true) {
  2730. console.warn("Detect 'unknown' type of token!");
  2731. }
  2732. break;
  2733. }
  2734. index++;
  2735. }
  2736. return compiled;
  2737. }
  2738. var LOCALE_ZH_HANS = 'zh-Hans';
  2739. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2740. var LOCALE_ZH_HANT = 'zh-Hant';
  2741. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2742. var LOCALE_EN = 'en';
  2743. exports.LOCALE_EN = LOCALE_EN;
  2744. var LOCALE_FR = 'fr';
  2745. exports.LOCALE_FR = LOCALE_FR;
  2746. var LOCALE_ES = 'es';
  2747. exports.LOCALE_ES = LOCALE_ES;
  2748. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2749. var hasOwn = function hasOwn(val, key) {
  2750. return hasOwnProperty.call(val, key);
  2751. };
  2752. var defaultFormatter = new BaseFormatter();
  2753. function include(str, parts) {
  2754. return !!parts.find(function (part) {
  2755. return str.indexOf(part) !== -1;
  2756. });
  2757. }
  2758. function startsWith(str, parts) {
  2759. return parts.find(function (part) {
  2760. return str.indexOf(part) === 0;
  2761. });
  2762. }
  2763. function normalizeLocale(locale, messages) {
  2764. if (!locale) {
  2765. return;
  2766. }
  2767. locale = locale.trim().replace(/_/g, '-');
  2768. if (messages && messages[locale]) {
  2769. return locale;
  2770. }
  2771. locale = locale.toLowerCase();
  2772. if (locale === 'chinese') {
  2773. // 支付宝
  2774. return LOCALE_ZH_HANS;
  2775. }
  2776. if (locale.indexOf('zh') === 0) {
  2777. if (locale.indexOf('-hans') > -1) {
  2778. return LOCALE_ZH_HANS;
  2779. }
  2780. if (locale.indexOf('-hant') > -1) {
  2781. return LOCALE_ZH_HANT;
  2782. }
  2783. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2784. return LOCALE_ZH_HANT;
  2785. }
  2786. return LOCALE_ZH_HANS;
  2787. }
  2788. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2789. if (messages && Object.keys(messages).length > 0) {
  2790. locales = Object.keys(messages);
  2791. }
  2792. var lang = startsWith(locale, locales);
  2793. if (lang) {
  2794. return lang;
  2795. }
  2796. }
  2797. var I18n = /*#__PURE__*/function () {
  2798. function I18n(_ref3) {
  2799. var locale = _ref3.locale,
  2800. fallbackLocale = _ref3.fallbackLocale,
  2801. messages = _ref3.messages,
  2802. watcher = _ref3.watcher,
  2803. formater = _ref3.formater;
  2804. (0, _classCallCheck2.default)(this, I18n);
  2805. this.locale = LOCALE_EN;
  2806. this.fallbackLocale = LOCALE_EN;
  2807. this.message = {};
  2808. this.messages = {};
  2809. this.watchers = [];
  2810. if (fallbackLocale) {
  2811. this.fallbackLocale = fallbackLocale;
  2812. }
  2813. this.formater = formater || defaultFormatter;
  2814. this.messages = messages || {};
  2815. this.setLocale(locale || LOCALE_EN);
  2816. if (watcher) {
  2817. this.watchLocale(watcher);
  2818. }
  2819. }
  2820. (0, _createClass2.default)(I18n, [{
  2821. key: "setLocale",
  2822. value: function setLocale(locale) {
  2823. var _this = this;
  2824. var oldLocale = this.locale;
  2825. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2826. if (!this.messages[this.locale]) {
  2827. // 可能初始化时不存在
  2828. this.messages[this.locale] = {};
  2829. }
  2830. this.message = this.messages[this.locale];
  2831. // 仅发生变化时,通知
  2832. if (oldLocale !== this.locale) {
  2833. this.watchers.forEach(function (watcher) {
  2834. watcher(_this.locale, oldLocale);
  2835. });
  2836. }
  2837. }
  2838. }, {
  2839. key: "getLocale",
  2840. value: function getLocale() {
  2841. return this.locale;
  2842. }
  2843. }, {
  2844. key: "watchLocale",
  2845. value: function watchLocale(fn) {
  2846. var _this2 = this;
  2847. var index = this.watchers.push(fn) - 1;
  2848. return function () {
  2849. _this2.watchers.splice(index, 1);
  2850. };
  2851. }
  2852. }, {
  2853. key: "add",
  2854. value: function add(locale, message) {
  2855. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2856. var curMessages = this.messages[locale];
  2857. if (curMessages) {
  2858. if (override) {
  2859. Object.assign(curMessages, message);
  2860. } else {
  2861. Object.keys(message).forEach(function (key) {
  2862. if (!hasOwn(curMessages, key)) {
  2863. curMessages[key] = message[key];
  2864. }
  2865. });
  2866. }
  2867. } else {
  2868. this.messages[locale] = message;
  2869. }
  2870. }
  2871. }, {
  2872. key: "f",
  2873. value: function f(message, values, delimiters) {
  2874. return this.formater.interpolate(message, values, delimiters).join('');
  2875. }
  2876. }, {
  2877. key: "t",
  2878. value: function t(key, locale, values) {
  2879. var message = this.message;
  2880. if (typeof locale === 'string') {
  2881. locale = normalizeLocale(locale, this.messages);
  2882. locale && (message = this.messages[locale]);
  2883. } else {
  2884. values = locale;
  2885. }
  2886. if (!hasOwn(message, key)) {
  2887. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  2888. return key;
  2889. }
  2890. return this.formater.interpolate(message[key], values).join('');
  2891. }
  2892. }]);
  2893. return I18n;
  2894. }();
  2895. exports.I18n = I18n;
  2896. function watchAppLocale(appVm, i18n) {
  2897. // 需要保证 watch 的触发在组件渲染之前
  2898. if (appVm.$watchLocale) {
  2899. // vue2
  2900. appVm.$watchLocale(function (newLocale) {
  2901. i18n.setLocale(newLocale);
  2902. });
  2903. } else {
  2904. appVm.$watch(function () {
  2905. return appVm.$locale;
  2906. }, function (newLocale) {
  2907. i18n.setLocale(newLocale);
  2908. });
  2909. }
  2910. }
  2911. function getDefaultLocale() {
  2912. if (typeof uni !== 'undefined' && uni.getLocale) {
  2913. return uni.getLocale();
  2914. }
  2915. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  2916. if (typeof global !== 'undefined' && global.getLocale) {
  2917. return global.getLocale();
  2918. }
  2919. return LOCALE_EN;
  2920. }
  2921. function initVueI18n(locale) {
  2922. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2923. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  2924. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  2925. // 兼容旧版本入参
  2926. if (typeof locale !== 'string') {
  2927. var _ref4 = [messages, locale];
  2928. locale = _ref4[0];
  2929. messages = _ref4[1];
  2930. }
  2931. if (typeof locale !== 'string') {
  2932. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  2933. locale = getDefaultLocale();
  2934. }
  2935. if (typeof fallbackLocale !== 'string') {
  2936. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  2937. }
  2938. var i18n = new I18n({
  2939. locale: locale,
  2940. fallbackLocale: fallbackLocale,
  2941. messages: messages,
  2942. watcher: watcher
  2943. });
  2944. var _t = function t(key, values) {
  2945. if (typeof getApp !== 'function') {
  2946. // app view
  2947. /* eslint-disable no-func-assign */
  2948. _t = function t(key, values) {
  2949. return i18n.t(key, values);
  2950. };
  2951. } else {
  2952. var isWatchedAppLocale = false;
  2953. _t = function t(key, values) {
  2954. var appVm = getApp().$vm;
  2955. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  2956. // options: {
  2957. // type: Array,
  2958. // default () {
  2959. // return [{
  2960. // icon: 'shop',
  2961. // text: t("uni-goods-nav.options.shop"),
  2962. // }, {
  2963. // icon: 'cart',
  2964. // text: t("uni-goods-nav.options.cart")
  2965. // }]
  2966. // }
  2967. // },
  2968. if (appVm) {
  2969. // 触发响应式
  2970. appVm.$locale;
  2971. if (!isWatchedAppLocale) {
  2972. isWatchedAppLocale = true;
  2973. watchAppLocale(appVm, i18n);
  2974. }
  2975. }
  2976. return i18n.t(key, values);
  2977. };
  2978. }
  2979. return _t(key, values);
  2980. };
  2981. return {
  2982. i18n: i18n,
  2983. f: function f(message, values, delimiters) {
  2984. return i18n.f(message, values, delimiters);
  2985. },
  2986. t: function t(key, values) {
  2987. return _t(key, values);
  2988. },
  2989. add: function add(locale, message) {
  2990. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2991. return i18n.add(locale, message, override);
  2992. },
  2993. watch: function watch(fn) {
  2994. return i18n.watchLocale(fn);
  2995. },
  2996. getLocale: function getLocale() {
  2997. return i18n.getLocale();
  2998. },
  2999. setLocale: function setLocale(newLocale) {
  3000. return i18n.setLocale(newLocale);
  3001. }
  3002. };
  3003. }
  3004. var isString = function isString(val) {
  3005. return typeof val === 'string';
  3006. };
  3007. exports.isString = isString;
  3008. var formater;
  3009. function hasI18nJson(jsonObj, delimiters) {
  3010. if (!formater) {
  3011. formater = new BaseFormatter();
  3012. }
  3013. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3014. var value = jsonObj[key];
  3015. if (isString(value)) {
  3016. if (isI18nStr(value, delimiters)) {
  3017. return true;
  3018. }
  3019. } else {
  3020. return hasI18nJson(value, delimiters);
  3021. }
  3022. });
  3023. }
  3024. function parseI18nJson(jsonObj, values, delimiters) {
  3025. if (!formater) {
  3026. formater = new BaseFormatter();
  3027. }
  3028. walkJsonObj(jsonObj, function (jsonObj, key) {
  3029. var value = jsonObj[key];
  3030. if (isString(value)) {
  3031. if (isI18nStr(value, delimiters)) {
  3032. jsonObj[key] = compileStr(value, values, delimiters);
  3033. }
  3034. } else {
  3035. parseI18nJson(value, values, delimiters);
  3036. }
  3037. });
  3038. return jsonObj;
  3039. }
  3040. function compileI18nJsonStr(jsonStr, _ref5) {
  3041. var locale = _ref5.locale,
  3042. locales = _ref5.locales,
  3043. delimiters = _ref5.delimiters;
  3044. if (!isI18nStr(jsonStr, delimiters)) {
  3045. return jsonStr;
  3046. }
  3047. if (!formater) {
  3048. formater = new BaseFormatter();
  3049. }
  3050. var localeValues = [];
  3051. Object.keys(locales).forEach(function (name) {
  3052. if (name !== locale) {
  3053. localeValues.push({
  3054. locale: name,
  3055. values: locales[name]
  3056. });
  3057. }
  3058. });
  3059. localeValues.unshift({
  3060. locale: locale,
  3061. values: locales[locale]
  3062. });
  3063. try {
  3064. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3065. } catch (e) {}
  3066. return jsonStr;
  3067. }
  3068. function isI18nStr(value, delimiters) {
  3069. return value.indexOf(delimiters[0]) > -1;
  3070. }
  3071. function compileStr(value, values, delimiters) {
  3072. return formater.interpolate(value, values, delimiters).join('');
  3073. }
  3074. function compileValue(jsonObj, key, localeValues, delimiters) {
  3075. var value = jsonObj[key];
  3076. if (isString(value)) {
  3077. // 存在国际化
  3078. if (isI18nStr(value, delimiters)) {
  3079. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3080. if (localeValues.length > 1) {
  3081. // 格式化国际化语言
  3082. var valueLocales = jsonObj[key + 'Locales'] = {};
  3083. localeValues.forEach(function (localValue) {
  3084. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3085. });
  3086. }
  3087. }
  3088. } else {
  3089. compileJsonObj(value, localeValues, delimiters);
  3090. }
  3091. }
  3092. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3093. walkJsonObj(jsonObj, function (jsonObj, key) {
  3094. compileValue(jsonObj, key, localeValues, delimiters);
  3095. });
  3096. return jsonObj;
  3097. }
  3098. function walkJsonObj(jsonObj, walk) {
  3099. if (Array.isArray(jsonObj)) {
  3100. for (var i = 0; i < jsonObj.length; i++) {
  3101. if (walk(jsonObj, i)) {
  3102. return true;
  3103. }
  3104. }
  3105. } else if (isObject(jsonObj)) {
  3106. for (var key in jsonObj) {
  3107. if (walk(jsonObj, key)) {
  3108. return true;
  3109. }
  3110. }
  3111. }
  3112. return false;
  3113. }
  3114. function resolveLocale(locales) {
  3115. return function (locale) {
  3116. if (!locale) {
  3117. return locale;
  3118. }
  3119. locale = normalizeLocale(locale) || locale;
  3120. return resolveLocaleChain(locale).find(function (locale) {
  3121. return locales.indexOf(locale) > -1;
  3122. });
  3123. };
  3124. }
  3125. function resolveLocaleChain(locale) {
  3126. var chain = [];
  3127. var tokens = locale.split('-');
  3128. while (tokens.length) {
  3129. chain.push(tokens.join('-'));
  3130. tokens.pop();
  3131. }
  3132. return chain;
  3133. }
  3134. /* 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)))
  3135. /***/ }),
  3136. /***/ 23:
  3137. /*!***************************************************************!*\
  3138. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3139. \***************************************************************/
  3140. /*! no static exports found */
  3141. /***/ (function(module, exports) {
  3142. function _classCallCheck(instance, Constructor) {
  3143. if (!(instance instanceof Constructor)) {
  3144. throw new TypeError("Cannot call a class as a function");
  3145. }
  3146. }
  3147. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3148. /***/ }),
  3149. /***/ 24:
  3150. /*!************************************************************!*\
  3151. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3152. \************************************************************/
  3153. /*! no static exports found */
  3154. /***/ (function(module, exports, __webpack_require__) {
  3155. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3156. function _defineProperties(target, props) {
  3157. for (var i = 0; i < props.length; i++) {
  3158. var descriptor = props[i];
  3159. descriptor.enumerable = descriptor.enumerable || false;
  3160. descriptor.configurable = true;
  3161. if ("value" in descriptor) descriptor.writable = true;
  3162. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3163. }
  3164. }
  3165. function _createClass(Constructor, protoProps, staticProps) {
  3166. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3167. if (staticProps) _defineProperties(Constructor, staticProps);
  3168. Object.defineProperty(Constructor, "prototype", {
  3169. writable: false
  3170. });
  3171. return Constructor;
  3172. }
  3173. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3174. /***/ }),
  3175. /***/ 25:
  3176. /*!******************************************************************************************!*\
  3177. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3178. \******************************************************************************************/
  3179. /*! exports provided: default */
  3180. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3181. "use strict";
  3182. __webpack_require__.r(__webpack_exports__);
  3183. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3184. * Vue.js v2.6.11
  3185. * (c) 2014-2023 Evan You
  3186. * Released under the MIT License.
  3187. */
  3188. /* */
  3189. var emptyObject = Object.freeze({});
  3190. // These helpers produce better VM code in JS engines due to their
  3191. // explicitness and function inlining.
  3192. function isUndef (v) {
  3193. return v === undefined || v === null
  3194. }
  3195. function isDef (v) {
  3196. return v !== undefined && v !== null
  3197. }
  3198. function isTrue (v) {
  3199. return v === true
  3200. }
  3201. function isFalse (v) {
  3202. return v === false
  3203. }
  3204. /**
  3205. * Check if value is primitive.
  3206. */
  3207. function isPrimitive (value) {
  3208. return (
  3209. typeof value === 'string' ||
  3210. typeof value === 'number' ||
  3211. // $flow-disable-line
  3212. typeof value === 'symbol' ||
  3213. typeof value === 'boolean'
  3214. )
  3215. }
  3216. /**
  3217. * Quick object check - this is primarily used to tell
  3218. * Objects from primitive values when we know the value
  3219. * is a JSON-compliant type.
  3220. */
  3221. function isObject (obj) {
  3222. return obj !== null && typeof obj === 'object'
  3223. }
  3224. /**
  3225. * Get the raw type string of a value, e.g., [object Object].
  3226. */
  3227. var _toString = Object.prototype.toString;
  3228. function toRawType (value) {
  3229. return _toString.call(value).slice(8, -1)
  3230. }
  3231. /**
  3232. * Strict object type check. Only returns true
  3233. * for plain JavaScript objects.
  3234. */
  3235. function isPlainObject (obj) {
  3236. return _toString.call(obj) === '[object Object]'
  3237. }
  3238. function isRegExp (v) {
  3239. return _toString.call(v) === '[object RegExp]'
  3240. }
  3241. /**
  3242. * Check if val is a valid array index.
  3243. */
  3244. function isValidArrayIndex (val) {
  3245. var n = parseFloat(String(val));
  3246. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3247. }
  3248. function isPromise (val) {
  3249. return (
  3250. isDef(val) &&
  3251. typeof val.then === 'function' &&
  3252. typeof val.catch === 'function'
  3253. )
  3254. }
  3255. /**
  3256. * Convert a value to a string that is actually rendered.
  3257. */
  3258. function toString (val) {
  3259. return val == null
  3260. ? ''
  3261. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3262. ? JSON.stringify(val, null, 2)
  3263. : String(val)
  3264. }
  3265. /**
  3266. * Convert an input value to a number for persistence.
  3267. * If the conversion fails, return original string.
  3268. */
  3269. function toNumber (val) {
  3270. var n = parseFloat(val);
  3271. return isNaN(n) ? val : n
  3272. }
  3273. /**
  3274. * Make a map and return a function for checking if a key
  3275. * is in that map.
  3276. */
  3277. function makeMap (
  3278. str,
  3279. expectsLowerCase
  3280. ) {
  3281. var map = Object.create(null);
  3282. var list = str.split(',');
  3283. for (var i = 0; i < list.length; i++) {
  3284. map[list[i]] = true;
  3285. }
  3286. return expectsLowerCase
  3287. ? function (val) { return map[val.toLowerCase()]; }
  3288. : function (val) { return map[val]; }
  3289. }
  3290. /**
  3291. * Check if a tag is a built-in tag.
  3292. */
  3293. var isBuiltInTag = makeMap('slot,component', true);
  3294. /**
  3295. * Check if an attribute is a reserved attribute.
  3296. */
  3297. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3298. /**
  3299. * Remove an item from an array.
  3300. */
  3301. function remove (arr, item) {
  3302. if (arr.length) {
  3303. var index = arr.indexOf(item);
  3304. if (index > -1) {
  3305. return arr.splice(index, 1)
  3306. }
  3307. }
  3308. }
  3309. /**
  3310. * Check whether an object has the property.
  3311. */
  3312. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3313. function hasOwn (obj, key) {
  3314. return hasOwnProperty.call(obj, key)
  3315. }
  3316. /**
  3317. * Create a cached version of a pure function.
  3318. */
  3319. function cached (fn) {
  3320. var cache = Object.create(null);
  3321. return (function cachedFn (str) {
  3322. var hit = cache[str];
  3323. return hit || (cache[str] = fn(str))
  3324. })
  3325. }
  3326. /**
  3327. * Camelize a hyphen-delimited string.
  3328. */
  3329. var camelizeRE = /-(\w)/g;
  3330. var camelize = cached(function (str) {
  3331. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3332. });
  3333. /**
  3334. * Capitalize a string.
  3335. */
  3336. var capitalize = cached(function (str) {
  3337. return str.charAt(0).toUpperCase() + str.slice(1)
  3338. });
  3339. /**
  3340. * Hyphenate a camelCase string.
  3341. */
  3342. var hyphenateRE = /\B([A-Z])/g;
  3343. var hyphenate = cached(function (str) {
  3344. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3345. });
  3346. /**
  3347. * Simple bind polyfill for environments that do not support it,
  3348. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3349. * since native bind is now performant enough in most browsers.
  3350. * But removing it would mean breaking code that was able to run in
  3351. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3352. */
  3353. /* istanbul ignore next */
  3354. function polyfillBind (fn, ctx) {
  3355. function boundFn (a) {
  3356. var l = arguments.length;
  3357. return l
  3358. ? l > 1
  3359. ? fn.apply(ctx, arguments)
  3360. : fn.call(ctx, a)
  3361. : fn.call(ctx)
  3362. }
  3363. boundFn._length = fn.length;
  3364. return boundFn
  3365. }
  3366. function nativeBind (fn, ctx) {
  3367. return fn.bind(ctx)
  3368. }
  3369. var bind = Function.prototype.bind
  3370. ? nativeBind
  3371. : polyfillBind;
  3372. /**
  3373. * Convert an Array-like object to a real Array.
  3374. */
  3375. function toArray (list, start) {
  3376. start = start || 0;
  3377. var i = list.length - start;
  3378. var ret = new Array(i);
  3379. while (i--) {
  3380. ret[i] = list[i + start];
  3381. }
  3382. return ret
  3383. }
  3384. /**
  3385. * Mix properties into target object.
  3386. */
  3387. function extend (to, _from) {
  3388. for (var key in _from) {
  3389. to[key] = _from[key];
  3390. }
  3391. return to
  3392. }
  3393. /**
  3394. * Merge an Array of Objects into a single Object.
  3395. */
  3396. function toObject (arr) {
  3397. var res = {};
  3398. for (var i = 0; i < arr.length; i++) {
  3399. if (arr[i]) {
  3400. extend(res, arr[i]);
  3401. }
  3402. }
  3403. return res
  3404. }
  3405. /* eslint-disable no-unused-vars */
  3406. /**
  3407. * Perform no operation.
  3408. * Stubbing args to make Flow happy without leaving useless transpiled code
  3409. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3410. */
  3411. function noop (a, b, c) {}
  3412. /**
  3413. * Always return false.
  3414. */
  3415. var no = function (a, b, c) { return false; };
  3416. /* eslint-enable no-unused-vars */
  3417. /**
  3418. * Return the same value.
  3419. */
  3420. var identity = function (_) { return _; };
  3421. /**
  3422. * Check if two values are loosely equal - that is,
  3423. * if they are plain objects, do they have the same shape?
  3424. */
  3425. function looseEqual (a, b) {
  3426. if (a === b) { return true }
  3427. var isObjectA = isObject(a);
  3428. var isObjectB = isObject(b);
  3429. if (isObjectA && isObjectB) {
  3430. try {
  3431. var isArrayA = Array.isArray(a);
  3432. var isArrayB = Array.isArray(b);
  3433. if (isArrayA && isArrayB) {
  3434. return a.length === b.length && a.every(function (e, i) {
  3435. return looseEqual(e, b[i])
  3436. })
  3437. } else if (a instanceof Date && b instanceof Date) {
  3438. return a.getTime() === b.getTime()
  3439. } else if (!isArrayA && !isArrayB) {
  3440. var keysA = Object.keys(a);
  3441. var keysB = Object.keys(b);
  3442. return keysA.length === keysB.length && keysA.every(function (key) {
  3443. return looseEqual(a[key], b[key])
  3444. })
  3445. } else {
  3446. /* istanbul ignore next */
  3447. return false
  3448. }
  3449. } catch (e) {
  3450. /* istanbul ignore next */
  3451. return false
  3452. }
  3453. } else if (!isObjectA && !isObjectB) {
  3454. return String(a) === String(b)
  3455. } else {
  3456. return false
  3457. }
  3458. }
  3459. /**
  3460. * Return the first index at which a loosely equal value can be
  3461. * found in the array (if value is a plain object, the array must
  3462. * contain an object of the same shape), or -1 if it is not present.
  3463. */
  3464. function looseIndexOf (arr, val) {
  3465. for (var i = 0; i < arr.length; i++) {
  3466. if (looseEqual(arr[i], val)) { return i }
  3467. }
  3468. return -1
  3469. }
  3470. /**
  3471. * Ensure a function is called only once.
  3472. */
  3473. function once (fn) {
  3474. var called = false;
  3475. return function () {
  3476. if (!called) {
  3477. called = true;
  3478. fn.apply(this, arguments);
  3479. }
  3480. }
  3481. }
  3482. var ASSET_TYPES = [
  3483. 'component',
  3484. 'directive',
  3485. 'filter'
  3486. ];
  3487. var LIFECYCLE_HOOKS = [
  3488. 'beforeCreate',
  3489. 'created',
  3490. 'beforeMount',
  3491. 'mounted',
  3492. 'beforeUpdate',
  3493. 'updated',
  3494. 'beforeDestroy',
  3495. 'destroyed',
  3496. 'activated',
  3497. 'deactivated',
  3498. 'errorCaptured',
  3499. 'serverPrefetch'
  3500. ];
  3501. /* */
  3502. var config = ({
  3503. /**
  3504. * Option merge strategies (used in core/util/options)
  3505. */
  3506. // $flow-disable-line
  3507. optionMergeStrategies: Object.create(null),
  3508. /**
  3509. * Whether to suppress warnings.
  3510. */
  3511. silent: false,
  3512. /**
  3513. * Show production mode tip message on boot?
  3514. */
  3515. productionTip: "development" !== 'production',
  3516. /**
  3517. * Whether to enable devtools
  3518. */
  3519. devtools: "development" !== 'production',
  3520. /**
  3521. * Whether to record perf
  3522. */
  3523. performance: false,
  3524. /**
  3525. * Error handler for watcher errors
  3526. */
  3527. errorHandler: null,
  3528. /**
  3529. * Warn handler for watcher warns
  3530. */
  3531. warnHandler: null,
  3532. /**
  3533. * Ignore certain custom elements
  3534. */
  3535. ignoredElements: [],
  3536. /**
  3537. * Custom user key aliases for v-on
  3538. */
  3539. // $flow-disable-line
  3540. keyCodes: Object.create(null),
  3541. /**
  3542. * Check if a tag is reserved so that it cannot be registered as a
  3543. * component. This is platform-dependent and may be overwritten.
  3544. */
  3545. isReservedTag: no,
  3546. /**
  3547. * Check if an attribute is reserved so that it cannot be used as a component
  3548. * prop. This is platform-dependent and may be overwritten.
  3549. */
  3550. isReservedAttr: no,
  3551. /**
  3552. * Check if a tag is an unknown element.
  3553. * Platform-dependent.
  3554. */
  3555. isUnknownElement: no,
  3556. /**
  3557. * Get the namespace of an element
  3558. */
  3559. getTagNamespace: noop,
  3560. /**
  3561. * Parse the real tag name for the specific platform.
  3562. */
  3563. parsePlatformTagName: identity,
  3564. /**
  3565. * Check if an attribute must be bound using property, e.g. value
  3566. * Platform-dependent.
  3567. */
  3568. mustUseProp: no,
  3569. /**
  3570. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3571. * This will significantly reduce performance if set to false.
  3572. */
  3573. async: true,
  3574. /**
  3575. * Exposed for legacy reasons
  3576. */
  3577. _lifecycleHooks: LIFECYCLE_HOOKS
  3578. });
  3579. /* */
  3580. /**
  3581. * unicode letters used for parsing html tags, component names and property paths.
  3582. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3583. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3584. */
  3585. 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/;
  3586. /**
  3587. * Check if a string starts with $ or _
  3588. */
  3589. function isReserved (str) {
  3590. var c = (str + '').charCodeAt(0);
  3591. return c === 0x24 || c === 0x5F
  3592. }
  3593. /**
  3594. * Define a property.
  3595. */
  3596. function def (obj, key, val, enumerable) {
  3597. Object.defineProperty(obj, key, {
  3598. value: val,
  3599. enumerable: !!enumerable,
  3600. writable: true,
  3601. configurable: true
  3602. });
  3603. }
  3604. /**
  3605. * Parse simple path.
  3606. */
  3607. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3608. function parsePath (path) {
  3609. if (bailRE.test(path)) {
  3610. return
  3611. }
  3612. var segments = path.split('.');
  3613. return function (obj) {
  3614. for (var i = 0; i < segments.length; i++) {
  3615. if (!obj) { return }
  3616. obj = obj[segments[i]];
  3617. }
  3618. return obj
  3619. }
  3620. }
  3621. /* */
  3622. // can we use __proto__?
  3623. var hasProto = '__proto__' in {};
  3624. // Browser environment sniffing
  3625. var inBrowser = typeof window !== 'undefined';
  3626. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3627. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3628. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3629. var isIE = UA && /msie|trident/.test(UA);
  3630. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3631. var isEdge = UA && UA.indexOf('edge/') > 0;
  3632. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3633. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3634. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3635. var isPhantomJS = UA && /phantomjs/.test(UA);
  3636. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3637. // Firefox has a "watch" function on Object.prototype...
  3638. var nativeWatch = ({}).watch;
  3639. if (inBrowser) {
  3640. try {
  3641. var opts = {};
  3642. Object.defineProperty(opts, 'passive', ({
  3643. get: function get () {
  3644. }
  3645. })); // https://github.com/facebook/flow/issues/285
  3646. window.addEventListener('test-passive', null, opts);
  3647. } catch (e) {}
  3648. }
  3649. // this needs to be lazy-evaled because vue may be required before
  3650. // vue-server-renderer can set VUE_ENV
  3651. var _isServer;
  3652. var isServerRendering = function () {
  3653. if (_isServer === undefined) {
  3654. /* istanbul ignore if */
  3655. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3656. // detect presence of vue-server-renderer and avoid
  3657. // Webpack shimming the process
  3658. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3659. } else {
  3660. _isServer = false;
  3661. }
  3662. }
  3663. return _isServer
  3664. };
  3665. // detect devtools
  3666. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3667. /* istanbul ignore next */
  3668. function isNative (Ctor) {
  3669. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3670. }
  3671. var hasSymbol =
  3672. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3673. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3674. var _Set;
  3675. /* istanbul ignore if */ // $flow-disable-line
  3676. if (typeof Set !== 'undefined' && isNative(Set)) {
  3677. // use native Set when available.
  3678. _Set = Set;
  3679. } else {
  3680. // a non-standard Set polyfill that only works with primitive keys.
  3681. _Set = /*@__PURE__*/(function () {
  3682. function Set () {
  3683. this.set = Object.create(null);
  3684. }
  3685. Set.prototype.has = function has (key) {
  3686. return this.set[key] === true
  3687. };
  3688. Set.prototype.add = function add (key) {
  3689. this.set[key] = true;
  3690. };
  3691. Set.prototype.clear = function clear () {
  3692. this.set = Object.create(null);
  3693. };
  3694. return Set;
  3695. }());
  3696. }
  3697. /* */
  3698. var warn = noop;
  3699. var tip = noop;
  3700. var generateComponentTrace = (noop); // work around flow check
  3701. var formatComponentName = (noop);
  3702. if (true) {
  3703. var hasConsole = typeof console !== 'undefined';
  3704. var classifyRE = /(?:^|[-_])(\w)/g;
  3705. var classify = function (str) { return str
  3706. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3707. .replace(/[-_]/g, ''); };
  3708. warn = function (msg, vm) {
  3709. var trace = vm ? generateComponentTrace(vm) : '';
  3710. if (config.warnHandler) {
  3711. config.warnHandler.call(null, msg, vm, trace);
  3712. } else if (hasConsole && (!config.silent)) {
  3713. console.error(("[Vue warn]: " + msg + trace));
  3714. }
  3715. };
  3716. tip = function (msg, vm) {
  3717. if (hasConsole && (!config.silent)) {
  3718. console.warn("[Vue tip]: " + msg + (
  3719. vm ? generateComponentTrace(vm) : ''
  3720. ));
  3721. }
  3722. };
  3723. formatComponentName = function (vm, includeFile) {
  3724. if (vm.$root === vm) {
  3725. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3726. return ('') + vm.$options.__file
  3727. }
  3728. return '<Root>'
  3729. }
  3730. var options = typeof vm === 'function' && vm.cid != null
  3731. ? vm.options
  3732. : vm._isVue
  3733. ? vm.$options || vm.constructor.options
  3734. : vm;
  3735. var name = options.name || options._componentTag;
  3736. var file = options.__file;
  3737. if (!name && file) {
  3738. var match = file.match(/([^/\\]+)\.vue$/);
  3739. name = match && match[1];
  3740. }
  3741. return (
  3742. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3743. (file && includeFile !== false ? (" at " + file) : '')
  3744. )
  3745. };
  3746. var repeat = function (str, n) {
  3747. var res = '';
  3748. while (n) {
  3749. if (n % 2 === 1) { res += str; }
  3750. if (n > 1) { str += str; }
  3751. n >>= 1;
  3752. }
  3753. return res
  3754. };
  3755. generateComponentTrace = function (vm) {
  3756. if (vm._isVue && vm.$parent) {
  3757. var tree = [];
  3758. var currentRecursiveSequence = 0;
  3759. while (vm && vm.$options.name !== 'PageBody') {
  3760. if (tree.length > 0) {
  3761. var last = tree[tree.length - 1];
  3762. if (last.constructor === vm.constructor) {
  3763. currentRecursiveSequence++;
  3764. vm = vm.$parent;
  3765. continue
  3766. } else if (currentRecursiveSequence > 0) {
  3767. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3768. currentRecursiveSequence = 0;
  3769. }
  3770. }
  3771. !vm.$options.isReserved && tree.push(vm);
  3772. vm = vm.$parent;
  3773. }
  3774. return '\n\nfound in\n\n' + tree
  3775. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3776. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3777. : formatComponentName(vm))); })
  3778. .join('\n')
  3779. } else {
  3780. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3781. }
  3782. };
  3783. }
  3784. /* */
  3785. var uid = 0;
  3786. /**
  3787. * A dep is an observable that can have multiple
  3788. * directives subscribing to it.
  3789. */
  3790. var Dep = function Dep () {
  3791. this.id = uid++;
  3792. this.subs = [];
  3793. };
  3794. Dep.prototype.addSub = function addSub (sub) {
  3795. this.subs.push(sub);
  3796. };
  3797. Dep.prototype.removeSub = function removeSub (sub) {
  3798. remove(this.subs, sub);
  3799. };
  3800. Dep.prototype.depend = function depend () {
  3801. if (Dep.SharedObject.target) {
  3802. Dep.SharedObject.target.addDep(this);
  3803. }
  3804. };
  3805. Dep.prototype.notify = function notify () {
  3806. // stabilize the subscriber list first
  3807. var subs = this.subs.slice();
  3808. if ( true && !config.async) {
  3809. // subs aren't sorted in scheduler if not running async
  3810. // we need to sort them now to make sure they fire in correct
  3811. // order
  3812. subs.sort(function (a, b) { return a.id - b.id; });
  3813. }
  3814. for (var i = 0, l = subs.length; i < l; i++) {
  3815. subs[i].update();
  3816. }
  3817. };
  3818. // The current target watcher being evaluated.
  3819. // This is globally unique because only one watcher
  3820. // can be evaluated at a time.
  3821. // fixed by xxxxxx (nvue shared vuex)
  3822. /* eslint-disable no-undef */
  3823. Dep.SharedObject = {};
  3824. Dep.SharedObject.target = null;
  3825. Dep.SharedObject.targetStack = [];
  3826. function pushTarget (target) {
  3827. Dep.SharedObject.targetStack.push(target);
  3828. Dep.SharedObject.target = target;
  3829. Dep.target = target;
  3830. }
  3831. function popTarget () {
  3832. Dep.SharedObject.targetStack.pop();
  3833. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3834. Dep.target = Dep.SharedObject.target;
  3835. }
  3836. /* */
  3837. var VNode = function VNode (
  3838. tag,
  3839. data,
  3840. children,
  3841. text,
  3842. elm,
  3843. context,
  3844. componentOptions,
  3845. asyncFactory
  3846. ) {
  3847. this.tag = tag;
  3848. this.data = data;
  3849. this.children = children;
  3850. this.text = text;
  3851. this.elm = elm;
  3852. this.ns = undefined;
  3853. this.context = context;
  3854. this.fnContext = undefined;
  3855. this.fnOptions = undefined;
  3856. this.fnScopeId = undefined;
  3857. this.key = data && data.key;
  3858. this.componentOptions = componentOptions;
  3859. this.componentInstance = undefined;
  3860. this.parent = undefined;
  3861. this.raw = false;
  3862. this.isStatic = false;
  3863. this.isRootInsert = true;
  3864. this.isComment = false;
  3865. this.isCloned = false;
  3866. this.isOnce = false;
  3867. this.asyncFactory = asyncFactory;
  3868. this.asyncMeta = undefined;
  3869. this.isAsyncPlaceholder = false;
  3870. };
  3871. var prototypeAccessors = { child: { configurable: true } };
  3872. // DEPRECATED: alias for componentInstance for backwards compat.
  3873. /* istanbul ignore next */
  3874. prototypeAccessors.child.get = function () {
  3875. return this.componentInstance
  3876. };
  3877. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3878. var createEmptyVNode = function (text) {
  3879. if ( text === void 0 ) text = '';
  3880. var node = new VNode();
  3881. node.text = text;
  3882. node.isComment = true;
  3883. return node
  3884. };
  3885. function createTextVNode (val) {
  3886. return new VNode(undefined, undefined, undefined, String(val))
  3887. }
  3888. // optimized shallow clone
  3889. // used for static nodes and slot nodes because they may be reused across
  3890. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3891. // on their elm reference.
  3892. function cloneVNode (vnode) {
  3893. var cloned = new VNode(
  3894. vnode.tag,
  3895. vnode.data,
  3896. // #7975
  3897. // clone children array to avoid mutating original in case of cloning
  3898. // a child.
  3899. vnode.children && vnode.children.slice(),
  3900. vnode.text,
  3901. vnode.elm,
  3902. vnode.context,
  3903. vnode.componentOptions,
  3904. vnode.asyncFactory
  3905. );
  3906. cloned.ns = vnode.ns;
  3907. cloned.isStatic = vnode.isStatic;
  3908. cloned.key = vnode.key;
  3909. cloned.isComment = vnode.isComment;
  3910. cloned.fnContext = vnode.fnContext;
  3911. cloned.fnOptions = vnode.fnOptions;
  3912. cloned.fnScopeId = vnode.fnScopeId;
  3913. cloned.asyncMeta = vnode.asyncMeta;
  3914. cloned.isCloned = true;
  3915. return cloned
  3916. }
  3917. /*
  3918. * not type checking this file because flow doesn't play well with
  3919. * dynamically accessing methods on Array prototype
  3920. */
  3921. var arrayProto = Array.prototype;
  3922. var arrayMethods = Object.create(arrayProto);
  3923. var methodsToPatch = [
  3924. 'push',
  3925. 'pop',
  3926. 'shift',
  3927. 'unshift',
  3928. 'splice',
  3929. 'sort',
  3930. 'reverse'
  3931. ];
  3932. /**
  3933. * Intercept mutating methods and emit events
  3934. */
  3935. methodsToPatch.forEach(function (method) {
  3936. // cache original method
  3937. var original = arrayProto[method];
  3938. def(arrayMethods, method, function mutator () {
  3939. var args = [], len = arguments.length;
  3940. while ( len-- ) args[ len ] = arguments[ len ];
  3941. var result = original.apply(this, args);
  3942. var ob = this.__ob__;
  3943. var inserted;
  3944. switch (method) {
  3945. case 'push':
  3946. case 'unshift':
  3947. inserted = args;
  3948. break
  3949. case 'splice':
  3950. inserted = args.slice(2);
  3951. break
  3952. }
  3953. if (inserted) { ob.observeArray(inserted); }
  3954. // notify change
  3955. ob.dep.notify();
  3956. return result
  3957. });
  3958. });
  3959. /* */
  3960. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  3961. /**
  3962. * In some cases we may want to disable observation inside a component's
  3963. * update computation.
  3964. */
  3965. var shouldObserve = true;
  3966. function toggleObserving (value) {
  3967. shouldObserve = value;
  3968. }
  3969. /**
  3970. * Observer class that is attached to each observed
  3971. * object. Once attached, the observer converts the target
  3972. * object's property keys into getter/setters that
  3973. * collect dependencies and dispatch updates.
  3974. */
  3975. var Observer = function Observer (value) {
  3976. this.value = value;
  3977. this.dep = new Dep();
  3978. this.vmCount = 0;
  3979. def(value, '__ob__', this);
  3980. if (Array.isArray(value)) {
  3981. if (hasProto) {
  3982. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  3983. if(value.push !== value.__proto__.push){
  3984. copyAugment(value, arrayMethods, arrayKeys);
  3985. } else {
  3986. protoAugment(value, arrayMethods);
  3987. }
  3988. }
  3989. } else {
  3990. copyAugment(value, arrayMethods, arrayKeys);
  3991. }
  3992. this.observeArray(value);
  3993. } else {
  3994. this.walk(value);
  3995. }
  3996. };
  3997. /**
  3998. * Walk through all properties and convert them into
  3999. * getter/setters. This method should only be called when
  4000. * value type is Object.
  4001. */
  4002. Observer.prototype.walk = function walk (obj) {
  4003. var keys = Object.keys(obj);
  4004. for (var i = 0; i < keys.length; i++) {
  4005. defineReactive$$1(obj, keys[i]);
  4006. }
  4007. };
  4008. /**
  4009. * Observe a list of Array items.
  4010. */
  4011. Observer.prototype.observeArray = function observeArray (items) {
  4012. for (var i = 0, l = items.length; i < l; i++) {
  4013. observe(items[i]);
  4014. }
  4015. };
  4016. // helpers
  4017. /**
  4018. * Augment a target Object or Array by intercepting
  4019. * the prototype chain using __proto__
  4020. */
  4021. function protoAugment (target, src) {
  4022. /* eslint-disable no-proto */
  4023. target.__proto__ = src;
  4024. /* eslint-enable no-proto */
  4025. }
  4026. /**
  4027. * Augment a target Object or Array by defining
  4028. * hidden properties.
  4029. */
  4030. /* istanbul ignore next */
  4031. function copyAugment (target, src, keys) {
  4032. for (var i = 0, l = keys.length; i < l; i++) {
  4033. var key = keys[i];
  4034. def(target, key, src[key]);
  4035. }
  4036. }
  4037. /**
  4038. * Attempt to create an observer instance for a value,
  4039. * returns the new observer if successfully observed,
  4040. * or the existing observer if the value already has one.
  4041. */
  4042. function observe (value, asRootData) {
  4043. if (!isObject(value) || value instanceof VNode) {
  4044. return
  4045. }
  4046. var ob;
  4047. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4048. ob = value.__ob__;
  4049. } else if (
  4050. shouldObserve &&
  4051. !isServerRendering() &&
  4052. (Array.isArray(value) || isPlainObject(value)) &&
  4053. Object.isExtensible(value) &&
  4054. !value._isVue &&
  4055. !value.__v_isMPComponent
  4056. ) {
  4057. ob = new Observer(value);
  4058. }
  4059. if (asRootData && ob) {
  4060. ob.vmCount++;
  4061. }
  4062. return ob
  4063. }
  4064. /**
  4065. * Define a reactive property on an Object.
  4066. */
  4067. function defineReactive$$1 (
  4068. obj,
  4069. key,
  4070. val,
  4071. customSetter,
  4072. shallow
  4073. ) {
  4074. var dep = new Dep();
  4075. var property = Object.getOwnPropertyDescriptor(obj, key);
  4076. if (property && property.configurable === false) {
  4077. return
  4078. }
  4079. // cater for pre-defined getter/setters
  4080. var getter = property && property.get;
  4081. var setter = property && property.set;
  4082. if ((!getter || setter) && arguments.length === 2) {
  4083. val = obj[key];
  4084. }
  4085. var childOb = !shallow && observe(val);
  4086. Object.defineProperty(obj, key, {
  4087. enumerable: true,
  4088. configurable: true,
  4089. get: function reactiveGetter () {
  4090. var value = getter ? getter.call(obj) : val;
  4091. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4092. dep.depend();
  4093. if (childOb) {
  4094. childOb.dep.depend();
  4095. if (Array.isArray(value)) {
  4096. dependArray(value);
  4097. }
  4098. }
  4099. }
  4100. return value
  4101. },
  4102. set: function reactiveSetter (newVal) {
  4103. var value = getter ? getter.call(obj) : val;
  4104. /* eslint-disable no-self-compare */
  4105. if (newVal === value || (newVal !== newVal && value !== value)) {
  4106. return
  4107. }
  4108. /* eslint-enable no-self-compare */
  4109. if ( true && customSetter) {
  4110. customSetter();
  4111. }
  4112. // #7981: for accessor properties without setter
  4113. if (getter && !setter) { return }
  4114. if (setter) {
  4115. setter.call(obj, newVal);
  4116. } else {
  4117. val = newVal;
  4118. }
  4119. childOb = !shallow && observe(newVal);
  4120. dep.notify();
  4121. }
  4122. });
  4123. }
  4124. /**
  4125. * Set a property on an object. Adds the new property and
  4126. * triggers change notification if the property doesn't
  4127. * already exist.
  4128. */
  4129. function set (target, key, val) {
  4130. if ( true &&
  4131. (isUndef(target) || isPrimitive(target))
  4132. ) {
  4133. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4134. }
  4135. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4136. target.length = Math.max(target.length, key);
  4137. target.splice(key, 1, val);
  4138. return val
  4139. }
  4140. if (key in target && !(key in Object.prototype)) {
  4141. target[key] = val;
  4142. return val
  4143. }
  4144. var ob = (target).__ob__;
  4145. if (target._isVue || (ob && ob.vmCount)) {
  4146. true && warn(
  4147. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4148. 'at runtime - declare it upfront in the data option.'
  4149. );
  4150. return val
  4151. }
  4152. if (!ob) {
  4153. target[key] = val;
  4154. return val
  4155. }
  4156. defineReactive$$1(ob.value, key, val);
  4157. ob.dep.notify();
  4158. return val
  4159. }
  4160. /**
  4161. * Delete a property and trigger change if necessary.
  4162. */
  4163. function del (target, key) {
  4164. if ( true &&
  4165. (isUndef(target) || isPrimitive(target))
  4166. ) {
  4167. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4168. }
  4169. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4170. target.splice(key, 1);
  4171. return
  4172. }
  4173. var ob = (target).__ob__;
  4174. if (target._isVue || (ob && ob.vmCount)) {
  4175. true && warn(
  4176. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4177. '- just set it to null.'
  4178. );
  4179. return
  4180. }
  4181. if (!hasOwn(target, key)) {
  4182. return
  4183. }
  4184. delete target[key];
  4185. if (!ob) {
  4186. return
  4187. }
  4188. ob.dep.notify();
  4189. }
  4190. /**
  4191. * Collect dependencies on array elements when the array is touched, since
  4192. * we cannot intercept array element access like property getters.
  4193. */
  4194. function dependArray (value) {
  4195. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4196. e = value[i];
  4197. e && e.__ob__ && e.__ob__.dep.depend();
  4198. if (Array.isArray(e)) {
  4199. dependArray(e);
  4200. }
  4201. }
  4202. }
  4203. /* */
  4204. /**
  4205. * Option overwriting strategies are functions that handle
  4206. * how to merge a parent option value and a child option
  4207. * value into the final value.
  4208. */
  4209. var strats = config.optionMergeStrategies;
  4210. /**
  4211. * Options with restrictions
  4212. */
  4213. if (true) {
  4214. strats.el = strats.propsData = function (parent, child, vm, key) {
  4215. if (!vm) {
  4216. warn(
  4217. "option \"" + key + "\" can only be used during instance " +
  4218. 'creation with the `new` keyword.'
  4219. );
  4220. }
  4221. return defaultStrat(parent, child)
  4222. };
  4223. }
  4224. /**
  4225. * Helper that recursively merges two data objects together.
  4226. */
  4227. function mergeData (to, from) {
  4228. if (!from) { return to }
  4229. var key, toVal, fromVal;
  4230. var keys = hasSymbol
  4231. ? Reflect.ownKeys(from)
  4232. : Object.keys(from);
  4233. for (var i = 0; i < keys.length; i++) {
  4234. key = keys[i];
  4235. // in case the object is already observed...
  4236. if (key === '__ob__') { continue }
  4237. toVal = to[key];
  4238. fromVal = from[key];
  4239. if (!hasOwn(to, key)) {
  4240. set(to, key, fromVal);
  4241. } else if (
  4242. toVal !== fromVal &&
  4243. isPlainObject(toVal) &&
  4244. isPlainObject(fromVal)
  4245. ) {
  4246. mergeData(toVal, fromVal);
  4247. }
  4248. }
  4249. return to
  4250. }
  4251. /**
  4252. * Data
  4253. */
  4254. function mergeDataOrFn (
  4255. parentVal,
  4256. childVal,
  4257. vm
  4258. ) {
  4259. if (!vm) {
  4260. // in a Vue.extend merge, both should be functions
  4261. if (!childVal) {
  4262. return parentVal
  4263. }
  4264. if (!parentVal) {
  4265. return childVal
  4266. }
  4267. // when parentVal & childVal are both present,
  4268. // we need to return a function that returns the
  4269. // merged result of both functions... no need to
  4270. // check if parentVal is a function here because
  4271. // it has to be a function to pass previous merges.
  4272. return function mergedDataFn () {
  4273. return mergeData(
  4274. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4275. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4276. )
  4277. }
  4278. } else {
  4279. return function mergedInstanceDataFn () {
  4280. // instance merge
  4281. var instanceData = typeof childVal === 'function'
  4282. ? childVal.call(vm, vm)
  4283. : childVal;
  4284. var defaultData = typeof parentVal === 'function'
  4285. ? parentVal.call(vm, vm)
  4286. : parentVal;
  4287. if (instanceData) {
  4288. return mergeData(instanceData, defaultData)
  4289. } else {
  4290. return defaultData
  4291. }
  4292. }
  4293. }
  4294. }
  4295. strats.data = function (
  4296. parentVal,
  4297. childVal,
  4298. vm
  4299. ) {
  4300. if (!vm) {
  4301. if (childVal && typeof childVal !== 'function') {
  4302. true && warn(
  4303. 'The "data" option should be a function ' +
  4304. 'that returns a per-instance value in component ' +
  4305. 'definitions.',
  4306. vm
  4307. );
  4308. return parentVal
  4309. }
  4310. return mergeDataOrFn(parentVal, childVal)
  4311. }
  4312. return mergeDataOrFn(parentVal, childVal, vm)
  4313. };
  4314. /**
  4315. * Hooks and props are merged as arrays.
  4316. */
  4317. function mergeHook (
  4318. parentVal,
  4319. childVal
  4320. ) {
  4321. var res = childVal
  4322. ? parentVal
  4323. ? parentVal.concat(childVal)
  4324. : Array.isArray(childVal)
  4325. ? childVal
  4326. : [childVal]
  4327. : parentVal;
  4328. return res
  4329. ? dedupeHooks(res)
  4330. : res
  4331. }
  4332. function dedupeHooks (hooks) {
  4333. var res = [];
  4334. for (var i = 0; i < hooks.length; i++) {
  4335. if (res.indexOf(hooks[i]) === -1) {
  4336. res.push(hooks[i]);
  4337. }
  4338. }
  4339. return res
  4340. }
  4341. LIFECYCLE_HOOKS.forEach(function (hook) {
  4342. strats[hook] = mergeHook;
  4343. });
  4344. /**
  4345. * Assets
  4346. *
  4347. * When a vm is present (instance creation), we need to do
  4348. * a three-way merge between constructor options, instance
  4349. * options and parent options.
  4350. */
  4351. function mergeAssets (
  4352. parentVal,
  4353. childVal,
  4354. vm,
  4355. key
  4356. ) {
  4357. var res = Object.create(parentVal || null);
  4358. if (childVal) {
  4359. true && assertObjectType(key, childVal, vm);
  4360. return extend(res, childVal)
  4361. } else {
  4362. return res
  4363. }
  4364. }
  4365. ASSET_TYPES.forEach(function (type) {
  4366. strats[type + 's'] = mergeAssets;
  4367. });
  4368. /**
  4369. * Watchers.
  4370. *
  4371. * Watchers hashes should not overwrite one
  4372. * another, so we merge them as arrays.
  4373. */
  4374. strats.watch = function (
  4375. parentVal,
  4376. childVal,
  4377. vm,
  4378. key
  4379. ) {
  4380. // work around Firefox's Object.prototype.watch...
  4381. if (parentVal === nativeWatch) { parentVal = undefined; }
  4382. if (childVal === nativeWatch) { childVal = undefined; }
  4383. /* istanbul ignore if */
  4384. if (!childVal) { return Object.create(parentVal || null) }
  4385. if (true) {
  4386. assertObjectType(key, childVal, vm);
  4387. }
  4388. if (!parentVal) { return childVal }
  4389. var ret = {};
  4390. extend(ret, parentVal);
  4391. for (var key$1 in childVal) {
  4392. var parent = ret[key$1];
  4393. var child = childVal[key$1];
  4394. if (parent && !Array.isArray(parent)) {
  4395. parent = [parent];
  4396. }
  4397. ret[key$1] = parent
  4398. ? parent.concat(child)
  4399. : Array.isArray(child) ? child : [child];
  4400. }
  4401. return ret
  4402. };
  4403. /**
  4404. * Other object hashes.
  4405. */
  4406. strats.props =
  4407. strats.methods =
  4408. strats.inject =
  4409. strats.computed = function (
  4410. parentVal,
  4411. childVal,
  4412. vm,
  4413. key
  4414. ) {
  4415. if (childVal && "development" !== 'production') {
  4416. assertObjectType(key, childVal, vm);
  4417. }
  4418. if (!parentVal) { return childVal }
  4419. var ret = Object.create(null);
  4420. extend(ret, parentVal);
  4421. if (childVal) { extend(ret, childVal); }
  4422. return ret
  4423. };
  4424. strats.provide = mergeDataOrFn;
  4425. /**
  4426. * Default strategy.
  4427. */
  4428. var defaultStrat = function (parentVal, childVal) {
  4429. return childVal === undefined
  4430. ? parentVal
  4431. : childVal
  4432. };
  4433. /**
  4434. * Validate component names
  4435. */
  4436. function checkComponents (options) {
  4437. for (var key in options.components) {
  4438. validateComponentName(key);
  4439. }
  4440. }
  4441. function validateComponentName (name) {
  4442. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4443. warn(
  4444. 'Invalid component name: "' + name + '". Component names ' +
  4445. 'should conform to valid custom element name in html5 specification.'
  4446. );
  4447. }
  4448. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4449. warn(
  4450. 'Do not use built-in or reserved HTML elements as component ' +
  4451. 'id: ' + name
  4452. );
  4453. }
  4454. }
  4455. /**
  4456. * Ensure all props option syntax are normalized into the
  4457. * Object-based format.
  4458. */
  4459. function normalizeProps (options, vm) {
  4460. var props = options.props;
  4461. if (!props) { return }
  4462. var res = {};
  4463. var i, val, name;
  4464. if (Array.isArray(props)) {
  4465. i = props.length;
  4466. while (i--) {
  4467. val = props[i];
  4468. if (typeof val === 'string') {
  4469. name = camelize(val);
  4470. res[name] = { type: null };
  4471. } else if (true) {
  4472. warn('props must be strings when using array syntax.');
  4473. }
  4474. }
  4475. } else if (isPlainObject(props)) {
  4476. for (var key in props) {
  4477. val = props[key];
  4478. name = camelize(key);
  4479. res[name] = isPlainObject(val)
  4480. ? val
  4481. : { type: val };
  4482. }
  4483. } else if (true) {
  4484. warn(
  4485. "Invalid value for option \"props\": expected an Array or an Object, " +
  4486. "but got " + (toRawType(props)) + ".",
  4487. vm
  4488. );
  4489. }
  4490. options.props = res;
  4491. }
  4492. /**
  4493. * Normalize all injections into Object-based format
  4494. */
  4495. function normalizeInject (options, vm) {
  4496. var inject = options.inject;
  4497. if (!inject) { return }
  4498. var normalized = options.inject = {};
  4499. if (Array.isArray(inject)) {
  4500. for (var i = 0; i < inject.length; i++) {
  4501. normalized[inject[i]] = { from: inject[i] };
  4502. }
  4503. } else if (isPlainObject(inject)) {
  4504. for (var key in inject) {
  4505. var val = inject[key];
  4506. normalized[key] = isPlainObject(val)
  4507. ? extend({ from: key }, val)
  4508. : { from: val };
  4509. }
  4510. } else if (true) {
  4511. warn(
  4512. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4513. "but got " + (toRawType(inject)) + ".",
  4514. vm
  4515. );
  4516. }
  4517. }
  4518. /**
  4519. * Normalize raw function directives into object format.
  4520. */
  4521. function normalizeDirectives (options) {
  4522. var dirs = options.directives;
  4523. if (dirs) {
  4524. for (var key in dirs) {
  4525. var def$$1 = dirs[key];
  4526. if (typeof def$$1 === 'function') {
  4527. dirs[key] = { bind: def$$1, update: def$$1 };
  4528. }
  4529. }
  4530. }
  4531. }
  4532. function assertObjectType (name, value, vm) {
  4533. if (!isPlainObject(value)) {
  4534. warn(
  4535. "Invalid value for option \"" + name + "\": expected an Object, " +
  4536. "but got " + (toRawType(value)) + ".",
  4537. vm
  4538. );
  4539. }
  4540. }
  4541. /**
  4542. * Merge two option objects into a new one.
  4543. * Core utility used in both instantiation and inheritance.
  4544. */
  4545. function mergeOptions (
  4546. parent,
  4547. child,
  4548. vm
  4549. ) {
  4550. if (true) {
  4551. checkComponents(child);
  4552. }
  4553. if (typeof child === 'function') {
  4554. child = child.options;
  4555. }
  4556. normalizeProps(child, vm);
  4557. normalizeInject(child, vm);
  4558. normalizeDirectives(child);
  4559. // Apply extends and mixins on the child options,
  4560. // but only if it is a raw options object that isn't
  4561. // the result of another mergeOptions call.
  4562. // Only merged options has the _base property.
  4563. if (!child._base) {
  4564. if (child.extends) {
  4565. parent = mergeOptions(parent, child.extends, vm);
  4566. }
  4567. if (child.mixins) {
  4568. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4569. parent = mergeOptions(parent, child.mixins[i], vm);
  4570. }
  4571. }
  4572. }
  4573. var options = {};
  4574. var key;
  4575. for (key in parent) {
  4576. mergeField(key);
  4577. }
  4578. for (key in child) {
  4579. if (!hasOwn(parent, key)) {
  4580. mergeField(key);
  4581. }
  4582. }
  4583. function mergeField (key) {
  4584. var strat = strats[key] || defaultStrat;
  4585. options[key] = strat(parent[key], child[key], vm, key);
  4586. }
  4587. return options
  4588. }
  4589. /**
  4590. * Resolve an asset.
  4591. * This function is used because child instances need access
  4592. * to assets defined in its ancestor chain.
  4593. */
  4594. function resolveAsset (
  4595. options,
  4596. type,
  4597. id,
  4598. warnMissing
  4599. ) {
  4600. /* istanbul ignore if */
  4601. if (typeof id !== 'string') {
  4602. return
  4603. }
  4604. var assets = options[type];
  4605. // check local registration variations first
  4606. if (hasOwn(assets, id)) { return assets[id] }
  4607. var camelizedId = camelize(id);
  4608. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4609. var PascalCaseId = capitalize(camelizedId);
  4610. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4611. // fallback to prototype chain
  4612. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4613. if ( true && warnMissing && !res) {
  4614. warn(
  4615. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4616. options
  4617. );
  4618. }
  4619. return res
  4620. }
  4621. /* */
  4622. function validateProp (
  4623. key,
  4624. propOptions,
  4625. propsData,
  4626. vm
  4627. ) {
  4628. var prop = propOptions[key];
  4629. var absent = !hasOwn(propsData, key);
  4630. var value = propsData[key];
  4631. // boolean casting
  4632. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4633. if (booleanIndex > -1) {
  4634. if (absent && !hasOwn(prop, 'default')) {
  4635. value = false;
  4636. } else if (value === '' || value === hyphenate(key)) {
  4637. // only cast empty string / same name to boolean if
  4638. // boolean has higher priority
  4639. var stringIndex = getTypeIndex(String, prop.type);
  4640. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4641. value = true;
  4642. }
  4643. }
  4644. }
  4645. // check default value
  4646. if (value === undefined) {
  4647. value = getPropDefaultValue(vm, prop, key);
  4648. // since the default value is a fresh copy,
  4649. // make sure to observe it.
  4650. var prevShouldObserve = shouldObserve;
  4651. toggleObserving(true);
  4652. observe(value);
  4653. toggleObserving(prevShouldObserve);
  4654. }
  4655. if (
  4656. true
  4657. ) {
  4658. assertProp(prop, key, value, vm, absent);
  4659. }
  4660. return value
  4661. }
  4662. /**
  4663. * Get the default value of a prop.
  4664. */
  4665. function getPropDefaultValue (vm, prop, key) {
  4666. // no default, return undefined
  4667. if (!hasOwn(prop, 'default')) {
  4668. return undefined
  4669. }
  4670. var def = prop.default;
  4671. // warn against non-factory defaults for Object & Array
  4672. if ( true && isObject(def)) {
  4673. warn(
  4674. 'Invalid default value for prop "' + key + '": ' +
  4675. 'Props with type Object/Array must use a factory function ' +
  4676. 'to return the default value.',
  4677. vm
  4678. );
  4679. }
  4680. // the raw prop value was also undefined from previous render,
  4681. // return previous default value to avoid unnecessary watcher trigger
  4682. if (vm && vm.$options.propsData &&
  4683. vm.$options.propsData[key] === undefined &&
  4684. vm._props[key] !== undefined
  4685. ) {
  4686. return vm._props[key]
  4687. }
  4688. // call factory function for non-Function types
  4689. // a value is Function if its prototype is function even across different execution context
  4690. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4691. ? def.call(vm)
  4692. : def
  4693. }
  4694. /**
  4695. * Assert whether a prop is valid.
  4696. */
  4697. function assertProp (
  4698. prop,
  4699. name,
  4700. value,
  4701. vm,
  4702. absent
  4703. ) {
  4704. if (prop.required && absent) {
  4705. warn(
  4706. 'Missing required prop: "' + name + '"',
  4707. vm
  4708. );
  4709. return
  4710. }
  4711. if (value == null && !prop.required) {
  4712. return
  4713. }
  4714. var type = prop.type;
  4715. var valid = !type || type === true;
  4716. var expectedTypes = [];
  4717. if (type) {
  4718. if (!Array.isArray(type)) {
  4719. type = [type];
  4720. }
  4721. for (var i = 0; i < type.length && !valid; i++) {
  4722. var assertedType = assertType(value, type[i]);
  4723. expectedTypes.push(assertedType.expectedType || '');
  4724. valid = assertedType.valid;
  4725. }
  4726. }
  4727. if (!valid) {
  4728. warn(
  4729. getInvalidTypeMessage(name, value, expectedTypes),
  4730. vm
  4731. );
  4732. return
  4733. }
  4734. var validator = prop.validator;
  4735. if (validator) {
  4736. if (!validator(value)) {
  4737. warn(
  4738. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4739. vm
  4740. );
  4741. }
  4742. }
  4743. }
  4744. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4745. function assertType (value, type) {
  4746. var valid;
  4747. var expectedType = getType(type);
  4748. if (simpleCheckRE.test(expectedType)) {
  4749. var t = typeof value;
  4750. valid = t === expectedType.toLowerCase();
  4751. // for primitive wrapper objects
  4752. if (!valid && t === 'object') {
  4753. valid = value instanceof type;
  4754. }
  4755. } else if (expectedType === 'Object') {
  4756. valid = isPlainObject(value);
  4757. } else if (expectedType === 'Array') {
  4758. valid = Array.isArray(value);
  4759. } else {
  4760. valid = value instanceof type;
  4761. }
  4762. return {
  4763. valid: valid,
  4764. expectedType: expectedType
  4765. }
  4766. }
  4767. /**
  4768. * Use function string name to check built-in types,
  4769. * because a simple equality check will fail when running
  4770. * across different vms / iframes.
  4771. */
  4772. function getType (fn) {
  4773. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4774. return match ? match[1] : ''
  4775. }
  4776. function isSameType (a, b) {
  4777. return getType(a) === getType(b)
  4778. }
  4779. function getTypeIndex (type, expectedTypes) {
  4780. if (!Array.isArray(expectedTypes)) {
  4781. return isSameType(expectedTypes, type) ? 0 : -1
  4782. }
  4783. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4784. if (isSameType(expectedTypes[i], type)) {
  4785. return i
  4786. }
  4787. }
  4788. return -1
  4789. }
  4790. function getInvalidTypeMessage (name, value, expectedTypes) {
  4791. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4792. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4793. var expectedType = expectedTypes[0];
  4794. var receivedType = toRawType(value);
  4795. var expectedValue = styleValue(value, expectedType);
  4796. var receivedValue = styleValue(value, receivedType);
  4797. // check if we need to specify expected value
  4798. if (expectedTypes.length === 1 &&
  4799. isExplicable(expectedType) &&
  4800. !isBoolean(expectedType, receivedType)) {
  4801. message += " with value " + expectedValue;
  4802. }
  4803. message += ", got " + receivedType + " ";
  4804. // check if we need to specify received value
  4805. if (isExplicable(receivedType)) {
  4806. message += "with value " + receivedValue + ".";
  4807. }
  4808. return message
  4809. }
  4810. function styleValue (value, type) {
  4811. if (type === 'String') {
  4812. return ("\"" + value + "\"")
  4813. } else if (type === 'Number') {
  4814. return ("" + (Number(value)))
  4815. } else {
  4816. return ("" + value)
  4817. }
  4818. }
  4819. function isExplicable (value) {
  4820. var explicitTypes = ['string', 'number', 'boolean'];
  4821. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4822. }
  4823. function isBoolean () {
  4824. var args = [], len = arguments.length;
  4825. while ( len-- ) args[ len ] = arguments[ len ];
  4826. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4827. }
  4828. /* */
  4829. function handleError (err, vm, info) {
  4830. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4831. // See: https://github.com/vuejs/vuex/issues/1505
  4832. pushTarget();
  4833. try {
  4834. if (vm) {
  4835. var cur = vm;
  4836. while ((cur = cur.$parent)) {
  4837. var hooks = cur.$options.errorCaptured;
  4838. if (hooks) {
  4839. for (var i = 0; i < hooks.length; i++) {
  4840. try {
  4841. var capture = hooks[i].call(cur, err, vm, info) === false;
  4842. if (capture) { return }
  4843. } catch (e) {
  4844. globalHandleError(e, cur, 'errorCaptured hook');
  4845. }
  4846. }
  4847. }
  4848. }
  4849. }
  4850. globalHandleError(err, vm, info);
  4851. } finally {
  4852. popTarget();
  4853. }
  4854. }
  4855. function invokeWithErrorHandling (
  4856. handler,
  4857. context,
  4858. args,
  4859. vm,
  4860. info
  4861. ) {
  4862. var res;
  4863. try {
  4864. res = args ? handler.apply(context, args) : handler.call(context);
  4865. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4866. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4867. // issue #9511
  4868. // avoid catch triggering multiple times when nested calls
  4869. res._handled = true;
  4870. }
  4871. } catch (e) {
  4872. handleError(e, vm, info);
  4873. }
  4874. return res
  4875. }
  4876. function globalHandleError (err, vm, info) {
  4877. if (config.errorHandler) {
  4878. try {
  4879. return config.errorHandler.call(null, err, vm, info)
  4880. } catch (e) {
  4881. // if the user intentionally throws the original error in the handler,
  4882. // do not log it twice
  4883. if (e !== err) {
  4884. logError(e, null, 'config.errorHandler');
  4885. }
  4886. }
  4887. }
  4888. logError(err, vm, info);
  4889. }
  4890. function logError (err, vm, info) {
  4891. if (true) {
  4892. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  4893. }
  4894. /* istanbul ignore else */
  4895. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  4896. console.error(err);
  4897. } else {
  4898. throw err
  4899. }
  4900. }
  4901. /* */
  4902. var callbacks = [];
  4903. var pending = false;
  4904. function flushCallbacks () {
  4905. pending = false;
  4906. var copies = callbacks.slice(0);
  4907. callbacks.length = 0;
  4908. for (var i = 0; i < copies.length; i++) {
  4909. copies[i]();
  4910. }
  4911. }
  4912. // Here we have async deferring wrappers using microtasks.
  4913. // In 2.5 we used (macro) tasks (in combination with microtasks).
  4914. // However, it has subtle problems when state is changed right before repaint
  4915. // (e.g. #6813, out-in transitions).
  4916. // Also, using (macro) tasks in event handler would cause some weird behaviors
  4917. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  4918. // So we now use microtasks everywhere, again.
  4919. // A major drawback of this tradeoff is that there are some scenarios
  4920. // where microtasks have too high a priority and fire in between supposedly
  4921. // sequential events (e.g. #4521, #6690, which have workarounds)
  4922. // or even between bubbling of the same event (#6566).
  4923. var timerFunc;
  4924. // The nextTick behavior leverages the microtask queue, which can be accessed
  4925. // via either native Promise.then or MutationObserver.
  4926. // MutationObserver has wider support, however it is seriously bugged in
  4927. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  4928. // completely stops working after triggering a few times... so, if native
  4929. // Promise is available, we will use it:
  4930. /* istanbul ignore next, $flow-disable-line */
  4931. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  4932. var p = Promise.resolve();
  4933. timerFunc = function () {
  4934. p.then(flushCallbacks);
  4935. // In problematic UIWebViews, Promise.then doesn't completely break, but
  4936. // it can get stuck in a weird state where callbacks are pushed into the
  4937. // microtask queue but the queue isn't being flushed, until the browser
  4938. // needs to do some other work, e.g. handle a timer. Therefore we can
  4939. // "force" the microtask queue to be flushed by adding an empty timer.
  4940. if (isIOS) { setTimeout(noop); }
  4941. };
  4942. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  4943. isNative(MutationObserver) ||
  4944. // PhantomJS and iOS 7.x
  4945. MutationObserver.toString() === '[object MutationObserverConstructor]'
  4946. )) {
  4947. // Use MutationObserver where native Promise is not available,
  4948. // e.g. PhantomJS, iOS7, Android 4.4
  4949. // (#6466 MutationObserver is unreliable in IE11)
  4950. var counter = 1;
  4951. var observer = new MutationObserver(flushCallbacks);
  4952. var textNode = document.createTextNode(String(counter));
  4953. observer.observe(textNode, {
  4954. characterData: true
  4955. });
  4956. timerFunc = function () {
  4957. counter = (counter + 1) % 2;
  4958. textNode.data = String(counter);
  4959. };
  4960. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  4961. // Fallback to setImmediate.
  4962. // Technically it leverages the (macro) task queue,
  4963. // but it is still a better choice than setTimeout.
  4964. timerFunc = function () {
  4965. setImmediate(flushCallbacks);
  4966. };
  4967. } else {
  4968. // Fallback to setTimeout.
  4969. timerFunc = function () {
  4970. setTimeout(flushCallbacks, 0);
  4971. };
  4972. }
  4973. function nextTick (cb, ctx) {
  4974. var _resolve;
  4975. callbacks.push(function () {
  4976. if (cb) {
  4977. try {
  4978. cb.call(ctx);
  4979. } catch (e) {
  4980. handleError(e, ctx, 'nextTick');
  4981. }
  4982. } else if (_resolve) {
  4983. _resolve(ctx);
  4984. }
  4985. });
  4986. if (!pending) {
  4987. pending = true;
  4988. timerFunc();
  4989. }
  4990. // $flow-disable-line
  4991. if (!cb && typeof Promise !== 'undefined') {
  4992. return new Promise(function (resolve) {
  4993. _resolve = resolve;
  4994. })
  4995. }
  4996. }
  4997. /* */
  4998. /* not type checking this file because flow doesn't play well with Proxy */
  4999. var initProxy;
  5000. if (true) {
  5001. var allowedGlobals = makeMap(
  5002. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5003. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5004. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5005. 'require' // for Webpack/Browserify
  5006. );
  5007. var warnNonPresent = function (target, key) {
  5008. warn(
  5009. "Property or method \"" + key + "\" is not defined on the instance but " +
  5010. 'referenced during render. Make sure that this property is reactive, ' +
  5011. 'either in the data option, or for class-based components, by ' +
  5012. 'initializing the property. ' +
  5013. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5014. target
  5015. );
  5016. };
  5017. var warnReservedPrefix = function (target, key) {
  5018. warn(
  5019. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5020. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5021. 'prevent conflicts with Vue internals. ' +
  5022. 'See: https://vuejs.org/v2/api/#data',
  5023. target
  5024. );
  5025. };
  5026. var hasProxy =
  5027. typeof Proxy !== 'undefined' && isNative(Proxy);
  5028. if (hasProxy) {
  5029. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5030. config.keyCodes = new Proxy(config.keyCodes, {
  5031. set: function set (target, key, value) {
  5032. if (isBuiltInModifier(key)) {
  5033. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5034. return false
  5035. } else {
  5036. target[key] = value;
  5037. return true
  5038. }
  5039. }
  5040. });
  5041. }
  5042. var hasHandler = {
  5043. has: function has (target, key) {
  5044. var has = key in target;
  5045. var isAllowed = allowedGlobals(key) ||
  5046. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5047. if (!has && !isAllowed) {
  5048. if (key in target.$data) { warnReservedPrefix(target, key); }
  5049. else { warnNonPresent(target, key); }
  5050. }
  5051. return has || !isAllowed
  5052. }
  5053. };
  5054. var getHandler = {
  5055. get: function get (target, key) {
  5056. if (typeof key === 'string' && !(key in target)) {
  5057. if (key in target.$data) { warnReservedPrefix(target, key); }
  5058. else { warnNonPresent(target, key); }
  5059. }
  5060. return target[key]
  5061. }
  5062. };
  5063. initProxy = function initProxy (vm) {
  5064. if (hasProxy) {
  5065. // determine which proxy handler to use
  5066. var options = vm.$options;
  5067. var handlers = options.render && options.render._withStripped
  5068. ? getHandler
  5069. : hasHandler;
  5070. vm._renderProxy = new Proxy(vm, handlers);
  5071. } else {
  5072. vm._renderProxy = vm;
  5073. }
  5074. };
  5075. }
  5076. /* */
  5077. var seenObjects = new _Set();
  5078. /**
  5079. * Recursively traverse an object to evoke all converted
  5080. * getters, so that every nested property inside the object
  5081. * is collected as a "deep" dependency.
  5082. */
  5083. function traverse (val) {
  5084. _traverse(val, seenObjects);
  5085. seenObjects.clear();
  5086. }
  5087. function _traverse (val, seen) {
  5088. var i, keys;
  5089. var isA = Array.isArray(val);
  5090. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5091. return
  5092. }
  5093. if (val.__ob__) {
  5094. var depId = val.__ob__.dep.id;
  5095. if (seen.has(depId)) {
  5096. return
  5097. }
  5098. seen.add(depId);
  5099. }
  5100. if (isA) {
  5101. i = val.length;
  5102. while (i--) { _traverse(val[i], seen); }
  5103. } else {
  5104. keys = Object.keys(val);
  5105. i = keys.length;
  5106. while (i--) { _traverse(val[keys[i]], seen); }
  5107. }
  5108. }
  5109. var mark;
  5110. var measure;
  5111. if (true) {
  5112. var perf = inBrowser && window.performance;
  5113. /* istanbul ignore if */
  5114. if (
  5115. perf &&
  5116. perf.mark &&
  5117. perf.measure &&
  5118. perf.clearMarks &&
  5119. perf.clearMeasures
  5120. ) {
  5121. mark = function (tag) { return perf.mark(tag); };
  5122. measure = function (name, startTag, endTag) {
  5123. perf.measure(name, startTag, endTag);
  5124. perf.clearMarks(startTag);
  5125. perf.clearMarks(endTag);
  5126. // perf.clearMeasures(name)
  5127. };
  5128. }
  5129. }
  5130. /* */
  5131. var normalizeEvent = cached(function (name) {
  5132. var passive = name.charAt(0) === '&';
  5133. name = passive ? name.slice(1) : name;
  5134. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5135. name = once$$1 ? name.slice(1) : name;
  5136. var capture = name.charAt(0) === '!';
  5137. name = capture ? name.slice(1) : name;
  5138. return {
  5139. name: name,
  5140. once: once$$1,
  5141. capture: capture,
  5142. passive: passive
  5143. }
  5144. });
  5145. function createFnInvoker (fns, vm) {
  5146. function invoker () {
  5147. var arguments$1 = arguments;
  5148. var fns = invoker.fns;
  5149. if (Array.isArray(fns)) {
  5150. var cloned = fns.slice();
  5151. for (var i = 0; i < cloned.length; i++) {
  5152. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5153. }
  5154. } else {
  5155. // return handler return value for single handlers
  5156. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5157. }
  5158. }
  5159. invoker.fns = fns;
  5160. return invoker
  5161. }
  5162. function updateListeners (
  5163. on,
  5164. oldOn,
  5165. add,
  5166. remove$$1,
  5167. createOnceHandler,
  5168. vm
  5169. ) {
  5170. var name, def$$1, cur, old, event;
  5171. for (name in on) {
  5172. def$$1 = cur = on[name];
  5173. old = oldOn[name];
  5174. event = normalizeEvent(name);
  5175. if (isUndef(cur)) {
  5176. true && warn(
  5177. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5178. vm
  5179. );
  5180. } else if (isUndef(old)) {
  5181. if (isUndef(cur.fns)) {
  5182. cur = on[name] = createFnInvoker(cur, vm);
  5183. }
  5184. if (isTrue(event.once)) {
  5185. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5186. }
  5187. add(event.name, cur, event.capture, event.passive, event.params);
  5188. } else if (cur !== old) {
  5189. old.fns = cur;
  5190. on[name] = old;
  5191. }
  5192. }
  5193. for (name in oldOn) {
  5194. if (isUndef(on[name])) {
  5195. event = normalizeEvent(name);
  5196. remove$$1(event.name, oldOn[name], event.capture);
  5197. }
  5198. }
  5199. }
  5200. /* */
  5201. /* */
  5202. // fixed by xxxxxx (mp properties)
  5203. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5204. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5205. if (isUndef(propOptions)) {
  5206. return res
  5207. }
  5208. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5209. var attrs = data.attrs;
  5210. var props = data.props;
  5211. if (isDef(attrs) || isDef(props)) {
  5212. for (var key in propOptions) {
  5213. var altKey = hyphenate(key);
  5214. var result = checkProp(res, props, key, altKey, true) ||
  5215. checkProp(res, attrs, key, altKey, false);
  5216. // externalClass
  5217. if (
  5218. result &&
  5219. res[key] &&
  5220. externalClasses.indexOf(altKey) !== -1 &&
  5221. context[camelize(res[key])]
  5222. ) {
  5223. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5224. res[key] = context[camelize(res[key])];
  5225. }
  5226. }
  5227. }
  5228. return res
  5229. }
  5230. function extractPropsFromVNodeData (
  5231. data,
  5232. Ctor,
  5233. tag,
  5234. context// fixed by xxxxxx
  5235. ) {
  5236. // we are only extracting raw values here.
  5237. // validation and default values are handled in the child
  5238. // component itself.
  5239. var propOptions = Ctor.options.props;
  5240. if (isUndef(propOptions)) {
  5241. // fixed by xxxxxx
  5242. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5243. }
  5244. var res = {};
  5245. var attrs = data.attrs;
  5246. var props = data.props;
  5247. if (isDef(attrs) || isDef(props)) {
  5248. for (var key in propOptions) {
  5249. var altKey = hyphenate(key);
  5250. if (true) {
  5251. var keyInLowerCase = key.toLowerCase();
  5252. if (
  5253. key !== keyInLowerCase &&
  5254. attrs && hasOwn(attrs, keyInLowerCase)
  5255. ) {
  5256. tip(
  5257. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5258. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5259. " \"" + key + "\". " +
  5260. "Note that HTML attributes are case-insensitive and camelCased " +
  5261. "props need to use their kebab-case equivalents when using in-DOM " +
  5262. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5263. );
  5264. }
  5265. }
  5266. checkProp(res, props, key, altKey, true) ||
  5267. checkProp(res, attrs, key, altKey, false);
  5268. }
  5269. }
  5270. // fixed by xxxxxx
  5271. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5272. }
  5273. function checkProp (
  5274. res,
  5275. hash,
  5276. key,
  5277. altKey,
  5278. preserve
  5279. ) {
  5280. if (isDef(hash)) {
  5281. if (hasOwn(hash, key)) {
  5282. res[key] = hash[key];
  5283. if (!preserve) {
  5284. delete hash[key];
  5285. }
  5286. return true
  5287. } else if (hasOwn(hash, altKey)) {
  5288. res[key] = hash[altKey];
  5289. if (!preserve) {
  5290. delete hash[altKey];
  5291. }
  5292. return true
  5293. }
  5294. }
  5295. return false
  5296. }
  5297. /* */
  5298. // The template compiler attempts to minimize the need for normalization by
  5299. // statically analyzing the template at compile time.
  5300. //
  5301. // For plain HTML markup, normalization can be completely skipped because the
  5302. // generated render function is guaranteed to return Array<VNode>. There are
  5303. // two cases where extra normalization is needed:
  5304. // 1. When the children contains components - because a functional component
  5305. // may return an Array instead of a single root. In this case, just a simple
  5306. // normalization is needed - if any child is an Array, we flatten the whole
  5307. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5308. // because functional components already normalize their own children.
  5309. function simpleNormalizeChildren (children) {
  5310. for (var i = 0; i < children.length; i++) {
  5311. if (Array.isArray(children[i])) {
  5312. return Array.prototype.concat.apply([], children)
  5313. }
  5314. }
  5315. return children
  5316. }
  5317. // 2. When the children contains constructs that always generated nested Arrays,
  5318. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5319. // with hand-written render functions / JSX. In such cases a full normalization
  5320. // is needed to cater to all possible types of children values.
  5321. function normalizeChildren (children) {
  5322. return isPrimitive(children)
  5323. ? [createTextVNode(children)]
  5324. : Array.isArray(children)
  5325. ? normalizeArrayChildren(children)
  5326. : undefined
  5327. }
  5328. function isTextNode (node) {
  5329. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5330. }
  5331. function normalizeArrayChildren (children, nestedIndex) {
  5332. var res = [];
  5333. var i, c, lastIndex, last;
  5334. for (i = 0; i < children.length; i++) {
  5335. c = children[i];
  5336. if (isUndef(c) || typeof c === 'boolean') { continue }
  5337. lastIndex = res.length - 1;
  5338. last = res[lastIndex];
  5339. // nested
  5340. if (Array.isArray(c)) {
  5341. if (c.length > 0) {
  5342. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5343. // merge adjacent text nodes
  5344. if (isTextNode(c[0]) && isTextNode(last)) {
  5345. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5346. c.shift();
  5347. }
  5348. res.push.apply(res, c);
  5349. }
  5350. } else if (isPrimitive(c)) {
  5351. if (isTextNode(last)) {
  5352. // merge adjacent text nodes
  5353. // this is necessary for SSR hydration because text nodes are
  5354. // essentially merged when rendered to HTML strings
  5355. res[lastIndex] = createTextVNode(last.text + c);
  5356. } else if (c !== '') {
  5357. // convert primitive to vnode
  5358. res.push(createTextVNode(c));
  5359. }
  5360. } else {
  5361. if (isTextNode(c) && isTextNode(last)) {
  5362. // merge adjacent text nodes
  5363. res[lastIndex] = createTextVNode(last.text + c.text);
  5364. } else {
  5365. // default key for nested array children (likely generated by v-for)
  5366. if (isTrue(children._isVList) &&
  5367. isDef(c.tag) &&
  5368. isUndef(c.key) &&
  5369. isDef(nestedIndex)) {
  5370. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5371. }
  5372. res.push(c);
  5373. }
  5374. }
  5375. }
  5376. return res
  5377. }
  5378. /* */
  5379. function initProvide (vm) {
  5380. var provide = vm.$options.provide;
  5381. if (provide) {
  5382. vm._provided = typeof provide === 'function'
  5383. ? provide.call(vm)
  5384. : provide;
  5385. }
  5386. }
  5387. function initInjections (vm) {
  5388. var result = resolveInject(vm.$options.inject, vm);
  5389. if (result) {
  5390. toggleObserving(false);
  5391. Object.keys(result).forEach(function (key) {
  5392. /* istanbul ignore else */
  5393. if (true) {
  5394. defineReactive$$1(vm, key, result[key], function () {
  5395. warn(
  5396. "Avoid mutating an injected value directly since the changes will be " +
  5397. "overwritten whenever the provided component re-renders. " +
  5398. "injection being mutated: \"" + key + "\"",
  5399. vm
  5400. );
  5401. });
  5402. } else {}
  5403. });
  5404. toggleObserving(true);
  5405. }
  5406. }
  5407. function resolveInject (inject, vm) {
  5408. if (inject) {
  5409. // inject is :any because flow is not smart enough to figure out cached
  5410. var result = Object.create(null);
  5411. var keys = hasSymbol
  5412. ? Reflect.ownKeys(inject)
  5413. : Object.keys(inject);
  5414. for (var i = 0; i < keys.length; i++) {
  5415. var key = keys[i];
  5416. // #6574 in case the inject object is observed...
  5417. if (key === '__ob__') { continue }
  5418. var provideKey = inject[key].from;
  5419. var source = vm;
  5420. while (source) {
  5421. if (source._provided && hasOwn(source._provided, provideKey)) {
  5422. result[key] = source._provided[provideKey];
  5423. break
  5424. }
  5425. source = source.$parent;
  5426. }
  5427. if (!source) {
  5428. if ('default' in inject[key]) {
  5429. var provideDefault = inject[key].default;
  5430. result[key] = typeof provideDefault === 'function'
  5431. ? provideDefault.call(vm)
  5432. : provideDefault;
  5433. } else if (true) {
  5434. warn(("Injection \"" + key + "\" not found"), vm);
  5435. }
  5436. }
  5437. }
  5438. return result
  5439. }
  5440. }
  5441. /* */
  5442. /**
  5443. * Runtime helper for resolving raw children VNodes into a slot object.
  5444. */
  5445. function resolveSlots (
  5446. children,
  5447. context
  5448. ) {
  5449. if (!children || !children.length) {
  5450. return {}
  5451. }
  5452. var slots = {};
  5453. for (var i = 0, l = children.length; i < l; i++) {
  5454. var child = children[i];
  5455. var data = child.data;
  5456. // remove slot attribute if the node is resolved as a Vue slot node
  5457. if (data && data.attrs && data.attrs.slot) {
  5458. delete data.attrs.slot;
  5459. }
  5460. // named slots should only be respected if the vnode was rendered in the
  5461. // same context.
  5462. if ((child.context === context || child.fnContext === context) &&
  5463. data && data.slot != null
  5464. ) {
  5465. var name = data.slot;
  5466. var slot = (slots[name] || (slots[name] = []));
  5467. if (child.tag === 'template') {
  5468. slot.push.apply(slot, child.children || []);
  5469. } else {
  5470. slot.push(child);
  5471. }
  5472. } else {
  5473. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5474. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5475. (slots['page'] || (slots['page'] = [])).push(child);
  5476. }else{
  5477. (slots.default || (slots.default = [])).push(child);
  5478. }
  5479. }
  5480. }
  5481. // ignore slots that contains only whitespace
  5482. for (var name$1 in slots) {
  5483. if (slots[name$1].every(isWhitespace)) {
  5484. delete slots[name$1];
  5485. }
  5486. }
  5487. return slots
  5488. }
  5489. function isWhitespace (node) {
  5490. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5491. }
  5492. /* */
  5493. function normalizeScopedSlots (
  5494. slots,
  5495. normalSlots,
  5496. prevSlots
  5497. ) {
  5498. var res;
  5499. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5500. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5501. var key = slots && slots.$key;
  5502. if (!slots) {
  5503. res = {};
  5504. } else if (slots._normalized) {
  5505. // fast path 1: child component re-render only, parent did not change
  5506. return slots._normalized
  5507. } else if (
  5508. isStable &&
  5509. prevSlots &&
  5510. prevSlots !== emptyObject &&
  5511. key === prevSlots.$key &&
  5512. !hasNormalSlots &&
  5513. !prevSlots.$hasNormal
  5514. ) {
  5515. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5516. // only need to normalize once
  5517. return prevSlots
  5518. } else {
  5519. res = {};
  5520. for (var key$1 in slots) {
  5521. if (slots[key$1] && key$1[0] !== '$') {
  5522. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5523. }
  5524. }
  5525. }
  5526. // expose normal slots on scopedSlots
  5527. for (var key$2 in normalSlots) {
  5528. if (!(key$2 in res)) {
  5529. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5530. }
  5531. }
  5532. // avoriaz seems to mock a non-extensible $scopedSlots object
  5533. // and when that is passed down this would cause an error
  5534. if (slots && Object.isExtensible(slots)) {
  5535. (slots)._normalized = res;
  5536. }
  5537. def(res, '$stable', isStable);
  5538. def(res, '$key', key);
  5539. def(res, '$hasNormal', hasNormalSlots);
  5540. return res
  5541. }
  5542. function normalizeScopedSlot(normalSlots, key, fn) {
  5543. var normalized = function () {
  5544. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5545. res = res && typeof res === 'object' && !Array.isArray(res)
  5546. ? [res] // single vnode
  5547. : normalizeChildren(res);
  5548. return res && (
  5549. res.length === 0 ||
  5550. (res.length === 1 && res[0].isComment) // #9658
  5551. ) ? undefined
  5552. : res
  5553. };
  5554. // this is a slot using the new v-slot syntax without scope. although it is
  5555. // compiled as a scoped slot, render fn users would expect it to be present
  5556. // on this.$slots because the usage is semantically a normal slot.
  5557. if (fn.proxy) {
  5558. Object.defineProperty(normalSlots, key, {
  5559. get: normalized,
  5560. enumerable: true,
  5561. configurable: true
  5562. });
  5563. }
  5564. return normalized
  5565. }
  5566. function proxyNormalSlot(slots, key) {
  5567. return function () { return slots[key]; }
  5568. }
  5569. /* */
  5570. /**
  5571. * Runtime helper for rendering v-for lists.
  5572. */
  5573. function renderList (
  5574. val,
  5575. render
  5576. ) {
  5577. var ret, i, l, keys, key;
  5578. if (Array.isArray(val) || typeof val === 'string') {
  5579. ret = new Array(val.length);
  5580. for (i = 0, l = val.length; i < l; i++) {
  5581. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5582. }
  5583. } else if (typeof val === 'number') {
  5584. ret = new Array(val);
  5585. for (i = 0; i < val; i++) {
  5586. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5587. }
  5588. } else if (isObject(val)) {
  5589. if (hasSymbol && val[Symbol.iterator]) {
  5590. ret = [];
  5591. var iterator = val[Symbol.iterator]();
  5592. var result = iterator.next();
  5593. while (!result.done) {
  5594. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5595. result = iterator.next();
  5596. }
  5597. } else {
  5598. keys = Object.keys(val);
  5599. ret = new Array(keys.length);
  5600. for (i = 0, l = keys.length; i < l; i++) {
  5601. key = keys[i];
  5602. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5603. }
  5604. }
  5605. }
  5606. if (!isDef(ret)) {
  5607. ret = [];
  5608. }
  5609. (ret)._isVList = true;
  5610. return ret
  5611. }
  5612. /* */
  5613. /**
  5614. * Runtime helper for rendering <slot>
  5615. */
  5616. function renderSlot (
  5617. name,
  5618. fallback,
  5619. props,
  5620. bindObject
  5621. ) {
  5622. var scopedSlotFn = this.$scopedSlots[name];
  5623. var nodes;
  5624. if (scopedSlotFn) { // scoped slot
  5625. props = props || {};
  5626. if (bindObject) {
  5627. if ( true && !isObject(bindObject)) {
  5628. warn(
  5629. 'slot v-bind without argument expects an Object',
  5630. this
  5631. );
  5632. }
  5633. props = extend(extend({}, bindObject), props);
  5634. }
  5635. // fixed by xxxxxx app-plus scopedSlot
  5636. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5637. } else {
  5638. nodes = this.$slots[name] || fallback;
  5639. }
  5640. var target = props && props.slot;
  5641. if (target) {
  5642. return this.$createElement('template', { slot: target }, nodes)
  5643. } else {
  5644. return nodes
  5645. }
  5646. }
  5647. /* */
  5648. /**
  5649. * Runtime helper for resolving filters
  5650. */
  5651. function resolveFilter (id) {
  5652. return resolveAsset(this.$options, 'filters', id, true) || identity
  5653. }
  5654. /* */
  5655. function isKeyNotMatch (expect, actual) {
  5656. if (Array.isArray(expect)) {
  5657. return expect.indexOf(actual) === -1
  5658. } else {
  5659. return expect !== actual
  5660. }
  5661. }
  5662. /**
  5663. * Runtime helper for checking keyCodes from config.
  5664. * exposed as Vue.prototype._k
  5665. * passing in eventKeyName as last argument separately for backwards compat
  5666. */
  5667. function checkKeyCodes (
  5668. eventKeyCode,
  5669. key,
  5670. builtInKeyCode,
  5671. eventKeyName,
  5672. builtInKeyName
  5673. ) {
  5674. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5675. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5676. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5677. } else if (mappedKeyCode) {
  5678. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5679. } else if (eventKeyName) {
  5680. return hyphenate(eventKeyName) !== key
  5681. }
  5682. }
  5683. /* */
  5684. /**
  5685. * Runtime helper for merging v-bind="object" into a VNode's data.
  5686. */
  5687. function bindObjectProps (
  5688. data,
  5689. tag,
  5690. value,
  5691. asProp,
  5692. isSync
  5693. ) {
  5694. if (value) {
  5695. if (!isObject(value)) {
  5696. true && warn(
  5697. 'v-bind without argument expects an Object or Array value',
  5698. this
  5699. );
  5700. } else {
  5701. if (Array.isArray(value)) {
  5702. value = toObject(value);
  5703. }
  5704. var hash;
  5705. var loop = function ( key ) {
  5706. if (
  5707. key === 'class' ||
  5708. key === 'style' ||
  5709. isReservedAttribute(key)
  5710. ) {
  5711. hash = data;
  5712. } else {
  5713. var type = data.attrs && data.attrs.type;
  5714. hash = asProp || config.mustUseProp(tag, type, key)
  5715. ? data.domProps || (data.domProps = {})
  5716. : data.attrs || (data.attrs = {});
  5717. }
  5718. var camelizedKey = camelize(key);
  5719. var hyphenatedKey = hyphenate(key);
  5720. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5721. hash[key] = value[key];
  5722. if (isSync) {
  5723. var on = data.on || (data.on = {});
  5724. on[("update:" + key)] = function ($event) {
  5725. value[key] = $event;
  5726. };
  5727. }
  5728. }
  5729. };
  5730. for (var key in value) loop( key );
  5731. }
  5732. }
  5733. return data
  5734. }
  5735. /* */
  5736. /**
  5737. * Runtime helper for rendering static trees.
  5738. */
  5739. function renderStatic (
  5740. index,
  5741. isInFor
  5742. ) {
  5743. var cached = this._staticTrees || (this._staticTrees = []);
  5744. var tree = cached[index];
  5745. // if has already-rendered static tree and not inside v-for,
  5746. // we can reuse the same tree.
  5747. if (tree && !isInFor) {
  5748. return tree
  5749. }
  5750. // otherwise, render a fresh tree.
  5751. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5752. this._renderProxy,
  5753. null,
  5754. this // for render fns generated for functional component templates
  5755. );
  5756. markStatic(tree, ("__static__" + index), false);
  5757. return tree
  5758. }
  5759. /**
  5760. * Runtime helper for v-once.
  5761. * Effectively it means marking the node as static with a unique key.
  5762. */
  5763. function markOnce (
  5764. tree,
  5765. index,
  5766. key
  5767. ) {
  5768. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5769. return tree
  5770. }
  5771. function markStatic (
  5772. tree,
  5773. key,
  5774. isOnce
  5775. ) {
  5776. if (Array.isArray(tree)) {
  5777. for (var i = 0; i < tree.length; i++) {
  5778. if (tree[i] && typeof tree[i] !== 'string') {
  5779. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5780. }
  5781. }
  5782. } else {
  5783. markStaticNode(tree, key, isOnce);
  5784. }
  5785. }
  5786. function markStaticNode (node, key, isOnce) {
  5787. node.isStatic = true;
  5788. node.key = key;
  5789. node.isOnce = isOnce;
  5790. }
  5791. /* */
  5792. function bindObjectListeners (data, value) {
  5793. if (value) {
  5794. if (!isPlainObject(value)) {
  5795. true && warn(
  5796. 'v-on without argument expects an Object value',
  5797. this
  5798. );
  5799. } else {
  5800. var on = data.on = data.on ? extend({}, data.on) : {};
  5801. for (var key in value) {
  5802. var existing = on[key];
  5803. var ours = value[key];
  5804. on[key] = existing ? [].concat(existing, ours) : ours;
  5805. }
  5806. }
  5807. }
  5808. return data
  5809. }
  5810. /* */
  5811. function resolveScopedSlots (
  5812. fns, // see flow/vnode
  5813. res,
  5814. // the following are added in 2.6
  5815. hasDynamicKeys,
  5816. contentHashKey
  5817. ) {
  5818. res = res || { $stable: !hasDynamicKeys };
  5819. for (var i = 0; i < fns.length; i++) {
  5820. var slot = fns[i];
  5821. if (Array.isArray(slot)) {
  5822. resolveScopedSlots(slot, res, hasDynamicKeys);
  5823. } else if (slot) {
  5824. // marker for reverse proxying v-slot without scope on this.$slots
  5825. if (slot.proxy) {
  5826. slot.fn.proxy = true;
  5827. }
  5828. res[slot.key] = slot.fn;
  5829. }
  5830. }
  5831. if (contentHashKey) {
  5832. (res).$key = contentHashKey;
  5833. }
  5834. return res
  5835. }
  5836. /* */
  5837. function bindDynamicKeys (baseObj, values) {
  5838. for (var i = 0; i < values.length; i += 2) {
  5839. var key = values[i];
  5840. if (typeof key === 'string' && key) {
  5841. baseObj[values[i]] = values[i + 1];
  5842. } else if ( true && key !== '' && key !== null) {
  5843. // null is a special value for explicitly removing a binding
  5844. warn(
  5845. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5846. this
  5847. );
  5848. }
  5849. }
  5850. return baseObj
  5851. }
  5852. // helper to dynamically append modifier runtime markers to event names.
  5853. // ensure only append when value is already string, otherwise it will be cast
  5854. // to string and cause the type check to miss.
  5855. function prependModifier (value, symbol) {
  5856. return typeof value === 'string' ? symbol + value : value
  5857. }
  5858. /* */
  5859. function installRenderHelpers (target) {
  5860. target._o = markOnce;
  5861. target._n = toNumber;
  5862. target._s = toString;
  5863. target._l = renderList;
  5864. target._t = renderSlot;
  5865. target._q = looseEqual;
  5866. target._i = looseIndexOf;
  5867. target._m = renderStatic;
  5868. target._f = resolveFilter;
  5869. target._k = checkKeyCodes;
  5870. target._b = bindObjectProps;
  5871. target._v = createTextVNode;
  5872. target._e = createEmptyVNode;
  5873. target._u = resolveScopedSlots;
  5874. target._g = bindObjectListeners;
  5875. target._d = bindDynamicKeys;
  5876. target._p = prependModifier;
  5877. }
  5878. /* */
  5879. function FunctionalRenderContext (
  5880. data,
  5881. props,
  5882. children,
  5883. parent,
  5884. Ctor
  5885. ) {
  5886. var this$1 = this;
  5887. var options = Ctor.options;
  5888. // ensure the createElement function in functional components
  5889. // gets a unique context - this is necessary for correct named slot check
  5890. var contextVm;
  5891. if (hasOwn(parent, '_uid')) {
  5892. contextVm = Object.create(parent);
  5893. // $flow-disable-line
  5894. contextVm._original = parent;
  5895. } else {
  5896. // the context vm passed in is a functional context as well.
  5897. // in this case we want to make sure we are able to get a hold to the
  5898. // real context instance.
  5899. contextVm = parent;
  5900. // $flow-disable-line
  5901. parent = parent._original;
  5902. }
  5903. var isCompiled = isTrue(options._compiled);
  5904. var needNormalization = !isCompiled;
  5905. this.data = data;
  5906. this.props = props;
  5907. this.children = children;
  5908. this.parent = parent;
  5909. this.listeners = data.on || emptyObject;
  5910. this.injections = resolveInject(options.inject, parent);
  5911. this.slots = function () {
  5912. if (!this$1.$slots) {
  5913. normalizeScopedSlots(
  5914. data.scopedSlots,
  5915. this$1.$slots = resolveSlots(children, parent)
  5916. );
  5917. }
  5918. return this$1.$slots
  5919. };
  5920. Object.defineProperty(this, 'scopedSlots', ({
  5921. enumerable: true,
  5922. get: function get () {
  5923. return normalizeScopedSlots(data.scopedSlots, this.slots())
  5924. }
  5925. }));
  5926. // support for compiled functional template
  5927. if (isCompiled) {
  5928. // exposing $options for renderStatic()
  5929. this.$options = options;
  5930. // pre-resolve slots for renderSlot()
  5931. this.$slots = this.slots();
  5932. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  5933. }
  5934. if (options._scopeId) {
  5935. this._c = function (a, b, c, d) {
  5936. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  5937. if (vnode && !Array.isArray(vnode)) {
  5938. vnode.fnScopeId = options._scopeId;
  5939. vnode.fnContext = parent;
  5940. }
  5941. return vnode
  5942. };
  5943. } else {
  5944. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  5945. }
  5946. }
  5947. installRenderHelpers(FunctionalRenderContext.prototype);
  5948. function createFunctionalComponent (
  5949. Ctor,
  5950. propsData,
  5951. data,
  5952. contextVm,
  5953. children
  5954. ) {
  5955. var options = Ctor.options;
  5956. var props = {};
  5957. var propOptions = options.props;
  5958. if (isDef(propOptions)) {
  5959. for (var key in propOptions) {
  5960. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  5961. }
  5962. } else {
  5963. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  5964. if (isDef(data.props)) { mergeProps(props, data.props); }
  5965. }
  5966. var renderContext = new FunctionalRenderContext(
  5967. data,
  5968. props,
  5969. children,
  5970. contextVm,
  5971. Ctor
  5972. );
  5973. var vnode = options.render.call(null, renderContext._c, renderContext);
  5974. if (vnode instanceof VNode) {
  5975. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  5976. } else if (Array.isArray(vnode)) {
  5977. var vnodes = normalizeChildren(vnode) || [];
  5978. var res = new Array(vnodes.length);
  5979. for (var i = 0; i < vnodes.length; i++) {
  5980. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  5981. }
  5982. return res
  5983. }
  5984. }
  5985. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  5986. // #7817 clone node before setting fnContext, otherwise if the node is reused
  5987. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  5988. // that should not be matched to match.
  5989. var clone = cloneVNode(vnode);
  5990. clone.fnContext = contextVm;
  5991. clone.fnOptions = options;
  5992. if (true) {
  5993. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  5994. }
  5995. if (data.slot) {
  5996. (clone.data || (clone.data = {})).slot = data.slot;
  5997. }
  5998. return clone
  5999. }
  6000. function mergeProps (to, from) {
  6001. for (var key in from) {
  6002. to[camelize(key)] = from[key];
  6003. }
  6004. }
  6005. /* */
  6006. /* */
  6007. /* */
  6008. /* */
  6009. // inline hooks to be invoked on component VNodes during patch
  6010. var componentVNodeHooks = {
  6011. init: function init (vnode, hydrating) {
  6012. if (
  6013. vnode.componentInstance &&
  6014. !vnode.componentInstance._isDestroyed &&
  6015. vnode.data.keepAlive
  6016. ) {
  6017. // kept-alive components, treat as a patch
  6018. var mountedNode = vnode; // work around flow
  6019. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6020. } else {
  6021. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6022. vnode,
  6023. activeInstance
  6024. );
  6025. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6026. }
  6027. },
  6028. prepatch: function prepatch (oldVnode, vnode) {
  6029. var options = vnode.componentOptions;
  6030. var child = vnode.componentInstance = oldVnode.componentInstance;
  6031. updateChildComponent(
  6032. child,
  6033. options.propsData, // updated props
  6034. options.listeners, // updated listeners
  6035. vnode, // new parent vnode
  6036. options.children // new children
  6037. );
  6038. },
  6039. insert: function insert (vnode) {
  6040. var context = vnode.context;
  6041. var componentInstance = vnode.componentInstance;
  6042. if (!componentInstance._isMounted) {
  6043. callHook(componentInstance, 'onServiceCreated');
  6044. callHook(componentInstance, 'onServiceAttached');
  6045. componentInstance._isMounted = true;
  6046. callHook(componentInstance, 'mounted');
  6047. }
  6048. if (vnode.data.keepAlive) {
  6049. if (context._isMounted) {
  6050. // vue-router#1212
  6051. // During updates, a kept-alive component's child components may
  6052. // change, so directly walking the tree here may call activated hooks
  6053. // on incorrect children. Instead we push them into a queue which will
  6054. // be processed after the whole patch process ended.
  6055. queueActivatedComponent(componentInstance);
  6056. } else {
  6057. activateChildComponent(componentInstance, true /* direct */);
  6058. }
  6059. }
  6060. },
  6061. destroy: function destroy (vnode) {
  6062. var componentInstance = vnode.componentInstance;
  6063. if (!componentInstance._isDestroyed) {
  6064. if (!vnode.data.keepAlive) {
  6065. componentInstance.$destroy();
  6066. } else {
  6067. deactivateChildComponent(componentInstance, true /* direct */);
  6068. }
  6069. }
  6070. }
  6071. };
  6072. var hooksToMerge = Object.keys(componentVNodeHooks);
  6073. function createComponent (
  6074. Ctor,
  6075. data,
  6076. context,
  6077. children,
  6078. tag
  6079. ) {
  6080. if (isUndef(Ctor)) {
  6081. return
  6082. }
  6083. var baseCtor = context.$options._base;
  6084. // plain options object: turn it into a constructor
  6085. if (isObject(Ctor)) {
  6086. Ctor = baseCtor.extend(Ctor);
  6087. }
  6088. // if at this stage it's not a constructor or an async component factory,
  6089. // reject.
  6090. if (typeof Ctor !== 'function') {
  6091. if (true) {
  6092. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6093. }
  6094. return
  6095. }
  6096. // async component
  6097. var asyncFactory;
  6098. if (isUndef(Ctor.cid)) {
  6099. asyncFactory = Ctor;
  6100. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6101. if (Ctor === undefined) {
  6102. // return a placeholder node for async component, which is rendered
  6103. // as a comment node but preserves all the raw information for the node.
  6104. // the information will be used for async server-rendering and hydration.
  6105. return createAsyncPlaceholder(
  6106. asyncFactory,
  6107. data,
  6108. context,
  6109. children,
  6110. tag
  6111. )
  6112. }
  6113. }
  6114. data = data || {};
  6115. // resolve constructor options in case global mixins are applied after
  6116. // component constructor creation
  6117. resolveConstructorOptions(Ctor);
  6118. // transform component v-model data into props & events
  6119. if (isDef(data.model)) {
  6120. transformModel(Ctor.options, data);
  6121. }
  6122. // extract props
  6123. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6124. // functional component
  6125. if (isTrue(Ctor.options.functional)) {
  6126. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6127. }
  6128. // extract listeners, since these needs to be treated as
  6129. // child component listeners instead of DOM listeners
  6130. var listeners = data.on;
  6131. // replace with listeners with .native modifier
  6132. // so it gets processed during parent component patch.
  6133. data.on = data.nativeOn;
  6134. if (isTrue(Ctor.options.abstract)) {
  6135. // abstract components do not keep anything
  6136. // other than props & listeners & slot
  6137. // work around flow
  6138. var slot = data.slot;
  6139. data = {};
  6140. if (slot) {
  6141. data.slot = slot;
  6142. }
  6143. }
  6144. // install component management hooks onto the placeholder node
  6145. installComponentHooks(data);
  6146. // return a placeholder vnode
  6147. var name = Ctor.options.name || tag;
  6148. var vnode = new VNode(
  6149. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6150. data, undefined, undefined, undefined, context,
  6151. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6152. asyncFactory
  6153. );
  6154. return vnode
  6155. }
  6156. function createComponentInstanceForVnode (
  6157. vnode, // we know it's MountedComponentVNode but flow doesn't
  6158. parent // activeInstance in lifecycle state
  6159. ) {
  6160. var options = {
  6161. _isComponent: true,
  6162. _parentVnode: vnode,
  6163. parent: parent
  6164. };
  6165. // check inline-template render functions
  6166. var inlineTemplate = vnode.data.inlineTemplate;
  6167. if (isDef(inlineTemplate)) {
  6168. options.render = inlineTemplate.render;
  6169. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6170. }
  6171. return new vnode.componentOptions.Ctor(options)
  6172. }
  6173. function installComponentHooks (data) {
  6174. var hooks = data.hook || (data.hook = {});
  6175. for (var i = 0; i < hooksToMerge.length; i++) {
  6176. var key = hooksToMerge[i];
  6177. var existing = hooks[key];
  6178. var toMerge = componentVNodeHooks[key];
  6179. if (existing !== toMerge && !(existing && existing._merged)) {
  6180. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6181. }
  6182. }
  6183. }
  6184. function mergeHook$1 (f1, f2) {
  6185. var merged = function (a, b) {
  6186. // flow complains about extra args which is why we use any
  6187. f1(a, b);
  6188. f2(a, b);
  6189. };
  6190. merged._merged = true;
  6191. return merged
  6192. }
  6193. // transform component v-model info (value and callback) into
  6194. // prop and event handler respectively.
  6195. function transformModel (options, data) {
  6196. var prop = (options.model && options.model.prop) || 'value';
  6197. var event = (options.model && options.model.event) || 'input'
  6198. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6199. var on = data.on || (data.on = {});
  6200. var existing = on[event];
  6201. var callback = data.model.callback;
  6202. if (isDef(existing)) {
  6203. if (
  6204. Array.isArray(existing)
  6205. ? existing.indexOf(callback) === -1
  6206. : existing !== callback
  6207. ) {
  6208. on[event] = [callback].concat(existing);
  6209. }
  6210. } else {
  6211. on[event] = callback;
  6212. }
  6213. }
  6214. /* */
  6215. var SIMPLE_NORMALIZE = 1;
  6216. var ALWAYS_NORMALIZE = 2;
  6217. // wrapper function for providing a more flexible interface
  6218. // without getting yelled at by flow
  6219. function createElement (
  6220. context,
  6221. tag,
  6222. data,
  6223. children,
  6224. normalizationType,
  6225. alwaysNormalize
  6226. ) {
  6227. if (Array.isArray(data) || isPrimitive(data)) {
  6228. normalizationType = children;
  6229. children = data;
  6230. data = undefined;
  6231. }
  6232. if (isTrue(alwaysNormalize)) {
  6233. normalizationType = ALWAYS_NORMALIZE;
  6234. }
  6235. return _createElement(context, tag, data, children, normalizationType)
  6236. }
  6237. function _createElement (
  6238. context,
  6239. tag,
  6240. data,
  6241. children,
  6242. normalizationType
  6243. ) {
  6244. if (isDef(data) && isDef((data).__ob__)) {
  6245. true && warn(
  6246. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6247. 'Always create fresh vnode data objects in each render!',
  6248. context
  6249. );
  6250. return createEmptyVNode()
  6251. }
  6252. // object syntax in v-bind
  6253. if (isDef(data) && isDef(data.is)) {
  6254. tag = data.is;
  6255. }
  6256. if (!tag) {
  6257. // in case of component :is set to falsy value
  6258. return createEmptyVNode()
  6259. }
  6260. // warn against non-primitive key
  6261. if ( true &&
  6262. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6263. ) {
  6264. {
  6265. warn(
  6266. 'Avoid using non-primitive value as key, ' +
  6267. 'use string/number value instead.',
  6268. context
  6269. );
  6270. }
  6271. }
  6272. // support single function children as default scoped slot
  6273. if (Array.isArray(children) &&
  6274. typeof children[0] === 'function'
  6275. ) {
  6276. data = data || {};
  6277. data.scopedSlots = { default: children[0] };
  6278. children.length = 0;
  6279. }
  6280. if (normalizationType === ALWAYS_NORMALIZE) {
  6281. children = normalizeChildren(children);
  6282. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6283. children = simpleNormalizeChildren(children);
  6284. }
  6285. var vnode, ns;
  6286. if (typeof tag === 'string') {
  6287. var Ctor;
  6288. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6289. if (config.isReservedTag(tag)) {
  6290. // platform built-in elements
  6291. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6292. warn(
  6293. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6294. context
  6295. );
  6296. }
  6297. vnode = new VNode(
  6298. config.parsePlatformTagName(tag), data, children,
  6299. undefined, undefined, context
  6300. );
  6301. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6302. // component
  6303. vnode = createComponent(Ctor, data, context, children, tag);
  6304. } else {
  6305. // unknown or unlisted namespaced elements
  6306. // check at runtime because it may get assigned a namespace when its
  6307. // parent normalizes children
  6308. vnode = new VNode(
  6309. tag, data, children,
  6310. undefined, undefined, context
  6311. );
  6312. }
  6313. } else {
  6314. // direct component options / constructor
  6315. vnode = createComponent(tag, data, context, children);
  6316. }
  6317. if (Array.isArray(vnode)) {
  6318. return vnode
  6319. } else if (isDef(vnode)) {
  6320. if (isDef(ns)) { applyNS(vnode, ns); }
  6321. if (isDef(data)) { registerDeepBindings(data); }
  6322. return vnode
  6323. } else {
  6324. return createEmptyVNode()
  6325. }
  6326. }
  6327. function applyNS (vnode, ns, force) {
  6328. vnode.ns = ns;
  6329. if (vnode.tag === 'foreignObject') {
  6330. // use default namespace inside foreignObject
  6331. ns = undefined;
  6332. force = true;
  6333. }
  6334. if (isDef(vnode.children)) {
  6335. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6336. var child = vnode.children[i];
  6337. if (isDef(child.tag) && (
  6338. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6339. applyNS(child, ns, force);
  6340. }
  6341. }
  6342. }
  6343. }
  6344. // ref #5318
  6345. // necessary to ensure parent re-render when deep bindings like :style and
  6346. // :class are used on slot nodes
  6347. function registerDeepBindings (data) {
  6348. if (isObject(data.style)) {
  6349. traverse(data.style);
  6350. }
  6351. if (isObject(data.class)) {
  6352. traverse(data.class);
  6353. }
  6354. }
  6355. /* */
  6356. function initRender (vm) {
  6357. vm._vnode = null; // the root of the child tree
  6358. vm._staticTrees = null; // v-once cached trees
  6359. var options = vm.$options;
  6360. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6361. var renderContext = parentVnode && parentVnode.context;
  6362. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6363. vm.$scopedSlots = emptyObject;
  6364. // bind the createElement fn to this instance
  6365. // so that we get proper render context inside it.
  6366. // args order: tag, data, children, normalizationType, alwaysNormalize
  6367. // internal version is used by render functions compiled from templates
  6368. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6369. // normalization is always applied for the public version, used in
  6370. // user-written render functions.
  6371. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6372. // $attrs & $listeners are exposed for easier HOC creation.
  6373. // they need to be reactive so that HOCs using them are always updated
  6374. var parentData = parentVnode && parentVnode.data;
  6375. /* istanbul ignore else */
  6376. if (true) {
  6377. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6378. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6379. }, true);
  6380. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6381. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6382. }, true);
  6383. } else {}
  6384. }
  6385. var currentRenderingInstance = null;
  6386. function renderMixin (Vue) {
  6387. // install runtime convenience helpers
  6388. installRenderHelpers(Vue.prototype);
  6389. Vue.prototype.$nextTick = function (fn) {
  6390. return nextTick(fn, this)
  6391. };
  6392. Vue.prototype._render = function () {
  6393. var vm = this;
  6394. var ref = vm.$options;
  6395. var render = ref.render;
  6396. var _parentVnode = ref._parentVnode;
  6397. if (_parentVnode) {
  6398. vm.$scopedSlots = normalizeScopedSlots(
  6399. _parentVnode.data.scopedSlots,
  6400. vm.$slots,
  6401. vm.$scopedSlots
  6402. );
  6403. }
  6404. // set parent vnode. this allows render functions to have access
  6405. // to the data on the placeholder node.
  6406. vm.$vnode = _parentVnode;
  6407. // render self
  6408. var vnode;
  6409. try {
  6410. // There's no need to maintain a stack because all render fns are called
  6411. // separately from one another. Nested component's render fns are called
  6412. // when parent component is patched.
  6413. currentRenderingInstance = vm;
  6414. vnode = render.call(vm._renderProxy, vm.$createElement);
  6415. } catch (e) {
  6416. handleError(e, vm, "render");
  6417. // return error render result,
  6418. // or previous vnode to prevent render error causing blank component
  6419. /* istanbul ignore else */
  6420. if ( true && vm.$options.renderError) {
  6421. try {
  6422. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6423. } catch (e) {
  6424. handleError(e, vm, "renderError");
  6425. vnode = vm._vnode;
  6426. }
  6427. } else {
  6428. vnode = vm._vnode;
  6429. }
  6430. } finally {
  6431. currentRenderingInstance = null;
  6432. }
  6433. // if the returned array contains only a single node, allow it
  6434. if (Array.isArray(vnode) && vnode.length === 1) {
  6435. vnode = vnode[0];
  6436. }
  6437. // return empty vnode in case the render function errored out
  6438. if (!(vnode instanceof VNode)) {
  6439. if ( true && Array.isArray(vnode)) {
  6440. warn(
  6441. 'Multiple root nodes returned from render function. Render function ' +
  6442. 'should return a single root node.',
  6443. vm
  6444. );
  6445. }
  6446. vnode = createEmptyVNode();
  6447. }
  6448. // set parent
  6449. vnode.parent = _parentVnode;
  6450. return vnode
  6451. };
  6452. }
  6453. /* */
  6454. function ensureCtor (comp, base) {
  6455. if (
  6456. comp.__esModule ||
  6457. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6458. ) {
  6459. comp = comp.default;
  6460. }
  6461. return isObject(comp)
  6462. ? base.extend(comp)
  6463. : comp
  6464. }
  6465. function createAsyncPlaceholder (
  6466. factory,
  6467. data,
  6468. context,
  6469. children,
  6470. tag
  6471. ) {
  6472. var node = createEmptyVNode();
  6473. node.asyncFactory = factory;
  6474. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6475. return node
  6476. }
  6477. function resolveAsyncComponent (
  6478. factory,
  6479. baseCtor
  6480. ) {
  6481. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6482. return factory.errorComp
  6483. }
  6484. if (isDef(factory.resolved)) {
  6485. return factory.resolved
  6486. }
  6487. var owner = currentRenderingInstance;
  6488. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6489. // already pending
  6490. factory.owners.push(owner);
  6491. }
  6492. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6493. return factory.loadingComp
  6494. }
  6495. if (owner && !isDef(factory.owners)) {
  6496. var owners = factory.owners = [owner];
  6497. var sync = true;
  6498. var timerLoading = null;
  6499. var timerTimeout = null
  6500. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6501. var forceRender = function (renderCompleted) {
  6502. for (var i = 0, l = owners.length; i < l; i++) {
  6503. (owners[i]).$forceUpdate();
  6504. }
  6505. if (renderCompleted) {
  6506. owners.length = 0;
  6507. if (timerLoading !== null) {
  6508. clearTimeout(timerLoading);
  6509. timerLoading = null;
  6510. }
  6511. if (timerTimeout !== null) {
  6512. clearTimeout(timerTimeout);
  6513. timerTimeout = null;
  6514. }
  6515. }
  6516. };
  6517. var resolve = once(function (res) {
  6518. // cache resolved
  6519. factory.resolved = ensureCtor(res, baseCtor);
  6520. // invoke callbacks only if this is not a synchronous resolve
  6521. // (async resolves are shimmed as synchronous during SSR)
  6522. if (!sync) {
  6523. forceRender(true);
  6524. } else {
  6525. owners.length = 0;
  6526. }
  6527. });
  6528. var reject = once(function (reason) {
  6529. true && warn(
  6530. "Failed to resolve async component: " + (String(factory)) +
  6531. (reason ? ("\nReason: " + reason) : '')
  6532. );
  6533. if (isDef(factory.errorComp)) {
  6534. factory.error = true;
  6535. forceRender(true);
  6536. }
  6537. });
  6538. var res = factory(resolve, reject);
  6539. if (isObject(res)) {
  6540. if (isPromise(res)) {
  6541. // () => Promise
  6542. if (isUndef(factory.resolved)) {
  6543. res.then(resolve, reject);
  6544. }
  6545. } else if (isPromise(res.component)) {
  6546. res.component.then(resolve, reject);
  6547. if (isDef(res.error)) {
  6548. factory.errorComp = ensureCtor(res.error, baseCtor);
  6549. }
  6550. if (isDef(res.loading)) {
  6551. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6552. if (res.delay === 0) {
  6553. factory.loading = true;
  6554. } else {
  6555. timerLoading = setTimeout(function () {
  6556. timerLoading = null;
  6557. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6558. factory.loading = true;
  6559. forceRender(false);
  6560. }
  6561. }, res.delay || 200);
  6562. }
  6563. }
  6564. if (isDef(res.timeout)) {
  6565. timerTimeout = setTimeout(function () {
  6566. timerTimeout = null;
  6567. if (isUndef(factory.resolved)) {
  6568. reject(
  6569. true
  6570. ? ("timeout (" + (res.timeout) + "ms)")
  6571. : undefined
  6572. );
  6573. }
  6574. }, res.timeout);
  6575. }
  6576. }
  6577. }
  6578. sync = false;
  6579. // return in case resolved synchronously
  6580. return factory.loading
  6581. ? factory.loadingComp
  6582. : factory.resolved
  6583. }
  6584. }
  6585. /* */
  6586. function isAsyncPlaceholder (node) {
  6587. return node.isComment && node.asyncFactory
  6588. }
  6589. /* */
  6590. function getFirstComponentChild (children) {
  6591. if (Array.isArray(children)) {
  6592. for (var i = 0; i < children.length; i++) {
  6593. var c = children[i];
  6594. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6595. return c
  6596. }
  6597. }
  6598. }
  6599. }
  6600. /* */
  6601. /* */
  6602. function initEvents (vm) {
  6603. vm._events = Object.create(null);
  6604. vm._hasHookEvent = false;
  6605. // init parent attached events
  6606. var listeners = vm.$options._parentListeners;
  6607. if (listeners) {
  6608. updateComponentListeners(vm, listeners);
  6609. }
  6610. }
  6611. var target;
  6612. function add (event, fn) {
  6613. target.$on(event, fn);
  6614. }
  6615. function remove$1 (event, fn) {
  6616. target.$off(event, fn);
  6617. }
  6618. function createOnceHandler (event, fn) {
  6619. var _target = target;
  6620. return function onceHandler () {
  6621. var res = fn.apply(null, arguments);
  6622. if (res !== null) {
  6623. _target.$off(event, onceHandler);
  6624. }
  6625. }
  6626. }
  6627. function updateComponentListeners (
  6628. vm,
  6629. listeners,
  6630. oldListeners
  6631. ) {
  6632. target = vm;
  6633. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6634. target = undefined;
  6635. }
  6636. function eventsMixin (Vue) {
  6637. var hookRE = /^hook:/;
  6638. Vue.prototype.$on = function (event, fn) {
  6639. var vm = this;
  6640. if (Array.isArray(event)) {
  6641. for (var i = 0, l = event.length; i < l; i++) {
  6642. vm.$on(event[i], fn);
  6643. }
  6644. } else {
  6645. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6646. // optimize hook:event cost by using a boolean flag marked at registration
  6647. // instead of a hash lookup
  6648. if (hookRE.test(event)) {
  6649. vm._hasHookEvent = true;
  6650. }
  6651. }
  6652. return vm
  6653. };
  6654. Vue.prototype.$once = function (event, fn) {
  6655. var vm = this;
  6656. function on () {
  6657. vm.$off(event, on);
  6658. fn.apply(vm, arguments);
  6659. }
  6660. on.fn = fn;
  6661. vm.$on(event, on);
  6662. return vm
  6663. };
  6664. Vue.prototype.$off = function (event, fn) {
  6665. var vm = this;
  6666. // all
  6667. if (!arguments.length) {
  6668. vm._events = Object.create(null);
  6669. return vm
  6670. }
  6671. // array of events
  6672. if (Array.isArray(event)) {
  6673. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6674. vm.$off(event[i$1], fn);
  6675. }
  6676. return vm
  6677. }
  6678. // specific event
  6679. var cbs = vm._events[event];
  6680. if (!cbs) {
  6681. return vm
  6682. }
  6683. if (!fn) {
  6684. vm._events[event] = null;
  6685. return vm
  6686. }
  6687. // specific handler
  6688. var cb;
  6689. var i = cbs.length;
  6690. while (i--) {
  6691. cb = cbs[i];
  6692. if (cb === fn || cb.fn === fn) {
  6693. cbs.splice(i, 1);
  6694. break
  6695. }
  6696. }
  6697. return vm
  6698. };
  6699. Vue.prototype.$emit = function (event) {
  6700. var vm = this;
  6701. if (true) {
  6702. var lowerCaseEvent = event.toLowerCase();
  6703. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6704. tip(
  6705. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6706. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6707. "Note that HTML attributes are case-insensitive and you cannot use " +
  6708. "v-on to listen to camelCase events when using in-DOM templates. " +
  6709. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6710. );
  6711. }
  6712. }
  6713. var cbs = vm._events[event];
  6714. if (cbs) {
  6715. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6716. var args = toArray(arguments, 1);
  6717. var info = "event handler for \"" + event + "\"";
  6718. for (var i = 0, l = cbs.length; i < l; i++) {
  6719. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6720. }
  6721. }
  6722. return vm
  6723. };
  6724. }
  6725. /* */
  6726. var activeInstance = null;
  6727. var isUpdatingChildComponent = false;
  6728. function setActiveInstance(vm) {
  6729. var prevActiveInstance = activeInstance;
  6730. activeInstance = vm;
  6731. return function () {
  6732. activeInstance = prevActiveInstance;
  6733. }
  6734. }
  6735. function initLifecycle (vm) {
  6736. var options = vm.$options;
  6737. // locate first non-abstract parent
  6738. var parent = options.parent;
  6739. if (parent && !options.abstract) {
  6740. while (parent.$options.abstract && parent.$parent) {
  6741. parent = parent.$parent;
  6742. }
  6743. parent.$children.push(vm);
  6744. }
  6745. vm.$parent = parent;
  6746. vm.$root = parent ? parent.$root : vm;
  6747. vm.$children = [];
  6748. vm.$refs = {};
  6749. vm._watcher = null;
  6750. vm._inactive = null;
  6751. vm._directInactive = false;
  6752. vm._isMounted = false;
  6753. vm._isDestroyed = false;
  6754. vm._isBeingDestroyed = false;
  6755. }
  6756. function lifecycleMixin (Vue) {
  6757. Vue.prototype._update = function (vnode, hydrating) {
  6758. var vm = this;
  6759. var prevEl = vm.$el;
  6760. var prevVnode = vm._vnode;
  6761. var restoreActiveInstance = setActiveInstance(vm);
  6762. vm._vnode = vnode;
  6763. // Vue.prototype.__patch__ is injected in entry points
  6764. // based on the rendering backend used.
  6765. if (!prevVnode) {
  6766. // initial render
  6767. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6768. } else {
  6769. // updates
  6770. vm.$el = vm.__patch__(prevVnode, vnode);
  6771. }
  6772. restoreActiveInstance();
  6773. // update __vue__ reference
  6774. if (prevEl) {
  6775. prevEl.__vue__ = null;
  6776. }
  6777. if (vm.$el) {
  6778. vm.$el.__vue__ = vm;
  6779. }
  6780. // if parent is an HOC, update its $el as well
  6781. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6782. vm.$parent.$el = vm.$el;
  6783. }
  6784. // updated hook is called by the scheduler to ensure that children are
  6785. // updated in a parent's updated hook.
  6786. };
  6787. Vue.prototype.$forceUpdate = function () {
  6788. var vm = this;
  6789. if (vm._watcher) {
  6790. vm._watcher.update();
  6791. }
  6792. };
  6793. Vue.prototype.$destroy = function () {
  6794. var vm = this;
  6795. if (vm._isBeingDestroyed) {
  6796. return
  6797. }
  6798. callHook(vm, 'beforeDestroy');
  6799. vm._isBeingDestroyed = true;
  6800. // remove self from parent
  6801. var parent = vm.$parent;
  6802. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6803. remove(parent.$children, vm);
  6804. }
  6805. // teardown watchers
  6806. if (vm._watcher) {
  6807. vm._watcher.teardown();
  6808. }
  6809. var i = vm._watchers.length;
  6810. while (i--) {
  6811. vm._watchers[i].teardown();
  6812. }
  6813. // remove reference from data ob
  6814. // frozen object may not have observer.
  6815. if (vm._data.__ob__) {
  6816. vm._data.__ob__.vmCount--;
  6817. }
  6818. // call the last hook...
  6819. vm._isDestroyed = true;
  6820. // invoke destroy hooks on current rendered tree
  6821. vm.__patch__(vm._vnode, null);
  6822. // fire destroyed hook
  6823. callHook(vm, 'destroyed');
  6824. // turn off all instance listeners.
  6825. vm.$off();
  6826. // remove __vue__ reference
  6827. if (vm.$el) {
  6828. vm.$el.__vue__ = null;
  6829. }
  6830. // release circular reference (#6759)
  6831. if (vm.$vnode) {
  6832. vm.$vnode.parent = null;
  6833. }
  6834. };
  6835. }
  6836. function updateChildComponent (
  6837. vm,
  6838. propsData,
  6839. listeners,
  6840. parentVnode,
  6841. renderChildren
  6842. ) {
  6843. if (true) {
  6844. isUpdatingChildComponent = true;
  6845. }
  6846. // determine whether component has slot children
  6847. // we need to do this before overwriting $options._renderChildren.
  6848. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6849. // dynamic slot names). Static scoped slots compiled from template has the
  6850. // "$stable" marker.
  6851. var newScopedSlots = parentVnode.data.scopedSlots;
  6852. var oldScopedSlots = vm.$scopedSlots;
  6853. var hasDynamicScopedSlot = !!(
  6854. (newScopedSlots && !newScopedSlots.$stable) ||
  6855. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6856. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6857. );
  6858. // Any static slot children from the parent may have changed during parent's
  6859. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6860. // update is necessary to ensure correctness.
  6861. var needsForceUpdate = !!(
  6862. renderChildren || // has new static slots
  6863. vm.$options._renderChildren || // has old static slots
  6864. hasDynamicScopedSlot
  6865. );
  6866. vm.$options._parentVnode = parentVnode;
  6867. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6868. if (vm._vnode) { // update child tree's parent
  6869. vm._vnode.parent = parentVnode;
  6870. }
  6871. vm.$options._renderChildren = renderChildren;
  6872. // update $attrs and $listeners hash
  6873. // these are also reactive so they may trigger child update if the child
  6874. // used them during render
  6875. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6876. vm.$listeners = listeners || emptyObject;
  6877. // update props
  6878. if (propsData && vm.$options.props) {
  6879. toggleObserving(false);
  6880. var props = vm._props;
  6881. var propKeys = vm.$options._propKeys || [];
  6882. for (var i = 0; i < propKeys.length; i++) {
  6883. var key = propKeys[i];
  6884. var propOptions = vm.$options.props; // wtf flow?
  6885. props[key] = validateProp(key, propOptions, propsData, vm);
  6886. }
  6887. toggleObserving(true);
  6888. // keep a copy of raw propsData
  6889. vm.$options.propsData = propsData;
  6890. }
  6891. // fixed by xxxxxx update properties(mp runtime)
  6892. vm._$updateProperties && vm._$updateProperties(vm);
  6893. // update listeners
  6894. listeners = listeners || emptyObject;
  6895. var oldListeners = vm.$options._parentListeners;
  6896. vm.$options._parentListeners = listeners;
  6897. updateComponentListeners(vm, listeners, oldListeners);
  6898. // resolve slots + force update if has children
  6899. if (needsForceUpdate) {
  6900. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  6901. vm.$forceUpdate();
  6902. }
  6903. if (true) {
  6904. isUpdatingChildComponent = false;
  6905. }
  6906. }
  6907. function isInInactiveTree (vm) {
  6908. while (vm && (vm = vm.$parent)) {
  6909. if (vm._inactive) { return true }
  6910. }
  6911. return false
  6912. }
  6913. function activateChildComponent (vm, direct) {
  6914. if (direct) {
  6915. vm._directInactive = false;
  6916. if (isInInactiveTree(vm)) {
  6917. return
  6918. }
  6919. } else if (vm._directInactive) {
  6920. return
  6921. }
  6922. if (vm._inactive || vm._inactive === null) {
  6923. vm._inactive = false;
  6924. for (var i = 0; i < vm.$children.length; i++) {
  6925. activateChildComponent(vm.$children[i]);
  6926. }
  6927. callHook(vm, 'activated');
  6928. }
  6929. }
  6930. function deactivateChildComponent (vm, direct) {
  6931. if (direct) {
  6932. vm._directInactive = true;
  6933. if (isInInactiveTree(vm)) {
  6934. return
  6935. }
  6936. }
  6937. if (!vm._inactive) {
  6938. vm._inactive = true;
  6939. for (var i = 0; i < vm.$children.length; i++) {
  6940. deactivateChildComponent(vm.$children[i]);
  6941. }
  6942. callHook(vm, 'deactivated');
  6943. }
  6944. }
  6945. function callHook (vm, hook) {
  6946. // #7573 disable dep collection when invoking lifecycle hooks
  6947. pushTarget();
  6948. var handlers = vm.$options[hook];
  6949. var info = hook + " hook";
  6950. if (handlers) {
  6951. for (var i = 0, j = handlers.length; i < j; i++) {
  6952. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  6953. }
  6954. }
  6955. if (vm._hasHookEvent) {
  6956. vm.$emit('hook:' + hook);
  6957. }
  6958. popTarget();
  6959. }
  6960. /* */
  6961. var MAX_UPDATE_COUNT = 100;
  6962. var queue = [];
  6963. var activatedChildren = [];
  6964. var has = {};
  6965. var circular = {};
  6966. var waiting = false;
  6967. var flushing = false;
  6968. var index = 0;
  6969. /**
  6970. * Reset the scheduler's state.
  6971. */
  6972. function resetSchedulerState () {
  6973. index = queue.length = activatedChildren.length = 0;
  6974. has = {};
  6975. if (true) {
  6976. circular = {};
  6977. }
  6978. waiting = flushing = false;
  6979. }
  6980. // Async edge case #6566 requires saving the timestamp when event listeners are
  6981. // attached. However, calling performance.now() has a perf overhead especially
  6982. // if the page has thousands of event listeners. Instead, we take a timestamp
  6983. // every time the scheduler flushes and use that for all event listeners
  6984. // attached during that flush.
  6985. var currentFlushTimestamp = 0;
  6986. // Async edge case fix requires storing an event listener's attach timestamp.
  6987. var getNow = Date.now;
  6988. // Determine what event timestamp the browser is using. Annoyingly, the
  6989. // timestamp can either be hi-res (relative to page load) or low-res
  6990. // (relative to UNIX epoch), so in order to compare time we have to use the
  6991. // same timestamp type when saving the flush timestamp.
  6992. // All IE versions use low-res event timestamps, and have problematic clock
  6993. // implementations (#9632)
  6994. if (inBrowser && !isIE) {
  6995. var performance = window.performance;
  6996. if (
  6997. performance &&
  6998. typeof performance.now === 'function' &&
  6999. getNow() > document.createEvent('Event').timeStamp
  7000. ) {
  7001. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7002. // smaller than it, it means the event is using a hi-res timestamp,
  7003. // and we need to use the hi-res version for event listener timestamps as
  7004. // well.
  7005. getNow = function () { return performance.now(); };
  7006. }
  7007. }
  7008. /**
  7009. * Flush both queues and run the watchers.
  7010. */
  7011. function flushSchedulerQueue () {
  7012. currentFlushTimestamp = getNow();
  7013. flushing = true;
  7014. var watcher, id;
  7015. // Sort queue before flush.
  7016. // This ensures that:
  7017. // 1. Components are updated from parent to child. (because parent is always
  7018. // created before the child)
  7019. // 2. A component's user watchers are run before its render watcher (because
  7020. // user watchers are created before the render watcher)
  7021. // 3. If a component is destroyed during a parent component's watcher run,
  7022. // its watchers can be skipped.
  7023. queue.sort(function (a, b) { return a.id - b.id; });
  7024. // do not cache length because more watchers might be pushed
  7025. // as we run existing watchers
  7026. for (index = 0; index < queue.length; index++) {
  7027. watcher = queue[index];
  7028. if (watcher.before) {
  7029. watcher.before();
  7030. }
  7031. id = watcher.id;
  7032. has[id] = null;
  7033. watcher.run();
  7034. // in dev build, check and stop circular updates.
  7035. if ( true && has[id] != null) {
  7036. circular[id] = (circular[id] || 0) + 1;
  7037. if (circular[id] > MAX_UPDATE_COUNT) {
  7038. warn(
  7039. 'You may have an infinite update loop ' + (
  7040. watcher.user
  7041. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7042. : "in a component render function."
  7043. ),
  7044. watcher.vm
  7045. );
  7046. break
  7047. }
  7048. }
  7049. }
  7050. // keep copies of post queues before resetting state
  7051. var activatedQueue = activatedChildren.slice();
  7052. var updatedQueue = queue.slice();
  7053. resetSchedulerState();
  7054. // call component updated and activated hooks
  7055. callActivatedHooks(activatedQueue);
  7056. callUpdatedHooks(updatedQueue);
  7057. // devtool hook
  7058. /* istanbul ignore if */
  7059. if (devtools && config.devtools) {
  7060. devtools.emit('flush');
  7061. }
  7062. }
  7063. function callUpdatedHooks (queue) {
  7064. var i = queue.length;
  7065. while (i--) {
  7066. var watcher = queue[i];
  7067. var vm = watcher.vm;
  7068. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7069. callHook(vm, 'updated');
  7070. }
  7071. }
  7072. }
  7073. /**
  7074. * Queue a kept-alive component that was activated during patch.
  7075. * The queue will be processed after the entire tree has been patched.
  7076. */
  7077. function queueActivatedComponent (vm) {
  7078. // setting _inactive to false here so that a render function can
  7079. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7080. vm._inactive = false;
  7081. activatedChildren.push(vm);
  7082. }
  7083. function callActivatedHooks (queue) {
  7084. for (var i = 0; i < queue.length; i++) {
  7085. queue[i]._inactive = true;
  7086. activateChildComponent(queue[i], true /* true */);
  7087. }
  7088. }
  7089. /**
  7090. * Push a watcher into the watcher queue.
  7091. * Jobs with duplicate IDs will be skipped unless it's
  7092. * pushed when the queue is being flushed.
  7093. */
  7094. function queueWatcher (watcher) {
  7095. var id = watcher.id;
  7096. if (has[id] == null) {
  7097. has[id] = true;
  7098. if (!flushing) {
  7099. queue.push(watcher);
  7100. } else {
  7101. // if already flushing, splice the watcher based on its id
  7102. // if already past its id, it will be run next immediately.
  7103. var i = queue.length - 1;
  7104. while (i > index && queue[i].id > watcher.id) {
  7105. i--;
  7106. }
  7107. queue.splice(i + 1, 0, watcher);
  7108. }
  7109. // queue the flush
  7110. if (!waiting) {
  7111. waiting = true;
  7112. if ( true && !config.async) {
  7113. flushSchedulerQueue();
  7114. return
  7115. }
  7116. nextTick(flushSchedulerQueue);
  7117. }
  7118. }
  7119. }
  7120. /* */
  7121. var uid$2 = 0;
  7122. /**
  7123. * A watcher parses an expression, collects dependencies,
  7124. * and fires callback when the expression value changes.
  7125. * This is used for both the $watch() api and directives.
  7126. */
  7127. var Watcher = function Watcher (
  7128. vm,
  7129. expOrFn,
  7130. cb,
  7131. options,
  7132. isRenderWatcher
  7133. ) {
  7134. this.vm = vm;
  7135. if (isRenderWatcher) {
  7136. vm._watcher = this;
  7137. }
  7138. vm._watchers.push(this);
  7139. // options
  7140. if (options) {
  7141. this.deep = !!options.deep;
  7142. this.user = !!options.user;
  7143. this.lazy = !!options.lazy;
  7144. this.sync = !!options.sync;
  7145. this.before = options.before;
  7146. } else {
  7147. this.deep = this.user = this.lazy = this.sync = false;
  7148. }
  7149. this.cb = cb;
  7150. this.id = ++uid$2; // uid for batching
  7151. this.active = true;
  7152. this.dirty = this.lazy; // for lazy watchers
  7153. this.deps = [];
  7154. this.newDeps = [];
  7155. this.depIds = new _Set();
  7156. this.newDepIds = new _Set();
  7157. this.expression = true
  7158. ? expOrFn.toString()
  7159. : undefined;
  7160. // parse expression for getter
  7161. if (typeof expOrFn === 'function') {
  7162. this.getter = expOrFn;
  7163. } else {
  7164. this.getter = parsePath(expOrFn);
  7165. if (!this.getter) {
  7166. this.getter = noop;
  7167. true && warn(
  7168. "Failed watching path: \"" + expOrFn + "\" " +
  7169. 'Watcher only accepts simple dot-delimited paths. ' +
  7170. 'For full control, use a function instead.',
  7171. vm
  7172. );
  7173. }
  7174. }
  7175. this.value = this.lazy
  7176. ? undefined
  7177. : this.get();
  7178. };
  7179. /**
  7180. * Evaluate the getter, and re-collect dependencies.
  7181. */
  7182. Watcher.prototype.get = function get () {
  7183. pushTarget(this);
  7184. var value;
  7185. var vm = this.vm;
  7186. try {
  7187. value = this.getter.call(vm, vm);
  7188. } catch (e) {
  7189. if (this.user) {
  7190. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7191. } else {
  7192. throw e
  7193. }
  7194. } finally {
  7195. // "touch" every property so they are all tracked as
  7196. // dependencies for deep watching
  7197. if (this.deep) {
  7198. traverse(value);
  7199. }
  7200. popTarget();
  7201. this.cleanupDeps();
  7202. }
  7203. return value
  7204. };
  7205. /**
  7206. * Add a dependency to this directive.
  7207. */
  7208. Watcher.prototype.addDep = function addDep (dep) {
  7209. var id = dep.id;
  7210. if (!this.newDepIds.has(id)) {
  7211. this.newDepIds.add(id);
  7212. this.newDeps.push(dep);
  7213. if (!this.depIds.has(id)) {
  7214. dep.addSub(this);
  7215. }
  7216. }
  7217. };
  7218. /**
  7219. * Clean up for dependency collection.
  7220. */
  7221. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7222. var i = this.deps.length;
  7223. while (i--) {
  7224. var dep = this.deps[i];
  7225. if (!this.newDepIds.has(dep.id)) {
  7226. dep.removeSub(this);
  7227. }
  7228. }
  7229. var tmp = this.depIds;
  7230. this.depIds = this.newDepIds;
  7231. this.newDepIds = tmp;
  7232. this.newDepIds.clear();
  7233. tmp = this.deps;
  7234. this.deps = this.newDeps;
  7235. this.newDeps = tmp;
  7236. this.newDeps.length = 0;
  7237. };
  7238. /**
  7239. * Subscriber interface.
  7240. * Will be called when a dependency changes.
  7241. */
  7242. Watcher.prototype.update = function update () {
  7243. /* istanbul ignore else */
  7244. if (this.lazy) {
  7245. this.dirty = true;
  7246. } else if (this.sync) {
  7247. this.run();
  7248. } else {
  7249. queueWatcher(this);
  7250. }
  7251. };
  7252. /**
  7253. * Scheduler job interface.
  7254. * Will be called by the scheduler.
  7255. */
  7256. Watcher.prototype.run = function run () {
  7257. if (this.active) {
  7258. var value = this.get();
  7259. if (
  7260. value !== this.value ||
  7261. // Deep watchers and watchers on Object/Arrays should fire even
  7262. // when the value is the same, because the value may
  7263. // have mutated.
  7264. isObject(value) ||
  7265. this.deep
  7266. ) {
  7267. // set new value
  7268. var oldValue = this.value;
  7269. this.value = value;
  7270. if (this.user) {
  7271. try {
  7272. this.cb.call(this.vm, value, oldValue);
  7273. } catch (e) {
  7274. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7275. }
  7276. } else {
  7277. this.cb.call(this.vm, value, oldValue);
  7278. }
  7279. }
  7280. }
  7281. };
  7282. /**
  7283. * Evaluate the value of the watcher.
  7284. * This only gets called for lazy watchers.
  7285. */
  7286. Watcher.prototype.evaluate = function evaluate () {
  7287. this.value = this.get();
  7288. this.dirty = false;
  7289. };
  7290. /**
  7291. * Depend on all deps collected by this watcher.
  7292. */
  7293. Watcher.prototype.depend = function depend () {
  7294. var i = this.deps.length;
  7295. while (i--) {
  7296. this.deps[i].depend();
  7297. }
  7298. };
  7299. /**
  7300. * Remove self from all dependencies' subscriber list.
  7301. */
  7302. Watcher.prototype.teardown = function teardown () {
  7303. if (this.active) {
  7304. // remove self from vm's watcher list
  7305. // this is a somewhat expensive operation so we skip it
  7306. // if the vm is being destroyed.
  7307. if (!this.vm._isBeingDestroyed) {
  7308. remove(this.vm._watchers, this);
  7309. }
  7310. var i = this.deps.length;
  7311. while (i--) {
  7312. this.deps[i].removeSub(this);
  7313. }
  7314. this.active = false;
  7315. }
  7316. };
  7317. /* */
  7318. var sharedPropertyDefinition = {
  7319. enumerable: true,
  7320. configurable: true,
  7321. get: noop,
  7322. set: noop
  7323. };
  7324. function proxy (target, sourceKey, key) {
  7325. sharedPropertyDefinition.get = function proxyGetter () {
  7326. return this[sourceKey][key]
  7327. };
  7328. sharedPropertyDefinition.set = function proxySetter (val) {
  7329. this[sourceKey][key] = val;
  7330. };
  7331. Object.defineProperty(target, key, sharedPropertyDefinition);
  7332. }
  7333. function initState (vm) {
  7334. vm._watchers = [];
  7335. var opts = vm.$options;
  7336. if (opts.props) { initProps(vm, opts.props); }
  7337. if (opts.methods) { initMethods(vm, opts.methods); }
  7338. if (opts.data) {
  7339. initData(vm);
  7340. } else {
  7341. observe(vm._data = {}, true /* asRootData */);
  7342. }
  7343. if (opts.computed) { initComputed(vm, opts.computed); }
  7344. if (opts.watch && opts.watch !== nativeWatch) {
  7345. initWatch(vm, opts.watch);
  7346. }
  7347. }
  7348. function initProps (vm, propsOptions) {
  7349. var propsData = vm.$options.propsData || {};
  7350. var props = vm._props = {};
  7351. // cache prop keys so that future props updates can iterate using Array
  7352. // instead of dynamic object key enumeration.
  7353. var keys = vm.$options._propKeys = [];
  7354. var isRoot = !vm.$parent;
  7355. // root instance props should be converted
  7356. if (!isRoot) {
  7357. toggleObserving(false);
  7358. }
  7359. var loop = function ( key ) {
  7360. keys.push(key);
  7361. var value = validateProp(key, propsOptions, propsData, vm);
  7362. /* istanbul ignore else */
  7363. if (true) {
  7364. var hyphenatedKey = hyphenate(key);
  7365. if (isReservedAttribute(hyphenatedKey) ||
  7366. config.isReservedAttr(hyphenatedKey)) {
  7367. warn(
  7368. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7369. vm
  7370. );
  7371. }
  7372. defineReactive$$1(props, key, value, function () {
  7373. if (!isRoot && !isUpdatingChildComponent) {
  7374. {
  7375. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7376. return
  7377. }
  7378. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7379. if(
  7380. key === 'value' &&
  7381. Array.isArray(vm.$options.behaviors) &&
  7382. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7383. ){
  7384. return
  7385. }
  7386. if(vm._getFormData){
  7387. return
  7388. }
  7389. var $parent = vm.$parent;
  7390. while($parent){
  7391. if($parent.__next_tick_pending){
  7392. return
  7393. }
  7394. $parent = $parent.$parent;
  7395. }
  7396. }
  7397. warn(
  7398. "Avoid mutating a prop directly since the value will be " +
  7399. "overwritten whenever the parent component re-renders. " +
  7400. "Instead, use a data or computed property based on the prop's " +
  7401. "value. Prop being mutated: \"" + key + "\"",
  7402. vm
  7403. );
  7404. }
  7405. });
  7406. } else {}
  7407. // static props are already proxied on the component's prototype
  7408. // during Vue.extend(). We only need to proxy props defined at
  7409. // instantiation here.
  7410. if (!(key in vm)) {
  7411. proxy(vm, "_props", key);
  7412. }
  7413. };
  7414. for (var key in propsOptions) loop( key );
  7415. toggleObserving(true);
  7416. }
  7417. function initData (vm) {
  7418. var data = vm.$options.data;
  7419. data = vm._data = typeof data === 'function'
  7420. ? getData(data, vm)
  7421. : data || {};
  7422. if (!isPlainObject(data)) {
  7423. data = {};
  7424. true && warn(
  7425. 'data functions should return an object:\n' +
  7426. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7427. vm
  7428. );
  7429. }
  7430. // proxy data on instance
  7431. var keys = Object.keys(data);
  7432. var props = vm.$options.props;
  7433. var methods = vm.$options.methods;
  7434. var i = keys.length;
  7435. while (i--) {
  7436. var key = keys[i];
  7437. if (true) {
  7438. if (methods && hasOwn(methods, key)) {
  7439. warn(
  7440. ("Method \"" + key + "\" has already been defined as a data property."),
  7441. vm
  7442. );
  7443. }
  7444. }
  7445. if (props && hasOwn(props, key)) {
  7446. true && warn(
  7447. "The data property \"" + key + "\" is already declared as a prop. " +
  7448. "Use prop default value instead.",
  7449. vm
  7450. );
  7451. } else if (!isReserved(key)) {
  7452. proxy(vm, "_data", key);
  7453. }
  7454. }
  7455. // observe data
  7456. observe(data, true /* asRootData */);
  7457. }
  7458. function getData (data, vm) {
  7459. // #7573 disable dep collection when invoking data getters
  7460. pushTarget();
  7461. try {
  7462. return data.call(vm, vm)
  7463. } catch (e) {
  7464. handleError(e, vm, "data()");
  7465. return {}
  7466. } finally {
  7467. popTarget();
  7468. }
  7469. }
  7470. var computedWatcherOptions = { lazy: true };
  7471. function initComputed (vm, computed) {
  7472. // $flow-disable-line
  7473. var watchers = vm._computedWatchers = Object.create(null);
  7474. // computed properties are just getters during SSR
  7475. var isSSR = isServerRendering();
  7476. for (var key in computed) {
  7477. var userDef = computed[key];
  7478. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7479. if ( true && getter == null) {
  7480. warn(
  7481. ("Getter is missing for computed property \"" + key + "\"."),
  7482. vm
  7483. );
  7484. }
  7485. if (!isSSR) {
  7486. // create internal watcher for the computed property.
  7487. watchers[key] = new Watcher(
  7488. vm,
  7489. getter || noop,
  7490. noop,
  7491. computedWatcherOptions
  7492. );
  7493. }
  7494. // component-defined computed properties are already defined on the
  7495. // component prototype. We only need to define computed properties defined
  7496. // at instantiation here.
  7497. if (!(key in vm)) {
  7498. defineComputed(vm, key, userDef);
  7499. } else if (true) {
  7500. if (key in vm.$data) {
  7501. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7502. } else if (vm.$options.props && key in vm.$options.props) {
  7503. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7504. }
  7505. }
  7506. }
  7507. }
  7508. function defineComputed (
  7509. target,
  7510. key,
  7511. userDef
  7512. ) {
  7513. var shouldCache = !isServerRendering();
  7514. if (typeof userDef === 'function') {
  7515. sharedPropertyDefinition.get = shouldCache
  7516. ? createComputedGetter(key)
  7517. : createGetterInvoker(userDef);
  7518. sharedPropertyDefinition.set = noop;
  7519. } else {
  7520. sharedPropertyDefinition.get = userDef.get
  7521. ? shouldCache && userDef.cache !== false
  7522. ? createComputedGetter(key)
  7523. : createGetterInvoker(userDef.get)
  7524. : noop;
  7525. sharedPropertyDefinition.set = userDef.set || noop;
  7526. }
  7527. if ( true &&
  7528. sharedPropertyDefinition.set === noop) {
  7529. sharedPropertyDefinition.set = function () {
  7530. warn(
  7531. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7532. this
  7533. );
  7534. };
  7535. }
  7536. Object.defineProperty(target, key, sharedPropertyDefinition);
  7537. }
  7538. function createComputedGetter (key) {
  7539. return function computedGetter () {
  7540. var watcher = this._computedWatchers && this._computedWatchers[key];
  7541. if (watcher) {
  7542. if (watcher.dirty) {
  7543. watcher.evaluate();
  7544. }
  7545. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7546. watcher.depend();
  7547. }
  7548. return watcher.value
  7549. }
  7550. }
  7551. }
  7552. function createGetterInvoker(fn) {
  7553. return function computedGetter () {
  7554. return fn.call(this, this)
  7555. }
  7556. }
  7557. function initMethods (vm, methods) {
  7558. var props = vm.$options.props;
  7559. for (var key in methods) {
  7560. if (true) {
  7561. if (typeof methods[key] !== 'function') {
  7562. warn(
  7563. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7564. "Did you reference the function correctly?",
  7565. vm
  7566. );
  7567. }
  7568. if (props && hasOwn(props, key)) {
  7569. warn(
  7570. ("Method \"" + key + "\" has already been defined as a prop."),
  7571. vm
  7572. );
  7573. }
  7574. if ((key in vm) && isReserved(key)) {
  7575. warn(
  7576. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7577. "Avoid defining component methods that start with _ or $."
  7578. );
  7579. }
  7580. }
  7581. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7582. }
  7583. }
  7584. function initWatch (vm, watch) {
  7585. for (var key in watch) {
  7586. var handler = watch[key];
  7587. if (Array.isArray(handler)) {
  7588. for (var i = 0; i < handler.length; i++) {
  7589. createWatcher(vm, key, handler[i]);
  7590. }
  7591. } else {
  7592. createWatcher(vm, key, handler);
  7593. }
  7594. }
  7595. }
  7596. function createWatcher (
  7597. vm,
  7598. expOrFn,
  7599. handler,
  7600. options
  7601. ) {
  7602. if (isPlainObject(handler)) {
  7603. options = handler;
  7604. handler = handler.handler;
  7605. }
  7606. if (typeof handler === 'string') {
  7607. handler = vm[handler];
  7608. }
  7609. return vm.$watch(expOrFn, handler, options)
  7610. }
  7611. function stateMixin (Vue) {
  7612. // flow somehow has problems with directly declared definition object
  7613. // when using Object.defineProperty, so we have to procedurally build up
  7614. // the object here.
  7615. var dataDef = {};
  7616. dataDef.get = function () { return this._data };
  7617. var propsDef = {};
  7618. propsDef.get = function () { return this._props };
  7619. if (true) {
  7620. dataDef.set = function () {
  7621. warn(
  7622. 'Avoid replacing instance root $data. ' +
  7623. 'Use nested data properties instead.',
  7624. this
  7625. );
  7626. };
  7627. propsDef.set = function () {
  7628. warn("$props is readonly.", this);
  7629. };
  7630. }
  7631. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7632. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7633. Vue.prototype.$set = set;
  7634. Vue.prototype.$delete = del;
  7635. Vue.prototype.$watch = function (
  7636. expOrFn,
  7637. cb,
  7638. options
  7639. ) {
  7640. var vm = this;
  7641. if (isPlainObject(cb)) {
  7642. return createWatcher(vm, expOrFn, cb, options)
  7643. }
  7644. options = options || {};
  7645. options.user = true;
  7646. var watcher = new Watcher(vm, expOrFn, cb, options);
  7647. if (options.immediate) {
  7648. try {
  7649. cb.call(vm, watcher.value);
  7650. } catch (error) {
  7651. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7652. }
  7653. }
  7654. return function unwatchFn () {
  7655. watcher.teardown();
  7656. }
  7657. };
  7658. }
  7659. /* */
  7660. var uid$3 = 0;
  7661. function initMixin (Vue) {
  7662. Vue.prototype._init = function (options) {
  7663. var vm = this;
  7664. // a uid
  7665. vm._uid = uid$3++;
  7666. var startTag, endTag;
  7667. /* istanbul ignore if */
  7668. if ( true && config.performance && mark) {
  7669. startTag = "vue-perf-start:" + (vm._uid);
  7670. endTag = "vue-perf-end:" + (vm._uid);
  7671. mark(startTag);
  7672. }
  7673. // a flag to avoid this being observed
  7674. vm._isVue = true;
  7675. // merge options
  7676. if (options && options._isComponent) {
  7677. // optimize internal component instantiation
  7678. // since dynamic options merging is pretty slow, and none of the
  7679. // internal component options needs special treatment.
  7680. initInternalComponent(vm, options);
  7681. } else {
  7682. vm.$options = mergeOptions(
  7683. resolveConstructorOptions(vm.constructor),
  7684. options || {},
  7685. vm
  7686. );
  7687. }
  7688. /* istanbul ignore else */
  7689. if (true) {
  7690. initProxy(vm);
  7691. } else {}
  7692. // expose real self
  7693. vm._self = vm;
  7694. initLifecycle(vm);
  7695. initEvents(vm);
  7696. initRender(vm);
  7697. callHook(vm, 'beforeCreate');
  7698. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7699. initState(vm);
  7700. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7701. !vm._$fallback && callHook(vm, 'created');
  7702. /* istanbul ignore if */
  7703. if ( true && config.performance && mark) {
  7704. vm._name = formatComponentName(vm, false);
  7705. mark(endTag);
  7706. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7707. }
  7708. if (vm.$options.el) {
  7709. vm.$mount(vm.$options.el);
  7710. }
  7711. };
  7712. }
  7713. function initInternalComponent (vm, options) {
  7714. var opts = vm.$options = Object.create(vm.constructor.options);
  7715. // doing this because it's faster than dynamic enumeration.
  7716. var parentVnode = options._parentVnode;
  7717. opts.parent = options.parent;
  7718. opts._parentVnode = parentVnode;
  7719. var vnodeComponentOptions = parentVnode.componentOptions;
  7720. opts.propsData = vnodeComponentOptions.propsData;
  7721. opts._parentListeners = vnodeComponentOptions.listeners;
  7722. opts._renderChildren = vnodeComponentOptions.children;
  7723. opts._componentTag = vnodeComponentOptions.tag;
  7724. if (options.render) {
  7725. opts.render = options.render;
  7726. opts.staticRenderFns = options.staticRenderFns;
  7727. }
  7728. }
  7729. function resolveConstructorOptions (Ctor) {
  7730. var options = Ctor.options;
  7731. if (Ctor.super) {
  7732. var superOptions = resolveConstructorOptions(Ctor.super);
  7733. var cachedSuperOptions = Ctor.superOptions;
  7734. if (superOptions !== cachedSuperOptions) {
  7735. // super option changed,
  7736. // need to resolve new options.
  7737. Ctor.superOptions = superOptions;
  7738. // check if there are any late-modified/attached options (#4976)
  7739. var modifiedOptions = resolveModifiedOptions(Ctor);
  7740. // update base extend options
  7741. if (modifiedOptions) {
  7742. extend(Ctor.extendOptions, modifiedOptions);
  7743. }
  7744. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7745. if (options.name) {
  7746. options.components[options.name] = Ctor;
  7747. }
  7748. }
  7749. }
  7750. return options
  7751. }
  7752. function resolveModifiedOptions (Ctor) {
  7753. var modified;
  7754. var latest = Ctor.options;
  7755. var sealed = Ctor.sealedOptions;
  7756. for (var key in latest) {
  7757. if (latest[key] !== sealed[key]) {
  7758. if (!modified) { modified = {}; }
  7759. modified[key] = latest[key];
  7760. }
  7761. }
  7762. return modified
  7763. }
  7764. function Vue (options) {
  7765. if ( true &&
  7766. !(this instanceof Vue)
  7767. ) {
  7768. warn('Vue is a constructor and should be called with the `new` keyword');
  7769. }
  7770. this._init(options);
  7771. }
  7772. initMixin(Vue);
  7773. stateMixin(Vue);
  7774. eventsMixin(Vue);
  7775. lifecycleMixin(Vue);
  7776. renderMixin(Vue);
  7777. /* */
  7778. function initUse (Vue) {
  7779. Vue.use = function (plugin) {
  7780. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7781. if (installedPlugins.indexOf(plugin) > -1) {
  7782. return this
  7783. }
  7784. // additional parameters
  7785. var args = toArray(arguments, 1);
  7786. args.unshift(this);
  7787. if (typeof plugin.install === 'function') {
  7788. plugin.install.apply(plugin, args);
  7789. } else if (typeof plugin === 'function') {
  7790. plugin.apply(null, args);
  7791. }
  7792. installedPlugins.push(plugin);
  7793. return this
  7794. };
  7795. }
  7796. /* */
  7797. function initMixin$1 (Vue) {
  7798. Vue.mixin = function (mixin) {
  7799. this.options = mergeOptions(this.options, mixin);
  7800. return this
  7801. };
  7802. }
  7803. /* */
  7804. function initExtend (Vue) {
  7805. /**
  7806. * Each instance constructor, including Vue, has a unique
  7807. * cid. This enables us to create wrapped "child
  7808. * constructors" for prototypal inheritance and cache them.
  7809. */
  7810. Vue.cid = 0;
  7811. var cid = 1;
  7812. /**
  7813. * Class inheritance
  7814. */
  7815. Vue.extend = function (extendOptions) {
  7816. extendOptions = extendOptions || {};
  7817. var Super = this;
  7818. var SuperId = Super.cid;
  7819. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7820. if (cachedCtors[SuperId]) {
  7821. return cachedCtors[SuperId]
  7822. }
  7823. var name = extendOptions.name || Super.options.name;
  7824. if ( true && name) {
  7825. validateComponentName(name);
  7826. }
  7827. var Sub = function VueComponent (options) {
  7828. this._init(options);
  7829. };
  7830. Sub.prototype = Object.create(Super.prototype);
  7831. Sub.prototype.constructor = Sub;
  7832. Sub.cid = cid++;
  7833. Sub.options = mergeOptions(
  7834. Super.options,
  7835. extendOptions
  7836. );
  7837. Sub['super'] = Super;
  7838. // For props and computed properties, we define the proxy getters on
  7839. // the Vue instances at extension time, on the extended prototype. This
  7840. // avoids Object.defineProperty calls for each instance created.
  7841. if (Sub.options.props) {
  7842. initProps$1(Sub);
  7843. }
  7844. if (Sub.options.computed) {
  7845. initComputed$1(Sub);
  7846. }
  7847. // allow further extension/mixin/plugin usage
  7848. Sub.extend = Super.extend;
  7849. Sub.mixin = Super.mixin;
  7850. Sub.use = Super.use;
  7851. // create asset registers, so extended classes
  7852. // can have their private assets too.
  7853. ASSET_TYPES.forEach(function (type) {
  7854. Sub[type] = Super[type];
  7855. });
  7856. // enable recursive self-lookup
  7857. if (name) {
  7858. Sub.options.components[name] = Sub;
  7859. }
  7860. // keep a reference to the super options at extension time.
  7861. // later at instantiation we can check if Super's options have
  7862. // been updated.
  7863. Sub.superOptions = Super.options;
  7864. Sub.extendOptions = extendOptions;
  7865. Sub.sealedOptions = extend({}, Sub.options);
  7866. // cache constructor
  7867. cachedCtors[SuperId] = Sub;
  7868. return Sub
  7869. };
  7870. }
  7871. function initProps$1 (Comp) {
  7872. var props = Comp.options.props;
  7873. for (var key in props) {
  7874. proxy(Comp.prototype, "_props", key);
  7875. }
  7876. }
  7877. function initComputed$1 (Comp) {
  7878. var computed = Comp.options.computed;
  7879. for (var key in computed) {
  7880. defineComputed(Comp.prototype, key, computed[key]);
  7881. }
  7882. }
  7883. /* */
  7884. function initAssetRegisters (Vue) {
  7885. /**
  7886. * Create asset registration methods.
  7887. */
  7888. ASSET_TYPES.forEach(function (type) {
  7889. Vue[type] = function (
  7890. id,
  7891. definition
  7892. ) {
  7893. if (!definition) {
  7894. return this.options[type + 's'][id]
  7895. } else {
  7896. /* istanbul ignore if */
  7897. if ( true && type === 'component') {
  7898. validateComponentName(id);
  7899. }
  7900. if (type === 'component' && isPlainObject(definition)) {
  7901. definition.name = definition.name || id;
  7902. definition = this.options._base.extend(definition);
  7903. }
  7904. if (type === 'directive' && typeof definition === 'function') {
  7905. definition = { bind: definition, update: definition };
  7906. }
  7907. this.options[type + 's'][id] = definition;
  7908. return definition
  7909. }
  7910. };
  7911. });
  7912. }
  7913. /* */
  7914. function getComponentName (opts) {
  7915. return opts && (opts.Ctor.options.name || opts.tag)
  7916. }
  7917. function matches (pattern, name) {
  7918. if (Array.isArray(pattern)) {
  7919. return pattern.indexOf(name) > -1
  7920. } else if (typeof pattern === 'string') {
  7921. return pattern.split(',').indexOf(name) > -1
  7922. } else if (isRegExp(pattern)) {
  7923. return pattern.test(name)
  7924. }
  7925. /* istanbul ignore next */
  7926. return false
  7927. }
  7928. function pruneCache (keepAliveInstance, filter) {
  7929. var cache = keepAliveInstance.cache;
  7930. var keys = keepAliveInstance.keys;
  7931. var _vnode = keepAliveInstance._vnode;
  7932. for (var key in cache) {
  7933. var cachedNode = cache[key];
  7934. if (cachedNode) {
  7935. var name = getComponentName(cachedNode.componentOptions);
  7936. if (name && !filter(name)) {
  7937. pruneCacheEntry(cache, key, keys, _vnode);
  7938. }
  7939. }
  7940. }
  7941. }
  7942. function pruneCacheEntry (
  7943. cache,
  7944. key,
  7945. keys,
  7946. current
  7947. ) {
  7948. var cached$$1 = cache[key];
  7949. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  7950. cached$$1.componentInstance.$destroy();
  7951. }
  7952. cache[key] = null;
  7953. remove(keys, key);
  7954. }
  7955. var patternTypes = [String, RegExp, Array];
  7956. var KeepAlive = {
  7957. name: 'keep-alive',
  7958. abstract: true,
  7959. props: {
  7960. include: patternTypes,
  7961. exclude: patternTypes,
  7962. max: [String, Number]
  7963. },
  7964. created: function created () {
  7965. this.cache = Object.create(null);
  7966. this.keys = [];
  7967. },
  7968. destroyed: function destroyed () {
  7969. for (var key in this.cache) {
  7970. pruneCacheEntry(this.cache, key, this.keys);
  7971. }
  7972. },
  7973. mounted: function mounted () {
  7974. var this$1 = this;
  7975. this.$watch('include', function (val) {
  7976. pruneCache(this$1, function (name) { return matches(val, name); });
  7977. });
  7978. this.$watch('exclude', function (val) {
  7979. pruneCache(this$1, function (name) { return !matches(val, name); });
  7980. });
  7981. },
  7982. render: function render () {
  7983. var slot = this.$slots.default;
  7984. var vnode = getFirstComponentChild(slot);
  7985. var componentOptions = vnode && vnode.componentOptions;
  7986. if (componentOptions) {
  7987. // check pattern
  7988. var name = getComponentName(componentOptions);
  7989. var ref = this;
  7990. var include = ref.include;
  7991. var exclude = ref.exclude;
  7992. if (
  7993. // not included
  7994. (include && (!name || !matches(include, name))) ||
  7995. // excluded
  7996. (exclude && name && matches(exclude, name))
  7997. ) {
  7998. return vnode
  7999. }
  8000. var ref$1 = this;
  8001. var cache = ref$1.cache;
  8002. var keys = ref$1.keys;
  8003. var key = vnode.key == null
  8004. // same constructor may get registered as different local components
  8005. // so cid alone is not enough (#3269)
  8006. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8007. : vnode.key;
  8008. if (cache[key]) {
  8009. vnode.componentInstance = cache[key].componentInstance;
  8010. // make current key freshest
  8011. remove(keys, key);
  8012. keys.push(key);
  8013. } else {
  8014. cache[key] = vnode;
  8015. keys.push(key);
  8016. // prune oldest entry
  8017. if (this.max && keys.length > parseInt(this.max)) {
  8018. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8019. }
  8020. }
  8021. vnode.data.keepAlive = true;
  8022. }
  8023. return vnode || (slot && slot[0])
  8024. }
  8025. };
  8026. var builtInComponents = {
  8027. KeepAlive: KeepAlive
  8028. };
  8029. /* */
  8030. function initGlobalAPI (Vue) {
  8031. // config
  8032. var configDef = {};
  8033. configDef.get = function () { return config; };
  8034. if (true) {
  8035. configDef.set = function () {
  8036. warn(
  8037. 'Do not replace the Vue.config object, set individual fields instead.'
  8038. );
  8039. };
  8040. }
  8041. Object.defineProperty(Vue, 'config', configDef);
  8042. // exposed util methods.
  8043. // NOTE: these are not considered part of the public API - avoid relying on
  8044. // them unless you are aware of the risk.
  8045. Vue.util = {
  8046. warn: warn,
  8047. extend: extend,
  8048. mergeOptions: mergeOptions,
  8049. defineReactive: defineReactive$$1
  8050. };
  8051. Vue.set = set;
  8052. Vue.delete = del;
  8053. Vue.nextTick = nextTick;
  8054. // 2.6 explicit observable API
  8055. Vue.observable = function (obj) {
  8056. observe(obj);
  8057. return obj
  8058. };
  8059. Vue.options = Object.create(null);
  8060. ASSET_TYPES.forEach(function (type) {
  8061. Vue.options[type + 's'] = Object.create(null);
  8062. });
  8063. // this is used to identify the "base" constructor to extend all plain-object
  8064. // components with in Weex's multi-instance scenarios.
  8065. Vue.options._base = Vue;
  8066. extend(Vue.options.components, builtInComponents);
  8067. initUse(Vue);
  8068. initMixin$1(Vue);
  8069. initExtend(Vue);
  8070. initAssetRegisters(Vue);
  8071. }
  8072. initGlobalAPI(Vue);
  8073. Object.defineProperty(Vue.prototype, '$isServer', {
  8074. get: isServerRendering
  8075. });
  8076. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8077. get: function get () {
  8078. /* istanbul ignore next */
  8079. return this.$vnode && this.$vnode.ssrContext
  8080. }
  8081. });
  8082. // expose FunctionalRenderContext for ssr runtime helper installation
  8083. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8084. value: FunctionalRenderContext
  8085. });
  8086. Vue.version = '2.6.11';
  8087. /**
  8088. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8089. */
  8090. var ARRAYTYPE = '[object Array]';
  8091. var OBJECTTYPE = '[object Object]';
  8092. var NULLTYPE = '[object Null]';
  8093. var UNDEFINEDTYPE = '[object Undefined]';
  8094. // const FUNCTIONTYPE = '[object Function]'
  8095. function diff(current, pre) {
  8096. var result = {};
  8097. syncKeys(current, pre);
  8098. _diff(current, pre, '', result);
  8099. return result
  8100. }
  8101. function syncKeys(current, pre) {
  8102. if (current === pre) { return }
  8103. var rootCurrentType = type(current);
  8104. var rootPreType = type(pre);
  8105. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8106. if(Object.keys(current).length >= Object.keys(pre).length){
  8107. for (var key in pre) {
  8108. var currentValue = current[key];
  8109. if (currentValue === undefined) {
  8110. current[key] = null;
  8111. } else {
  8112. syncKeys(currentValue, pre[key]);
  8113. }
  8114. }
  8115. }
  8116. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8117. if (current.length >= pre.length) {
  8118. pre.forEach(function (item, index) {
  8119. syncKeys(current[index], item);
  8120. });
  8121. }
  8122. }
  8123. }
  8124. function nullOrUndefined(currentType, preType) {
  8125. if(
  8126. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8127. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8128. ) {
  8129. return false
  8130. }
  8131. return true
  8132. }
  8133. function _diff(current, pre, path, result) {
  8134. if (current === pre) { return }
  8135. var rootCurrentType = type(current);
  8136. var rootPreType = type(pre);
  8137. if (rootCurrentType == OBJECTTYPE) {
  8138. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8139. setResult(result, path, current);
  8140. } else {
  8141. var loop = function ( key ) {
  8142. var currentValue = current[key];
  8143. var preValue = pre[key];
  8144. var currentType = type(currentValue);
  8145. var preType = type(preValue);
  8146. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8147. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8148. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8149. }
  8150. } else if (currentType == ARRAYTYPE) {
  8151. if (preType != ARRAYTYPE) {
  8152. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8153. } else {
  8154. if (currentValue.length < preValue.length) {
  8155. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8156. } else {
  8157. currentValue.forEach(function (item, index) {
  8158. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8159. });
  8160. }
  8161. }
  8162. } else if (currentType == OBJECTTYPE) {
  8163. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8164. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8165. } else {
  8166. for (var subKey in currentValue) {
  8167. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8168. }
  8169. }
  8170. }
  8171. };
  8172. for (var key in current) loop( key );
  8173. }
  8174. } else if (rootCurrentType == ARRAYTYPE) {
  8175. if (rootPreType != ARRAYTYPE) {
  8176. setResult(result, path, current);
  8177. } else {
  8178. if (current.length < pre.length) {
  8179. setResult(result, path, current);
  8180. } else {
  8181. current.forEach(function (item, index) {
  8182. _diff(item, pre[index], path + '[' + index + ']', result);
  8183. });
  8184. }
  8185. }
  8186. } else {
  8187. setResult(result, path, current);
  8188. }
  8189. }
  8190. function setResult(result, k, v) {
  8191. // if (type(v) != FUNCTIONTYPE) {
  8192. result[k] = v;
  8193. // }
  8194. }
  8195. function type(obj) {
  8196. return Object.prototype.toString.call(obj)
  8197. }
  8198. /* */
  8199. function flushCallbacks$1(vm) {
  8200. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8201. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8202. var mpInstance = vm.$scope;
  8203. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8204. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8205. }
  8206. var copies = vm.__next_tick_callbacks.slice(0);
  8207. vm.__next_tick_callbacks.length = 0;
  8208. for (var i = 0; i < copies.length; i++) {
  8209. copies[i]();
  8210. }
  8211. }
  8212. }
  8213. function hasRenderWatcher(vm) {
  8214. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8215. }
  8216. function nextTick$1(vm, cb) {
  8217. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8218. //2.nextTick 之前存在 render watcher
  8219. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8220. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8221. var mpInstance = vm.$scope;
  8222. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8223. ']:nextVueTick');
  8224. }
  8225. return nextTick(cb, vm)
  8226. }else{
  8227. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8228. var mpInstance$1 = vm.$scope;
  8229. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8230. ']:nextMPTick');
  8231. }
  8232. }
  8233. var _resolve;
  8234. if (!vm.__next_tick_callbacks) {
  8235. vm.__next_tick_callbacks = [];
  8236. }
  8237. vm.__next_tick_callbacks.push(function () {
  8238. if (cb) {
  8239. try {
  8240. cb.call(vm);
  8241. } catch (e) {
  8242. handleError(e, vm, 'nextTick');
  8243. }
  8244. } else if (_resolve) {
  8245. _resolve(vm);
  8246. }
  8247. });
  8248. // $flow-disable-line
  8249. if (!cb && typeof Promise !== 'undefined') {
  8250. return new Promise(function (resolve) {
  8251. _resolve = resolve;
  8252. })
  8253. }
  8254. }
  8255. /* */
  8256. function clearInstance(key, value) {
  8257. // 简易去除 Vue 和小程序组件实例
  8258. if (value) {
  8259. if (value._isVue || value.__v_isMPComponent) {
  8260. return {}
  8261. }
  8262. }
  8263. return value
  8264. }
  8265. function cloneWithData(vm) {
  8266. // 确保当前 vm 所有数据被同步
  8267. var ret = Object.create(null);
  8268. var dataKeys = [].concat(
  8269. Object.keys(vm._data || {}),
  8270. Object.keys(vm._computedWatchers || {}));
  8271. dataKeys.reduce(function(ret, key) {
  8272. ret[key] = vm[key];
  8273. return ret
  8274. }, ret);
  8275. // vue-composition-api
  8276. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8277. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8278. if (rawBindings) {
  8279. Object.keys(rawBindings).forEach(function (key) {
  8280. ret[key] = vm[key];
  8281. });
  8282. }
  8283. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8284. Object.assign(ret, vm.$mp.data || {});
  8285. if (
  8286. Array.isArray(vm.$options.behaviors) &&
  8287. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8288. ) { //form-field
  8289. ret['name'] = vm.name;
  8290. ret['value'] = vm.value;
  8291. }
  8292. return JSON.parse(JSON.stringify(ret, clearInstance))
  8293. }
  8294. var patch = function(oldVnode, vnode) {
  8295. var this$1 = this;
  8296. if (vnode === null) { //destroy
  8297. return
  8298. }
  8299. if (this.mpType === 'page' || this.mpType === 'component') {
  8300. var mpInstance = this.$scope;
  8301. var data = Object.create(null);
  8302. try {
  8303. data = cloneWithData(this);
  8304. } catch (err) {
  8305. console.error(err);
  8306. }
  8307. data.__webviewId__ = mpInstance.data.__webviewId__;
  8308. var mpData = Object.create(null);
  8309. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8310. mpData[key] = mpInstance.data[key];
  8311. });
  8312. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8313. if (Object.keys(diffData).length) {
  8314. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8315. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8316. ']差量更新',
  8317. JSON.stringify(diffData));
  8318. }
  8319. this.__next_tick_pending = true;
  8320. mpInstance.setData(diffData, function () {
  8321. this$1.__next_tick_pending = false;
  8322. flushCallbacks$1(this$1);
  8323. });
  8324. } else {
  8325. flushCallbacks$1(this);
  8326. }
  8327. }
  8328. };
  8329. /* */
  8330. function createEmptyRender() {
  8331. }
  8332. function mountComponent$1(
  8333. vm,
  8334. el,
  8335. hydrating
  8336. ) {
  8337. if (!vm.mpType) {//main.js 中的 new Vue
  8338. return vm
  8339. }
  8340. if (vm.mpType === 'app') {
  8341. vm.$options.render = createEmptyRender;
  8342. }
  8343. if (!vm.$options.render) {
  8344. vm.$options.render = createEmptyRender;
  8345. if (true) {
  8346. /* istanbul ignore if */
  8347. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8348. vm.$options.el || el) {
  8349. warn(
  8350. 'You are using the runtime-only build of Vue where the template ' +
  8351. 'compiler is not available. Either pre-compile the templates into ' +
  8352. 'render functions, or use the compiler-included build.',
  8353. vm
  8354. );
  8355. } else {
  8356. warn(
  8357. 'Failed to mount component: template or render function not defined.',
  8358. vm
  8359. );
  8360. }
  8361. }
  8362. }
  8363. !vm._$fallback && callHook(vm, 'beforeMount');
  8364. var updateComponent = function () {
  8365. vm._update(vm._render(), hydrating);
  8366. };
  8367. // we set this to vm._watcher inside the watcher's constructor
  8368. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8369. // component's mounted hook), which relies on vm._watcher being already defined
  8370. new Watcher(vm, updateComponent, noop, {
  8371. before: function before() {
  8372. if (vm._isMounted && !vm._isDestroyed) {
  8373. callHook(vm, 'beforeUpdate');
  8374. }
  8375. }
  8376. }, true /* isRenderWatcher */);
  8377. hydrating = false;
  8378. return vm
  8379. }
  8380. /* */
  8381. function renderClass (
  8382. staticClass,
  8383. dynamicClass
  8384. ) {
  8385. if (isDef(staticClass) || isDef(dynamicClass)) {
  8386. return concat(staticClass, stringifyClass(dynamicClass))
  8387. }
  8388. /* istanbul ignore next */
  8389. return ''
  8390. }
  8391. function concat (a, b) {
  8392. return a ? b ? (a + ' ' + b) : a : (b || '')
  8393. }
  8394. function stringifyClass (value) {
  8395. if (Array.isArray(value)) {
  8396. return stringifyArray(value)
  8397. }
  8398. if (isObject(value)) {
  8399. return stringifyObject(value)
  8400. }
  8401. if (typeof value === 'string') {
  8402. return value
  8403. }
  8404. /* istanbul ignore next */
  8405. return ''
  8406. }
  8407. function stringifyArray (value) {
  8408. var res = '';
  8409. var stringified;
  8410. for (var i = 0, l = value.length; i < l; i++) {
  8411. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8412. if (res) { res += ' '; }
  8413. res += stringified;
  8414. }
  8415. }
  8416. return res
  8417. }
  8418. function stringifyObject (value) {
  8419. var res = '';
  8420. for (var key in value) {
  8421. if (value[key]) {
  8422. if (res) { res += ' '; }
  8423. res += key;
  8424. }
  8425. }
  8426. return res
  8427. }
  8428. /* */
  8429. var parseStyleText = cached(function (cssText) {
  8430. var res = {};
  8431. var listDelimiter = /;(?![^(]*\))/g;
  8432. var propertyDelimiter = /:(.+)/;
  8433. cssText.split(listDelimiter).forEach(function (item) {
  8434. if (item) {
  8435. var tmp = item.split(propertyDelimiter);
  8436. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8437. }
  8438. });
  8439. return res
  8440. });
  8441. // normalize possible array / string values into Object
  8442. function normalizeStyleBinding (bindingStyle) {
  8443. if (Array.isArray(bindingStyle)) {
  8444. return toObject(bindingStyle)
  8445. }
  8446. if (typeof bindingStyle === 'string') {
  8447. return parseStyleText(bindingStyle)
  8448. }
  8449. return bindingStyle
  8450. }
  8451. /* */
  8452. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8453. function getTarget(obj, path) {
  8454. var parts = path.split('.');
  8455. var key = parts[0];
  8456. if (key.indexOf('__$n') === 0) { //number index
  8457. key = parseInt(key.replace('__$n', ''));
  8458. }
  8459. if (parts.length === 1) {
  8460. return obj[key]
  8461. }
  8462. return getTarget(obj[key], parts.slice(1).join('.'))
  8463. }
  8464. function internalMixin(Vue) {
  8465. Vue.config.errorHandler = function(err, vm, info) {
  8466. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8467. console.error(err);
  8468. /* eslint-disable no-undef */
  8469. var app = typeof getApp === 'function' && getApp();
  8470. if (app && app.onError) {
  8471. app.onError(err);
  8472. }
  8473. };
  8474. var oldEmit = Vue.prototype.$emit;
  8475. Vue.prototype.$emit = function(event) {
  8476. if (this.$scope && event) {
  8477. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8478. if (triggerEvent) {
  8479. try {
  8480. triggerEvent.call(this.$scope, event, {
  8481. __args__: toArray(arguments, 1)
  8482. });
  8483. } catch (error) {
  8484. }
  8485. }
  8486. }
  8487. return oldEmit.apply(this, arguments)
  8488. };
  8489. Vue.prototype.$nextTick = function(fn) {
  8490. return nextTick$1(this, fn)
  8491. };
  8492. MP_METHODS.forEach(function (method) {
  8493. Vue.prototype[method] = function(args) {
  8494. if (this.$scope && this.$scope[method]) {
  8495. return this.$scope[method](args)
  8496. }
  8497. // mp-alipay
  8498. if (typeof my === 'undefined') {
  8499. return
  8500. }
  8501. if (method === 'createSelectorQuery') {
  8502. /* eslint-disable no-undef */
  8503. return my.createSelectorQuery(args)
  8504. } else if (method === 'createIntersectionObserver') {
  8505. /* eslint-disable no-undef */
  8506. return my.createIntersectionObserver(args)
  8507. }
  8508. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8509. };
  8510. });
  8511. Vue.prototype.__init_provide = initProvide;
  8512. Vue.prototype.__init_injections = initInjections;
  8513. Vue.prototype.__call_hook = function(hook, args) {
  8514. var vm = this;
  8515. // #7573 disable dep collection when invoking lifecycle hooks
  8516. pushTarget();
  8517. var handlers = vm.$options[hook];
  8518. var info = hook + " hook";
  8519. var ret;
  8520. if (handlers) {
  8521. for (var i = 0, j = handlers.length; i < j; i++) {
  8522. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8523. }
  8524. }
  8525. if (vm._hasHookEvent) {
  8526. vm.$emit('hook:' + hook, args);
  8527. }
  8528. popTarget();
  8529. return ret
  8530. };
  8531. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8532. if (Array.isArray(modifiers)) {
  8533. if (modifiers.indexOf('trim') !== -1) {
  8534. value = value.trim();
  8535. }
  8536. if (modifiers.indexOf('number') !== -1) {
  8537. value = this._n(value);
  8538. }
  8539. }
  8540. if (!target) {
  8541. target = this;
  8542. }
  8543. // 解决动态属性添加
  8544. Vue.set(target, key, value);
  8545. };
  8546. Vue.prototype.__set_sync = function(target, key, value) {
  8547. if (!target) {
  8548. target = this;
  8549. }
  8550. // 解决动态属性添加
  8551. Vue.set(target, key, value);
  8552. };
  8553. Vue.prototype.__get_orig = function(item) {
  8554. if (isPlainObject(item)) {
  8555. return item['$orig'] || item
  8556. }
  8557. return item
  8558. };
  8559. Vue.prototype.__get_value = function(dataPath, target) {
  8560. return getTarget(target || this, dataPath)
  8561. };
  8562. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8563. return renderClass(staticClass, dynamicClass)
  8564. };
  8565. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8566. if (!dynamicStyle && !staticStyle) {
  8567. return ''
  8568. }
  8569. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8570. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8571. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8572. };
  8573. Vue.prototype.__map = function(val, iteratee) {
  8574. //TODO 暂不考虑 string
  8575. var ret, i, l, keys, key;
  8576. if (Array.isArray(val)) {
  8577. ret = new Array(val.length);
  8578. for (i = 0, l = val.length; i < l; i++) {
  8579. ret[i] = iteratee(val[i], i);
  8580. }
  8581. return ret
  8582. } else if (isObject(val)) {
  8583. keys = Object.keys(val);
  8584. ret = Object.create(null);
  8585. for (i = 0, l = keys.length; i < l; i++) {
  8586. key = keys[i];
  8587. ret[key] = iteratee(val[key], key, i);
  8588. }
  8589. return ret
  8590. } else if (typeof val === 'number') {
  8591. ret = new Array(val);
  8592. for (i = 0, l = val; i < l; i++) {
  8593. // 第一个参数暂时仍和小程序一致
  8594. ret[i] = iteratee(i, i);
  8595. }
  8596. return ret
  8597. }
  8598. return []
  8599. };
  8600. }
  8601. /* */
  8602. var LIFECYCLE_HOOKS$1 = [
  8603. //App
  8604. 'onLaunch',
  8605. 'onShow',
  8606. 'onHide',
  8607. 'onUniNViewMessage',
  8608. 'onPageNotFound',
  8609. 'onThemeChange',
  8610. 'onError',
  8611. 'onUnhandledRejection',
  8612. //Page
  8613. 'onInit',
  8614. 'onLoad',
  8615. // 'onShow',
  8616. 'onReady',
  8617. // 'onHide',
  8618. 'onUnload',
  8619. 'onPullDownRefresh',
  8620. 'onReachBottom',
  8621. 'onTabItemTap',
  8622. 'onAddToFavorites',
  8623. 'onShareTimeline',
  8624. 'onShareAppMessage',
  8625. 'onResize',
  8626. 'onPageScroll',
  8627. 'onNavigationBarButtonTap',
  8628. 'onBackPress',
  8629. 'onNavigationBarSearchInputChanged',
  8630. 'onNavigationBarSearchInputConfirmed',
  8631. 'onNavigationBarSearchInputClicked',
  8632. 'onUploadDouyinVideo',
  8633. 'onNFCReadMessage',
  8634. //Component
  8635. // 'onReady', // 兼容旧版本,应该移除该事件
  8636. 'onPageShow',
  8637. 'onPageHide',
  8638. 'onPageResize'
  8639. ];
  8640. function lifecycleMixin$1(Vue) {
  8641. //fixed vue-class-component
  8642. var oldExtend = Vue.extend;
  8643. Vue.extend = function(extendOptions) {
  8644. extendOptions = extendOptions || {};
  8645. var methods = extendOptions.methods;
  8646. if (methods) {
  8647. Object.keys(methods).forEach(function (methodName) {
  8648. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8649. extendOptions[methodName] = methods[methodName];
  8650. delete methods[methodName];
  8651. }
  8652. });
  8653. }
  8654. return oldExtend.call(this, extendOptions)
  8655. };
  8656. var strategies = Vue.config.optionMergeStrategies;
  8657. var mergeHook = strategies.created;
  8658. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8659. strategies[hook] = mergeHook;
  8660. });
  8661. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8662. }
  8663. /* */
  8664. // install platform patch function
  8665. Vue.prototype.__patch__ = patch;
  8666. // public mount method
  8667. Vue.prototype.$mount = function(
  8668. el ,
  8669. hydrating
  8670. ) {
  8671. return mountComponent$1(this, el, hydrating)
  8672. };
  8673. lifecycleMixin$1(Vue);
  8674. internalMixin(Vue);
  8675. /* */
  8676. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8677. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8678. /***/ }),
  8679. /***/ 26:
  8680. /*!*********************************************!*\
  8681. !*** E:/Desktop/zd_wechatApp(1)/pages.json ***!
  8682. \*********************************************/
  8683. /*! no static exports found */
  8684. /***/ (function(module, exports) {
  8685. /***/ }),
  8686. /***/ 3:
  8687. /*!***********************************!*\
  8688. !*** (webpack)/buildin/global.js ***!
  8689. \***********************************/
  8690. /*! no static exports found */
  8691. /***/ (function(module, exports) {
  8692. var g;
  8693. // This works in non-strict mode
  8694. g = (function() {
  8695. return this;
  8696. })();
  8697. try {
  8698. // This works if eval is allowed (see CSP)
  8699. g = g || new Function("return this")();
  8700. } catch (e) {
  8701. // This works if the window reference is available
  8702. if (typeof window === "object") g = window;
  8703. }
  8704. // g can still be undefined, but nothing to do about it...
  8705. // We return undefined, instead of nothing here, so it's
  8706. // easier to handle this case. if(!global) { ...}
  8707. module.exports = g;
  8708. /***/ }),
  8709. /***/ 32:
  8710. /*!**********************************************************************************************************!*\
  8711. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  8712. \**********************************************************************************************************/
  8713. /*! exports provided: default */
  8714. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8715. "use strict";
  8716. __webpack_require__.r(__webpack_exports__);
  8717. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  8718. /* globals __VUE_SSR_CONTEXT__ */
  8719. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  8720. // This module is a runtime utility for cleaner component module output and will
  8721. // be included in the final webpack user bundle.
  8722. function normalizeComponent (
  8723. scriptExports,
  8724. render,
  8725. staticRenderFns,
  8726. functionalTemplate,
  8727. injectStyles,
  8728. scopeId,
  8729. moduleIdentifier, /* server only */
  8730. shadowMode, /* vue-cli only */
  8731. components, // fixed by xxxxxx auto components
  8732. renderjs // fixed by xxxxxx renderjs
  8733. ) {
  8734. // Vue.extend constructor export interop
  8735. var options = typeof scriptExports === 'function'
  8736. ? scriptExports.options
  8737. : scriptExports
  8738. // fixed by xxxxxx auto components
  8739. if (components) {
  8740. if (!options.components) {
  8741. options.components = {}
  8742. }
  8743. var hasOwn = Object.prototype.hasOwnProperty
  8744. for (var name in components) {
  8745. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  8746. options.components[name] = components[name]
  8747. }
  8748. }
  8749. }
  8750. // fixed by xxxxxx renderjs
  8751. if (renderjs) {
  8752. if(typeof renderjs.beforeCreate === 'function'){
  8753. renderjs.beforeCreate = [renderjs.beforeCreate]
  8754. }
  8755. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  8756. this[renderjs.__module] = this
  8757. });
  8758. (options.mixins || (options.mixins = [])).push(renderjs)
  8759. }
  8760. // render functions
  8761. if (render) {
  8762. options.render = render
  8763. options.staticRenderFns = staticRenderFns
  8764. options._compiled = true
  8765. }
  8766. // functional template
  8767. if (functionalTemplate) {
  8768. options.functional = true
  8769. }
  8770. // scopedId
  8771. if (scopeId) {
  8772. options._scopeId = 'data-v-' + scopeId
  8773. }
  8774. var hook
  8775. if (moduleIdentifier) { // server build
  8776. hook = function (context) {
  8777. // 2.3 injection
  8778. context =
  8779. context || // cached call
  8780. (this.$vnode && this.$vnode.ssrContext) || // stateful
  8781. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  8782. // 2.2 with runInNewContext: true
  8783. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  8784. context = __VUE_SSR_CONTEXT__
  8785. }
  8786. // inject component styles
  8787. if (injectStyles) {
  8788. injectStyles.call(this, context)
  8789. }
  8790. // register component module identifier for async chunk inferrence
  8791. if (context && context._registeredComponents) {
  8792. context._registeredComponents.add(moduleIdentifier)
  8793. }
  8794. }
  8795. // used by ssr in case component is cached and beforeCreate
  8796. // never gets called
  8797. options._ssrRegister = hook
  8798. } else if (injectStyles) {
  8799. hook = shadowMode
  8800. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  8801. : injectStyles
  8802. }
  8803. if (hook) {
  8804. if (options.functional) {
  8805. // for template-only hot-reload because in that case the render fn doesn't
  8806. // go through the normalizer
  8807. options._injectStyles = hook
  8808. // register for functioal component in vue file
  8809. var originalRender = options.render
  8810. options.render = function renderWithStyleInjection (h, context) {
  8811. hook.call(context)
  8812. return originalRender(h, context)
  8813. }
  8814. } else {
  8815. // inject component registration as beforeCreate hook
  8816. var existing = options.beforeCreate
  8817. options.beforeCreate = existing
  8818. ? [].concat(existing, hook)
  8819. : [hook]
  8820. }
  8821. }
  8822. return {
  8823. exports: scriptExports,
  8824. options: options
  8825. }
  8826. }
  8827. /***/ }),
  8828. /***/ 33:
  8829. /*!***********************************************!*\
  8830. !*** E:/Desktop/zd_wechatApp(1)/api/index.js ***!
  8831. \***********************************************/
  8832. /*! no static exports found */
  8833. /***/ (function(module, exports, __webpack_require__) {
  8834. "use strict";
  8835. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8836. Object.defineProperty(exports, "__esModule", {
  8837. value: true
  8838. });
  8839. exports.default = void 0;
  8840. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  8841. var _common = _interopRequireDefault(__webpack_require__(/*! ./common.js */ 34));
  8842. var _login = _interopRequireDefault(__webpack_require__(/*! ./login.js */ 37));
  8843. 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; }
  8844. 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; }
  8845. var service = _objectSpread(_objectSpread({}, _common.default), _login.default);
  8846. var _default = service;
  8847. exports.default = _default;
  8848. /***/ }),
  8849. /***/ 34:
  8850. /*!************************************************!*\
  8851. !*** E:/Desktop/zd_wechatApp(1)/api/common.js ***!
  8852. \************************************************/
  8853. /*! no static exports found */
  8854. /***/ (function(module, exports, __webpack_require__) {
  8855. "use strict";
  8856. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8857. Object.defineProperty(exports, "__esModule", {
  8858. value: true
  8859. });
  8860. exports.default = void 0;
  8861. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  8862. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  8863. var _getDistrict$getUnit$;
  8864. var _default = (_getDistrict$getUnit$ = {
  8865. //选择行政区
  8866. getDistrict: function getDistrict(data) {
  8867. return _request.default.requestFn("/system/dict/data/type/district", data);
  8868. },
  8869. // //选择小区
  8870. // getArea(data) {
  8871. // return utils.requestEn(`/mobile/area/getArea`, data)
  8872. // },
  8873. //选择单元
  8874. getUnit: function getUnit(data) {
  8875. return _request.default.requestEn("/mobile/unit/getUnit", data);
  8876. },
  8877. //选择楼宇
  8878. getBuilding: function getBuilding(data) {
  8879. return _request.default.requestEn("/mobile/building/getBuilding", data);
  8880. },
  8881. //选择房屋(门牌)
  8882. getHouse: function getHouse(data) {
  8883. return _request.default.requestEn("/mobile/house/getHouse", data);
  8884. },
  8885. //公告列表
  8886. getNoticeList: function getNoticeList(data) {
  8887. return _request.default.requestEn("/mobile/notice/getNotice", data);
  8888. },
  8889. //关于我们
  8890. getAboutUs: function getAboutUs(data) {
  8891. return _request.default.requestEn("/mobile/aboutUs/getOne", data);
  8892. },
  8893. //服务说明
  8894. getExplain: function getExplain(data) {
  8895. return _request.default.requestEn("/mobile/explain/getOne", data);
  8896. },
  8897. //上门类型
  8898. getDic: function getDic(data) {
  8899. return _request.default.requestEn("/mobile/order/getDic", data);
  8900. },
  8901. //管子类别
  8902. getPipeType: function getPipeType(data) {
  8903. return _request.default.requestEn("/mobile/pipeType/getPipeType", data);
  8904. },
  8905. //管子长度
  8906. getPipeLength: function getPipeLength(data) {
  8907. return _request.default.requestEn("/mobile/pipeLength/getPipeLength", data);
  8908. },
  8909. //历史施工
  8910. getListAll: function getListAll(data) {
  8911. return _request.default.requestFn("/mobile/order/getListAll", data);
  8912. },
  8913. //历史施工(查看详情页)
  8914. getOrderPhoto: function getOrderPhoto(data) {
  8915. return _request.default.requestEn("/mobile/orderPhoto/getPhoto", data);
  8916. },
  8917. //提交数据
  8918. submitOrder: function submitOrder(data) {
  8919. return _request.default.requestFn("/mobile/order", data, 'POST');
  8920. },
  8921. //工程列表
  8922. getEngineList: function getEngineList(data) {
  8923. return _request.default.requestEn("/mobile/otherEngine/getList", data);
  8924. },
  8925. //查看非市政项目
  8926. getEngineDetail: function getEngineDetail(data) {
  8927. return _request.default.requestEn("/mobile/otherEngine/getById", data);
  8928. },
  8929. //查看非市政项目页 确认上传照片
  8930. updateEnginePhoto: function updateEnginePhoto(data) {
  8931. return _request.default.requestFn("/mobile/otherEngine", data, 'PUT');
  8932. },
  8933. //门牌验证
  8934. // getOrderForStatus(data){
  8935. // return utils.requestEn(`/mobile/order/getOrderForStatus`, data)
  8936. // },
  8937. //首页轮播图
  8938. getLunBo: function getLunBo(data) {
  8939. return _request.default.requestEn("/mobile/rotation/list", data);
  8940. },
  8941. //获取项目类型
  8942. getProjectType: function getProjectType(data) {
  8943. return _request.default.requestEn("/mobile/order/getDic", data);
  8944. },
  8945. //获取项目列表
  8946. getProjectList: function getProjectList(data) {
  8947. return _request.default.requestEn("/mobile/otherEngine/getList", data);
  8948. },
  8949. //自闭阀类型
  8950. getProject: function getProject(data) {
  8951. return _request.default.requestEn("/mobile/valve/getValveType", data);
  8952. },
  8953. //上传照片
  8954. getImage: function getImage(data) {
  8955. return _request.default.requestFn("/obs", data, 'POST');
  8956. },
  8957. //获取用户名
  8958. getUserName: function getUserName(data) {
  8959. return _request.default.requestFn("/mobile/user/getName", data);
  8960. },
  8961. //工程列表
  8962. getList: function getList(data) {
  8963. return _request.default.requestEn("/mobile/order/getList", data);
  8964. },
  8965. //小区合格率
  8966. getExamineArea: function getExamineArea(data) {
  8967. return _request.default.requestEn("/mobile/area/getExamineArea", data);
  8968. },
  8969. //列表
  8970. getOtherList: function getOtherList(data) {
  8971. return _request.default.requestEn("/mobile/order/getOtherList", data);
  8972. },
  8973. //职工合格率
  8974. getExamineWorker: function getExamineWorker(data) {
  8975. return _request.default.requestEn("/mobile/area/getExamineWorker", data);
  8976. },
  8977. //小区服务统计
  8978. getExamineServe: function getExamineServe(data) {
  8979. return _request.default.requestEn("/mobile/area/getExamineServe", data);
  8980. },
  8981. //管材类别统计
  8982. getExaminePipeType: function getExaminePipeType(data) {
  8983. return _request.default.requestEn("/mobile/area/getExaminePipeType", data);
  8984. },
  8985. //管材长度统计
  8986. getExaminePipeLength: function getExaminePipeLength(data) {
  8987. return _request.default.requestEn("/mobile/area/getExaminePipeLength", data);
  8988. },
  8989. //自闭阀类别统计
  8990. getExamineValveType: function getExamineValveType(data) {
  8991. return _request.default.requestEn("/mobile/area/getExamineValveType", data);
  8992. },
  8993. //小区汇总统计
  8994. getAreaSum: function getAreaSum(data) {
  8995. return _request.default.requestEn("/mobile/area/getAreaSum", data);
  8996. },
  8997. //获取职工
  8998. getWorker: function getWorker(data) {
  8999. return _request.default.requestEn("/mobile/area/getWorker", data);
  9000. },
  9001. getById: function getById(data) {
  9002. return _request.default.requestEn("/mobile/order/getById", data);
  9003. },
  9004. getOrderList: function getOrderList(data) {
  9005. return _request.default.requestEn("/mobile/order/getList", data);
  9006. },
  9007. //修改
  9008. getUpdateOrder: function getUpdateOrder(data) {
  9009. return _request.default.requestFn("/mobile/order", data, 'PUT');
  9010. },
  9011. //选择门牌(安检,工程管理页)
  9012. getAllHouse: function getAllHouse(data) {
  9013. return _request.default.requestEn("/mobile/house/getAllHouse", data);
  9014. },
  9015. //选择门牌(安检,工程管理页)
  9016. getDictInfo: function getDictInfo(data) {
  9017. return _request.default.requestEn("/mobile/sysInfo/dict", data);
  9018. },
  9019. //选择门牌(安检,工程管理页)
  9020. getUnitList: function getUnitList(data) {
  9021. return _request.default.requestEn("/mobile/unit/getUnit", data);
  9022. },
  9023. getBuildingList: function getBuildingList(data) {
  9024. return _request.default.requestEn("/mobile/building/getBuilding", data);
  9025. },
  9026. getArea: function getArea(data) {
  9027. return _request.default.requestEn("/mobile/area/getArea", data);
  9028. },
  9029. getDictInfoList: function getDictInfoList(data) {
  9030. return _request.default.requestEn("/mobile/sysInfo/dictlist", data, 'POST');
  9031. },
  9032. setregulatorBox: function setregulatorBox(data) {
  9033. return _request.default.requestEn("/mobile/regulatorBox", data, 'POST');
  9034. },
  9035. setwarningPile: function setwarningPile(data) {
  9036. return _request.default.requestEn("/mobile/warningPile", data, 'Put');
  9037. },
  9038. getwarningPileList: function getwarningPileList(data) {
  9039. return _request.default.requestEn("/mobile/warningPile/getList", data);
  9040. },
  9041. getwarningPileInfo: function getwarningPileInfo(data) {
  9042. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9043. },
  9044. setcourtyardNetworkManagement: function setcourtyardNetworkManagement(data) {
  9045. return _request.default.requestEn("/mobile/courtyardNetworkManagement", data, 'POST');
  9046. },
  9047. setemergencyRepair: function setemergencyRepair(data) {
  9048. return _request.default.requestEn("/mobile/emergencyRepair", data, 'POST');
  9049. },
  9050. getOne: function getOne() {
  9051. return _request.default.requestEn("/mobile/explain/getOne");
  9052. }
  9053. }, (0, _defineProperty2.default)(_getDistrict$getUnit$, "getWorker", function getWorker() {
  9054. return _request.default.requestEn("/mobile/user/getWorker");
  9055. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getSearch", function getSearch(data) {
  9056. return _request.default.requestEn("/mobile/sysInfo/search", data);
  9057. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getcourtyardNetworkManagement", function getcourtyardNetworkManagement(data) {
  9058. return _request.default.requestEn("/mobile/courtyardNetworkManagement/".concat(data));
  9059. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getemergencyRepair", function getemergencyRepair(data) {
  9060. return _request.default.requestEn("/mobile/emergencyRepair/".concat(data));
  9061. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getregulatorBox", function getregulatorBox(data) {
  9062. return _request.default.requestEn("/mobile/regulatorBox/".concat(data));
  9063. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getwarningPile", function getwarningPile(data) {
  9064. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9065. }), _getDistrict$getUnit$);
  9066. exports.default = _default;
  9067. /***/ }),
  9068. /***/ 35:
  9069. /*!****************************************************!*\
  9070. !*** E:/Desktop/zd_wechatApp(1)/common/request.js ***!
  9071. \****************************************************/
  9072. /*! no static exports found */
  9073. /***/ (function(module, exports, __webpack_require__) {
  9074. "use strict";
  9075. /* WEBPACK VAR INJECTION */(function(uni) {
  9076. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9077. Object.defineProperty(exports, "__esModule", {
  9078. value: true
  9079. });
  9080. exports.default = void 0;
  9081. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 36));
  9082. var _default = {
  9083. // 请求方法
  9084. requestEn: function requestEn(url) {
  9085. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9086. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9087. return new Promise(function (resolve, reject) {
  9088. // console.log(http.webUrl + url +'---'+ uni.getStorageSync('token'))
  9089. uni.request({
  9090. url: _http.default.webUrl + url,
  9091. method: methods ? methods : 'GET',
  9092. data: data,
  9093. success: function success(res) {
  9094. if (res.data.code === 200) {
  9095. resolve(res.data.data === undefined ? null : res.data.data);
  9096. } else if (res.data.code === 403 || res.data.code === 401) {
  9097. uni.showToast({
  9098. title: 'Token超时,请重新登录',
  9099. icon: 'none'
  9100. });
  9101. if (uni.getStorageSync('token')) {
  9102. uni.removeStorage({
  9103. key: 'token',
  9104. success: function success() {
  9105. uni.navigateTo({
  9106. url: '/pages/login/login'
  9107. });
  9108. }
  9109. });
  9110. } else {
  9111. uni.navigateTo({
  9112. url: '/pages/login/login'
  9113. });
  9114. }
  9115. } else {
  9116. uni.showToast({
  9117. title: res.data.msg ? res.data.msg : '系统异常',
  9118. icon: 'none'
  9119. });
  9120. }
  9121. },
  9122. fail: function fail() {
  9123. uni.showToast({
  9124. title: '网络异常',
  9125. icon: 'none'
  9126. });
  9127. }
  9128. });
  9129. });
  9130. },
  9131. // 请求方法
  9132. requestFn: function requestFn(url) {
  9133. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9134. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9135. return new Promise(function (resolve, reject) {
  9136. console.log(_http.default.webUrl + url + '---' + uni.getStorageSync('token'));
  9137. uni.request({
  9138. url: _http.default.webUrl + url,
  9139. method: methods ? methods : 'GET',
  9140. data: data,
  9141. header: {
  9142. "MAuthorization": "wxBearer ".concat(uni.getStorageSync('token') ? uni.getStorageSync('token') : ''),
  9143. "userType": 'MOdBILE'
  9144. },
  9145. success: function success(res) {
  9146. console.log(res);
  9147. if (res.data.code === 200) {
  9148. resolve(res.data.data === undefined ? null : res.data.data);
  9149. } else if (res.data.code === 403 || res.data.code === 401) {
  9150. uni.showToast({
  9151. title: 'Token超时,请重新登录',
  9152. icon: 'none'
  9153. });
  9154. if (uni.getStorageSync('token')) {
  9155. uni.removeStorage({
  9156. key: 'token',
  9157. success: function success() {
  9158. uni.navigateTo({
  9159. url: '/pages/login/login'
  9160. });
  9161. }
  9162. });
  9163. } else {
  9164. uni.navigateTo({
  9165. url: '/pages/login/login'
  9166. });
  9167. }
  9168. } else {
  9169. uni.showToast({
  9170. title: res.data.msg ? res.data.msg : '系统异常',
  9171. icon: 'none'
  9172. });
  9173. }
  9174. },
  9175. fail: function fail() {
  9176. uni.showToast({
  9177. title: '网络异常',
  9178. icon: 'none'
  9179. });
  9180. }
  9181. });
  9182. });
  9183. },
  9184. requestLo: function requestLo(url) {
  9185. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9186. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9187. return new Promise(function (resolve, reject) {
  9188. console.log(_http.default.webUrl + url);
  9189. uni.request({
  9190. url: _http.default.webUrl + url,
  9191. method: methods ? methods : 'GET',
  9192. data: data,
  9193. header: {
  9194. "userType": 'MOBILE'
  9195. },
  9196. success: function success(res) {
  9197. console.log(res);
  9198. if (res.data.code === 200) {
  9199. resolve(res.data === undefined ? null : res.data);
  9200. } else if (res.data.code === 403) {
  9201. uni.showToast({
  9202. title: res.data.msg ? res.data.msg : 'Token超时,请重新登录',
  9203. icon: 'none'
  9204. });
  9205. if (uni.getStorageSync('token')) {
  9206. uni.removeStorage({
  9207. key: 'token',
  9208. success: function success() {
  9209. uni.navigateTo({
  9210. url: '/pages/login/login'
  9211. });
  9212. }
  9213. });
  9214. } else {
  9215. uni.navigateTo({
  9216. url: '/pages/login/login'
  9217. });
  9218. }
  9219. } else {
  9220. uni.showToast({
  9221. title: res.data.msg ? res.data.msg : '系统异常',
  9222. icon: 'none'
  9223. });
  9224. }
  9225. },
  9226. fail: function fail() {
  9227. uni.showToast({
  9228. title: '网络异常',
  9229. icon: 'none'
  9230. });
  9231. }
  9232. });
  9233. });
  9234. }
  9235. };
  9236. exports.default = _default;
  9237. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9238. /***/ }),
  9239. /***/ 358:
  9240. /*!****************************************************************!*\
  9241. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/emitter.js ***!
  9242. \****************************************************************/
  9243. /*! no static exports found */
  9244. /***/ (function(module, exports, __webpack_require__) {
  9245. "use strict";
  9246. Object.defineProperty(exports, "__esModule", {
  9247. value: true
  9248. });
  9249. exports.default = void 0;
  9250. /**
  9251. * 递归使用 call 方式this指向
  9252. * @param componentName // 需要找的组件的名称
  9253. * @param eventName // 事件名称
  9254. * @param params // 需要传递的参数
  9255. */
  9256. function _broadcast(componentName, eventName, params) {
  9257. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  9258. this.$children.map(function (child) {
  9259. if (componentName === child.$options.name) {
  9260. child.$emit.apply(child, [eventName].concat(params));
  9261. } else {
  9262. _broadcast.apply(child, [componentName, eventName].concat(params));
  9263. }
  9264. });
  9265. }
  9266. var _default = {
  9267. methods: {
  9268. /**
  9269. * 派发 (向上查找) (一个)
  9270. * @param componentName // 需要找的组件的名称
  9271. * @param eventName // 事件名称
  9272. * @param params // 需要传递的参数
  9273. */
  9274. dispatch: function dispatch(componentName, eventName, params) {
  9275. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  9276. var name = parent.$options.name; // 获取当前组件实例的name
  9277. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  9278. // 循环出当前名称的一样的组件实例
  9279. while (parent && (!name || name !== componentName)) {
  9280. parent = parent.$parent;
  9281. if (parent) {
  9282. name = parent.$options.name;
  9283. }
  9284. }
  9285. // 有节点表示当前找到了name一样的实例
  9286. if (parent) {
  9287. parent.$emit.apply(parent, [eventName].concat(params));
  9288. }
  9289. },
  9290. /**
  9291. * 广播 (向下查找) (广播多个)
  9292. * @param componentName // 需要找的组件的名称
  9293. * @param eventName // 事件名称
  9294. * @param params // 需要传递的参数
  9295. */
  9296. broadcast: function broadcast(componentName, eventName, params) {
  9297. _broadcast.call(this, componentName, eventName, params);
  9298. }
  9299. }
  9300. };
  9301. exports.default = _default;
  9302. /***/ }),
  9303. /***/ 36:
  9304. /*!*************************************************!*\
  9305. !*** E:/Desktop/zd_wechatApp(1)/common/http.js ***!
  9306. \*************************************************/
  9307. /*! no static exports found */
  9308. /***/ (function(module, exports, __webpack_require__) {
  9309. "use strict";
  9310. Object.defineProperty(exports, "__esModule", {
  9311. value: true
  9312. });
  9313. exports.default = void 0;
  9314. // 配置信息
  9315. var _default = {
  9316. // webUrl: 'http://127.0.0.1:8080',
  9317. //webUrl: 'https://cczdsz.com/prod-api/',
  9318. webUrl: 'http://124.221.101.24:8082'
  9319. //webUrl: 'http://192.168.4.20:8081',
  9320. };
  9321. exports.default = _default;
  9322. /***/ }),
  9323. /***/ 37:
  9324. /*!***********************************************!*\
  9325. !*** E:/Desktop/zd_wechatApp(1)/api/login.js ***!
  9326. \***********************************************/
  9327. /*! no static exports found */
  9328. /***/ (function(module, exports, __webpack_require__) {
  9329. "use strict";
  9330. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9331. Object.defineProperty(exports, "__esModule", {
  9332. value: true
  9333. });
  9334. exports.default = void 0;
  9335. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  9336. var _default = {
  9337. // 登录
  9338. login: function login(data) {
  9339. return _request.default.requestEn('/mobile/user', data, 'POST');
  9340. }
  9341. };
  9342. exports.default = _default;
  9343. /***/ }),
  9344. /***/ 38:
  9345. /*!**************************************************!*\
  9346. !*** E:/Desktop/zd_wechatApp(1)/common/utils.js ***!
  9347. \**************************************************/
  9348. /*! no static exports found */
  9349. /***/ (function(module, exports, __webpack_require__) {
  9350. "use strict";
  9351. /* WEBPACK VAR INJECTION */(function(uni) {
  9352. Object.defineProperty(exports, "__esModule", {
  9353. value: true
  9354. });
  9355. exports.default = void 0;
  9356. var _default = {
  9357. // 页面提示信息函数
  9358. showPrompt: function showPrompt(msg) {
  9359. uni.showToast({
  9360. title: msg,
  9361. icon: 'none',
  9362. mask: true
  9363. });
  9364. },
  9365. // APP名称
  9366. appName: function appName() {
  9367. return "贞达市政工程";
  9368. },
  9369. formatRichText: function formatRichText(html) {
  9370. var newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
  9371. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  9372. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  9373. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  9374. return match;
  9375. });
  9376. newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
  9377. match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
  9378. return match;
  9379. });
  9380. newContent = newContent.replace(/<br[^>]*\/>/gi, '');
  9381. newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
  9382. return newContent;
  9383. },
  9384. getHeight: function getHeight(e) {
  9385. console.log(e);
  9386. },
  9387. changeTwoDecimal_f: function changeTwoDecimal_f(x) {
  9388. var f_x = parseFloat(x);
  9389. if (isNaN(f_x)) {
  9390. return 0;
  9391. }
  9392. var f_x = Math.round(x * 100) / 100;
  9393. var s_x = f_x.toString();
  9394. var pos_decimal = s_x.indexOf('.');
  9395. if (pos_decimal < 0) {
  9396. pos_decimal = s_x.length;
  9397. s_x += '.';
  9398. }
  9399. while (s_x.length <= pos_decimal + 2) {
  9400. s_x += '0';
  9401. }
  9402. return s_x;
  9403. },
  9404. // token过期
  9405. tokenOverdue: function tokenOverdue() {
  9406. uni.setStorage({
  9407. key: "jumpUrl",
  9408. data: ''
  9409. });
  9410. uni.setStorage({
  9411. key: "jumpType",
  9412. data: ''
  9413. });
  9414. uni.navigateTo({
  9415. url: "/pages/login/login"
  9416. });
  9417. },
  9418. checkLoginTo: function checkLoginTo(url, type) {
  9419. console.log(type);
  9420. var status = uni.getStorageSync('token');
  9421. console.log(status);
  9422. if (status) {
  9423. uni.navigateTo({
  9424. url: url
  9425. });
  9426. } else {
  9427. uni.showModal({
  9428. title: '',
  9429. content: '您未登录,是否登录?',
  9430. success: function success(res) {
  9431. if (res.confirm) {
  9432. uni.setStorage({
  9433. key: "jumpUrl",
  9434. data: url
  9435. });
  9436. uni.setStorage({
  9437. key: "jumpType",
  9438. data: type
  9439. });
  9440. uni.navigateTo({
  9441. url: "/pages/login/login"
  9442. });
  9443. }
  9444. }
  9445. });
  9446. }
  9447. },
  9448. // 拨打电话
  9449. toCall: function toCall(tel) {
  9450. if (!tel) {
  9451. this.showPrompt('暂无商家电话');
  9452. return;
  9453. }
  9454. uni.makePhoneCall({
  9455. phoneNumber: tel
  9456. });
  9457. },
  9458. toBack: function toBack() {
  9459. uni.navigateBack({
  9460. delta: 1
  9461. });
  9462. },
  9463. // 图片预览
  9464. previewImage: function previewImage(url) {
  9465. var urlList = [];
  9466. if (typeof url == 'string') {
  9467. urlList.push(url);
  9468. } else {
  9469. urlList = url;
  9470. }
  9471. uni.previewImage({
  9472. urls: urlList
  9473. });
  9474. },
  9475. // 登录成功后的跳转
  9476. loginSuccess: function loginSuccess() {
  9477. var type = uni.getStorageSync('jumpType');
  9478. // console.log(type)
  9479. if (type) {
  9480. var url = uni.getStorageSync('jumpUrl');
  9481. // console.log(url)
  9482. if (!url) {
  9483. uni.navigateBack({
  9484. delta: 1
  9485. });
  9486. return;
  9487. }
  9488. if (type == 'page') {
  9489. uni.redirectTo({
  9490. url: url
  9491. });
  9492. } else {
  9493. uni.switchTab({
  9494. url: url,
  9495. fail: function fail(error) {
  9496. console.log(error);
  9497. }
  9498. });
  9499. }
  9500. } else {
  9501. // uni.switchTab({
  9502. // url: "/pages/index/index"
  9503. // })
  9504. uni.navigateBack({
  9505. delta: 1
  9506. });
  9507. }
  9508. },
  9509. parseNumber: function parseNumber(num) {
  9510. return num < 10 ? "0" + num : num;
  9511. },
  9512. // 时间格式化基类
  9513. dateFormat: function dateFormat(date, formatStr) {
  9514. var dateObj = {},
  9515. rStr = /\{([^}]+)\}/,
  9516. mons = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
  9517. dateObj["Y"] = date.getFullYear();
  9518. dateObj["M"] = date.getMonth() + 1;
  9519. dateObj["MM"] = this.parseNumber(dateObj["M"]);
  9520. dateObj["Mon"] = mons[dateObj['M'] - 1];
  9521. dateObj["D"] = date.getDate();
  9522. dateObj["DD"] = this.parseNumber(dateObj["D"]);
  9523. dateObj["h"] = date.getHours();
  9524. dateObj["hh"] = this.parseNumber(dateObj["h"]);
  9525. // dateObj["t"] = dateObj["h"] > 12 ? dateObj["h"] - 12 : dateObj["h"];
  9526. dateObj["t"] = dateObj["h"];
  9527. dateObj["tt"] = this.parseNumber(dateObj["t"]);
  9528. // dateObj["A"] = dateObj["h"] > 12 ? '下午' : '上午';
  9529. dateObj["i"] = date.getMinutes();
  9530. dateObj["ii"] = this.parseNumber(dateObj["i"]);
  9531. dateObj["s"] = date.getSeconds();
  9532. dateObj["ss"] = this.parseNumber(dateObj["s"]);
  9533. while (rStr.test(formatStr)) {
  9534. formatStr = formatStr.replace(rStr, dateObj[RegExp.$1]);
  9535. }
  9536. return formatStr;
  9537. },
  9538. // 时间格式 年月日时分秒
  9539. gettime: function gettime(shorttime, type) {
  9540. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9541. var now = new Date().getTime();
  9542. var cha = (now - parseInt(shorttime)) / 1000;
  9543. // type: 格式化类型 1为年月日时分秒 2为年月日时分 3为年月日
  9544. if (type == 1) {
  9545. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}:{ss}");
  9546. } else if (type == 2) {
  9547. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}");
  9548. } else if (type == 3) {
  9549. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9550. }
  9551. },
  9552. // 时间格式 年月日
  9553. getDate: function getDate(shorttime) {
  9554. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9555. var now = new Date().getTime();
  9556. var cha = (now - parseInt(shorttime)) / 1000;
  9557. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9558. },
  9559. // 时间格式 月日
  9560. getDateMd: function getDateMd(shorttime) {
  9561. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9562. var now = new Date().getTime();
  9563. var cha = (now - parseInt(shorttime)) / 1000;
  9564. return this.dateFormat(new Date(shorttime), "{MM}-{DD}");
  9565. },
  9566. getSevenDate: function getSevenDate(num) {
  9567. var date1 = new Date();
  9568. //今天时间
  9569. var time1 = (date1.getMonth() + 1 < 10 ? '0' + (date1.getMonth() + 1).toString() : date1.getMonth() + 1) + "-" + (date1.getDate() < 10 ? '0' + date1.getDate().toString() : date1.getDate());
  9570. var date2 = new Date(date1);
  9571. date2.setDate(date1.getDate() + num);
  9572. //num是正数表示之后的时间,num负数表示之前的时间,0表示今天
  9573. var time2 = date2.getMonth() + 1 + "-" + date2.getDate();
  9574. return this.getdiffdate(time1, time2, num);
  9575. },
  9576. //获取两日期之间日期列表函数
  9577. getdiffdate: function getdiffdate(stime, etime, num) {
  9578. //初始化日期列表,数组
  9579. var diffdate = new Array();
  9580. var i = 0;
  9581. //开始日期小于等于结束日期,并循环
  9582. while (i <= num - 1) {
  9583. diffdate.push({
  9584. dateStr: stime,
  9585. weekStr: this.getWeek(new Date().getFullYear().toString() + "-" + stime)
  9586. });
  9587. //获取开始日期时间戳
  9588. var stime_ts = new Date(stime).getTime();
  9589. // console.log('当前日期:'+stime +'当前时间戳:'+stime_ts)
  9590. //增加一天时间戳后的日期
  9591. var next_date = stime_ts + 24 * 60 * 60 * 1000;
  9592. //拼接年月日,这里的月份会返回(0-11),所以要+1
  9593. var next_dates_y = new Date(next_date).getFullYear() + '-';
  9594. var next_dates_m = new Date(next_date).getMonth() + 1 < 10 ? '0' + (new Date(next_date).getMonth() + 1) + '-' : new Date(next_date).getMonth() + 1 + '-';
  9595. var next_dates_d = new Date(next_date).getDate() < 10 ? '0' + new Date(next_date).getDate() : new Date(next_date).getDate();
  9596. stime = next_dates_m + next_dates_d;
  9597. // 增加数组key
  9598. i++;
  9599. }
  9600. return diffdate;
  9601. },
  9602. // 根据日期转换星期
  9603. getWeek: function getWeek(dateString) {
  9604. var dateArray = dateString.split("-");
  9605. var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
  9606. return "周" + "日一二三四五六".charAt(date.getDay());
  9607. },
  9608. // 获取当前位置
  9609. getNowAddress: function getNowAddress() {
  9610. console.log(222);
  9611. return new Promise(function (resolve, reject) {
  9612. var mapkey = '';
  9613. mapkey = 'c827c04d1d74d8589ec826fce02a135a';
  9614. console.log(mapkey);
  9615. var amapPlugin = new amap.AMapWX({
  9616. key: mapkey
  9617. });
  9618. amapPlugin.getRegeo({
  9619. success: function success(res) {
  9620. resolve(res[0]);
  9621. },
  9622. fail: function fail(error) {
  9623. console.log(error);
  9624. uni.showToast({
  9625. mask: true,
  9626. icon: "none",
  9627. title: error
  9628. });
  9629. }
  9630. });
  9631. });
  9632. }
  9633. };
  9634. exports.default = _default;
  9635. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9636. /***/ }),
  9637. /***/ 387:
  9638. /*!************************************************************************!*\
  9639. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/async-validator.js ***!
  9640. \************************************************************************/
  9641. /*! no static exports found */
  9642. /***/ (function(module, exports, __webpack_require__) {
  9643. "use strict";
  9644. /* WEBPACK VAR INJECTION */(function(process) {
  9645. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9646. Object.defineProperty(exports, "__esModule", {
  9647. value: true
  9648. });
  9649. exports.default = void 0;
  9650. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9651. function _extends() {
  9652. _extends = Object.assign || function (target) {
  9653. for (var i = 1; i < arguments.length; i++) {
  9654. var source = arguments[i];
  9655. for (var key in source) {
  9656. if (Object.prototype.hasOwnProperty.call(source, key)) {
  9657. target[key] = source[key];
  9658. }
  9659. }
  9660. }
  9661. return target;
  9662. };
  9663. return _extends.apply(this, arguments);
  9664. }
  9665. /* eslint no-console:0 */
  9666. var formatRegExp = /%[sdj%]/g;
  9667. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  9668. if (typeof process !== 'undefined' && Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  9669. warning = function warning(type, errors) {
  9670. if (typeof console !== 'undefined' && console.warn) {
  9671. if (errors.every(function (e) {
  9672. return typeof e === 'string';
  9673. })) {
  9674. console.warn(type, errors);
  9675. }
  9676. }
  9677. };
  9678. }
  9679. function convertFieldsError(errors) {
  9680. if (!errors || !errors.length) return null;
  9681. var fields = {};
  9682. errors.forEach(function (error) {
  9683. var field = error.field;
  9684. fields[field] = fields[field] || [];
  9685. fields[field].push(error);
  9686. });
  9687. return fields;
  9688. }
  9689. function format() {
  9690. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  9691. args[_key] = arguments[_key];
  9692. }
  9693. var i = 1;
  9694. var f = args[0];
  9695. var len = args.length;
  9696. if (typeof f === 'function') {
  9697. return f.apply(null, args.slice(1));
  9698. }
  9699. if (typeof f === 'string') {
  9700. var str = String(f).replace(formatRegExp, function (x) {
  9701. if (x === '%%') {
  9702. return '%';
  9703. }
  9704. if (i >= len) {
  9705. return x;
  9706. }
  9707. switch (x) {
  9708. case '%s':
  9709. return String(args[i++]);
  9710. case '%d':
  9711. return Number(args[i++]);
  9712. case '%j':
  9713. try {
  9714. return JSON.stringify(args[i++]);
  9715. } catch (_) {
  9716. return '[Circular]';
  9717. }
  9718. break;
  9719. default:
  9720. return x;
  9721. }
  9722. });
  9723. for (var arg = args[i]; i < len; arg = args[++i]) {
  9724. str += " " + arg;
  9725. }
  9726. return str;
  9727. }
  9728. return f;
  9729. }
  9730. function isNativeStringType(type) {
  9731. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  9732. }
  9733. function isEmptyValue(value, type) {
  9734. if (value === undefined || value === null) {
  9735. return true;
  9736. }
  9737. if (type === 'array' && Array.isArray(value) && !value.length) {
  9738. return true;
  9739. }
  9740. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  9741. return true;
  9742. }
  9743. return false;
  9744. }
  9745. function asyncParallelArray(arr, func, callback) {
  9746. var results = [];
  9747. var total = 0;
  9748. var arrLength = arr.length;
  9749. function count(errors) {
  9750. results.push.apply(results, errors);
  9751. total++;
  9752. if (total === arrLength) {
  9753. callback(results);
  9754. }
  9755. }
  9756. arr.forEach(function (a) {
  9757. func(a, count);
  9758. });
  9759. }
  9760. function asyncSerialArray(arr, func, callback) {
  9761. var index = 0;
  9762. var arrLength = arr.length;
  9763. function next(errors) {
  9764. if (errors && errors.length) {
  9765. callback(errors);
  9766. return;
  9767. }
  9768. var original = index;
  9769. index = index + 1;
  9770. if (original < arrLength) {
  9771. func(arr[original], next);
  9772. } else {
  9773. callback([]);
  9774. }
  9775. }
  9776. next([]);
  9777. }
  9778. function flattenObjArr(objArr) {
  9779. var ret = [];
  9780. Object.keys(objArr).forEach(function (k) {
  9781. ret.push.apply(ret, objArr[k]);
  9782. });
  9783. return ret;
  9784. }
  9785. function asyncMap(objArr, option, func, callback) {
  9786. if (option.first) {
  9787. var _pending = new Promise(function (resolve, reject) {
  9788. var next = function next(errors) {
  9789. callback(errors);
  9790. return errors.length ? reject({
  9791. errors: errors,
  9792. fields: convertFieldsError(errors)
  9793. }) : resolve();
  9794. };
  9795. var flattenArr = flattenObjArr(objArr);
  9796. asyncSerialArray(flattenArr, func, next);
  9797. });
  9798. _pending["catch"](function (e) {
  9799. return e;
  9800. });
  9801. return _pending;
  9802. }
  9803. var firstFields = option.firstFields || [];
  9804. if (firstFields === true) {
  9805. firstFields = Object.keys(objArr);
  9806. }
  9807. var objArrKeys = Object.keys(objArr);
  9808. var objArrLength = objArrKeys.length;
  9809. var total = 0;
  9810. var results = [];
  9811. var pending = new Promise(function (resolve, reject) {
  9812. var next = function next(errors) {
  9813. results.push.apply(results, errors);
  9814. total++;
  9815. if (total === objArrLength) {
  9816. callback(results);
  9817. return results.length ? reject({
  9818. errors: results,
  9819. fields: convertFieldsError(results)
  9820. }) : resolve();
  9821. }
  9822. };
  9823. if (!objArrKeys.length) {
  9824. callback(results);
  9825. resolve();
  9826. }
  9827. objArrKeys.forEach(function (key) {
  9828. var arr = objArr[key];
  9829. if (firstFields.indexOf(key) !== -1) {
  9830. asyncSerialArray(arr, func, next);
  9831. } else {
  9832. asyncParallelArray(arr, func, next);
  9833. }
  9834. });
  9835. });
  9836. pending["catch"](function (e) {
  9837. return e;
  9838. });
  9839. return pending;
  9840. }
  9841. function complementError(rule) {
  9842. return function (oe) {
  9843. if (oe && oe.message) {
  9844. oe.field = oe.field || rule.fullField;
  9845. return oe;
  9846. }
  9847. return {
  9848. message: typeof oe === 'function' ? oe() : oe,
  9849. field: oe.field || rule.fullField
  9850. };
  9851. };
  9852. }
  9853. function deepMerge(target, source) {
  9854. if (source) {
  9855. for (var s in source) {
  9856. if (source.hasOwnProperty(s)) {
  9857. var value = source[s];
  9858. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  9859. target[s] = _extends({}, target[s], {}, value);
  9860. } else {
  9861. target[s] = value;
  9862. }
  9863. }
  9864. }
  9865. }
  9866. return target;
  9867. }
  9868. /**
  9869. * Rule for validating required fields.
  9870. *
  9871. * @param rule The validation rule.
  9872. * @param value The value of the field on the source object.
  9873. * @param source The source object being validated.
  9874. * @param errors An array of errors that this rule may add
  9875. * validation errors to.
  9876. * @param options The validation options.
  9877. * @param options.messages The validation messages.
  9878. */
  9879. function required(rule, value, source, errors, options, type) {
  9880. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  9881. errors.push(format(options.messages.required, rule.fullField));
  9882. }
  9883. }
  9884. /**
  9885. * Rule for validating whitespace.
  9886. *
  9887. * @param rule The validation rule.
  9888. * @param value The value of the field on the source object.
  9889. * @param source The source object being validated.
  9890. * @param errors An array of errors that this rule may add
  9891. * validation errors to.
  9892. * @param options The validation options.
  9893. * @param options.messages The validation messages.
  9894. */
  9895. function whitespace(rule, value, source, errors, options) {
  9896. if (/^\s+$/.test(value) || value === '') {
  9897. errors.push(format(options.messages.whitespace, rule.fullField));
  9898. }
  9899. }
  9900. /* eslint max-len:0 */
  9901. var pattern = {
  9902. // http://emailregex.com/
  9903. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  9904. 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'),
  9905. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  9906. };
  9907. var types = {
  9908. integer: function integer(value) {
  9909. return types.number(value) && parseInt(value, 10) === value;
  9910. },
  9911. "float": function float(value) {
  9912. return types.number(value) && !types.integer(value);
  9913. },
  9914. array: function array(value) {
  9915. return Array.isArray(value);
  9916. },
  9917. regexp: function regexp(value) {
  9918. if (value instanceof RegExp) {
  9919. return true;
  9920. }
  9921. try {
  9922. return !!new RegExp(value);
  9923. } catch (e) {
  9924. return false;
  9925. }
  9926. },
  9927. date: function date(value) {
  9928. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  9929. },
  9930. number: function number(value) {
  9931. if (isNaN(value)) {
  9932. return false;
  9933. }
  9934. // 修改源码,将字符串数值先转为数值
  9935. return typeof +value === 'number';
  9936. },
  9937. object: function object(value) {
  9938. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  9939. },
  9940. method: function method(value) {
  9941. return typeof value === 'function';
  9942. },
  9943. email: function email(value) {
  9944. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  9945. },
  9946. url: function url(value) {
  9947. return typeof value === 'string' && !!value.match(pattern.url);
  9948. },
  9949. hex: function hex(value) {
  9950. return typeof value === 'string' && !!value.match(pattern.hex);
  9951. }
  9952. };
  9953. /**
  9954. * Rule for validating the type of a value.
  9955. *
  9956. * @param rule The validation rule.
  9957. * @param value The value of the field on the source object.
  9958. * @param source The source object being validated.
  9959. * @param errors An array of errors that this rule may add
  9960. * validation errors to.
  9961. * @param options The validation options.
  9962. * @param options.messages The validation messages.
  9963. */
  9964. function type(rule, value, source, errors, options) {
  9965. if (rule.required && value === undefined) {
  9966. required(rule, value, source, errors, options);
  9967. return;
  9968. }
  9969. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  9970. var ruleType = rule.type;
  9971. if (custom.indexOf(ruleType) > -1) {
  9972. if (!types[ruleType](value)) {
  9973. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9974. } // straight typeof check
  9975. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  9976. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9977. }
  9978. }
  9979. /**
  9980. * Rule for validating minimum and maximum allowed values.
  9981. *
  9982. * @param rule The validation rule.
  9983. * @param value The value of the field on the source object.
  9984. * @param source The source object being validated.
  9985. * @param errors An array of errors that this rule may add
  9986. * validation errors to.
  9987. * @param options The validation options.
  9988. * @param options.messages The validation messages.
  9989. */
  9990. function range(rule, value, source, errors, options) {
  9991. var len = typeof rule.len === 'number';
  9992. var min = typeof rule.min === 'number';
  9993. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  9994. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  9995. var val = value;
  9996. var key = null;
  9997. var num = typeof value === 'number';
  9998. var str = typeof value === 'string';
  9999. var arr = Array.isArray(value);
  10000. if (num) {
  10001. key = 'number';
  10002. } else if (str) {
  10003. key = 'string';
  10004. } else if (arr) {
  10005. key = 'array';
  10006. } // if the value is not of a supported type for range validation
  10007. // the validation rule rule should use the
  10008. // type property to also test for a particular type
  10009. if (!key) {
  10010. return false;
  10011. }
  10012. if (arr) {
  10013. val = value.length;
  10014. }
  10015. if (str) {
  10016. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".length !== 3
  10017. val = value.replace(spRegexp, '_').length;
  10018. }
  10019. if (len) {
  10020. if (val !== rule.len) {
  10021. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  10022. }
  10023. } else if (min && !max && val < rule.min) {
  10024. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  10025. } else if (max && !min && val > rule.max) {
  10026. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  10027. } else if (min && max && (val < rule.min || val > rule.max)) {
  10028. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  10029. }
  10030. }
  10031. var ENUM = 'enum';
  10032. /**
  10033. * Rule for validating a value exists in an enumerable list.
  10034. *
  10035. * @param rule The validation rule.
  10036. * @param value The value of the field on the source object.
  10037. * @param source The source object being validated.
  10038. * @param errors An array of errors that this rule may add
  10039. * validation errors to.
  10040. * @param options The validation options.
  10041. * @param options.messages The validation messages.
  10042. */
  10043. function enumerable(rule, value, source, errors, options) {
  10044. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  10045. if (rule[ENUM].indexOf(value) === -1) {
  10046. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  10047. }
  10048. }
  10049. /**
  10050. * Rule for validating a regular expression pattern.
  10051. *
  10052. * @param rule The validation rule.
  10053. * @param value The value of the field on the source object.
  10054. * @param source The source object being validated.
  10055. * @param errors An array of errors that this rule may add
  10056. * validation errors to.
  10057. * @param options The validation options.
  10058. * @param options.messages The validation messages.
  10059. */
  10060. function pattern$1(rule, value, source, errors, options) {
  10061. if (rule.pattern) {
  10062. if (rule.pattern instanceof RegExp) {
  10063. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  10064. // flag is accidentally set to `true`, which in a validation scenario
  10065. // is not necessary and the result might be misleading
  10066. rule.pattern.lastIndex = 0;
  10067. if (!rule.pattern.test(value)) {
  10068. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10069. }
  10070. } else if (typeof rule.pattern === 'string') {
  10071. var _pattern = new RegExp(rule.pattern);
  10072. if (!_pattern.test(value)) {
  10073. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10074. }
  10075. }
  10076. }
  10077. }
  10078. var rules = {
  10079. required: required,
  10080. whitespace: whitespace,
  10081. type: type,
  10082. range: range,
  10083. "enum": enumerable,
  10084. pattern: pattern$1
  10085. };
  10086. /**
  10087. * Performs validation for string types.
  10088. *
  10089. * @param rule The validation rule.
  10090. * @param value The value of the field on the source object.
  10091. * @param callback The callback function.
  10092. * @param source The source object being validated.
  10093. * @param options The validation options.
  10094. * @param options.messages The validation messages.
  10095. */
  10096. function string(rule, value, callback, source, options) {
  10097. var errors = [];
  10098. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10099. if (validate) {
  10100. if (isEmptyValue(value, 'string') && !rule.required) {
  10101. return callback();
  10102. }
  10103. rules.required(rule, value, source, errors, options, 'string');
  10104. if (!isEmptyValue(value, 'string')) {
  10105. rules.type(rule, value, source, errors, options);
  10106. rules.range(rule, value, source, errors, options);
  10107. rules.pattern(rule, value, source, errors, options);
  10108. if (rule.whitespace === true) {
  10109. rules.whitespace(rule, value, source, errors, options);
  10110. }
  10111. }
  10112. }
  10113. callback(errors);
  10114. }
  10115. /**
  10116. * Validates a function.
  10117. *
  10118. * @param rule The validation rule.
  10119. * @param value The value of the field on the source object.
  10120. * @param callback The callback function.
  10121. * @param source The source object being validated.
  10122. * @param options The validation options.
  10123. * @param options.messages The validation messages.
  10124. */
  10125. function method(rule, value, callback, source, options) {
  10126. var errors = [];
  10127. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10128. if (validate) {
  10129. if (isEmptyValue(value) && !rule.required) {
  10130. return callback();
  10131. }
  10132. rules.required(rule, value, source, errors, options);
  10133. if (value !== undefined) {
  10134. rules.type(rule, value, source, errors, options);
  10135. }
  10136. }
  10137. callback(errors);
  10138. }
  10139. /**
  10140. * Validates a number.
  10141. *
  10142. * @param rule The validation rule.
  10143. * @param value The value of the field on the source object.
  10144. * @param callback The callback function.
  10145. * @param source The source object being validated.
  10146. * @param options The validation options.
  10147. * @param options.messages The validation messages.
  10148. */
  10149. function number(rule, value, callback, source, options) {
  10150. var errors = [];
  10151. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10152. if (validate) {
  10153. if (value === '') {
  10154. value = undefined;
  10155. }
  10156. if (isEmptyValue(value) && !rule.required) {
  10157. return callback();
  10158. }
  10159. rules.required(rule, value, source, errors, options);
  10160. if (value !== undefined) {
  10161. rules.type(rule, value, source, errors, options);
  10162. rules.range(rule, value, source, errors, options);
  10163. }
  10164. }
  10165. callback(errors);
  10166. }
  10167. /**
  10168. * Validates a boolean.
  10169. *
  10170. * @param rule The validation rule.
  10171. * @param value The value of the field on the source object.
  10172. * @param callback The callback function.
  10173. * @param source The source object being validated.
  10174. * @param options The validation options.
  10175. * @param options.messages The validation messages.
  10176. */
  10177. function _boolean(rule, value, callback, source, options) {
  10178. var errors = [];
  10179. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10180. if (validate) {
  10181. if (isEmptyValue(value) && !rule.required) {
  10182. return callback();
  10183. }
  10184. rules.required(rule, value, source, errors, options);
  10185. if (value !== undefined) {
  10186. rules.type(rule, value, source, errors, options);
  10187. }
  10188. }
  10189. callback(errors);
  10190. }
  10191. /**
  10192. * Validates the regular expression type.
  10193. *
  10194. * @param rule The validation rule.
  10195. * @param value The value of the field on the source object.
  10196. * @param callback The callback function.
  10197. * @param source The source object being validated.
  10198. * @param options The validation options.
  10199. * @param options.messages The validation messages.
  10200. */
  10201. function regexp(rule, value, callback, source, options) {
  10202. var errors = [];
  10203. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10204. if (validate) {
  10205. if (isEmptyValue(value) && !rule.required) {
  10206. return callback();
  10207. }
  10208. rules.required(rule, value, source, errors, options);
  10209. if (!isEmptyValue(value)) {
  10210. rules.type(rule, value, source, errors, options);
  10211. }
  10212. }
  10213. callback(errors);
  10214. }
  10215. /**
  10216. * Validates a number is an integer.
  10217. *
  10218. * @param rule The validation rule.
  10219. * @param value The value of the field on the source object.
  10220. * @param callback The callback function.
  10221. * @param source The source object being validated.
  10222. * @param options The validation options.
  10223. * @param options.messages The validation messages.
  10224. */
  10225. function integer(rule, value, callback, source, options) {
  10226. var errors = [];
  10227. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10228. if (validate) {
  10229. if (isEmptyValue(value) && !rule.required) {
  10230. return callback();
  10231. }
  10232. rules.required(rule, value, source, errors, options);
  10233. if (value !== undefined) {
  10234. rules.type(rule, value, source, errors, options);
  10235. rules.range(rule, value, source, errors, options);
  10236. }
  10237. }
  10238. callback(errors);
  10239. }
  10240. /**
  10241. * Validates a number is a floating point number.
  10242. *
  10243. * @param rule The validation rule.
  10244. * @param value The value of the field on the source object.
  10245. * @param callback The callback function.
  10246. * @param source The source object being validated.
  10247. * @param options The validation options.
  10248. * @param options.messages The validation messages.
  10249. */
  10250. function floatFn(rule, value, callback, source, options) {
  10251. var errors = [];
  10252. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10253. if (validate) {
  10254. if (isEmptyValue(value) && !rule.required) {
  10255. return callback();
  10256. }
  10257. rules.required(rule, value, source, errors, options);
  10258. if (value !== undefined) {
  10259. rules.type(rule, value, source, errors, options);
  10260. rules.range(rule, value, source, errors, options);
  10261. }
  10262. }
  10263. callback(errors);
  10264. }
  10265. /**
  10266. * Validates an array.
  10267. *
  10268. * @param rule The validation rule.
  10269. * @param value The value of the field on the source object.
  10270. * @param callback The callback function.
  10271. * @param source The source object being validated.
  10272. * @param options The validation options.
  10273. * @param options.messages The validation messages.
  10274. */
  10275. function array(rule, value, callback, source, options) {
  10276. var errors = [];
  10277. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10278. if (validate) {
  10279. if (isEmptyValue(value, 'array') && !rule.required) {
  10280. return callback();
  10281. }
  10282. rules.required(rule, value, source, errors, options, 'array');
  10283. if (!isEmptyValue(value, 'array')) {
  10284. rules.type(rule, value, source, errors, options);
  10285. rules.range(rule, value, source, errors, options);
  10286. }
  10287. }
  10288. callback(errors);
  10289. }
  10290. /**
  10291. * Validates an object.
  10292. *
  10293. * @param rule The validation rule.
  10294. * @param value The value of the field on the source object.
  10295. * @param callback The callback function.
  10296. * @param source The source object being validated.
  10297. * @param options The validation options.
  10298. * @param options.messages The validation messages.
  10299. */
  10300. function object(rule, value, callback, source, options) {
  10301. var errors = [];
  10302. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10303. if (validate) {
  10304. if (isEmptyValue(value) && !rule.required) {
  10305. return callback();
  10306. }
  10307. rules.required(rule, value, source, errors, options);
  10308. if (value !== undefined) {
  10309. rules.type(rule, value, source, errors, options);
  10310. }
  10311. }
  10312. callback(errors);
  10313. }
  10314. var ENUM$1 = 'enum';
  10315. /**
  10316. * Validates an enumerable list.
  10317. *
  10318. * @param rule The validation rule.
  10319. * @param value The value of the field on the source object.
  10320. * @param callback The callback function.
  10321. * @param source The source object being validated.
  10322. * @param options The validation options.
  10323. * @param options.messages The validation messages.
  10324. */
  10325. function enumerable$1(rule, value, callback, source, options) {
  10326. var errors = [];
  10327. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10328. if (validate) {
  10329. if (isEmptyValue(value) && !rule.required) {
  10330. return callback();
  10331. }
  10332. rules.required(rule, value, source, errors, options);
  10333. if (value !== undefined) {
  10334. rules[ENUM$1](rule, value, source, errors, options);
  10335. }
  10336. }
  10337. callback(errors);
  10338. }
  10339. /**
  10340. * Validates a regular expression pattern.
  10341. *
  10342. * Performs validation when a rule only contains
  10343. * a pattern property but is not declared as a string type.
  10344. *
  10345. * @param rule The validation rule.
  10346. * @param value The value of the field on the source object.
  10347. * @param callback The callback function.
  10348. * @param source The source object being validated.
  10349. * @param options The validation options.
  10350. * @param options.messages The validation messages.
  10351. */
  10352. function pattern$2(rule, value, callback, source, options) {
  10353. var errors = [];
  10354. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10355. if (validate) {
  10356. if (isEmptyValue(value, 'string') && !rule.required) {
  10357. return callback();
  10358. }
  10359. rules.required(rule, value, source, errors, options);
  10360. if (!isEmptyValue(value, 'string')) {
  10361. rules.pattern(rule, value, source, errors, options);
  10362. }
  10363. }
  10364. callback(errors);
  10365. }
  10366. function date(rule, value, callback, source, options) {
  10367. var errors = [];
  10368. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10369. if (validate) {
  10370. if (isEmptyValue(value) && !rule.required) {
  10371. return callback();
  10372. }
  10373. rules.required(rule, value, source, errors, options);
  10374. if (!isEmptyValue(value)) {
  10375. var dateObject;
  10376. if (typeof value === 'number') {
  10377. dateObject = new Date(value);
  10378. } else {
  10379. dateObject = value;
  10380. }
  10381. rules.type(rule, dateObject, source, errors, options);
  10382. if (dateObject) {
  10383. rules.range(rule, dateObject.getTime(), source, errors, options);
  10384. }
  10385. }
  10386. }
  10387. callback(errors);
  10388. }
  10389. function required$1(rule, value, callback, source, options) {
  10390. var errors = [];
  10391. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  10392. rules.required(rule, value, source, errors, options, type);
  10393. callback(errors);
  10394. }
  10395. function type$1(rule, value, callback, source, options) {
  10396. var ruleType = rule.type;
  10397. var errors = [];
  10398. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10399. if (validate) {
  10400. if (isEmptyValue(value, ruleType) && !rule.required) {
  10401. return callback();
  10402. }
  10403. rules.required(rule, value, source, errors, options, ruleType);
  10404. if (!isEmptyValue(value, ruleType)) {
  10405. rules.type(rule, value, source, errors, options);
  10406. }
  10407. }
  10408. callback(errors);
  10409. }
  10410. /**
  10411. * Performs validation for any type.
  10412. *
  10413. * @param rule The validation rule.
  10414. * @param value The value of the field on the source object.
  10415. * @param callback The callback function.
  10416. * @param source The source object being validated.
  10417. * @param options The validation options.
  10418. * @param options.messages The validation messages.
  10419. */
  10420. function any(rule, value, callback, source, options) {
  10421. var errors = [];
  10422. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10423. if (validate) {
  10424. if (isEmptyValue(value) && !rule.required) {
  10425. return callback();
  10426. }
  10427. rules.required(rule, value, source, errors, options);
  10428. }
  10429. callback(errors);
  10430. }
  10431. var validators = {
  10432. string: string,
  10433. method: method,
  10434. number: number,
  10435. "boolean": _boolean,
  10436. regexp: regexp,
  10437. integer: integer,
  10438. "float": floatFn,
  10439. array: array,
  10440. object: object,
  10441. "enum": enumerable$1,
  10442. pattern: pattern$2,
  10443. date: date,
  10444. url: type$1,
  10445. hex: type$1,
  10446. email: type$1,
  10447. required: required$1,
  10448. any: any
  10449. };
  10450. function newMessages() {
  10451. return {
  10452. "default": 'Validation error on field %s',
  10453. required: '%s is required',
  10454. "enum": '%s must be one of %s',
  10455. whitespace: '%s cannot be empty',
  10456. date: {
  10457. format: '%s date %s is invalid for format %s',
  10458. parse: '%s date could not be parsed, %s is invalid ',
  10459. invalid: '%s date %s is invalid'
  10460. },
  10461. types: {
  10462. string: '%s is not a %s',
  10463. method: '%s is not a %s (function)',
  10464. array: '%s is not an %s',
  10465. object: '%s is not an %s',
  10466. number: '%s is not a %s',
  10467. date: '%s is not a %s',
  10468. "boolean": '%s is not a %s',
  10469. integer: '%s is not an %s',
  10470. "float": '%s is not a %s',
  10471. regexp: '%s is not a valid %s',
  10472. email: '%s is not a valid %s',
  10473. url: '%s is not a valid %s',
  10474. hex: '%s is not a valid %s'
  10475. },
  10476. string: {
  10477. len: '%s must be exactly %s characters',
  10478. min: '%s must be at least %s characters',
  10479. max: '%s cannot be longer than %s characters',
  10480. range: '%s must be between %s and %s characters'
  10481. },
  10482. number: {
  10483. len: '%s must equal %s',
  10484. min: '%s cannot be less than %s',
  10485. max: '%s cannot be greater than %s',
  10486. range: '%s must be between %s and %s'
  10487. },
  10488. array: {
  10489. len: '%s must be exactly %s in length',
  10490. min: '%s cannot be less than %s in length',
  10491. max: '%s cannot be greater than %s in length',
  10492. range: '%s must be between %s and %s in length'
  10493. },
  10494. pattern: {
  10495. mismatch: '%s value %s does not match pattern %s'
  10496. },
  10497. clone: function clone() {
  10498. var cloned = JSON.parse(JSON.stringify(this));
  10499. cloned.clone = this.clone;
  10500. return cloned;
  10501. }
  10502. };
  10503. }
  10504. var messages = newMessages();
  10505. /**
  10506. * Encapsulates a validation schema.
  10507. *
  10508. * @param descriptor An object declaring validation rules
  10509. * for this schema.
  10510. */
  10511. function Schema(descriptor) {
  10512. this.rules = null;
  10513. this._messages = messages;
  10514. this.define(descriptor);
  10515. }
  10516. Schema.prototype = {
  10517. messages: function messages(_messages) {
  10518. if (_messages) {
  10519. this._messages = deepMerge(newMessages(), _messages);
  10520. }
  10521. return this._messages;
  10522. },
  10523. define: function define(rules) {
  10524. if (!rules) {
  10525. throw new Error('Cannot configure a schema with no rules');
  10526. }
  10527. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  10528. throw new Error('Rules must be an object');
  10529. }
  10530. this.rules = {};
  10531. var z;
  10532. var item;
  10533. for (z in rules) {
  10534. if (rules.hasOwnProperty(z)) {
  10535. item = rules[z];
  10536. this.rules[z] = Array.isArray(item) ? item : [item];
  10537. }
  10538. }
  10539. },
  10540. validate: function validate(source_, o, oc) {
  10541. var _this = this;
  10542. if (o === void 0) {
  10543. o = {};
  10544. }
  10545. if (oc === void 0) {
  10546. oc = function oc() {};
  10547. }
  10548. var source = source_;
  10549. var options = o;
  10550. var callback = oc;
  10551. if (typeof options === 'function') {
  10552. callback = options;
  10553. options = {};
  10554. }
  10555. if (!this.rules || Object.keys(this.rules).length === 0) {
  10556. if (callback) {
  10557. callback();
  10558. }
  10559. return Promise.resolve();
  10560. }
  10561. function complete(results) {
  10562. var i;
  10563. var errors = [];
  10564. var fields = {};
  10565. function add(e) {
  10566. if (Array.isArray(e)) {
  10567. var _errors;
  10568. errors = (_errors = errors).concat.apply(_errors, e);
  10569. } else {
  10570. errors.push(e);
  10571. }
  10572. }
  10573. for (i = 0; i < results.length; i++) {
  10574. add(results[i]);
  10575. }
  10576. if (!errors.length) {
  10577. errors = null;
  10578. fields = null;
  10579. } else {
  10580. fields = convertFieldsError(errors);
  10581. }
  10582. callback(errors, fields);
  10583. }
  10584. if (options.messages) {
  10585. var messages$1 = this.messages();
  10586. if (messages$1 === messages) {
  10587. messages$1 = newMessages();
  10588. }
  10589. deepMerge(messages$1, options.messages);
  10590. options.messages = messages$1;
  10591. } else {
  10592. options.messages = this.messages();
  10593. }
  10594. var arr;
  10595. var value;
  10596. var series = {};
  10597. var keys = options.keys || Object.keys(this.rules);
  10598. keys.forEach(function (z) {
  10599. arr = _this.rules[z];
  10600. value = source[z];
  10601. arr.forEach(function (r) {
  10602. var rule = r;
  10603. if (typeof rule.transform === 'function') {
  10604. if (source === source_) {
  10605. source = _extends({}, source);
  10606. }
  10607. value = source[z] = rule.transform(value);
  10608. }
  10609. if (typeof rule === 'function') {
  10610. rule = {
  10611. validator: rule
  10612. };
  10613. } else {
  10614. rule = _extends({}, rule);
  10615. }
  10616. rule.validator = _this.getValidationMethod(rule);
  10617. rule.field = z;
  10618. rule.fullField = rule.fullField || z;
  10619. rule.type = _this.getType(rule);
  10620. if (!rule.validator) {
  10621. return;
  10622. }
  10623. series[z] = series[z] || [];
  10624. series[z].push({
  10625. rule: rule,
  10626. value: value,
  10627. source: source,
  10628. field: z
  10629. });
  10630. });
  10631. });
  10632. var errorFields = {};
  10633. return asyncMap(series, options, function (data, doIt) {
  10634. var rule = data.rule;
  10635. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  10636. deep = deep && (rule.required || !rule.required && data.value);
  10637. rule.field = data.field;
  10638. function addFullfield(key, schema) {
  10639. return _extends({}, schema, {
  10640. fullField: rule.fullField + "." + key
  10641. });
  10642. }
  10643. function cb(e) {
  10644. if (e === void 0) {
  10645. e = [];
  10646. }
  10647. var errors = e;
  10648. if (!Array.isArray(errors)) {
  10649. errors = [errors];
  10650. }
  10651. if (!options.suppressWarning && errors.length) {
  10652. Schema.warning('async-validator:', errors);
  10653. }
  10654. if (errors.length && rule.message) {
  10655. errors = [].concat(rule.message);
  10656. }
  10657. errors = errors.map(complementError(rule));
  10658. if (options.first && errors.length) {
  10659. errorFields[rule.field] = 1;
  10660. return doIt(errors);
  10661. }
  10662. if (!deep) {
  10663. doIt(errors);
  10664. } else {
  10665. // if rule is required but the target object
  10666. // does not exist fail at the rule level and don't
  10667. // go deeper
  10668. if (rule.required && !data.value) {
  10669. if (rule.message) {
  10670. errors = [].concat(rule.message).map(complementError(rule));
  10671. } else if (options.error) {
  10672. errors = [options.error(rule, format(options.messages.required, rule.field))];
  10673. } else {
  10674. errors = [];
  10675. }
  10676. return doIt(errors);
  10677. }
  10678. var fieldsSchema = {};
  10679. if (rule.defaultField) {
  10680. for (var k in data.value) {
  10681. if (data.value.hasOwnProperty(k)) {
  10682. fieldsSchema[k] = rule.defaultField;
  10683. }
  10684. }
  10685. }
  10686. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  10687. for (var f in fieldsSchema) {
  10688. if (fieldsSchema.hasOwnProperty(f)) {
  10689. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  10690. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  10691. }
  10692. }
  10693. var schema = new Schema(fieldsSchema);
  10694. schema.messages(options.messages);
  10695. if (data.rule.options) {
  10696. data.rule.options.messages = options.messages;
  10697. data.rule.options.error = options.error;
  10698. }
  10699. schema.validate(data.value, data.rule.options || options, function (errs) {
  10700. var finalErrors = [];
  10701. if (errors && errors.length) {
  10702. finalErrors.push.apply(finalErrors, errors);
  10703. }
  10704. if (errs && errs.length) {
  10705. finalErrors.push.apply(finalErrors, errs);
  10706. }
  10707. doIt(finalErrors.length ? finalErrors : null);
  10708. });
  10709. }
  10710. }
  10711. var res;
  10712. if (rule.asyncValidator) {
  10713. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  10714. } else if (rule.validator) {
  10715. res = rule.validator(rule, data.value, cb, data.source, options);
  10716. if (res === true) {
  10717. cb();
  10718. } else if (res === false) {
  10719. cb(rule.message || rule.field + " fails");
  10720. } else if (res instanceof Array) {
  10721. cb(res);
  10722. } else if (res instanceof Error) {
  10723. cb(res.message);
  10724. }
  10725. }
  10726. if (res && res.then) {
  10727. res.then(function () {
  10728. return cb();
  10729. }, function (e) {
  10730. return cb(e);
  10731. });
  10732. }
  10733. }, function (results) {
  10734. complete(results);
  10735. });
  10736. },
  10737. getType: function getType(rule) {
  10738. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  10739. rule.type = 'pattern';
  10740. }
  10741. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  10742. throw new Error(format('Unknown rule type %s', rule.type));
  10743. }
  10744. return rule.type || 'string';
  10745. },
  10746. getValidationMethod: function getValidationMethod(rule) {
  10747. if (typeof rule.validator === 'function') {
  10748. return rule.validator;
  10749. }
  10750. var keys = Object.keys(rule);
  10751. var messageIndex = keys.indexOf('message');
  10752. if (messageIndex !== -1) {
  10753. keys.splice(messageIndex, 1);
  10754. }
  10755. if (keys.length === 1 && keys[0] === 'required') {
  10756. return validators.required;
  10757. }
  10758. return validators[this.getType(rule)] || false;
  10759. }
  10760. };
  10761. Schema.register = function register(type, validator) {
  10762. if (typeof validator !== 'function') {
  10763. throw new Error('Cannot register a validator by type, validator is not a function');
  10764. }
  10765. validators[type] = validator;
  10766. };
  10767. Schema.warning = warning;
  10768. Schema.messages = messages;
  10769. var _default = Schema;
  10770. exports.default = _default;
  10771. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 388)))
  10772. /***/ }),
  10773. /***/ 388:
  10774. /*!********************************************************!*\
  10775. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  10776. \********************************************************/
  10777. /*! no static exports found */
  10778. /***/ (function(module, exports, __webpack_require__) {
  10779. exports.nextTick = function nextTick(fn) {
  10780. var args = Array.prototype.slice.call(arguments);
  10781. args.shift();
  10782. setTimeout(function () {
  10783. fn.apply(null, args);
  10784. }, 0);
  10785. };
  10786. exports.platform = exports.arch =
  10787. exports.execPath = exports.title = 'browser';
  10788. exports.pid = 1;
  10789. exports.browser = true;
  10790. exports.env = {};
  10791. exports.argv = [];
  10792. exports.binding = function (name) {
  10793. throw new Error('No such module. (Possibly not yet loaded)')
  10794. };
  10795. (function () {
  10796. var cwd = '/';
  10797. var path;
  10798. exports.cwd = function () { return cwd };
  10799. exports.chdir = function (dir) {
  10800. if (!path) path = __webpack_require__(/*! path */ 389);
  10801. cwd = path.resolve(dir, cwd);
  10802. };
  10803. })();
  10804. exports.exit = exports.kill =
  10805. exports.umask = exports.dlopen =
  10806. exports.uptime = exports.memoryUsage =
  10807. exports.uvCounters = function() {};
  10808. exports.features = {};
  10809. /***/ }),
  10810. /***/ 389:
  10811. /*!***********************************************!*\
  10812. !*** ./node_modules/path-browserify/index.js ***!
  10813. \***********************************************/
  10814. /*! no static exports found */
  10815. /***/ (function(module, exports, __webpack_require__) {
  10816. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  10817. // backported and transplited with Babel, with backwards-compat fixes
  10818. // Copyright Joyent, Inc. and other Node contributors.
  10819. //
  10820. // Permission is hereby granted, free of charge, to any person obtaining a
  10821. // copy of this software and associated documentation files (the
  10822. // "Software"), to deal in the Software without restriction, including
  10823. // without limitation the rights to use, copy, modify, merge, publish,
  10824. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10825. // persons to whom the Software is furnished to do so, subject to the
  10826. // following conditions:
  10827. //
  10828. // The above copyright notice and this permission notice shall be included
  10829. // in all copies or substantial portions of the Software.
  10830. //
  10831. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10832. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10833. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10834. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10835. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10836. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10837. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10838. // resolves . and .. elements in a path array with directory names there
  10839. // must be no slashes, empty elements, or device names (c:\) in the array
  10840. // (so also no leading and trailing slashes - it does not distinguish
  10841. // relative and absolute paths)
  10842. function normalizeArray(parts, allowAboveRoot) {
  10843. // if the path tries to go above the root, `up` ends up > 0
  10844. var up = 0;
  10845. for (var i = parts.length - 1; i >= 0; i--) {
  10846. var last = parts[i];
  10847. if (last === '.') {
  10848. parts.splice(i, 1);
  10849. } else if (last === '..') {
  10850. parts.splice(i, 1);
  10851. up++;
  10852. } else if (up) {
  10853. parts.splice(i, 1);
  10854. up--;
  10855. }
  10856. }
  10857. // if the path is allowed to go above the root, restore leading ..s
  10858. if (allowAboveRoot) {
  10859. for (; up--; up) {
  10860. parts.unshift('..');
  10861. }
  10862. }
  10863. return parts;
  10864. }
  10865. // path.resolve([from ...], to)
  10866. // posix version
  10867. exports.resolve = function() {
  10868. var resolvedPath = '',
  10869. resolvedAbsolute = false;
  10870. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  10871. var path = (i >= 0) ? arguments[i] : process.cwd();
  10872. // Skip empty and invalid entries
  10873. if (typeof path !== 'string') {
  10874. throw new TypeError('Arguments to path.resolve must be strings');
  10875. } else if (!path) {
  10876. continue;
  10877. }
  10878. resolvedPath = path + '/' + resolvedPath;
  10879. resolvedAbsolute = path.charAt(0) === '/';
  10880. }
  10881. // At this point the path should be resolved to a full absolute path, but
  10882. // handle relative paths to be safe (might happen when process.cwd() fails)
  10883. // Normalize the path
  10884. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  10885. return !!p;
  10886. }), !resolvedAbsolute).join('/');
  10887. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  10888. };
  10889. // path.normalize(path)
  10890. // posix version
  10891. exports.normalize = function(path) {
  10892. var isAbsolute = exports.isAbsolute(path),
  10893. trailingSlash = substr(path, -1) === '/';
  10894. // Normalize the path
  10895. path = normalizeArray(filter(path.split('/'), function(p) {
  10896. return !!p;
  10897. }), !isAbsolute).join('/');
  10898. if (!path && !isAbsolute) {
  10899. path = '.';
  10900. }
  10901. if (path && trailingSlash) {
  10902. path += '/';
  10903. }
  10904. return (isAbsolute ? '/' : '') + path;
  10905. };
  10906. // posix version
  10907. exports.isAbsolute = function(path) {
  10908. return path.charAt(0) === '/';
  10909. };
  10910. // posix version
  10911. exports.join = function() {
  10912. var paths = Array.prototype.slice.call(arguments, 0);
  10913. return exports.normalize(filter(paths, function(p, index) {
  10914. if (typeof p !== 'string') {
  10915. throw new TypeError('Arguments to path.join must be strings');
  10916. }
  10917. return p;
  10918. }).join('/'));
  10919. };
  10920. // path.relative(from, to)
  10921. // posix version
  10922. exports.relative = function(from, to) {
  10923. from = exports.resolve(from).substr(1);
  10924. to = exports.resolve(to).substr(1);
  10925. function trim(arr) {
  10926. var start = 0;
  10927. for (; start < arr.length; start++) {
  10928. if (arr[start] !== '') break;
  10929. }
  10930. var end = arr.length - 1;
  10931. for (; end >= 0; end--) {
  10932. if (arr[end] !== '') break;
  10933. }
  10934. if (start > end) return [];
  10935. return arr.slice(start, end - start + 1);
  10936. }
  10937. var fromParts = trim(from.split('/'));
  10938. var toParts = trim(to.split('/'));
  10939. var length = Math.min(fromParts.length, toParts.length);
  10940. var samePartsLength = length;
  10941. for (var i = 0; i < length; i++) {
  10942. if (fromParts[i] !== toParts[i]) {
  10943. samePartsLength = i;
  10944. break;
  10945. }
  10946. }
  10947. var outputParts = [];
  10948. for (var i = samePartsLength; i < fromParts.length; i++) {
  10949. outputParts.push('..');
  10950. }
  10951. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  10952. return outputParts.join('/');
  10953. };
  10954. exports.sep = '/';
  10955. exports.delimiter = ':';
  10956. exports.dirname = function (path) {
  10957. if (typeof path !== 'string') path = path + '';
  10958. if (path.length === 0) return '.';
  10959. var code = path.charCodeAt(0);
  10960. var hasRoot = code === 47 /*/*/;
  10961. var end = -1;
  10962. var matchedSlash = true;
  10963. for (var i = path.length - 1; i >= 1; --i) {
  10964. code = path.charCodeAt(i);
  10965. if (code === 47 /*/*/) {
  10966. if (!matchedSlash) {
  10967. end = i;
  10968. break;
  10969. }
  10970. } else {
  10971. // We saw the first non-path separator
  10972. matchedSlash = false;
  10973. }
  10974. }
  10975. if (end === -1) return hasRoot ? '/' : '.';
  10976. if (hasRoot && end === 1) {
  10977. // return '//';
  10978. // Backwards-compat fix:
  10979. return '/';
  10980. }
  10981. return path.slice(0, end);
  10982. };
  10983. function basename(path) {
  10984. if (typeof path !== 'string') path = path + '';
  10985. var start = 0;
  10986. var end = -1;
  10987. var matchedSlash = true;
  10988. var i;
  10989. for (i = path.length - 1; i >= 0; --i) {
  10990. if (path.charCodeAt(i) === 47 /*/*/) {
  10991. // If we reached a path separator that was not part of a set of path
  10992. // separators at the end of the string, stop now
  10993. if (!matchedSlash) {
  10994. start = i + 1;
  10995. break;
  10996. }
  10997. } else if (end === -1) {
  10998. // We saw the first non-path separator, mark this as the end of our
  10999. // path component
  11000. matchedSlash = false;
  11001. end = i + 1;
  11002. }
  11003. }
  11004. if (end === -1) return '';
  11005. return path.slice(start, end);
  11006. }
  11007. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  11008. // in new Node.js versions, so only basename() above is backported here
  11009. exports.basename = function (path, ext) {
  11010. var f = basename(path);
  11011. if (ext && f.substr(-1 * ext.length) === ext) {
  11012. f = f.substr(0, f.length - ext.length);
  11013. }
  11014. return f;
  11015. };
  11016. exports.extname = function (path) {
  11017. if (typeof path !== 'string') path = path + '';
  11018. var startDot = -1;
  11019. var startPart = 0;
  11020. var end = -1;
  11021. var matchedSlash = true;
  11022. // Track the state of characters (if any) we see before our first dot and
  11023. // after any path separator we find
  11024. var preDotState = 0;
  11025. for (var i = path.length - 1; i >= 0; --i) {
  11026. var code = path.charCodeAt(i);
  11027. if (code === 47 /*/*/) {
  11028. // If we reached a path separator that was not part of a set of path
  11029. // separators at the end of the string, stop now
  11030. if (!matchedSlash) {
  11031. startPart = i + 1;
  11032. break;
  11033. }
  11034. continue;
  11035. }
  11036. if (end === -1) {
  11037. // We saw the first non-path separator, mark this as the end of our
  11038. // extension
  11039. matchedSlash = false;
  11040. end = i + 1;
  11041. }
  11042. if (code === 46 /*.*/) {
  11043. // If this is our first dot, mark it as the start of our extension
  11044. if (startDot === -1)
  11045. startDot = i;
  11046. else if (preDotState !== 1)
  11047. preDotState = 1;
  11048. } else if (startDot !== -1) {
  11049. // We saw a non-dot and non-path separator before our dot, so we should
  11050. // have a good chance at having a non-empty extension
  11051. preDotState = -1;
  11052. }
  11053. }
  11054. if (startDot === -1 || end === -1 ||
  11055. // We saw a non-dot character immediately before the dot
  11056. preDotState === 0 ||
  11057. // The (right-most) trimmed path component is exactly '..'
  11058. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  11059. return '';
  11060. }
  11061. return path.slice(startDot, end);
  11062. };
  11063. function filter (xs, f) {
  11064. if (xs.filter) return xs.filter(f);
  11065. var res = [];
  11066. for (var i = 0; i < xs.length; i++) {
  11067. if (f(xs[i], i, xs)) res.push(xs[i]);
  11068. }
  11069. return res;
  11070. }
  11071. // String.prototype.substr - negative index don't work in IE8
  11072. var substr = 'ab'.substr(-1) === 'b'
  11073. ? function (str, start, len) { return str.substr(start, len) }
  11074. : function (str, start, len) {
  11075. if (start < 0) start = str.length + start;
  11076. return str.substr(start, len);
  11077. }
  11078. ;
  11079. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 388)))
  11080. /***/ }),
  11081. /***/ 39:
  11082. /*!*******************************************************!*\
  11083. !*** E:/Desktop/zd_wechatApp(1)/common/lodash.min.js ***!
  11084. \*******************************************************/
  11085. /*! no static exports found */
  11086. /***/ (function(module, exports, __webpack_require__) {
  11087. /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  11088. /**
  11089. * @license
  11090. * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
  11091. */
  11092. ;
  11093. (function () {
  11094. function n(n, t, r) {
  11095. switch (r.length) {
  11096. case 0:
  11097. return n.call(t);
  11098. case 1:
  11099. return n.call(t, r[0]);
  11100. case 2:
  11101. return n.call(t, r[0], r[1]);
  11102. case 3:
  11103. return n.call(t, r[0], r[1], r[2]);
  11104. }
  11105. return n.apply(t, r);
  11106. }
  11107. function t(n, t, r, e) {
  11108. for (var u = -1, i = null == n ? 0 : n.length; ++u < i;) {
  11109. var o = n[u];
  11110. t(e, o, r(o), n);
  11111. }
  11112. return e;
  11113. }
  11114. function r(n, t) {
  11115. for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n);) {
  11116. ;
  11117. }
  11118. return n;
  11119. }
  11120. function e(n, t) {
  11121. for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n);) {
  11122. ;
  11123. }
  11124. return n;
  11125. }
  11126. function u(n, t) {
  11127. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11128. if (!t(n[r], r, n)) return false;
  11129. }
  11130. return true;
  11131. }
  11132. function i(n, t) {
  11133. for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e;) {
  11134. var o = n[r];
  11135. t(o, r, n) && (i[u++] = o);
  11136. }
  11137. return i;
  11138. }
  11139. function o(n, t) {
  11140. return !(null == n || !n.length) && -1 < v(n, t, 0);
  11141. }
  11142. function f(n, t, r) {
  11143. for (var e = -1, u = null == n ? 0 : n.length; ++e < u;) {
  11144. if (r(t, n[e])) return true;
  11145. }
  11146. return false;
  11147. }
  11148. function c(n, t) {
  11149. for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e;) {
  11150. u[r] = t(n[r], r, n);
  11151. }
  11152. return u;
  11153. }
  11154. function a(n, t) {
  11155. for (var r = -1, e = t.length, u = n.length; ++r < e;) {
  11156. n[u + r] = t[r];
  11157. }
  11158. return n;
  11159. }
  11160. function l(n, t, r, e) {
  11161. var u = -1,
  11162. i = null == n ? 0 : n.length;
  11163. for (e && i && (r = n[++u]); ++u < i;) {
  11164. r = t(r, n[u], u, n);
  11165. }
  11166. return r;
  11167. }
  11168. function s(n, t, r, e) {
  11169. var u = null == n ? 0 : n.length;
  11170. for (e && u && (r = n[--u]); u--;) {
  11171. r = t(r, n[u], u, n);
  11172. }
  11173. return r;
  11174. }
  11175. function h(n, t) {
  11176. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11177. if (t(n[r], r, n)) return true;
  11178. }
  11179. return false;
  11180. }
  11181. function p(n, t, r) {
  11182. var e;
  11183. return r(n, function (n, r, u) {
  11184. if (t(n, r, u)) return e = r, false;
  11185. }), e;
  11186. }
  11187. function _(n, t, r, e) {
  11188. var u = n.length;
  11189. for (r += e ? 1 : -1; e ? r-- : ++r < u;) {
  11190. if (t(n[r], r, n)) return r;
  11191. }
  11192. return -1;
  11193. }
  11194. function v(n, t, r) {
  11195. if (t === t) n: {
  11196. --r;
  11197. for (var e = n.length; ++r < e;) {
  11198. if (n[r] === t) {
  11199. n = r;
  11200. break n;
  11201. }
  11202. }
  11203. n = -1;
  11204. } else n = _(n, d, r);
  11205. return n;
  11206. }
  11207. function g(n, t, r, e) {
  11208. --r;
  11209. for (var u = n.length; ++r < u;) {
  11210. if (e(n[r], t)) return r;
  11211. }
  11212. return -1;
  11213. }
  11214. function d(n) {
  11215. return n !== n;
  11216. }
  11217. function y(n, t) {
  11218. var r = null == n ? 0 : n.length;
  11219. return r ? m(n, t) / r : F;
  11220. }
  11221. function b(n) {
  11222. return function (t) {
  11223. return null == t ? T : t[n];
  11224. };
  11225. }
  11226. function x(n) {
  11227. return function (t) {
  11228. return null == n ? T : n[t];
  11229. };
  11230. }
  11231. function j(n, t, r, e, u) {
  11232. return u(n, function (n, u, i) {
  11233. r = e ? (e = false, n) : t(r, n, u, i);
  11234. }), r;
  11235. }
  11236. function w(n, t) {
  11237. var r = n.length;
  11238. for (n.sort(t); r--;) {
  11239. n[r] = n[r].c;
  11240. }
  11241. return n;
  11242. }
  11243. function m(n, t) {
  11244. for (var r, e = -1, u = n.length; ++e < u;) {
  11245. var i = t(n[e]);
  11246. i !== T && (r = r === T ? i : r + i);
  11247. }
  11248. return r;
  11249. }
  11250. function A(n, t) {
  11251. for (var r = -1, e = Array(n); ++r < n;) {
  11252. e[r] = t(r);
  11253. }
  11254. return e;
  11255. }
  11256. function E(n, t) {
  11257. return c(t, function (t) {
  11258. return [t, n[t]];
  11259. });
  11260. }
  11261. function k(n) {
  11262. return function (t) {
  11263. return n(t);
  11264. };
  11265. }
  11266. function S(n, t) {
  11267. return c(t, function (t) {
  11268. return n[t];
  11269. });
  11270. }
  11271. function O(n, t) {
  11272. return n.has(t);
  11273. }
  11274. function I(n, t) {
  11275. for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0);) {
  11276. ;
  11277. }
  11278. return r;
  11279. }
  11280. function R(n, t) {
  11281. for (var r = n.length; r-- && -1 < v(t, n[r], 0);) {
  11282. ;
  11283. }
  11284. return r;
  11285. }
  11286. function z(n) {
  11287. return "\\" + Un[n];
  11288. }
  11289. function W(n) {
  11290. var t = -1,
  11291. r = Array(n.size);
  11292. return n.forEach(function (n, e) {
  11293. r[++t] = [e, n];
  11294. }), r;
  11295. }
  11296. function B(n, t) {
  11297. return function (r) {
  11298. return n(t(r));
  11299. };
  11300. }
  11301. function L(n, t) {
  11302. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  11303. var o = n[r];
  11304. o !== t && "__lodash_placeholder__" !== o || (n[r] = "__lodash_placeholder__", i[u++] = r);
  11305. }
  11306. return i;
  11307. }
  11308. function U(n) {
  11309. var t = -1,
  11310. r = Array(n.size);
  11311. return n.forEach(function (n) {
  11312. r[++t] = n;
  11313. }), r;
  11314. }
  11315. function C(n) {
  11316. var t = -1,
  11317. r = Array(n.size);
  11318. return n.forEach(function (n) {
  11319. r[++t] = [n, n];
  11320. }), r;
  11321. }
  11322. function D(n) {
  11323. if (Rn.test(n)) {
  11324. for (var t = On.lastIndex = 0; On.test(n);) {
  11325. ++t;
  11326. }
  11327. n = t;
  11328. } else n = Qn(n);
  11329. return n;
  11330. }
  11331. function M(n) {
  11332. return Rn.test(n) ? n.match(On) || [] : n.split("");
  11333. }
  11334. var T,
  11335. $ = 1 / 0,
  11336. F = NaN,
  11337. N = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]],
  11338. P = /\b__p\+='';/g,
  11339. Z = /\b(__p\+=)''\+/g,
  11340. q = /(__e\(.*?\)|\b__t\))\+'';/g,
  11341. V = /&(?:amp|lt|gt|quot|#39);/g,
  11342. K = /[&<>"']/g,
  11343. G = RegExp(V.source),
  11344. H = RegExp(K.source),
  11345. J = /<%-([\s\S]+?)%>/g,
  11346. Y = /<%([\s\S]+?)%>/g,
  11347. Q = /<%=([\s\S]+?)%>/g,
  11348. X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  11349. nn = /^\w*$/,
  11350. tn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
  11351. rn = /[\\^$.*+?()[\]{}|]/g,
  11352. en = RegExp(rn.source),
  11353. un = /^\s+|\s+$/g,
  11354. on = /^\s+/,
  11355. fn = /\s+$/,
  11356. cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  11357. an = /\{\n\/\* \[wrapped with (.+)\] \*/,
  11358. ln = /,? & /,
  11359. sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,
  11360. hn = /\\(\\)?/g,
  11361. pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,
  11362. _n = /\w*$/,
  11363. vn = /^[-+]0x[0-9a-f]+$/i,
  11364. gn = /^0b[01]+$/i,
  11365. dn = /^\[object .+?Constructor\]$/,
  11366. yn = /^0o[0-7]+$/i,
  11367. bn = /^(?:0|[1-9]\d*)$/,
  11368. xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
  11369. jn = /($^)/,
  11370. wn = /['\n\r\u2028\u2029\\]/g,
  11371. mn = "[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",
  11372. An = "(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])" + mn,
  11373. En = "(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",
  11374. kn = RegExp("['\u2019]", "g"),
  11375. Sn = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"),
  11376. On = RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + En + mn, "g"),
  11377. In = RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+", An].join("|"), "g"),
  11378. Rn = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),
  11379. zn = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
  11380. Wn = "Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),
  11381. Bn = {};
  11382. Bn["[object Float32Array]"] = Bn["[object Float64Array]"] = Bn["[object Int8Array]"] = Bn["[object Int16Array]"] = Bn["[object Int32Array]"] = Bn["[object Uint8Array]"] = Bn["[object Uint8ClampedArray]"] = Bn["[object Uint16Array]"] = Bn["[object Uint32Array]"] = true, Bn["[object Arguments]"] = Bn["[object Array]"] = Bn["[object ArrayBuffer]"] = Bn["[object Boolean]"] = Bn["[object DataView]"] = Bn["[object Date]"] = Bn["[object Error]"] = Bn["[object Function]"] = Bn["[object Map]"] = Bn["[object Number]"] = Bn["[object Object]"] = Bn["[object RegExp]"] = Bn["[object Set]"] = Bn["[object String]"] = Bn["[object WeakMap]"] = false;
  11383. var Ln = {};
  11384. Ln["[object Arguments]"] = Ln["[object Array]"] = Ln["[object ArrayBuffer]"] = Ln["[object DataView]"] = Ln["[object Boolean]"] = Ln["[object Date]"] = Ln["[object Float32Array]"] = Ln["[object Float64Array]"] = Ln["[object Int8Array]"] = Ln["[object Int16Array]"] = Ln["[object Int32Array]"] = Ln["[object Map]"] = Ln["[object Number]"] = Ln["[object Object]"] = Ln["[object RegExp]"] = Ln["[object Set]"] = Ln["[object String]"] = Ln["[object Symbol]"] = Ln["[object Uint8Array]"] = Ln["[object Uint8ClampedArray]"] = Ln["[object Uint16Array]"] = Ln["[object Uint32Array]"] = true, Ln["[object Error]"] = Ln["[object Function]"] = Ln["[object WeakMap]"] = false;
  11385. var Un = {
  11386. "\\": "\\",
  11387. "'": "'",
  11388. "\n": "n",
  11389. "\r": "r",
  11390. "\u2028": "u2028",
  11391. "\u2029": "u2029"
  11392. },
  11393. Cn = parseFloat,
  11394. Dn = parseInt,
  11395. Mn = (typeof global === "undefined" ? "undefined" : _typeof(global)) == "object" && global && global.Object === Object && global,
  11396. Tn = (typeof self === "undefined" ? "undefined" : _typeof(self)) == "object" && self && self.Object === Object && self,
  11397. $n = Mn || Tn || Function("return this")(),
  11398. Fn = ( false ? undefined : _typeof(exports)) == "object" && exports && !exports.nodeType && exports,
  11399. Nn = Fn && ( false ? undefined : _typeof(module)) == "object" && module && !module.nodeType && module,
  11400. Pn = Nn && Nn.exports === Fn,
  11401. Zn = Pn && Mn.process,
  11402. qn = function () {
  11403. try {
  11404. var n = Nn && Nn.f && Nn.f("util").types;
  11405. return n ? n : Zn && Zn.binding && Zn.binding("util");
  11406. } catch (n) {}
  11407. }(),
  11408. Vn = qn && qn.isArrayBuffer,
  11409. Kn = qn && qn.isDate,
  11410. Gn = qn && qn.isMap,
  11411. Hn = qn && qn.isRegExp,
  11412. Jn = qn && qn.isSet,
  11413. Yn = qn && qn.isTypedArray,
  11414. Qn = b("length"),
  11415. Xn = x({
  11416. "\xc0": "A",
  11417. "\xc1": "A",
  11418. "\xc2": "A",
  11419. "\xc3": "A",
  11420. "\xc4": "A",
  11421. "\xc5": "A",
  11422. "\xe0": "a",
  11423. "\xe1": "a",
  11424. "\xe2": "a",
  11425. "\xe3": "a",
  11426. "\xe4": "a",
  11427. "\xe5": "a",
  11428. "\xc7": "C",
  11429. "\xe7": "c",
  11430. "\xd0": "D",
  11431. "\xf0": "d",
  11432. "\xc8": "E",
  11433. "\xc9": "E",
  11434. "\xca": "E",
  11435. "\xcb": "E",
  11436. "\xe8": "e",
  11437. "\xe9": "e",
  11438. "\xea": "e",
  11439. "\xeb": "e",
  11440. "\xcc": "I",
  11441. "\xcd": "I",
  11442. "\xce": "I",
  11443. "\xcf": "I",
  11444. "\xec": "i",
  11445. "\xed": "i",
  11446. "\xee": "i",
  11447. "\xef": "i",
  11448. "\xd1": "N",
  11449. "\xf1": "n",
  11450. "\xd2": "O",
  11451. "\xd3": "O",
  11452. "\xd4": "O",
  11453. "\xd5": "O",
  11454. "\xd6": "O",
  11455. "\xd8": "O",
  11456. "\xf2": "o",
  11457. "\xf3": "o",
  11458. "\xf4": "o",
  11459. "\xf5": "o",
  11460. "\xf6": "o",
  11461. "\xf8": "o",
  11462. "\xd9": "U",
  11463. "\xda": "U",
  11464. "\xdb": "U",
  11465. "\xdc": "U",
  11466. "\xf9": "u",
  11467. "\xfa": "u",
  11468. "\xfb": "u",
  11469. "\xfc": "u",
  11470. "\xdd": "Y",
  11471. "\xfd": "y",
  11472. "\xff": "y",
  11473. "\xc6": "Ae",
  11474. "\xe6": "ae",
  11475. "\xde": "Th",
  11476. "\xfe": "th",
  11477. "\xdf": "ss",
  11478. "\u0100": "A",
  11479. "\u0102": "A",
  11480. "\u0104": "A",
  11481. "\u0101": "a",
  11482. "\u0103": "a",
  11483. "\u0105": "a",
  11484. "\u0106": "C",
  11485. "\u0108": "C",
  11486. "\u010A": "C",
  11487. "\u010C": "C",
  11488. "\u0107": "c",
  11489. "\u0109": "c",
  11490. "\u010B": "c",
  11491. "\u010D": "c",
  11492. "\u010E": "D",
  11493. "\u0110": "D",
  11494. "\u010F": "d",
  11495. "\u0111": "d",
  11496. "\u0112": "E",
  11497. "\u0114": "E",
  11498. "\u0116": "E",
  11499. "\u0118": "E",
  11500. "\u011A": "E",
  11501. "\u0113": "e",
  11502. "\u0115": "e",
  11503. "\u0117": "e",
  11504. "\u0119": "e",
  11505. "\u011B": "e",
  11506. "\u011C": "G",
  11507. "\u011E": "G",
  11508. "\u0120": "G",
  11509. "\u0122": "G",
  11510. "\u011D": "g",
  11511. "\u011F": "g",
  11512. "\u0121": "g",
  11513. "\u0123": "g",
  11514. "\u0124": "H",
  11515. "\u0126": "H",
  11516. "\u0125": "h",
  11517. "\u0127": "h",
  11518. "\u0128": "I",
  11519. "\u012A": "I",
  11520. "\u012C": "I",
  11521. "\u012E": "I",
  11522. "\u0130": "I",
  11523. "\u0129": "i",
  11524. "\u012B": "i",
  11525. "\u012D": "i",
  11526. "\u012F": "i",
  11527. "\u0131": "i",
  11528. "\u0134": "J",
  11529. "\u0135": "j",
  11530. "\u0136": "K",
  11531. "\u0137": "k",
  11532. "\u0138": "k",
  11533. "\u0139": "L",
  11534. "\u013B": "L",
  11535. "\u013D": "L",
  11536. "\u013F": "L",
  11537. "\u0141": "L",
  11538. "\u013A": "l",
  11539. "\u013C": "l",
  11540. "\u013E": "l",
  11541. "\u0140": "l",
  11542. "\u0142": "l",
  11543. "\u0143": "N",
  11544. "\u0145": "N",
  11545. "\u0147": "N",
  11546. "\u014A": "N",
  11547. "\u0144": "n",
  11548. "\u0146": "n",
  11549. "\u0148": "n",
  11550. "\u014B": "n",
  11551. "\u014C": "O",
  11552. "\u014E": "O",
  11553. "\u0150": "O",
  11554. "\u014D": "o",
  11555. "\u014F": "o",
  11556. "\u0151": "o",
  11557. "\u0154": "R",
  11558. "\u0156": "R",
  11559. "\u0158": "R",
  11560. "\u0155": "r",
  11561. "\u0157": "r",
  11562. "\u0159": "r",
  11563. "\u015A": "S",
  11564. "\u015C": "S",
  11565. "\u015E": "S",
  11566. "\u0160": "S",
  11567. "\u015B": "s",
  11568. "\u015D": "s",
  11569. "\u015F": "s",
  11570. "\u0161": "s",
  11571. "\u0162": "T",
  11572. "\u0164": "T",
  11573. "\u0166": "T",
  11574. "\u0163": "t",
  11575. "\u0165": "t",
  11576. "\u0167": "t",
  11577. "\u0168": "U",
  11578. "\u016A": "U",
  11579. "\u016C": "U",
  11580. "\u016E": "U",
  11581. "\u0170": "U",
  11582. "\u0172": "U",
  11583. "\u0169": "u",
  11584. "\u016B": "u",
  11585. "\u016D": "u",
  11586. "\u016F": "u",
  11587. "\u0171": "u",
  11588. "\u0173": "u",
  11589. "\u0174": "W",
  11590. "\u0175": "w",
  11591. "\u0176": "Y",
  11592. "\u0177": "y",
  11593. "\u0178": "Y",
  11594. "\u0179": "Z",
  11595. "\u017B": "Z",
  11596. "\u017D": "Z",
  11597. "\u017A": "z",
  11598. "\u017C": "z",
  11599. "\u017E": "z",
  11600. "\u0132": "IJ",
  11601. "\u0133": "ij",
  11602. "\u0152": "Oe",
  11603. "\u0153": "oe",
  11604. "\u0149": "'n",
  11605. "\u017F": "s"
  11606. }),
  11607. nt = x({
  11608. "&": "&amp;",
  11609. "<": "&lt;",
  11610. ">": "&gt;",
  11611. '"': "&quot;",
  11612. "'": "&#39;"
  11613. }),
  11614. tt = x({
  11615. "&amp;": "&",
  11616. "&lt;": "<",
  11617. "&gt;": ">",
  11618. "&quot;": '"',
  11619. "&#39;": "'"
  11620. }),
  11621. rt = function x(mn) {
  11622. function An(n) {
  11623. if (du(n) && !of(n) && !(n instanceof Un)) {
  11624. if (n instanceof On) return n;
  11625. if (ii.call(n, "__wrapped__")) return $e(n);
  11626. }
  11627. return new On(n);
  11628. }
  11629. function En() {}
  11630. function On(n, t) {
  11631. this.__wrapped__ = n, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = T;
  11632. }
  11633. function Un(n) {
  11634. this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = [];
  11635. }
  11636. function Mn(n) {
  11637. var t = -1,
  11638. r = null == n ? 0 : n.length;
  11639. for (this.clear(); ++t < r;) {
  11640. var e = n[t];
  11641. this.set(e[0], e[1]);
  11642. }
  11643. }
  11644. function Tn(n) {
  11645. var t = -1,
  11646. r = null == n ? 0 : n.length;
  11647. for (this.clear(); ++t < r;) {
  11648. var e = n[t];
  11649. this.set(e[0], e[1]);
  11650. }
  11651. }
  11652. function Fn(n) {
  11653. var t = -1,
  11654. r = null == n ? 0 : n.length;
  11655. for (this.clear(); ++t < r;) {
  11656. var e = n[t];
  11657. this.set(e[0], e[1]);
  11658. }
  11659. }
  11660. function Nn(n) {
  11661. var t = -1,
  11662. r = null == n ? 0 : n.length;
  11663. for (this.__data__ = new Fn(); ++t < r;) {
  11664. this.add(n[t]);
  11665. }
  11666. }
  11667. function Zn(n) {
  11668. this.size = (this.__data__ = new Tn(n)).size;
  11669. }
  11670. function qn(n, t) {
  11671. var r,
  11672. e = of(n),
  11673. u = !e && uf(n),
  11674. i = !e && !u && cf(n),
  11675. o = !e && !u && !i && pf(n),
  11676. u = (e = e || u || i || o) ? A(n.length, Xu) : [],
  11677. f = u.length;
  11678. for (r in n) {
  11679. !t && !ii.call(n, r) || e && ("length" == r || i && ("offset" == r || "parent" == r) || o && ("buffer" == r || "byteLength" == r || "byteOffset" == r) || Se(r, f)) || u.push(r);
  11680. }
  11681. return u;
  11682. }
  11683. function Qn(n) {
  11684. var t = n.length;
  11685. return t ? n[ir(0, t - 1)] : T;
  11686. }
  11687. function et(n, t) {
  11688. return Ce(Ur(n), pt(t, 0, n.length));
  11689. }
  11690. function ut(n) {
  11691. return Ce(Ur(n));
  11692. }
  11693. function it(n, t, r) {
  11694. (r === T || au(n[t], r)) && (r !== T || t in n) || st(n, t, r);
  11695. }
  11696. function ot(n, t, r) {
  11697. var e = n[t];
  11698. ii.call(n, t) && au(e, r) && (r !== T || t in n) || st(n, t, r);
  11699. }
  11700. function ft(n, t) {
  11701. for (var r = n.length; r--;) {
  11702. if (au(n[r][0], t)) return r;
  11703. }
  11704. return -1;
  11705. }
  11706. function ct(n, t, r, e) {
  11707. return eo(n, function (n, u, i) {
  11708. t(e, n, r(n), i);
  11709. }), e;
  11710. }
  11711. function at(n, t) {
  11712. return n && Cr(t, zu(t), n);
  11713. }
  11714. function lt(n, t) {
  11715. return n && Cr(t, Wu(t), n);
  11716. }
  11717. function st(n, t, r) {
  11718. "__proto__" == t && mi ? mi(n, t, {
  11719. configurable: true,
  11720. enumerable: true,
  11721. value: r,
  11722. writable: true
  11723. }) : n[t] = r;
  11724. }
  11725. function ht(n, t) {
  11726. for (var r = -1, e = t.length, u = Vu(e), i = null == n; ++r < e;) {
  11727. u[r] = i ? T : Iu(n, t[r]);
  11728. }
  11729. return u;
  11730. }
  11731. function pt(n, t, r) {
  11732. return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n;
  11733. }
  11734. function _t(n, t, e, u, i, o) {
  11735. var f,
  11736. c = 1 & t,
  11737. a = 2 & t,
  11738. l = 4 & t;
  11739. if (e && (f = i ? e(n, u, i, o) : e(n)), f !== T) return f;
  11740. if (!gu(n)) return n;
  11741. if (u = of(n)) {
  11742. if (f = me(n), !c) return Ur(n, f);
  11743. } else {
  11744. var s = _o(n),
  11745. h = "[object Function]" == s || "[object GeneratorFunction]" == s;
  11746. if (cf(n)) return Ir(n, c);
  11747. if ("[object Object]" == s || "[object Arguments]" == s || h && !i) {
  11748. if (f = a || h ? {} : Ae(n), !c) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n));
  11749. } else {
  11750. if (!Ln[s]) return i ? n : {};
  11751. f = Ee(n, s, c);
  11752. }
  11753. }
  11754. if (o || (o = new Zn()), i = o.get(n)) return i;
  11755. if (o.set(n, f), hf(n)) return n.forEach(function (r) {
  11756. f.add(_t(r, t, e, r, n, o));
  11757. }), f;
  11758. if (lf(n)) return n.forEach(function (r, u) {
  11759. f.set(u, _t(r, t, e, u, n, o));
  11760. }), f;
  11761. var a = l ? a ? ve : _e : a ? Wu : zu,
  11762. p = u ? T : a(n);
  11763. return r(p || n, function (r, u) {
  11764. p && (u = r, r = n[u]), ot(f, u, _t(r, t, e, u, n, o));
  11765. }), f;
  11766. }
  11767. function vt(n) {
  11768. var t = zu(n);
  11769. return function (r) {
  11770. return gt(r, n, t);
  11771. };
  11772. }
  11773. function gt(n, t, r) {
  11774. var e = r.length;
  11775. if (null == n) return !e;
  11776. for (n = Yu(n); e--;) {
  11777. var u = r[e],
  11778. i = t[u],
  11779. o = n[u];
  11780. if (o === T && !(u in n) || !i(o)) return false;
  11781. }
  11782. return true;
  11783. }
  11784. function dt(n, t, r) {
  11785. if (typeof n != "function") throw new ni("Expected a function");
  11786. return yo(function () {
  11787. n.apply(T, r);
  11788. }, t);
  11789. }
  11790. function yt(n, t, r, e) {
  11791. var u = -1,
  11792. i = o,
  11793. a = true,
  11794. l = n.length,
  11795. s = [],
  11796. h = t.length;
  11797. if (!l) return s;
  11798. r && (t = c(t, k(r))), e ? (i = f, a = false) : 200 <= t.length && (i = O, a = false, t = new Nn(t));
  11799. n: for (; ++u < l;) {
  11800. var p = n[u],
  11801. _ = null == r ? p : r(p),
  11802. p = e || 0 !== p ? p : 0;
  11803. if (a && _ === _) {
  11804. for (var v = h; v--;) {
  11805. if (t[v] === _) continue n;
  11806. }
  11807. s.push(p);
  11808. } else i(t, _, e) || s.push(p);
  11809. }
  11810. return s;
  11811. }
  11812. function bt(n, t) {
  11813. var r = true;
  11814. return eo(n, function (n, e, u) {
  11815. return r = !!t(n, e, u);
  11816. }), r;
  11817. }
  11818. function xt(n, t, r) {
  11819. for (var e = -1, u = n.length; ++e < u;) {
  11820. var i = n[e],
  11821. o = t(i);
  11822. if (null != o && (f === T ? o === o && !ju(o) : r(o, f))) var f = o,
  11823. c = i;
  11824. }
  11825. return c;
  11826. }
  11827. function jt(n, t) {
  11828. var r = [];
  11829. return eo(n, function (n, e, u) {
  11830. t(n, e, u) && r.push(n);
  11831. }), r;
  11832. }
  11833. function wt(n, t, r, e, u) {
  11834. var i = -1,
  11835. o = n.length;
  11836. for (r || (r = ke), u || (u = []); ++i < o;) {
  11837. var f = n[i];
  11838. 0 < t && r(f) ? 1 < t ? wt(f, t - 1, r, e, u) : a(u, f) : e || (u[u.length] = f);
  11839. }
  11840. return u;
  11841. }
  11842. function mt(n, t) {
  11843. return n && io(n, t, zu);
  11844. }
  11845. function At(n, t) {
  11846. return n && oo(n, t, zu);
  11847. }
  11848. function Et(n, t) {
  11849. return i(t, function (t) {
  11850. return pu(n[t]);
  11851. });
  11852. }
  11853. function kt(n, t) {
  11854. t = Sr(t, n);
  11855. for (var r = 0, e = t.length; null != n && r < e;) {
  11856. n = n[De(t[r++])];
  11857. }
  11858. return r && r == e ? n : T;
  11859. }
  11860. function St(n, t, r) {
  11861. return t = t(n), of(n) ? t : a(t, r(n));
  11862. }
  11863. function Ot(n) {
  11864. if (null == n) n = n === T ? "[object Undefined]" : "[object Null]";else if (wi && wi in Yu(n)) {
  11865. var t = ii.call(n, wi),
  11866. r = n[wi];
  11867. try {
  11868. n[wi] = T;
  11869. var e = true;
  11870. } catch (n) {}
  11871. var u = ci.call(n);
  11872. e && (t ? n[wi] = r : delete n[wi]), n = u;
  11873. } else n = ci.call(n);
  11874. return n;
  11875. }
  11876. function It(n, t) {
  11877. return n > t;
  11878. }
  11879. function Rt(n, t) {
  11880. return null != n && ii.call(n, t);
  11881. }
  11882. function zt(n, t) {
  11883. return null != n && t in Yu(n);
  11884. }
  11885. function Wt(n, t, r) {
  11886. for (var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Vu(i), s = 1 / 0, h = []; a--;) {
  11887. var p = n[a];
  11888. a && t && (p = c(p, k(t))), s = Ui(p.length, s), l[a] = !r && (t || 120 <= u && 120 <= p.length) ? new Nn(a && p) : T;
  11889. }
  11890. var p = n[0],
  11891. _ = -1,
  11892. v = l[0];
  11893. n: for (; ++_ < u && h.length < s;) {
  11894. var g = p[_],
  11895. d = t ? t(g) : g,
  11896. g = r || 0 !== g ? g : 0;
  11897. if (v ? !O(v, d) : !e(h, d, r)) {
  11898. for (a = i; --a;) {
  11899. var y = l[a];
  11900. if (y ? !O(y, d) : !e(n[a], d, r)) continue n;
  11901. }
  11902. v && v.push(d), h.push(g);
  11903. }
  11904. }
  11905. return h;
  11906. }
  11907. function Bt(n, t, r) {
  11908. var e = {};
  11909. return mt(n, function (n, u, i) {
  11910. t(e, r(n), u, i);
  11911. }), e;
  11912. }
  11913. function Lt(t, r, e) {
  11914. return r = Sr(r, t), t = 2 > r.length ? t : kt(t, hr(r, 0, -1)), r = null == t ? t : t[De(qe(r))], null == r ? T : n(r, t, e);
  11915. }
  11916. function Ut(n) {
  11917. return du(n) && "[object Arguments]" == Ot(n);
  11918. }
  11919. function Ct(n) {
  11920. return du(n) && "[object ArrayBuffer]" == Ot(n);
  11921. }
  11922. function Dt(n) {
  11923. return du(n) && "[object Date]" == Ot(n);
  11924. }
  11925. function Mt(n, t, r, e, u) {
  11926. if (n === t) t = true;else if (null == n || null == t || !du(n) && !du(t)) t = n !== n && t !== t;else n: {
  11927. var i = of(n),
  11928. o = of(t),
  11929. f = i ? "[object Array]" : _o(n),
  11930. c = o ? "[object Array]" : _o(t),
  11931. f = "[object Arguments]" == f ? "[object Object]" : f,
  11932. c = "[object Arguments]" == c ? "[object Object]" : c,
  11933. a = "[object Object]" == f,
  11934. o = "[object Object]" == c;
  11935. if ((c = f == c) && cf(n)) {
  11936. if (!cf(t)) {
  11937. t = false;
  11938. break n;
  11939. }
  11940. i = true, a = false;
  11941. }
  11942. if (c && !a) u || (u = new Zn()), t = i || pf(n) ? se(n, t, r, e, Mt, u) : he(n, t, f, r, e, Mt, u);else {
  11943. if (!(1 & r) && (i = a && ii.call(n, "__wrapped__"), f = o && ii.call(t, "__wrapped__"), i || f)) {
  11944. n = i ? n.value() : n, t = f ? t.value() : t, u || (u = new Zn()), t = Mt(n, t, r, e, u);
  11945. break n;
  11946. }
  11947. if (c) {
  11948. t: if (u || (u = new Zn()), i = 1 & r, f = _e(n), o = f.length, c = _e(t).length, o == c || i) {
  11949. for (a = o; a--;) {
  11950. var l = f[a];
  11951. if (!(i ? l in t : ii.call(t, l))) {
  11952. t = false;
  11953. break t;
  11954. }
  11955. }
  11956. if ((c = u.get(n)) && u.get(t)) t = c == t;else {
  11957. c = true, u.set(n, t), u.set(t, n);
  11958. for (var s = i; ++a < o;) {
  11959. var l = f[a],
  11960. h = n[l],
  11961. p = t[l];
  11962. if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u);
  11963. if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) {
  11964. c = false;
  11965. break;
  11966. }
  11967. s || (s = "constructor" == l);
  11968. }
  11969. c && !s && (r = n.constructor, e = t.constructor, r != e && "constructor" in n && "constructor" in t && !(typeof r == "function" && r instanceof r && typeof e == "function" && e instanceof e) && (c = false)), u.delete(n), u.delete(t), t = c;
  11970. }
  11971. } else t = false;
  11972. } else t = false;
  11973. }
  11974. }
  11975. return t;
  11976. }
  11977. function Tt(n) {
  11978. return du(n) && "[object Map]" == _o(n);
  11979. }
  11980. function $t(n, t, r, e) {
  11981. var u = r.length,
  11982. i = u,
  11983. o = !e;
  11984. if (null == n) return !i;
  11985. for (n = Yu(n); u--;) {
  11986. var f = r[u];
  11987. if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false;
  11988. }
  11989. for (; ++u < i;) {
  11990. var f = r[u],
  11991. c = f[0],
  11992. a = n[c],
  11993. l = f[1];
  11994. if (o && f[2]) {
  11995. if (a === T && !(c in n)) return false;
  11996. } else {
  11997. if (f = new Zn(), e) var s = e(a, l, c, n, t, f);
  11998. if (s === T ? !Mt(l, a, 3, e, f) : !s) return false;
  11999. }
  12000. }
  12001. return true;
  12002. }
  12003. function Ft(n) {
  12004. return !(!gu(n) || fi && fi in n) && (pu(n) ? si : dn).test(Me(n));
  12005. }
  12006. function Nt(n) {
  12007. return du(n) && "[object RegExp]" == Ot(n);
  12008. }
  12009. function Pt(n) {
  12010. return du(n) && "[object Set]" == _o(n);
  12011. }
  12012. function Zt(n) {
  12013. return du(n) && vu(n.length) && !!Bn[Ot(n)];
  12014. }
  12015. function qt(n) {
  12016. return typeof n == "function" ? n : null == n ? Tu : _typeof(n) == "object" ? of(n) ? Jt(n[0], n[1]) : Ht(n) : Pu(n);
  12017. }
  12018. function Vt(n) {
  12019. if (!ze(n)) return Bi(n);
  12020. var t,
  12021. r = [];
  12022. for (t in Yu(n)) {
  12023. ii.call(n, t) && "constructor" != t && r.push(t);
  12024. }
  12025. return r;
  12026. }
  12027. function Kt(n, t) {
  12028. return n < t;
  12029. }
  12030. function Gt(n, t) {
  12031. var r = -1,
  12032. e = lu(n) ? Vu(n.length) : [];
  12033. return eo(n, function (n, u, i) {
  12034. e[++r] = t(n, u, i);
  12035. }), e;
  12036. }
  12037. function Ht(n) {
  12038. var t = xe(n);
  12039. return 1 == t.length && t[0][2] ? We(t[0][0], t[0][1]) : function (r) {
  12040. return r === n || $t(r, n, t);
  12041. };
  12042. }
  12043. function Jt(n, t) {
  12044. return Ie(n) && t === t && !gu(t) ? We(De(n), t) : function (r) {
  12045. var e = Iu(r, n);
  12046. return e === T && e === t ? Ru(r, n) : Mt(t, e, 3);
  12047. };
  12048. }
  12049. function Yt(n, t, r, e, u) {
  12050. n !== t && io(t, function (i, o) {
  12051. if (gu(i)) {
  12052. u || (u = new Zn());
  12053. var f = u,
  12054. c = "__proto__" == o ? T : n[o],
  12055. a = "__proto__" == o ? T : t[o],
  12056. l = f.get(a);
  12057. if (l) it(n, o, l);else {
  12058. var l = e ? e(c, a, o + "", n, t, f) : T,
  12059. s = l === T;
  12060. if (s) {
  12061. var h = of(a),
  12062. p = !h && cf(a),
  12063. _ = !h && !p && pf(a),
  12064. l = a;
  12065. h || p || _ ? of(c) ? l = c : su(c) ? l = Ur(c) : p ? (s = false, l = Ir(a, true)) : _ ? (s = false, l = zr(a, true)) : l = [] : bu(a) || uf(a) ? (l = c, uf(c) ? l = Su(c) : (!gu(c) || r && pu(c)) && (l = Ae(a))) : s = false;
  12066. }
  12067. s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l);
  12068. }
  12069. } else f = e ? e("__proto__" == o ? T : n[o], i, o + "", n, t, u) : T, f === T && (f = i), it(n, o, f);
  12070. }, Wu);
  12071. }
  12072. function Qt(n, t) {
  12073. var r = n.length;
  12074. if (r) return t += 0 > t ? r : 0, Se(t, r) ? n[t] : T;
  12075. }
  12076. function Xt(n, t, r) {
  12077. var e = -1;
  12078. return t = c(t.length ? t : [Tu], k(ye())), n = Gt(n, function (n) {
  12079. return {
  12080. a: c(t, function (t) {
  12081. return t(n);
  12082. }),
  12083. b: ++e,
  12084. c: n
  12085. };
  12086. }), w(n, function (n, t) {
  12087. var e;
  12088. n: {
  12089. e = -1;
  12090. for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o;) {
  12091. var c = Wr(u[e], i[e]);
  12092. if (c) {
  12093. e = e >= f ? c : c * ("desc" == r[e] ? -1 : 1);
  12094. break n;
  12095. }
  12096. }
  12097. e = n.b - t.b;
  12098. }
  12099. return e;
  12100. });
  12101. }
  12102. function nr(n, t) {
  12103. return tr(n, t, function (t, r) {
  12104. return Ru(n, r);
  12105. });
  12106. }
  12107. function tr(n, t, r) {
  12108. for (var e = -1, u = t.length, i = {}; ++e < u;) {
  12109. var o = t[e],
  12110. f = kt(n, o);
  12111. r(f, o) && lr(i, Sr(o, n), f);
  12112. }
  12113. return i;
  12114. }
  12115. function rr(n) {
  12116. return function (t) {
  12117. return kt(t, n);
  12118. };
  12119. }
  12120. function er(n, t, r, e) {
  12121. var u = e ? g : v,
  12122. i = -1,
  12123. o = t.length,
  12124. f = n;
  12125. for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o;) {
  12126. for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e));) {
  12127. f !== n && bi.call(f, a, 1), bi.call(n, a, 1);
  12128. }
  12129. }
  12130. return n;
  12131. }
  12132. function ur(n, t) {
  12133. for (var r = n ? t.length : 0, e = r - 1; r--;) {
  12134. var u = t[r];
  12135. if (r == e || u !== i) {
  12136. var i = u;
  12137. Se(u) ? bi.call(n, u, 1) : xr(n, u);
  12138. }
  12139. }
  12140. }
  12141. function ir(n, t) {
  12142. return n + Oi(Mi() * (t - n + 1));
  12143. }
  12144. function or(n, t) {
  12145. var r = "";
  12146. if (!n || 1 > t || 9007199254740991 < t) return r;
  12147. do {
  12148. t % 2 && (r += n), (t = Oi(t / 2)) && (n += n);
  12149. } while (t);
  12150. return r;
  12151. }
  12152. function fr(n, t) {
  12153. return bo(Be(n, t, Tu), n + "");
  12154. }
  12155. function cr(n) {
  12156. return Qn(Lu(n));
  12157. }
  12158. function ar(n, t) {
  12159. var r = Lu(n);
  12160. return Ce(r, pt(t, 0, r.length));
  12161. }
  12162. function lr(n, t, r, e) {
  12163. if (!gu(n)) return n;
  12164. t = Sr(t, n);
  12165. for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i;) {
  12166. var c = De(t[u]),
  12167. a = r;
  12168. if (u != o) {
  12169. var l = f[c],
  12170. a = e ? e(l, c, f) : T;
  12171. a === T && (a = gu(l) ? l : Se(t[u + 1]) ? [] : {});
  12172. }
  12173. ot(f, c, a), f = f[c];
  12174. }
  12175. return n;
  12176. }
  12177. function sr(n) {
  12178. return Ce(Lu(n));
  12179. }
  12180. function hr(n, t, r) {
  12181. var e = -1,
  12182. u = n.length;
  12183. for (0 > t && (t = -t > u ? 0 : u + t), r = r > u ? u : r, 0 > r && (r += u), u = t > r ? 0 : r - t >>> 0, t >>>= 0, r = Vu(u); ++e < u;) {
  12184. r[e] = n[e + t];
  12185. }
  12186. return r;
  12187. }
  12188. function pr(n, t) {
  12189. var r;
  12190. return eo(n, function (n, e, u) {
  12191. return r = t(n, e, u), !r;
  12192. }), !!r;
  12193. }
  12194. function _r(n, t, r) {
  12195. var e = 0,
  12196. u = null == n ? e : n.length;
  12197. if (typeof t == "number" && t === t && 2147483647 >= u) {
  12198. for (; e < u;) {
  12199. var i = e + u >>> 1,
  12200. o = n[i];
  12201. null !== o && !ju(o) && (r ? o <= t : o < t) ? e = i + 1 : u = i;
  12202. }
  12203. return u;
  12204. }
  12205. return vr(n, t, Tu, r);
  12206. }
  12207. function vr(n, t, r, e) {
  12208. t = r(t);
  12209. for (var u = 0, i = null == n ? 0 : n.length, o = t !== t, f = null === t, c = ju(t), a = t === T; u < i;) {
  12210. var l = Oi((u + i) / 2),
  12211. s = r(n[l]),
  12212. h = s !== T,
  12213. p = null === s,
  12214. _ = s === s,
  12215. v = ju(s);
  12216. (o ? e || _ : a ? _ && (e || h) : f ? _ && h && (e || !p) : c ? _ && h && !p && (e || !v) : p || v ? 0 : e ? s <= t : s < t) ? u = l + 1 : i = l;
  12217. }
  12218. return Ui(i, 4294967294);
  12219. }
  12220. function gr(n, t) {
  12221. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  12222. var o = n[r],
  12223. f = t ? t(o) : o;
  12224. if (!r || !au(f, c)) {
  12225. var c = f;
  12226. i[u++] = 0 === o ? 0 : o;
  12227. }
  12228. }
  12229. return i;
  12230. }
  12231. function dr(n) {
  12232. return typeof n == "number" ? n : ju(n) ? F : +n;
  12233. }
  12234. function yr(n) {
  12235. if (typeof n == "string") return n;
  12236. if (of(n)) return c(n, yr) + "";
  12237. if (ju(n)) return to ? to.call(n) : "";
  12238. var t = n + "";
  12239. return "0" == t && 1 / n == -$ ? "-0" : t;
  12240. }
  12241. function br(n, t, r) {
  12242. var e = -1,
  12243. u = o,
  12244. i = n.length,
  12245. c = true,
  12246. a = [],
  12247. l = a;
  12248. if (r) c = false, u = f;else if (200 <= i) {
  12249. if (u = t ? null : lo(n)) return U(u);
  12250. c = false, u = O, l = new Nn();
  12251. } else l = t ? [] : a;
  12252. n: for (; ++e < i;) {
  12253. var s = n[e],
  12254. h = t ? t(s) : s,
  12255. s = r || 0 !== s ? s : 0;
  12256. if (c && h === h) {
  12257. for (var p = l.length; p--;) {
  12258. if (l[p] === h) continue n;
  12259. }
  12260. t && l.push(h), a.push(s);
  12261. } else u(l, h, r) || (l !== a && l.push(h), a.push(s));
  12262. }
  12263. return a;
  12264. }
  12265. function xr(n, t) {
  12266. return t = Sr(t, n), n = 2 > t.length ? n : kt(n, hr(t, 0, -1)), null == n || delete n[De(qe(t))];
  12267. }
  12268. function jr(n, t, r, e) {
  12269. for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n);) {
  12270. ;
  12271. }
  12272. return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i);
  12273. }
  12274. function wr(n, t) {
  12275. var r = n;
  12276. return r instanceof Un && (r = r.value()), l(t, function (n, t) {
  12277. return t.func.apply(t.thisArg, a([n], t.args));
  12278. }, r);
  12279. }
  12280. function mr(n, t, r) {
  12281. var e = n.length;
  12282. if (2 > e) return e ? br(n[0]) : [];
  12283. for (var u = -1, i = Vu(e); ++u < e;) {
  12284. for (var o = n[u], f = -1; ++f < e;) {
  12285. f != u && (i[u] = yt(i[u] || o, n[f], t, r));
  12286. }
  12287. }
  12288. return br(wt(i, 1), t, r);
  12289. }
  12290. function Ar(n, t, r) {
  12291. for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u;) {
  12292. r(o, n[e], e < i ? t[e] : T);
  12293. }
  12294. return o;
  12295. }
  12296. function Er(n) {
  12297. return su(n) ? n : [];
  12298. }
  12299. function kr(n) {
  12300. return typeof n == "function" ? n : Tu;
  12301. }
  12302. function Sr(n, t) {
  12303. return of(n) ? n : Ie(n, t) ? [n] : xo(Ou(n));
  12304. }
  12305. function Or(n, t, r) {
  12306. var e = n.length;
  12307. return r = r === T ? e : r, !t && r >= e ? n : hr(n, t, r);
  12308. }
  12309. function Ir(n, t) {
  12310. if (t) return n.slice();
  12311. var r = n.length,
  12312. r = vi ? vi(r) : new n.constructor(r);
  12313. return n.copy(r), r;
  12314. }
  12315. function Rr(n) {
  12316. var t = new n.constructor(n.byteLength);
  12317. return new _i(t).set(new _i(n)), t;
  12318. }
  12319. function zr(n, t) {
  12320. return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length);
  12321. }
  12322. function Wr(n, t) {
  12323. if (n !== t) {
  12324. var r = n !== T,
  12325. e = null === n,
  12326. u = n === n,
  12327. i = ju(n),
  12328. o = t !== T,
  12329. f = null === t,
  12330. c = t === t,
  12331. a = ju(t);
  12332. if (!f && !a && !i && n > t || i && o && c && !f && !a || e && o && c || !r && c || !u) return 1;
  12333. if (!e && !i && !a && n < t || a && r && u && !e && !i || f && r && u || !o && u || !c) return -1;
  12334. }
  12335. return 0;
  12336. }
  12337. function Br(n, t, r, e) {
  12338. var u = -1,
  12339. i = n.length,
  12340. o = r.length,
  12341. f = -1,
  12342. c = t.length,
  12343. a = Li(i - o, 0),
  12344. l = Vu(c + a);
  12345. for (e = !e; ++f < c;) {
  12346. l[f] = t[f];
  12347. }
  12348. for (; ++u < o;) {
  12349. (e || u < i) && (l[r[u]] = n[u]);
  12350. }
  12351. for (; a--;) {
  12352. l[f++] = n[u++];
  12353. }
  12354. return l;
  12355. }
  12356. function Lr(n, t, r, e) {
  12357. var u = -1,
  12358. i = n.length,
  12359. o = -1,
  12360. f = r.length,
  12361. c = -1,
  12362. a = t.length,
  12363. l = Li(i - f, 0),
  12364. s = Vu(l + a);
  12365. for (e = !e; ++u < l;) {
  12366. s[u] = n[u];
  12367. }
  12368. for (l = u; ++c < a;) {
  12369. s[l + c] = t[c];
  12370. }
  12371. for (; ++o < f;) {
  12372. (e || u < i) && (s[l + r[o]] = n[u++]);
  12373. }
  12374. return s;
  12375. }
  12376. function Ur(n, t) {
  12377. var r = -1,
  12378. e = n.length;
  12379. for (t || (t = Vu(e)); ++r < e;) {
  12380. t[r] = n[r];
  12381. }
  12382. return t;
  12383. }
  12384. function Cr(n, t, r, e) {
  12385. var u = !r;
  12386. r || (r = {});
  12387. for (var i = -1, o = t.length; ++i < o;) {
  12388. var f = t[i],
  12389. c = e ? e(r[f], n[f], f, r, n) : T;
  12390. c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c);
  12391. }
  12392. return r;
  12393. }
  12394. function Dr(n, t) {
  12395. return Cr(n, ho(n), t);
  12396. }
  12397. function Mr(n, t) {
  12398. return Cr(n, po(n), t);
  12399. }
  12400. function Tr(n, r) {
  12401. return function (e, u) {
  12402. var i = of(e) ? t : ct,
  12403. o = r ? r() : {};
  12404. return i(e, n, ye(u, 2), o);
  12405. };
  12406. }
  12407. function $r(n) {
  12408. return fr(function (t, r) {
  12409. var e = -1,
  12410. u = r.length,
  12411. i = 1 < u ? r[u - 1] : T,
  12412. o = 2 < u ? r[2] : T,
  12413. i = 3 < n.length && typeof i == "function" ? (u--, i) : T;
  12414. for (o && Oe(r[0], r[1], o) && (i = 3 > u ? T : i, u = 1), t = Yu(t); ++e < u;) {
  12415. (o = r[e]) && n(t, o, e, i);
  12416. }
  12417. return t;
  12418. });
  12419. }
  12420. function Fr(n, t) {
  12421. return function (r, e) {
  12422. if (null == r) return r;
  12423. if (!lu(r)) return n(r, e);
  12424. for (var u = r.length, i = t ? u : -1, o = Yu(r); (t ? i-- : ++i < u) && false !== e(o[i], i, o);) {
  12425. ;
  12426. }
  12427. return r;
  12428. };
  12429. }
  12430. function Nr(n) {
  12431. return function (t, r, e) {
  12432. var u = -1,
  12433. i = Yu(t);
  12434. e = e(t);
  12435. for (var o = e.length; o--;) {
  12436. var f = e[n ? o : ++u];
  12437. if (false === r(i[f], f, i)) break;
  12438. }
  12439. return t;
  12440. };
  12441. }
  12442. function Pr(n, t, r) {
  12443. function e() {
  12444. return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments);
  12445. }
  12446. var u = 1 & t,
  12447. i = Vr(n);
  12448. return e;
  12449. }
  12450. function Zr(n) {
  12451. return function (t) {
  12452. t = Ou(t);
  12453. var r = Rn.test(t) ? M(t) : T,
  12454. e = r ? r[0] : t.charAt(0);
  12455. return t = r ? Or(r, 1).join("") : t.slice(1), e[n]() + t;
  12456. };
  12457. }
  12458. function qr(n) {
  12459. return function (t) {
  12460. return l(Du(Cu(t).replace(kn, "")), n, "");
  12461. };
  12462. }
  12463. function Vr(n) {
  12464. return function () {
  12465. var t = arguments;
  12466. switch (t.length) {
  12467. case 0:
  12468. return new n();
  12469. case 1:
  12470. return new n(t[0]);
  12471. case 2:
  12472. return new n(t[0], t[1]);
  12473. case 3:
  12474. return new n(t[0], t[1], t[2]);
  12475. case 4:
  12476. return new n(t[0], t[1], t[2], t[3]);
  12477. case 5:
  12478. return new n(t[0], t[1], t[2], t[3], t[4]);
  12479. case 6:
  12480. return new n(t[0], t[1], t[2], t[3], t[4], t[5]);
  12481. case 7:
  12482. return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]);
  12483. }
  12484. var r = ro(n.prototype),
  12485. t = n.apply(r, t);
  12486. return gu(t) ? t : r;
  12487. };
  12488. }
  12489. function Kr(t, r, e) {
  12490. function u() {
  12491. for (var o = arguments.length, f = Vu(o), c = o, a = de(u); c--;) {
  12492. f[c] = arguments[c];
  12493. }
  12494. return c = 3 > o && f[0] !== a && f[o - 1] !== a ? [] : L(f, a), o -= c.length, o < e ? ue(t, r, Jr, u.placeholder, T, f, c, T, T, e - o) : n(this && this !== $n && this instanceof u ? i : t, this, f);
  12495. }
  12496. var i = Vr(t);
  12497. return u;
  12498. }
  12499. function Gr(n) {
  12500. return function (t, r, e) {
  12501. var u = Yu(t);
  12502. if (!lu(t)) {
  12503. var i = ye(r, 3);
  12504. t = zu(t), r = function r(n) {
  12505. return i(u[n], n, u);
  12506. };
  12507. }
  12508. return r = n(t, r, e), -1 < r ? u[i ? t[r] : r] : T;
  12509. };
  12510. }
  12511. function Hr(n) {
  12512. return pe(function (t) {
  12513. var r = t.length,
  12514. e = r,
  12515. u = On.prototype.thru;
  12516. for (n && t.reverse(); e--;) {
  12517. var i = t[e];
  12518. if (typeof i != "function") throw new ni("Expected a function");
  12519. if (u && !o && "wrapper" == ge(i)) var o = new On([], true);
  12520. }
  12521. for (e = o ? e : r; ++e < r;) {
  12522. var i = t[e],
  12523. u = ge(i),
  12524. f = "wrapper" == u ? so(i) : T,
  12525. o = f && Re(f[0]) && 424 == f[1] && !f[4].length && 1 == f[9] ? o[ge(f[0])].apply(o, f[3]) : 1 == i.length && Re(i) ? o[u]() : o.thru(i);
  12526. }
  12527. return function () {
  12528. var n = arguments,
  12529. e = n[0];
  12530. if (o && 1 == n.length && of(e)) return o.plant(e).value();
  12531. for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r;) {
  12532. n = t[u].call(this, n);
  12533. }
  12534. return n;
  12535. };
  12536. });
  12537. }
  12538. function Jr(n, t, r, e, u, i, o, f, c, a) {
  12539. function l() {
  12540. for (var d = arguments.length, y = Vu(d), b = d; b--;) {
  12541. y[b] = arguments[b];
  12542. }
  12543. if (_) {
  12544. var x,
  12545. j = de(l),
  12546. b = y.length;
  12547. for (x = 0; b--;) {
  12548. y[b] === j && ++x;
  12549. }
  12550. }
  12551. if (e && (y = Br(y, e, u, _)), i && (y = Lr(y, i, o, _)), d -= x, _ && d < a) return j = L(y, j), ue(n, t, Jr, l.placeholder, r, y, j, f, c, a - d);
  12552. if (j = h ? r : this, b = p ? j[n] : n, d = y.length, f) {
  12553. x = y.length;
  12554. for (var w = Ui(f.length, x), m = Ur(y); w--;) {
  12555. var A = f[w];
  12556. y[w] = Se(A, x) ? m[A] : T;
  12557. }
  12558. } else v && 1 < d && y.reverse();
  12559. return s && c < d && (y.length = c), this && this !== $n && this instanceof l && (b = g || Vr(b)), b.apply(j, y);
  12560. }
  12561. var s = 128 & t,
  12562. h = 1 & t,
  12563. p = 2 & t,
  12564. _ = 24 & t,
  12565. v = 512 & t,
  12566. g = p ? T : Vr(n);
  12567. return l;
  12568. }
  12569. function Yr(n, t) {
  12570. return function (r, e) {
  12571. return Bt(r, n, t(e));
  12572. };
  12573. }
  12574. function Qr(n, t) {
  12575. return function (r, e) {
  12576. var u;
  12577. if (r === T && e === T) return t;
  12578. if (r !== T && (u = r), e !== T) {
  12579. if (u === T) return e;
  12580. typeof r == "string" || typeof e == "string" ? (r = yr(r), e = yr(e)) : (r = dr(r), e = dr(e)), u = n(r, e);
  12581. }
  12582. return u;
  12583. };
  12584. }
  12585. function Xr(t) {
  12586. return pe(function (r) {
  12587. return r = c(r, k(ye())), fr(function (e) {
  12588. var u = this;
  12589. return t(r, function (t) {
  12590. return n(t, u, e);
  12591. });
  12592. });
  12593. });
  12594. }
  12595. function ne(n, t) {
  12596. t = t === T ? " " : yr(t);
  12597. var r = t.length;
  12598. return 2 > r ? r ? or(t, n) : t : (r = or(t, Si(n / D(t))), Rn.test(t) ? Or(M(r), 0, n).join("") : r.slice(0, n));
  12599. }
  12600. function te(t, r, e, u) {
  12601. function i() {
  12602. for (var r = -1, c = arguments.length, a = -1, l = u.length, s = Vu(l + c), h = this && this !== $n && this instanceof i ? f : t; ++a < l;) {
  12603. s[a] = u[a];
  12604. }
  12605. for (; c--;) {
  12606. s[a++] = arguments[++r];
  12607. }
  12608. return n(h, o ? e : this, s);
  12609. }
  12610. var o = 1 & r,
  12611. f = Vr(t);
  12612. return i;
  12613. }
  12614. function re(n) {
  12615. return function (t, r, e) {
  12616. e && typeof e != "number" && Oe(t, r, e) && (r = e = T), t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), e = e === T ? t < r ? 1 : -1 : mu(e);
  12617. var u = -1;
  12618. r = Li(Si((r - t) / (e || 1)), 0);
  12619. for (var i = Vu(r); r--;) {
  12620. i[n ? r : ++u] = t, t += e;
  12621. }
  12622. return i;
  12623. };
  12624. }
  12625. function ee(n) {
  12626. return function (t, r) {
  12627. return typeof t == "string" && typeof r == "string" || (t = ku(t), r = ku(r)), n(t, r);
  12628. };
  12629. }
  12630. function ue(n, t, r, e, u, i, o, f, c, a) {
  12631. var l = 8 & t,
  12632. s = l ? o : T;
  12633. o = l ? T : o;
  12634. var h = l ? i : T;
  12635. return i = l ? T : i, t = (t | (l ? 32 : 64)) & ~(l ? 64 : 32), 4 & t || (t &= -4), u = [n, t, u, h, s, i, o, f, c, a], r = r.apply(T, u), Re(n) && go(r, u), r.placeholder = e, Le(r, n, t);
  12636. }
  12637. function ie(n) {
  12638. var t = Ju[n];
  12639. return function (n, r) {
  12640. if (n = ku(n), r = null == r ? 0 : Ui(Au(r), 292)) {
  12641. var e = (Ou(n) + "e").split("e"),
  12642. e = t(e[0] + "e" + (+e[1] + r)),
  12643. e = (Ou(e) + "e").split("e");
  12644. return +(e[0] + "e" + (+e[1] - r));
  12645. }
  12646. return t(n);
  12647. };
  12648. }
  12649. function oe(n) {
  12650. return function (t) {
  12651. var r = _o(t);
  12652. return "[object Map]" == r ? W(t) : "[object Set]" == r ? C(t) : E(t, n(t));
  12653. };
  12654. }
  12655. function fe(n, t, r, e, u, i, o, f) {
  12656. var c = 2 & t;
  12657. if (!c && typeof n != "function") throw new ni("Expected a function");
  12658. var a = e ? e.length : 0;
  12659. if (a || (t &= -97, e = u = T), o = o === T ? o : Li(Au(o), 0), f = f === T ? f : Au(f), a -= u ? u.length : 0, 64 & t) {
  12660. var l = e,
  12661. s = u;
  12662. e = u = T;
  12663. }
  12664. var h = c ? T : so(n);
  12665. return i = [n, t, r, e, u, l, s, i, o, f], h && (r = i[1], n = h[1], t = r | n, e = 128 == n && 8 == r || 128 == n && 256 == r && i[7].length <= h[8] || 384 == n && h[7].length <= h[8] && 8 == r, 131 > t || e) && (1 & n && (i[2] = h[2], t |= 1 & r ? 0 : 4), (r = h[3]) && (e = i[3], i[3] = e ? Br(e, r, h[4]) : r, i[4] = e ? L(i[3], "__lodash_placeholder__") : h[4]), (r = h[5]) && (e = i[5], i[5] = e ? Lr(e, r, h[6]) : r, i[6] = e ? L(i[5], "__lodash_placeholder__") : h[6]), (r = h[7]) && (i[7] = r), 128 & n && (i[8] = null == i[8] ? h[8] : Ui(i[8], h[8])), null == i[9] && (i[9] = h[9]), i[0] = h[0], i[1] = t), n = i[0], t = i[1], r = i[2], e = i[3], u = i[4], f = i[9] = i[9] === T ? c ? 0 : n.length : Li(i[9] - a, 0), !f && 24 & t && (t &= -25), Le((h ? fo : go)(t && 1 != t ? 8 == t || 16 == t ? Kr(n, t, f) : 32 != t && 33 != t || u.length ? Jr.apply(T, i) : te(n, t, r, e) : Pr(n, t, r), i), n, t);
  12666. }
  12667. function ce(n, t, r, e) {
  12668. return n === T || au(n, ri[r]) && !ii.call(e, r) ? t : n;
  12669. }
  12670. function ae(n, t, r, e, u, i) {
  12671. return gu(n) && gu(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n;
  12672. }
  12673. function le(n) {
  12674. return bu(n) ? T : n;
  12675. }
  12676. function se(n, t, r, e, u, i) {
  12677. var o = 1 & r,
  12678. f = n.length,
  12679. c = t.length;
  12680. if (f != c && !(o && c > f)) return false;
  12681. if ((c = i.get(n)) && i.get(t)) return c == t;
  12682. var c = -1,
  12683. a = true,
  12684. l = 2 & r ? new Nn() : T;
  12685. for (i.set(n, t), i.set(t, n); ++c < f;) {
  12686. var s = n[c],
  12687. p = t[c];
  12688. if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i);
  12689. if (_ !== T) {
  12690. if (_) continue;
  12691. a = false;
  12692. break;
  12693. }
  12694. if (l) {
  12695. if (!h(t, function (n, t) {
  12696. if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t);
  12697. })) {
  12698. a = false;
  12699. break;
  12700. }
  12701. } else if (s !== p && !u(s, p, r, e, i)) {
  12702. a = false;
  12703. break;
  12704. }
  12705. }
  12706. return i.delete(n), i.delete(t), a;
  12707. }
  12708. function he(n, t, r, e, u, i, o) {
  12709. switch (r) {
  12710. case "[object DataView]":
  12711. if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break;
  12712. n = n.buffer, t = t.buffer;
  12713. case "[object ArrayBuffer]":
  12714. if (n.byteLength != t.byteLength || !i(new _i(n), new _i(t))) break;
  12715. return true;
  12716. case "[object Boolean]":
  12717. case "[object Date]":
  12718. case "[object Number]":
  12719. return au(+n, +t);
  12720. case "[object Error]":
  12721. return n.name == t.name && n.message == t.message;
  12722. case "[object RegExp]":
  12723. case "[object String]":
  12724. return n == t + "";
  12725. case "[object Map]":
  12726. var f = W;
  12727. case "[object Set]":
  12728. if (f || (f = U), n.size != t.size && !(1 & e)) break;
  12729. return (r = o.get(n)) ? r == t : (e |= 2, o.set(n, t), t = se(f(n), f(t), e, u, i, o), o.delete(n), t);
  12730. case "[object Symbol]":
  12731. if (no) return no.call(n) == no.call(t);
  12732. }
  12733. return false;
  12734. }
  12735. function pe(n) {
  12736. return bo(Be(n, T, Pe), n + "");
  12737. }
  12738. function _e(n) {
  12739. return St(n, zu, ho);
  12740. }
  12741. function ve(n) {
  12742. return St(n, Wu, po);
  12743. }
  12744. function ge(n) {
  12745. for (var t = n.name + "", r = Ki[t], e = ii.call(Ki, t) ? r.length : 0; e--;) {
  12746. var u = r[e],
  12747. i = u.func;
  12748. if (null == i || i == n) return u.name;
  12749. }
  12750. return t;
  12751. }
  12752. function de(n) {
  12753. return (ii.call(An, "placeholder") ? An : n).placeholder;
  12754. }
  12755. function ye() {
  12756. var n = An.iteratee || $u,
  12757. n = n === $u ? qt : n;
  12758. return arguments.length ? n(arguments[0], arguments[1]) : n;
  12759. }
  12760. function be(n, t) {
  12761. var r = n.__data__,
  12762. e = _typeof(t);
  12763. return ("string" == e || "number" == e || "symbol" == e || "boolean" == e ? "__proto__" !== t : null === t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
  12764. }
  12765. function xe(n) {
  12766. for (var t = zu(n), r = t.length; r--;) {
  12767. var e = t[r],
  12768. u = n[e];
  12769. t[r] = [e, u, u === u && !gu(u)];
  12770. }
  12771. return t;
  12772. }
  12773. function je(n, t) {
  12774. var r = null == n ? T : n[t];
  12775. return Ft(r) ? r : T;
  12776. }
  12777. function we(n, t, r) {
  12778. t = Sr(t, n);
  12779. for (var e = -1, u = t.length, i = false; ++e < u;) {
  12780. var o = De(t[e]);
  12781. if (!(i = null != n && r(n, o))) break;
  12782. n = n[o];
  12783. }
  12784. return i || ++e != u ? i : (u = null == n ? 0 : n.length, !!u && vu(u) && Se(o, u) && (of(n) || uf(n)));
  12785. }
  12786. function me(n) {
  12787. var t = n.length,
  12788. r = new n.constructor(t);
  12789. return t && "string" == typeof n[0] && ii.call(n, "index") && (r.index = n.index, r.input = n.input), r;
  12790. }
  12791. function Ae(n) {
  12792. return typeof n.constructor != "function" || ze(n) ? {} : ro(gi(n));
  12793. }
  12794. function Ee(n, t, r) {
  12795. var e = n.constructor;
  12796. switch (t) {
  12797. case "[object ArrayBuffer]":
  12798. return Rr(n);
  12799. case "[object Boolean]":
  12800. case "[object Date]":
  12801. return new e(+n);
  12802. case "[object DataView]":
  12803. return t = r ? Rr(n.buffer) : n.buffer, new n.constructor(t, n.byteOffset, n.byteLength);
  12804. case "[object Float32Array]":
  12805. case "[object Float64Array]":
  12806. case "[object Int8Array]":
  12807. case "[object Int16Array]":
  12808. case "[object Int32Array]":
  12809. case "[object Uint8Array]":
  12810. case "[object Uint8ClampedArray]":
  12811. case "[object Uint16Array]":
  12812. case "[object Uint32Array]":
  12813. return zr(n, r);
  12814. case "[object Map]":
  12815. return new e();
  12816. case "[object Number]":
  12817. case "[object String]":
  12818. return new e(n);
  12819. case "[object RegExp]":
  12820. return t = new n.constructor(n.source, _n.exec(n)), t.lastIndex = n.lastIndex, t;
  12821. case "[object Set]":
  12822. return new e();
  12823. case "[object Symbol]":
  12824. return no ? Yu(no.call(n)) : {};
  12825. }
  12826. }
  12827. function ke(n) {
  12828. return of(n) || uf(n) || !!(xi && n && n[xi]);
  12829. }
  12830. function Se(n, t) {
  12831. var r = _typeof(n);
  12832. return t = null == t ? 9007199254740991 : t, !!t && ("number" == r || "symbol" != r && bn.test(n)) && -1 < n && 0 == n % 1 && n < t;
  12833. }
  12834. function Oe(n, t, r) {
  12835. if (!gu(r)) return false;
  12836. var e = _typeof(t);
  12837. return !!("number" == e ? lu(r) && Se(t, r.length) : "string" == e && t in r) && au(r[t], n);
  12838. }
  12839. function Ie(n, t) {
  12840. if (of(n)) return false;
  12841. var r = _typeof(n);
  12842. return !("number" != r && "symbol" != r && "boolean" != r && null != n && !ju(n)) || nn.test(n) || !X.test(n) || null != t && n in Yu(t);
  12843. }
  12844. function Re(n) {
  12845. var t = ge(n),
  12846. r = An[t];
  12847. return typeof r == "function" && t in Un.prototype && (n === r || (t = so(r), !!t && n === t[0]));
  12848. }
  12849. function ze(n) {
  12850. var t = n && n.constructor;
  12851. return n === (typeof t == "function" && t.prototype || ri);
  12852. }
  12853. function We(n, t) {
  12854. return function (r) {
  12855. return null != r && r[n] === t && (t !== T || n in Yu(r));
  12856. };
  12857. }
  12858. function Be(t, r, e) {
  12859. return r = Li(r === T ? t.length - 1 : r, 0), function () {
  12860. for (var u = arguments, i = -1, o = Li(u.length - r, 0), f = Vu(o); ++i < o;) {
  12861. f[i] = u[r + i];
  12862. }
  12863. for (i = -1, o = Vu(r + 1); ++i < r;) {
  12864. o[i] = u[i];
  12865. }
  12866. return o[r] = e(f), n(t, this, o);
  12867. };
  12868. }
  12869. function Le(n, t, r) {
  12870. var e = t + "";
  12871. t = bo;
  12872. var u,
  12873. i = Te;
  12874. return u = (u = e.match(an)) ? u[1].split(ln) : [], r = i(u, r), (i = r.length) && (u = i - 1, r[u] = (1 < i ? "& " : "") + r[u], r = r.join(2 < i ? ", " : " "), e = e.replace(cn, "{\n/* [wrapped with " + r + "] */\n")), t(n, e);
  12875. }
  12876. function Ue(n) {
  12877. var t = 0,
  12878. r = 0;
  12879. return function () {
  12880. var e = Ci(),
  12881. u = 16 - (e - r);
  12882. if (r = e, 0 < u) {
  12883. if (800 <= ++t) return arguments[0];
  12884. } else t = 0;
  12885. return n.apply(T, arguments);
  12886. };
  12887. }
  12888. function Ce(n, t) {
  12889. var r = -1,
  12890. e = n.length,
  12891. u = e - 1;
  12892. for (t = t === T ? e : t; ++r < t;) {
  12893. var e = ir(r, u),
  12894. i = n[e];
  12895. n[e] = n[r], n[r] = i;
  12896. }
  12897. return n.length = t, n;
  12898. }
  12899. function De(n) {
  12900. if (typeof n == "string" || ju(n)) return n;
  12901. var t = n + "";
  12902. return "0" == t && 1 / n == -$ ? "-0" : t;
  12903. }
  12904. function Me(n) {
  12905. if (null != n) {
  12906. try {
  12907. return ui.call(n);
  12908. } catch (n) {}
  12909. return n + "";
  12910. }
  12911. return "";
  12912. }
  12913. function Te(n, t) {
  12914. return r(N, function (r) {
  12915. var e = "_." + r[0];
  12916. t & r[1] && !o(n, e) && n.push(e);
  12917. }), n.sort();
  12918. }
  12919. function $e(n) {
  12920. if (n instanceof Un) return n.clone();
  12921. var t = new On(n.__wrapped__, n.__chain__);
  12922. return t.__actions__ = Ur(n.__actions__), t.__index__ = n.__index__, t.__values__ = n.__values__, t;
  12923. }
  12924. function Fe(n, t, r) {
  12925. var e = null == n ? 0 : n.length;
  12926. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), _(n, ye(t, 3), r)) : -1;
  12927. }
  12928. function Ne(n, t, r) {
  12929. var e = null == n ? 0 : n.length;
  12930. if (!e) return -1;
  12931. var u = e - 1;
  12932. return r !== T && (u = Au(r), u = 0 > r ? Li(e + u, 0) : Ui(u, e - 1)), _(n, ye(t, 3), u, true);
  12933. }
  12934. function Pe(n) {
  12935. return (null == n ? 0 : n.length) ? wt(n, 1) : [];
  12936. }
  12937. function Ze(n) {
  12938. return n && n.length ? n[0] : T;
  12939. }
  12940. function qe(n) {
  12941. var t = null == n ? 0 : n.length;
  12942. return t ? n[t - 1] : T;
  12943. }
  12944. function Ve(n, t) {
  12945. return n && n.length && t && t.length ? er(n, t) : n;
  12946. }
  12947. function Ke(n) {
  12948. return null == n ? n : Ti.call(n);
  12949. }
  12950. function Ge(n) {
  12951. if (!n || !n.length) return [];
  12952. var t = 0;
  12953. return n = i(n, function (n) {
  12954. if (su(n)) return t = Li(n.length, t), true;
  12955. }), A(t, function (t) {
  12956. return c(n, b(t));
  12957. });
  12958. }
  12959. function He(t, r) {
  12960. if (!t || !t.length) return [];
  12961. var e = Ge(t);
  12962. return null == r ? e : c(e, function (t) {
  12963. return n(r, T, t);
  12964. });
  12965. }
  12966. function Je(n) {
  12967. return n = An(n), n.__chain__ = true, n;
  12968. }
  12969. function Ye(n, t) {
  12970. return t(n);
  12971. }
  12972. function Qe() {
  12973. return this;
  12974. }
  12975. function Xe(n, t) {
  12976. return (of(n) ? r : eo)(n, ye(t, 3));
  12977. }
  12978. function nu(n, t) {
  12979. return (of(n) ? e : uo)(n, ye(t, 3));
  12980. }
  12981. function tu(n, t) {
  12982. return (of(n) ? c : Gt)(n, ye(t, 3));
  12983. }
  12984. function ru(n, t, r) {
  12985. return t = r ? T : t, t = n && null == t ? n.length : t, fe(n, 128, T, T, T, T, t);
  12986. }
  12987. function eu(n, t) {
  12988. var r;
  12989. if (typeof t != "function") throw new ni("Expected a function");
  12990. return n = Au(n), function () {
  12991. return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r;
  12992. };
  12993. }
  12994. function uu(n, t, r) {
  12995. return t = r ? T : t, n = fe(n, 8, T, T, T, T, T, t), n.placeholder = uu.placeholder, n;
  12996. }
  12997. function iu(n, t, r) {
  12998. return t = r ? T : t, n = fe(n, 16, T, T, T, T, T, t), n.placeholder = iu.placeholder, n;
  12999. }
  13000. function ou(n, t, r) {
  13001. function e(t) {
  13002. var r = c,
  13003. e = a;
  13004. return c = a = T, _ = t, s = n.apply(e, r);
  13005. }
  13006. function u(n) {
  13007. var r = n - p;
  13008. return n -= _, p === T || r >= t || 0 > r || g && n >= l;
  13009. }
  13010. function i() {
  13011. var n = Ko();
  13012. if (u(n)) return o(n);
  13013. var r,
  13014. e = yo;
  13015. r = n - _, n = t - (n - p), r = g ? Ui(n, l - r) : n, h = e(i, r);
  13016. }
  13017. function o(n) {
  13018. return h = T, d && c ? e(n) : (c = a = T, s);
  13019. }
  13020. function f() {
  13021. var n = Ko(),
  13022. r = u(n);
  13023. if (c = arguments, a = this, p = n, r) {
  13024. if (h === T) return _ = n = p, h = yo(i, t), v ? e(n) : s;
  13025. if (g) return h = yo(i, t), e(p);
  13026. }
  13027. return h === T && (h = yo(i, t)), s;
  13028. }
  13029. var c,
  13030. a,
  13031. l,
  13032. s,
  13033. h,
  13034. p,
  13035. _ = 0,
  13036. v = false,
  13037. g = false,
  13038. d = true;
  13039. if (typeof n != "function") throw new ni("Expected a function");
  13040. return t = ku(t) || 0, gu(r) && (v = !!r.leading, l = (g = "maxWait" in r) ? Li(ku(r.maxWait) || 0, t) : l, d = "trailing" in r ? !!r.trailing : d), f.cancel = function () {
  13041. h !== T && ao(h), _ = 0, c = p = a = h = T;
  13042. }, f.flush = function () {
  13043. return h === T ? s : o(Ko());
  13044. }, f;
  13045. }
  13046. function fu(n, t) {
  13047. function r() {
  13048. var e = arguments,
  13049. u = t ? t.apply(this, e) : e[0],
  13050. i = r.cache;
  13051. return i.has(u) ? i.get(u) : (e = n.apply(this, e), r.cache = i.set(u, e) || i, e);
  13052. }
  13053. if (typeof n != "function" || null != t && typeof t != "function") throw new ni("Expected a function");
  13054. return r.cache = new (fu.Cache || Fn)(), r;
  13055. }
  13056. function cu(n) {
  13057. if (typeof n != "function") throw new ni("Expected a function");
  13058. return function () {
  13059. var t = arguments;
  13060. switch (t.length) {
  13061. case 0:
  13062. return !n.call(this);
  13063. case 1:
  13064. return !n.call(this, t[0]);
  13065. case 2:
  13066. return !n.call(this, t[0], t[1]);
  13067. case 3:
  13068. return !n.call(this, t[0], t[1], t[2]);
  13069. }
  13070. return !n.apply(this, t);
  13071. };
  13072. }
  13073. function au(n, t) {
  13074. return n === t || n !== n && t !== t;
  13075. }
  13076. function lu(n) {
  13077. return null != n && vu(n.length) && !pu(n);
  13078. }
  13079. function su(n) {
  13080. return du(n) && lu(n);
  13081. }
  13082. function hu(n) {
  13083. if (!du(n)) return false;
  13084. var t = Ot(n);
  13085. return "[object Error]" == t || "[object DOMException]" == t || typeof n.message == "string" && typeof n.name == "string" && !bu(n);
  13086. }
  13087. function pu(n) {
  13088. return !!gu(n) && (n = Ot(n), "[object Function]" == n || "[object GeneratorFunction]" == n || "[object AsyncFunction]" == n || "[object Proxy]" == n);
  13089. }
  13090. function _u(n) {
  13091. return typeof n == "number" && n == Au(n);
  13092. }
  13093. function vu(n) {
  13094. return typeof n == "number" && -1 < n && 0 == n % 1 && 9007199254740991 >= n;
  13095. }
  13096. function gu(n) {
  13097. var t = _typeof(n);
  13098. return null != n && ("object" == t || "function" == t);
  13099. }
  13100. function du(n) {
  13101. return null != n && _typeof(n) == "object";
  13102. }
  13103. function yu(n) {
  13104. return typeof n == "number" || du(n) && "[object Number]" == Ot(n);
  13105. }
  13106. function bu(n) {
  13107. return !(!du(n) || "[object Object]" != Ot(n)) && (n = gi(n), null === n || (n = ii.call(n, "constructor") && n.constructor, typeof n == "function" && n instanceof n && ui.call(n) == ai));
  13108. }
  13109. function xu(n) {
  13110. return typeof n == "string" || !of(n) && du(n) && "[object String]" == Ot(n);
  13111. }
  13112. function ju(n) {
  13113. return _typeof(n) == "symbol" || du(n) && "[object Symbol]" == Ot(n);
  13114. }
  13115. function wu(n) {
  13116. if (!n) return [];
  13117. if (lu(n)) return xu(n) ? M(n) : Ur(n);
  13118. if (ji && n[ji]) {
  13119. n = n[ji]();
  13120. for (var t, r = []; !(t = n.next()).done;) {
  13121. r.push(t.value);
  13122. }
  13123. return r;
  13124. }
  13125. return t = _o(n), ("[object Map]" == t ? W : "[object Set]" == t ? U : Lu)(n);
  13126. }
  13127. function mu(n) {
  13128. return n ? (n = ku(n), n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) : 0 === n ? n : 0;
  13129. }
  13130. function Au(n) {
  13131. n = mu(n);
  13132. var t = n % 1;
  13133. return n === n ? t ? n - t : n : 0;
  13134. }
  13135. function Eu(n) {
  13136. return n ? pt(Au(n), 0, 4294967295) : 0;
  13137. }
  13138. function ku(n) {
  13139. if (typeof n == "number") return n;
  13140. if (ju(n)) return F;
  13141. if (gu(n) && (n = typeof n.valueOf == "function" ? n.valueOf() : n, n = gu(n) ? n + "" : n), typeof n != "string") return 0 === n ? n : +n;
  13142. n = n.replace(un, "");
  13143. var t = gn.test(n);
  13144. return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n;
  13145. }
  13146. function Su(n) {
  13147. return Cr(n, Wu(n));
  13148. }
  13149. function Ou(n) {
  13150. return null == n ? "" : yr(n);
  13151. }
  13152. function Iu(n, t, r) {
  13153. return n = null == n ? T : kt(n, t), n === T ? r : n;
  13154. }
  13155. function Ru(n, t) {
  13156. return null != n && we(n, t, zt);
  13157. }
  13158. function zu(n) {
  13159. return lu(n) ? qn(n) : Vt(n);
  13160. }
  13161. function Wu(n) {
  13162. if (lu(n)) n = qn(n, true);else if (gu(n)) {
  13163. var t,
  13164. r = ze(n),
  13165. e = [];
  13166. for (t in n) {
  13167. ("constructor" != t || !r && ii.call(n, t)) && e.push(t);
  13168. }
  13169. n = e;
  13170. } else {
  13171. if (t = [], null != n) for (r in Yu(n)) {
  13172. t.push(r);
  13173. }
  13174. n = t;
  13175. }
  13176. return n;
  13177. }
  13178. function Bu(n, t) {
  13179. if (null == n) return {};
  13180. var r = c(ve(n), function (n) {
  13181. return [n];
  13182. });
  13183. return t = ye(t), tr(n, r, function (n, r) {
  13184. return t(n, r[0]);
  13185. });
  13186. }
  13187. function Lu(n) {
  13188. return null == n ? [] : S(n, zu(n));
  13189. }
  13190. function Uu(n) {
  13191. return Tf(Ou(n).toLowerCase());
  13192. }
  13193. function Cu(n) {
  13194. return (n = Ou(n)) && n.replace(xn, Xn).replace(Sn, "");
  13195. }
  13196. function Du(n, t, r) {
  13197. return n = Ou(n), t = r ? T : t, t === T ? zn.test(n) ? n.match(In) || [] : n.match(sn) || [] : n.match(t) || [];
  13198. }
  13199. function Mu(n) {
  13200. return function () {
  13201. return n;
  13202. };
  13203. }
  13204. function Tu(n) {
  13205. return n;
  13206. }
  13207. function $u(n) {
  13208. return qt(typeof n == "function" ? n : _t(n, 1));
  13209. }
  13210. function Fu(n, t, e) {
  13211. var u = zu(t),
  13212. i = Et(t, u);
  13213. null != e || gu(t) && (i.length || !u.length) || (e = t, t = n, n = this, i = Et(t, zu(t)));
  13214. var o = !(gu(e) && "chain" in e && !e.chain),
  13215. f = pu(n);
  13216. return r(i, function (r) {
  13217. var e = t[r];
  13218. n[r] = e, f && (n.prototype[r] = function () {
  13219. var t = this.__chain__;
  13220. if (o || t) {
  13221. var r = n(this.__wrapped__);
  13222. return (r.__actions__ = Ur(this.__actions__)).push({
  13223. func: e,
  13224. args: arguments,
  13225. thisArg: n
  13226. }), r.__chain__ = t, r;
  13227. }
  13228. return e.apply(n, a([this.value()], arguments));
  13229. });
  13230. }), n;
  13231. }
  13232. function Nu() {}
  13233. function Pu(n) {
  13234. return Ie(n) ? b(De(n)) : rr(n);
  13235. }
  13236. function Zu() {
  13237. return [];
  13238. }
  13239. function qu() {
  13240. return false;
  13241. }
  13242. mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn));
  13243. var Vu = mn.Array,
  13244. Ku = mn.Date,
  13245. Gu = mn.Error,
  13246. Hu = mn.Function,
  13247. Ju = mn.Math,
  13248. Yu = mn.Object,
  13249. Qu = mn.RegExp,
  13250. Xu = mn.String,
  13251. ni = mn.TypeError,
  13252. ti = Vu.prototype,
  13253. ri = Yu.prototype,
  13254. ei = mn["__core-js_shared__"],
  13255. ui = Hu.prototype.toString,
  13256. ii = ri.hasOwnProperty,
  13257. oi = 0,
  13258. fi = function () {
  13259. var n = /[^.]+$/.exec(ei && ei.keys && ei.keys.IE_PROTO || "");
  13260. return n ? "Symbol(src)_1." + n : "";
  13261. }(),
  13262. ci = ri.toString,
  13263. ai = ui.call(Yu),
  13264. li = $n._,
  13265. si = Qu("^" + ui.call(ii).replace(rn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"),
  13266. hi = Pn ? mn.Buffer : T,
  13267. pi = mn.Symbol,
  13268. _i = mn.Uint8Array,
  13269. vi = hi ? hi.g : T,
  13270. gi = B(Yu.getPrototypeOf, Yu),
  13271. di = Yu.create,
  13272. yi = ri.propertyIsEnumerable,
  13273. bi = ti.splice,
  13274. xi = pi ? pi.isConcatSpreadable : T,
  13275. ji = pi ? pi.iterator : T,
  13276. wi = pi ? pi.toStringTag : T,
  13277. mi = function () {
  13278. try {
  13279. var n = je(Yu, "defineProperty");
  13280. return n({}, "", {}), n;
  13281. } catch (n) {}
  13282. }(),
  13283. Ai = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout,
  13284. Ei = Ku && Ku.now !== $n.Date.now && Ku.now,
  13285. ki = mn.setTimeout !== $n.setTimeout && mn.setTimeout,
  13286. Si = Ju.ceil,
  13287. Oi = Ju.floor,
  13288. Ii = Yu.getOwnPropertySymbols,
  13289. Ri = hi ? hi.isBuffer : T,
  13290. zi = mn.isFinite,
  13291. Wi = ti.join,
  13292. Bi = B(Yu.keys, Yu),
  13293. Li = Ju.max,
  13294. Ui = Ju.min,
  13295. Ci = Ku.now,
  13296. Di = mn.parseInt,
  13297. Mi = Ju.random,
  13298. Ti = ti.reverse,
  13299. $i = je(mn, "DataView"),
  13300. Fi = je(mn, "Map"),
  13301. Ni = je(mn, "Promise"),
  13302. Pi = je(mn, "Set"),
  13303. Zi = je(mn, "WeakMap"),
  13304. qi = je(Yu, "create"),
  13305. Vi = Zi && new Zi(),
  13306. Ki = {},
  13307. Gi = Me($i),
  13308. Hi = Me(Fi),
  13309. Ji = Me(Ni),
  13310. Yi = Me(Pi),
  13311. Qi = Me(Zi),
  13312. Xi = pi ? pi.prototype : T,
  13313. no = Xi ? Xi.valueOf : T,
  13314. to = Xi ? Xi.toString : T,
  13315. ro = function () {
  13316. function n() {}
  13317. return function (t) {
  13318. return gu(t) ? di ? di(t) : (n.prototype = t, t = new n(), n.prototype = T, t) : {};
  13319. };
  13320. }();
  13321. An.templateSettings = {
  13322. escape: J,
  13323. evaluate: Y,
  13324. interpolate: Q,
  13325. variable: "",
  13326. imports: {
  13327. _: An
  13328. }
  13329. }, An.prototype = En.prototype, An.prototype.constructor = An, On.prototype = ro(En.prototype), On.prototype.constructor = On, Un.prototype = ro(En.prototype), Un.prototype.constructor = Un, Mn.prototype.clear = function () {
  13330. this.__data__ = qi ? qi(null) : {}, this.size = 0;
  13331. }, Mn.prototype.delete = function (n) {
  13332. return n = this.has(n) && delete this.__data__[n], this.size -= n ? 1 : 0, n;
  13333. }, Mn.prototype.get = function (n) {
  13334. var t = this.__data__;
  13335. return qi ? (n = t[n], "__lodash_hash_undefined__" === n ? T : n) : ii.call(t, n) ? t[n] : T;
  13336. }, Mn.prototype.has = function (n) {
  13337. var t = this.__data__;
  13338. return qi ? t[n] !== T : ii.call(t, n);
  13339. }, Mn.prototype.set = function (n, t) {
  13340. var r = this.__data__;
  13341. return this.size += this.has(n) ? 0 : 1, r[n] = qi && t === T ? "__lodash_hash_undefined__" : t, this;
  13342. }, Tn.prototype.clear = function () {
  13343. this.__data__ = [], this.size = 0;
  13344. }, Tn.prototype.delete = function (n) {
  13345. var t = this.__data__;
  13346. return n = ft(t, n), !(0 > n) && (n == t.length - 1 ? t.pop() : bi.call(t, n, 1), --this.size, true);
  13347. }, Tn.prototype.get = function (n) {
  13348. var t = this.__data__;
  13349. return n = ft(t, n), 0 > n ? T : t[n][1];
  13350. }, Tn.prototype.has = function (n) {
  13351. return -1 < ft(this.__data__, n);
  13352. }, Tn.prototype.set = function (n, t) {
  13353. var r = this.__data__,
  13354. e = ft(r, n);
  13355. return 0 > e ? (++this.size, r.push([n, t])) : r[e][1] = t, this;
  13356. }, Fn.prototype.clear = function () {
  13357. this.size = 0, this.__data__ = {
  13358. hash: new Mn(),
  13359. map: new (Fi || Tn)(),
  13360. string: new Mn()
  13361. };
  13362. }, Fn.prototype.delete = function (n) {
  13363. return n = be(this, n).delete(n), this.size -= n ? 1 : 0, n;
  13364. }, Fn.prototype.get = function (n) {
  13365. return be(this, n).get(n);
  13366. }, Fn.prototype.has = function (n) {
  13367. return be(this, n).has(n);
  13368. }, Fn.prototype.set = function (n, t) {
  13369. var r = be(this, n),
  13370. e = r.size;
  13371. return r.set(n, t), this.size += r.size == e ? 0 : 1, this;
  13372. }, Nn.prototype.add = Nn.prototype.push = function (n) {
  13373. return this.__data__.set(n, "__lodash_hash_undefined__"), this;
  13374. }, Nn.prototype.has = function (n) {
  13375. return this.__data__.has(n);
  13376. }, Zn.prototype.clear = function () {
  13377. this.__data__ = new Tn(), this.size = 0;
  13378. }, Zn.prototype.delete = function (n) {
  13379. var t = this.__data__;
  13380. return n = t.delete(n), this.size = t.size, n;
  13381. }, Zn.prototype.get = function (n) {
  13382. return this.__data__.get(n);
  13383. }, Zn.prototype.has = function (n) {
  13384. return this.__data__.has(n);
  13385. }, Zn.prototype.set = function (n, t) {
  13386. var r = this.__data__;
  13387. if (r instanceof Tn) {
  13388. var e = r.__data__;
  13389. if (!Fi || 199 > e.length) return e.push([n, t]), this.size = ++r.size, this;
  13390. r = this.__data__ = new Fn(e);
  13391. }
  13392. return r.set(n, t), this.size = r.size, this;
  13393. };
  13394. var eo = Fr(mt),
  13395. uo = Fr(At, true),
  13396. io = Nr(),
  13397. oo = Nr(true),
  13398. fo = Vi ? function (n, t) {
  13399. return Vi.set(n, t), n;
  13400. } : Tu,
  13401. co = mi ? function (n, t) {
  13402. return mi(n, "toString", {
  13403. configurable: true,
  13404. enumerable: false,
  13405. value: Mu(t),
  13406. writable: true
  13407. });
  13408. } : Tu,
  13409. ao = Ai || function (n) {
  13410. return $n.clearTimeout(n);
  13411. },
  13412. lo = Pi && 1 / U(new Pi([, -0]))[1] == $ ? function (n) {
  13413. return new Pi(n);
  13414. } : Nu,
  13415. so = Vi ? function (n) {
  13416. return Vi.get(n);
  13417. } : Nu,
  13418. ho = Ii ? function (n) {
  13419. return null == n ? [] : (n = Yu(n), i(Ii(n), function (t) {
  13420. return yi.call(n, t);
  13421. }));
  13422. } : Zu,
  13423. po = Ii ? function (n) {
  13424. for (var t = []; n;) {
  13425. a(t, ho(n)), n = gi(n);
  13426. }
  13427. return t;
  13428. } : Zu,
  13429. _o = Ot;
  13430. ($i && "[object DataView]" != _o(new $i(new ArrayBuffer(1))) || Fi && "[object Map]" != _o(new Fi()) || Ni && "[object Promise]" != _o(Ni.resolve()) || Pi && "[object Set]" != _o(new Pi()) || Zi && "[object WeakMap]" != _o(new Zi())) && (_o = function _o(n) {
  13431. var t = Ot(n);
  13432. if (n = (n = "[object Object]" == t ? n.constructor : T) ? Me(n) : "") switch (n) {
  13433. case Gi:
  13434. return "[object DataView]";
  13435. case Hi:
  13436. return "[object Map]";
  13437. case Ji:
  13438. return "[object Promise]";
  13439. case Yi:
  13440. return "[object Set]";
  13441. case Qi:
  13442. return "[object WeakMap]";
  13443. }
  13444. return t;
  13445. });
  13446. var vo = ei ? pu : qu,
  13447. go = Ue(fo),
  13448. yo = ki || function (n, t) {
  13449. return $n.setTimeout(n, t);
  13450. },
  13451. bo = Ue(co),
  13452. xo = function (n) {
  13453. n = fu(n, function (n) {
  13454. return 500 === t.size && t.clear(), n;
  13455. });
  13456. var t = n.cache;
  13457. return n;
  13458. }(function (n) {
  13459. var t = [];
  13460. return 46 === n.charCodeAt(0) && t.push(""), n.replace(tn, function (n, r, e, u) {
  13461. t.push(e ? u.replace(hn, "$1") : r || n);
  13462. }), t;
  13463. }),
  13464. jo = fr(function (n, t) {
  13465. return su(n) ? yt(n, wt(t, 1, su, true)) : [];
  13466. }),
  13467. wo = fr(function (n, t) {
  13468. var r = qe(t);
  13469. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), ye(r, 2)) : [];
  13470. }),
  13471. mo = fr(function (n, t) {
  13472. var r = qe(t);
  13473. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), T, r) : [];
  13474. }),
  13475. Ao = fr(function (n) {
  13476. var t = c(n, Er);
  13477. return t.length && t[0] === n[0] ? Wt(t) : [];
  13478. }),
  13479. Eo = fr(function (n) {
  13480. var t = qe(n),
  13481. r = c(n, Er);
  13482. return t === qe(r) ? t = T : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : [];
  13483. }),
  13484. ko = fr(function (n) {
  13485. var t = qe(n),
  13486. r = c(n, Er);
  13487. return (t = typeof t == "function" ? t : T) && r.pop(), r.length && r[0] === n[0] ? Wt(r, T, t) : [];
  13488. }),
  13489. So = fr(Ve),
  13490. Oo = pe(function (n, t) {
  13491. var r = null == n ? 0 : n.length,
  13492. e = ht(n, t);
  13493. return ur(n, c(t, function (n) {
  13494. return Se(n, r) ? +n : n;
  13495. }).sort(Wr)), e;
  13496. }),
  13497. Io = fr(function (n) {
  13498. return br(wt(n, 1, su, true));
  13499. }),
  13500. Ro = fr(function (n) {
  13501. var t = qe(n);
  13502. return su(t) && (t = T), br(wt(n, 1, su, true), ye(t, 2));
  13503. }),
  13504. zo = fr(function (n) {
  13505. var t = qe(n),
  13506. t = typeof t == "function" ? t : T;
  13507. return br(wt(n, 1, su, true), T, t);
  13508. }),
  13509. Wo = fr(function (n, t) {
  13510. return su(n) ? yt(n, t) : [];
  13511. }),
  13512. Bo = fr(function (n) {
  13513. return mr(i(n, su));
  13514. }),
  13515. Lo = fr(function (n) {
  13516. var t = qe(n);
  13517. return su(t) && (t = T), mr(i(n, su), ye(t, 2));
  13518. }),
  13519. Uo = fr(function (n) {
  13520. var t = qe(n),
  13521. t = typeof t == "function" ? t : T;
  13522. return mr(i(n, su), T, t);
  13523. }),
  13524. Co = fr(Ge),
  13525. Do = fr(function (n) {
  13526. var t = n.length,
  13527. t = 1 < t ? n[t - 1] : T,
  13528. t = typeof t == "function" ? (n.pop(), t) : T;
  13529. return He(n, t);
  13530. }),
  13531. Mo = pe(function (n) {
  13532. function t(t) {
  13533. return ht(t, n);
  13534. }
  13535. var r = n.length,
  13536. e = r ? n[0] : 0,
  13537. u = this.__wrapped__;
  13538. return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) ? (u = u.slice(e, +e + (r ? 1 : 0)), u.__actions__.push({
  13539. func: Ye,
  13540. args: [t],
  13541. thisArg: T
  13542. }), new On(u, this.__chain__).thru(function (n) {
  13543. return r && !n.length && n.push(T), n;
  13544. })) : this.thru(t);
  13545. }),
  13546. To = Tr(function (n, t, r) {
  13547. ii.call(n, r) ? ++n[r] : st(n, r, 1);
  13548. }),
  13549. $o = Gr(Fe),
  13550. Fo = Gr(Ne),
  13551. No = Tr(function (n, t, r) {
  13552. ii.call(n, r) ? n[r].push(t) : st(n, r, [t]);
  13553. }),
  13554. Po = fr(function (t, r, e) {
  13555. var u = -1,
  13556. i = typeof r == "function",
  13557. o = lu(t) ? Vu(t.length) : [];
  13558. return eo(t, function (t) {
  13559. o[++u] = i ? n(r, t, e) : Lt(t, r, e);
  13560. }), o;
  13561. }),
  13562. Zo = Tr(function (n, t, r) {
  13563. st(n, r, t);
  13564. }),
  13565. qo = Tr(function (n, t, r) {
  13566. n[r ? 0 : 1].push(t);
  13567. }, function () {
  13568. return [[], []];
  13569. }),
  13570. Vo = fr(function (n, t) {
  13571. if (null == n) return [];
  13572. var r = t.length;
  13573. return 1 < r && Oe(n, t[0], t[1]) ? t = [] : 2 < r && Oe(t[0], t[1], t[2]) && (t = [t[0]]), Xt(n, wt(t, 1), []);
  13574. }),
  13575. Ko = Ei || function () {
  13576. return $n.Date.now();
  13577. },
  13578. Go = fr(function (n, t, r) {
  13579. var e = 1;
  13580. if (r.length) var u = L(r, de(Go)),
  13581. e = 32 | e;
  13582. return fe(n, e, t, r, u);
  13583. }),
  13584. Ho = fr(function (n, t, r) {
  13585. var e = 3;
  13586. if (r.length) var u = L(r, de(Ho)),
  13587. e = 32 | e;
  13588. return fe(t, e, n, r, u);
  13589. }),
  13590. Jo = fr(function (n, t) {
  13591. return dt(n, 1, t);
  13592. }),
  13593. Yo = fr(function (n, t, r) {
  13594. return dt(n, ku(t) || 0, r);
  13595. });
  13596. fu.Cache = Fn;
  13597. var Qo = fr(function (t, r) {
  13598. r = 1 == r.length && of(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye()));
  13599. var e = r.length;
  13600. return fr(function (u) {
  13601. for (var i = -1, o = Ui(u.length, e); ++i < o;) {
  13602. u[i] = r[i].call(this, u[i]);
  13603. }
  13604. return n(t, this, u);
  13605. });
  13606. }),
  13607. Xo = fr(function (n, t) {
  13608. return fe(n, 32, T, t, L(t, de(Xo)));
  13609. }),
  13610. nf = fr(function (n, t) {
  13611. return fe(n, 64, T, t, L(t, de(nf)));
  13612. }),
  13613. tf = pe(function (n, t) {
  13614. return fe(n, 256, T, T, T, t);
  13615. }),
  13616. rf = ee(It),
  13617. ef = ee(function (n, t) {
  13618. return n >= t;
  13619. }),
  13620. uf = Ut(function () {
  13621. return arguments;
  13622. }()) ? Ut : function (n) {
  13623. return du(n) && ii.call(n, "callee") && !yi.call(n, "callee");
  13624. },
  13625. of = Vu.isArray,
  13626. ff = Vn ? k(Vn) : Ct,
  13627. cf = Ri || qu,
  13628. af = Kn ? k(Kn) : Dt,
  13629. lf = Gn ? k(Gn) : Tt,
  13630. sf = Hn ? k(Hn) : Nt,
  13631. hf = Jn ? k(Jn) : Pt,
  13632. pf = Yn ? k(Yn) : Zt,
  13633. _f = ee(Kt),
  13634. vf = ee(function (n, t) {
  13635. return n <= t;
  13636. }),
  13637. gf = $r(function (n, t) {
  13638. if (ze(t) || lu(t)) Cr(t, zu(t), n);else for (var r in t) {
  13639. ii.call(t, r) && ot(n, r, t[r]);
  13640. }
  13641. }),
  13642. df = $r(function (n, t) {
  13643. Cr(t, Wu(t), n);
  13644. }),
  13645. yf = $r(function (n, t, r, e) {
  13646. Cr(t, Wu(t), n, e);
  13647. }),
  13648. bf = $r(function (n, t, r, e) {
  13649. Cr(t, zu(t), n, e);
  13650. }),
  13651. xf = pe(ht),
  13652. jf = fr(function (n, t) {
  13653. n = Yu(n);
  13654. var r = -1,
  13655. e = t.length,
  13656. u = 2 < e ? t[2] : T;
  13657. for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e;) {
  13658. for (var u = t[r], i = Wu(u), o = -1, f = i.length; ++o < f;) {
  13659. var c = i[o],
  13660. a = n[c];
  13661. (a === T || au(a, ri[c]) && !ii.call(n, c)) && (n[c] = u[c]);
  13662. }
  13663. }
  13664. return n;
  13665. }),
  13666. wf = fr(function (t) {
  13667. return t.push(T, ae), n(Sf, T, t);
  13668. }),
  13669. mf = Yr(function (n, t, r) {
  13670. null != t && typeof t.toString != "function" && (t = ci.call(t)), n[t] = r;
  13671. }, Mu(Tu)),
  13672. Af = Yr(function (n, t, r) {
  13673. null != t && typeof t.toString != "function" && (t = ci.call(t)), ii.call(n, t) ? n[t].push(r) : n[t] = [r];
  13674. }, ye),
  13675. Ef = fr(Lt),
  13676. kf = $r(function (n, t, r) {
  13677. Yt(n, t, r);
  13678. }),
  13679. Sf = $r(function (n, t, r, e) {
  13680. Yt(n, t, r, e);
  13681. }),
  13682. Of = pe(function (n, t) {
  13683. var r = {};
  13684. if (null == n) return r;
  13685. var e = false;
  13686. t = c(t, function (t) {
  13687. return t = Sr(t, n), e || (e = 1 < t.length), t;
  13688. }), Cr(n, ve(n), r), e && (r = _t(r, 7, le));
  13689. for (var u = t.length; u--;) {
  13690. xr(r, t[u]);
  13691. }
  13692. return r;
  13693. }),
  13694. If = pe(function (n, t) {
  13695. return null == n ? {} : nr(n, t);
  13696. }),
  13697. Rf = oe(zu),
  13698. zf = oe(Wu),
  13699. Wf = qr(function (n, t, r) {
  13700. return t = t.toLowerCase(), n + (r ? Uu(t) : t);
  13701. }),
  13702. Bf = qr(function (n, t, r) {
  13703. return n + (r ? "-" : "") + t.toLowerCase();
  13704. }),
  13705. Lf = qr(function (n, t, r) {
  13706. return n + (r ? " " : "") + t.toLowerCase();
  13707. }),
  13708. Uf = Zr("toLowerCase"),
  13709. Cf = qr(function (n, t, r) {
  13710. return n + (r ? "_" : "") + t.toLowerCase();
  13711. }),
  13712. Df = qr(function (n, t, r) {
  13713. return n + (r ? " " : "") + Tf(t);
  13714. }),
  13715. Mf = qr(function (n, t, r) {
  13716. return n + (r ? " " : "") + t.toUpperCase();
  13717. }),
  13718. Tf = Zr("toUpperCase"),
  13719. $f = fr(function (t, r) {
  13720. try {
  13721. return n(t, T, r);
  13722. } catch (n) {
  13723. return hu(n) ? n : new Gu(n);
  13724. }
  13725. }),
  13726. Ff = pe(function (n, t) {
  13727. return r(t, function (t) {
  13728. t = De(t), st(n, t, Go(n[t], n));
  13729. }), n;
  13730. }),
  13731. Nf = Hr(),
  13732. Pf = Hr(true),
  13733. Zf = fr(function (n, t) {
  13734. return function (r) {
  13735. return Lt(r, n, t);
  13736. };
  13737. }),
  13738. qf = fr(function (n, t) {
  13739. return function (r) {
  13740. return Lt(n, r, t);
  13741. };
  13742. }),
  13743. Vf = Xr(c),
  13744. Kf = Xr(u),
  13745. Gf = Xr(h),
  13746. Hf = re(),
  13747. Jf = re(true),
  13748. Yf = Qr(function (n, t) {
  13749. return n + t;
  13750. }, 0),
  13751. Qf = ie("ceil"),
  13752. Xf = Qr(function (n, t) {
  13753. return n / t;
  13754. }, 1),
  13755. nc = ie("floor"),
  13756. tc = Qr(function (n, t) {
  13757. return n * t;
  13758. }, 1),
  13759. rc = ie("round"),
  13760. ec = Qr(function (n, t) {
  13761. return n - t;
  13762. }, 0);
  13763. return An.after = function (n, t) {
  13764. if (typeof t != "function") throw new ni("Expected a function");
  13765. return n = Au(n), function () {
  13766. if (1 > --n) return t.apply(this, arguments);
  13767. };
  13768. }, An.ary = ru, An.assign = gf, An.assignIn = df, An.assignInWith = yf, An.assignWith = bf, An.at = xf, An.before = eu, An.bind = Go, An.bindAll = Ff, An.bindKey = Ho, An.castArray = function () {
  13769. if (!arguments.length) return [];
  13770. var n = arguments[0];
  13771. return of(n) ? n : [n];
  13772. }, An.chain = Je, An.chunk = function (n, t, r) {
  13773. if (t = (r ? Oe(n, t, r) : t === T) ? 1 : Li(Au(t), 0), r = null == n ? 0 : n.length, !r || 1 > t) return [];
  13774. for (var e = 0, u = 0, i = Vu(Si(r / t)); e < r;) {
  13775. i[u++] = hr(n, e, e += t);
  13776. }
  13777. return i;
  13778. }, An.compact = function (n) {
  13779. for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r;) {
  13780. var i = n[t];
  13781. i && (u[e++] = i);
  13782. }
  13783. return u;
  13784. }, An.concat = function () {
  13785. var n = arguments.length;
  13786. if (!n) return [];
  13787. for (var t = Vu(n - 1), r = arguments[0]; n--;) {
  13788. t[n - 1] = arguments[n];
  13789. }
  13790. return a(of(r) ? Ur(r) : [r], wt(t, 1));
  13791. }, An.cond = function (t) {
  13792. var r = null == t ? 0 : t.length,
  13793. e = ye();
  13794. return t = r ? c(t, function (n) {
  13795. if ("function" != typeof n[1]) throw new ni("Expected a function");
  13796. return [e(n[0]), n[1]];
  13797. }) : [], fr(function (e) {
  13798. for (var u = -1; ++u < r;) {
  13799. var i = t[u];
  13800. if (n(i[0], this, e)) return n(i[1], this, e);
  13801. }
  13802. });
  13803. }, An.conforms = function (n) {
  13804. return vt(_t(n, 1));
  13805. }, An.constant = Mu, An.countBy = To, An.create = function (n, t) {
  13806. var r = ro(n);
  13807. return null == t ? r : at(r, t);
  13808. }, An.curry = uu, An.curryRight = iu, An.debounce = ou, An.defaults = jf, An.defaultsDeep = wf, An.defer = Jo, An.delay = Yo, An.difference = jo, An.differenceBy = wo, An.differenceWith = mo, An.drop = function (n, t, r) {
  13809. var e = null == n ? 0 : n.length;
  13810. return e ? (t = r || t === T ? 1 : Au(t), hr(n, 0 > t ? 0 : t, e)) : [];
  13811. }, An.dropRight = function (n, t, r) {
  13812. var e = null == n ? 0 : n.length;
  13813. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0, 0 > t ? 0 : t)) : [];
  13814. }, An.dropRightWhile = function (n, t) {
  13815. return n && n.length ? jr(n, ye(t, 3), true, true) : [];
  13816. }, An.dropWhile = function (n, t) {
  13817. return n && n.length ? jr(n, ye(t, 3), true) : [];
  13818. }, An.fill = function (n, t, r, e) {
  13819. var u = null == n ? 0 : n.length;
  13820. if (!u) return [];
  13821. for (r && typeof r != "number" && Oe(n, t, r) && (r = 0, e = u), u = n.length, r = Au(r), 0 > r && (r = -r > u ? 0 : u + r), e = e === T || e > u ? u : Au(e), 0 > e && (e += u), e = r > e ? 0 : Eu(e); r < e;) {
  13822. n[r++] = t;
  13823. }
  13824. return n;
  13825. }, An.filter = function (n, t) {
  13826. return (of(n) ? i : jt)(n, ye(t, 3));
  13827. }, An.flatMap = function (n, t) {
  13828. return wt(tu(n, t), 1);
  13829. }, An.flatMapDeep = function (n, t) {
  13830. return wt(tu(n, t), $);
  13831. }, An.flatMapDepth = function (n, t, r) {
  13832. return r = r === T ? 1 : Au(r), wt(tu(n, t), r);
  13833. }, An.flatten = Pe, An.flattenDeep = function (n) {
  13834. return (null == n ? 0 : n.length) ? wt(n, $) : [];
  13835. }, An.flattenDepth = function (n, t) {
  13836. return null != n && n.length ? (t = t === T ? 1 : Au(t), wt(n, t)) : [];
  13837. }, An.flip = function (n) {
  13838. return fe(n, 512);
  13839. }, An.flow = Nf, An.flowRight = Pf, An.fromPairs = function (n) {
  13840. for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r;) {
  13841. var u = n[t];
  13842. e[u[0]] = u[1];
  13843. }
  13844. return e;
  13845. }, An.functions = function (n) {
  13846. return null == n ? [] : Et(n, zu(n));
  13847. }, An.functionsIn = function (n) {
  13848. return null == n ? [] : Et(n, Wu(n));
  13849. }, An.groupBy = No, An.initial = function (n) {
  13850. return (null == n ? 0 : n.length) ? hr(n, 0, -1) : [];
  13851. }, An.intersection = Ao, An.intersectionBy = Eo, An.intersectionWith = ko, An.invert = mf, An.invertBy = Af, An.invokeMap = Po, An.iteratee = $u, An.keyBy = Zo, An.keys = zu, An.keysIn = Wu, An.map = tu, An.mapKeys = function (n, t) {
  13852. var r = {};
  13853. return t = ye(t, 3), mt(n, function (n, e, u) {
  13854. st(r, t(n, e, u), n);
  13855. }), r;
  13856. }, An.mapValues = function (n, t) {
  13857. var r = {};
  13858. return t = ye(t, 3), mt(n, function (n, e, u) {
  13859. st(r, e, t(n, e, u));
  13860. }), r;
  13861. }, An.matches = function (n) {
  13862. return Ht(_t(n, 1));
  13863. }, An.matchesProperty = function (n, t) {
  13864. return Jt(n, _t(t, 1));
  13865. }, An.memoize = fu, An.merge = kf, An.mergeWith = Sf, An.method = Zf, An.methodOf = qf, An.mixin = Fu, An.negate = cu, An.nthArg = function (n) {
  13866. return n = Au(n), fr(function (t) {
  13867. return Qt(t, n);
  13868. });
  13869. }, An.omit = Of, An.omitBy = function (n, t) {
  13870. return Bu(n, cu(ye(t)));
  13871. }, An.once = function (n) {
  13872. return eu(2, n);
  13873. }, An.orderBy = function (n, t, r, e) {
  13874. return null == n ? [] : (of(t) || (t = null == t ? [] : [t]), r = e ? T : r, of(r) || (r = null == r ? [] : [r]), Xt(n, t, r));
  13875. }, An.over = Vf, An.overArgs = Qo, An.overEvery = Kf, An.overSome = Gf, An.partial = Xo, An.partialRight = nf, An.partition = qo, An.pick = If, An.pickBy = Bu, An.property = Pu, An.propertyOf = function (n) {
  13876. return function (t) {
  13877. return null == n ? T : kt(n, t);
  13878. };
  13879. }, An.pull = So, An.pullAll = Ve, An.pullAllBy = function (n, t, r) {
  13880. return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n;
  13881. }, An.pullAllWith = function (n, t, r) {
  13882. return n && n.length && t && t.length ? er(n, t, T, r) : n;
  13883. }, An.pullAt = Oo, An.range = Hf, An.rangeRight = Jf, An.rearg = tf, An.reject = function (n, t) {
  13884. return (of(n) ? i : jt)(n, cu(ye(t, 3)));
  13885. }, An.remove = function (n, t) {
  13886. var r = [];
  13887. if (!n || !n.length) return r;
  13888. var e = -1,
  13889. u = [],
  13890. i = n.length;
  13891. for (t = ye(t, 3); ++e < i;) {
  13892. var o = n[e];
  13893. t(o, e, n) && (r.push(o), u.push(e));
  13894. }
  13895. return ur(n, u), r;
  13896. }, An.rest = function (n, t) {
  13897. if (typeof n != "function") throw new ni("Expected a function");
  13898. return t = t === T ? t : Au(t), fr(n, t);
  13899. }, An.reverse = Ke, An.sampleSize = function (n, t, r) {
  13900. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), (of(n) ? et : ar)(n, t);
  13901. }, An.set = function (n, t, r) {
  13902. return null == n ? n : lr(n, t, r);
  13903. }, An.setWith = function (n, t, r, e) {
  13904. return e = typeof e == "function" ? e : T, null == n ? n : lr(n, t, r, e);
  13905. }, An.shuffle = function (n) {
  13906. return (of(n) ? ut : sr)(n);
  13907. }, An.slice = function (n, t, r) {
  13908. var e = null == n ? 0 : n.length;
  13909. return e ? (r && typeof r != "number" && Oe(n, t, r) ? (t = 0, r = e) : (t = null == t ? 0 : Au(t), r = r === T ? e : Au(r)), hr(n, t, r)) : [];
  13910. }, An.sortBy = Vo, An.sortedUniq = function (n) {
  13911. return n && n.length ? gr(n) : [];
  13912. }, An.sortedUniqBy = function (n, t) {
  13913. return n && n.length ? gr(n, ye(t, 2)) : [];
  13914. }, An.split = function (n, t, r) {
  13915. return r && typeof r != "number" && Oe(n, t, r) && (t = r = T), r = r === T ? 4294967295 : r >>> 0, r ? (n = Ou(n)) && (typeof t == "string" || null != t && !sf(t)) && (t = yr(t), !t && Rn.test(n)) ? Or(M(n), 0, r) : n.split(t, r) : [];
  13916. }, An.spread = function (t, r) {
  13917. if (typeof t != "function") throw new ni("Expected a function");
  13918. return r = null == r ? 0 : Li(Au(r), 0), fr(function (e) {
  13919. var u = e[r];
  13920. return e = Or(e, 0, r), u && a(e, u), n(t, this, e);
  13921. });
  13922. }, An.tail = function (n) {
  13923. var t = null == n ? 0 : n.length;
  13924. return t ? hr(n, 1, t) : [];
  13925. }, An.take = function (n, t, r) {
  13926. return n && n.length ? (t = r || t === T ? 1 : Au(t), hr(n, 0, 0 > t ? 0 : t)) : [];
  13927. }, An.takeRight = function (n, t, r) {
  13928. var e = null == n ? 0 : n.length;
  13929. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0 > t ? 0 : t, e)) : [];
  13930. }, An.takeRightWhile = function (n, t) {
  13931. return n && n.length ? jr(n, ye(t, 3), false, true) : [];
  13932. }, An.takeWhile = function (n, t) {
  13933. return n && n.length ? jr(n, ye(t, 3)) : [];
  13934. }, An.tap = function (n, t) {
  13935. return t(n), n;
  13936. }, An.throttle = function (n, t, r) {
  13937. var e = true,
  13938. u = true;
  13939. if (typeof n != "function") throw new ni("Expected a function");
  13940. return gu(r) && (e = "leading" in r ? !!r.leading : e, u = "trailing" in r ? !!r.trailing : u), ou(n, t, {
  13941. leading: e,
  13942. maxWait: t,
  13943. trailing: u
  13944. });
  13945. }, An.thru = Ye, An.toArray = wu, An.toPairs = Rf, An.toPairsIn = zf, An.toPath = function (n) {
  13946. return of(n) ? c(n, De) : ju(n) ? [n] : Ur(xo(Ou(n)));
  13947. }, An.toPlainObject = Su, An.transform = function (n, t, e) {
  13948. var u = of(n),
  13949. i = u || cf(n) || pf(n);
  13950. if (t = ye(t, 4), null == e) {
  13951. var o = n && n.constructor;
  13952. e = i ? u ? new o() : [] : gu(n) && pu(o) ? ro(gi(n)) : {};
  13953. }
  13954. return (i ? r : mt)(n, function (n, r, u) {
  13955. return t(e, n, r, u);
  13956. }), e;
  13957. }, An.unary = function (n) {
  13958. return ru(n, 1);
  13959. }, An.union = Io, An.unionBy = Ro, An.unionWith = zo, An.uniq = function (n) {
  13960. return n && n.length ? br(n) : [];
  13961. }, An.uniqBy = function (n, t) {
  13962. return n && n.length ? br(n, ye(t, 2)) : [];
  13963. }, An.uniqWith = function (n, t) {
  13964. return t = typeof t == "function" ? t : T, n && n.length ? br(n, T, t) : [];
  13965. }, An.unset = function (n, t) {
  13966. return null == n || xr(n, t);
  13967. }, An.unzip = Ge, An.unzipWith = He, An.update = function (n, t, r) {
  13968. return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0);
  13969. }, An.updateWith = function (n, t, r, e) {
  13970. return e = typeof e == "function" ? e : T, null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n;
  13971. }, An.values = Lu, An.valuesIn = function (n) {
  13972. return null == n ? [] : S(n, Wu(n));
  13973. }, An.without = Wo, An.words = Du, An.wrap = function (n, t) {
  13974. return Xo(kr(t), n);
  13975. }, An.xor = Bo, An.xorBy = Lo, An.xorWith = Uo, An.zip = Co, An.zipObject = function (n, t) {
  13976. return Ar(n || [], t || [], ot);
  13977. }, An.zipObjectDeep = function (n, t) {
  13978. return Ar(n || [], t || [], lr);
  13979. }, An.zipWith = Do, An.entries = Rf, An.entriesIn = zf, An.extend = df, An.extendWith = yf, Fu(An, An), An.add = Yf, An.attempt = $f, An.camelCase = Wf, An.capitalize = Uu, An.ceil = Qf, An.clamp = function (n, t, r) {
  13980. return r === T && (r = t, t = T), r !== T && (r = ku(r), r = r === r ? r : 0), t !== T && (t = ku(t), t = t === t ? t : 0), pt(ku(n), t, r);
  13981. }, An.clone = function (n) {
  13982. return _t(n, 4);
  13983. }, An.cloneDeep = function (n) {
  13984. return _t(n, 5);
  13985. }, An.cloneDeepWith = function (n, t) {
  13986. return t = typeof t == "function" ? t : T, _t(n, 5, t);
  13987. }, An.cloneWith = function (n, t) {
  13988. return t = typeof t == "function" ? t : T, _t(n, 4, t);
  13989. }, An.conformsTo = function (n, t) {
  13990. return null == t || gt(n, t, zu(t));
  13991. }, An.deburr = Cu, An.defaultTo = function (n, t) {
  13992. return null == n || n !== n ? t : n;
  13993. }, An.divide = Xf, An.endsWith = function (n, t, r) {
  13994. n = Ou(n), t = yr(t);
  13995. var e = n.length,
  13996. e = r = r === T ? e : pt(Au(r), 0, e);
  13997. return r -= t.length, 0 <= r && n.slice(r, e) == t;
  13998. }, An.eq = au, An.escape = function (n) {
  13999. return (n = Ou(n)) && H.test(n) ? n.replace(K, nt) : n;
  14000. }, An.escapeRegExp = function (n) {
  14001. return (n = Ou(n)) && en.test(n) ? n.replace(rn, "\\$&") : n;
  14002. }, An.every = function (n, t, r) {
  14003. var e = of(n) ? u : bt;
  14004. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  14005. }, An.find = $o, An.findIndex = Fe, An.findKey = function (n, t) {
  14006. return p(n, ye(t, 3), mt);
  14007. }, An.findLast = Fo, An.findLastIndex = Ne, An.findLastKey = function (n, t) {
  14008. return p(n, ye(t, 3), At);
  14009. }, An.floor = nc, An.forEach = Xe, An.forEachRight = nu, An.forIn = function (n, t) {
  14010. return null == n ? n : io(n, ye(t, 3), Wu);
  14011. }, An.forInRight = function (n, t) {
  14012. return null == n ? n : oo(n, ye(t, 3), Wu);
  14013. }, An.forOwn = function (n, t) {
  14014. return n && mt(n, ye(t, 3));
  14015. }, An.forOwnRight = function (n, t) {
  14016. return n && At(n, ye(t, 3));
  14017. }, An.get = Iu, An.gt = rf, An.gte = ef, An.has = function (n, t) {
  14018. return null != n && we(n, t, Rt);
  14019. }, An.hasIn = Ru, An.head = Ze, An.identity = Tu, An.includes = function (n, t, r, e) {
  14020. return n = lu(n) ? n : Lu(n), r = r && !e ? Au(r) : 0, e = n.length, 0 > r && (r = Li(e + r, 0)), xu(n) ? r <= e && -1 < n.indexOf(t, r) : !!e && -1 < v(n, t, r);
  14021. }, An.indexOf = function (n, t, r) {
  14022. var e = null == n ? 0 : n.length;
  14023. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), v(n, t, r)) : -1;
  14024. }, An.inRange = function (n, t, r) {
  14025. return t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), n = ku(n), n >= Ui(t, r) && n < Li(t, r);
  14026. }, An.invoke = Ef, An.isArguments = uf, An.isArray = of, An.isArrayBuffer = ff, An.isArrayLike = lu, An.isArrayLikeObject = su, An.isBoolean = function (n) {
  14027. return true === n || false === n || du(n) && "[object Boolean]" == Ot(n);
  14028. }, An.isBuffer = cf, An.isDate = af, An.isElement = function (n) {
  14029. return du(n) && 1 === n.nodeType && !bu(n);
  14030. }, An.isEmpty = function (n) {
  14031. if (null == n) return true;
  14032. if (lu(n) && (of(n) || typeof n == "string" || typeof n.splice == "function" || cf(n) || pf(n) || uf(n))) return !n.length;
  14033. var t = _o(n);
  14034. if ("[object Map]" == t || "[object Set]" == t) return !n.size;
  14035. if (ze(n)) return !Vt(n).length;
  14036. for (var r in n) {
  14037. if (ii.call(n, r)) return false;
  14038. }
  14039. return true;
  14040. }, An.isEqual = function (n, t) {
  14041. return Mt(n, t);
  14042. }, An.isEqualWith = function (n, t, r) {
  14043. var e = (r = typeof r == "function" ? r : T) ? r(n, t) : T;
  14044. return e === T ? Mt(n, t, T, r) : !!e;
  14045. }, An.isError = hu, An.isFinite = function (n) {
  14046. return typeof n == "number" && zi(n);
  14047. }, An.isFunction = pu, An.isInteger = _u, An.isLength = vu, An.isMap = lf, An.isMatch = function (n, t) {
  14048. return n === t || $t(n, t, xe(t));
  14049. }, An.isMatchWith = function (n, t, r) {
  14050. return r = typeof r == "function" ? r : T, $t(n, t, xe(t), r);
  14051. }, An.isNaN = function (n) {
  14052. return yu(n) && n != +n;
  14053. }, An.isNative = function (n) {
  14054. if (vo(n)) throw new Gu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
  14055. return Ft(n);
  14056. }, An.isNil = function (n) {
  14057. return null == n;
  14058. }, An.isNull = function (n) {
  14059. return null === n;
  14060. }, An.isNumber = yu, An.isObject = gu, An.isObjectLike = du, An.isPlainObject = bu, An.isRegExp = sf, An.isSafeInteger = function (n) {
  14061. return _u(n) && -9007199254740991 <= n && 9007199254740991 >= n;
  14062. }, An.isSet = hf, An.isString = xu, An.isSymbol = ju, An.isTypedArray = pf, An.isUndefined = function (n) {
  14063. return n === T;
  14064. }, An.isWeakMap = function (n) {
  14065. return du(n) && "[object WeakMap]" == _o(n);
  14066. }, An.isWeakSet = function (n) {
  14067. return du(n) && "[object WeakSet]" == Ot(n);
  14068. }, An.join = function (n, t) {
  14069. return null == n ? "" : Wi.call(n, t);
  14070. }, An.kebabCase = Bf, An.last = qe, An.lastIndexOf = function (n, t, r) {
  14071. var e = null == n ? 0 : n.length;
  14072. if (!e) return -1;
  14073. var u = e;
  14074. if (r !== T && (u = Au(r), u = 0 > u ? Li(e + u, 0) : Ui(u, e - 1)), t === t) {
  14075. for (r = u + 1; r-- && n[r] !== t;) {
  14076. ;
  14077. }
  14078. n = r;
  14079. } else n = _(n, d, u, true);
  14080. return n;
  14081. }, An.lowerCase = Lf, An.lowerFirst = Uf, An.lt = _f, An.lte = vf, An.max = function (n) {
  14082. return n && n.length ? xt(n, Tu, It) : T;
  14083. }, An.maxBy = function (n, t) {
  14084. return n && n.length ? xt(n, ye(t, 2), It) : T;
  14085. }, An.mean = function (n) {
  14086. return y(n, Tu);
  14087. }, An.meanBy = function (n, t) {
  14088. return y(n, ye(t, 2));
  14089. }, An.min = function (n) {
  14090. return n && n.length ? xt(n, Tu, Kt) : T;
  14091. }, An.minBy = function (n, t) {
  14092. return n && n.length ? xt(n, ye(t, 2), Kt) : T;
  14093. }, An.stubArray = Zu, An.stubFalse = qu, An.stubObject = function () {
  14094. return {};
  14095. }, An.stubString = function () {
  14096. return "";
  14097. }, An.stubTrue = function () {
  14098. return true;
  14099. }, An.multiply = tc, An.nth = function (n, t) {
  14100. return n && n.length ? Qt(n, Au(t)) : T;
  14101. }, An.noConflict = function () {
  14102. return $n._ === this && ($n._ = li), this;
  14103. }, An.noop = Nu, An.now = Ko, An.pad = function (n, t, r) {
  14104. n = Ou(n);
  14105. var e = (t = Au(t)) ? D(n) : 0;
  14106. return !t || e >= t ? n : (t = (t - e) / 2, ne(Oi(t), r) + n + ne(Si(t), r));
  14107. }, An.padEnd = function (n, t, r) {
  14108. n = Ou(n);
  14109. var e = (t = Au(t)) ? D(n) : 0;
  14110. return t && e < t ? n + ne(t - e, r) : n;
  14111. }, An.padStart = function (n, t, r) {
  14112. n = Ou(n);
  14113. var e = (t = Au(t)) ? D(n) : 0;
  14114. return t && e < t ? ne(t - e, r) + n : n;
  14115. }, An.parseInt = function (n, t, r) {
  14116. return r || null == t ? t = 0 : t && (t = +t), Di(Ou(n).replace(on, ""), t || 0);
  14117. }, An.random = function (n, t, r) {
  14118. if (r && typeof r != "boolean" && Oe(n, t, r) && (t = r = T), r === T && (typeof t == "boolean" ? (r = t, t = T) : typeof n == "boolean" && (r = n, n = T)), n === T && t === T ? (n = 0, t = 1) : (n = mu(n), t === T ? (t = n, n = 0) : t = mu(t)), n > t) {
  14119. var e = n;
  14120. n = t, t = e;
  14121. }
  14122. return r || n % 1 || t % 1 ? (r = Mi(), Ui(n + r * (t - n + Cn("1e-" + ((r + "").length - 1))), t)) : ir(n, t);
  14123. }, An.reduce = function (n, t, r) {
  14124. var e = of(n) ? l : j,
  14125. u = 3 > arguments.length;
  14126. return e(n, ye(t, 4), r, u, eo);
  14127. }, An.reduceRight = function (n, t, r) {
  14128. var e = of(n) ? s : j,
  14129. u = 3 > arguments.length;
  14130. return e(n, ye(t, 4), r, u, uo);
  14131. }, An.repeat = function (n, t, r) {
  14132. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), or(Ou(n), t);
  14133. }, An.replace = function () {
  14134. var n = arguments,
  14135. t = Ou(n[0]);
  14136. return 3 > n.length ? t : t.replace(n[1], n[2]);
  14137. }, An.result = function (n, t, r) {
  14138. t = Sr(t, n);
  14139. var e = -1,
  14140. u = t.length;
  14141. for (u || (u = 1, n = T); ++e < u;) {
  14142. var i = null == n ? T : n[De(t[e])];
  14143. i === T && (e = u, i = r), n = pu(i) ? i.call(n) : i;
  14144. }
  14145. return n;
  14146. }, An.round = rc, An.runInContext = x, An.sample = function (n) {
  14147. return (of(n) ? Qn : cr)(n);
  14148. }, An.size = function (n) {
  14149. if (null == n) return 0;
  14150. if (lu(n)) return xu(n) ? D(n) : n.length;
  14151. var t = _o(n);
  14152. return "[object Map]" == t || "[object Set]" == t ? n.size : Vt(n).length;
  14153. }, An.snakeCase = Cf, An.some = function (n, t, r) {
  14154. var e = of(n) ? h : pr;
  14155. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  14156. }, An.sortedIndex = function (n, t) {
  14157. return _r(n, t);
  14158. }, An.sortedIndexBy = function (n, t, r) {
  14159. return vr(n, t, ye(r, 2));
  14160. }, An.sortedIndexOf = function (n, t) {
  14161. var r = null == n ? 0 : n.length;
  14162. if (r) {
  14163. var e = _r(n, t);
  14164. if (e < r && au(n[e], t)) return e;
  14165. }
  14166. return -1;
  14167. }, An.sortedLastIndex = function (n, t) {
  14168. return _r(n, t, true);
  14169. }, An.sortedLastIndexBy = function (n, t, r) {
  14170. return vr(n, t, ye(r, 2), true);
  14171. }, An.sortedLastIndexOf = function (n, t) {
  14172. if (null == n ? 0 : n.length) {
  14173. var r = _r(n, t, true) - 1;
  14174. if (au(n[r], t)) return r;
  14175. }
  14176. return -1;
  14177. }, An.startCase = Df, An.startsWith = function (n, t, r) {
  14178. return n = Ou(n), r = null == r ? 0 : pt(Au(r), 0, n.length), t = yr(t), n.slice(r, r + t.length) == t;
  14179. }, An.subtract = ec, An.sum = function (n) {
  14180. return n && n.length ? m(n, Tu) : 0;
  14181. }, An.sumBy = function (n, t) {
  14182. return n && n.length ? m(n, ye(t, 2)) : 0;
  14183. }, An.template = function (n, t, r) {
  14184. var e = An.templateSettings;
  14185. r && Oe(n, t, r) && (t = T), n = Ou(n), t = yf({}, t, e, ce), r = yf({}, t.imports, e.imports, ce);
  14186. var u,
  14187. i,
  14188. o = zu(r),
  14189. f = S(r, o),
  14190. c = 0;
  14191. r = t.interpolate || jn;
  14192. var a = "__p+='";
  14193. r = Qu((t.escape || jn).source + "|" + r.source + "|" + (r === Q ? pn : jn).source + "|" + (t.evaluate || jn).source + "|$", "g");
  14194. var l = "sourceURL" in t ? "//# sourceURL=" + t.sourceURL + "\n" : "";
  14195. if (n.replace(r, function (t, r, e, o, f, l) {
  14196. return e || (e = o), a += n.slice(c, l).replace(wn, z), r && (u = true, a += "'+__e(" + r + ")+'"), f && (i = true, a += "';" + f + ";\n__p+='"), e && (a += "'+((__t=(" + e + "))==null?'':__t)+'"), c = l + t.length, t;
  14197. }), a += "';", (t = t.variable) || (a = "with(obj){" + a + "}"), a = (i ? a.replace(P, "") : a).replace(Z, "$1").replace(q, "$1;"), a = "function(" + (t || "obj") + "){" + (t ? "" : "obj||(obj={});") + "var __t,__p=''" + (u ? ",__e=_.escape" : "") + (i ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}" : ";") + a + "return __p}", t = $f(function () {
  14198. return Hu(o, l + "return " + a).apply(T, f);
  14199. }), t.source = a, hu(t)) throw t;
  14200. return t;
  14201. }, An.times = function (n, t) {
  14202. if (n = Au(n), 1 > n || 9007199254740991 < n) return [];
  14203. var r = 4294967295,
  14204. e = Ui(n, 4294967295);
  14205. for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n;) {
  14206. t(r);
  14207. }
  14208. return e;
  14209. }, An.toFinite = mu, An.toInteger = Au, An.toLength = Eu, An.toLower = function (n) {
  14210. return Ou(n).toLowerCase();
  14211. }, An.toNumber = ku, An.toSafeInteger = function (n) {
  14212. return n ? pt(Au(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0;
  14213. }, An.toString = Ou, An.toUpper = function (n) {
  14214. return Ou(n).toUpperCase();
  14215. }, An.trim = function (n, t, r) {
  14216. return (n = Ou(n)) && (r || t === T) ? n.replace(un, "") : n && (t = yr(t)) ? (n = M(n), r = M(t), t = I(n, r), r = R(n, r) + 1, Or(n, t, r).join("")) : n;
  14217. }, An.trimEnd = function (n, t, r) {
  14218. return (n = Ou(n)) && (r || t === T) ? n.replace(fn, "") : n && (t = yr(t)) ? (n = M(n), t = R(n, M(t)) + 1, Or(n, 0, t).join("")) : n;
  14219. }, An.trimStart = function (n, t, r) {
  14220. return (n = Ou(n)) && (r || t === T) ? n.replace(on, "") : n && (t = yr(t)) ? (n = M(n), t = I(n, M(t)), Or(n, t).join("")) : n;
  14221. }, An.truncate = function (n, t) {
  14222. var r = 30,
  14223. e = "...";
  14224. if (gu(t)) var u = "separator" in t ? t.separator : u,
  14225. r = "length" in t ? Au(t.length) : r,
  14226. e = "omission" in t ? yr(t.omission) : e;
  14227. n = Ou(n);
  14228. var i = n.length;
  14229. if (Rn.test(n)) var o = M(n),
  14230. i = o.length;
  14231. if (r >= i) return n;
  14232. if (i = r - D(e), 1 > i) return e;
  14233. if (r = o ? Or(o, 0, i).join("") : n.slice(0, i), u === T) return r + e;
  14234. if (o && (i += r.length - i), sf(u)) {
  14235. if (n.slice(i).search(u)) {
  14236. var f = r;
  14237. for (u.global || (u = Qu(u.source, Ou(_n.exec(u)) + "g")), u.lastIndex = 0; o = u.exec(f);) {
  14238. var c = o.index;
  14239. }
  14240. r = r.slice(0, c === T ? i : c);
  14241. }
  14242. } else n.indexOf(yr(u), i) != i && (u = r.lastIndexOf(u), -1 < u && (r = r.slice(0, u)));
  14243. return r + e;
  14244. }, An.unescape = function (n) {
  14245. return (n = Ou(n)) && G.test(n) ? n.replace(V, tt) : n;
  14246. }, An.uniqueId = function (n) {
  14247. var t = ++oi;
  14248. return Ou(n) + t;
  14249. }, An.upperCase = Mf, An.upperFirst = Tf, An.each = Xe, An.eachRight = nu, An.first = Ze, Fu(An, function () {
  14250. var n = {};
  14251. return mt(An, function (t, r) {
  14252. ii.call(An.prototype, r) || (n[r] = t);
  14253. }), n;
  14254. }(), {
  14255. chain: false
  14256. }), An.VERSION = "4.17.10", r("bind bindKey curry curryRight partial partialRight".split(" "), function (n) {
  14257. An[n].placeholder = An;
  14258. }), r(["drop", "take"], function (n, t) {
  14259. Un.prototype[n] = function (r) {
  14260. r = r === T ? 1 : Li(Au(r), 0);
  14261. var e = this.__filtered__ && !t ? new Un(this) : this.clone();
  14262. return e.__filtered__ ? e.__takeCount__ = Ui(r, e.__takeCount__) : e.__views__.push({
  14263. size: Ui(r, 4294967295),
  14264. type: n + (0 > e.__dir__ ? "Right" : "")
  14265. }), e;
  14266. }, Un.prototype[n + "Right"] = function (t) {
  14267. return this.reverse()[n](t).reverse();
  14268. };
  14269. }), r(["filter", "map", "takeWhile"], function (n, t) {
  14270. var r = t + 1,
  14271. e = 1 == r || 3 == r;
  14272. Un.prototype[n] = function (n) {
  14273. var t = this.clone();
  14274. return t.__iteratees__.push({
  14275. iteratee: ye(n, 3),
  14276. type: r
  14277. }), t.__filtered__ = t.__filtered__ || e, t;
  14278. };
  14279. }), r(["head", "last"], function (n, t) {
  14280. var r = "take" + (t ? "Right" : "");
  14281. Un.prototype[n] = function () {
  14282. return this[r](1).value()[0];
  14283. };
  14284. }), r(["initial", "tail"], function (n, t) {
  14285. var r = "drop" + (t ? "" : "Right");
  14286. Un.prototype[n] = function () {
  14287. return this.__filtered__ ? new Un(this) : this[r](1);
  14288. };
  14289. }), Un.prototype.compact = function () {
  14290. return this.filter(Tu);
  14291. }, Un.prototype.find = function (n) {
  14292. return this.filter(n).head();
  14293. }, Un.prototype.findLast = function (n) {
  14294. return this.reverse().find(n);
  14295. }, Un.prototype.invokeMap = fr(function (n, t) {
  14296. return typeof n == "function" ? new Un(this) : this.map(function (r) {
  14297. return Lt(r, n, t);
  14298. });
  14299. }), Un.prototype.reject = function (n) {
  14300. return this.filter(cu(ye(n)));
  14301. }, Un.prototype.slice = function (n, t) {
  14302. n = Au(n);
  14303. var r = this;
  14304. return r.__filtered__ && (0 < n || 0 > t) ? new Un(r) : (0 > n ? r = r.takeRight(-n) : n && (r = r.drop(n)), t !== T && (t = Au(t), r = 0 > t ? r.dropRight(-t) : r.take(t - n)), r);
  14305. }, Un.prototype.takeRightWhile = function (n) {
  14306. return this.reverse().takeWhile(n).reverse();
  14307. }, Un.prototype.toArray = function () {
  14308. return this.take(4294967295);
  14309. }, mt(Un.prototype, function (n, t) {
  14310. var r = /^(?:filter|find|map|reject)|While$/.test(t),
  14311. e = /^(?:head|last)$/.test(t),
  14312. u = An[e ? "take" + ("last" == t ? "Right" : "") : t],
  14313. i = e || /^find/.test(t);
  14314. u && (An.prototype[t] = function () {
  14315. function t(n) {
  14316. return n = u.apply(An, a([n], f)), e && h ? n[0] : n;
  14317. }
  14318. var o = this.__wrapped__,
  14319. f = e ? [1] : arguments,
  14320. c = o instanceof Un,
  14321. l = f[0],
  14322. s = c || of(o);
  14323. s && r && typeof l == "function" && 1 != l.length && (c = s = false);
  14324. var h = this.__chain__,
  14325. p = !!this.__actions__.length,
  14326. l = i && !h,
  14327. c = c && !p;
  14328. return !i && s ? (o = c ? o : new Un(this), o = n.apply(o, f), o.__actions__.push({
  14329. func: Ye,
  14330. args: [t],
  14331. thisArg: T
  14332. }), new On(o, h)) : l && c ? n.apply(this, f) : (o = this.thru(t), l ? e ? o.value()[0] : o.value() : o);
  14333. });
  14334. }), r("pop push shift sort splice unshift".split(" "), function (n) {
  14335. var t = ti[n],
  14336. r = /^(?:push|sort|unshift)$/.test(n) ? "tap" : "thru",
  14337. e = /^(?:pop|shift)$/.test(n);
  14338. An.prototype[n] = function () {
  14339. var n = arguments;
  14340. if (e && !this.__chain__) {
  14341. var u = this.value();
  14342. return t.apply(of(u) ? u : [], n);
  14343. }
  14344. return this[r](function (r) {
  14345. return t.apply(of(r) ? r : [], n);
  14346. });
  14347. };
  14348. }), mt(Un.prototype, function (n, t) {
  14349. var r = An[t];
  14350. if (r) {
  14351. var e = r.name + "";
  14352. (Ki[e] || (Ki[e] = [])).push({
  14353. name: t,
  14354. func: r
  14355. });
  14356. }
  14357. }), Ki[Jr(T, 2).name] = [{
  14358. name: "wrapper",
  14359. func: T
  14360. }], Un.prototype.clone = function () {
  14361. var n = new Un(this.__wrapped__);
  14362. return n.__actions__ = Ur(this.__actions__), n.__dir__ = this.__dir__, n.__filtered__ = this.__filtered__, n.__iteratees__ = Ur(this.__iteratees__), n.__takeCount__ = this.__takeCount__, n.__views__ = Ur(this.__views__), n;
  14363. }, Un.prototype.reverse = function () {
  14364. if (this.__filtered__) {
  14365. var n = new Un(this);
  14366. n.__dir__ = -1, n.__filtered__ = true;
  14367. } else n = this.clone(), n.__dir__ *= -1;
  14368. return n;
  14369. }, Un.prototype.value = function () {
  14370. var n,
  14371. t = this.__wrapped__.value(),
  14372. r = this.__dir__,
  14373. e = of(t),
  14374. u = 0 > r,
  14375. i = e ? t.length : 0;
  14376. n = i;
  14377. for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a;) {
  14378. var l = o[c],
  14379. s = l.size;
  14380. switch (l.type) {
  14381. case "drop":
  14382. f += s;
  14383. break;
  14384. case "dropRight":
  14385. n -= s;
  14386. break;
  14387. case "take":
  14388. n = Ui(n, f + s);
  14389. break;
  14390. case "takeRight":
  14391. f = Li(f, n - s);
  14392. }
  14393. }
  14394. if (n = {
  14395. start: f,
  14396. end: n
  14397. }, o = n.start, f = n.end, n = f - o, o = u ? f : o - 1, f = this.__iteratees__, c = f.length, a = 0, l = Ui(n, this.__takeCount__), !e || !u && i == n && l == n) return wr(t, this.__actions__);
  14398. e = [];
  14399. n: for (; n-- && a < l;) {
  14400. for (o += r, u = -1, i = t[o]; ++u < c;) {
  14401. var h = f[u],
  14402. s = h.type,
  14403. h = (0, h.iteratee)(i);
  14404. if (2 == s) i = h;else if (!h) {
  14405. if (1 == s) continue n;
  14406. break n;
  14407. }
  14408. }
  14409. e[a++] = i;
  14410. }
  14411. return e;
  14412. }, An.prototype.at = Mo, An.prototype.chain = function () {
  14413. return Je(this);
  14414. }, An.prototype.commit = function () {
  14415. return new On(this.value(), this.__chain__);
  14416. }, An.prototype.next = function () {
  14417. this.__values__ === T && (this.__values__ = wu(this.value()));
  14418. var n = this.__index__ >= this.__values__.length;
  14419. return {
  14420. done: n,
  14421. value: n ? T : this.__values__[this.__index__++]
  14422. };
  14423. }, An.prototype.plant = function (n) {
  14424. for (var t, r = this; r instanceof En;) {
  14425. var e = $e(r);
  14426. e.__index__ = 0, e.__values__ = T, t ? u.__wrapped__ = e : t = e;
  14427. var u = e,
  14428. r = r.__wrapped__;
  14429. }
  14430. return u.__wrapped__ = n, t;
  14431. }, An.prototype.reverse = function () {
  14432. var n = this.__wrapped__;
  14433. return n instanceof Un ? (this.__actions__.length && (n = new Un(this)), n = n.reverse(), n.__actions__.push({
  14434. func: Ye,
  14435. args: [Ke],
  14436. thisArg: T
  14437. }), new On(n, this.__chain__)) : this.thru(Ke);
  14438. }, An.prototype.toJSON = An.prototype.valueOf = An.prototype.value = function () {
  14439. return wr(this.__wrapped__, this.__actions__);
  14440. }, An.prototype.first = An.prototype.head, ji && (An.prototype[ji] = Qe), An;
  14441. }();
  14442. true && _typeof(__webpack_require__(/*! !webpack amd options */ 41)) == "object" && __webpack_require__(/*! !webpack amd options */ 41) ? ($n._ = rt, !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  14443. return rt;
  14444. }).call(exports, __webpack_require__, exports, module),
  14445. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) : Nn ? ((Nn.exports = rt)._ = rt, Fn._ = rt) : $n._ = rt;
  14446. }).call(this);
  14447. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/global.js */ 3), __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  14448. /***/ }),
  14449. /***/ 4:
  14450. /*!**********************************************************************!*\
  14451. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  14452. \**********************************************************************/
  14453. /*! no static exports found */
  14454. /***/ (function(module, exports) {
  14455. function _interopRequireDefault(obj) {
  14456. return obj && obj.__esModule ? obj : {
  14457. "default": obj
  14458. };
  14459. }
  14460. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14461. /***/ }),
  14462. /***/ 40:
  14463. /*!***********************************!*\
  14464. !*** (webpack)/buildin/module.js ***!
  14465. \***********************************/
  14466. /*! no static exports found */
  14467. /***/ (function(module, exports) {
  14468. module.exports = function(module) {
  14469. if (!module.webpackPolyfill) {
  14470. module.deprecate = function() {};
  14471. module.paths = [];
  14472. // module.parent = undefined by default
  14473. if (!module.children) module.children = [];
  14474. Object.defineProperty(module, "loaded", {
  14475. enumerable: true,
  14476. get: function() {
  14477. return module.l;
  14478. }
  14479. });
  14480. Object.defineProperty(module, "id", {
  14481. enumerable: true,
  14482. get: function() {
  14483. return module.i;
  14484. }
  14485. });
  14486. module.webpackPolyfill = 1;
  14487. }
  14488. return module;
  14489. };
  14490. /***/ }),
  14491. /***/ 41:
  14492. /*!****************************************!*\
  14493. !*** (webpack)/buildin/amd-options.js ***!
  14494. \****************************************/
  14495. /*! no static exports found */
  14496. /***/ (function(module, exports) {
  14497. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  14498. module.exports = __webpack_amd_options__;
  14499. /* WEBPACK VAR INJECTION */}.call(this, {}))
  14500. /***/ }),
  14501. /***/ 42:
  14502. /*!****************************************************!*\
  14503. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/index.js ***!
  14504. \****************************************************/
  14505. /*! no static exports found */
  14506. /***/ (function(module, exports, __webpack_require__) {
  14507. "use strict";
  14508. /* WEBPACK VAR INJECTION */(function(uni) {
  14509. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14510. Object.defineProperty(exports, "__esModule", {
  14511. value: true
  14512. });
  14513. exports.default = void 0;
  14514. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 43));
  14515. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 44));
  14516. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 48));
  14517. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 49));
  14518. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 53));
  14519. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 54));
  14520. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 55));
  14521. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 56));
  14522. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 57));
  14523. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 58));
  14524. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 59));
  14525. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 46));
  14526. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 45));
  14527. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 60));
  14528. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 47));
  14529. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 61));
  14530. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 62));
  14531. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 63));
  14532. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 64));
  14533. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 65));
  14534. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 66);
  14535. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 67));
  14536. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 68));
  14537. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 69));
  14538. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 70));
  14539. // 引入全局mixin
  14540. // 引入关于是否mixin集成小程序分享的配置
  14541. // import wxshare from './libs/mixin/mpShare.js'
  14542. // 全局挂载引入http相关请求拦截插件
  14543. function wranning(str) {
  14544. // 开发环境进行信息输出,主要是一些报错信息
  14545. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  14546. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  14547. if (true) {
  14548. console.warn(str);
  14549. }
  14550. }
  14551. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  14552. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  14553. // let vuexStore = {};
  14554. // try {
  14555. // vuexStore = require("@/store/$u.mixin.js");
  14556. // } catch (e) {
  14557. // //TODO handle the exception
  14558. // }
  14559. // post类型对象参数转为get类型url参数
  14560. var $u = {
  14561. queryParams: _queryParams.default,
  14562. route: _route.default,
  14563. timeFormat: _timeFormat.default,
  14564. date: _timeFormat.default,
  14565. // 另名date
  14566. timeFrom: _timeFrom.default,
  14567. colorGradient: _colorGradient.default.colorGradient,
  14568. colorToRgba: _colorGradient.default.colorToRgba,
  14569. guid: _guid.default,
  14570. color: _color.default,
  14571. sys: _sys.sys,
  14572. os: _sys.os,
  14573. type2icon: _type2icon.default,
  14574. randomArray: _randomArray.default,
  14575. wranning: wranning,
  14576. get: _request.default.get,
  14577. post: _request.default.post,
  14578. put: _request.default.put,
  14579. 'delete': _request.default.delete,
  14580. hexToRgb: _colorGradient.default.hexToRgb,
  14581. rgbToHex: _colorGradient.default.rgbToHex,
  14582. test: _test.default,
  14583. random: _random.default,
  14584. deepClone: _deepClone.default,
  14585. deepMerge: _deepMerge.default,
  14586. getParent: _getParent.default,
  14587. $parent: _$parent.default,
  14588. addUnit: _addUnit.default,
  14589. trim: _trim.default,
  14590. type: ['primary', 'success', 'error', 'warning', 'info'],
  14591. http: _request.default,
  14592. toast: _toast.default,
  14593. config: _config.default,
  14594. // uView配置信息相关,比如版本号
  14595. zIndex: _zIndex.default,
  14596. debounce: _debounce.default,
  14597. throttle: _throttle.default
  14598. };
  14599. // $u挂载到uni对象上
  14600. uni.$u = $u;
  14601. var install = function install(Vue) {
  14602. Vue.mixin(_mixin.default);
  14603. if (Vue.prototype.openShare) {
  14604. Vue.mixin(mpShare);
  14605. }
  14606. // Vue.mixin(vuexStore);
  14607. // 时间格式化,同时两个名称,date和timeFormat
  14608. Vue.filter('timeFormat', function (timestamp, format) {
  14609. return (0, _timeFormat.default)(timestamp, format);
  14610. });
  14611. Vue.filter('date', function (timestamp, format) {
  14612. return (0, _timeFormat.default)(timestamp, format);
  14613. });
  14614. // 将多久以前的方法,注入到全局过滤器
  14615. Vue.filter('timeFrom', function (timestamp, format) {
  14616. return (0, _timeFrom.default)(timestamp, format);
  14617. });
  14618. Vue.prototype.$u = $u;
  14619. };
  14620. var _default = {
  14621. install: install
  14622. };
  14623. exports.default = _default;
  14624. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14625. /***/ }),
  14626. /***/ 43:
  14627. /*!***************************************************************!*\
  14628. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/mixin/mixin.js ***!
  14629. \***************************************************************/
  14630. /*! no static exports found */
  14631. /***/ (function(module, exports, __webpack_require__) {
  14632. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  14633. data: function data() {
  14634. return {};
  14635. },
  14636. onLoad: function onLoad() {
  14637. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  14638. this.$u.getRect = this.$uGetRect;
  14639. },
  14640. methods: {
  14641. // 查询节点信息
  14642. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  14643. // 解决办法为在组件根部再套一个没有任何作用的view元素
  14644. $uGetRect: function $uGetRect(selector, all) {
  14645. var _this = this;
  14646. return new Promise(function (resolve) {
  14647. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  14648. if (all && Array.isArray(rect) && rect.length) {
  14649. resolve(rect);
  14650. }
  14651. if (!all && rect) {
  14652. resolve(rect);
  14653. }
  14654. }).exec();
  14655. });
  14656. },
  14657. getParentData: function getParentData() {
  14658. var _this2 = this;
  14659. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  14660. // 避免在created中去定义parent变量
  14661. if (!this.parent) this.parent = false;
  14662. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  14663. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  14664. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  14665. this.parent = this.$u.$parent.call(this, parentName);
  14666. if (this.parent) {
  14667. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  14668. Object.keys(this.parentData).map(function (key) {
  14669. _this2.parentData[key] = _this2.parent[key];
  14670. });
  14671. }
  14672. },
  14673. // 阻止事件冒泡
  14674. preventEvent: function preventEvent(e) {
  14675. e && e.stopPropagation && e.stopPropagation();
  14676. }
  14677. },
  14678. onReachBottom: function onReachBottom() {
  14679. uni.$emit('uOnReachBottom');
  14680. },
  14681. beforeDestroy: function beforeDestroy() {
  14682. var _this3 = this;
  14683. // 判断当前页面是否存在parent和children,一般在checkbox和checkbox-group父子联动的场景会有此情况
  14684. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  14685. if (this.parent && uni.$u.test.array(this.parent.children)) {
  14686. // 组件销毁时,移除父组件中的children数组中对应的实例
  14687. var childrenList = this.parent.children;
  14688. childrenList.map(function (child, index) {
  14689. // 如果相等,则移除
  14690. if (child === _this3) {
  14691. childrenList.splice(index, 1);
  14692. }
  14693. });
  14694. }
  14695. }
  14696. };
  14697. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14698. /***/ }),
  14699. /***/ 44:
  14700. /*!*****************************************************************!*\
  14701. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/request/index.js ***!
  14702. \*****************************************************************/
  14703. /*! no static exports found */
  14704. /***/ (function(module, exports, __webpack_require__) {
  14705. "use strict";
  14706. /* WEBPACK VAR INJECTION */(function(uni) {
  14707. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14708. Object.defineProperty(exports, "__esModule", {
  14709. value: true
  14710. });
  14711. exports.default = void 0;
  14712. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14713. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14714. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 45));
  14715. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 47));
  14716. var Request = /*#__PURE__*/function () {
  14717. function Request() {
  14718. var _this = this;
  14719. (0, _classCallCheck2.default)(this, Request);
  14720. this.config = {
  14721. baseUrl: '',
  14722. // 请求的根域名
  14723. // 默认的请求头
  14724. header: {},
  14725. method: 'POST',
  14726. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  14727. dataType: 'json',
  14728. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  14729. responseType: 'text',
  14730. showLoading: true,
  14731. // 是否显示请求中的loading
  14732. loadingText: '请求中...',
  14733. loadingTime: 800,
  14734. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  14735. timer: null,
  14736. // 定时器
  14737. originalData: false,
  14738. // 是否在拦截器中返回服务端的原始数据,见文档说明
  14739. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  14740. };
  14741. // 拦截器
  14742. this.interceptor = {
  14743. // 请求前的拦截
  14744. request: null,
  14745. // 请求后的拦截
  14746. response: null
  14747. };
  14748. // get请求
  14749. this.get = function (url) {
  14750. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14751. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14752. return _this.request({
  14753. method: 'GET',
  14754. url: url,
  14755. header: header,
  14756. data: data
  14757. });
  14758. };
  14759. // post请求
  14760. this.post = function (url) {
  14761. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14762. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14763. return _this.request({
  14764. url: url,
  14765. method: 'POST',
  14766. header: header,
  14767. data: data
  14768. });
  14769. };
  14770. // put请求,不支持支付宝小程序(HX2.6.15)
  14771. this.put = function (url) {
  14772. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14773. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14774. return _this.request({
  14775. url: url,
  14776. method: 'PUT',
  14777. header: header,
  14778. data: data
  14779. });
  14780. };
  14781. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  14782. this.delete = function (url) {
  14783. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14784. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14785. return _this.request({
  14786. url: url,
  14787. method: 'DELETE',
  14788. header: header,
  14789. data: data
  14790. });
  14791. };
  14792. }
  14793. (0, _createClass2.default)(Request, [{
  14794. key: "setConfig",
  14795. value:
  14796. // 设置全局默认配置
  14797. function setConfig(customConfig) {
  14798. // 深度合并对象,否则会造成对象深层属性丢失
  14799. this.config = (0, _deepMerge.default)(this.config, customConfig);
  14800. }
  14801. // 主要请求部分
  14802. }, {
  14803. key: "request",
  14804. value: function request() {
  14805. var _this2 = this;
  14806. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14807. // 检查请求拦截
  14808. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  14809. var tmpConfig = {};
  14810. var interceptorRequest = this.interceptor.request(options);
  14811. if (interceptorRequest === false) {
  14812. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  14813. return new Promise(function () {});
  14814. }
  14815. this.options = interceptorRequest;
  14816. }
  14817. options.dataType = options.dataType || this.config.dataType;
  14818. options.responseType = options.responseType || this.config.responseType;
  14819. options.url = options.url || '';
  14820. options.params = options.params || {};
  14821. options.header = Object.assign({}, this.config.header, options.header);
  14822. options.method = options.method || this.config.method;
  14823. return new Promise(function (resolve, reject) {
  14824. options.complete = function (response) {
  14825. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  14826. uni.hideLoading();
  14827. // 清除定时器,如果请求回来了,就无需loading
  14828. clearTimeout(_this2.config.timer);
  14829. _this2.config.timer = null;
  14830. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  14831. if (_this2.config.originalData) {
  14832. // 判断是否存在拦截器
  14833. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14834. var resInterceptors = _this2.interceptor.response(response);
  14835. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  14836. if (resInterceptors !== false) {
  14837. resolve(resInterceptors);
  14838. } else {
  14839. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  14840. reject(response);
  14841. }
  14842. } else {
  14843. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  14844. resolve(response);
  14845. }
  14846. } else {
  14847. if (response.statusCode == 200) {
  14848. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14849. var _resInterceptors = _this2.interceptor.response(response.data);
  14850. if (_resInterceptors !== false) {
  14851. resolve(_resInterceptors);
  14852. } else {
  14853. reject(response.data);
  14854. }
  14855. } else {
  14856. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  14857. resolve(response.data);
  14858. }
  14859. } else {
  14860. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  14861. // if(response.errMsg) {
  14862. // uni.showModal({
  14863. // title: response.errMsg
  14864. // });
  14865. // }
  14866. reject(response);
  14867. }
  14868. }
  14869. };
  14870. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  14871. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  14872. // 是否显示loading
  14873. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  14874. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  14875. if (_this2.config.showLoading && !_this2.config.timer) {
  14876. _this2.config.timer = setTimeout(function () {
  14877. uni.showLoading({
  14878. title: _this2.config.loadingText,
  14879. mask: _this2.config.loadingMask
  14880. });
  14881. _this2.config.timer = null;
  14882. }, _this2.config.loadingTime);
  14883. }
  14884. uni.request(options);
  14885. });
  14886. // .catch(res => {
  14887. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  14888. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  14889. // return new Promise(()=>{});
  14890. // })
  14891. }
  14892. }]);
  14893. return Request;
  14894. }();
  14895. var _default = new Request();
  14896. exports.default = _default;
  14897. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14898. /***/ }),
  14899. /***/ 45:
  14900. /*!**********************************************************************!*\
  14901. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepMerge.js ***!
  14902. \**********************************************************************/
  14903. /*! no static exports found */
  14904. /***/ (function(module, exports, __webpack_require__) {
  14905. "use strict";
  14906. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14907. Object.defineProperty(exports, "__esModule", {
  14908. value: true
  14909. });
  14910. exports.default = void 0;
  14911. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  14912. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 46));
  14913. // JS对象深度合并
  14914. function deepMerge() {
  14915. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14916. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14917. target = (0, _deepClone.default)(target);
  14918. if ((0, _typeof2.default)(target) !== 'object' || (0, _typeof2.default)(source) !== 'object') return false;
  14919. for (var prop in source) {
  14920. if (!source.hasOwnProperty(prop)) continue;
  14921. if (prop in target) {
  14922. if ((0, _typeof2.default)(target[prop]) !== 'object') {
  14923. target[prop] = source[prop];
  14924. } else {
  14925. if ((0, _typeof2.default)(source[prop]) !== 'object') {
  14926. target[prop] = source[prop];
  14927. } else {
  14928. if (target[prop].concat && source[prop].concat) {
  14929. target[prop] = target[prop].concat(source[prop]);
  14930. } else {
  14931. target[prop] = deepMerge(target[prop], source[prop]);
  14932. }
  14933. }
  14934. }
  14935. } else {
  14936. target[prop] = source[prop];
  14937. }
  14938. }
  14939. return target;
  14940. }
  14941. var _default = deepMerge;
  14942. exports.default = _default;
  14943. /***/ }),
  14944. /***/ 453:
  14945. /*!***********************************************************************************!*\
  14946. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/MpHtmlParser.js ***!
  14947. \***********************************************************************************/
  14948. /*! no static exports found */
  14949. /***/ (function(module, exports, __webpack_require__) {
  14950. /* WEBPACK VAR INJECTION */(function(uni) {/**
  14951. * html 解析器
  14952. * @tutorial https://github.com/jin-yufeng/Parser
  14953. * @version 20201029
  14954. * @author JinYufeng
  14955. * @listens MIT
  14956. */
  14957. var cfg = __webpack_require__(/*! ./config.js */ 454),
  14958. blankChar = cfg.blankChar,
  14959. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 455),
  14960. windowWidth = uni.getSystemInfoSync().windowWidth;
  14961. var emoji;
  14962. function MpHtmlParser(data) {
  14963. var _this = this;
  14964. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14965. this.attrs = {};
  14966. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  14967. this.data = data;
  14968. this.domain = options.domain;
  14969. this.DOM = [];
  14970. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  14971. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  14972. this.options = options;
  14973. this.state = this.Text;
  14974. this.STACK = [];
  14975. // 工具函数
  14976. this.bubble = function () {
  14977. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  14978. if (cfg.richOnlyTags[item.name]) return false;
  14979. item.c = 1;
  14980. }
  14981. return true;
  14982. };
  14983. this.decode = function (val, amp) {
  14984. var i = -1,
  14985. j,
  14986. en;
  14987. while (1) {
  14988. if ((i = val.indexOf('&', i + 1)) == -1) break;
  14989. if ((j = val.indexOf(';', i + 2)) == -1) break;
  14990. if (val[i + 1] == '#') {
  14991. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  14992. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  14993. } else {
  14994. en = val.substring(i + 1, j);
  14995. if (cfg.entities[en] || en == amp) val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  14996. }
  14997. }
  14998. return val;
  14999. };
  15000. this.getUrl = function (url) {
  15001. if (url[0] == '/') {
  15002. if (url[1] == '/') url = _this.options.prot + ':' + url;else if (_this.domain) url = _this.domain + url;
  15003. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://')) url = _this.domain + '/' + url;
  15004. return url;
  15005. };
  15006. this.isClose = function () {
  15007. return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';
  15008. };
  15009. this.section = function () {
  15010. return _this.data.substring(_this.start, _this.i);
  15011. };
  15012. this.parent = function () {
  15013. return _this.STACK[_this.STACK.length - 1];
  15014. };
  15015. this.siblings = function () {
  15016. return _this.STACK.length ? _this.parent().children : _this.DOM;
  15017. };
  15018. }
  15019. MpHtmlParser.prototype.parse = function () {
  15020. if (emoji) this.data = emoji.parseEmoji(this.data);
  15021. for (var c; c = this.data[this.i]; this.i++) {
  15022. this.state(c);
  15023. }
  15024. if (this.state == this.Text) this.setText();
  15025. while (this.STACK.length) {
  15026. this.popNode(this.STACK.pop());
  15027. }
  15028. return this.DOM;
  15029. };
  15030. // 设置属性
  15031. MpHtmlParser.prototype.setAttr = function () {
  15032. var name = this.attrName.toLowerCase(),
  15033. val = this.attrVal;
  15034. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else if (val) {
  15035. if (name == 'src' || name == 'data-src' && !this.attrs.src) this.attrs.src = this.getUrl(this.decode(val, 'amp'));else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp');else if (name.substr(0, 5) != 'data-') this.attrs[name] = val;
  15036. }
  15037. this.attrVal = '';
  15038. while (blankChar[this.data[this.i]]) {
  15039. this.i++;
  15040. }
  15041. if (this.isClose()) this.setNode();else {
  15042. this.start = this.i;
  15043. this.state = this.AttrName;
  15044. }
  15045. };
  15046. // 设置文本节点
  15047. MpHtmlParser.prototype.setText = function () {
  15048. var back,
  15049. text = this.section();
  15050. if (!text) return;
  15051. text = cfg.onText && cfg.onText(text, function () {
  15052. return back = true;
  15053. }) || text;
  15054. if (back) {
  15055. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  15056. var j = this.start + text.length;
  15057. for (this.i = this.start; this.i < j; this.i++) {
  15058. this.state(this.data[this.i]);
  15059. }
  15060. return;
  15061. }
  15062. if (!this.pre) {
  15063. // 合并空白符
  15064. var flag,
  15065. tmp = [];
  15066. for (var i = text.length, c; c = text[--i];) {
  15067. if (!blankChar[c]) {
  15068. tmp.unshift(c);
  15069. if (!flag) flag = 1;
  15070. } else {
  15071. if (tmp[0] != ' ') tmp.unshift(' ');
  15072. if (c == '\n' && flag == void 0) flag = 0;
  15073. }
  15074. }
  15075. if (flag == 0) return;
  15076. text = tmp.join('');
  15077. }
  15078. this.siblings().push({
  15079. type: 'text',
  15080. text: this.decode(text)
  15081. });
  15082. };
  15083. // 设置元素节点
  15084. MpHtmlParser.prototype.setNode = function () {
  15085. var node = {
  15086. name: this.tagName.toLowerCase(),
  15087. attrs: this.attrs
  15088. },
  15089. close = cfg.selfClosingTags[node.name];
  15090. if (this.options.nodes.length) node.type = 'node';
  15091. this.attrs = {};
  15092. if (!cfg.ignoreTags[node.name]) {
  15093. // 处理属性
  15094. var attrs = node.attrs,
  15095. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  15096. styleObj = {};
  15097. if (attrs.id) {
  15098. if (this.options.compress & 1) attrs.id = void 0;else if (this.options.useAnchor) this.bubble();
  15099. }
  15100. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  15101. switch (node.name) {
  15102. case 'a':
  15103. case 'ad':
  15104. this.bubble();
  15105. break;
  15106. case 'font':
  15107. if (attrs.color) {
  15108. styleObj['color'] = attrs.color;
  15109. attrs.color = void 0;
  15110. }
  15111. if (attrs.face) {
  15112. styleObj['font-family'] = attrs.face;
  15113. attrs.face = void 0;
  15114. }
  15115. if (attrs.size) {
  15116. var size = parseInt(attrs.size);
  15117. if (size < 1) size = 1;else if (size > 7) size = 7;
  15118. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  15119. styleObj['font-size'] = map[size - 1];
  15120. attrs.size = void 0;
  15121. }
  15122. break;
  15123. case 'embed':
  15124. var src = node.attrs.src || '',
  15125. type = node.attrs.type || '';
  15126. if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8')) node.name = 'video';else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes('.aac')) node.name = 'audio';else break;
  15127. if (node.attrs.autostart) node.attrs.autoplay = 'T';
  15128. node.attrs.controls = 'T';
  15129. case 'video':
  15130. case 'audio':
  15131. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else this["".concat(node.name, "Num")]++;
  15132. if (node.name == 'video') {
  15133. if (this.videoNum > 3) node.lazyLoad = 1;
  15134. if (attrs.width) {
  15135. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  15136. attrs.width = void 0;
  15137. }
  15138. if (attrs.height) {
  15139. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  15140. attrs.height = void 0;
  15141. }
  15142. }
  15143. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  15144. attrs.source = [];
  15145. if (attrs.src) {
  15146. attrs.source.push(attrs.src);
  15147. attrs.src = void 0;
  15148. }
  15149. this.bubble();
  15150. break;
  15151. case 'td':
  15152. case 'th':
  15153. if (attrs.colspan || attrs.rowspan) for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  15154. if (item.name == 'table') {
  15155. item.flag = 1;
  15156. break;
  15157. }
  15158. }
  15159. }
  15160. if (attrs.align) {
  15161. if (node.name == 'table') {
  15162. if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';else styleObj['float'] = attrs.align;
  15163. } else styleObj['text-align'] = attrs.align;
  15164. attrs.align = void 0;
  15165. }
  15166. // 压缩 style
  15167. var styles = style.split(';');
  15168. style = '';
  15169. for (var i = 0, len = styles.length; i < len; i++) {
  15170. var info = styles[i].split(':');
  15171. if (info.length < 2) continue;
  15172. var _key = info[0].trim().toLowerCase(),
  15173. _value = info.slice(1).join(':').trim();
  15174. if (_value[0] == '-' || _value.includes('safe')) style += ";".concat(_key, ":").concat(_value);else if (!styleObj[_key] || _value.includes('import') || !styleObj[_key].includes('import')) styleObj[_key] = _value;
  15175. }
  15176. if (node.name == 'img') {
  15177. if (attrs.src && !attrs.ignore) {
  15178. if (this.bubble()) attrs.i = (this.imgNum++).toString();else attrs.ignore = 'T';
  15179. }
  15180. if (attrs.ignore) {
  15181. style += ';-webkit-touch-callout:none';
  15182. styleObj['max-width'] = '100%';
  15183. }
  15184. var width;
  15185. if (styleObj.width) width = styleObj.width;else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px';
  15186. if (width) {
  15187. styleObj.width = width;
  15188. attrs.width = '100%';
  15189. if (parseInt(width) > windowWidth) {
  15190. styleObj.height = '';
  15191. if (attrs.height) attrs.height = void 0;
  15192. }
  15193. }
  15194. if (styleObj.height) {
  15195. attrs.height = styleObj.height;
  15196. styleObj.height = '';
  15197. } else if (attrs.height && !attrs.height.includes('%')) attrs.height = parseFloat(attrs.height) + 'px';
  15198. }
  15199. for (var key in styleObj) {
  15200. var value = styleObj[key];
  15201. if (!value) continue;
  15202. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  15203. // 填充链接
  15204. if (value.includes('url')) {
  15205. var j = value.indexOf('(');
  15206. if (j++ != -1) {
  15207. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {
  15208. j++;
  15209. }
  15210. value = value.substr(0, j) + this.getUrl(value.substr(j));
  15211. }
  15212. }
  15213. // 转换 rpx
  15214. else if (value.includes('rpx')) value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  15215. return parseFloat($) * windowWidth / 750 + 'px';
  15216. });else if (key == 'white-space' && value.includes('pre') && !close) this.pre = node.pre = true;
  15217. style += ";".concat(key, ":").concat(value);
  15218. }
  15219. style = style.substr(1);
  15220. if (style) attrs.style = style;
  15221. if (!close) {
  15222. node.children = [];
  15223. if (node.name == 'pre' && cfg.highlight) {
  15224. this.remove(node);
  15225. this.pre = node.pre = true;
  15226. }
  15227. this.siblings().push(node);
  15228. this.STACK.push(node);
  15229. } else if (!cfg.filter || cfg.filter(node, this) != false) this.siblings().push(node);
  15230. } else {
  15231. if (!close) this.remove(node);else if (node.name == 'source') {
  15232. var parent = this.parent();
  15233. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) parent.attrs.source.push(node.attrs.src);
  15234. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  15235. }
  15236. if (this.data[this.i] == '/') this.i++;
  15237. this.start = this.i + 1;
  15238. this.state = this.Text;
  15239. };
  15240. // 移除标签
  15241. MpHtmlParser.prototype.remove = function (node) {
  15242. var _this2 = this;
  15243. var name = node.name,
  15244. j = this.i;
  15245. // 处理 svg
  15246. var handleSvg = function handleSvg() {
  15247. var src = _this2.data.substring(j, _this2.i + 1);
  15248. node.attrs.xmlns = 'http://www.w3.org/2000/svg';
  15249. for (var key in node.attrs) {
  15250. if (key == 'viewbox') src = " viewBox=\"".concat(node.attrs.viewbox, "\"") + src;else if (key != 'style') src = " ".concat(key, "=\"").concat(node.attrs[key], "\"") + src;
  15251. }
  15252. src = '<svg' + src;
  15253. var parent = _this2.parent();
  15254. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  15255. _this2.siblings().push({
  15256. name: 'img',
  15257. attrs: {
  15258. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  15259. style: node.attrs.style,
  15260. ignore: 'T'
  15261. }
  15262. });
  15263. };
  15264. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  15265. while (1) {
  15266. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  15267. if (name == 'pre' || name == 'svg') this.i = j;else this.i = this.data.length;
  15268. return;
  15269. }
  15270. this.start = this.i += 2;
  15271. while (!blankChar[this.data[this.i]] && !this.isClose()) {
  15272. this.i++;
  15273. }
  15274. if (this.section().toLowerCase() == name) {
  15275. // 代码块高亮
  15276. if (name == 'pre') {
  15277. this.data = this.data.substr(0, j + 1) + cfg.highlight(this.data.substring(j + 1, this.i - 5), node.attrs) + this.data.substr(this.i - 5);
  15278. return this.i = j;
  15279. } else if (name == 'style') this.CssHandler.getStyle(this.data.substring(j + 1, this.i - 7));else if (name == 'title') this.DOM.title = this.data.substring(j + 1, this.i - 7);
  15280. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  15281. if (name == 'svg') handleSvg();
  15282. return;
  15283. }
  15284. }
  15285. };
  15286. // 节点出栈处理
  15287. MpHtmlParser.prototype.popNode = function (node) {
  15288. // 空白符处理
  15289. if (node.pre) {
  15290. node.pre = this.pre = void 0;
  15291. for (var i = this.STACK.length; i--;) {
  15292. if (this.STACK[i].pre) this.pre = true;
  15293. }
  15294. }
  15295. var siblings = this.siblings(),
  15296. len = siblings.length,
  15297. childs = node.children;
  15298. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false) return siblings.pop();
  15299. var attrs = node.attrs;
  15300. // 替换一些标签名
  15301. if (cfg.blockTags[node.name]) node.name = 'div';else if (!cfg.trustTags[node.name]) node.name = 'span';
  15302. // 处理列表
  15303. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  15304. if ((node.attrs.style || '').includes('list-style:none')) {
  15305. for (var _i = 0, child; child = childs[_i++];) {
  15306. if (child.name == 'li') child.name = 'div';
  15307. }
  15308. } else if (node.name == 'ul') {
  15309. var floor = 1;
  15310. for (var _i2 = this.STACK.length; _i2--;) {
  15311. if (this.STACK[_i2].name == 'ul') floor++;
  15312. }
  15313. if (floor != 1) for (var _i3 = childs.length; _i3--;) {
  15314. childs[_i3].floor = floor;
  15315. }
  15316. } else {
  15317. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  15318. if (_child.name == 'li') {
  15319. _child.type = 'ol';
  15320. _child.num = function (num, type) {
  15321. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  15322. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  15323. if (type == 'i' || type == 'I') {
  15324. num = (num - 1) % 99 + 1;
  15325. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  15326. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  15327. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  15328. if (type == 'i') return res.toLowerCase();
  15329. return res;
  15330. }
  15331. return num;
  15332. }(num++, attrs.type) + '.';
  15333. }
  15334. }
  15335. }
  15336. }
  15337. // 处理表格
  15338. if (node.name == 'table') {
  15339. var padding = parseFloat(attrs.cellpadding),
  15340. spacing = parseFloat(attrs.cellspacing),
  15341. border = parseFloat(attrs.border);
  15342. if (node.c) {
  15343. if (isNaN(padding)) padding = 2;
  15344. if (isNaN(spacing)) spacing = 2;
  15345. }
  15346. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  15347. if (node.flag && node.c) {
  15348. // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现
  15349. attrs.style = "".concat(attrs.style || '', ";").concat(spacing ? ";grid-gap:".concat(spacing, "px") : ';border-left:0;border-top:0');
  15350. var row = 1,
  15351. col = 1,
  15352. colNum,
  15353. trs = [],
  15354. children = [],
  15355. map = {};
  15356. (function f(ns) {
  15357. for (var i = 0; i < ns.length; i++) {
  15358. if (ns[i].name == 'tr') trs.push(ns[i]);else f(ns[i].children || []);
  15359. }
  15360. })(node.children);
  15361. for (var _i5 = 0; _i5 < trs.length; _i5++) {
  15362. for (var j = 0, td; td = trs[_i5].children[j]; j++) {
  15363. if (td.name == 'td' || td.name == 'th') {
  15364. while (map[row + '.' + col]) {
  15365. col++;
  15366. }
  15367. var cell = {
  15368. name: 'div',
  15369. c: 1,
  15370. attrs: {
  15371. style: (td.attrs.style || '') + (border ? ";border:".concat(border, "px solid gray") + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : '')
  15372. },
  15373. children: td.children
  15374. };
  15375. if (td.attrs.colspan) {
  15376. cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan));
  15377. if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1);
  15378. col += parseInt(td.attrs.colspan) - 1;
  15379. }
  15380. if (td.attrs.rowspan) {
  15381. cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan));
  15382. if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1);
  15383. for (var k = 1; k < td.attrs.rowspan; k++) {
  15384. map[row + k + '.' + col] = 1;
  15385. }
  15386. }
  15387. children.push(cell);
  15388. col++;
  15389. }
  15390. }
  15391. if (!colNum) {
  15392. colNum = col - 1;
  15393. attrs.style += ";grid-template-columns:repeat(".concat(colNum, ",auto)");
  15394. }
  15395. col = 1;
  15396. row++;
  15397. }
  15398. node.children = children;
  15399. } else {
  15400. attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  15401. if (border || padding) (function f(ns) {
  15402. for (var i = 0, n; n = ns[i]; i++) {
  15403. if (n.name == 'th' || n.name == 'td') {
  15404. if (border) n.attrs.style = "border:".concat(border, "px solid gray;").concat(n.attrs.style || '');
  15405. if (padding) n.attrs.style = "padding:".concat(padding, "px;").concat(n.attrs.style || '');
  15406. } else f(n.children || []);
  15407. }
  15408. })(childs);
  15409. }
  15410. if (this.options.autoscroll) {
  15411. var table = Object.assign({}, node);
  15412. node.name = 'div';
  15413. node.attrs = {
  15414. style: 'overflow:scroll'
  15415. };
  15416. node.children = [table];
  15417. }
  15418. }
  15419. this.CssHandler.pop && this.CssHandler.pop(node);
  15420. // 自动压缩
  15421. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') siblings[len - 1] = childs[0];
  15422. };
  15423. // 状态机
  15424. MpHtmlParser.prototype.Text = function (c) {
  15425. if (c == '<') {
  15426. var next = this.data[this.i + 1],
  15427. isLetter = function isLetter(c) {
  15428. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15429. };
  15430. if (isLetter(next)) {
  15431. this.setText();
  15432. this.start = this.i + 1;
  15433. this.state = this.TagName;
  15434. } else if (next == '/') {
  15435. this.setText();
  15436. if (isLetter(this.data[++this.i + 1])) {
  15437. this.start = this.i + 1;
  15438. this.state = this.EndTag;
  15439. } else this.Comment();
  15440. } else if (next == '!' || next == '?') {
  15441. this.setText();
  15442. this.Comment();
  15443. }
  15444. }
  15445. };
  15446. MpHtmlParser.prototype.Comment = function () {
  15447. var key;
  15448. if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->';else if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>';else key = '>';
  15449. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else this.i += key.length - 1;
  15450. this.start = this.i + 1;
  15451. this.state = this.Text;
  15452. };
  15453. MpHtmlParser.prototype.TagName = function (c) {
  15454. if (blankChar[c]) {
  15455. this.tagName = this.section();
  15456. while (blankChar[this.data[this.i]]) {
  15457. this.i++;
  15458. }
  15459. if (this.isClose()) this.setNode();else {
  15460. this.start = this.i;
  15461. this.state = this.AttrName;
  15462. }
  15463. } else if (this.isClose()) {
  15464. this.tagName = this.section();
  15465. this.setNode();
  15466. }
  15467. };
  15468. MpHtmlParser.prototype.AttrName = function (c) {
  15469. if (c == '=' || blankChar[c] || this.isClose()) {
  15470. this.attrName = this.section();
  15471. if (blankChar[c]) while (blankChar[this.data[++this.i]]) {
  15472. ;
  15473. }
  15474. if (this.data[this.i] == '=') {
  15475. while (blankChar[this.data[++this.i]]) {
  15476. ;
  15477. }
  15478. this.start = this.i--;
  15479. this.state = this.AttrValue;
  15480. } else this.setAttr();
  15481. }
  15482. };
  15483. MpHtmlParser.prototype.AttrValue = function (c) {
  15484. if (c == '"' || c == "'") {
  15485. this.start++;
  15486. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  15487. this.attrVal = this.section();
  15488. this.i++;
  15489. } else {
  15490. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {
  15491. ;
  15492. }
  15493. this.attrVal = this.section();
  15494. }
  15495. this.setAttr();
  15496. };
  15497. MpHtmlParser.prototype.EndTag = function (c) {
  15498. if (blankChar[c] || c == '>' || c == '/') {
  15499. var name = this.section().toLowerCase();
  15500. for (var i = this.STACK.length; i--;) {
  15501. if (this.STACK[i].name == name) break;
  15502. }
  15503. if (i != -1) {
  15504. var node;
  15505. while ((node = this.STACK.pop()).name != name) {
  15506. this.popNode(node);
  15507. }
  15508. this.popNode(node);
  15509. } else if (name == 'p' || name == 'br') this.siblings().push({
  15510. name: name,
  15511. attrs: {}
  15512. });
  15513. this.i = this.data.indexOf('>', this.i);
  15514. this.start = this.i + 1;
  15515. if (this.i == -1) this.i = this.data.length;else this.state = this.Text;
  15516. }
  15517. };
  15518. module.exports = MpHtmlParser;
  15519. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  15520. /***/ }),
  15521. /***/ 454:
  15522. /*!*****************************************************************************!*\
  15523. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/config.js ***!
  15524. \*****************************************************************************/
  15525. /*! no static exports found */
  15526. /***/ (function(module, exports, __webpack_require__) {
  15527. /* WEBPACK VAR INJECTION */(function(wx) {/* 配置文件 */
  15528. var cfg = {
  15529. // 出错占位图
  15530. errorImg: null,
  15531. // 过滤器函数
  15532. filter: null,
  15533. // 代码高亮函数
  15534. highlight: null,
  15535. // 文本处理函数
  15536. onText: null,
  15537. // 实体编码列表
  15538. entities: {
  15539. quot: '"',
  15540. apos: "'",
  15541. semi: ';',
  15542. nbsp: '\xA0',
  15543. ensp: "\u2002",
  15544. emsp: "\u2003",
  15545. ndash: '–',
  15546. mdash: '—',
  15547. middot: '·',
  15548. lsquo: '‘',
  15549. rsquo: '’',
  15550. ldquo: '“',
  15551. rdquo: '”',
  15552. bull: '•',
  15553. hellip: '…'
  15554. },
  15555. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  15556. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  15557. // 块级标签,将被转为 div
  15558. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  15559. // 将被移除的标签
  15560. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  15561. // 只能被 rich-text 显示的标签
  15562. richOnlyTags: makeMap('a,colgroup,fieldset,legend'),
  15563. // 自闭合的标签
  15564. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  15565. // 信任的标签
  15566. trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
  15567. // 默认的标签样式
  15568. userAgentStyles: {
  15569. address: 'font-style:italic',
  15570. big: 'display:inline;font-size:1.2em',
  15571. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  15572. caption: 'display:table-caption;text-align:center',
  15573. center: 'text-align:center',
  15574. cite: 'font-style:italic',
  15575. dd: 'margin-left:40px',
  15576. mark: 'background-color:yellow',
  15577. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  15578. s: 'text-decoration:line-through',
  15579. small: 'display:inline;font-size:0.8em',
  15580. u: 'text-decoration:underline'
  15581. }
  15582. };
  15583. function makeMap(str) {
  15584. var map = Object.create(null),
  15585. list = str.split(',');
  15586. for (var i = list.length; i--;) {
  15587. map[list[i]] = true;
  15588. }
  15589. return map;
  15590. }
  15591. if (wx.canIUse('editor')) {
  15592. cfg.blockTags.pre = void 0;
  15593. cfg.ignoreTags.rp = true;
  15594. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  15595. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  15596. }
  15597. module.exports = cfg;
  15598. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  15599. /***/ }),
  15600. /***/ 455:
  15601. /*!*********************************************************************************!*\
  15602. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/CssHandler.js ***!
  15603. \*********************************************************************************/
  15604. /*! no static exports found */
  15605. /***/ (function(module, exports, __webpack_require__) {
  15606. var cfg = __webpack_require__(/*! ./config.js */ 454),
  15607. isLetter = function isLetter(c) {
  15608. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15609. };
  15610. function CssHandler(tagStyle) {
  15611. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  15612. for (var item in tagStyle) {
  15613. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
  15614. }
  15615. this.styles = styles;
  15616. }
  15617. CssHandler.prototype.getStyle = function (data) {
  15618. this.styles = new parser(data, this.styles).parse();
  15619. };
  15620. CssHandler.prototype.match = function (name, attrs) {
  15621. var tmp,
  15622. matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  15623. if (attrs.class) {
  15624. var items = attrs.class.split(' ');
  15625. for (var i = 0, item; item = items[i]; i++) {
  15626. if (tmp = this.styles['.' + item]) matched += tmp + ';';
  15627. }
  15628. }
  15629. if (tmp = this.styles['#' + attrs.id]) matched += tmp + ';';
  15630. return matched;
  15631. };
  15632. module.exports = CssHandler;
  15633. function parser(data, init) {
  15634. this.data = data;
  15635. this.floor = 0;
  15636. this.i = 0;
  15637. this.list = [];
  15638. this.res = init;
  15639. this.state = this.Space;
  15640. }
  15641. parser.prototype.parse = function () {
  15642. for (var c; c = this.data[this.i]; this.i++) {
  15643. this.state(c);
  15644. }
  15645. return this.res;
  15646. };
  15647. parser.prototype.section = function () {
  15648. return this.data.substring(this.start, this.i);
  15649. };
  15650. // 状态机
  15651. parser.prototype.Space = function (c) {
  15652. if (c == '.' || c == '#' || isLetter(c)) {
  15653. this.start = this.i;
  15654. this.state = this.Name;
  15655. } else if (c == '/' && this.data[this.i + 1] == '*') this.Comment();else if (!cfg.blankChar[c] && c != ';') this.state = this.Ignore;
  15656. };
  15657. parser.prototype.Comment = function () {
  15658. this.i = this.data.indexOf('*/', this.i) + 1;
  15659. if (!this.i) this.i = this.data.length;
  15660. this.state = this.Space;
  15661. };
  15662. parser.prototype.Ignore = function (c) {
  15663. if (c == '{') this.floor++;else if (c == '}' && ! --this.floor) {
  15664. this.list = [];
  15665. this.state = this.Space;
  15666. }
  15667. };
  15668. parser.prototype.Name = function (c) {
  15669. if (cfg.blankChar[c]) {
  15670. this.list.push(this.section());
  15671. this.state = this.NameSpace;
  15672. } else if (c == '{') {
  15673. this.list.push(this.section());
  15674. this.Content();
  15675. } else if (c == ',') {
  15676. this.list.push(this.section());
  15677. this.Comma();
  15678. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') this.state = this.Ignore;
  15679. };
  15680. parser.prototype.NameSpace = function (c) {
  15681. if (c == '{') this.Content();else if (c == ',') this.Comma();else if (!cfg.blankChar[c]) this.state = this.Ignore;
  15682. };
  15683. parser.prototype.Comma = function () {
  15684. while (cfg.blankChar[this.data[++this.i]]) {
  15685. ;
  15686. }
  15687. if (this.data[this.i] == '{') this.Content();else {
  15688. this.start = this.i--;
  15689. this.state = this.Name;
  15690. }
  15691. };
  15692. parser.prototype.Content = function () {
  15693. this.start = ++this.i;
  15694. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  15695. var content = this.section();
  15696. for (var i = 0, item; item = this.list[i++];) {
  15697. if (this.res[item]) this.res[item] += ';' + content;else this.res[item] = content;
  15698. }
  15699. this.list = [];
  15700. this.state = this.Space;
  15701. };
  15702. /***/ }),
  15703. /***/ 46:
  15704. /*!**********************************************************************!*\
  15705. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepClone.js ***!
  15706. \**********************************************************************/
  15707. /*! no static exports found */
  15708. /***/ (function(module, exports, __webpack_require__) {
  15709. "use strict";
  15710. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15711. Object.defineProperty(exports, "__esModule", {
  15712. value: true
  15713. });
  15714. exports.default = void 0;
  15715. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15716. // 判断arr是否为一个数组,返回一个bool值
  15717. function isArray(arr) {
  15718. return Object.prototype.toString.call(arr) === '[object Array]';
  15719. }
  15720. // 深度克隆
  15721. function deepClone(obj) {
  15722. // 对常见的“非”值,直接返回原来值
  15723. if ([null, undefined, NaN, false].includes(obj)) return obj;
  15724. if ((0, _typeof2.default)(obj) !== "object" && typeof obj !== 'function') {
  15725. //原始类型直接返回
  15726. return obj;
  15727. }
  15728. var o = isArray(obj) ? [] : {};
  15729. for (var i in obj) {
  15730. if (obj.hasOwnProperty(i)) {
  15731. o[i] = (0, _typeof2.default)(obj[i]) === "object" ? deepClone(obj[i]) : obj[i];
  15732. }
  15733. }
  15734. return o;
  15735. }
  15736. var _default = deepClone;
  15737. exports.default = _default;
  15738. /***/ }),
  15739. /***/ 47:
  15740. /*!*****************************************************************!*\
  15741. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/test.js ***!
  15742. \*****************************************************************/
  15743. /*! no static exports found */
  15744. /***/ (function(module, exports, __webpack_require__) {
  15745. "use strict";
  15746. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15747. Object.defineProperty(exports, "__esModule", {
  15748. value: true
  15749. });
  15750. exports.default = void 0;
  15751. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15752. /**
  15753. * 验证电子邮箱格式
  15754. */
  15755. function email(value) {
  15756. return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
  15757. }
  15758. /**
  15759. * 验证手机格式
  15760. */
  15761. function mobile(value) {
  15762. return /^1[3-9]\d{9}$/.test(value);
  15763. }
  15764. /**
  15765. * 验证URL格式
  15766. */
  15767. function url(value) {
  15768. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  15769. }
  15770. /**
  15771. * 验证日期格式
  15772. */
  15773. function date(value) {
  15774. return !/Invalid|NaN/.test(new Date(value).toString());
  15775. }
  15776. /**
  15777. * 验证ISO类型的日期格式
  15778. */
  15779. function dateISO(value) {
  15780. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  15781. }
  15782. /**
  15783. * 验证十进制数字
  15784. */
  15785. function number(value) {
  15786. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  15787. }
  15788. /**
  15789. * 验证整数
  15790. */
  15791. function digits(value) {
  15792. return /^\d+$/.test(value);
  15793. }
  15794. /**
  15795. * 验证身份证号码
  15796. */
  15797. function idCard(value) {
  15798. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  15799. }
  15800. /**
  15801. * 是否车牌号
  15802. */
  15803. function carNo(value) {
  15804. // 新能源车牌
  15805. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  15806. // 旧车牌
  15807. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  15808. if (value.length === 7) {
  15809. return creg.test(value);
  15810. } else if (value.length === 8) {
  15811. return xreg.test(value);
  15812. } else {
  15813. return false;
  15814. }
  15815. }
  15816. /**
  15817. * 金额,只允许2位小数
  15818. */
  15819. function amount(value) {
  15820. //金额,只允许保留两位小数
  15821. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  15822. }
  15823. /**
  15824. * 中文
  15825. */
  15826. function chinese(value) {
  15827. var reg = /^[\u4e00-\u9fa5]+$/gi;
  15828. return reg.test(value);
  15829. }
  15830. /**
  15831. * 只能输入字母
  15832. */
  15833. function letter(value) {
  15834. return /^[a-zA-Z]*$/.test(value);
  15835. }
  15836. /**
  15837. * 只能是字母或者数字
  15838. */
  15839. function enOrNum(value) {
  15840. //英文或者数字
  15841. var reg = /^[0-9a-zA-Z]*$/g;
  15842. return reg.test(value);
  15843. }
  15844. /**
  15845. * 验证是否包含某个值
  15846. */
  15847. function contains(value, param) {
  15848. return value.indexOf(param) >= 0;
  15849. }
  15850. /**
  15851. * 验证一个值范围[min, max]
  15852. */
  15853. function range(value, param) {
  15854. return value >= param[0] && value <= param[1];
  15855. }
  15856. /**
  15857. * 验证一个长度范围[min, max]
  15858. */
  15859. function rangeLength(value, param) {
  15860. return value.length >= param[0] && value.length <= param[1];
  15861. }
  15862. /**
  15863. * 是否固定电话
  15864. */
  15865. function landline(value) {
  15866. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  15867. return reg.test(value);
  15868. }
  15869. /**
  15870. * 判断是否为空
  15871. */
  15872. function empty(value) {
  15873. switch ((0, _typeof2.default)(value)) {
  15874. case 'undefined':
  15875. return true;
  15876. case 'string':
  15877. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  15878. break;
  15879. case 'boolean':
  15880. if (!value) return true;
  15881. break;
  15882. case 'number':
  15883. if (0 === value || isNaN(value)) return true;
  15884. break;
  15885. case 'object':
  15886. if (null === value || value.length === 0) return true;
  15887. for (var i in value) {
  15888. return false;
  15889. }
  15890. return true;
  15891. }
  15892. return false;
  15893. }
  15894. /**
  15895. * 是否json字符串
  15896. */
  15897. function jsonString(value) {
  15898. if (typeof value == 'string') {
  15899. try {
  15900. var obj = JSON.parse(value);
  15901. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  15902. return true;
  15903. } else {
  15904. return false;
  15905. }
  15906. } catch (e) {
  15907. return false;
  15908. }
  15909. }
  15910. return false;
  15911. }
  15912. /**
  15913. * 是否数组
  15914. */
  15915. function array(value) {
  15916. if (typeof Array.isArray === "function") {
  15917. return Array.isArray(value);
  15918. } else {
  15919. return Object.prototype.toString.call(value) === "[object Array]";
  15920. }
  15921. }
  15922. /**
  15923. * 是否对象
  15924. */
  15925. function object(value) {
  15926. return Object.prototype.toString.call(value) === '[object Object]';
  15927. }
  15928. /**
  15929. * 是否短信验证码
  15930. */
  15931. function code(value) {
  15932. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  15933. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  15934. }
  15935. var _default = {
  15936. email: email,
  15937. mobile: mobile,
  15938. url: url,
  15939. date: date,
  15940. dateISO: dateISO,
  15941. number: number,
  15942. digits: digits,
  15943. idCard: idCard,
  15944. carNo: carNo,
  15945. amount: amount,
  15946. chinese: chinese,
  15947. letter: letter,
  15948. enOrNum: enOrNum,
  15949. contains: contains,
  15950. range: range,
  15951. rangeLength: rangeLength,
  15952. empty: empty,
  15953. isEmpty: empty,
  15954. jsonString: jsonString,
  15955. landline: landline,
  15956. object: object,
  15957. array: array,
  15958. code: code
  15959. };
  15960. exports.default = _default;
  15961. /***/ }),
  15962. /***/ 477:
  15963. /*!*****************************************************************!*\
  15964. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/province.js ***!
  15965. \*****************************************************************/
  15966. /*! no static exports found */
  15967. /***/ (function(module, exports, __webpack_require__) {
  15968. "use strict";
  15969. Object.defineProperty(exports, "__esModule", {
  15970. value: true
  15971. });
  15972. exports.default = void 0;
  15973. var provinceData = [{
  15974. "label": "北京市",
  15975. "value": "11"
  15976. }, {
  15977. "label": "天津市",
  15978. "value": "12"
  15979. }, {
  15980. "label": "河北省",
  15981. "value": "13"
  15982. }, {
  15983. "label": "山西省",
  15984. "value": "14"
  15985. }, {
  15986. "label": "内蒙古自治区",
  15987. "value": "15"
  15988. }, {
  15989. "label": "辽宁省",
  15990. "value": "21"
  15991. }, {
  15992. "label": "吉林省",
  15993. "value": "22"
  15994. }, {
  15995. "label": "黑龙江省",
  15996. "value": "23"
  15997. }, {
  15998. "label": "上海市",
  15999. "value": "31"
  16000. }, {
  16001. "label": "江苏省",
  16002. "value": "32"
  16003. }, {
  16004. "label": "浙江省",
  16005. "value": "33"
  16006. }, {
  16007. "label": "安徽省",
  16008. "value": "34"
  16009. }, {
  16010. "label": "福建省",
  16011. "value": "35"
  16012. }, {
  16013. "label": "江西省",
  16014. "value": "36"
  16015. }, {
  16016. "label": "山东省",
  16017. "value": "37"
  16018. }, {
  16019. "label": "河南省",
  16020. "value": "41"
  16021. }, {
  16022. "label": "湖北省",
  16023. "value": "42"
  16024. }, {
  16025. "label": "湖南省",
  16026. "value": "43"
  16027. }, {
  16028. "label": "广东省",
  16029. "value": "44"
  16030. }, {
  16031. "label": "广西壮族自治区",
  16032. "value": "45"
  16033. }, {
  16034. "label": "海南省",
  16035. "value": "46"
  16036. }, {
  16037. "label": "重庆市",
  16038. "value": "50"
  16039. }, {
  16040. "label": "四川省",
  16041. "value": "51"
  16042. }, {
  16043. "label": "贵州省",
  16044. "value": "52"
  16045. }, {
  16046. "label": "云南省",
  16047. "value": "53"
  16048. }, {
  16049. "label": "西藏自治区",
  16050. "value": "54"
  16051. }, {
  16052. "label": "陕西省",
  16053. "value": "61"
  16054. }, {
  16055. "label": "甘肃省",
  16056. "value": "62"
  16057. }, {
  16058. "label": "青海省",
  16059. "value": "63"
  16060. }, {
  16061. "label": "宁夏回族自治区",
  16062. "value": "64"
  16063. }, {
  16064. "label": "新疆维吾尔自治区",
  16065. "value": "65"
  16066. }, {
  16067. "label": "台湾",
  16068. "value": "66"
  16069. }, {
  16070. "label": "香港",
  16071. "value": "67"
  16072. }, {
  16073. "label": "澳门",
  16074. "value": "68"
  16075. }];
  16076. var _default = provinceData;
  16077. exports.default = _default;
  16078. /***/ }),
  16079. /***/ 478:
  16080. /*!*************************************************************!*\
  16081. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/city.js ***!
  16082. \*************************************************************/
  16083. /*! no static exports found */
  16084. /***/ (function(module, exports, __webpack_require__) {
  16085. "use strict";
  16086. Object.defineProperty(exports, "__esModule", {
  16087. value: true
  16088. });
  16089. exports.default = void 0;
  16090. var cityData = [[{
  16091. "label": "市辖区",
  16092. "value": "1101"
  16093. }], [{
  16094. "label": "市辖区",
  16095. "value": "1201"
  16096. }], [{
  16097. "label": "石家庄市",
  16098. "value": "1301"
  16099. }, {
  16100. "label": "唐山市",
  16101. "value": "1302"
  16102. }, {
  16103. "label": "秦皇岛市",
  16104. "value": "1303"
  16105. }, {
  16106. "label": "邯郸市",
  16107. "value": "1304"
  16108. }, {
  16109. "label": "邢台市",
  16110. "value": "1305"
  16111. }, {
  16112. "label": "保定市",
  16113. "value": "1306"
  16114. }, {
  16115. "label": "张家口市",
  16116. "value": "1307"
  16117. }, {
  16118. "label": "承德市",
  16119. "value": "1308"
  16120. }, {
  16121. "label": "沧州市",
  16122. "value": "1309"
  16123. }, {
  16124. "label": "廊坊市",
  16125. "value": "1310"
  16126. }, {
  16127. "label": "衡水市",
  16128. "value": "1311"
  16129. }], [{
  16130. "label": "太原市",
  16131. "value": "1401"
  16132. }, {
  16133. "label": "大同市",
  16134. "value": "1402"
  16135. }, {
  16136. "label": "阳泉市",
  16137. "value": "1403"
  16138. }, {
  16139. "label": "长治市",
  16140. "value": "1404"
  16141. }, {
  16142. "label": "晋城市",
  16143. "value": "1405"
  16144. }, {
  16145. "label": "朔州市",
  16146. "value": "1406"
  16147. }, {
  16148. "label": "晋中市",
  16149. "value": "1407"
  16150. }, {
  16151. "label": "运城市",
  16152. "value": "1408"
  16153. }, {
  16154. "label": "忻州市",
  16155. "value": "1409"
  16156. }, {
  16157. "label": "临汾市",
  16158. "value": "1410"
  16159. }, {
  16160. "label": "吕梁市",
  16161. "value": "1411"
  16162. }], [{
  16163. "label": "呼和浩特市",
  16164. "value": "1501"
  16165. }, {
  16166. "label": "包头市",
  16167. "value": "1502"
  16168. }, {
  16169. "label": "乌海市",
  16170. "value": "1503"
  16171. }, {
  16172. "label": "赤峰市",
  16173. "value": "1504"
  16174. }, {
  16175. "label": "通辽市",
  16176. "value": "1505"
  16177. }, {
  16178. "label": "鄂尔多斯市",
  16179. "value": "1506"
  16180. }, {
  16181. "label": "呼伦贝尔市",
  16182. "value": "1507"
  16183. }, {
  16184. "label": "巴彦淖尔市",
  16185. "value": "1508"
  16186. }, {
  16187. "label": "乌兰察布市",
  16188. "value": "1509"
  16189. }, {
  16190. "label": "兴安盟",
  16191. "value": "1522"
  16192. }, {
  16193. "label": "锡林郭勒盟",
  16194. "value": "1525"
  16195. }, {
  16196. "label": "阿拉善盟",
  16197. "value": "1529"
  16198. }], [{
  16199. "label": "沈阳市",
  16200. "value": "2101"
  16201. }, {
  16202. "label": "大连市",
  16203. "value": "2102"
  16204. }, {
  16205. "label": "鞍山市",
  16206. "value": "2103"
  16207. }, {
  16208. "label": "抚顺市",
  16209. "value": "2104"
  16210. }, {
  16211. "label": "本溪市",
  16212. "value": "2105"
  16213. }, {
  16214. "label": "丹东市",
  16215. "value": "2106"
  16216. }, {
  16217. "label": "锦州市",
  16218. "value": "2107"
  16219. }, {
  16220. "label": "营口市",
  16221. "value": "2108"
  16222. }, {
  16223. "label": "阜新市",
  16224. "value": "2109"
  16225. }, {
  16226. "label": "辽阳市",
  16227. "value": "2110"
  16228. }, {
  16229. "label": "盘锦市",
  16230. "value": "2111"
  16231. }, {
  16232. "label": "铁岭市",
  16233. "value": "2112"
  16234. }, {
  16235. "label": "朝阳市",
  16236. "value": "2113"
  16237. }, {
  16238. "label": "葫芦岛市",
  16239. "value": "2114"
  16240. }], [{
  16241. "label": "长春市",
  16242. "value": "2201"
  16243. }, {
  16244. "label": "吉林市",
  16245. "value": "2202"
  16246. }, {
  16247. "label": "四平市",
  16248. "value": "2203"
  16249. }, {
  16250. "label": "辽源市",
  16251. "value": "2204"
  16252. }, {
  16253. "label": "通化市",
  16254. "value": "2205"
  16255. }, {
  16256. "label": "白山市",
  16257. "value": "2206"
  16258. }, {
  16259. "label": "松原市",
  16260. "value": "2207"
  16261. }, {
  16262. "label": "白城市",
  16263. "value": "2208"
  16264. }, {
  16265. "label": "延边朝鲜族自治州",
  16266. "value": "2224"
  16267. }], [{
  16268. "label": "哈尔滨市",
  16269. "value": "2301"
  16270. }, {
  16271. "label": "齐齐哈尔市",
  16272. "value": "2302"
  16273. }, {
  16274. "label": "鸡西市",
  16275. "value": "2303"
  16276. }, {
  16277. "label": "鹤岗市",
  16278. "value": "2304"
  16279. }, {
  16280. "label": "双鸭山市",
  16281. "value": "2305"
  16282. }, {
  16283. "label": "大庆市",
  16284. "value": "2306"
  16285. }, {
  16286. "label": "伊春市",
  16287. "value": "2307"
  16288. }, {
  16289. "label": "佳木斯市",
  16290. "value": "2308"
  16291. }, {
  16292. "label": "七台河市",
  16293. "value": "2309"
  16294. }, {
  16295. "label": "牡丹江市",
  16296. "value": "2310"
  16297. }, {
  16298. "label": "黑河市",
  16299. "value": "2311"
  16300. }, {
  16301. "label": "绥化市",
  16302. "value": "2312"
  16303. }, {
  16304. "label": "大兴安岭地区",
  16305. "value": "2327"
  16306. }], [{
  16307. "label": "市辖区",
  16308. "value": "3101"
  16309. }], [{
  16310. "label": "南京市",
  16311. "value": "3201"
  16312. }, {
  16313. "label": "无锡市",
  16314. "value": "3202"
  16315. }, {
  16316. "label": "徐州市",
  16317. "value": "3203"
  16318. }, {
  16319. "label": "常州市",
  16320. "value": "3204"
  16321. }, {
  16322. "label": "苏州市",
  16323. "value": "3205"
  16324. }, {
  16325. "label": "南通市",
  16326. "value": "3206"
  16327. }, {
  16328. "label": "连云港市",
  16329. "value": "3207"
  16330. }, {
  16331. "label": "淮安市",
  16332. "value": "3208"
  16333. }, {
  16334. "label": "盐城市",
  16335. "value": "3209"
  16336. }, {
  16337. "label": "扬州市",
  16338. "value": "3210"
  16339. }, {
  16340. "label": "镇江市",
  16341. "value": "3211"
  16342. }, {
  16343. "label": "泰州市",
  16344. "value": "3212"
  16345. }, {
  16346. "label": "宿迁市",
  16347. "value": "3213"
  16348. }], [{
  16349. "label": "杭州市",
  16350. "value": "3301"
  16351. }, {
  16352. "label": "宁波市",
  16353. "value": "3302"
  16354. }, {
  16355. "label": "温州市",
  16356. "value": "3303"
  16357. }, {
  16358. "label": "嘉兴市",
  16359. "value": "3304"
  16360. }, {
  16361. "label": "湖州市",
  16362. "value": "3305"
  16363. }, {
  16364. "label": "绍兴市",
  16365. "value": "3306"
  16366. }, {
  16367. "label": "金华市",
  16368. "value": "3307"
  16369. }, {
  16370. "label": "衢州市",
  16371. "value": "3308"
  16372. }, {
  16373. "label": "舟山市",
  16374. "value": "3309"
  16375. }, {
  16376. "label": "台州市",
  16377. "value": "3310"
  16378. }, {
  16379. "label": "丽水市",
  16380. "value": "3311"
  16381. }], [{
  16382. "label": "合肥市",
  16383. "value": "3401"
  16384. }, {
  16385. "label": "芜湖市",
  16386. "value": "3402"
  16387. }, {
  16388. "label": "蚌埠市",
  16389. "value": "3403"
  16390. }, {
  16391. "label": "淮南市",
  16392. "value": "3404"
  16393. }, {
  16394. "label": "马鞍山市",
  16395. "value": "3405"
  16396. }, {
  16397. "label": "淮北市",
  16398. "value": "3406"
  16399. }, {
  16400. "label": "铜陵市",
  16401. "value": "3407"
  16402. }, {
  16403. "label": "安庆市",
  16404. "value": "3408"
  16405. }, {
  16406. "label": "黄山市",
  16407. "value": "3410"
  16408. }, {
  16409. "label": "滁州市",
  16410. "value": "3411"
  16411. }, {
  16412. "label": "阜阳市",
  16413. "value": "3412"
  16414. }, {
  16415. "label": "宿州市",
  16416. "value": "3413"
  16417. }, {
  16418. "label": "六安市",
  16419. "value": "3415"
  16420. }, {
  16421. "label": "亳州市",
  16422. "value": "3416"
  16423. }, {
  16424. "label": "池州市",
  16425. "value": "3417"
  16426. }, {
  16427. "label": "宣城市",
  16428. "value": "3418"
  16429. }], [{
  16430. "label": "福州市",
  16431. "value": "3501"
  16432. }, {
  16433. "label": "厦门市",
  16434. "value": "3502"
  16435. }, {
  16436. "label": "莆田市",
  16437. "value": "3503"
  16438. }, {
  16439. "label": "三明市",
  16440. "value": "3504"
  16441. }, {
  16442. "label": "泉州市",
  16443. "value": "3505"
  16444. }, {
  16445. "label": "漳州市",
  16446. "value": "3506"
  16447. }, {
  16448. "label": "南平市",
  16449. "value": "3507"
  16450. }, {
  16451. "label": "龙岩市",
  16452. "value": "3508"
  16453. }, {
  16454. "label": "宁德市",
  16455. "value": "3509"
  16456. }], [{
  16457. "label": "南昌市",
  16458. "value": "3601"
  16459. }, {
  16460. "label": "景德镇市",
  16461. "value": "3602"
  16462. }, {
  16463. "label": "萍乡市",
  16464. "value": "3603"
  16465. }, {
  16466. "label": "九江市",
  16467. "value": "3604"
  16468. }, {
  16469. "label": "新余市",
  16470. "value": "3605"
  16471. }, {
  16472. "label": "鹰潭市",
  16473. "value": "3606"
  16474. }, {
  16475. "label": "赣州市",
  16476. "value": "3607"
  16477. }, {
  16478. "label": "吉安市",
  16479. "value": "3608"
  16480. }, {
  16481. "label": "宜春市",
  16482. "value": "3609"
  16483. }, {
  16484. "label": "抚州市",
  16485. "value": "3610"
  16486. }, {
  16487. "label": "上饶市",
  16488. "value": "3611"
  16489. }], [{
  16490. "label": "济南市",
  16491. "value": "3701"
  16492. }, {
  16493. "label": "青岛市",
  16494. "value": "3702"
  16495. }, {
  16496. "label": "淄博市",
  16497. "value": "3703"
  16498. }, {
  16499. "label": "枣庄市",
  16500. "value": "3704"
  16501. }, {
  16502. "label": "东营市",
  16503. "value": "3705"
  16504. }, {
  16505. "label": "烟台市",
  16506. "value": "3706"
  16507. }, {
  16508. "label": "潍坊市",
  16509. "value": "3707"
  16510. }, {
  16511. "label": "济宁市",
  16512. "value": "3708"
  16513. }, {
  16514. "label": "泰安市",
  16515. "value": "3709"
  16516. }, {
  16517. "label": "威海市",
  16518. "value": "3710"
  16519. }, {
  16520. "label": "日照市",
  16521. "value": "3711"
  16522. }, {
  16523. "label": "莱芜市",
  16524. "value": "3712"
  16525. }, {
  16526. "label": "临沂市",
  16527. "value": "3713"
  16528. }, {
  16529. "label": "德州市",
  16530. "value": "3714"
  16531. }, {
  16532. "label": "聊城市",
  16533. "value": "3715"
  16534. }, {
  16535. "label": "滨州市",
  16536. "value": "3716"
  16537. }, {
  16538. "label": "菏泽市",
  16539. "value": "3717"
  16540. }], [{
  16541. "label": "郑州市",
  16542. "value": "4101"
  16543. }, {
  16544. "label": "开封市",
  16545. "value": "4102"
  16546. }, {
  16547. "label": "洛阳市",
  16548. "value": "4103"
  16549. }, {
  16550. "label": "平顶山市",
  16551. "value": "4104"
  16552. }, {
  16553. "label": "安阳市",
  16554. "value": "4105"
  16555. }, {
  16556. "label": "鹤壁市",
  16557. "value": "4106"
  16558. }, {
  16559. "label": "新乡市",
  16560. "value": "4107"
  16561. }, {
  16562. "label": "焦作市",
  16563. "value": "4108"
  16564. }, {
  16565. "label": "濮阳市",
  16566. "value": "4109"
  16567. }, {
  16568. "label": "许昌市",
  16569. "value": "4110"
  16570. }, {
  16571. "label": "漯河市",
  16572. "value": "4111"
  16573. }, {
  16574. "label": "三门峡市",
  16575. "value": "4112"
  16576. }, {
  16577. "label": "南阳市",
  16578. "value": "4113"
  16579. }, {
  16580. "label": "商丘市",
  16581. "value": "4114"
  16582. }, {
  16583. "label": "信阳市",
  16584. "value": "4115"
  16585. }, {
  16586. "label": "周口市",
  16587. "value": "4116"
  16588. }, {
  16589. "label": "驻马店市",
  16590. "value": "4117"
  16591. }, {
  16592. "label": "省直辖县级行政区划",
  16593. "value": "4190"
  16594. }], [{
  16595. "label": "武汉市",
  16596. "value": "4201"
  16597. }, {
  16598. "label": "黄石市",
  16599. "value": "4202"
  16600. }, {
  16601. "label": "十堰市",
  16602. "value": "4203"
  16603. }, {
  16604. "label": "宜昌市",
  16605. "value": "4205"
  16606. }, {
  16607. "label": "襄阳市",
  16608. "value": "4206"
  16609. }, {
  16610. "label": "鄂州市",
  16611. "value": "4207"
  16612. }, {
  16613. "label": "荆门市",
  16614. "value": "4208"
  16615. }, {
  16616. "label": "孝感市",
  16617. "value": "4209"
  16618. }, {
  16619. "label": "荆州市",
  16620. "value": "4210"
  16621. }, {
  16622. "label": "黄冈市",
  16623. "value": "4211"
  16624. }, {
  16625. "label": "咸宁市",
  16626. "value": "4212"
  16627. }, {
  16628. "label": "随州市",
  16629. "value": "4213"
  16630. }, {
  16631. "label": "恩施土家族苗族自治州",
  16632. "value": "4228"
  16633. }, {
  16634. "label": "省直辖县级行政区划",
  16635. "value": "4290"
  16636. }], [{
  16637. "label": "长沙市",
  16638. "value": "4301"
  16639. }, {
  16640. "label": "株洲市",
  16641. "value": "4302"
  16642. }, {
  16643. "label": "湘潭市",
  16644. "value": "4303"
  16645. }, {
  16646. "label": "衡阳市",
  16647. "value": "4304"
  16648. }, {
  16649. "label": "邵阳市",
  16650. "value": "4305"
  16651. }, {
  16652. "label": "岳阳市",
  16653. "value": "4306"
  16654. }, {
  16655. "label": "常德市",
  16656. "value": "4307"
  16657. }, {
  16658. "label": "张家界市",
  16659. "value": "4308"
  16660. }, {
  16661. "label": "益阳市",
  16662. "value": "4309"
  16663. }, {
  16664. "label": "郴州市",
  16665. "value": "4310"
  16666. }, {
  16667. "label": "永州市",
  16668. "value": "4311"
  16669. }, {
  16670. "label": "怀化市",
  16671. "value": "4312"
  16672. }, {
  16673. "label": "娄底市",
  16674. "value": "4313"
  16675. }, {
  16676. "label": "湘西土家族苗族自治州",
  16677. "value": "4331"
  16678. }], [{
  16679. "label": "广州市",
  16680. "value": "4401"
  16681. }, {
  16682. "label": "韶关市",
  16683. "value": "4402"
  16684. }, {
  16685. "label": "深圳市",
  16686. "value": "4403"
  16687. }, {
  16688. "label": "珠海市",
  16689. "value": "4404"
  16690. }, {
  16691. "label": "汕头市",
  16692. "value": "4405"
  16693. }, {
  16694. "label": "佛山市",
  16695. "value": "4406"
  16696. }, {
  16697. "label": "江门市",
  16698. "value": "4407"
  16699. }, {
  16700. "label": "湛江市",
  16701. "value": "4408"
  16702. }, {
  16703. "label": "茂名市",
  16704. "value": "4409"
  16705. }, {
  16706. "label": "肇庆市",
  16707. "value": "4412"
  16708. }, {
  16709. "label": "惠州市",
  16710. "value": "4413"
  16711. }, {
  16712. "label": "梅州市",
  16713. "value": "4414"
  16714. }, {
  16715. "label": "汕尾市",
  16716. "value": "4415"
  16717. }, {
  16718. "label": "河源市",
  16719. "value": "4416"
  16720. }, {
  16721. "label": "阳江市",
  16722. "value": "4417"
  16723. }, {
  16724. "label": "清远市",
  16725. "value": "4418"
  16726. }, {
  16727. "label": "东莞市",
  16728. "value": "4419"
  16729. }, {
  16730. "label": "中山市",
  16731. "value": "4420"
  16732. }, {
  16733. "label": "潮州市",
  16734. "value": "4451"
  16735. }, {
  16736. "label": "揭阳市",
  16737. "value": "4452"
  16738. }, {
  16739. "label": "云浮市",
  16740. "value": "4453"
  16741. }], [{
  16742. "label": "南宁市",
  16743. "value": "4501"
  16744. }, {
  16745. "label": "柳州市",
  16746. "value": "4502"
  16747. }, {
  16748. "label": "桂林市",
  16749. "value": "4503"
  16750. }, {
  16751. "label": "梧州市",
  16752. "value": "4504"
  16753. }, {
  16754. "label": "北海市",
  16755. "value": "4505"
  16756. }, {
  16757. "label": "防城港市",
  16758. "value": "4506"
  16759. }, {
  16760. "label": "钦州市",
  16761. "value": "4507"
  16762. }, {
  16763. "label": "贵港市",
  16764. "value": "4508"
  16765. }, {
  16766. "label": "玉林市",
  16767. "value": "4509"
  16768. }, {
  16769. "label": "百色市",
  16770. "value": "4510"
  16771. }, {
  16772. "label": "贺州市",
  16773. "value": "4511"
  16774. }, {
  16775. "label": "河池市",
  16776. "value": "4512"
  16777. }, {
  16778. "label": "来宾市",
  16779. "value": "4513"
  16780. }, {
  16781. "label": "崇左市",
  16782. "value": "4514"
  16783. }], [{
  16784. "label": "海口市",
  16785. "value": "4601"
  16786. }, {
  16787. "label": "三亚市",
  16788. "value": "4602"
  16789. }, {
  16790. "label": "三沙市",
  16791. "value": "4603"
  16792. }, {
  16793. "label": "儋州市",
  16794. "value": "4604"
  16795. }, {
  16796. "label": "省直辖县级行政区划",
  16797. "value": "4690"
  16798. }], [{
  16799. "label": "市辖区",
  16800. "value": "5001"
  16801. }, {
  16802. "label": "县",
  16803. "value": "5002"
  16804. }], [{
  16805. "label": "成都市",
  16806. "value": "5101"
  16807. }, {
  16808. "label": "自贡市",
  16809. "value": "5103"
  16810. }, {
  16811. "label": "攀枝花市",
  16812. "value": "5104"
  16813. }, {
  16814. "label": "泸州市",
  16815. "value": "5105"
  16816. }, {
  16817. "label": "德阳市",
  16818. "value": "5106"
  16819. }, {
  16820. "label": "绵阳市",
  16821. "value": "5107"
  16822. }, {
  16823. "label": "广元市",
  16824. "value": "5108"
  16825. }, {
  16826. "label": "遂宁市",
  16827. "value": "5109"
  16828. }, {
  16829. "label": "内江市",
  16830. "value": "5110"
  16831. }, {
  16832. "label": "乐山市",
  16833. "value": "5111"
  16834. }, {
  16835. "label": "南充市",
  16836. "value": "5113"
  16837. }, {
  16838. "label": "眉山市",
  16839. "value": "5114"
  16840. }, {
  16841. "label": "宜宾市",
  16842. "value": "5115"
  16843. }, {
  16844. "label": "广安市",
  16845. "value": "5116"
  16846. }, {
  16847. "label": "达州市",
  16848. "value": "5117"
  16849. }, {
  16850. "label": "雅安市",
  16851. "value": "5118"
  16852. }, {
  16853. "label": "巴中市",
  16854. "value": "5119"
  16855. }, {
  16856. "label": "资阳市",
  16857. "value": "5120"
  16858. }, {
  16859. "label": "阿坝藏族羌族自治州",
  16860. "value": "5132"
  16861. }, {
  16862. "label": "甘孜藏族自治州",
  16863. "value": "5133"
  16864. }, {
  16865. "label": "凉山彝族自治州",
  16866. "value": "5134"
  16867. }], [{
  16868. "label": "贵阳市",
  16869. "value": "5201"
  16870. }, {
  16871. "label": "六盘水市",
  16872. "value": "5202"
  16873. }, {
  16874. "label": "遵义市",
  16875. "value": "5203"
  16876. }, {
  16877. "label": "安顺市",
  16878. "value": "5204"
  16879. }, {
  16880. "label": "毕节市",
  16881. "value": "5205"
  16882. }, {
  16883. "label": "铜仁市",
  16884. "value": "5206"
  16885. }, {
  16886. "label": "黔西南布依族苗族自治州",
  16887. "value": "5223"
  16888. }, {
  16889. "label": "黔东南苗族侗族自治州",
  16890. "value": "5226"
  16891. }, {
  16892. "label": "黔南布依族苗族自治州",
  16893. "value": "5227"
  16894. }], [{
  16895. "label": "昆明市",
  16896. "value": "5301"
  16897. }, {
  16898. "label": "曲靖市",
  16899. "value": "5303"
  16900. }, {
  16901. "label": "玉溪市",
  16902. "value": "5304"
  16903. }, {
  16904. "label": "保山市",
  16905. "value": "5305"
  16906. }, {
  16907. "label": "昭通市",
  16908. "value": "5306"
  16909. }, {
  16910. "label": "丽江市",
  16911. "value": "5307"
  16912. }, {
  16913. "label": "普洱市",
  16914. "value": "5308"
  16915. }, {
  16916. "label": "临沧市",
  16917. "value": "5309"
  16918. }, {
  16919. "label": "楚雄彝族自治州",
  16920. "value": "5323"
  16921. }, {
  16922. "label": "红河哈尼族彝族自治州",
  16923. "value": "5325"
  16924. }, {
  16925. "label": "文山壮族苗族自治州",
  16926. "value": "5326"
  16927. }, {
  16928. "label": "西双版纳傣族自治州",
  16929. "value": "5328"
  16930. }, {
  16931. "label": "大理白族自治州",
  16932. "value": "5329"
  16933. }, {
  16934. "label": "德宏傣族景颇族自治州",
  16935. "value": "5331"
  16936. }, {
  16937. "label": "怒江傈僳族自治州",
  16938. "value": "5333"
  16939. }, {
  16940. "label": "迪庆藏族自治州",
  16941. "value": "5334"
  16942. }], [{
  16943. "label": "拉萨市",
  16944. "value": "5401"
  16945. }, {
  16946. "label": "日喀则市",
  16947. "value": "5402"
  16948. }, {
  16949. "label": "昌都市",
  16950. "value": "5403"
  16951. }, {
  16952. "label": "林芝市",
  16953. "value": "5404"
  16954. }, {
  16955. "label": "山南市",
  16956. "value": "5405"
  16957. }, {
  16958. "label": "那曲地区",
  16959. "value": "5424"
  16960. }, {
  16961. "label": "阿里地区",
  16962. "value": "5425"
  16963. }], [{
  16964. "label": "西安市",
  16965. "value": "6101"
  16966. }, {
  16967. "label": "铜川市",
  16968. "value": "6102"
  16969. }, {
  16970. "label": "宝鸡市",
  16971. "value": "6103"
  16972. }, {
  16973. "label": "咸阳市",
  16974. "value": "6104"
  16975. }, {
  16976. "label": "渭南市",
  16977. "value": "6105"
  16978. }, {
  16979. "label": "延安市",
  16980. "value": "6106"
  16981. }, {
  16982. "label": "汉中市",
  16983. "value": "6107"
  16984. }, {
  16985. "label": "榆林市",
  16986. "value": "6108"
  16987. }, {
  16988. "label": "安康市",
  16989. "value": "6109"
  16990. }, {
  16991. "label": "商洛市",
  16992. "value": "6110"
  16993. }], [{
  16994. "label": "兰州市",
  16995. "value": "6201"
  16996. }, {
  16997. "label": "嘉峪关市",
  16998. "value": "6202"
  16999. }, {
  17000. "label": "金昌市",
  17001. "value": "6203"
  17002. }, {
  17003. "label": "白银市",
  17004. "value": "6204"
  17005. }, {
  17006. "label": "天水市",
  17007. "value": "6205"
  17008. }, {
  17009. "label": "武威市",
  17010. "value": "6206"
  17011. }, {
  17012. "label": "张掖市",
  17013. "value": "6207"
  17014. }, {
  17015. "label": "平凉市",
  17016. "value": "6208"
  17017. }, {
  17018. "label": "酒泉市",
  17019. "value": "6209"
  17020. }, {
  17021. "label": "庆阳市",
  17022. "value": "6210"
  17023. }, {
  17024. "label": "定西市",
  17025. "value": "6211"
  17026. }, {
  17027. "label": "陇南市",
  17028. "value": "6212"
  17029. }, {
  17030. "label": "临夏回族自治州",
  17031. "value": "6229"
  17032. }, {
  17033. "label": "甘南藏族自治州",
  17034. "value": "6230"
  17035. }], [{
  17036. "label": "西宁市",
  17037. "value": "6301"
  17038. }, {
  17039. "label": "海东市",
  17040. "value": "6302"
  17041. }, {
  17042. "label": "海北藏族自治州",
  17043. "value": "6322"
  17044. }, {
  17045. "label": "黄南藏族自治州",
  17046. "value": "6323"
  17047. }, {
  17048. "label": "海南藏族自治州",
  17049. "value": "6325"
  17050. }, {
  17051. "label": "果洛藏族自治州",
  17052. "value": "6326"
  17053. }, {
  17054. "label": "玉树藏族自治州",
  17055. "value": "6327"
  17056. }, {
  17057. "label": "海西蒙古族藏族自治州",
  17058. "value": "6328"
  17059. }], [{
  17060. "label": "银川市",
  17061. "value": "6401"
  17062. }, {
  17063. "label": "石嘴山市",
  17064. "value": "6402"
  17065. }, {
  17066. "label": "吴忠市",
  17067. "value": "6403"
  17068. }, {
  17069. "label": "固原市",
  17070. "value": "6404"
  17071. }, {
  17072. "label": "中卫市",
  17073. "value": "6405"
  17074. }], [{
  17075. "label": "乌鲁木齐市",
  17076. "value": "6501"
  17077. }, {
  17078. "label": "克拉玛依市",
  17079. "value": "6502"
  17080. }, {
  17081. "label": "吐鲁番市",
  17082. "value": "6504"
  17083. }, {
  17084. "label": "哈密市",
  17085. "value": "6505"
  17086. }, {
  17087. "label": "昌吉回族自治州",
  17088. "value": "6523"
  17089. }, {
  17090. "label": "博尔塔拉蒙古自治州",
  17091. "value": "6527"
  17092. }, {
  17093. "label": "巴音郭楞蒙古自治州",
  17094. "value": "6528"
  17095. }, {
  17096. "label": "阿克苏地区",
  17097. "value": "6529"
  17098. }, {
  17099. "label": "克孜勒苏柯尔克孜自治州",
  17100. "value": "6530"
  17101. }, {
  17102. "label": "喀什地区",
  17103. "value": "6531"
  17104. }, {
  17105. "label": "和田地区",
  17106. "value": "6532"
  17107. }, {
  17108. "label": "伊犁哈萨克自治州",
  17109. "value": "6540"
  17110. }, {
  17111. "label": "塔城地区",
  17112. "value": "6542"
  17113. }, {
  17114. "label": "阿勒泰地区",
  17115. "value": "6543"
  17116. }, {
  17117. "label": "自治区直辖县级行政区划",
  17118. "value": "6590"
  17119. }], [{
  17120. "label": "台北",
  17121. "value": "6601"
  17122. }, {
  17123. "label": "高雄",
  17124. "value": "6602"
  17125. }, {
  17126. "label": "基隆",
  17127. "value": "6603"
  17128. }, {
  17129. "label": "台中",
  17130. "value": "6604"
  17131. }, {
  17132. "label": "台南",
  17133. "value": "6605"
  17134. }, {
  17135. "label": "新竹",
  17136. "value": "6606"
  17137. }, {
  17138. "label": "嘉义",
  17139. "value": "6607"
  17140. }, {
  17141. "label": "宜兰",
  17142. "value": "6608"
  17143. }, {
  17144. "label": "桃园",
  17145. "value": "6609"
  17146. }, {
  17147. "label": "苗栗",
  17148. "value": "6610"
  17149. }, {
  17150. "label": "彰化",
  17151. "value": "6611"
  17152. }, {
  17153. "label": "南投",
  17154. "value": "6612"
  17155. }, {
  17156. "label": "云林",
  17157. "value": "6613"
  17158. }, {
  17159. "label": "屏东",
  17160. "value": "6614"
  17161. }, {
  17162. "label": "台东",
  17163. "value": "6615"
  17164. }, {
  17165. "label": "花莲",
  17166. "value": "6616"
  17167. }, {
  17168. "label": "澎湖",
  17169. "value": "6617"
  17170. }], [{
  17171. "label": "香港岛",
  17172. "value": "6701"
  17173. }, {
  17174. "label": "九龙",
  17175. "value": "6702"
  17176. }, {
  17177. "label": "新界",
  17178. "value": "6703"
  17179. }], [{
  17180. "label": "澳门半岛",
  17181. "value": "6801"
  17182. }, {
  17183. "label": "氹仔岛",
  17184. "value": "6802"
  17185. }, {
  17186. "label": "路环岛",
  17187. "value": "6803"
  17188. }, {
  17189. "label": "路氹城",
  17190. "value": "6804"
  17191. }]];
  17192. var _default = cityData;
  17193. exports.default = _default;
  17194. /***/ }),
  17195. /***/ 479:
  17196. /*!*************************************************************!*\
  17197. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/area.js ***!
  17198. \*************************************************************/
  17199. /*! no static exports found */
  17200. /***/ (function(module, exports, __webpack_require__) {
  17201. "use strict";
  17202. Object.defineProperty(exports, "__esModule", {
  17203. value: true
  17204. });
  17205. exports.default = void 0;
  17206. var areaData = [[[{
  17207. "label": "东城区",
  17208. "value": "110101"
  17209. }, {
  17210. "label": "西城区",
  17211. "value": "110102"
  17212. }, {
  17213. "label": "朝阳区",
  17214. "value": "110105"
  17215. }, {
  17216. "label": "丰台区",
  17217. "value": "110106"
  17218. }, {
  17219. "label": "石景山区",
  17220. "value": "110107"
  17221. }, {
  17222. "label": "海淀区",
  17223. "value": "110108"
  17224. }, {
  17225. "label": "门头沟区",
  17226. "value": "110109"
  17227. }, {
  17228. "label": "房山区",
  17229. "value": "110111"
  17230. }, {
  17231. "label": "通州区",
  17232. "value": "110112"
  17233. }, {
  17234. "label": "顺义区",
  17235. "value": "110113"
  17236. }, {
  17237. "label": "昌平区",
  17238. "value": "110114"
  17239. }, {
  17240. "label": "大兴区",
  17241. "value": "110115"
  17242. }, {
  17243. "label": "怀柔区",
  17244. "value": "110116"
  17245. }, {
  17246. "label": "平谷区",
  17247. "value": "110117"
  17248. }, {
  17249. "label": "密云区",
  17250. "value": "110118"
  17251. }, {
  17252. "label": "延庆区",
  17253. "value": "110119"
  17254. }]], [[{
  17255. "label": "和平区",
  17256. "value": "120101"
  17257. }, {
  17258. "label": "河东区",
  17259. "value": "120102"
  17260. }, {
  17261. "label": "河西区",
  17262. "value": "120103"
  17263. }, {
  17264. "label": "南开区",
  17265. "value": "120104"
  17266. }, {
  17267. "label": "河北区",
  17268. "value": "120105"
  17269. }, {
  17270. "label": "红桥区",
  17271. "value": "120106"
  17272. }, {
  17273. "label": "东丽区",
  17274. "value": "120110"
  17275. }, {
  17276. "label": "西青区",
  17277. "value": "120111"
  17278. }, {
  17279. "label": "津南区",
  17280. "value": "120112"
  17281. }, {
  17282. "label": "北辰区",
  17283. "value": "120113"
  17284. }, {
  17285. "label": "武清区",
  17286. "value": "120114"
  17287. }, {
  17288. "label": "宝坻区",
  17289. "value": "120115"
  17290. }, {
  17291. "label": "滨海新区",
  17292. "value": "120116"
  17293. }, {
  17294. "label": "宁河区",
  17295. "value": "120117"
  17296. }, {
  17297. "label": "静海区",
  17298. "value": "120118"
  17299. }, {
  17300. "label": "蓟州区",
  17301. "value": "120119"
  17302. }]], [[{
  17303. "label": "长安区",
  17304. "value": "130102"
  17305. }, {
  17306. "label": "桥西区",
  17307. "value": "130104"
  17308. }, {
  17309. "label": "新华区",
  17310. "value": "130105"
  17311. }, {
  17312. "label": "井陉矿区",
  17313. "value": "130107"
  17314. }, {
  17315. "label": "裕华区",
  17316. "value": "130108"
  17317. }, {
  17318. "label": "藁城区",
  17319. "value": "130109"
  17320. }, {
  17321. "label": "鹿泉区",
  17322. "value": "130110"
  17323. }, {
  17324. "label": "栾城区",
  17325. "value": "130111"
  17326. }, {
  17327. "label": "井陉县",
  17328. "value": "130121"
  17329. }, {
  17330. "label": "正定县",
  17331. "value": "130123"
  17332. }, {
  17333. "label": "行唐县",
  17334. "value": "130125"
  17335. }, {
  17336. "label": "灵寿县",
  17337. "value": "130126"
  17338. }, {
  17339. "label": "高邑县",
  17340. "value": "130127"
  17341. }, {
  17342. "label": "深泽县",
  17343. "value": "130128"
  17344. }, {
  17345. "label": "赞皇县",
  17346. "value": "130129"
  17347. }, {
  17348. "label": "无极县",
  17349. "value": "130130"
  17350. }, {
  17351. "label": "平山县",
  17352. "value": "130131"
  17353. }, {
  17354. "label": "元氏县",
  17355. "value": "130132"
  17356. }, {
  17357. "label": "赵县",
  17358. "value": "130133"
  17359. }, {
  17360. "label": "石家庄高新技术产业开发区",
  17361. "value": "130171"
  17362. }, {
  17363. "label": "石家庄循环化工园区",
  17364. "value": "130172"
  17365. }, {
  17366. "label": "辛集市",
  17367. "value": "130181"
  17368. }, {
  17369. "label": "晋州市",
  17370. "value": "130183"
  17371. }, {
  17372. "label": "新乐市",
  17373. "value": "130184"
  17374. }], [{
  17375. "label": "路南区",
  17376. "value": "130202"
  17377. }, {
  17378. "label": "路北区",
  17379. "value": "130203"
  17380. }, {
  17381. "label": "古冶区",
  17382. "value": "130204"
  17383. }, {
  17384. "label": "开平区",
  17385. "value": "130205"
  17386. }, {
  17387. "label": "丰南区",
  17388. "value": "130207"
  17389. }, {
  17390. "label": "丰润区",
  17391. "value": "130208"
  17392. }, {
  17393. "label": "曹妃甸区",
  17394. "value": "130209"
  17395. }, {
  17396. "label": "滦县",
  17397. "value": "130223"
  17398. }, {
  17399. "label": "滦南县",
  17400. "value": "130224"
  17401. }, {
  17402. "label": "乐亭县",
  17403. "value": "130225"
  17404. }, {
  17405. "label": "迁西县",
  17406. "value": "130227"
  17407. }, {
  17408. "label": "玉田县",
  17409. "value": "130229"
  17410. }, {
  17411. "label": "唐山市芦台经济技术开发区",
  17412. "value": "130271"
  17413. }, {
  17414. "label": "唐山市汉沽管理区",
  17415. "value": "130272"
  17416. }, {
  17417. "label": "唐山高新技术产业开发区",
  17418. "value": "130273"
  17419. }, {
  17420. "label": "河北唐山海港经济开发区",
  17421. "value": "130274"
  17422. }, {
  17423. "label": "遵化市",
  17424. "value": "130281"
  17425. }, {
  17426. "label": "迁安市",
  17427. "value": "130283"
  17428. }], [{
  17429. "label": "海港区",
  17430. "value": "130302"
  17431. }, {
  17432. "label": "山海关区",
  17433. "value": "130303"
  17434. }, {
  17435. "label": "北戴河区",
  17436. "value": "130304"
  17437. }, {
  17438. "label": "抚宁区",
  17439. "value": "130306"
  17440. }, {
  17441. "label": "青龙满族自治县",
  17442. "value": "130321"
  17443. }, {
  17444. "label": "昌黎县",
  17445. "value": "130322"
  17446. }, {
  17447. "label": "卢龙县",
  17448. "value": "130324"
  17449. }, {
  17450. "label": "秦皇岛市经济技术开发区",
  17451. "value": "130371"
  17452. }, {
  17453. "label": "北戴河新区",
  17454. "value": "130372"
  17455. }], [{
  17456. "label": "邯山区",
  17457. "value": "130402"
  17458. }, {
  17459. "label": "丛台区",
  17460. "value": "130403"
  17461. }, {
  17462. "label": "复兴区",
  17463. "value": "130404"
  17464. }, {
  17465. "label": "峰峰矿区",
  17466. "value": "130406"
  17467. }, {
  17468. "label": "肥乡区",
  17469. "value": "130407"
  17470. }, {
  17471. "label": "永年区",
  17472. "value": "130408"
  17473. }, {
  17474. "label": "临漳县",
  17475. "value": "130423"
  17476. }, {
  17477. "label": "成安县",
  17478. "value": "130424"
  17479. }, {
  17480. "label": "大名县",
  17481. "value": "130425"
  17482. }, {
  17483. "label": "涉县",
  17484. "value": "130426"
  17485. }, {
  17486. "label": "磁县",
  17487. "value": "130427"
  17488. }, {
  17489. "label": "邱县",
  17490. "value": "130430"
  17491. }, {
  17492. "label": "鸡泽县",
  17493. "value": "130431"
  17494. }, {
  17495. "label": "广平县",
  17496. "value": "130432"
  17497. }, {
  17498. "label": "馆陶县",
  17499. "value": "130433"
  17500. }, {
  17501. "label": "魏县",
  17502. "value": "130434"
  17503. }, {
  17504. "label": "曲周县",
  17505. "value": "130435"
  17506. }, {
  17507. "label": "邯郸经济技术开发区",
  17508. "value": "130471"
  17509. }, {
  17510. "label": "邯郸冀南新区",
  17511. "value": "130473"
  17512. }, {
  17513. "label": "武安市",
  17514. "value": "130481"
  17515. }], [{
  17516. "label": "桥东区",
  17517. "value": "130502"
  17518. }, {
  17519. "label": "桥西区",
  17520. "value": "130503"
  17521. }, {
  17522. "label": "邢台县",
  17523. "value": "130521"
  17524. }, {
  17525. "label": "临城县",
  17526. "value": "130522"
  17527. }, {
  17528. "label": "内丘县",
  17529. "value": "130523"
  17530. }, {
  17531. "label": "柏乡县",
  17532. "value": "130524"
  17533. }, {
  17534. "label": "隆尧县",
  17535. "value": "130525"
  17536. }, {
  17537. "label": "任县",
  17538. "value": "130526"
  17539. }, {
  17540. "label": "南和县",
  17541. "value": "130527"
  17542. }, {
  17543. "label": "宁晋县",
  17544. "value": "130528"
  17545. }, {
  17546. "label": "巨鹿县",
  17547. "value": "130529"
  17548. }, {
  17549. "label": "新河县",
  17550. "value": "130530"
  17551. }, {
  17552. "label": "广宗县",
  17553. "value": "130531"
  17554. }, {
  17555. "label": "平乡县",
  17556. "value": "130532"
  17557. }, {
  17558. "label": "威县",
  17559. "value": "130533"
  17560. }, {
  17561. "label": "清河县",
  17562. "value": "130534"
  17563. }, {
  17564. "label": "临西县",
  17565. "value": "130535"
  17566. }, {
  17567. "label": "河北邢台经济开发区",
  17568. "value": "130571"
  17569. }, {
  17570. "label": "南宫市",
  17571. "value": "130581"
  17572. }, {
  17573. "label": "沙河市",
  17574. "value": "130582"
  17575. }], [{
  17576. "label": "竞秀区",
  17577. "value": "130602"
  17578. }, {
  17579. "label": "莲池区",
  17580. "value": "130606"
  17581. }, {
  17582. "label": "满城区",
  17583. "value": "130607"
  17584. }, {
  17585. "label": "清苑区",
  17586. "value": "130608"
  17587. }, {
  17588. "label": "徐水区",
  17589. "value": "130609"
  17590. }, {
  17591. "label": "涞水县",
  17592. "value": "130623"
  17593. }, {
  17594. "label": "阜平县",
  17595. "value": "130624"
  17596. }, {
  17597. "label": "定兴县",
  17598. "value": "130626"
  17599. }, {
  17600. "label": "唐县",
  17601. "value": "130627"
  17602. }, {
  17603. "label": "高阳县",
  17604. "value": "130628"
  17605. }, {
  17606. "label": "容城县",
  17607. "value": "130629"
  17608. }, {
  17609. "label": "涞源县",
  17610. "value": "130630"
  17611. }, {
  17612. "label": "望都县",
  17613. "value": "130631"
  17614. }, {
  17615. "label": "安新县",
  17616. "value": "130632"
  17617. }, {
  17618. "label": "易县",
  17619. "value": "130633"
  17620. }, {
  17621. "label": "曲阳县",
  17622. "value": "130634"
  17623. }, {
  17624. "label": "蠡县",
  17625. "value": "130635"
  17626. }, {
  17627. "label": "顺平县",
  17628. "value": "130636"
  17629. }, {
  17630. "label": "博野县",
  17631. "value": "130637"
  17632. }, {
  17633. "label": "雄县",
  17634. "value": "130638"
  17635. }, {
  17636. "label": "保定高新技术产业开发区",
  17637. "value": "130671"
  17638. }, {
  17639. "label": "保定白沟新城",
  17640. "value": "130672"
  17641. }, {
  17642. "label": "涿州市",
  17643. "value": "130681"
  17644. }, {
  17645. "label": "定州市",
  17646. "value": "130682"
  17647. }, {
  17648. "label": "安国市",
  17649. "value": "130683"
  17650. }, {
  17651. "label": "高碑店市",
  17652. "value": "130684"
  17653. }], [{
  17654. "label": "桥东区",
  17655. "value": "130702"
  17656. }, {
  17657. "label": "桥西区",
  17658. "value": "130703"
  17659. }, {
  17660. "label": "宣化区",
  17661. "value": "130705"
  17662. }, {
  17663. "label": "下花园区",
  17664. "value": "130706"
  17665. }, {
  17666. "label": "万全区",
  17667. "value": "130708"
  17668. }, {
  17669. "label": "崇礼区",
  17670. "value": "130709"
  17671. }, {
  17672. "label": "张北县",
  17673. "value": "130722"
  17674. }, {
  17675. "label": "康保县",
  17676. "value": "130723"
  17677. }, {
  17678. "label": "沽源县",
  17679. "value": "130724"
  17680. }, {
  17681. "label": "尚义县",
  17682. "value": "130725"
  17683. }, {
  17684. "label": "蔚县",
  17685. "value": "130726"
  17686. }, {
  17687. "label": "阳原县",
  17688. "value": "130727"
  17689. }, {
  17690. "label": "怀安县",
  17691. "value": "130728"
  17692. }, {
  17693. "label": "怀来县",
  17694. "value": "130730"
  17695. }, {
  17696. "label": "涿鹿县",
  17697. "value": "130731"
  17698. }, {
  17699. "label": "赤城县",
  17700. "value": "130732"
  17701. }, {
  17702. "label": "张家口市高新技术产业开发区",
  17703. "value": "130771"
  17704. }, {
  17705. "label": "张家口市察北管理区",
  17706. "value": "130772"
  17707. }, {
  17708. "label": "张家口市塞北管理区",
  17709. "value": "130773"
  17710. }], [{
  17711. "label": "双桥区",
  17712. "value": "130802"
  17713. }, {
  17714. "label": "双滦区",
  17715. "value": "130803"
  17716. }, {
  17717. "label": "鹰手营子矿区",
  17718. "value": "130804"
  17719. }, {
  17720. "label": "承德县",
  17721. "value": "130821"
  17722. }, {
  17723. "label": "兴隆县",
  17724. "value": "130822"
  17725. }, {
  17726. "label": "滦平县",
  17727. "value": "130824"
  17728. }, {
  17729. "label": "隆化县",
  17730. "value": "130825"
  17731. }, {
  17732. "label": "丰宁满族自治县",
  17733. "value": "130826"
  17734. }, {
  17735. "label": "宽城满族自治县",
  17736. "value": "130827"
  17737. }, {
  17738. "label": "围场满族蒙古族自治县",
  17739. "value": "130828"
  17740. }, {
  17741. "label": "承德高新技术产业开发区",
  17742. "value": "130871"
  17743. }, {
  17744. "label": "平泉市",
  17745. "value": "130881"
  17746. }], [{
  17747. "label": "新华区",
  17748. "value": "130902"
  17749. }, {
  17750. "label": "运河区",
  17751. "value": "130903"
  17752. }, {
  17753. "label": "沧县",
  17754. "value": "130921"
  17755. }, {
  17756. "label": "青县",
  17757. "value": "130922"
  17758. }, {
  17759. "label": "东光县",
  17760. "value": "130923"
  17761. }, {
  17762. "label": "海兴县",
  17763. "value": "130924"
  17764. }, {
  17765. "label": "盐山县",
  17766. "value": "130925"
  17767. }, {
  17768. "label": "肃宁县",
  17769. "value": "130926"
  17770. }, {
  17771. "label": "南皮县",
  17772. "value": "130927"
  17773. }, {
  17774. "label": "吴桥县",
  17775. "value": "130928"
  17776. }, {
  17777. "label": "献县",
  17778. "value": "130929"
  17779. }, {
  17780. "label": "孟村回族自治县",
  17781. "value": "130930"
  17782. }, {
  17783. "label": "河北沧州经济开发区",
  17784. "value": "130971"
  17785. }, {
  17786. "label": "沧州高新技术产业开发区",
  17787. "value": "130972"
  17788. }, {
  17789. "label": "沧州渤海新区",
  17790. "value": "130973"
  17791. }, {
  17792. "label": "泊头市",
  17793. "value": "130981"
  17794. }, {
  17795. "label": "任丘市",
  17796. "value": "130982"
  17797. }, {
  17798. "label": "黄骅市",
  17799. "value": "130983"
  17800. }, {
  17801. "label": "河间市",
  17802. "value": "130984"
  17803. }], [{
  17804. "label": "安次区",
  17805. "value": "131002"
  17806. }, {
  17807. "label": "广阳区",
  17808. "value": "131003"
  17809. }, {
  17810. "label": "固安县",
  17811. "value": "131022"
  17812. }, {
  17813. "label": "永清县",
  17814. "value": "131023"
  17815. }, {
  17816. "label": "香河县",
  17817. "value": "131024"
  17818. }, {
  17819. "label": "大城县",
  17820. "value": "131025"
  17821. }, {
  17822. "label": "文安县",
  17823. "value": "131026"
  17824. }, {
  17825. "label": "大厂回族自治县",
  17826. "value": "131028"
  17827. }, {
  17828. "label": "廊坊经济技术开发区",
  17829. "value": "131071"
  17830. }, {
  17831. "label": "霸州市",
  17832. "value": "131081"
  17833. }, {
  17834. "label": "三河市",
  17835. "value": "131082"
  17836. }], [{
  17837. "label": "桃城区",
  17838. "value": "131102"
  17839. }, {
  17840. "label": "冀州区",
  17841. "value": "131103"
  17842. }, {
  17843. "label": "枣强县",
  17844. "value": "131121"
  17845. }, {
  17846. "label": "武邑县",
  17847. "value": "131122"
  17848. }, {
  17849. "label": "武强县",
  17850. "value": "131123"
  17851. }, {
  17852. "label": "饶阳县",
  17853. "value": "131124"
  17854. }, {
  17855. "label": "安平县",
  17856. "value": "131125"
  17857. }, {
  17858. "label": "故城县",
  17859. "value": "131126"
  17860. }, {
  17861. "label": "景县",
  17862. "value": "131127"
  17863. }, {
  17864. "label": "阜城县",
  17865. "value": "131128"
  17866. }, {
  17867. "label": "河北衡水经济开发区",
  17868. "value": "131171"
  17869. }, {
  17870. "label": "衡水滨湖新区",
  17871. "value": "131172"
  17872. }, {
  17873. "label": "深州市",
  17874. "value": "131182"
  17875. }]], [[{
  17876. "label": "小店区",
  17877. "value": "140105"
  17878. }, {
  17879. "label": "迎泽区",
  17880. "value": "140106"
  17881. }, {
  17882. "label": "杏花岭区",
  17883. "value": "140107"
  17884. }, {
  17885. "label": "尖草坪区",
  17886. "value": "140108"
  17887. }, {
  17888. "label": "万柏林区",
  17889. "value": "140109"
  17890. }, {
  17891. "label": "晋源区",
  17892. "value": "140110"
  17893. }, {
  17894. "label": "清徐县",
  17895. "value": "140121"
  17896. }, {
  17897. "label": "阳曲县",
  17898. "value": "140122"
  17899. }, {
  17900. "label": "娄烦县",
  17901. "value": "140123"
  17902. }, {
  17903. "label": "山西转型综合改革示范区",
  17904. "value": "140171"
  17905. }, {
  17906. "label": "古交市",
  17907. "value": "140181"
  17908. }], [{
  17909. "label": "城区",
  17910. "value": "140202"
  17911. }, {
  17912. "label": "矿区",
  17913. "value": "140203"
  17914. }, {
  17915. "label": "南郊区",
  17916. "value": "140211"
  17917. }, {
  17918. "label": "新荣区",
  17919. "value": "140212"
  17920. }, {
  17921. "label": "阳高县",
  17922. "value": "140221"
  17923. }, {
  17924. "label": "天镇县",
  17925. "value": "140222"
  17926. }, {
  17927. "label": "广灵县",
  17928. "value": "140223"
  17929. }, {
  17930. "label": "灵丘县",
  17931. "value": "140224"
  17932. }, {
  17933. "label": "浑源县",
  17934. "value": "140225"
  17935. }, {
  17936. "label": "左云县",
  17937. "value": "140226"
  17938. }, {
  17939. "label": "大同县",
  17940. "value": "140227"
  17941. }, {
  17942. "label": "山西大同经济开发区",
  17943. "value": "140271"
  17944. }], [{
  17945. "label": "城区",
  17946. "value": "140302"
  17947. }, {
  17948. "label": "矿区",
  17949. "value": "140303"
  17950. }, {
  17951. "label": "郊区",
  17952. "value": "140311"
  17953. }, {
  17954. "label": "平定县",
  17955. "value": "140321"
  17956. }, {
  17957. "label": "盂县",
  17958. "value": "140322"
  17959. }, {
  17960. "label": "山西阳泉经济开发区",
  17961. "value": "140371"
  17962. }], [{
  17963. "label": "城区",
  17964. "value": "140402"
  17965. }, {
  17966. "label": "郊区",
  17967. "value": "140411"
  17968. }, {
  17969. "label": "长治县",
  17970. "value": "140421"
  17971. }, {
  17972. "label": "襄垣县",
  17973. "value": "140423"
  17974. }, {
  17975. "label": "屯留县",
  17976. "value": "140424"
  17977. }, {
  17978. "label": "平顺县",
  17979. "value": "140425"
  17980. }, {
  17981. "label": "黎城县",
  17982. "value": "140426"
  17983. }, {
  17984. "label": "壶关县",
  17985. "value": "140427"
  17986. }, {
  17987. "label": "长子县",
  17988. "value": "140428"
  17989. }, {
  17990. "label": "武乡县",
  17991. "value": "140429"
  17992. }, {
  17993. "label": "沁县",
  17994. "value": "140430"
  17995. }, {
  17996. "label": "沁源县",
  17997. "value": "140431"
  17998. }, {
  17999. "label": "山西长治高新技术产业园区",
  18000. "value": "140471"
  18001. }, {
  18002. "label": "潞城市",
  18003. "value": "140481"
  18004. }], [{
  18005. "label": "城区",
  18006. "value": "140502"
  18007. }, {
  18008. "label": "沁水县",
  18009. "value": "140521"
  18010. }, {
  18011. "label": "阳城县",
  18012. "value": "140522"
  18013. }, {
  18014. "label": "陵川县",
  18015. "value": "140524"
  18016. }, {
  18017. "label": "泽州县",
  18018. "value": "140525"
  18019. }, {
  18020. "label": "高平市",
  18021. "value": "140581"
  18022. }], [{
  18023. "label": "朔城区",
  18024. "value": "140602"
  18025. }, {
  18026. "label": "平鲁区",
  18027. "value": "140603"
  18028. }, {
  18029. "label": "山阴县",
  18030. "value": "140621"
  18031. }, {
  18032. "label": "应县",
  18033. "value": "140622"
  18034. }, {
  18035. "label": "右玉县",
  18036. "value": "140623"
  18037. }, {
  18038. "label": "怀仁县",
  18039. "value": "140624"
  18040. }, {
  18041. "label": "山西朔州经济开发区",
  18042. "value": "140671"
  18043. }], [{
  18044. "label": "榆次区",
  18045. "value": "140702"
  18046. }, {
  18047. "label": "榆社县",
  18048. "value": "140721"
  18049. }, {
  18050. "label": "左权县",
  18051. "value": "140722"
  18052. }, {
  18053. "label": "和顺县",
  18054. "value": "140723"
  18055. }, {
  18056. "label": "昔阳县",
  18057. "value": "140724"
  18058. }, {
  18059. "label": "寿阳县",
  18060. "value": "140725"
  18061. }, {
  18062. "label": "太谷县",
  18063. "value": "140726"
  18064. }, {
  18065. "label": "祁县",
  18066. "value": "140727"
  18067. }, {
  18068. "label": "平遥县",
  18069. "value": "140728"
  18070. }, {
  18071. "label": "灵石县",
  18072. "value": "140729"
  18073. }, {
  18074. "label": "介休市",
  18075. "value": "140781"
  18076. }], [{
  18077. "label": "盐湖区",
  18078. "value": "140802"
  18079. }, {
  18080. "label": "临猗县",
  18081. "value": "140821"
  18082. }, {
  18083. "label": "万荣县",
  18084. "value": "140822"
  18085. }, {
  18086. "label": "闻喜县",
  18087. "value": "140823"
  18088. }, {
  18089. "label": "稷山县",
  18090. "value": "140824"
  18091. }, {
  18092. "label": "新绛县",
  18093. "value": "140825"
  18094. }, {
  18095. "label": "绛县",
  18096. "value": "140826"
  18097. }, {
  18098. "label": "垣曲县",
  18099. "value": "140827"
  18100. }, {
  18101. "label": "夏县",
  18102. "value": "140828"
  18103. }, {
  18104. "label": "平陆县",
  18105. "value": "140829"
  18106. }, {
  18107. "label": "芮城县",
  18108. "value": "140830"
  18109. }, {
  18110. "label": "永济市",
  18111. "value": "140881"
  18112. }, {
  18113. "label": "河津市",
  18114. "value": "140882"
  18115. }], [{
  18116. "label": "忻府区",
  18117. "value": "140902"
  18118. }, {
  18119. "label": "定襄县",
  18120. "value": "140921"
  18121. }, {
  18122. "label": "五台县",
  18123. "value": "140922"
  18124. }, {
  18125. "label": "代县",
  18126. "value": "140923"
  18127. }, {
  18128. "label": "繁峙县",
  18129. "value": "140924"
  18130. }, {
  18131. "label": "宁武县",
  18132. "value": "140925"
  18133. }, {
  18134. "label": "静乐县",
  18135. "value": "140926"
  18136. }, {
  18137. "label": "神池县",
  18138. "value": "140927"
  18139. }, {
  18140. "label": "五寨县",
  18141. "value": "140928"
  18142. }, {
  18143. "label": "岢岚县",
  18144. "value": "140929"
  18145. }, {
  18146. "label": "河曲县",
  18147. "value": "140930"
  18148. }, {
  18149. "label": "保德县",
  18150. "value": "140931"
  18151. }, {
  18152. "label": "偏关县",
  18153. "value": "140932"
  18154. }, {
  18155. "label": "五台山风景名胜区",
  18156. "value": "140971"
  18157. }, {
  18158. "label": "原平市",
  18159. "value": "140981"
  18160. }], [{
  18161. "label": "尧都区",
  18162. "value": "141002"
  18163. }, {
  18164. "label": "曲沃县",
  18165. "value": "141021"
  18166. }, {
  18167. "label": "翼城县",
  18168. "value": "141022"
  18169. }, {
  18170. "label": "襄汾县",
  18171. "value": "141023"
  18172. }, {
  18173. "label": "洪洞县",
  18174. "value": "141024"
  18175. }, {
  18176. "label": "古县",
  18177. "value": "141025"
  18178. }, {
  18179. "label": "安泽县",
  18180. "value": "141026"
  18181. }, {
  18182. "label": "浮山县",
  18183. "value": "141027"
  18184. }, {
  18185. "label": "吉县",
  18186. "value": "141028"
  18187. }, {
  18188. "label": "乡宁县",
  18189. "value": "141029"
  18190. }, {
  18191. "label": "大宁县",
  18192. "value": "141030"
  18193. }, {
  18194. "label": "隰县",
  18195. "value": "141031"
  18196. }, {
  18197. "label": "永和县",
  18198. "value": "141032"
  18199. }, {
  18200. "label": "蒲县",
  18201. "value": "141033"
  18202. }, {
  18203. "label": "汾西县",
  18204. "value": "141034"
  18205. }, {
  18206. "label": "侯马市",
  18207. "value": "141081"
  18208. }, {
  18209. "label": "霍州市",
  18210. "value": "141082"
  18211. }], [{
  18212. "label": "离石区",
  18213. "value": "141102"
  18214. }, {
  18215. "label": "文水县",
  18216. "value": "141121"
  18217. }, {
  18218. "label": "交城县",
  18219. "value": "141122"
  18220. }, {
  18221. "label": "兴县",
  18222. "value": "141123"
  18223. }, {
  18224. "label": "临县",
  18225. "value": "141124"
  18226. }, {
  18227. "label": "柳林县",
  18228. "value": "141125"
  18229. }, {
  18230. "label": "石楼县",
  18231. "value": "141126"
  18232. }, {
  18233. "label": "岚县",
  18234. "value": "141127"
  18235. }, {
  18236. "label": "方山县",
  18237. "value": "141128"
  18238. }, {
  18239. "label": "中阳县",
  18240. "value": "141129"
  18241. }, {
  18242. "label": "交口县",
  18243. "value": "141130"
  18244. }, {
  18245. "label": "孝义市",
  18246. "value": "141181"
  18247. }, {
  18248. "label": "汾阳市",
  18249. "value": "141182"
  18250. }]], [[{
  18251. "label": "新城区",
  18252. "value": "150102"
  18253. }, {
  18254. "label": "回民区",
  18255. "value": "150103"
  18256. }, {
  18257. "label": "玉泉区",
  18258. "value": "150104"
  18259. }, {
  18260. "label": "赛罕区",
  18261. "value": "150105"
  18262. }, {
  18263. "label": "土默特左旗",
  18264. "value": "150121"
  18265. }, {
  18266. "label": "托克托县",
  18267. "value": "150122"
  18268. }, {
  18269. "label": "和林格尔县",
  18270. "value": "150123"
  18271. }, {
  18272. "label": "清水河县",
  18273. "value": "150124"
  18274. }, {
  18275. "label": "武川县",
  18276. "value": "150125"
  18277. }, {
  18278. "label": "呼和浩特金海工业园区",
  18279. "value": "150171"
  18280. }, {
  18281. "label": "呼和浩特经济技术开发区",
  18282. "value": "150172"
  18283. }], [{
  18284. "label": "东河区",
  18285. "value": "150202"
  18286. }, {
  18287. "label": "昆都仑区",
  18288. "value": "150203"
  18289. }, {
  18290. "label": "青山区",
  18291. "value": "150204"
  18292. }, {
  18293. "label": "石拐区",
  18294. "value": "150205"
  18295. }, {
  18296. "label": "白云鄂博矿区",
  18297. "value": "150206"
  18298. }, {
  18299. "label": "九原区",
  18300. "value": "150207"
  18301. }, {
  18302. "label": "土默特右旗",
  18303. "value": "150221"
  18304. }, {
  18305. "label": "固阳县",
  18306. "value": "150222"
  18307. }, {
  18308. "label": "达尔罕茂明安联合旗",
  18309. "value": "150223"
  18310. }, {
  18311. "label": "包头稀土高新技术产业开发区",
  18312. "value": "150271"
  18313. }], [{
  18314. "label": "海勃湾区",
  18315. "value": "150302"
  18316. }, {
  18317. "label": "海南区",
  18318. "value": "150303"
  18319. }, {
  18320. "label": "乌达区",
  18321. "value": "150304"
  18322. }], [{
  18323. "label": "红山区",
  18324. "value": "150402"
  18325. }, {
  18326. "label": "元宝山区",
  18327. "value": "150403"
  18328. }, {
  18329. "label": "松山区",
  18330. "value": "150404"
  18331. }, {
  18332. "label": "阿鲁科尔沁旗",
  18333. "value": "150421"
  18334. }, {
  18335. "label": "巴林左旗",
  18336. "value": "150422"
  18337. }, {
  18338. "label": "巴林右旗",
  18339. "value": "150423"
  18340. }, {
  18341. "label": "林西县",
  18342. "value": "150424"
  18343. }, {
  18344. "label": "克什克腾旗",
  18345. "value": "150425"
  18346. }, {
  18347. "label": "翁牛特旗",
  18348. "value": "150426"
  18349. }, {
  18350. "label": "喀喇沁旗",
  18351. "value": "150428"
  18352. }, {
  18353. "label": "宁城县",
  18354. "value": "150429"
  18355. }, {
  18356. "label": "敖汉旗",
  18357. "value": "150430"
  18358. }], [{
  18359. "label": "科尔沁区",
  18360. "value": "150502"
  18361. }, {
  18362. "label": "科尔沁左翼中旗",
  18363. "value": "150521"
  18364. }, {
  18365. "label": "科尔沁左翼后旗",
  18366. "value": "150522"
  18367. }, {
  18368. "label": "开鲁县",
  18369. "value": "150523"
  18370. }, {
  18371. "label": "库伦旗",
  18372. "value": "150524"
  18373. }, {
  18374. "label": "奈曼旗",
  18375. "value": "150525"
  18376. }, {
  18377. "label": "扎鲁特旗",
  18378. "value": "150526"
  18379. }, {
  18380. "label": "通辽经济技术开发区",
  18381. "value": "150571"
  18382. }, {
  18383. "label": "霍林郭勒市",
  18384. "value": "150581"
  18385. }], [{
  18386. "label": "东胜区",
  18387. "value": "150602"
  18388. }, {
  18389. "label": "康巴什区",
  18390. "value": "150603"
  18391. }, {
  18392. "label": "达拉特旗",
  18393. "value": "150621"
  18394. }, {
  18395. "label": "准格尔旗",
  18396. "value": "150622"
  18397. }, {
  18398. "label": "鄂托克前旗",
  18399. "value": "150623"
  18400. }, {
  18401. "label": "鄂托克旗",
  18402. "value": "150624"
  18403. }, {
  18404. "label": "杭锦旗",
  18405. "value": "150625"
  18406. }, {
  18407. "label": "乌审旗",
  18408. "value": "150626"
  18409. }, {
  18410. "label": "伊金霍洛旗",
  18411. "value": "150627"
  18412. }], [{
  18413. "label": "海拉尔区",
  18414. "value": "150702"
  18415. }, {
  18416. "label": "扎赉诺尔区",
  18417. "value": "150703"
  18418. }, {
  18419. "label": "阿荣旗",
  18420. "value": "150721"
  18421. }, {
  18422. "label": "莫力达瓦达斡尔族自治旗",
  18423. "value": "150722"
  18424. }, {
  18425. "label": "鄂伦春自治旗",
  18426. "value": "150723"
  18427. }, {
  18428. "label": "鄂温克族自治旗",
  18429. "value": "150724"
  18430. }, {
  18431. "label": "陈巴尔虎旗",
  18432. "value": "150725"
  18433. }, {
  18434. "label": "新巴尔虎左旗",
  18435. "value": "150726"
  18436. }, {
  18437. "label": "新巴尔虎右旗",
  18438. "value": "150727"
  18439. }, {
  18440. "label": "满洲里市",
  18441. "value": "150781"
  18442. }, {
  18443. "label": "牙克石市",
  18444. "value": "150782"
  18445. }, {
  18446. "label": "扎兰屯市",
  18447. "value": "150783"
  18448. }, {
  18449. "label": "额尔古纳市",
  18450. "value": "150784"
  18451. }, {
  18452. "label": "根河市",
  18453. "value": "150785"
  18454. }], [{
  18455. "label": "临河区",
  18456. "value": "150802"
  18457. }, {
  18458. "label": "五原县",
  18459. "value": "150821"
  18460. }, {
  18461. "label": "磴口县",
  18462. "value": "150822"
  18463. }, {
  18464. "label": "乌拉特前旗",
  18465. "value": "150823"
  18466. }, {
  18467. "label": "乌拉特中旗",
  18468. "value": "150824"
  18469. }, {
  18470. "label": "乌拉特后旗",
  18471. "value": "150825"
  18472. }, {
  18473. "label": "杭锦后旗",
  18474. "value": "150826"
  18475. }], [{
  18476. "label": "集宁区",
  18477. "value": "150902"
  18478. }, {
  18479. "label": "卓资县",
  18480. "value": "150921"
  18481. }, {
  18482. "label": "化德县",
  18483. "value": "150922"
  18484. }, {
  18485. "label": "商都县",
  18486. "value": "150923"
  18487. }, {
  18488. "label": "兴和县",
  18489. "value": "150924"
  18490. }, {
  18491. "label": "凉城县",
  18492. "value": "150925"
  18493. }, {
  18494. "label": "察哈尔右翼前旗",
  18495. "value": "150926"
  18496. }, {
  18497. "label": "察哈尔右翼中旗",
  18498. "value": "150927"
  18499. }, {
  18500. "label": "察哈尔右翼后旗",
  18501. "value": "150928"
  18502. }, {
  18503. "label": "四子王旗",
  18504. "value": "150929"
  18505. }, {
  18506. "label": "丰镇市",
  18507. "value": "150981"
  18508. }], [{
  18509. "label": "乌兰浩特市",
  18510. "value": "152201"
  18511. }, {
  18512. "label": "阿尔山市",
  18513. "value": "152202"
  18514. }, {
  18515. "label": "科尔沁右翼前旗",
  18516. "value": "152221"
  18517. }, {
  18518. "label": "科尔沁右翼中旗",
  18519. "value": "152222"
  18520. }, {
  18521. "label": "扎赉特旗",
  18522. "value": "152223"
  18523. }, {
  18524. "label": "突泉县",
  18525. "value": "152224"
  18526. }], [{
  18527. "label": "二连浩特市",
  18528. "value": "152501"
  18529. }, {
  18530. "label": "锡林浩特市",
  18531. "value": "152502"
  18532. }, {
  18533. "label": "阿巴嘎旗",
  18534. "value": "152522"
  18535. }, {
  18536. "label": "苏尼特左旗",
  18537. "value": "152523"
  18538. }, {
  18539. "label": "苏尼特右旗",
  18540. "value": "152524"
  18541. }, {
  18542. "label": "东乌珠穆沁旗",
  18543. "value": "152525"
  18544. }, {
  18545. "label": "西乌珠穆沁旗",
  18546. "value": "152526"
  18547. }, {
  18548. "label": "太仆寺旗",
  18549. "value": "152527"
  18550. }, {
  18551. "label": "镶黄旗",
  18552. "value": "152528"
  18553. }, {
  18554. "label": "正镶白旗",
  18555. "value": "152529"
  18556. }, {
  18557. "label": "正蓝旗",
  18558. "value": "152530"
  18559. }, {
  18560. "label": "多伦县",
  18561. "value": "152531"
  18562. }, {
  18563. "label": "乌拉盖管委会",
  18564. "value": "152571"
  18565. }], [{
  18566. "label": "阿拉善左旗",
  18567. "value": "152921"
  18568. }, {
  18569. "label": "阿拉善右旗",
  18570. "value": "152922"
  18571. }, {
  18572. "label": "额济纳旗",
  18573. "value": "152923"
  18574. }, {
  18575. "label": "内蒙古阿拉善经济开发区",
  18576. "value": "152971"
  18577. }]], [[{
  18578. "label": "和平区",
  18579. "value": "210102"
  18580. }, {
  18581. "label": "沈河区",
  18582. "value": "210103"
  18583. }, {
  18584. "label": "大东区",
  18585. "value": "210104"
  18586. }, {
  18587. "label": "皇姑区",
  18588. "value": "210105"
  18589. }, {
  18590. "label": "铁西区",
  18591. "value": "210106"
  18592. }, {
  18593. "label": "苏家屯区",
  18594. "value": "210111"
  18595. }, {
  18596. "label": "浑南区",
  18597. "value": "210112"
  18598. }, {
  18599. "label": "沈北新区",
  18600. "value": "210113"
  18601. }, {
  18602. "label": "于洪区",
  18603. "value": "210114"
  18604. }, {
  18605. "label": "辽中区",
  18606. "value": "210115"
  18607. }, {
  18608. "label": "康平县",
  18609. "value": "210123"
  18610. }, {
  18611. "label": "法库县",
  18612. "value": "210124"
  18613. }, {
  18614. "label": "新民市",
  18615. "value": "210181"
  18616. }], [{
  18617. "label": "中山区",
  18618. "value": "210202"
  18619. }, {
  18620. "label": "西岗区",
  18621. "value": "210203"
  18622. }, {
  18623. "label": "沙河口区",
  18624. "value": "210204"
  18625. }, {
  18626. "label": "甘井子区",
  18627. "value": "210211"
  18628. }, {
  18629. "label": "旅顺口区",
  18630. "value": "210212"
  18631. }, {
  18632. "label": "金州区",
  18633. "value": "210213"
  18634. }, {
  18635. "label": "普兰店区",
  18636. "value": "210214"
  18637. }, {
  18638. "label": "长海县",
  18639. "value": "210224"
  18640. }, {
  18641. "label": "瓦房店市",
  18642. "value": "210281"
  18643. }, {
  18644. "label": "庄河市",
  18645. "value": "210283"
  18646. }], [{
  18647. "label": "铁东区",
  18648. "value": "210302"
  18649. }, {
  18650. "label": "铁西区",
  18651. "value": "210303"
  18652. }, {
  18653. "label": "立山区",
  18654. "value": "210304"
  18655. }, {
  18656. "label": "千山区",
  18657. "value": "210311"
  18658. }, {
  18659. "label": "台安县",
  18660. "value": "210321"
  18661. }, {
  18662. "label": "岫岩满族自治县",
  18663. "value": "210323"
  18664. }, {
  18665. "label": "海城市",
  18666. "value": "210381"
  18667. }], [{
  18668. "label": "新抚区",
  18669. "value": "210402"
  18670. }, {
  18671. "label": "东洲区",
  18672. "value": "210403"
  18673. }, {
  18674. "label": "望花区",
  18675. "value": "210404"
  18676. }, {
  18677. "label": "顺城区",
  18678. "value": "210411"
  18679. }, {
  18680. "label": "抚顺县",
  18681. "value": "210421"
  18682. }, {
  18683. "label": "新宾满族自治县",
  18684. "value": "210422"
  18685. }, {
  18686. "label": "清原满族自治县",
  18687. "value": "210423"
  18688. }], [{
  18689. "label": "平山区",
  18690. "value": "210502"
  18691. }, {
  18692. "label": "溪湖区",
  18693. "value": "210503"
  18694. }, {
  18695. "label": "明山区",
  18696. "value": "210504"
  18697. }, {
  18698. "label": "南芬区",
  18699. "value": "210505"
  18700. }, {
  18701. "label": "本溪满族自治县",
  18702. "value": "210521"
  18703. }, {
  18704. "label": "桓仁满族自治县",
  18705. "value": "210522"
  18706. }], [{
  18707. "label": "元宝区",
  18708. "value": "210602"
  18709. }, {
  18710. "label": "振兴区",
  18711. "value": "210603"
  18712. }, {
  18713. "label": "振安区",
  18714. "value": "210604"
  18715. }, {
  18716. "label": "宽甸满族自治县",
  18717. "value": "210624"
  18718. }, {
  18719. "label": "东港市",
  18720. "value": "210681"
  18721. }, {
  18722. "label": "凤城市",
  18723. "value": "210682"
  18724. }], [{
  18725. "label": "古塔区",
  18726. "value": "210702"
  18727. }, {
  18728. "label": "凌河区",
  18729. "value": "210703"
  18730. }, {
  18731. "label": "太和区",
  18732. "value": "210711"
  18733. }, {
  18734. "label": "黑山县",
  18735. "value": "210726"
  18736. }, {
  18737. "label": "义县",
  18738. "value": "210727"
  18739. }, {
  18740. "label": "凌海市",
  18741. "value": "210781"
  18742. }, {
  18743. "label": "北镇市",
  18744. "value": "210782"
  18745. }], [{
  18746. "label": "站前区",
  18747. "value": "210802"
  18748. }, {
  18749. "label": "西市区",
  18750. "value": "210803"
  18751. }, {
  18752. "label": "鲅鱼圈区",
  18753. "value": "210804"
  18754. }, {
  18755. "label": "老边区",
  18756. "value": "210811"
  18757. }, {
  18758. "label": "盖州市",
  18759. "value": "210881"
  18760. }, {
  18761. "label": "大石桥市",
  18762. "value": "210882"
  18763. }], [{
  18764. "label": "海州区",
  18765. "value": "210902"
  18766. }, {
  18767. "label": "新邱区",
  18768. "value": "210903"
  18769. }, {
  18770. "label": "太平区",
  18771. "value": "210904"
  18772. }, {
  18773. "label": "清河门区",
  18774. "value": "210905"
  18775. }, {
  18776. "label": "细河区",
  18777. "value": "210911"
  18778. }, {
  18779. "label": "阜新蒙古族自治县",
  18780. "value": "210921"
  18781. }, {
  18782. "label": "彰武县",
  18783. "value": "210922"
  18784. }], [{
  18785. "label": "白塔区",
  18786. "value": "211002"
  18787. }, {
  18788. "label": "文圣区",
  18789. "value": "211003"
  18790. }, {
  18791. "label": "宏伟区",
  18792. "value": "211004"
  18793. }, {
  18794. "label": "弓长岭区",
  18795. "value": "211005"
  18796. }, {
  18797. "label": "太子河区",
  18798. "value": "211011"
  18799. }, {
  18800. "label": "辽阳县",
  18801. "value": "211021"
  18802. }, {
  18803. "label": "灯塔市",
  18804. "value": "211081"
  18805. }], [{
  18806. "label": "双台子区",
  18807. "value": "211102"
  18808. }, {
  18809. "label": "兴隆台区",
  18810. "value": "211103"
  18811. }, {
  18812. "label": "大洼区",
  18813. "value": "211104"
  18814. }, {
  18815. "label": "盘山县",
  18816. "value": "211122"
  18817. }], [{
  18818. "label": "银州区",
  18819. "value": "211202"
  18820. }, {
  18821. "label": "清河区",
  18822. "value": "211204"
  18823. }, {
  18824. "label": "铁岭县",
  18825. "value": "211221"
  18826. }, {
  18827. "label": "西丰县",
  18828. "value": "211223"
  18829. }, {
  18830. "label": "昌图县",
  18831. "value": "211224"
  18832. }, {
  18833. "label": "调兵山市",
  18834. "value": "211281"
  18835. }, {
  18836. "label": "开原市",
  18837. "value": "211282"
  18838. }], [{
  18839. "label": "双塔区",
  18840. "value": "211302"
  18841. }, {
  18842. "label": "龙城区",
  18843. "value": "211303"
  18844. }, {
  18845. "label": "朝阳县",
  18846. "value": "211321"
  18847. }, {
  18848. "label": "建平县",
  18849. "value": "211322"
  18850. }, {
  18851. "label": "喀喇沁左翼蒙古族自治县",
  18852. "value": "211324"
  18853. }, {
  18854. "label": "北票市",
  18855. "value": "211381"
  18856. }, {
  18857. "label": "凌源市",
  18858. "value": "211382"
  18859. }], [{
  18860. "label": "连山区",
  18861. "value": "211402"
  18862. }, {
  18863. "label": "龙港区",
  18864. "value": "211403"
  18865. }, {
  18866. "label": "南票区",
  18867. "value": "211404"
  18868. }, {
  18869. "label": "绥中县",
  18870. "value": "211421"
  18871. }, {
  18872. "label": "建昌县",
  18873. "value": "211422"
  18874. }, {
  18875. "label": "兴城市",
  18876. "value": "211481"
  18877. }]], [[{
  18878. "label": "南关区",
  18879. "value": "220102"
  18880. }, {
  18881. "label": "宽城区",
  18882. "value": "220103"
  18883. }, {
  18884. "label": "朝阳区",
  18885. "value": "220104"
  18886. }, {
  18887. "label": "二道区",
  18888. "value": "220105"
  18889. }, {
  18890. "label": "绿园区",
  18891. "value": "220106"
  18892. }, {
  18893. "label": "双阳区",
  18894. "value": "220112"
  18895. }, {
  18896. "label": "九台区",
  18897. "value": "220113"
  18898. }, {
  18899. "label": "农安县",
  18900. "value": "220122"
  18901. }, {
  18902. "label": "长春经济技术开发区",
  18903. "value": "220171"
  18904. }, {
  18905. "label": "长春净月高新技术产业开发区",
  18906. "value": "220172"
  18907. }, {
  18908. "label": "长春高新技术产业开发区",
  18909. "value": "220173"
  18910. }, {
  18911. "label": "长春汽车经济技术开发区",
  18912. "value": "220174"
  18913. }, {
  18914. "label": "榆树市",
  18915. "value": "220182"
  18916. }, {
  18917. "label": "德惠市",
  18918. "value": "220183"
  18919. }], [{
  18920. "label": "昌邑区",
  18921. "value": "220202"
  18922. }, {
  18923. "label": "龙潭区",
  18924. "value": "220203"
  18925. }, {
  18926. "label": "船营区",
  18927. "value": "220204"
  18928. }, {
  18929. "label": "丰满区",
  18930. "value": "220211"
  18931. }, {
  18932. "label": "永吉县",
  18933. "value": "220221"
  18934. }, {
  18935. "label": "吉林经济开发区",
  18936. "value": "220271"
  18937. }, {
  18938. "label": "吉林高新技术产业开发区",
  18939. "value": "220272"
  18940. }, {
  18941. "label": "吉林中国新加坡食品区",
  18942. "value": "220273"
  18943. }, {
  18944. "label": "蛟河市",
  18945. "value": "220281"
  18946. }, {
  18947. "label": "桦甸市",
  18948. "value": "220282"
  18949. }, {
  18950. "label": "舒兰市",
  18951. "value": "220283"
  18952. }, {
  18953. "label": "磐石市",
  18954. "value": "220284"
  18955. }], [{
  18956. "label": "铁西区",
  18957. "value": "220302"
  18958. }, {
  18959. "label": "铁东区",
  18960. "value": "220303"
  18961. }, {
  18962. "label": "梨树县",
  18963. "value": "220322"
  18964. }, {
  18965. "label": "伊通满族自治县",
  18966. "value": "220323"
  18967. }, {
  18968. "label": "公主岭市",
  18969. "value": "220381"
  18970. }, {
  18971. "label": "双辽市",
  18972. "value": "220382"
  18973. }], [{
  18974. "label": "龙山区",
  18975. "value": "220402"
  18976. }, {
  18977. "label": "西安区",
  18978. "value": "220403"
  18979. }, {
  18980. "label": "东丰县",
  18981. "value": "220421"
  18982. }, {
  18983. "label": "东辽县",
  18984. "value": "220422"
  18985. }], [{
  18986. "label": "东昌区",
  18987. "value": "220502"
  18988. }, {
  18989. "label": "二道江区",
  18990. "value": "220503"
  18991. }, {
  18992. "label": "通化县",
  18993. "value": "220521"
  18994. }, {
  18995. "label": "辉南县",
  18996. "value": "220523"
  18997. }, {
  18998. "label": "柳河县",
  18999. "value": "220524"
  19000. }, {
  19001. "label": "梅河口市",
  19002. "value": "220581"
  19003. }, {
  19004. "label": "集安市",
  19005. "value": "220582"
  19006. }], [{
  19007. "label": "浑江区",
  19008. "value": "220602"
  19009. }, {
  19010. "label": "江源区",
  19011. "value": "220605"
  19012. }, {
  19013. "label": "抚松县",
  19014. "value": "220621"
  19015. }, {
  19016. "label": "靖宇县",
  19017. "value": "220622"
  19018. }, {
  19019. "label": "长白朝鲜族自治县",
  19020. "value": "220623"
  19021. }, {
  19022. "label": "临江市",
  19023. "value": "220681"
  19024. }], [{
  19025. "label": "宁江区",
  19026. "value": "220702"
  19027. }, {
  19028. "label": "前郭尔罗斯蒙古族自治县",
  19029. "value": "220721"
  19030. }, {
  19031. "label": "长岭县",
  19032. "value": "220722"
  19033. }, {
  19034. "label": "乾安县",
  19035. "value": "220723"
  19036. }, {
  19037. "label": "吉林松原经济开发区",
  19038. "value": "220771"
  19039. }, {
  19040. "label": "扶余市",
  19041. "value": "220781"
  19042. }], [{
  19043. "label": "洮北区",
  19044. "value": "220802"
  19045. }, {
  19046. "label": "镇赉县",
  19047. "value": "220821"
  19048. }, {
  19049. "label": "通榆县",
  19050. "value": "220822"
  19051. }, {
  19052. "label": "吉林白城经济开发区",
  19053. "value": "220871"
  19054. }, {
  19055. "label": "洮南市",
  19056. "value": "220881"
  19057. }, {
  19058. "label": "大安市",
  19059. "value": "220882"
  19060. }], [{
  19061. "label": "延吉市",
  19062. "value": "222401"
  19063. }, {
  19064. "label": "图们市",
  19065. "value": "222402"
  19066. }, {
  19067. "label": "敦化市",
  19068. "value": "222403"
  19069. }, {
  19070. "label": "珲春市",
  19071. "value": "222404"
  19072. }, {
  19073. "label": "龙井市",
  19074. "value": "222405"
  19075. }, {
  19076. "label": "和龙市",
  19077. "value": "222406"
  19078. }, {
  19079. "label": "汪清县",
  19080. "value": "222424"
  19081. }, {
  19082. "label": "安图县",
  19083. "value": "222426"
  19084. }]], [[{
  19085. "label": "道里区",
  19086. "value": "230102"
  19087. }, {
  19088. "label": "南岗区",
  19089. "value": "230103"
  19090. }, {
  19091. "label": "道外区",
  19092. "value": "230104"
  19093. }, {
  19094. "label": "平房区",
  19095. "value": "230108"
  19096. }, {
  19097. "label": "松北区",
  19098. "value": "230109"
  19099. }, {
  19100. "label": "香坊区",
  19101. "value": "230110"
  19102. }, {
  19103. "label": "呼兰区",
  19104. "value": "230111"
  19105. }, {
  19106. "label": "阿城区",
  19107. "value": "230112"
  19108. }, {
  19109. "label": "双城区",
  19110. "value": "230113"
  19111. }, {
  19112. "label": "依兰县",
  19113. "value": "230123"
  19114. }, {
  19115. "label": "方正县",
  19116. "value": "230124"
  19117. }, {
  19118. "label": "宾县",
  19119. "value": "230125"
  19120. }, {
  19121. "label": "巴彦县",
  19122. "value": "230126"
  19123. }, {
  19124. "label": "木兰县",
  19125. "value": "230127"
  19126. }, {
  19127. "label": "通河县",
  19128. "value": "230128"
  19129. }, {
  19130. "label": "延寿县",
  19131. "value": "230129"
  19132. }, {
  19133. "label": "尚志市",
  19134. "value": "230183"
  19135. }, {
  19136. "label": "五常市",
  19137. "value": "230184"
  19138. }], [{
  19139. "label": "龙沙区",
  19140. "value": "230202"
  19141. }, {
  19142. "label": "建华区",
  19143. "value": "230203"
  19144. }, {
  19145. "label": "铁锋区",
  19146. "value": "230204"
  19147. }, {
  19148. "label": "昂昂溪区",
  19149. "value": "230205"
  19150. }, {
  19151. "label": "富拉尔基区",
  19152. "value": "230206"
  19153. }, {
  19154. "label": "碾子山区",
  19155. "value": "230207"
  19156. }, {
  19157. "label": "梅里斯达斡尔族区",
  19158. "value": "230208"
  19159. }, {
  19160. "label": "龙江县",
  19161. "value": "230221"
  19162. }, {
  19163. "label": "依安县",
  19164. "value": "230223"
  19165. }, {
  19166. "label": "泰来县",
  19167. "value": "230224"
  19168. }, {
  19169. "label": "甘南县",
  19170. "value": "230225"
  19171. }, {
  19172. "label": "富裕县",
  19173. "value": "230227"
  19174. }, {
  19175. "label": "克山县",
  19176. "value": "230229"
  19177. }, {
  19178. "label": "克东县",
  19179. "value": "230230"
  19180. }, {
  19181. "label": "拜泉县",
  19182. "value": "230231"
  19183. }, {
  19184. "label": "讷河市",
  19185. "value": "230281"
  19186. }], [{
  19187. "label": "鸡冠区",
  19188. "value": "230302"
  19189. }, {
  19190. "label": "恒山区",
  19191. "value": "230303"
  19192. }, {
  19193. "label": "滴道区",
  19194. "value": "230304"
  19195. }, {
  19196. "label": "梨树区",
  19197. "value": "230305"
  19198. }, {
  19199. "label": "城子河区",
  19200. "value": "230306"
  19201. }, {
  19202. "label": "麻山区",
  19203. "value": "230307"
  19204. }, {
  19205. "label": "鸡东县",
  19206. "value": "230321"
  19207. }, {
  19208. "label": "虎林市",
  19209. "value": "230381"
  19210. }, {
  19211. "label": "密山市",
  19212. "value": "230382"
  19213. }], [{
  19214. "label": "向阳区",
  19215. "value": "230402"
  19216. }, {
  19217. "label": "工农区",
  19218. "value": "230403"
  19219. }, {
  19220. "label": "南山区",
  19221. "value": "230404"
  19222. }, {
  19223. "label": "兴安区",
  19224. "value": "230405"
  19225. }, {
  19226. "label": "东山区",
  19227. "value": "230406"
  19228. }, {
  19229. "label": "兴山区",
  19230. "value": "230407"
  19231. }, {
  19232. "label": "萝北县",
  19233. "value": "230421"
  19234. }, {
  19235. "label": "绥滨县",
  19236. "value": "230422"
  19237. }], [{
  19238. "label": "尖山区",
  19239. "value": "230502"
  19240. }, {
  19241. "label": "岭东区",
  19242. "value": "230503"
  19243. }, {
  19244. "label": "四方台区",
  19245. "value": "230505"
  19246. }, {
  19247. "label": "宝山区",
  19248. "value": "230506"
  19249. }, {
  19250. "label": "集贤县",
  19251. "value": "230521"
  19252. }, {
  19253. "label": "友谊县",
  19254. "value": "230522"
  19255. }, {
  19256. "label": "宝清县",
  19257. "value": "230523"
  19258. }, {
  19259. "label": "饶河县",
  19260. "value": "230524"
  19261. }], [{
  19262. "label": "萨尔图区",
  19263. "value": "230602"
  19264. }, {
  19265. "label": "龙凤区",
  19266. "value": "230603"
  19267. }, {
  19268. "label": "让胡路区",
  19269. "value": "230604"
  19270. }, {
  19271. "label": "红岗区",
  19272. "value": "230605"
  19273. }, {
  19274. "label": "大同区",
  19275. "value": "230606"
  19276. }, {
  19277. "label": "肇州县",
  19278. "value": "230621"
  19279. }, {
  19280. "label": "肇源县",
  19281. "value": "230622"
  19282. }, {
  19283. "label": "林甸县",
  19284. "value": "230623"
  19285. }, {
  19286. "label": "杜尔伯特蒙古族自治县",
  19287. "value": "230624"
  19288. }, {
  19289. "label": "大庆高新技术产业开发区",
  19290. "value": "230671"
  19291. }], [{
  19292. "label": "伊春区",
  19293. "value": "230702"
  19294. }, {
  19295. "label": "南岔区",
  19296. "value": "230703"
  19297. }, {
  19298. "label": "友好区",
  19299. "value": "230704"
  19300. }, {
  19301. "label": "西林区",
  19302. "value": "230705"
  19303. }, {
  19304. "label": "翠峦区",
  19305. "value": "230706"
  19306. }, {
  19307. "label": "新青区",
  19308. "value": "230707"
  19309. }, {
  19310. "label": "美溪区",
  19311. "value": "230708"
  19312. }, {
  19313. "label": "金山屯区",
  19314. "value": "230709"
  19315. }, {
  19316. "label": "五营区",
  19317. "value": "230710"
  19318. }, {
  19319. "label": "乌马河区",
  19320. "value": "230711"
  19321. }, {
  19322. "label": "汤旺河区",
  19323. "value": "230712"
  19324. }, {
  19325. "label": "带岭区",
  19326. "value": "230713"
  19327. }, {
  19328. "label": "乌伊岭区",
  19329. "value": "230714"
  19330. }, {
  19331. "label": "红星区",
  19332. "value": "230715"
  19333. }, {
  19334. "label": "上甘岭区",
  19335. "value": "230716"
  19336. }, {
  19337. "label": "嘉荫县",
  19338. "value": "230722"
  19339. }, {
  19340. "label": "铁力市",
  19341. "value": "230781"
  19342. }], [{
  19343. "label": "向阳区",
  19344. "value": "230803"
  19345. }, {
  19346. "label": "前进区",
  19347. "value": "230804"
  19348. }, {
  19349. "label": "东风区",
  19350. "value": "230805"
  19351. }, {
  19352. "label": "郊区",
  19353. "value": "230811"
  19354. }, {
  19355. "label": "桦南县",
  19356. "value": "230822"
  19357. }, {
  19358. "label": "桦川县",
  19359. "value": "230826"
  19360. }, {
  19361. "label": "汤原县",
  19362. "value": "230828"
  19363. }, {
  19364. "label": "同江市",
  19365. "value": "230881"
  19366. }, {
  19367. "label": "富锦市",
  19368. "value": "230882"
  19369. }, {
  19370. "label": "抚远市",
  19371. "value": "230883"
  19372. }], [{
  19373. "label": "新兴区",
  19374. "value": "230902"
  19375. }, {
  19376. "label": "桃山区",
  19377. "value": "230903"
  19378. }, {
  19379. "label": "茄子河区",
  19380. "value": "230904"
  19381. }, {
  19382. "label": "勃利县",
  19383. "value": "230921"
  19384. }], [{
  19385. "label": "东安区",
  19386. "value": "231002"
  19387. }, {
  19388. "label": "阳明区",
  19389. "value": "231003"
  19390. }, {
  19391. "label": "爱民区",
  19392. "value": "231004"
  19393. }, {
  19394. "label": "西安区",
  19395. "value": "231005"
  19396. }, {
  19397. "label": "林口县",
  19398. "value": "231025"
  19399. }, {
  19400. "label": "牡丹江经济技术开发区",
  19401. "value": "231071"
  19402. }, {
  19403. "label": "绥芬河市",
  19404. "value": "231081"
  19405. }, {
  19406. "label": "海林市",
  19407. "value": "231083"
  19408. }, {
  19409. "label": "宁安市",
  19410. "value": "231084"
  19411. }, {
  19412. "label": "穆棱市",
  19413. "value": "231085"
  19414. }, {
  19415. "label": "东宁市",
  19416. "value": "231086"
  19417. }], [{
  19418. "label": "爱辉区",
  19419. "value": "231102"
  19420. }, {
  19421. "label": "嫩江县",
  19422. "value": "231121"
  19423. }, {
  19424. "label": "逊克县",
  19425. "value": "231123"
  19426. }, {
  19427. "label": "孙吴县",
  19428. "value": "231124"
  19429. }, {
  19430. "label": "北安市",
  19431. "value": "231181"
  19432. }, {
  19433. "label": "五大连池市",
  19434. "value": "231182"
  19435. }], [{
  19436. "label": "北林区",
  19437. "value": "231202"
  19438. }, {
  19439. "label": "望奎县",
  19440. "value": "231221"
  19441. }, {
  19442. "label": "兰西县",
  19443. "value": "231222"
  19444. }, {
  19445. "label": "青冈县",
  19446. "value": "231223"
  19447. }, {
  19448. "label": "庆安县",
  19449. "value": "231224"
  19450. }, {
  19451. "label": "明水县",
  19452. "value": "231225"
  19453. }, {
  19454. "label": "绥棱县",
  19455. "value": "231226"
  19456. }, {
  19457. "label": "安达市",
  19458. "value": "231281"
  19459. }, {
  19460. "label": "肇东市",
  19461. "value": "231282"
  19462. }, {
  19463. "label": "海伦市",
  19464. "value": "231283"
  19465. }], [{
  19466. "label": "加格达奇区",
  19467. "value": "232701"
  19468. }, {
  19469. "label": "松岭区",
  19470. "value": "232702"
  19471. }, {
  19472. "label": "新林区",
  19473. "value": "232703"
  19474. }, {
  19475. "label": "呼中区",
  19476. "value": "232704"
  19477. }, {
  19478. "label": "呼玛县",
  19479. "value": "232721"
  19480. }, {
  19481. "label": "塔河县",
  19482. "value": "232722"
  19483. }, {
  19484. "label": "漠河县",
  19485. "value": "232723"
  19486. }]], [[{
  19487. "label": "黄浦区",
  19488. "value": "310101"
  19489. }, {
  19490. "label": "徐汇区",
  19491. "value": "310104"
  19492. }, {
  19493. "label": "长宁区",
  19494. "value": "310105"
  19495. }, {
  19496. "label": "静安区",
  19497. "value": "310106"
  19498. }, {
  19499. "label": "普陀区",
  19500. "value": "310107"
  19501. }, {
  19502. "label": "虹口区",
  19503. "value": "310109"
  19504. }, {
  19505. "label": "杨浦区",
  19506. "value": "310110"
  19507. }, {
  19508. "label": "闵行区",
  19509. "value": "310112"
  19510. }, {
  19511. "label": "宝山区",
  19512. "value": "310113"
  19513. }, {
  19514. "label": "嘉定区",
  19515. "value": "310114"
  19516. }, {
  19517. "label": "浦东新区",
  19518. "value": "310115"
  19519. }, {
  19520. "label": "金山区",
  19521. "value": "310116"
  19522. }, {
  19523. "label": "松江区",
  19524. "value": "310117"
  19525. }, {
  19526. "label": "青浦区",
  19527. "value": "310118"
  19528. }, {
  19529. "label": "奉贤区",
  19530. "value": "310120"
  19531. }, {
  19532. "label": "崇明区",
  19533. "value": "310151"
  19534. }]], [[{
  19535. "label": "玄武区",
  19536. "value": "320102"
  19537. }, {
  19538. "label": "秦淮区",
  19539. "value": "320104"
  19540. }, {
  19541. "label": "建邺区",
  19542. "value": "320105"
  19543. }, {
  19544. "label": "鼓楼区",
  19545. "value": "320106"
  19546. }, {
  19547. "label": "浦口区",
  19548. "value": "320111"
  19549. }, {
  19550. "label": "栖霞区",
  19551. "value": "320113"
  19552. }, {
  19553. "label": "雨花台区",
  19554. "value": "320114"
  19555. }, {
  19556. "label": "江宁区",
  19557. "value": "320115"
  19558. }, {
  19559. "label": "六合区",
  19560. "value": "320116"
  19561. }, {
  19562. "label": "溧水区",
  19563. "value": "320117"
  19564. }, {
  19565. "label": "高淳区",
  19566. "value": "320118"
  19567. }], [{
  19568. "label": "锡山区",
  19569. "value": "320205"
  19570. }, {
  19571. "label": "惠山区",
  19572. "value": "320206"
  19573. }, {
  19574. "label": "滨湖区",
  19575. "value": "320211"
  19576. }, {
  19577. "label": "梁溪区",
  19578. "value": "320213"
  19579. }, {
  19580. "label": "新吴区",
  19581. "value": "320214"
  19582. }, {
  19583. "label": "江阴市",
  19584. "value": "320281"
  19585. }, {
  19586. "label": "宜兴市",
  19587. "value": "320282"
  19588. }], [{
  19589. "label": "鼓楼区",
  19590. "value": "320302"
  19591. }, {
  19592. "label": "云龙区",
  19593. "value": "320303"
  19594. }, {
  19595. "label": "贾汪区",
  19596. "value": "320305"
  19597. }, {
  19598. "label": "泉山区",
  19599. "value": "320311"
  19600. }, {
  19601. "label": "铜山区",
  19602. "value": "320312"
  19603. }, {
  19604. "label": "丰县",
  19605. "value": "320321"
  19606. }, {
  19607. "label": "沛县",
  19608. "value": "320322"
  19609. }, {
  19610. "label": "睢宁县",
  19611. "value": "320324"
  19612. }, {
  19613. "label": "徐州经济技术开发区",
  19614. "value": "320371"
  19615. }, {
  19616. "label": "新沂市",
  19617. "value": "320381"
  19618. }, {
  19619. "label": "邳州市",
  19620. "value": "320382"
  19621. }], [{
  19622. "label": "天宁区",
  19623. "value": "320402"
  19624. }, {
  19625. "label": "钟楼区",
  19626. "value": "320404"
  19627. }, {
  19628. "label": "新北区",
  19629. "value": "320411"
  19630. }, {
  19631. "label": "武进区",
  19632. "value": "320412"
  19633. }, {
  19634. "label": "金坛区",
  19635. "value": "320413"
  19636. }, {
  19637. "label": "溧阳市",
  19638. "value": "320481"
  19639. }], [{
  19640. "label": "虎丘区",
  19641. "value": "320505"
  19642. }, {
  19643. "label": "吴中区",
  19644. "value": "320506"
  19645. }, {
  19646. "label": "相城区",
  19647. "value": "320507"
  19648. }, {
  19649. "label": "姑苏区",
  19650. "value": "320508"
  19651. }, {
  19652. "label": "吴江区",
  19653. "value": "320509"
  19654. }, {
  19655. "label": "苏州工业园区",
  19656. "value": "320571"
  19657. }, {
  19658. "label": "常熟市",
  19659. "value": "320581"
  19660. }, {
  19661. "label": "张家港市",
  19662. "value": "320582"
  19663. }, {
  19664. "label": "昆山市",
  19665. "value": "320583"
  19666. }, {
  19667. "label": "太仓市",
  19668. "value": "320585"
  19669. }], [{
  19670. "label": "崇川区",
  19671. "value": "320602"
  19672. }, {
  19673. "label": "港闸区",
  19674. "value": "320611"
  19675. }, {
  19676. "label": "通州区",
  19677. "value": "320612"
  19678. }, {
  19679. "label": "海安县",
  19680. "value": "320621"
  19681. }, {
  19682. "label": "如东县",
  19683. "value": "320623"
  19684. }, {
  19685. "label": "南通经济技术开发区",
  19686. "value": "320671"
  19687. }, {
  19688. "label": "启东市",
  19689. "value": "320681"
  19690. }, {
  19691. "label": "如皋市",
  19692. "value": "320682"
  19693. }, {
  19694. "label": "海门市",
  19695. "value": "320684"
  19696. }], [{
  19697. "label": "连云区",
  19698. "value": "320703"
  19699. }, {
  19700. "label": "海州区",
  19701. "value": "320706"
  19702. }, {
  19703. "label": "赣榆区",
  19704. "value": "320707"
  19705. }, {
  19706. "label": "东海县",
  19707. "value": "320722"
  19708. }, {
  19709. "label": "灌云县",
  19710. "value": "320723"
  19711. }, {
  19712. "label": "灌南县",
  19713. "value": "320724"
  19714. }, {
  19715. "label": "连云港经济技术开发区",
  19716. "value": "320771"
  19717. }, {
  19718. "label": "连云港高新技术产业开发区",
  19719. "value": "320772"
  19720. }], [{
  19721. "label": "淮安区",
  19722. "value": "320803"
  19723. }, {
  19724. "label": "淮阴区",
  19725. "value": "320804"
  19726. }, {
  19727. "label": "清江浦区",
  19728. "value": "320812"
  19729. }, {
  19730. "label": "洪泽区",
  19731. "value": "320813"
  19732. }, {
  19733. "label": "涟水县",
  19734. "value": "320826"
  19735. }, {
  19736. "label": "盱眙县",
  19737. "value": "320830"
  19738. }, {
  19739. "label": "金湖县",
  19740. "value": "320831"
  19741. }, {
  19742. "label": "淮安经济技术开发区",
  19743. "value": "320871"
  19744. }], [{
  19745. "label": "亭湖区",
  19746. "value": "320902"
  19747. }, {
  19748. "label": "盐都区",
  19749. "value": "320903"
  19750. }, {
  19751. "label": "大丰区",
  19752. "value": "320904"
  19753. }, {
  19754. "label": "响水县",
  19755. "value": "320921"
  19756. }, {
  19757. "label": "滨海县",
  19758. "value": "320922"
  19759. }, {
  19760. "label": "阜宁县",
  19761. "value": "320923"
  19762. }, {
  19763. "label": "射阳县",
  19764. "value": "320924"
  19765. }, {
  19766. "label": "建湖县",
  19767. "value": "320925"
  19768. }, {
  19769. "label": "盐城经济技术开发区",
  19770. "value": "320971"
  19771. }, {
  19772. "label": "东台市",
  19773. "value": "320981"
  19774. }], [{
  19775. "label": "广陵区",
  19776. "value": "321002"
  19777. }, {
  19778. "label": "邗江区",
  19779. "value": "321003"
  19780. }, {
  19781. "label": "江都区",
  19782. "value": "321012"
  19783. }, {
  19784. "label": "宝应县",
  19785. "value": "321023"
  19786. }, {
  19787. "label": "扬州经济技术开发区",
  19788. "value": "321071"
  19789. }, {
  19790. "label": "仪征市",
  19791. "value": "321081"
  19792. }, {
  19793. "label": "高邮市",
  19794. "value": "321084"
  19795. }], [{
  19796. "label": "京口区",
  19797. "value": "321102"
  19798. }, {
  19799. "label": "润州区",
  19800. "value": "321111"
  19801. }, {
  19802. "label": "丹徒区",
  19803. "value": "321112"
  19804. }, {
  19805. "label": "镇江新区",
  19806. "value": "321171"
  19807. }, {
  19808. "label": "丹阳市",
  19809. "value": "321181"
  19810. }, {
  19811. "label": "扬中市",
  19812. "value": "321182"
  19813. }, {
  19814. "label": "句容市",
  19815. "value": "321183"
  19816. }], [{
  19817. "label": "海陵区",
  19818. "value": "321202"
  19819. }, {
  19820. "label": "高港区",
  19821. "value": "321203"
  19822. }, {
  19823. "label": "姜堰区",
  19824. "value": "321204"
  19825. }, {
  19826. "label": "泰州医药高新技术产业开发区",
  19827. "value": "321271"
  19828. }, {
  19829. "label": "兴化市",
  19830. "value": "321281"
  19831. }, {
  19832. "label": "靖江市",
  19833. "value": "321282"
  19834. }, {
  19835. "label": "泰兴市",
  19836. "value": "321283"
  19837. }], [{
  19838. "label": "宿城区",
  19839. "value": "321302"
  19840. }, {
  19841. "label": "宿豫区",
  19842. "value": "321311"
  19843. }, {
  19844. "label": "沭阳县",
  19845. "value": "321322"
  19846. }, {
  19847. "label": "泗阳县",
  19848. "value": "321323"
  19849. }, {
  19850. "label": "泗洪县",
  19851. "value": "321324"
  19852. }, {
  19853. "label": "宿迁经济技术开发区",
  19854. "value": "321371"
  19855. }]], [[{
  19856. "label": "上城区",
  19857. "value": "330102"
  19858. }, {
  19859. "label": "下城区",
  19860. "value": "330103"
  19861. }, {
  19862. "label": "江干区",
  19863. "value": "330104"
  19864. }, {
  19865. "label": "拱墅区",
  19866. "value": "330105"
  19867. }, {
  19868. "label": "西湖区",
  19869. "value": "330106"
  19870. }, {
  19871. "label": "滨江区",
  19872. "value": "330108"
  19873. }, {
  19874. "label": "萧山区",
  19875. "value": "330109"
  19876. }, {
  19877. "label": "余杭区",
  19878. "value": "330110"
  19879. }, {
  19880. "label": "富阳区",
  19881. "value": "330111"
  19882. }, {
  19883. "label": "临安区",
  19884. "value": "330112"
  19885. }, {
  19886. "label": "桐庐县",
  19887. "value": "330122"
  19888. }, {
  19889. "label": "淳安县",
  19890. "value": "330127"
  19891. }, {
  19892. "label": "建德市",
  19893. "value": "330182"
  19894. }], [{
  19895. "label": "海曙区",
  19896. "value": "330203"
  19897. }, {
  19898. "label": "江北区",
  19899. "value": "330205"
  19900. }, {
  19901. "label": "北仑区",
  19902. "value": "330206"
  19903. }, {
  19904. "label": "镇海区",
  19905. "value": "330211"
  19906. }, {
  19907. "label": "鄞州区",
  19908. "value": "330212"
  19909. }, {
  19910. "label": "奉化区",
  19911. "value": "330213"
  19912. }, {
  19913. "label": "象山县",
  19914. "value": "330225"
  19915. }, {
  19916. "label": "宁海县",
  19917. "value": "330226"
  19918. }, {
  19919. "label": "余姚市",
  19920. "value": "330281"
  19921. }, {
  19922. "label": "慈溪市",
  19923. "value": "330282"
  19924. }], [{
  19925. "label": "鹿城区",
  19926. "value": "330302"
  19927. }, {
  19928. "label": "龙湾区",
  19929. "value": "330303"
  19930. }, {
  19931. "label": "瓯海区",
  19932. "value": "330304"
  19933. }, {
  19934. "label": "洞头区",
  19935. "value": "330305"
  19936. }, {
  19937. "label": "永嘉县",
  19938. "value": "330324"
  19939. }, {
  19940. "label": "平阳县",
  19941. "value": "330326"
  19942. }, {
  19943. "label": "苍南县",
  19944. "value": "330327"
  19945. }, {
  19946. "label": "文成县",
  19947. "value": "330328"
  19948. }, {
  19949. "label": "泰顺县",
  19950. "value": "330329"
  19951. }, {
  19952. "label": "温州经济技术开发区",
  19953. "value": "330371"
  19954. }, {
  19955. "label": "瑞安市",
  19956. "value": "330381"
  19957. }, {
  19958. "label": "乐清市",
  19959. "value": "330382"
  19960. }], [{
  19961. "label": "南湖区",
  19962. "value": "330402"
  19963. }, {
  19964. "label": "秀洲区",
  19965. "value": "330411"
  19966. }, {
  19967. "label": "嘉善县",
  19968. "value": "330421"
  19969. }, {
  19970. "label": "海盐县",
  19971. "value": "330424"
  19972. }, {
  19973. "label": "海宁市",
  19974. "value": "330481"
  19975. }, {
  19976. "label": "平湖市",
  19977. "value": "330482"
  19978. }, {
  19979. "label": "桐乡市",
  19980. "value": "330483"
  19981. }], [{
  19982. "label": "吴兴区",
  19983. "value": "330502"
  19984. }, {
  19985. "label": "南浔区",
  19986. "value": "330503"
  19987. }, {
  19988. "label": "德清县",
  19989. "value": "330521"
  19990. }, {
  19991. "label": "长兴县",
  19992. "value": "330522"
  19993. }, {
  19994. "label": "安吉县",
  19995. "value": "330523"
  19996. }], [{
  19997. "label": "越城区",
  19998. "value": "330602"
  19999. }, {
  20000. "label": "柯桥区",
  20001. "value": "330603"
  20002. }, {
  20003. "label": "上虞区",
  20004. "value": "330604"
  20005. }, {
  20006. "label": "新昌县",
  20007. "value": "330624"
  20008. }, {
  20009. "label": "诸暨市",
  20010. "value": "330681"
  20011. }, {
  20012. "label": "嵊州市",
  20013. "value": "330683"
  20014. }], [{
  20015. "label": "婺城区",
  20016. "value": "330702"
  20017. }, {
  20018. "label": "金东区",
  20019. "value": "330703"
  20020. }, {
  20021. "label": "武义县",
  20022. "value": "330723"
  20023. }, {
  20024. "label": "浦江县",
  20025. "value": "330726"
  20026. }, {
  20027. "label": "磐安县",
  20028. "value": "330727"
  20029. }, {
  20030. "label": "兰溪市",
  20031. "value": "330781"
  20032. }, {
  20033. "label": "义乌市",
  20034. "value": "330782"
  20035. }, {
  20036. "label": "东阳市",
  20037. "value": "330783"
  20038. }, {
  20039. "label": "永康市",
  20040. "value": "330784"
  20041. }], [{
  20042. "label": "柯城区",
  20043. "value": "330802"
  20044. }, {
  20045. "label": "衢江区",
  20046. "value": "330803"
  20047. }, {
  20048. "label": "常山县",
  20049. "value": "330822"
  20050. }, {
  20051. "label": "开化县",
  20052. "value": "330824"
  20053. }, {
  20054. "label": "龙游县",
  20055. "value": "330825"
  20056. }, {
  20057. "label": "江山市",
  20058. "value": "330881"
  20059. }], [{
  20060. "label": "定海区",
  20061. "value": "330902"
  20062. }, {
  20063. "label": "普陀区",
  20064. "value": "330903"
  20065. }, {
  20066. "label": "岱山县",
  20067. "value": "330921"
  20068. }, {
  20069. "label": "嵊泗县",
  20070. "value": "330922"
  20071. }], [{
  20072. "label": "椒江区",
  20073. "value": "331002"
  20074. }, {
  20075. "label": "黄岩区",
  20076. "value": "331003"
  20077. }, {
  20078. "label": "路桥区",
  20079. "value": "331004"
  20080. }, {
  20081. "label": "三门县",
  20082. "value": "331022"
  20083. }, {
  20084. "label": "天台县",
  20085. "value": "331023"
  20086. }, {
  20087. "label": "仙居县",
  20088. "value": "331024"
  20089. }, {
  20090. "label": "温岭市",
  20091. "value": "331081"
  20092. }, {
  20093. "label": "临海市",
  20094. "value": "331082"
  20095. }, {
  20096. "label": "玉环市",
  20097. "value": "331083"
  20098. }], [{
  20099. "label": "莲都区",
  20100. "value": "331102"
  20101. }, {
  20102. "label": "青田县",
  20103. "value": "331121"
  20104. }, {
  20105. "label": "缙云县",
  20106. "value": "331122"
  20107. }, {
  20108. "label": "遂昌县",
  20109. "value": "331123"
  20110. }, {
  20111. "label": "松阳县",
  20112. "value": "331124"
  20113. }, {
  20114. "label": "云和县",
  20115. "value": "331125"
  20116. }, {
  20117. "label": "庆元县",
  20118. "value": "331126"
  20119. }, {
  20120. "label": "景宁畲族自治县",
  20121. "value": "331127"
  20122. }, {
  20123. "label": "龙泉市",
  20124. "value": "331181"
  20125. }]], [[{
  20126. "label": "瑶海区",
  20127. "value": "340102"
  20128. }, {
  20129. "label": "庐阳区",
  20130. "value": "340103"
  20131. }, {
  20132. "label": "蜀山区",
  20133. "value": "340104"
  20134. }, {
  20135. "label": "包河区",
  20136. "value": "340111"
  20137. }, {
  20138. "label": "长丰县",
  20139. "value": "340121"
  20140. }, {
  20141. "label": "肥东县",
  20142. "value": "340122"
  20143. }, {
  20144. "label": "肥西县",
  20145. "value": "340123"
  20146. }, {
  20147. "label": "庐江县",
  20148. "value": "340124"
  20149. }, {
  20150. "label": "合肥高新技术产业开发区",
  20151. "value": "340171"
  20152. }, {
  20153. "label": "合肥经济技术开发区",
  20154. "value": "340172"
  20155. }, {
  20156. "label": "合肥新站高新技术产业开发区",
  20157. "value": "340173"
  20158. }, {
  20159. "label": "巢湖市",
  20160. "value": "340181"
  20161. }], [{
  20162. "label": "镜湖区",
  20163. "value": "340202"
  20164. }, {
  20165. "label": "弋江区",
  20166. "value": "340203"
  20167. }, {
  20168. "label": "鸠江区",
  20169. "value": "340207"
  20170. }, {
  20171. "label": "三山区",
  20172. "value": "340208"
  20173. }, {
  20174. "label": "芜湖县",
  20175. "value": "340221"
  20176. }, {
  20177. "label": "繁昌县",
  20178. "value": "340222"
  20179. }, {
  20180. "label": "南陵县",
  20181. "value": "340223"
  20182. }, {
  20183. "label": "无为县",
  20184. "value": "340225"
  20185. }, {
  20186. "label": "芜湖经济技术开发区",
  20187. "value": "340271"
  20188. }, {
  20189. "label": "安徽芜湖长江大桥经济开发区",
  20190. "value": "340272"
  20191. }], [{
  20192. "label": "龙子湖区",
  20193. "value": "340302"
  20194. }, {
  20195. "label": "蚌山区",
  20196. "value": "340303"
  20197. }, {
  20198. "label": "禹会区",
  20199. "value": "340304"
  20200. }, {
  20201. "label": "淮上区",
  20202. "value": "340311"
  20203. }, {
  20204. "label": "怀远县",
  20205. "value": "340321"
  20206. }, {
  20207. "label": "五河县",
  20208. "value": "340322"
  20209. }, {
  20210. "label": "固镇县",
  20211. "value": "340323"
  20212. }, {
  20213. "label": "蚌埠市高新技术开发区",
  20214. "value": "340371"
  20215. }, {
  20216. "label": "蚌埠市经济开发区",
  20217. "value": "340372"
  20218. }], [{
  20219. "label": "大通区",
  20220. "value": "340402"
  20221. }, {
  20222. "label": "田家庵区",
  20223. "value": "340403"
  20224. }, {
  20225. "label": "谢家集区",
  20226. "value": "340404"
  20227. }, {
  20228. "label": "八公山区",
  20229. "value": "340405"
  20230. }, {
  20231. "label": "潘集区",
  20232. "value": "340406"
  20233. }, {
  20234. "label": "凤台县",
  20235. "value": "340421"
  20236. }, {
  20237. "label": "寿县",
  20238. "value": "340422"
  20239. }], [{
  20240. "label": "花山区",
  20241. "value": "340503"
  20242. }, {
  20243. "label": "雨山区",
  20244. "value": "340504"
  20245. }, {
  20246. "label": "博望区",
  20247. "value": "340506"
  20248. }, {
  20249. "label": "当涂县",
  20250. "value": "340521"
  20251. }, {
  20252. "label": "含山县",
  20253. "value": "340522"
  20254. }, {
  20255. "label": "和县",
  20256. "value": "340523"
  20257. }], [{
  20258. "label": "杜集区",
  20259. "value": "340602"
  20260. }, {
  20261. "label": "相山区",
  20262. "value": "340603"
  20263. }, {
  20264. "label": "烈山区",
  20265. "value": "340604"
  20266. }, {
  20267. "label": "濉溪县",
  20268. "value": "340621"
  20269. }], [{
  20270. "label": "铜官区",
  20271. "value": "340705"
  20272. }, {
  20273. "label": "义安区",
  20274. "value": "340706"
  20275. }, {
  20276. "label": "郊区",
  20277. "value": "340711"
  20278. }, {
  20279. "label": "枞阳县",
  20280. "value": "340722"
  20281. }], [{
  20282. "label": "迎江区",
  20283. "value": "340802"
  20284. }, {
  20285. "label": "大观区",
  20286. "value": "340803"
  20287. }, {
  20288. "label": "宜秀区",
  20289. "value": "340811"
  20290. }, {
  20291. "label": "怀宁县",
  20292. "value": "340822"
  20293. }, {
  20294. "label": "潜山县",
  20295. "value": "340824"
  20296. }, {
  20297. "label": "太湖县",
  20298. "value": "340825"
  20299. }, {
  20300. "label": "宿松县",
  20301. "value": "340826"
  20302. }, {
  20303. "label": "望江县",
  20304. "value": "340827"
  20305. }, {
  20306. "label": "岳西县",
  20307. "value": "340828"
  20308. }, {
  20309. "label": "安徽安庆经济开发区",
  20310. "value": "340871"
  20311. }, {
  20312. "label": "桐城市",
  20313. "value": "340881"
  20314. }], [{
  20315. "label": "屯溪区",
  20316. "value": "341002"
  20317. }, {
  20318. "label": "黄山区",
  20319. "value": "341003"
  20320. }, {
  20321. "label": "徽州区",
  20322. "value": "341004"
  20323. }, {
  20324. "label": "歙县",
  20325. "value": "341021"
  20326. }, {
  20327. "label": "休宁县",
  20328. "value": "341022"
  20329. }, {
  20330. "label": "黟县",
  20331. "value": "341023"
  20332. }, {
  20333. "label": "祁门县",
  20334. "value": "341024"
  20335. }], [{
  20336. "label": "琅琊区",
  20337. "value": "341102"
  20338. }, {
  20339. "label": "南谯区",
  20340. "value": "341103"
  20341. }, {
  20342. "label": "来安县",
  20343. "value": "341122"
  20344. }, {
  20345. "label": "全椒县",
  20346. "value": "341124"
  20347. }, {
  20348. "label": "定远县",
  20349. "value": "341125"
  20350. }, {
  20351. "label": "凤阳县",
  20352. "value": "341126"
  20353. }, {
  20354. "label": "苏滁现代产业园",
  20355. "value": "341171"
  20356. }, {
  20357. "label": "滁州经济技术开发区",
  20358. "value": "341172"
  20359. }, {
  20360. "label": "天长市",
  20361. "value": "341181"
  20362. }, {
  20363. "label": "明光市",
  20364. "value": "341182"
  20365. }], [{
  20366. "label": "颍州区",
  20367. "value": "341202"
  20368. }, {
  20369. "label": "颍东区",
  20370. "value": "341203"
  20371. }, {
  20372. "label": "颍泉区",
  20373. "value": "341204"
  20374. }, {
  20375. "label": "临泉县",
  20376. "value": "341221"
  20377. }, {
  20378. "label": "太和县",
  20379. "value": "341222"
  20380. }, {
  20381. "label": "阜南县",
  20382. "value": "341225"
  20383. }, {
  20384. "label": "颍上县",
  20385. "value": "341226"
  20386. }, {
  20387. "label": "阜阳合肥现代产业园区",
  20388. "value": "341271"
  20389. }, {
  20390. "label": "阜阳经济技术开发区",
  20391. "value": "341272"
  20392. }, {
  20393. "label": "界首市",
  20394. "value": "341282"
  20395. }], [{
  20396. "label": "埇桥区",
  20397. "value": "341302"
  20398. }, {
  20399. "label": "砀山县",
  20400. "value": "341321"
  20401. }, {
  20402. "label": "萧县",
  20403. "value": "341322"
  20404. }, {
  20405. "label": "灵璧县",
  20406. "value": "341323"
  20407. }, {
  20408. "label": "泗县",
  20409. "value": "341324"
  20410. }, {
  20411. "label": "宿州马鞍山现代产业园区",
  20412. "value": "341371"
  20413. }, {
  20414. "label": "宿州经济技术开发区",
  20415. "value": "341372"
  20416. }], [{
  20417. "label": "金安区",
  20418. "value": "341502"
  20419. }, {
  20420. "label": "裕安区",
  20421. "value": "341503"
  20422. }, {
  20423. "label": "叶集区",
  20424. "value": "341504"
  20425. }, {
  20426. "label": "霍邱县",
  20427. "value": "341522"
  20428. }, {
  20429. "label": "舒城县",
  20430. "value": "341523"
  20431. }, {
  20432. "label": "金寨县",
  20433. "value": "341524"
  20434. }, {
  20435. "label": "霍山县",
  20436. "value": "341525"
  20437. }], [{
  20438. "label": "谯城区",
  20439. "value": "341602"
  20440. }, {
  20441. "label": "涡阳县",
  20442. "value": "341621"
  20443. }, {
  20444. "label": "蒙城县",
  20445. "value": "341622"
  20446. }, {
  20447. "label": "利辛县",
  20448. "value": "341623"
  20449. }], [{
  20450. "label": "贵池区",
  20451. "value": "341702"
  20452. }, {
  20453. "label": "东至县",
  20454. "value": "341721"
  20455. }, {
  20456. "label": "石台县",
  20457. "value": "341722"
  20458. }, {
  20459. "label": "青阳县",
  20460. "value": "341723"
  20461. }], [{
  20462. "label": "宣州区",
  20463. "value": "341802"
  20464. }, {
  20465. "label": "郎溪县",
  20466. "value": "341821"
  20467. }, {
  20468. "label": "广德县",
  20469. "value": "341822"
  20470. }, {
  20471. "label": "泾县",
  20472. "value": "341823"
  20473. }, {
  20474. "label": "绩溪县",
  20475. "value": "341824"
  20476. }, {
  20477. "label": "旌德县",
  20478. "value": "341825"
  20479. }, {
  20480. "label": "宣城市经济开发区",
  20481. "value": "341871"
  20482. }, {
  20483. "label": "宁国市",
  20484. "value": "341881"
  20485. }]], [[{
  20486. "label": "鼓楼区",
  20487. "value": "350102"
  20488. }, {
  20489. "label": "台江区",
  20490. "value": "350103"
  20491. }, {
  20492. "label": "仓山区",
  20493. "value": "350104"
  20494. }, {
  20495. "label": "马尾区",
  20496. "value": "350105"
  20497. }, {
  20498. "label": "晋安区",
  20499. "value": "350111"
  20500. }, {
  20501. "label": "闽侯县",
  20502. "value": "350121"
  20503. }, {
  20504. "label": "连江县",
  20505. "value": "350122"
  20506. }, {
  20507. "label": "罗源县",
  20508. "value": "350123"
  20509. }, {
  20510. "label": "闽清县",
  20511. "value": "350124"
  20512. }, {
  20513. "label": "永泰县",
  20514. "value": "350125"
  20515. }, {
  20516. "label": "平潭县",
  20517. "value": "350128"
  20518. }, {
  20519. "label": "福清市",
  20520. "value": "350181"
  20521. }, {
  20522. "label": "长乐市",
  20523. "value": "350182"
  20524. }], [{
  20525. "label": "思明区",
  20526. "value": "350203"
  20527. }, {
  20528. "label": "海沧区",
  20529. "value": "350205"
  20530. }, {
  20531. "label": "湖里区",
  20532. "value": "350206"
  20533. }, {
  20534. "label": "集美区",
  20535. "value": "350211"
  20536. }, {
  20537. "label": "同安区",
  20538. "value": "350212"
  20539. }, {
  20540. "label": "翔安区",
  20541. "value": "350213"
  20542. }], [{
  20543. "label": "城厢区",
  20544. "value": "350302"
  20545. }, {
  20546. "label": "涵江区",
  20547. "value": "350303"
  20548. }, {
  20549. "label": "荔城区",
  20550. "value": "350304"
  20551. }, {
  20552. "label": "秀屿区",
  20553. "value": "350305"
  20554. }, {
  20555. "label": "仙游县",
  20556. "value": "350322"
  20557. }], [{
  20558. "label": "梅列区",
  20559. "value": "350402"
  20560. }, {
  20561. "label": "三元区",
  20562. "value": "350403"
  20563. }, {
  20564. "label": "明溪县",
  20565. "value": "350421"
  20566. }, {
  20567. "label": "清流县",
  20568. "value": "350423"
  20569. }, {
  20570. "label": "宁化县",
  20571. "value": "350424"
  20572. }, {
  20573. "label": "大田县",
  20574. "value": "350425"
  20575. }, {
  20576. "label": "尤溪县",
  20577. "value": "350426"
  20578. }, {
  20579. "label": "沙县",
  20580. "value": "350427"
  20581. }, {
  20582. "label": "将乐县",
  20583. "value": "350428"
  20584. }, {
  20585. "label": "泰宁县",
  20586. "value": "350429"
  20587. }, {
  20588. "label": "建宁县",
  20589. "value": "350430"
  20590. }, {
  20591. "label": "永安市",
  20592. "value": "350481"
  20593. }], [{
  20594. "label": "鲤城区",
  20595. "value": "350502"
  20596. }, {
  20597. "label": "丰泽区",
  20598. "value": "350503"
  20599. }, {
  20600. "label": "洛江区",
  20601. "value": "350504"
  20602. }, {
  20603. "label": "泉港区",
  20604. "value": "350505"
  20605. }, {
  20606. "label": "惠安县",
  20607. "value": "350521"
  20608. }, {
  20609. "label": "安溪县",
  20610. "value": "350524"
  20611. }, {
  20612. "label": "永春县",
  20613. "value": "350525"
  20614. }, {
  20615. "label": "德化县",
  20616. "value": "350526"
  20617. }, {
  20618. "label": "金门县",
  20619. "value": "350527"
  20620. }, {
  20621. "label": "石狮市",
  20622. "value": "350581"
  20623. }, {
  20624. "label": "晋江市",
  20625. "value": "350582"
  20626. }, {
  20627. "label": "南安市",
  20628. "value": "350583"
  20629. }], [{
  20630. "label": "芗城区",
  20631. "value": "350602"
  20632. }, {
  20633. "label": "龙文区",
  20634. "value": "350603"
  20635. }, {
  20636. "label": "云霄县",
  20637. "value": "350622"
  20638. }, {
  20639. "label": "漳浦县",
  20640. "value": "350623"
  20641. }, {
  20642. "label": "诏安县",
  20643. "value": "350624"
  20644. }, {
  20645. "label": "长泰县",
  20646. "value": "350625"
  20647. }, {
  20648. "label": "东山县",
  20649. "value": "350626"
  20650. }, {
  20651. "label": "南靖县",
  20652. "value": "350627"
  20653. }, {
  20654. "label": "平和县",
  20655. "value": "350628"
  20656. }, {
  20657. "label": "华安县",
  20658. "value": "350629"
  20659. }, {
  20660. "label": "龙海市",
  20661. "value": "350681"
  20662. }], [{
  20663. "label": "延平区",
  20664. "value": "350702"
  20665. }, {
  20666. "label": "建阳区",
  20667. "value": "350703"
  20668. }, {
  20669. "label": "顺昌县",
  20670. "value": "350721"
  20671. }, {
  20672. "label": "浦城县",
  20673. "value": "350722"
  20674. }, {
  20675. "label": "光泽县",
  20676. "value": "350723"
  20677. }, {
  20678. "label": "松溪县",
  20679. "value": "350724"
  20680. }, {
  20681. "label": "政和县",
  20682. "value": "350725"
  20683. }, {
  20684. "label": "邵武市",
  20685. "value": "350781"
  20686. }, {
  20687. "label": "武夷山市",
  20688. "value": "350782"
  20689. }, {
  20690. "label": "建瓯市",
  20691. "value": "350783"
  20692. }], [{
  20693. "label": "新罗区",
  20694. "value": "350802"
  20695. }, {
  20696. "label": "永定区",
  20697. "value": "350803"
  20698. }, {
  20699. "label": "长汀县",
  20700. "value": "350821"
  20701. }, {
  20702. "label": "上杭县",
  20703. "value": "350823"
  20704. }, {
  20705. "label": "武平县",
  20706. "value": "350824"
  20707. }, {
  20708. "label": "连城县",
  20709. "value": "350825"
  20710. }, {
  20711. "label": "漳平市",
  20712. "value": "350881"
  20713. }], [{
  20714. "label": "蕉城区",
  20715. "value": "350902"
  20716. }, {
  20717. "label": "霞浦县",
  20718. "value": "350921"
  20719. }, {
  20720. "label": "古田县",
  20721. "value": "350922"
  20722. }, {
  20723. "label": "屏南县",
  20724. "value": "350923"
  20725. }, {
  20726. "label": "寿宁县",
  20727. "value": "350924"
  20728. }, {
  20729. "label": "周宁县",
  20730. "value": "350925"
  20731. }, {
  20732. "label": "柘荣县",
  20733. "value": "350926"
  20734. }, {
  20735. "label": "福安市",
  20736. "value": "350981"
  20737. }, {
  20738. "label": "福鼎市",
  20739. "value": "350982"
  20740. }]], [[{
  20741. "label": "东湖区",
  20742. "value": "360102"
  20743. }, {
  20744. "label": "西湖区",
  20745. "value": "360103"
  20746. }, {
  20747. "label": "青云谱区",
  20748. "value": "360104"
  20749. }, {
  20750. "label": "湾里区",
  20751. "value": "360105"
  20752. }, {
  20753. "label": "青山湖区",
  20754. "value": "360111"
  20755. }, {
  20756. "label": "新建区",
  20757. "value": "360112"
  20758. }, {
  20759. "label": "南昌县",
  20760. "value": "360121"
  20761. }, {
  20762. "label": "安义县",
  20763. "value": "360123"
  20764. }, {
  20765. "label": "进贤县",
  20766. "value": "360124"
  20767. }], [{
  20768. "label": "昌江区",
  20769. "value": "360202"
  20770. }, {
  20771. "label": "珠山区",
  20772. "value": "360203"
  20773. }, {
  20774. "label": "浮梁县",
  20775. "value": "360222"
  20776. }, {
  20777. "label": "乐平市",
  20778. "value": "360281"
  20779. }], [{
  20780. "label": "安源区",
  20781. "value": "360302"
  20782. }, {
  20783. "label": "湘东区",
  20784. "value": "360313"
  20785. }, {
  20786. "label": "莲花县",
  20787. "value": "360321"
  20788. }, {
  20789. "label": "上栗县",
  20790. "value": "360322"
  20791. }, {
  20792. "label": "芦溪县",
  20793. "value": "360323"
  20794. }], [{
  20795. "label": "濂溪区",
  20796. "value": "360402"
  20797. }, {
  20798. "label": "浔阳区",
  20799. "value": "360403"
  20800. }, {
  20801. "label": "柴桑区",
  20802. "value": "360404"
  20803. }, {
  20804. "label": "武宁县",
  20805. "value": "360423"
  20806. }, {
  20807. "label": "修水县",
  20808. "value": "360424"
  20809. }, {
  20810. "label": "永修县",
  20811. "value": "360425"
  20812. }, {
  20813. "label": "德安县",
  20814. "value": "360426"
  20815. }, {
  20816. "label": "都昌县",
  20817. "value": "360428"
  20818. }, {
  20819. "label": "湖口县",
  20820. "value": "360429"
  20821. }, {
  20822. "label": "彭泽县",
  20823. "value": "360430"
  20824. }, {
  20825. "label": "瑞昌市",
  20826. "value": "360481"
  20827. }, {
  20828. "label": "共青城市",
  20829. "value": "360482"
  20830. }, {
  20831. "label": "庐山市",
  20832. "value": "360483"
  20833. }], [{
  20834. "label": "渝水区",
  20835. "value": "360502"
  20836. }, {
  20837. "label": "分宜县",
  20838. "value": "360521"
  20839. }], [{
  20840. "label": "月湖区",
  20841. "value": "360602"
  20842. }, {
  20843. "label": "余江县",
  20844. "value": "360622"
  20845. }, {
  20846. "label": "贵溪市",
  20847. "value": "360681"
  20848. }], [{
  20849. "label": "章贡区",
  20850. "value": "360702"
  20851. }, {
  20852. "label": "南康区",
  20853. "value": "360703"
  20854. }, {
  20855. "label": "赣县区",
  20856. "value": "360704"
  20857. }, {
  20858. "label": "信丰县",
  20859. "value": "360722"
  20860. }, {
  20861. "label": "大余县",
  20862. "value": "360723"
  20863. }, {
  20864. "label": "上犹县",
  20865. "value": "360724"
  20866. }, {
  20867. "label": "崇义县",
  20868. "value": "360725"
  20869. }, {
  20870. "label": "安远县",
  20871. "value": "360726"
  20872. }, {
  20873. "label": "龙南县",
  20874. "value": "360727"
  20875. }, {
  20876. "label": "定南县",
  20877. "value": "360728"
  20878. }, {
  20879. "label": "全南县",
  20880. "value": "360729"
  20881. }, {
  20882. "label": "宁都县",
  20883. "value": "360730"
  20884. }, {
  20885. "label": "于都县",
  20886. "value": "360731"
  20887. }, {
  20888. "label": "兴国县",
  20889. "value": "360732"
  20890. }, {
  20891. "label": "会昌县",
  20892. "value": "360733"
  20893. }, {
  20894. "label": "寻乌县",
  20895. "value": "360734"
  20896. }, {
  20897. "label": "石城县",
  20898. "value": "360735"
  20899. }, {
  20900. "label": "瑞金市",
  20901. "value": "360781"
  20902. }], [{
  20903. "label": "吉州区",
  20904. "value": "360802"
  20905. }, {
  20906. "label": "青原区",
  20907. "value": "360803"
  20908. }, {
  20909. "label": "吉安县",
  20910. "value": "360821"
  20911. }, {
  20912. "label": "吉水县",
  20913. "value": "360822"
  20914. }, {
  20915. "label": "峡江县",
  20916. "value": "360823"
  20917. }, {
  20918. "label": "新干县",
  20919. "value": "360824"
  20920. }, {
  20921. "label": "永丰县",
  20922. "value": "360825"
  20923. }, {
  20924. "label": "泰和县",
  20925. "value": "360826"
  20926. }, {
  20927. "label": "遂川县",
  20928. "value": "360827"
  20929. }, {
  20930. "label": "万安县",
  20931. "value": "360828"
  20932. }, {
  20933. "label": "安福县",
  20934. "value": "360829"
  20935. }, {
  20936. "label": "永新县",
  20937. "value": "360830"
  20938. }, {
  20939. "label": "井冈山市",
  20940. "value": "360881"
  20941. }], [{
  20942. "label": "袁州区",
  20943. "value": "360902"
  20944. }, {
  20945. "label": "奉新县",
  20946. "value": "360921"
  20947. }, {
  20948. "label": "万载县",
  20949. "value": "360922"
  20950. }, {
  20951. "label": "上高县",
  20952. "value": "360923"
  20953. }, {
  20954. "label": "宜丰县",
  20955. "value": "360924"
  20956. }, {
  20957. "label": "靖安县",
  20958. "value": "360925"
  20959. }, {
  20960. "label": "铜鼓县",
  20961. "value": "360926"
  20962. }, {
  20963. "label": "丰城市",
  20964. "value": "360981"
  20965. }, {
  20966. "label": "樟树市",
  20967. "value": "360982"
  20968. }, {
  20969. "label": "高安市",
  20970. "value": "360983"
  20971. }], [{
  20972. "label": "临川区",
  20973. "value": "361002"
  20974. }, {
  20975. "label": "东乡区",
  20976. "value": "361003"
  20977. }, {
  20978. "label": "南城县",
  20979. "value": "361021"
  20980. }, {
  20981. "label": "黎川县",
  20982. "value": "361022"
  20983. }, {
  20984. "label": "南丰县",
  20985. "value": "361023"
  20986. }, {
  20987. "label": "崇仁县",
  20988. "value": "361024"
  20989. }, {
  20990. "label": "乐安县",
  20991. "value": "361025"
  20992. }, {
  20993. "label": "宜黄县",
  20994. "value": "361026"
  20995. }, {
  20996. "label": "金溪县",
  20997. "value": "361027"
  20998. }, {
  20999. "label": "资溪县",
  21000. "value": "361028"
  21001. }, {
  21002. "label": "广昌县",
  21003. "value": "361030"
  21004. }], [{
  21005. "label": "信州区",
  21006. "value": "361102"
  21007. }, {
  21008. "label": "广丰区",
  21009. "value": "361103"
  21010. }, {
  21011. "label": "上饶县",
  21012. "value": "361121"
  21013. }, {
  21014. "label": "玉山县",
  21015. "value": "361123"
  21016. }, {
  21017. "label": "铅山县",
  21018. "value": "361124"
  21019. }, {
  21020. "label": "横峰县",
  21021. "value": "361125"
  21022. }, {
  21023. "label": "弋阳县",
  21024. "value": "361126"
  21025. }, {
  21026. "label": "余干县",
  21027. "value": "361127"
  21028. }, {
  21029. "label": "鄱阳县",
  21030. "value": "361128"
  21031. }, {
  21032. "label": "万年县",
  21033. "value": "361129"
  21034. }, {
  21035. "label": "婺源县",
  21036. "value": "361130"
  21037. }, {
  21038. "label": "德兴市",
  21039. "value": "361181"
  21040. }]], [[{
  21041. "label": "历下区",
  21042. "value": "370102"
  21043. }, {
  21044. "label": "市中区",
  21045. "value": "370103"
  21046. }, {
  21047. "label": "槐荫区",
  21048. "value": "370104"
  21049. }, {
  21050. "label": "天桥区",
  21051. "value": "370105"
  21052. }, {
  21053. "label": "历城区",
  21054. "value": "370112"
  21055. }, {
  21056. "label": "长清区",
  21057. "value": "370113"
  21058. }, {
  21059. "label": "章丘区",
  21060. "value": "370114"
  21061. }, {
  21062. "label": "平阴县",
  21063. "value": "370124"
  21064. }, {
  21065. "label": "济阳县",
  21066. "value": "370125"
  21067. }, {
  21068. "label": "商河县",
  21069. "value": "370126"
  21070. }, {
  21071. "label": "济南高新技术产业开发区",
  21072. "value": "370171"
  21073. }], [{
  21074. "label": "市南区",
  21075. "value": "370202"
  21076. }, {
  21077. "label": "市北区",
  21078. "value": "370203"
  21079. }, {
  21080. "label": "黄岛区",
  21081. "value": "370211"
  21082. }, {
  21083. "label": "崂山区",
  21084. "value": "370212"
  21085. }, {
  21086. "label": "李沧区",
  21087. "value": "370213"
  21088. }, {
  21089. "label": "城阳区",
  21090. "value": "370214"
  21091. }, {
  21092. "label": "即墨区",
  21093. "value": "370215"
  21094. }, {
  21095. "label": "青岛高新技术产业开发区",
  21096. "value": "370271"
  21097. }, {
  21098. "label": "胶州市",
  21099. "value": "370281"
  21100. }, {
  21101. "label": "平度市",
  21102. "value": "370283"
  21103. }, {
  21104. "label": "莱西市",
  21105. "value": "370285"
  21106. }], [{
  21107. "label": "淄川区",
  21108. "value": "370302"
  21109. }, {
  21110. "label": "张店区",
  21111. "value": "370303"
  21112. }, {
  21113. "label": "博山区",
  21114. "value": "370304"
  21115. }, {
  21116. "label": "临淄区",
  21117. "value": "370305"
  21118. }, {
  21119. "label": "周村区",
  21120. "value": "370306"
  21121. }, {
  21122. "label": "桓台县",
  21123. "value": "370321"
  21124. }, {
  21125. "label": "高青县",
  21126. "value": "370322"
  21127. }, {
  21128. "label": "沂源县",
  21129. "value": "370323"
  21130. }], [{
  21131. "label": "市中区",
  21132. "value": "370402"
  21133. }, {
  21134. "label": "薛城区",
  21135. "value": "370403"
  21136. }, {
  21137. "label": "峄城区",
  21138. "value": "370404"
  21139. }, {
  21140. "label": "台儿庄区",
  21141. "value": "370405"
  21142. }, {
  21143. "label": "山亭区",
  21144. "value": "370406"
  21145. }, {
  21146. "label": "滕州市",
  21147. "value": "370481"
  21148. }], [{
  21149. "label": "东营区",
  21150. "value": "370502"
  21151. }, {
  21152. "label": "河口区",
  21153. "value": "370503"
  21154. }, {
  21155. "label": "垦利区",
  21156. "value": "370505"
  21157. }, {
  21158. "label": "利津县",
  21159. "value": "370522"
  21160. }, {
  21161. "label": "广饶县",
  21162. "value": "370523"
  21163. }, {
  21164. "label": "东营经济技术开发区",
  21165. "value": "370571"
  21166. }, {
  21167. "label": "东营港经济开发区",
  21168. "value": "370572"
  21169. }], [{
  21170. "label": "芝罘区",
  21171. "value": "370602"
  21172. }, {
  21173. "label": "福山区",
  21174. "value": "370611"
  21175. }, {
  21176. "label": "牟平区",
  21177. "value": "370612"
  21178. }, {
  21179. "label": "莱山区",
  21180. "value": "370613"
  21181. }, {
  21182. "label": "长岛县",
  21183. "value": "370634"
  21184. }, {
  21185. "label": "烟台高新技术产业开发区",
  21186. "value": "370671"
  21187. }, {
  21188. "label": "烟台经济技术开发区",
  21189. "value": "370672"
  21190. }, {
  21191. "label": "龙口市",
  21192. "value": "370681"
  21193. }, {
  21194. "label": "莱阳市",
  21195. "value": "370682"
  21196. }, {
  21197. "label": "莱州市",
  21198. "value": "370683"
  21199. }, {
  21200. "label": "蓬莱市",
  21201. "value": "370684"
  21202. }, {
  21203. "label": "招远市",
  21204. "value": "370685"
  21205. }, {
  21206. "label": "栖霞市",
  21207. "value": "370686"
  21208. }, {
  21209. "label": "海阳市",
  21210. "value": "370687"
  21211. }], [{
  21212. "label": "潍城区",
  21213. "value": "370702"
  21214. }, {
  21215. "label": "寒亭区",
  21216. "value": "370703"
  21217. }, {
  21218. "label": "坊子区",
  21219. "value": "370704"
  21220. }, {
  21221. "label": "奎文区",
  21222. "value": "370705"
  21223. }, {
  21224. "label": "临朐县",
  21225. "value": "370724"
  21226. }, {
  21227. "label": "昌乐县",
  21228. "value": "370725"
  21229. }, {
  21230. "label": "潍坊滨海经济技术开发区",
  21231. "value": "370772"
  21232. }, {
  21233. "label": "青州市",
  21234. "value": "370781"
  21235. }, {
  21236. "label": "诸城市",
  21237. "value": "370782"
  21238. }, {
  21239. "label": "寿光市",
  21240. "value": "370783"
  21241. }, {
  21242. "label": "安丘市",
  21243. "value": "370784"
  21244. }, {
  21245. "label": "高密市",
  21246. "value": "370785"
  21247. }, {
  21248. "label": "昌邑市",
  21249. "value": "370786"
  21250. }], [{
  21251. "label": "任城区",
  21252. "value": "370811"
  21253. }, {
  21254. "label": "兖州区",
  21255. "value": "370812"
  21256. }, {
  21257. "label": "微山县",
  21258. "value": "370826"
  21259. }, {
  21260. "label": "鱼台县",
  21261. "value": "370827"
  21262. }, {
  21263. "label": "金乡县",
  21264. "value": "370828"
  21265. }, {
  21266. "label": "嘉祥县",
  21267. "value": "370829"
  21268. }, {
  21269. "label": "汶上县",
  21270. "value": "370830"
  21271. }, {
  21272. "label": "泗水县",
  21273. "value": "370831"
  21274. }, {
  21275. "label": "梁山县",
  21276. "value": "370832"
  21277. }, {
  21278. "label": "济宁高新技术产业开发区",
  21279. "value": "370871"
  21280. }, {
  21281. "label": "曲阜市",
  21282. "value": "370881"
  21283. }, {
  21284. "label": "邹城市",
  21285. "value": "370883"
  21286. }], [{
  21287. "label": "泰山区",
  21288. "value": "370902"
  21289. }, {
  21290. "label": "岱岳区",
  21291. "value": "370911"
  21292. }, {
  21293. "label": "宁阳县",
  21294. "value": "370921"
  21295. }, {
  21296. "label": "东平县",
  21297. "value": "370923"
  21298. }, {
  21299. "label": "新泰市",
  21300. "value": "370982"
  21301. }, {
  21302. "label": "肥城市",
  21303. "value": "370983"
  21304. }], [{
  21305. "label": "环翠区",
  21306. "value": "371002"
  21307. }, {
  21308. "label": "文登区",
  21309. "value": "371003"
  21310. }, {
  21311. "label": "威海火炬高技术产业开发区",
  21312. "value": "371071"
  21313. }, {
  21314. "label": "威海经济技术开发区",
  21315. "value": "371072"
  21316. }, {
  21317. "label": "威海临港经济技术开发区",
  21318. "value": "371073"
  21319. }, {
  21320. "label": "荣成市",
  21321. "value": "371082"
  21322. }, {
  21323. "label": "乳山市",
  21324. "value": "371083"
  21325. }], [{
  21326. "label": "东港区",
  21327. "value": "371102"
  21328. }, {
  21329. "label": "岚山区",
  21330. "value": "371103"
  21331. }, {
  21332. "label": "五莲县",
  21333. "value": "371121"
  21334. }, {
  21335. "label": "莒县",
  21336. "value": "371122"
  21337. }, {
  21338. "label": "日照经济技术开发区",
  21339. "value": "371171"
  21340. }, {
  21341. "label": "日照国际海洋城",
  21342. "value": "371172"
  21343. }], [{
  21344. "label": "莱城区",
  21345. "value": "371202"
  21346. }, {
  21347. "label": "钢城区",
  21348. "value": "371203"
  21349. }], [{
  21350. "label": "兰山区",
  21351. "value": "371302"
  21352. }, {
  21353. "label": "罗庄区",
  21354. "value": "371311"
  21355. }, {
  21356. "label": "河东区",
  21357. "value": "371312"
  21358. }, {
  21359. "label": "沂南县",
  21360. "value": "371321"
  21361. }, {
  21362. "label": "郯城县",
  21363. "value": "371322"
  21364. }, {
  21365. "label": "沂水县",
  21366. "value": "371323"
  21367. }, {
  21368. "label": "兰陵县",
  21369. "value": "371324"
  21370. }, {
  21371. "label": "费县",
  21372. "value": "371325"
  21373. }, {
  21374. "label": "平邑县",
  21375. "value": "371326"
  21376. }, {
  21377. "label": "莒南县",
  21378. "value": "371327"
  21379. }, {
  21380. "label": "蒙阴县",
  21381. "value": "371328"
  21382. }, {
  21383. "label": "临沭县",
  21384. "value": "371329"
  21385. }, {
  21386. "label": "临沂高新技术产业开发区",
  21387. "value": "371371"
  21388. }, {
  21389. "label": "临沂经济技术开发区",
  21390. "value": "371372"
  21391. }, {
  21392. "label": "临沂临港经济开发区",
  21393. "value": "371373"
  21394. }], [{
  21395. "label": "德城区",
  21396. "value": "371402"
  21397. }, {
  21398. "label": "陵城区",
  21399. "value": "371403"
  21400. }, {
  21401. "label": "宁津县",
  21402. "value": "371422"
  21403. }, {
  21404. "label": "庆云县",
  21405. "value": "371423"
  21406. }, {
  21407. "label": "临邑县",
  21408. "value": "371424"
  21409. }, {
  21410. "label": "齐河县",
  21411. "value": "371425"
  21412. }, {
  21413. "label": "平原县",
  21414. "value": "371426"
  21415. }, {
  21416. "label": "夏津县",
  21417. "value": "371427"
  21418. }, {
  21419. "label": "武城县",
  21420. "value": "371428"
  21421. }, {
  21422. "label": "德州经济技术开发区",
  21423. "value": "371471"
  21424. }, {
  21425. "label": "德州运河经济开发区",
  21426. "value": "371472"
  21427. }, {
  21428. "label": "乐陵市",
  21429. "value": "371481"
  21430. }, {
  21431. "label": "禹城市",
  21432. "value": "371482"
  21433. }], [{
  21434. "label": "东昌府区",
  21435. "value": "371502"
  21436. }, {
  21437. "label": "阳谷县",
  21438. "value": "371521"
  21439. }, {
  21440. "label": "莘县",
  21441. "value": "371522"
  21442. }, {
  21443. "label": "茌平县",
  21444. "value": "371523"
  21445. }, {
  21446. "label": "东阿县",
  21447. "value": "371524"
  21448. }, {
  21449. "label": "冠县",
  21450. "value": "371525"
  21451. }, {
  21452. "label": "高唐县",
  21453. "value": "371526"
  21454. }, {
  21455. "label": "临清市",
  21456. "value": "371581"
  21457. }], [{
  21458. "label": "滨城区",
  21459. "value": "371602"
  21460. }, {
  21461. "label": "沾化区",
  21462. "value": "371603"
  21463. }, {
  21464. "label": "惠民县",
  21465. "value": "371621"
  21466. }, {
  21467. "label": "阳信县",
  21468. "value": "371622"
  21469. }, {
  21470. "label": "无棣县",
  21471. "value": "371623"
  21472. }, {
  21473. "label": "博兴县",
  21474. "value": "371625"
  21475. }, {
  21476. "label": "邹平县",
  21477. "value": "371626"
  21478. }], [{
  21479. "label": "牡丹区",
  21480. "value": "371702"
  21481. }, {
  21482. "label": "定陶区",
  21483. "value": "371703"
  21484. }, {
  21485. "label": "曹县",
  21486. "value": "371721"
  21487. }, {
  21488. "label": "单县",
  21489. "value": "371722"
  21490. }, {
  21491. "label": "成武县",
  21492. "value": "371723"
  21493. }, {
  21494. "label": "巨野县",
  21495. "value": "371724"
  21496. }, {
  21497. "label": "郓城县",
  21498. "value": "371725"
  21499. }, {
  21500. "label": "鄄城县",
  21501. "value": "371726"
  21502. }, {
  21503. "label": "东明县",
  21504. "value": "371728"
  21505. }, {
  21506. "label": "菏泽经济技术开发区",
  21507. "value": "371771"
  21508. }, {
  21509. "label": "菏泽高新技术开发区",
  21510. "value": "371772"
  21511. }]], [[{
  21512. "label": "中原区",
  21513. "value": "410102"
  21514. }, {
  21515. "label": "二七区",
  21516. "value": "410103"
  21517. }, {
  21518. "label": "管城回族区",
  21519. "value": "410104"
  21520. }, {
  21521. "label": "金水区",
  21522. "value": "410105"
  21523. }, {
  21524. "label": "上街区",
  21525. "value": "410106"
  21526. }, {
  21527. "label": "惠济区",
  21528. "value": "410108"
  21529. }, {
  21530. "label": "中牟县",
  21531. "value": "410122"
  21532. }, {
  21533. "label": "郑州经济技术开发区",
  21534. "value": "410171"
  21535. }, {
  21536. "label": "郑州高新技术产业开发区",
  21537. "value": "410172"
  21538. }, {
  21539. "label": "郑州航空港经济综合实验区",
  21540. "value": "410173"
  21541. }, {
  21542. "label": "巩义市",
  21543. "value": "410181"
  21544. }, {
  21545. "label": "荥阳市",
  21546. "value": "410182"
  21547. }, {
  21548. "label": "新密市",
  21549. "value": "410183"
  21550. }, {
  21551. "label": "新郑市",
  21552. "value": "410184"
  21553. }, {
  21554. "label": "登封市",
  21555. "value": "410185"
  21556. }], [{
  21557. "label": "龙亭区",
  21558. "value": "410202"
  21559. }, {
  21560. "label": "顺河回族区",
  21561. "value": "410203"
  21562. }, {
  21563. "label": "鼓楼区",
  21564. "value": "410204"
  21565. }, {
  21566. "label": "禹王台区",
  21567. "value": "410205"
  21568. }, {
  21569. "label": "祥符区",
  21570. "value": "410212"
  21571. }, {
  21572. "label": "杞县",
  21573. "value": "410221"
  21574. }, {
  21575. "label": "通许县",
  21576. "value": "410222"
  21577. }, {
  21578. "label": "尉氏县",
  21579. "value": "410223"
  21580. }, {
  21581. "label": "兰考县",
  21582. "value": "410225"
  21583. }], [{
  21584. "label": "老城区",
  21585. "value": "410302"
  21586. }, {
  21587. "label": "西工区",
  21588. "value": "410303"
  21589. }, {
  21590. "label": "瀍河回族区",
  21591. "value": "410304"
  21592. }, {
  21593. "label": "涧西区",
  21594. "value": "410305"
  21595. }, {
  21596. "label": "吉利区",
  21597. "value": "410306"
  21598. }, {
  21599. "label": "洛龙区",
  21600. "value": "410311"
  21601. }, {
  21602. "label": "孟津县",
  21603. "value": "410322"
  21604. }, {
  21605. "label": "新安县",
  21606. "value": "410323"
  21607. }, {
  21608. "label": "栾川县",
  21609. "value": "410324"
  21610. }, {
  21611. "label": "嵩县",
  21612. "value": "410325"
  21613. }, {
  21614. "label": "汝阳县",
  21615. "value": "410326"
  21616. }, {
  21617. "label": "宜阳县",
  21618. "value": "410327"
  21619. }, {
  21620. "label": "洛宁县",
  21621. "value": "410328"
  21622. }, {
  21623. "label": "伊川县",
  21624. "value": "410329"
  21625. }, {
  21626. "label": "洛阳高新技术产业开发区",
  21627. "value": "410371"
  21628. }, {
  21629. "label": "偃师市",
  21630. "value": "410381"
  21631. }], [{
  21632. "label": "新华区",
  21633. "value": "410402"
  21634. }, {
  21635. "label": "卫东区",
  21636. "value": "410403"
  21637. }, {
  21638. "label": "石龙区",
  21639. "value": "410404"
  21640. }, {
  21641. "label": "湛河区",
  21642. "value": "410411"
  21643. }, {
  21644. "label": "宝丰县",
  21645. "value": "410421"
  21646. }, {
  21647. "label": "叶县",
  21648. "value": "410422"
  21649. }, {
  21650. "label": "鲁山县",
  21651. "value": "410423"
  21652. }, {
  21653. "label": "郏县",
  21654. "value": "410425"
  21655. }, {
  21656. "label": "平顶山高新技术产业开发区",
  21657. "value": "410471"
  21658. }, {
  21659. "label": "平顶山市新城区",
  21660. "value": "410472"
  21661. }, {
  21662. "label": "舞钢市",
  21663. "value": "410481"
  21664. }, {
  21665. "label": "汝州市",
  21666. "value": "410482"
  21667. }], [{
  21668. "label": "文峰区",
  21669. "value": "410502"
  21670. }, {
  21671. "label": "北关区",
  21672. "value": "410503"
  21673. }, {
  21674. "label": "殷都区",
  21675. "value": "410505"
  21676. }, {
  21677. "label": "龙安区",
  21678. "value": "410506"
  21679. }, {
  21680. "label": "安阳县",
  21681. "value": "410522"
  21682. }, {
  21683. "label": "汤阴县",
  21684. "value": "410523"
  21685. }, {
  21686. "label": "滑县",
  21687. "value": "410526"
  21688. }, {
  21689. "label": "内黄县",
  21690. "value": "410527"
  21691. }, {
  21692. "label": "安阳高新技术产业开发区",
  21693. "value": "410571"
  21694. }, {
  21695. "label": "林州市",
  21696. "value": "410581"
  21697. }], [{
  21698. "label": "鹤山区",
  21699. "value": "410602"
  21700. }, {
  21701. "label": "山城区",
  21702. "value": "410603"
  21703. }, {
  21704. "label": "淇滨区",
  21705. "value": "410611"
  21706. }, {
  21707. "label": "浚县",
  21708. "value": "410621"
  21709. }, {
  21710. "label": "淇县",
  21711. "value": "410622"
  21712. }, {
  21713. "label": "鹤壁经济技术开发区",
  21714. "value": "410671"
  21715. }], [{
  21716. "label": "红旗区",
  21717. "value": "410702"
  21718. }, {
  21719. "label": "卫滨区",
  21720. "value": "410703"
  21721. }, {
  21722. "label": "凤泉区",
  21723. "value": "410704"
  21724. }, {
  21725. "label": "牧野区",
  21726. "value": "410711"
  21727. }, {
  21728. "label": "新乡县",
  21729. "value": "410721"
  21730. }, {
  21731. "label": "获嘉县",
  21732. "value": "410724"
  21733. }, {
  21734. "label": "原阳县",
  21735. "value": "410725"
  21736. }, {
  21737. "label": "延津县",
  21738. "value": "410726"
  21739. }, {
  21740. "label": "封丘县",
  21741. "value": "410727"
  21742. }, {
  21743. "label": "长垣县",
  21744. "value": "410728"
  21745. }, {
  21746. "label": "新乡高新技术产业开发区",
  21747. "value": "410771"
  21748. }, {
  21749. "label": "新乡经济技术开发区",
  21750. "value": "410772"
  21751. }, {
  21752. "label": "新乡市平原城乡一体化示范区",
  21753. "value": "410773"
  21754. }, {
  21755. "label": "卫辉市",
  21756. "value": "410781"
  21757. }, {
  21758. "label": "辉县市",
  21759. "value": "410782"
  21760. }], [{
  21761. "label": "解放区",
  21762. "value": "410802"
  21763. }, {
  21764. "label": "中站区",
  21765. "value": "410803"
  21766. }, {
  21767. "label": "马村区",
  21768. "value": "410804"
  21769. }, {
  21770. "label": "山阳区",
  21771. "value": "410811"
  21772. }, {
  21773. "label": "修武县",
  21774. "value": "410821"
  21775. }, {
  21776. "label": "博爱县",
  21777. "value": "410822"
  21778. }, {
  21779. "label": "武陟县",
  21780. "value": "410823"
  21781. }, {
  21782. "label": "温县",
  21783. "value": "410825"
  21784. }, {
  21785. "label": "焦作城乡一体化示范区",
  21786. "value": "410871"
  21787. }, {
  21788. "label": "沁阳市",
  21789. "value": "410882"
  21790. }, {
  21791. "label": "孟州市",
  21792. "value": "410883"
  21793. }], [{
  21794. "label": "华龙区",
  21795. "value": "410902"
  21796. }, {
  21797. "label": "清丰县",
  21798. "value": "410922"
  21799. }, {
  21800. "label": "南乐县",
  21801. "value": "410923"
  21802. }, {
  21803. "label": "范县",
  21804. "value": "410926"
  21805. }, {
  21806. "label": "台前县",
  21807. "value": "410927"
  21808. }, {
  21809. "label": "濮阳县",
  21810. "value": "410928"
  21811. }, {
  21812. "label": "河南濮阳工业园区",
  21813. "value": "410971"
  21814. }, {
  21815. "label": "濮阳经济技术开发区",
  21816. "value": "410972"
  21817. }], [{
  21818. "label": "魏都区",
  21819. "value": "411002"
  21820. }, {
  21821. "label": "建安区",
  21822. "value": "411003"
  21823. }, {
  21824. "label": "鄢陵县",
  21825. "value": "411024"
  21826. }, {
  21827. "label": "襄城县",
  21828. "value": "411025"
  21829. }, {
  21830. "label": "许昌经济技术开发区",
  21831. "value": "411071"
  21832. }, {
  21833. "label": "禹州市",
  21834. "value": "411081"
  21835. }, {
  21836. "label": "长葛市",
  21837. "value": "411082"
  21838. }], [{
  21839. "label": "源汇区",
  21840. "value": "411102"
  21841. }, {
  21842. "label": "郾城区",
  21843. "value": "411103"
  21844. }, {
  21845. "label": "召陵区",
  21846. "value": "411104"
  21847. }, {
  21848. "label": "舞阳县",
  21849. "value": "411121"
  21850. }, {
  21851. "label": "临颍县",
  21852. "value": "411122"
  21853. }, {
  21854. "label": "漯河经济技术开发区",
  21855. "value": "411171"
  21856. }], [{
  21857. "label": "湖滨区",
  21858. "value": "411202"
  21859. }, {
  21860. "label": "陕州区",
  21861. "value": "411203"
  21862. }, {
  21863. "label": "渑池县",
  21864. "value": "411221"
  21865. }, {
  21866. "label": "卢氏县",
  21867. "value": "411224"
  21868. }, {
  21869. "label": "河南三门峡经济开发区",
  21870. "value": "411271"
  21871. }, {
  21872. "label": "义马市",
  21873. "value": "411281"
  21874. }, {
  21875. "label": "灵宝市",
  21876. "value": "411282"
  21877. }], [{
  21878. "label": "宛城区",
  21879. "value": "411302"
  21880. }, {
  21881. "label": "卧龙区",
  21882. "value": "411303"
  21883. }, {
  21884. "label": "南召县",
  21885. "value": "411321"
  21886. }, {
  21887. "label": "方城县",
  21888. "value": "411322"
  21889. }, {
  21890. "label": "西峡县",
  21891. "value": "411323"
  21892. }, {
  21893. "label": "镇平县",
  21894. "value": "411324"
  21895. }, {
  21896. "label": "内乡县",
  21897. "value": "411325"
  21898. }, {
  21899. "label": "淅川县",
  21900. "value": "411326"
  21901. }, {
  21902. "label": "社旗县",
  21903. "value": "411327"
  21904. }, {
  21905. "label": "唐河县",
  21906. "value": "411328"
  21907. }, {
  21908. "label": "新野县",
  21909. "value": "411329"
  21910. }, {
  21911. "label": "桐柏县",
  21912. "value": "411330"
  21913. }, {
  21914. "label": "南阳高新技术产业开发区",
  21915. "value": "411371"
  21916. }, {
  21917. "label": "南阳市城乡一体化示范区",
  21918. "value": "411372"
  21919. }, {
  21920. "label": "邓州市",
  21921. "value": "411381"
  21922. }], [{
  21923. "label": "梁园区",
  21924. "value": "411402"
  21925. }, {
  21926. "label": "睢阳区",
  21927. "value": "411403"
  21928. }, {
  21929. "label": "民权县",
  21930. "value": "411421"
  21931. }, {
  21932. "label": "睢县",
  21933. "value": "411422"
  21934. }, {
  21935. "label": "宁陵县",
  21936. "value": "411423"
  21937. }, {
  21938. "label": "柘城县",
  21939. "value": "411424"
  21940. }, {
  21941. "label": "虞城县",
  21942. "value": "411425"
  21943. }, {
  21944. "label": "夏邑县",
  21945. "value": "411426"
  21946. }, {
  21947. "label": "豫东综合物流产业聚集区",
  21948. "value": "411471"
  21949. }, {
  21950. "label": "河南商丘经济开发区",
  21951. "value": "411472"
  21952. }, {
  21953. "label": "永城市",
  21954. "value": "411481"
  21955. }], [{
  21956. "label": "浉河区",
  21957. "value": "411502"
  21958. }, {
  21959. "label": "平桥区",
  21960. "value": "411503"
  21961. }, {
  21962. "label": "罗山县",
  21963. "value": "411521"
  21964. }, {
  21965. "label": "光山县",
  21966. "value": "411522"
  21967. }, {
  21968. "label": "新县",
  21969. "value": "411523"
  21970. }, {
  21971. "label": "商城县",
  21972. "value": "411524"
  21973. }, {
  21974. "label": "固始县",
  21975. "value": "411525"
  21976. }, {
  21977. "label": "潢川县",
  21978. "value": "411526"
  21979. }, {
  21980. "label": "淮滨县",
  21981. "value": "411527"
  21982. }, {
  21983. "label": "息县",
  21984. "value": "411528"
  21985. }, {
  21986. "label": "信阳高新技术产业开发区",
  21987. "value": "411571"
  21988. }], [{
  21989. "label": "川汇区",
  21990. "value": "411602"
  21991. }, {
  21992. "label": "扶沟县",
  21993. "value": "411621"
  21994. }, {
  21995. "label": "西华县",
  21996. "value": "411622"
  21997. }, {
  21998. "label": "商水县",
  21999. "value": "411623"
  22000. }, {
  22001. "label": "沈丘县",
  22002. "value": "411624"
  22003. }, {
  22004. "label": "郸城县",
  22005. "value": "411625"
  22006. }, {
  22007. "label": "淮阳县",
  22008. "value": "411626"
  22009. }, {
  22010. "label": "太康县",
  22011. "value": "411627"
  22012. }, {
  22013. "label": "鹿邑县",
  22014. "value": "411628"
  22015. }, {
  22016. "label": "河南周口经济开发区",
  22017. "value": "411671"
  22018. }, {
  22019. "label": "项城市",
  22020. "value": "411681"
  22021. }], [{
  22022. "label": "驿城区",
  22023. "value": "411702"
  22024. }, {
  22025. "label": "西平县",
  22026. "value": "411721"
  22027. }, {
  22028. "label": "上蔡县",
  22029. "value": "411722"
  22030. }, {
  22031. "label": "平舆县",
  22032. "value": "411723"
  22033. }, {
  22034. "label": "正阳县",
  22035. "value": "411724"
  22036. }, {
  22037. "label": "确山县",
  22038. "value": "411725"
  22039. }, {
  22040. "label": "泌阳县",
  22041. "value": "411726"
  22042. }, {
  22043. "label": "汝南县",
  22044. "value": "411727"
  22045. }, {
  22046. "label": "遂平县",
  22047. "value": "411728"
  22048. }, {
  22049. "label": "新蔡县",
  22050. "value": "411729"
  22051. }, {
  22052. "label": "河南驻马店经济开发区",
  22053. "value": "411771"
  22054. }], [{
  22055. "label": "济源市",
  22056. "value": "419001"
  22057. }]], [[{
  22058. "label": "江岸区",
  22059. "value": "420102"
  22060. }, {
  22061. "label": "江汉区",
  22062. "value": "420103"
  22063. }, {
  22064. "label": "硚口区",
  22065. "value": "420104"
  22066. }, {
  22067. "label": "汉阳区",
  22068. "value": "420105"
  22069. }, {
  22070. "label": "武昌区",
  22071. "value": "420106"
  22072. }, {
  22073. "label": "青山区",
  22074. "value": "420107"
  22075. }, {
  22076. "label": "洪山区",
  22077. "value": "420111"
  22078. }, {
  22079. "label": "东西湖区",
  22080. "value": "420112"
  22081. }, {
  22082. "label": "汉南区",
  22083. "value": "420113"
  22084. }, {
  22085. "label": "蔡甸区",
  22086. "value": "420114"
  22087. }, {
  22088. "label": "江夏区",
  22089. "value": "420115"
  22090. }, {
  22091. "label": "黄陂区",
  22092. "value": "420116"
  22093. }, {
  22094. "label": "新洲区",
  22095. "value": "420117"
  22096. }], [{
  22097. "label": "黄石港区",
  22098. "value": "420202"
  22099. }, {
  22100. "label": "西塞山区",
  22101. "value": "420203"
  22102. }, {
  22103. "label": "下陆区",
  22104. "value": "420204"
  22105. }, {
  22106. "label": "铁山区",
  22107. "value": "420205"
  22108. }, {
  22109. "label": "阳新县",
  22110. "value": "420222"
  22111. }, {
  22112. "label": "大冶市",
  22113. "value": "420281"
  22114. }], [{
  22115. "label": "茅箭区",
  22116. "value": "420302"
  22117. }, {
  22118. "label": "张湾区",
  22119. "value": "420303"
  22120. }, {
  22121. "label": "郧阳区",
  22122. "value": "420304"
  22123. }, {
  22124. "label": "郧西县",
  22125. "value": "420322"
  22126. }, {
  22127. "label": "竹山县",
  22128. "value": "420323"
  22129. }, {
  22130. "label": "竹溪县",
  22131. "value": "420324"
  22132. }, {
  22133. "label": "房县",
  22134. "value": "420325"
  22135. }, {
  22136. "label": "丹江口市",
  22137. "value": "420381"
  22138. }], [{
  22139. "label": "西陵区",
  22140. "value": "420502"
  22141. }, {
  22142. "label": "伍家岗区",
  22143. "value": "420503"
  22144. }, {
  22145. "label": "点军区",
  22146. "value": "420504"
  22147. }, {
  22148. "label": "猇亭区",
  22149. "value": "420505"
  22150. }, {
  22151. "label": "夷陵区",
  22152. "value": "420506"
  22153. }, {
  22154. "label": "远安县",
  22155. "value": "420525"
  22156. }, {
  22157. "label": "兴山县",
  22158. "value": "420526"
  22159. }, {
  22160. "label": "秭归县",
  22161. "value": "420527"
  22162. }, {
  22163. "label": "长阳土家族自治县",
  22164. "value": "420528"
  22165. }, {
  22166. "label": "五峰土家族自治县",
  22167. "value": "420529"
  22168. }, {
  22169. "label": "宜都市",
  22170. "value": "420581"
  22171. }, {
  22172. "label": "当阳市",
  22173. "value": "420582"
  22174. }, {
  22175. "label": "枝江市",
  22176. "value": "420583"
  22177. }], [{
  22178. "label": "襄城区",
  22179. "value": "420602"
  22180. }, {
  22181. "label": "樊城区",
  22182. "value": "420606"
  22183. }, {
  22184. "label": "襄州区",
  22185. "value": "420607"
  22186. }, {
  22187. "label": "南漳县",
  22188. "value": "420624"
  22189. }, {
  22190. "label": "谷城县",
  22191. "value": "420625"
  22192. }, {
  22193. "label": "保康县",
  22194. "value": "420626"
  22195. }, {
  22196. "label": "老河口市",
  22197. "value": "420682"
  22198. }, {
  22199. "label": "枣阳市",
  22200. "value": "420683"
  22201. }, {
  22202. "label": "宜城市",
  22203. "value": "420684"
  22204. }], [{
  22205. "label": "梁子湖区",
  22206. "value": "420702"
  22207. }, {
  22208. "label": "华容区",
  22209. "value": "420703"
  22210. }, {
  22211. "label": "鄂城区",
  22212. "value": "420704"
  22213. }], [{
  22214. "label": "东宝区",
  22215. "value": "420802"
  22216. }, {
  22217. "label": "掇刀区",
  22218. "value": "420804"
  22219. }, {
  22220. "label": "京山县",
  22221. "value": "420821"
  22222. }, {
  22223. "label": "沙洋县",
  22224. "value": "420822"
  22225. }, {
  22226. "label": "钟祥市",
  22227. "value": "420881"
  22228. }], [{
  22229. "label": "孝南区",
  22230. "value": "420902"
  22231. }, {
  22232. "label": "孝昌县",
  22233. "value": "420921"
  22234. }, {
  22235. "label": "大悟县",
  22236. "value": "420922"
  22237. }, {
  22238. "label": "云梦县",
  22239. "value": "420923"
  22240. }, {
  22241. "label": "应城市",
  22242. "value": "420981"
  22243. }, {
  22244. "label": "安陆市",
  22245. "value": "420982"
  22246. }, {
  22247. "label": "汉川市",
  22248. "value": "420984"
  22249. }], [{
  22250. "label": "沙市区",
  22251. "value": "421002"
  22252. }, {
  22253. "label": "荆州区",
  22254. "value": "421003"
  22255. }, {
  22256. "label": "公安县",
  22257. "value": "421022"
  22258. }, {
  22259. "label": "监利县",
  22260. "value": "421023"
  22261. }, {
  22262. "label": "江陵县",
  22263. "value": "421024"
  22264. }, {
  22265. "label": "荆州经济技术开发区",
  22266. "value": "421071"
  22267. }, {
  22268. "label": "石首市",
  22269. "value": "421081"
  22270. }, {
  22271. "label": "洪湖市",
  22272. "value": "421083"
  22273. }, {
  22274. "label": "松滋市",
  22275. "value": "421087"
  22276. }], [{
  22277. "label": "黄州区",
  22278. "value": "421102"
  22279. }, {
  22280. "label": "团风县",
  22281. "value": "421121"
  22282. }, {
  22283. "label": "红安县",
  22284. "value": "421122"
  22285. }, {
  22286. "label": "罗田县",
  22287. "value": "421123"
  22288. }, {
  22289. "label": "英山县",
  22290. "value": "421124"
  22291. }, {
  22292. "label": "浠水县",
  22293. "value": "421125"
  22294. }, {
  22295. "label": "蕲春县",
  22296. "value": "421126"
  22297. }, {
  22298. "label": "黄梅县",
  22299. "value": "421127"
  22300. }, {
  22301. "label": "龙感湖管理区",
  22302. "value": "421171"
  22303. }, {
  22304. "label": "麻城市",
  22305. "value": "421181"
  22306. }, {
  22307. "label": "武穴市",
  22308. "value": "421182"
  22309. }], [{
  22310. "label": "咸安区",
  22311. "value": "421202"
  22312. }, {
  22313. "label": "嘉鱼县",
  22314. "value": "421221"
  22315. }, {
  22316. "label": "通城县",
  22317. "value": "421222"
  22318. }, {
  22319. "label": "崇阳县",
  22320. "value": "421223"
  22321. }, {
  22322. "label": "通山县",
  22323. "value": "421224"
  22324. }, {
  22325. "label": "赤壁市",
  22326. "value": "421281"
  22327. }], [{
  22328. "label": "曾都区",
  22329. "value": "421303"
  22330. }, {
  22331. "label": "随县",
  22332. "value": "421321"
  22333. }, {
  22334. "label": "广水市",
  22335. "value": "421381"
  22336. }], [{
  22337. "label": "恩施市",
  22338. "value": "422801"
  22339. }, {
  22340. "label": "利川市",
  22341. "value": "422802"
  22342. }, {
  22343. "label": "建始县",
  22344. "value": "422822"
  22345. }, {
  22346. "label": "巴东县",
  22347. "value": "422823"
  22348. }, {
  22349. "label": "宣恩县",
  22350. "value": "422825"
  22351. }, {
  22352. "label": "咸丰县",
  22353. "value": "422826"
  22354. }, {
  22355. "label": "来凤县",
  22356. "value": "422827"
  22357. }, {
  22358. "label": "鹤峰县",
  22359. "value": "422828"
  22360. }], [{
  22361. "label": "仙桃市",
  22362. "value": "429004"
  22363. }, {
  22364. "label": "潜江市",
  22365. "value": "429005"
  22366. }, {
  22367. "label": "天门市",
  22368. "value": "429006"
  22369. }, {
  22370. "label": "神农架林区",
  22371. "value": "429021"
  22372. }]], [[{
  22373. "label": "芙蓉区",
  22374. "value": "430102"
  22375. }, {
  22376. "label": "天心区",
  22377. "value": "430103"
  22378. }, {
  22379. "label": "岳麓区",
  22380. "value": "430104"
  22381. }, {
  22382. "label": "开福区",
  22383. "value": "430105"
  22384. }, {
  22385. "label": "雨花区",
  22386. "value": "430111"
  22387. }, {
  22388. "label": "望城区",
  22389. "value": "430112"
  22390. }, {
  22391. "label": "长沙县",
  22392. "value": "430121"
  22393. }, {
  22394. "label": "浏阳市",
  22395. "value": "430181"
  22396. }, {
  22397. "label": "宁乡市",
  22398. "value": "430182"
  22399. }], [{
  22400. "label": "荷塘区",
  22401. "value": "430202"
  22402. }, {
  22403. "label": "芦淞区",
  22404. "value": "430203"
  22405. }, {
  22406. "label": "石峰区",
  22407. "value": "430204"
  22408. }, {
  22409. "label": "天元区",
  22410. "value": "430211"
  22411. }, {
  22412. "label": "株洲县",
  22413. "value": "430221"
  22414. }, {
  22415. "label": "攸县",
  22416. "value": "430223"
  22417. }, {
  22418. "label": "茶陵县",
  22419. "value": "430224"
  22420. }, {
  22421. "label": "炎陵县",
  22422. "value": "430225"
  22423. }, {
  22424. "label": "云龙示范区",
  22425. "value": "430271"
  22426. }, {
  22427. "label": "醴陵市",
  22428. "value": "430281"
  22429. }], [{
  22430. "label": "雨湖区",
  22431. "value": "430302"
  22432. }, {
  22433. "label": "岳塘区",
  22434. "value": "430304"
  22435. }, {
  22436. "label": "湘潭县",
  22437. "value": "430321"
  22438. }, {
  22439. "label": "湖南湘潭高新技术产业园区",
  22440. "value": "430371"
  22441. }, {
  22442. "label": "湘潭昭山示范区",
  22443. "value": "430372"
  22444. }, {
  22445. "label": "湘潭九华示范区",
  22446. "value": "430373"
  22447. }, {
  22448. "label": "湘乡市",
  22449. "value": "430381"
  22450. }, {
  22451. "label": "韶山市",
  22452. "value": "430382"
  22453. }], [{
  22454. "label": "珠晖区",
  22455. "value": "430405"
  22456. }, {
  22457. "label": "雁峰区",
  22458. "value": "430406"
  22459. }, {
  22460. "label": "石鼓区",
  22461. "value": "430407"
  22462. }, {
  22463. "label": "蒸湘区",
  22464. "value": "430408"
  22465. }, {
  22466. "label": "南岳区",
  22467. "value": "430412"
  22468. }, {
  22469. "label": "衡阳县",
  22470. "value": "430421"
  22471. }, {
  22472. "label": "衡南县",
  22473. "value": "430422"
  22474. }, {
  22475. "label": "衡山县",
  22476. "value": "430423"
  22477. }, {
  22478. "label": "衡东县",
  22479. "value": "430424"
  22480. }, {
  22481. "label": "祁东县",
  22482. "value": "430426"
  22483. }, {
  22484. "label": "衡阳综合保税区",
  22485. "value": "430471"
  22486. }, {
  22487. "label": "湖南衡阳高新技术产业园区",
  22488. "value": "430472"
  22489. }, {
  22490. "label": "湖南衡阳松木经济开发区",
  22491. "value": "430473"
  22492. }, {
  22493. "label": "耒阳市",
  22494. "value": "430481"
  22495. }, {
  22496. "label": "常宁市",
  22497. "value": "430482"
  22498. }], [{
  22499. "label": "双清区",
  22500. "value": "430502"
  22501. }, {
  22502. "label": "大祥区",
  22503. "value": "430503"
  22504. }, {
  22505. "label": "北塔区",
  22506. "value": "430511"
  22507. }, {
  22508. "label": "邵东县",
  22509. "value": "430521"
  22510. }, {
  22511. "label": "新邵县",
  22512. "value": "430522"
  22513. }, {
  22514. "label": "邵阳县",
  22515. "value": "430523"
  22516. }, {
  22517. "label": "隆回县",
  22518. "value": "430524"
  22519. }, {
  22520. "label": "洞口县",
  22521. "value": "430525"
  22522. }, {
  22523. "label": "绥宁县",
  22524. "value": "430527"
  22525. }, {
  22526. "label": "新宁县",
  22527. "value": "430528"
  22528. }, {
  22529. "label": "城步苗族自治县",
  22530. "value": "430529"
  22531. }, {
  22532. "label": "武冈市",
  22533. "value": "430581"
  22534. }], [{
  22535. "label": "岳阳楼区",
  22536. "value": "430602"
  22537. }, {
  22538. "label": "云溪区",
  22539. "value": "430603"
  22540. }, {
  22541. "label": "君山区",
  22542. "value": "430611"
  22543. }, {
  22544. "label": "岳阳县",
  22545. "value": "430621"
  22546. }, {
  22547. "label": "华容县",
  22548. "value": "430623"
  22549. }, {
  22550. "label": "湘阴县",
  22551. "value": "430624"
  22552. }, {
  22553. "label": "平江县",
  22554. "value": "430626"
  22555. }, {
  22556. "label": "岳阳市屈原管理区",
  22557. "value": "430671"
  22558. }, {
  22559. "label": "汨罗市",
  22560. "value": "430681"
  22561. }, {
  22562. "label": "临湘市",
  22563. "value": "430682"
  22564. }], [{
  22565. "label": "武陵区",
  22566. "value": "430702"
  22567. }, {
  22568. "label": "鼎城区",
  22569. "value": "430703"
  22570. }, {
  22571. "label": "安乡县",
  22572. "value": "430721"
  22573. }, {
  22574. "label": "汉寿县",
  22575. "value": "430722"
  22576. }, {
  22577. "label": "澧县",
  22578. "value": "430723"
  22579. }, {
  22580. "label": "临澧县",
  22581. "value": "430724"
  22582. }, {
  22583. "label": "桃源县",
  22584. "value": "430725"
  22585. }, {
  22586. "label": "石门县",
  22587. "value": "430726"
  22588. }, {
  22589. "label": "常德市西洞庭管理区",
  22590. "value": "430771"
  22591. }, {
  22592. "label": "津市市",
  22593. "value": "430781"
  22594. }], [{
  22595. "label": "永定区",
  22596. "value": "430802"
  22597. }, {
  22598. "label": "武陵源区",
  22599. "value": "430811"
  22600. }, {
  22601. "label": "慈利县",
  22602. "value": "430821"
  22603. }, {
  22604. "label": "桑植县",
  22605. "value": "430822"
  22606. }], [{
  22607. "label": "资阳区",
  22608. "value": "430902"
  22609. }, {
  22610. "label": "赫山区",
  22611. "value": "430903"
  22612. }, {
  22613. "label": "南县",
  22614. "value": "430921"
  22615. }, {
  22616. "label": "桃江县",
  22617. "value": "430922"
  22618. }, {
  22619. "label": "安化县",
  22620. "value": "430923"
  22621. }, {
  22622. "label": "益阳市大通湖管理区",
  22623. "value": "430971"
  22624. }, {
  22625. "label": "湖南益阳高新技术产业园区",
  22626. "value": "430972"
  22627. }, {
  22628. "label": "沅江市",
  22629. "value": "430981"
  22630. }], [{
  22631. "label": "北湖区",
  22632. "value": "431002"
  22633. }, {
  22634. "label": "苏仙区",
  22635. "value": "431003"
  22636. }, {
  22637. "label": "桂阳县",
  22638. "value": "431021"
  22639. }, {
  22640. "label": "宜章县",
  22641. "value": "431022"
  22642. }, {
  22643. "label": "永兴县",
  22644. "value": "431023"
  22645. }, {
  22646. "label": "嘉禾县",
  22647. "value": "431024"
  22648. }, {
  22649. "label": "临武县",
  22650. "value": "431025"
  22651. }, {
  22652. "label": "汝城县",
  22653. "value": "431026"
  22654. }, {
  22655. "label": "桂东县",
  22656. "value": "431027"
  22657. }, {
  22658. "label": "安仁县",
  22659. "value": "431028"
  22660. }, {
  22661. "label": "资兴市",
  22662. "value": "431081"
  22663. }], [{
  22664. "label": "零陵区",
  22665. "value": "431102"
  22666. }, {
  22667. "label": "冷水滩区",
  22668. "value": "431103"
  22669. }, {
  22670. "label": "祁阳县",
  22671. "value": "431121"
  22672. }, {
  22673. "label": "东安县",
  22674. "value": "431122"
  22675. }, {
  22676. "label": "双牌县",
  22677. "value": "431123"
  22678. }, {
  22679. "label": "道县",
  22680. "value": "431124"
  22681. }, {
  22682. "label": "江永县",
  22683. "value": "431125"
  22684. }, {
  22685. "label": "宁远县",
  22686. "value": "431126"
  22687. }, {
  22688. "label": "蓝山县",
  22689. "value": "431127"
  22690. }, {
  22691. "label": "新田县",
  22692. "value": "431128"
  22693. }, {
  22694. "label": "江华瑶族自治县",
  22695. "value": "431129"
  22696. }, {
  22697. "label": "永州经济技术开发区",
  22698. "value": "431171"
  22699. }, {
  22700. "label": "永州市金洞管理区",
  22701. "value": "431172"
  22702. }, {
  22703. "label": "永州市回龙圩管理区",
  22704. "value": "431173"
  22705. }], [{
  22706. "label": "鹤城区",
  22707. "value": "431202"
  22708. }, {
  22709. "label": "中方县",
  22710. "value": "431221"
  22711. }, {
  22712. "label": "沅陵县",
  22713. "value": "431222"
  22714. }, {
  22715. "label": "辰溪县",
  22716. "value": "431223"
  22717. }, {
  22718. "label": "溆浦县",
  22719. "value": "431224"
  22720. }, {
  22721. "label": "会同县",
  22722. "value": "431225"
  22723. }, {
  22724. "label": "麻阳苗族自治县",
  22725. "value": "431226"
  22726. }, {
  22727. "label": "新晃侗族自治县",
  22728. "value": "431227"
  22729. }, {
  22730. "label": "芷江侗族自治县",
  22731. "value": "431228"
  22732. }, {
  22733. "label": "靖州苗族侗族自治县",
  22734. "value": "431229"
  22735. }, {
  22736. "label": "通道侗族自治县",
  22737. "value": "431230"
  22738. }, {
  22739. "label": "怀化市洪江管理区",
  22740. "value": "431271"
  22741. }, {
  22742. "label": "洪江市",
  22743. "value": "431281"
  22744. }], [{
  22745. "label": "娄星区",
  22746. "value": "431302"
  22747. }, {
  22748. "label": "双峰县",
  22749. "value": "431321"
  22750. }, {
  22751. "label": "新化县",
  22752. "value": "431322"
  22753. }, {
  22754. "label": "冷水江市",
  22755. "value": "431381"
  22756. }, {
  22757. "label": "涟源市",
  22758. "value": "431382"
  22759. }], [{
  22760. "label": "吉首市",
  22761. "value": "433101"
  22762. }, {
  22763. "label": "泸溪县",
  22764. "value": "433122"
  22765. }, {
  22766. "label": "凤凰县",
  22767. "value": "433123"
  22768. }, {
  22769. "label": "花垣县",
  22770. "value": "433124"
  22771. }, {
  22772. "label": "保靖县",
  22773. "value": "433125"
  22774. }, {
  22775. "label": "古丈县",
  22776. "value": "433126"
  22777. }, {
  22778. "label": "永顺县",
  22779. "value": "433127"
  22780. }, {
  22781. "label": "龙山县",
  22782. "value": "433130"
  22783. }, {
  22784. "label": "湖南吉首经济开发区",
  22785. "value": "433172"
  22786. }, {
  22787. "label": "湖南永顺经济开发区",
  22788. "value": "433173"
  22789. }]], [[{
  22790. "label": "荔湾区",
  22791. "value": "440103"
  22792. }, {
  22793. "label": "越秀区",
  22794. "value": "440104"
  22795. }, {
  22796. "label": "海珠区",
  22797. "value": "440105"
  22798. }, {
  22799. "label": "天河区",
  22800. "value": "440106"
  22801. }, {
  22802. "label": "白云区",
  22803. "value": "440111"
  22804. }, {
  22805. "label": "黄埔区",
  22806. "value": "440112"
  22807. }, {
  22808. "label": "番禺区",
  22809. "value": "440113"
  22810. }, {
  22811. "label": "花都区",
  22812. "value": "440114"
  22813. }, {
  22814. "label": "南沙区",
  22815. "value": "440115"
  22816. }, {
  22817. "label": "从化区",
  22818. "value": "440117"
  22819. }, {
  22820. "label": "增城区",
  22821. "value": "440118"
  22822. }], [{
  22823. "label": "武江区",
  22824. "value": "440203"
  22825. }, {
  22826. "label": "浈江区",
  22827. "value": "440204"
  22828. }, {
  22829. "label": "曲江区",
  22830. "value": "440205"
  22831. }, {
  22832. "label": "始兴县",
  22833. "value": "440222"
  22834. }, {
  22835. "label": "仁化县",
  22836. "value": "440224"
  22837. }, {
  22838. "label": "翁源县",
  22839. "value": "440229"
  22840. }, {
  22841. "label": "乳源瑶族自治县",
  22842. "value": "440232"
  22843. }, {
  22844. "label": "新丰县",
  22845. "value": "440233"
  22846. }, {
  22847. "label": "乐昌市",
  22848. "value": "440281"
  22849. }, {
  22850. "label": "南雄市",
  22851. "value": "440282"
  22852. }], [{
  22853. "label": "罗湖区",
  22854. "value": "440303"
  22855. }, {
  22856. "label": "福田区",
  22857. "value": "440304"
  22858. }, {
  22859. "label": "南山区",
  22860. "value": "440305"
  22861. }, {
  22862. "label": "宝安区",
  22863. "value": "440306"
  22864. }, {
  22865. "label": "龙岗区",
  22866. "value": "440307"
  22867. }, {
  22868. "label": "盐田区",
  22869. "value": "440308"
  22870. }, {
  22871. "label": "龙华区",
  22872. "value": "440309"
  22873. }, {
  22874. "label": "坪山区",
  22875. "value": "440310"
  22876. }], [{
  22877. "label": "香洲区",
  22878. "value": "440402"
  22879. }, {
  22880. "label": "斗门区",
  22881. "value": "440403"
  22882. }, {
  22883. "label": "金湾区",
  22884. "value": "440404"
  22885. }], [{
  22886. "label": "龙湖区",
  22887. "value": "440507"
  22888. }, {
  22889. "label": "金平区",
  22890. "value": "440511"
  22891. }, {
  22892. "label": "濠江区",
  22893. "value": "440512"
  22894. }, {
  22895. "label": "潮阳区",
  22896. "value": "440513"
  22897. }, {
  22898. "label": "潮南区",
  22899. "value": "440514"
  22900. }, {
  22901. "label": "澄海区",
  22902. "value": "440515"
  22903. }, {
  22904. "label": "南澳县",
  22905. "value": "440523"
  22906. }], [{
  22907. "label": "禅城区",
  22908. "value": "440604"
  22909. }, {
  22910. "label": "南海区",
  22911. "value": "440605"
  22912. }, {
  22913. "label": "顺德区",
  22914. "value": "440606"
  22915. }, {
  22916. "label": "三水区",
  22917. "value": "440607"
  22918. }, {
  22919. "label": "高明区",
  22920. "value": "440608"
  22921. }], [{
  22922. "label": "蓬江区",
  22923. "value": "440703"
  22924. }, {
  22925. "label": "江海区",
  22926. "value": "440704"
  22927. }, {
  22928. "label": "新会区",
  22929. "value": "440705"
  22930. }, {
  22931. "label": "台山市",
  22932. "value": "440781"
  22933. }, {
  22934. "label": "开平市",
  22935. "value": "440783"
  22936. }, {
  22937. "label": "鹤山市",
  22938. "value": "440784"
  22939. }, {
  22940. "label": "恩平市",
  22941. "value": "440785"
  22942. }], [{
  22943. "label": "赤坎区",
  22944. "value": "440802"
  22945. }, {
  22946. "label": "霞山区",
  22947. "value": "440803"
  22948. }, {
  22949. "label": "坡头区",
  22950. "value": "440804"
  22951. }, {
  22952. "label": "麻章区",
  22953. "value": "440811"
  22954. }, {
  22955. "label": "遂溪县",
  22956. "value": "440823"
  22957. }, {
  22958. "label": "徐闻县",
  22959. "value": "440825"
  22960. }, {
  22961. "label": "廉江市",
  22962. "value": "440881"
  22963. }, {
  22964. "label": "雷州市",
  22965. "value": "440882"
  22966. }, {
  22967. "label": "吴川市",
  22968. "value": "440883"
  22969. }], [{
  22970. "label": "茂南区",
  22971. "value": "440902"
  22972. }, {
  22973. "label": "电白区",
  22974. "value": "440904"
  22975. }, {
  22976. "label": "高州市",
  22977. "value": "440981"
  22978. }, {
  22979. "label": "化州市",
  22980. "value": "440982"
  22981. }, {
  22982. "label": "信宜市",
  22983. "value": "440983"
  22984. }], [{
  22985. "label": "端州区",
  22986. "value": "441202"
  22987. }, {
  22988. "label": "鼎湖区",
  22989. "value": "441203"
  22990. }, {
  22991. "label": "高要区",
  22992. "value": "441204"
  22993. }, {
  22994. "label": "广宁县",
  22995. "value": "441223"
  22996. }, {
  22997. "label": "怀集县",
  22998. "value": "441224"
  22999. }, {
  23000. "label": "封开县",
  23001. "value": "441225"
  23002. }, {
  23003. "label": "德庆县",
  23004. "value": "441226"
  23005. }, {
  23006. "label": "四会市",
  23007. "value": "441284"
  23008. }], [{
  23009. "label": "惠城区",
  23010. "value": "441302"
  23011. }, {
  23012. "label": "惠阳区",
  23013. "value": "441303"
  23014. }, {
  23015. "label": "博罗县",
  23016. "value": "441322"
  23017. }, {
  23018. "label": "惠东县",
  23019. "value": "441323"
  23020. }, {
  23021. "label": "龙门县",
  23022. "value": "441324"
  23023. }], [{
  23024. "label": "梅江区",
  23025. "value": "441402"
  23026. }, {
  23027. "label": "梅县区",
  23028. "value": "441403"
  23029. }, {
  23030. "label": "大埔县",
  23031. "value": "441422"
  23032. }, {
  23033. "label": "丰顺县",
  23034. "value": "441423"
  23035. }, {
  23036. "label": "五华县",
  23037. "value": "441424"
  23038. }, {
  23039. "label": "平远县",
  23040. "value": "441426"
  23041. }, {
  23042. "label": "蕉岭县",
  23043. "value": "441427"
  23044. }, {
  23045. "label": "兴宁市",
  23046. "value": "441481"
  23047. }], [{
  23048. "label": "城区",
  23049. "value": "441502"
  23050. }, {
  23051. "label": "海丰县",
  23052. "value": "441521"
  23053. }, {
  23054. "label": "陆河县",
  23055. "value": "441523"
  23056. }, {
  23057. "label": "陆丰市",
  23058. "value": "441581"
  23059. }], [{
  23060. "label": "源城区",
  23061. "value": "441602"
  23062. }, {
  23063. "label": "紫金县",
  23064. "value": "441621"
  23065. }, {
  23066. "label": "龙川县",
  23067. "value": "441622"
  23068. }, {
  23069. "label": "连平县",
  23070. "value": "441623"
  23071. }, {
  23072. "label": "和平县",
  23073. "value": "441624"
  23074. }, {
  23075. "label": "东源县",
  23076. "value": "441625"
  23077. }], [{
  23078. "label": "江城区",
  23079. "value": "441702"
  23080. }, {
  23081. "label": "阳东区",
  23082. "value": "441704"
  23083. }, {
  23084. "label": "阳西县",
  23085. "value": "441721"
  23086. }, {
  23087. "label": "阳春市",
  23088. "value": "441781"
  23089. }], [{
  23090. "label": "清城区",
  23091. "value": "441802"
  23092. }, {
  23093. "label": "清新区",
  23094. "value": "441803"
  23095. }, {
  23096. "label": "佛冈县",
  23097. "value": "441821"
  23098. }, {
  23099. "label": "阳山县",
  23100. "value": "441823"
  23101. }, {
  23102. "label": "连山壮族瑶族自治县",
  23103. "value": "441825"
  23104. }, {
  23105. "label": "连南瑶族自治县",
  23106. "value": "441826"
  23107. }, {
  23108. "label": "英德市",
  23109. "value": "441881"
  23110. }, {
  23111. "label": "连州市",
  23112. "value": "441882"
  23113. }], [{
  23114. "label": "东莞市",
  23115. "value": "441900"
  23116. }], [{
  23117. "label": "中山市",
  23118. "value": "442000"
  23119. }], [{
  23120. "label": "湘桥区",
  23121. "value": "445102"
  23122. }, {
  23123. "label": "潮安区",
  23124. "value": "445103"
  23125. }, {
  23126. "label": "饶平县",
  23127. "value": "445122"
  23128. }], [{
  23129. "label": "榕城区",
  23130. "value": "445202"
  23131. }, {
  23132. "label": "揭东区",
  23133. "value": "445203"
  23134. }, {
  23135. "label": "揭西县",
  23136. "value": "445222"
  23137. }, {
  23138. "label": "惠来县",
  23139. "value": "445224"
  23140. }, {
  23141. "label": "普宁市",
  23142. "value": "445281"
  23143. }], [{
  23144. "label": "云城区",
  23145. "value": "445302"
  23146. }, {
  23147. "label": "云安区",
  23148. "value": "445303"
  23149. }, {
  23150. "label": "新兴县",
  23151. "value": "445321"
  23152. }, {
  23153. "label": "郁南县",
  23154. "value": "445322"
  23155. }, {
  23156. "label": "罗定市",
  23157. "value": "445381"
  23158. }]], [[{
  23159. "label": "兴宁区",
  23160. "value": "450102"
  23161. }, {
  23162. "label": "青秀区",
  23163. "value": "450103"
  23164. }, {
  23165. "label": "江南区",
  23166. "value": "450105"
  23167. }, {
  23168. "label": "西乡塘区",
  23169. "value": "450107"
  23170. }, {
  23171. "label": "良庆区",
  23172. "value": "450108"
  23173. }, {
  23174. "label": "邕宁区",
  23175. "value": "450109"
  23176. }, {
  23177. "label": "武鸣区",
  23178. "value": "450110"
  23179. }, {
  23180. "label": "隆安县",
  23181. "value": "450123"
  23182. }, {
  23183. "label": "马山县",
  23184. "value": "450124"
  23185. }, {
  23186. "label": "上林县",
  23187. "value": "450125"
  23188. }, {
  23189. "label": "宾阳县",
  23190. "value": "450126"
  23191. }, {
  23192. "label": "横县",
  23193. "value": "450127"
  23194. }], [{
  23195. "label": "城中区",
  23196. "value": "450202"
  23197. }, {
  23198. "label": "鱼峰区",
  23199. "value": "450203"
  23200. }, {
  23201. "label": "柳南区",
  23202. "value": "450204"
  23203. }, {
  23204. "label": "柳北区",
  23205. "value": "450205"
  23206. }, {
  23207. "label": "柳江区",
  23208. "value": "450206"
  23209. }, {
  23210. "label": "柳城县",
  23211. "value": "450222"
  23212. }, {
  23213. "label": "鹿寨县",
  23214. "value": "450223"
  23215. }, {
  23216. "label": "融安县",
  23217. "value": "450224"
  23218. }, {
  23219. "label": "融水苗族自治县",
  23220. "value": "450225"
  23221. }, {
  23222. "label": "三江侗族自治县",
  23223. "value": "450226"
  23224. }], [{
  23225. "label": "秀峰区",
  23226. "value": "450302"
  23227. }, {
  23228. "label": "叠彩区",
  23229. "value": "450303"
  23230. }, {
  23231. "label": "象山区",
  23232. "value": "450304"
  23233. }, {
  23234. "label": "七星区",
  23235. "value": "450305"
  23236. }, {
  23237. "label": "雁山区",
  23238. "value": "450311"
  23239. }, {
  23240. "label": "临桂区",
  23241. "value": "450312"
  23242. }, {
  23243. "label": "阳朔县",
  23244. "value": "450321"
  23245. }, {
  23246. "label": "灵川县",
  23247. "value": "450323"
  23248. }, {
  23249. "label": "全州县",
  23250. "value": "450324"
  23251. }, {
  23252. "label": "兴安县",
  23253. "value": "450325"
  23254. }, {
  23255. "label": "永福县",
  23256. "value": "450326"
  23257. }, {
  23258. "label": "灌阳县",
  23259. "value": "450327"
  23260. }, {
  23261. "label": "龙胜各族自治县",
  23262. "value": "450328"
  23263. }, {
  23264. "label": "资源县",
  23265. "value": "450329"
  23266. }, {
  23267. "label": "平乐县",
  23268. "value": "450330"
  23269. }, {
  23270. "label": "荔浦县",
  23271. "value": "450331"
  23272. }, {
  23273. "label": "恭城瑶族自治县",
  23274. "value": "450332"
  23275. }], [{
  23276. "label": "万秀区",
  23277. "value": "450403"
  23278. }, {
  23279. "label": "长洲区",
  23280. "value": "450405"
  23281. }, {
  23282. "label": "龙圩区",
  23283. "value": "450406"
  23284. }, {
  23285. "label": "苍梧县",
  23286. "value": "450421"
  23287. }, {
  23288. "label": "藤县",
  23289. "value": "450422"
  23290. }, {
  23291. "label": "蒙山县",
  23292. "value": "450423"
  23293. }, {
  23294. "label": "岑溪市",
  23295. "value": "450481"
  23296. }], [{
  23297. "label": "海城区",
  23298. "value": "450502"
  23299. }, {
  23300. "label": "银海区",
  23301. "value": "450503"
  23302. }, {
  23303. "label": "铁山港区",
  23304. "value": "450512"
  23305. }, {
  23306. "label": "合浦县",
  23307. "value": "450521"
  23308. }], [{
  23309. "label": "港口区",
  23310. "value": "450602"
  23311. }, {
  23312. "label": "防城区",
  23313. "value": "450603"
  23314. }, {
  23315. "label": "上思县",
  23316. "value": "450621"
  23317. }, {
  23318. "label": "东兴市",
  23319. "value": "450681"
  23320. }], [{
  23321. "label": "钦南区",
  23322. "value": "450702"
  23323. }, {
  23324. "label": "钦北区",
  23325. "value": "450703"
  23326. }, {
  23327. "label": "灵山县",
  23328. "value": "450721"
  23329. }, {
  23330. "label": "浦北县",
  23331. "value": "450722"
  23332. }], [{
  23333. "label": "港北区",
  23334. "value": "450802"
  23335. }, {
  23336. "label": "港南区",
  23337. "value": "450803"
  23338. }, {
  23339. "label": "覃塘区",
  23340. "value": "450804"
  23341. }, {
  23342. "label": "平南县",
  23343. "value": "450821"
  23344. }, {
  23345. "label": "桂平市",
  23346. "value": "450881"
  23347. }], [{
  23348. "label": "玉州区",
  23349. "value": "450902"
  23350. }, {
  23351. "label": "福绵区",
  23352. "value": "450903"
  23353. }, {
  23354. "label": "容县",
  23355. "value": "450921"
  23356. }, {
  23357. "label": "陆川县",
  23358. "value": "450922"
  23359. }, {
  23360. "label": "博白县",
  23361. "value": "450923"
  23362. }, {
  23363. "label": "兴业县",
  23364. "value": "450924"
  23365. }, {
  23366. "label": "北流市",
  23367. "value": "450981"
  23368. }], [{
  23369. "label": "右江区",
  23370. "value": "451002"
  23371. }, {
  23372. "label": "田阳县",
  23373. "value": "451021"
  23374. }, {
  23375. "label": "田东县",
  23376. "value": "451022"
  23377. }, {
  23378. "label": "平果县",
  23379. "value": "451023"
  23380. }, {
  23381. "label": "德保县",
  23382. "value": "451024"
  23383. }, {
  23384. "label": "那坡县",
  23385. "value": "451026"
  23386. }, {
  23387. "label": "凌云县",
  23388. "value": "451027"
  23389. }, {
  23390. "label": "乐业县",
  23391. "value": "451028"
  23392. }, {
  23393. "label": "田林县",
  23394. "value": "451029"
  23395. }, {
  23396. "label": "西林县",
  23397. "value": "451030"
  23398. }, {
  23399. "label": "隆林各族自治县",
  23400. "value": "451031"
  23401. }, {
  23402. "label": "靖西市",
  23403. "value": "451081"
  23404. }], [{
  23405. "label": "八步区",
  23406. "value": "451102"
  23407. }, {
  23408. "label": "平桂区",
  23409. "value": "451103"
  23410. }, {
  23411. "label": "昭平县",
  23412. "value": "451121"
  23413. }, {
  23414. "label": "钟山县",
  23415. "value": "451122"
  23416. }, {
  23417. "label": "富川瑶族自治县",
  23418. "value": "451123"
  23419. }], [{
  23420. "label": "金城江区",
  23421. "value": "451202"
  23422. }, {
  23423. "label": "宜州区",
  23424. "value": "451203"
  23425. }, {
  23426. "label": "南丹县",
  23427. "value": "451221"
  23428. }, {
  23429. "label": "天峨县",
  23430. "value": "451222"
  23431. }, {
  23432. "label": "凤山县",
  23433. "value": "451223"
  23434. }, {
  23435. "label": "东兰县",
  23436. "value": "451224"
  23437. }, {
  23438. "label": "罗城仫佬族自治县",
  23439. "value": "451225"
  23440. }, {
  23441. "label": "环江毛南族自治县",
  23442. "value": "451226"
  23443. }, {
  23444. "label": "巴马瑶族自治县",
  23445. "value": "451227"
  23446. }, {
  23447. "label": "都安瑶族自治县",
  23448. "value": "451228"
  23449. }, {
  23450. "label": "大化瑶族自治县",
  23451. "value": "451229"
  23452. }], [{
  23453. "label": "兴宾区",
  23454. "value": "451302"
  23455. }, {
  23456. "label": "忻城县",
  23457. "value": "451321"
  23458. }, {
  23459. "label": "象州县",
  23460. "value": "451322"
  23461. }, {
  23462. "label": "武宣县",
  23463. "value": "451323"
  23464. }, {
  23465. "label": "金秀瑶族自治县",
  23466. "value": "451324"
  23467. }, {
  23468. "label": "合山市",
  23469. "value": "451381"
  23470. }], [{
  23471. "label": "江州区",
  23472. "value": "451402"
  23473. }, {
  23474. "label": "扶绥县",
  23475. "value": "451421"
  23476. }, {
  23477. "label": "宁明县",
  23478. "value": "451422"
  23479. }, {
  23480. "label": "龙州县",
  23481. "value": "451423"
  23482. }, {
  23483. "label": "大新县",
  23484. "value": "451424"
  23485. }, {
  23486. "label": "天等县",
  23487. "value": "451425"
  23488. }, {
  23489. "label": "凭祥市",
  23490. "value": "451481"
  23491. }]], [[{
  23492. "label": "秀英区",
  23493. "value": "460105"
  23494. }, {
  23495. "label": "龙华区",
  23496. "value": "460106"
  23497. }, {
  23498. "label": "琼山区",
  23499. "value": "460107"
  23500. }, {
  23501. "label": "美兰区",
  23502. "value": "460108"
  23503. }], [{
  23504. "label": "海棠区",
  23505. "value": "460202"
  23506. }, {
  23507. "label": "吉阳区",
  23508. "value": "460203"
  23509. }, {
  23510. "label": "天涯区",
  23511. "value": "460204"
  23512. }, {
  23513. "label": "崖州区",
  23514. "value": "460205"
  23515. }], [{
  23516. "label": "西沙群岛",
  23517. "value": "460321"
  23518. }, {
  23519. "label": "南沙群岛",
  23520. "value": "460322"
  23521. }, {
  23522. "label": "中沙群岛的岛礁及其海域",
  23523. "value": "460323"
  23524. }], [{
  23525. "label": "儋州市",
  23526. "value": "460400"
  23527. }], [{
  23528. "label": "五指山市",
  23529. "value": "469001"
  23530. }, {
  23531. "label": "琼海市",
  23532. "value": "469002"
  23533. }, {
  23534. "label": "文昌市",
  23535. "value": "469005"
  23536. }, {
  23537. "label": "万宁市",
  23538. "value": "469006"
  23539. }, {
  23540. "label": "东方市",
  23541. "value": "469007"
  23542. }, {
  23543. "label": "定安县",
  23544. "value": "469021"
  23545. }, {
  23546. "label": "屯昌县",
  23547. "value": "469022"
  23548. }, {
  23549. "label": "澄迈县",
  23550. "value": "469023"
  23551. }, {
  23552. "label": "临高县",
  23553. "value": "469024"
  23554. }, {
  23555. "label": "白沙黎族自治县",
  23556. "value": "469025"
  23557. }, {
  23558. "label": "昌江黎族自治县",
  23559. "value": "469026"
  23560. }, {
  23561. "label": "乐东黎族自治县",
  23562. "value": "469027"
  23563. }, {
  23564. "label": "陵水黎族自治县",
  23565. "value": "469028"
  23566. }, {
  23567. "label": "保亭黎族苗族自治县",
  23568. "value": "469029"
  23569. }, {
  23570. "label": "琼中黎族苗族自治县",
  23571. "value": "469030"
  23572. }]], [[{
  23573. "label": "万州区",
  23574. "value": "500101"
  23575. }, {
  23576. "label": "涪陵区",
  23577. "value": "500102"
  23578. }, {
  23579. "label": "渝中区",
  23580. "value": "500103"
  23581. }, {
  23582. "label": "大渡口区",
  23583. "value": "500104"
  23584. }, {
  23585. "label": "江北区",
  23586. "value": "500105"
  23587. }, {
  23588. "label": "沙坪坝区",
  23589. "value": "500106"
  23590. }, {
  23591. "label": "九龙坡区",
  23592. "value": "500107"
  23593. }, {
  23594. "label": "南岸区",
  23595. "value": "500108"
  23596. }, {
  23597. "label": "北碚区",
  23598. "value": "500109"
  23599. }, {
  23600. "label": "綦江区",
  23601. "value": "500110"
  23602. }, {
  23603. "label": "大足区",
  23604. "value": "500111"
  23605. }, {
  23606. "label": "渝北区",
  23607. "value": "500112"
  23608. }, {
  23609. "label": "巴南区",
  23610. "value": "500113"
  23611. }, {
  23612. "label": "黔江区",
  23613. "value": "500114"
  23614. }, {
  23615. "label": "长寿区",
  23616. "value": "500115"
  23617. }, {
  23618. "label": "江津区",
  23619. "value": "500116"
  23620. }, {
  23621. "label": "合川区",
  23622. "value": "500117"
  23623. }, {
  23624. "label": "永川区",
  23625. "value": "500118"
  23626. }, {
  23627. "label": "南川区",
  23628. "value": "500119"
  23629. }, {
  23630. "label": "璧山区",
  23631. "value": "500120"
  23632. }, {
  23633. "label": "铜梁区",
  23634. "value": "500151"
  23635. }, {
  23636. "label": "潼南区",
  23637. "value": "500152"
  23638. }, {
  23639. "label": "荣昌区",
  23640. "value": "500153"
  23641. }, {
  23642. "label": "开州区",
  23643. "value": "500154"
  23644. }, {
  23645. "label": "梁平区",
  23646. "value": "500155"
  23647. }, {
  23648. "label": "武隆区",
  23649. "value": "500156"
  23650. }], [{
  23651. "label": "城口县",
  23652. "value": "500229"
  23653. }, {
  23654. "label": "丰都县",
  23655. "value": "500230"
  23656. }, {
  23657. "label": "垫江县",
  23658. "value": "500231"
  23659. }, {
  23660. "label": "忠县",
  23661. "value": "500233"
  23662. }, {
  23663. "label": "云阳县",
  23664. "value": "500235"
  23665. }, {
  23666. "label": "奉节县",
  23667. "value": "500236"
  23668. }, {
  23669. "label": "巫山县",
  23670. "value": "500237"
  23671. }, {
  23672. "label": "巫溪县",
  23673. "value": "500238"
  23674. }, {
  23675. "label": "石柱土家族自治县",
  23676. "value": "500240"
  23677. }, {
  23678. "label": "秀山土家族苗族自治县",
  23679. "value": "500241"
  23680. }, {
  23681. "label": "酉阳土家族苗族自治县",
  23682. "value": "500242"
  23683. }, {
  23684. "label": "彭水苗族土家族自治县",
  23685. "value": "500243"
  23686. }]], [[{
  23687. "label": "锦江区",
  23688. "value": "510104"
  23689. }, {
  23690. "label": "青羊区",
  23691. "value": "510105"
  23692. }, {
  23693. "label": "金牛区",
  23694. "value": "510106"
  23695. }, {
  23696. "label": "武侯区",
  23697. "value": "510107"
  23698. }, {
  23699. "label": "成华区",
  23700. "value": "510108"
  23701. }, {
  23702. "label": "龙泉驿区",
  23703. "value": "510112"
  23704. }, {
  23705. "label": "青白江区",
  23706. "value": "510113"
  23707. }, {
  23708. "label": "新都区",
  23709. "value": "510114"
  23710. }, {
  23711. "label": "温江区",
  23712. "value": "510115"
  23713. }, {
  23714. "label": "双流区",
  23715. "value": "510116"
  23716. }, {
  23717. "label": "郫都区",
  23718. "value": "510117"
  23719. }, {
  23720. "label": "金堂县",
  23721. "value": "510121"
  23722. }, {
  23723. "label": "大邑县",
  23724. "value": "510129"
  23725. }, {
  23726. "label": "蒲江县",
  23727. "value": "510131"
  23728. }, {
  23729. "label": "新津县",
  23730. "value": "510132"
  23731. }, {
  23732. "label": "都江堰市",
  23733. "value": "510181"
  23734. }, {
  23735. "label": "彭州市",
  23736. "value": "510182"
  23737. }, {
  23738. "label": "邛崃市",
  23739. "value": "510183"
  23740. }, {
  23741. "label": "崇州市",
  23742. "value": "510184"
  23743. }, {
  23744. "label": "简阳市",
  23745. "value": "510185"
  23746. }], [{
  23747. "label": "自流井区",
  23748. "value": "510302"
  23749. }, {
  23750. "label": "贡井区",
  23751. "value": "510303"
  23752. }, {
  23753. "label": "大安区",
  23754. "value": "510304"
  23755. }, {
  23756. "label": "沿滩区",
  23757. "value": "510311"
  23758. }, {
  23759. "label": "荣县",
  23760. "value": "510321"
  23761. }, {
  23762. "label": "富顺县",
  23763. "value": "510322"
  23764. }], [{
  23765. "label": "东区",
  23766. "value": "510402"
  23767. }, {
  23768. "label": "西区",
  23769. "value": "510403"
  23770. }, {
  23771. "label": "仁和区",
  23772. "value": "510411"
  23773. }, {
  23774. "label": "米易县",
  23775. "value": "510421"
  23776. }, {
  23777. "label": "盐边县",
  23778. "value": "510422"
  23779. }], [{
  23780. "label": "江阳区",
  23781. "value": "510502"
  23782. }, {
  23783. "label": "纳溪区",
  23784. "value": "510503"
  23785. }, {
  23786. "label": "龙马潭区",
  23787. "value": "510504"
  23788. }, {
  23789. "label": "泸县",
  23790. "value": "510521"
  23791. }, {
  23792. "label": "合江县",
  23793. "value": "510522"
  23794. }, {
  23795. "label": "叙永县",
  23796. "value": "510524"
  23797. }, {
  23798. "label": "古蔺县",
  23799. "value": "510525"
  23800. }], [{
  23801. "label": "旌阳区",
  23802. "value": "510603"
  23803. }, {
  23804. "label": "罗江区",
  23805. "value": "510604"
  23806. }, {
  23807. "label": "中江县",
  23808. "value": "510623"
  23809. }, {
  23810. "label": "广汉市",
  23811. "value": "510681"
  23812. }, {
  23813. "label": "什邡市",
  23814. "value": "510682"
  23815. }, {
  23816. "label": "绵竹市",
  23817. "value": "510683"
  23818. }], [{
  23819. "label": "涪城区",
  23820. "value": "510703"
  23821. }, {
  23822. "label": "游仙区",
  23823. "value": "510704"
  23824. }, {
  23825. "label": "安州区",
  23826. "value": "510705"
  23827. }, {
  23828. "label": "三台县",
  23829. "value": "510722"
  23830. }, {
  23831. "label": "盐亭县",
  23832. "value": "510723"
  23833. }, {
  23834. "label": "梓潼县",
  23835. "value": "510725"
  23836. }, {
  23837. "label": "北川羌族自治县",
  23838. "value": "510726"
  23839. }, {
  23840. "label": "平武县",
  23841. "value": "510727"
  23842. }, {
  23843. "label": "江油市",
  23844. "value": "510781"
  23845. }], [{
  23846. "label": "利州区",
  23847. "value": "510802"
  23848. }, {
  23849. "label": "昭化区",
  23850. "value": "510811"
  23851. }, {
  23852. "label": "朝天区",
  23853. "value": "510812"
  23854. }, {
  23855. "label": "旺苍县",
  23856. "value": "510821"
  23857. }, {
  23858. "label": "青川县",
  23859. "value": "510822"
  23860. }, {
  23861. "label": "剑阁县",
  23862. "value": "510823"
  23863. }, {
  23864. "label": "苍溪县",
  23865. "value": "510824"
  23866. }], [{
  23867. "label": "船山区",
  23868. "value": "510903"
  23869. }, {
  23870. "label": "安居区",
  23871. "value": "510904"
  23872. }, {
  23873. "label": "蓬溪县",
  23874. "value": "510921"
  23875. }, {
  23876. "label": "射洪县",
  23877. "value": "510922"
  23878. }, {
  23879. "label": "大英县",
  23880. "value": "510923"
  23881. }], [{
  23882. "label": "市中区",
  23883. "value": "511002"
  23884. }, {
  23885. "label": "东兴区",
  23886. "value": "511011"
  23887. }, {
  23888. "label": "威远县",
  23889. "value": "511024"
  23890. }, {
  23891. "label": "资中县",
  23892. "value": "511025"
  23893. }, {
  23894. "label": "内江经济开发区",
  23895. "value": "511071"
  23896. }, {
  23897. "label": "隆昌市",
  23898. "value": "511083"
  23899. }], [{
  23900. "label": "市中区",
  23901. "value": "511102"
  23902. }, {
  23903. "label": "沙湾区",
  23904. "value": "511111"
  23905. }, {
  23906. "label": "五通桥区",
  23907. "value": "511112"
  23908. }, {
  23909. "label": "金口河区",
  23910. "value": "511113"
  23911. }, {
  23912. "label": "犍为县",
  23913. "value": "511123"
  23914. }, {
  23915. "label": "井研县",
  23916. "value": "511124"
  23917. }, {
  23918. "label": "夹江县",
  23919. "value": "511126"
  23920. }, {
  23921. "label": "沐川县",
  23922. "value": "511129"
  23923. }, {
  23924. "label": "峨边彝族自治县",
  23925. "value": "511132"
  23926. }, {
  23927. "label": "马边彝族自治县",
  23928. "value": "511133"
  23929. }, {
  23930. "label": "峨眉山市",
  23931. "value": "511181"
  23932. }], [{
  23933. "label": "顺庆区",
  23934. "value": "511302"
  23935. }, {
  23936. "label": "高坪区",
  23937. "value": "511303"
  23938. }, {
  23939. "label": "嘉陵区",
  23940. "value": "511304"
  23941. }, {
  23942. "label": "南部县",
  23943. "value": "511321"
  23944. }, {
  23945. "label": "营山县",
  23946. "value": "511322"
  23947. }, {
  23948. "label": "蓬安县",
  23949. "value": "511323"
  23950. }, {
  23951. "label": "仪陇县",
  23952. "value": "511324"
  23953. }, {
  23954. "label": "西充县",
  23955. "value": "511325"
  23956. }, {
  23957. "label": "阆中市",
  23958. "value": "511381"
  23959. }], [{
  23960. "label": "东坡区",
  23961. "value": "511402"
  23962. }, {
  23963. "label": "彭山区",
  23964. "value": "511403"
  23965. }, {
  23966. "label": "仁寿县",
  23967. "value": "511421"
  23968. }, {
  23969. "label": "洪雅县",
  23970. "value": "511423"
  23971. }, {
  23972. "label": "丹棱县",
  23973. "value": "511424"
  23974. }, {
  23975. "label": "青神县",
  23976. "value": "511425"
  23977. }], [{
  23978. "label": "翠屏区",
  23979. "value": "511502"
  23980. }, {
  23981. "label": "南溪区",
  23982. "value": "511503"
  23983. }, {
  23984. "label": "宜宾县",
  23985. "value": "511521"
  23986. }, {
  23987. "label": "江安县",
  23988. "value": "511523"
  23989. }, {
  23990. "label": "长宁县",
  23991. "value": "511524"
  23992. }, {
  23993. "label": "高县",
  23994. "value": "511525"
  23995. }, {
  23996. "label": "珙县",
  23997. "value": "511526"
  23998. }, {
  23999. "label": "筠连县",
  24000. "value": "511527"
  24001. }, {
  24002. "label": "兴文县",
  24003. "value": "511528"
  24004. }, {
  24005. "label": "屏山县",
  24006. "value": "511529"
  24007. }], [{
  24008. "label": "广安区",
  24009. "value": "511602"
  24010. }, {
  24011. "label": "前锋区",
  24012. "value": "511603"
  24013. }, {
  24014. "label": "岳池县",
  24015. "value": "511621"
  24016. }, {
  24017. "label": "武胜县",
  24018. "value": "511622"
  24019. }, {
  24020. "label": "邻水县",
  24021. "value": "511623"
  24022. }, {
  24023. "label": "华蓥市",
  24024. "value": "511681"
  24025. }], [{
  24026. "label": "通川区",
  24027. "value": "511702"
  24028. }, {
  24029. "label": "达川区",
  24030. "value": "511703"
  24031. }, {
  24032. "label": "宣汉县",
  24033. "value": "511722"
  24034. }, {
  24035. "label": "开江县",
  24036. "value": "511723"
  24037. }, {
  24038. "label": "大竹县",
  24039. "value": "511724"
  24040. }, {
  24041. "label": "渠县",
  24042. "value": "511725"
  24043. }, {
  24044. "label": "达州经济开发区",
  24045. "value": "511771"
  24046. }, {
  24047. "label": "万源市",
  24048. "value": "511781"
  24049. }], [{
  24050. "label": "雨城区",
  24051. "value": "511802"
  24052. }, {
  24053. "label": "名山区",
  24054. "value": "511803"
  24055. }, {
  24056. "label": "荥经县",
  24057. "value": "511822"
  24058. }, {
  24059. "label": "汉源县",
  24060. "value": "511823"
  24061. }, {
  24062. "label": "石棉县",
  24063. "value": "511824"
  24064. }, {
  24065. "label": "天全县",
  24066. "value": "511825"
  24067. }, {
  24068. "label": "芦山县",
  24069. "value": "511826"
  24070. }, {
  24071. "label": "宝兴县",
  24072. "value": "511827"
  24073. }], [{
  24074. "label": "巴州区",
  24075. "value": "511902"
  24076. }, {
  24077. "label": "恩阳区",
  24078. "value": "511903"
  24079. }, {
  24080. "label": "通江县",
  24081. "value": "511921"
  24082. }, {
  24083. "label": "南江县",
  24084. "value": "511922"
  24085. }, {
  24086. "label": "平昌县",
  24087. "value": "511923"
  24088. }, {
  24089. "label": "巴中经济开发区",
  24090. "value": "511971"
  24091. }], [{
  24092. "label": "雁江区",
  24093. "value": "512002"
  24094. }, {
  24095. "label": "安岳县",
  24096. "value": "512021"
  24097. }, {
  24098. "label": "乐至县",
  24099. "value": "512022"
  24100. }], [{
  24101. "label": "马尔康市",
  24102. "value": "513201"
  24103. }, {
  24104. "label": "汶川县",
  24105. "value": "513221"
  24106. }, {
  24107. "label": "理县",
  24108. "value": "513222"
  24109. }, {
  24110. "label": "茂县",
  24111. "value": "513223"
  24112. }, {
  24113. "label": "松潘县",
  24114. "value": "513224"
  24115. }, {
  24116. "label": "九寨沟县",
  24117. "value": "513225"
  24118. }, {
  24119. "label": "金川县",
  24120. "value": "513226"
  24121. }, {
  24122. "label": "小金县",
  24123. "value": "513227"
  24124. }, {
  24125. "label": "黑水县",
  24126. "value": "513228"
  24127. }, {
  24128. "label": "壤塘县",
  24129. "value": "513230"
  24130. }, {
  24131. "label": "阿坝县",
  24132. "value": "513231"
  24133. }, {
  24134. "label": "若尔盖县",
  24135. "value": "513232"
  24136. }, {
  24137. "label": "红原县",
  24138. "value": "513233"
  24139. }], [{
  24140. "label": "康定市",
  24141. "value": "513301"
  24142. }, {
  24143. "label": "泸定县",
  24144. "value": "513322"
  24145. }, {
  24146. "label": "丹巴县",
  24147. "value": "513323"
  24148. }, {
  24149. "label": "九龙县",
  24150. "value": "513324"
  24151. }, {
  24152. "label": "雅江县",
  24153. "value": "513325"
  24154. }, {
  24155. "label": "道孚县",
  24156. "value": "513326"
  24157. }, {
  24158. "label": "炉霍县",
  24159. "value": "513327"
  24160. }, {
  24161. "label": "甘孜县",
  24162. "value": "513328"
  24163. }, {
  24164. "label": "新龙县",
  24165. "value": "513329"
  24166. }, {
  24167. "label": "德格县",
  24168. "value": "513330"
  24169. }, {
  24170. "label": "白玉县",
  24171. "value": "513331"
  24172. }, {
  24173. "label": "石渠县",
  24174. "value": "513332"
  24175. }, {
  24176. "label": "色达县",
  24177. "value": "513333"
  24178. }, {
  24179. "label": "理塘县",
  24180. "value": "513334"
  24181. }, {
  24182. "label": "巴塘县",
  24183. "value": "513335"
  24184. }, {
  24185. "label": "乡城县",
  24186. "value": "513336"
  24187. }, {
  24188. "label": "稻城县",
  24189. "value": "513337"
  24190. }, {
  24191. "label": "得荣县",
  24192. "value": "513338"
  24193. }], [{
  24194. "label": "西昌市",
  24195. "value": "513401"
  24196. }, {
  24197. "label": "木里藏族自治县",
  24198. "value": "513422"
  24199. }, {
  24200. "label": "盐源县",
  24201. "value": "513423"
  24202. }, {
  24203. "label": "德昌县",
  24204. "value": "513424"
  24205. }, {
  24206. "label": "会理县",
  24207. "value": "513425"
  24208. }, {
  24209. "label": "会东县",
  24210. "value": "513426"
  24211. }, {
  24212. "label": "宁南县",
  24213. "value": "513427"
  24214. }, {
  24215. "label": "普格县",
  24216. "value": "513428"
  24217. }, {
  24218. "label": "布拖县",
  24219. "value": "513429"
  24220. }, {
  24221. "label": "金阳县",
  24222. "value": "513430"
  24223. }, {
  24224. "label": "昭觉县",
  24225. "value": "513431"
  24226. }, {
  24227. "label": "喜德县",
  24228. "value": "513432"
  24229. }, {
  24230. "label": "冕宁县",
  24231. "value": "513433"
  24232. }, {
  24233. "label": "越西县",
  24234. "value": "513434"
  24235. }, {
  24236. "label": "甘洛县",
  24237. "value": "513435"
  24238. }, {
  24239. "label": "美姑县",
  24240. "value": "513436"
  24241. }, {
  24242. "label": "雷波县",
  24243. "value": "513437"
  24244. }]], [[{
  24245. "label": "南明区",
  24246. "value": "520102"
  24247. }, {
  24248. "label": "云岩区",
  24249. "value": "520103"
  24250. }, {
  24251. "label": "花溪区",
  24252. "value": "520111"
  24253. }, {
  24254. "label": "乌当区",
  24255. "value": "520112"
  24256. }, {
  24257. "label": "白云区",
  24258. "value": "520113"
  24259. }, {
  24260. "label": "观山湖区",
  24261. "value": "520115"
  24262. }, {
  24263. "label": "开阳县",
  24264. "value": "520121"
  24265. }, {
  24266. "label": "息烽县",
  24267. "value": "520122"
  24268. }, {
  24269. "label": "修文县",
  24270. "value": "520123"
  24271. }, {
  24272. "label": "清镇市",
  24273. "value": "520181"
  24274. }], [{
  24275. "label": "钟山区",
  24276. "value": "520201"
  24277. }, {
  24278. "label": "六枝特区",
  24279. "value": "520203"
  24280. }, {
  24281. "label": "水城县",
  24282. "value": "520221"
  24283. }, {
  24284. "label": "盘州市",
  24285. "value": "520281"
  24286. }], [{
  24287. "label": "红花岗区",
  24288. "value": "520302"
  24289. }, {
  24290. "label": "汇川区",
  24291. "value": "520303"
  24292. }, {
  24293. "label": "播州区",
  24294. "value": "520304"
  24295. }, {
  24296. "label": "桐梓县",
  24297. "value": "520322"
  24298. }, {
  24299. "label": "绥阳县",
  24300. "value": "520323"
  24301. }, {
  24302. "label": "正安县",
  24303. "value": "520324"
  24304. }, {
  24305. "label": "道真仡佬族苗族自治县",
  24306. "value": "520325"
  24307. }, {
  24308. "label": "务川仡佬族苗族自治县",
  24309. "value": "520326"
  24310. }, {
  24311. "label": "凤冈县",
  24312. "value": "520327"
  24313. }, {
  24314. "label": "湄潭县",
  24315. "value": "520328"
  24316. }, {
  24317. "label": "余庆县",
  24318. "value": "520329"
  24319. }, {
  24320. "label": "习水县",
  24321. "value": "520330"
  24322. }, {
  24323. "label": "赤水市",
  24324. "value": "520381"
  24325. }, {
  24326. "label": "仁怀市",
  24327. "value": "520382"
  24328. }], [{
  24329. "label": "西秀区",
  24330. "value": "520402"
  24331. }, {
  24332. "label": "平坝区",
  24333. "value": "520403"
  24334. }, {
  24335. "label": "普定县",
  24336. "value": "520422"
  24337. }, {
  24338. "label": "镇宁布依族苗族自治县",
  24339. "value": "520423"
  24340. }, {
  24341. "label": "关岭布依族苗族自治县",
  24342. "value": "520424"
  24343. }, {
  24344. "label": "紫云苗族布依族自治县",
  24345. "value": "520425"
  24346. }], [{
  24347. "label": "七星关区",
  24348. "value": "520502"
  24349. }, {
  24350. "label": "大方县",
  24351. "value": "520521"
  24352. }, {
  24353. "label": "黔西县",
  24354. "value": "520522"
  24355. }, {
  24356. "label": "金沙县",
  24357. "value": "520523"
  24358. }, {
  24359. "label": "织金县",
  24360. "value": "520524"
  24361. }, {
  24362. "label": "纳雍县",
  24363. "value": "520525"
  24364. }, {
  24365. "label": "威宁彝族回族苗族自治县",
  24366. "value": "520526"
  24367. }, {
  24368. "label": "赫章县",
  24369. "value": "520527"
  24370. }], [{
  24371. "label": "碧江区",
  24372. "value": "520602"
  24373. }, {
  24374. "label": "万山区",
  24375. "value": "520603"
  24376. }, {
  24377. "label": "江口县",
  24378. "value": "520621"
  24379. }, {
  24380. "label": "玉屏侗族自治县",
  24381. "value": "520622"
  24382. }, {
  24383. "label": "石阡县",
  24384. "value": "520623"
  24385. }, {
  24386. "label": "思南县",
  24387. "value": "520624"
  24388. }, {
  24389. "label": "印江土家族苗族自治县",
  24390. "value": "520625"
  24391. }, {
  24392. "label": "德江县",
  24393. "value": "520626"
  24394. }, {
  24395. "label": "沿河土家族自治县",
  24396. "value": "520627"
  24397. }, {
  24398. "label": "松桃苗族自治县",
  24399. "value": "520628"
  24400. }], [{
  24401. "label": "兴义市",
  24402. "value": "522301"
  24403. }, {
  24404. "label": "兴仁县",
  24405. "value": "522322"
  24406. }, {
  24407. "label": "普安县",
  24408. "value": "522323"
  24409. }, {
  24410. "label": "晴隆县",
  24411. "value": "522324"
  24412. }, {
  24413. "label": "贞丰县",
  24414. "value": "522325"
  24415. }, {
  24416. "label": "望谟县",
  24417. "value": "522326"
  24418. }, {
  24419. "label": "册亨县",
  24420. "value": "522327"
  24421. }, {
  24422. "label": "安龙县",
  24423. "value": "522328"
  24424. }], [{
  24425. "label": "凯里市",
  24426. "value": "522601"
  24427. }, {
  24428. "label": "黄平县",
  24429. "value": "522622"
  24430. }, {
  24431. "label": "施秉县",
  24432. "value": "522623"
  24433. }, {
  24434. "label": "三穗县",
  24435. "value": "522624"
  24436. }, {
  24437. "label": "镇远县",
  24438. "value": "522625"
  24439. }, {
  24440. "label": "岑巩县",
  24441. "value": "522626"
  24442. }, {
  24443. "label": "天柱县",
  24444. "value": "522627"
  24445. }, {
  24446. "label": "锦屏县",
  24447. "value": "522628"
  24448. }, {
  24449. "label": "剑河县",
  24450. "value": "522629"
  24451. }, {
  24452. "label": "台江县",
  24453. "value": "522630"
  24454. }, {
  24455. "label": "黎平县",
  24456. "value": "522631"
  24457. }, {
  24458. "label": "榕江县",
  24459. "value": "522632"
  24460. }, {
  24461. "label": "从江县",
  24462. "value": "522633"
  24463. }, {
  24464. "label": "雷山县",
  24465. "value": "522634"
  24466. }, {
  24467. "label": "麻江县",
  24468. "value": "522635"
  24469. }, {
  24470. "label": "丹寨县",
  24471. "value": "522636"
  24472. }], [{
  24473. "label": "都匀市",
  24474. "value": "522701"
  24475. }, {
  24476. "label": "福泉市",
  24477. "value": "522702"
  24478. }, {
  24479. "label": "荔波县",
  24480. "value": "522722"
  24481. }, {
  24482. "label": "贵定县",
  24483. "value": "522723"
  24484. }, {
  24485. "label": "瓮安县",
  24486. "value": "522725"
  24487. }, {
  24488. "label": "独山县",
  24489. "value": "522726"
  24490. }, {
  24491. "label": "平塘县",
  24492. "value": "522727"
  24493. }, {
  24494. "label": "罗甸县",
  24495. "value": "522728"
  24496. }, {
  24497. "label": "长顺县",
  24498. "value": "522729"
  24499. }, {
  24500. "label": "龙里县",
  24501. "value": "522730"
  24502. }, {
  24503. "label": "惠水县",
  24504. "value": "522731"
  24505. }, {
  24506. "label": "三都水族自治县",
  24507. "value": "522732"
  24508. }]], [[{
  24509. "label": "五华区",
  24510. "value": "530102"
  24511. }, {
  24512. "label": "盘龙区",
  24513. "value": "530103"
  24514. }, {
  24515. "label": "官渡区",
  24516. "value": "530111"
  24517. }, {
  24518. "label": "西山区",
  24519. "value": "530112"
  24520. }, {
  24521. "label": "东川区",
  24522. "value": "530113"
  24523. }, {
  24524. "label": "呈贡区",
  24525. "value": "530114"
  24526. }, {
  24527. "label": "晋宁区",
  24528. "value": "530115"
  24529. }, {
  24530. "label": "富民县",
  24531. "value": "530124"
  24532. }, {
  24533. "label": "宜良县",
  24534. "value": "530125"
  24535. }, {
  24536. "label": "石林彝族自治县",
  24537. "value": "530126"
  24538. }, {
  24539. "label": "嵩明县",
  24540. "value": "530127"
  24541. }, {
  24542. "label": "禄劝彝族苗族自治县",
  24543. "value": "530128"
  24544. }, {
  24545. "label": "寻甸回族彝族自治县",
  24546. "value": "530129"
  24547. }, {
  24548. "label": "安宁市",
  24549. "value": "530181"
  24550. }], [{
  24551. "label": "麒麟区",
  24552. "value": "530302"
  24553. }, {
  24554. "label": "沾益区",
  24555. "value": "530303"
  24556. }, {
  24557. "label": "马龙县",
  24558. "value": "530321"
  24559. }, {
  24560. "label": "陆良县",
  24561. "value": "530322"
  24562. }, {
  24563. "label": "师宗县",
  24564. "value": "530323"
  24565. }, {
  24566. "label": "罗平县",
  24567. "value": "530324"
  24568. }, {
  24569. "label": "富源县",
  24570. "value": "530325"
  24571. }, {
  24572. "label": "会泽县",
  24573. "value": "530326"
  24574. }, {
  24575. "label": "宣威市",
  24576. "value": "530381"
  24577. }], [{
  24578. "label": "红塔区",
  24579. "value": "530402"
  24580. }, {
  24581. "label": "江川区",
  24582. "value": "530403"
  24583. }, {
  24584. "label": "澄江县",
  24585. "value": "530422"
  24586. }, {
  24587. "label": "通海县",
  24588. "value": "530423"
  24589. }, {
  24590. "label": "华宁县",
  24591. "value": "530424"
  24592. }, {
  24593. "label": "易门县",
  24594. "value": "530425"
  24595. }, {
  24596. "label": "峨山彝族自治县",
  24597. "value": "530426"
  24598. }, {
  24599. "label": "新平彝族傣族自治县",
  24600. "value": "530427"
  24601. }, {
  24602. "label": "元江哈尼族彝族傣族自治县",
  24603. "value": "530428"
  24604. }], [{
  24605. "label": "隆阳区",
  24606. "value": "530502"
  24607. }, {
  24608. "label": "施甸县",
  24609. "value": "530521"
  24610. }, {
  24611. "label": "龙陵县",
  24612. "value": "530523"
  24613. }, {
  24614. "label": "昌宁县",
  24615. "value": "530524"
  24616. }, {
  24617. "label": "腾冲市",
  24618. "value": "530581"
  24619. }], [{
  24620. "label": "昭阳区",
  24621. "value": "530602"
  24622. }, {
  24623. "label": "鲁甸县",
  24624. "value": "530621"
  24625. }, {
  24626. "label": "巧家县",
  24627. "value": "530622"
  24628. }, {
  24629. "label": "盐津县",
  24630. "value": "530623"
  24631. }, {
  24632. "label": "大关县",
  24633. "value": "530624"
  24634. }, {
  24635. "label": "永善县",
  24636. "value": "530625"
  24637. }, {
  24638. "label": "绥江县",
  24639. "value": "530626"
  24640. }, {
  24641. "label": "镇雄县",
  24642. "value": "530627"
  24643. }, {
  24644. "label": "彝良县",
  24645. "value": "530628"
  24646. }, {
  24647. "label": "威信县",
  24648. "value": "530629"
  24649. }, {
  24650. "label": "水富县",
  24651. "value": "530630"
  24652. }], [{
  24653. "label": "古城区",
  24654. "value": "530702"
  24655. }, {
  24656. "label": "玉龙纳西族自治县",
  24657. "value": "530721"
  24658. }, {
  24659. "label": "永胜县",
  24660. "value": "530722"
  24661. }, {
  24662. "label": "华坪县",
  24663. "value": "530723"
  24664. }, {
  24665. "label": "宁蒗彝族自治县",
  24666. "value": "530724"
  24667. }], [{
  24668. "label": "思茅区",
  24669. "value": "530802"
  24670. }, {
  24671. "label": "宁洱哈尼族彝族自治县",
  24672. "value": "530821"
  24673. }, {
  24674. "label": "墨江哈尼族自治县",
  24675. "value": "530822"
  24676. }, {
  24677. "label": "景东彝族自治县",
  24678. "value": "530823"
  24679. }, {
  24680. "label": "景谷傣族彝族自治县",
  24681. "value": "530824"
  24682. }, {
  24683. "label": "镇沅彝族哈尼族拉祜族自治县",
  24684. "value": "530825"
  24685. }, {
  24686. "label": "江城哈尼族彝族自治县",
  24687. "value": "530826"
  24688. }, {
  24689. "label": "孟连傣族拉祜族佤族自治县",
  24690. "value": "530827"
  24691. }, {
  24692. "label": "澜沧拉祜族自治县",
  24693. "value": "530828"
  24694. }, {
  24695. "label": "西盟佤族自治县",
  24696. "value": "530829"
  24697. }], [{
  24698. "label": "临翔区",
  24699. "value": "530902"
  24700. }, {
  24701. "label": "凤庆县",
  24702. "value": "530921"
  24703. }, {
  24704. "label": "云县",
  24705. "value": "530922"
  24706. }, {
  24707. "label": "永德县",
  24708. "value": "530923"
  24709. }, {
  24710. "label": "镇康县",
  24711. "value": "530924"
  24712. }, {
  24713. "label": "双江拉祜族佤族布朗族傣族自治县",
  24714. "value": "530925"
  24715. }, {
  24716. "label": "耿马傣族佤族自治县",
  24717. "value": "530926"
  24718. }, {
  24719. "label": "沧源佤族自治县",
  24720. "value": "530927"
  24721. }], [{
  24722. "label": "楚雄市",
  24723. "value": "532301"
  24724. }, {
  24725. "label": "双柏县",
  24726. "value": "532322"
  24727. }, {
  24728. "label": "牟定县",
  24729. "value": "532323"
  24730. }, {
  24731. "label": "南华县",
  24732. "value": "532324"
  24733. }, {
  24734. "label": "姚安县",
  24735. "value": "532325"
  24736. }, {
  24737. "label": "大姚县",
  24738. "value": "532326"
  24739. }, {
  24740. "label": "永仁县",
  24741. "value": "532327"
  24742. }, {
  24743. "label": "元谋县",
  24744. "value": "532328"
  24745. }, {
  24746. "label": "武定县",
  24747. "value": "532329"
  24748. }, {
  24749. "label": "禄丰县",
  24750. "value": "532331"
  24751. }], [{
  24752. "label": "个旧市",
  24753. "value": "532501"
  24754. }, {
  24755. "label": "开远市",
  24756. "value": "532502"
  24757. }, {
  24758. "label": "蒙自市",
  24759. "value": "532503"
  24760. }, {
  24761. "label": "弥勒市",
  24762. "value": "532504"
  24763. }, {
  24764. "label": "屏边苗族自治县",
  24765. "value": "532523"
  24766. }, {
  24767. "label": "建水县",
  24768. "value": "532524"
  24769. }, {
  24770. "label": "石屏县",
  24771. "value": "532525"
  24772. }, {
  24773. "label": "泸西县",
  24774. "value": "532527"
  24775. }, {
  24776. "label": "元阳县",
  24777. "value": "532528"
  24778. }, {
  24779. "label": "红河县",
  24780. "value": "532529"
  24781. }, {
  24782. "label": "金平苗族瑶族傣族自治县",
  24783. "value": "532530"
  24784. }, {
  24785. "label": "绿春县",
  24786. "value": "532531"
  24787. }, {
  24788. "label": "河口瑶族自治县",
  24789. "value": "532532"
  24790. }], [{
  24791. "label": "文山市",
  24792. "value": "532601"
  24793. }, {
  24794. "label": "砚山县",
  24795. "value": "532622"
  24796. }, {
  24797. "label": "西畴县",
  24798. "value": "532623"
  24799. }, {
  24800. "label": "麻栗坡县",
  24801. "value": "532624"
  24802. }, {
  24803. "label": "马关县",
  24804. "value": "532625"
  24805. }, {
  24806. "label": "丘北县",
  24807. "value": "532626"
  24808. }, {
  24809. "label": "广南县",
  24810. "value": "532627"
  24811. }, {
  24812. "label": "富宁县",
  24813. "value": "532628"
  24814. }], [{
  24815. "label": "景洪市",
  24816. "value": "532801"
  24817. }, {
  24818. "label": "勐海县",
  24819. "value": "532822"
  24820. }, {
  24821. "label": "勐腊县",
  24822. "value": "532823"
  24823. }], [{
  24824. "label": "大理市",
  24825. "value": "532901"
  24826. }, {
  24827. "label": "漾濞彝族自治县",
  24828. "value": "532922"
  24829. }, {
  24830. "label": "祥云县",
  24831. "value": "532923"
  24832. }, {
  24833. "label": "宾川县",
  24834. "value": "532924"
  24835. }, {
  24836. "label": "弥渡县",
  24837. "value": "532925"
  24838. }, {
  24839. "label": "南涧彝族自治县",
  24840. "value": "532926"
  24841. }, {
  24842. "label": "巍山彝族回族自治县",
  24843. "value": "532927"
  24844. }, {
  24845. "label": "永平县",
  24846. "value": "532928"
  24847. }, {
  24848. "label": "云龙县",
  24849. "value": "532929"
  24850. }, {
  24851. "label": "洱源县",
  24852. "value": "532930"
  24853. }, {
  24854. "label": "剑川县",
  24855. "value": "532931"
  24856. }, {
  24857. "label": "鹤庆县",
  24858. "value": "532932"
  24859. }], [{
  24860. "label": "瑞丽市",
  24861. "value": "533102"
  24862. }, {
  24863. "label": "芒市",
  24864. "value": "533103"
  24865. }, {
  24866. "label": "梁河县",
  24867. "value": "533122"
  24868. }, {
  24869. "label": "盈江县",
  24870. "value": "533123"
  24871. }, {
  24872. "label": "陇川县",
  24873. "value": "533124"
  24874. }], [{
  24875. "label": "泸水市",
  24876. "value": "533301"
  24877. }, {
  24878. "label": "福贡县",
  24879. "value": "533323"
  24880. }, {
  24881. "label": "贡山独龙族怒族自治县",
  24882. "value": "533324"
  24883. }, {
  24884. "label": "兰坪白族普米族自治县",
  24885. "value": "533325"
  24886. }], [{
  24887. "label": "香格里拉市",
  24888. "value": "533401"
  24889. }, {
  24890. "label": "德钦县",
  24891. "value": "533422"
  24892. }, {
  24893. "label": "维西傈僳族自治县",
  24894. "value": "533423"
  24895. }]], [[{
  24896. "label": "城关区",
  24897. "value": "540102"
  24898. }, {
  24899. "label": "堆龙德庆区",
  24900. "value": "540103"
  24901. }, {
  24902. "label": "林周县",
  24903. "value": "540121"
  24904. }, {
  24905. "label": "当雄县",
  24906. "value": "540122"
  24907. }, {
  24908. "label": "尼木县",
  24909. "value": "540123"
  24910. }, {
  24911. "label": "曲水县",
  24912. "value": "540124"
  24913. }, {
  24914. "label": "达孜县",
  24915. "value": "540126"
  24916. }, {
  24917. "label": "墨竹工卡县",
  24918. "value": "540127"
  24919. }, {
  24920. "label": "格尔木藏青工业园区",
  24921. "value": "540171"
  24922. }, {
  24923. "label": "拉萨经济技术开发区",
  24924. "value": "540172"
  24925. }, {
  24926. "label": "西藏文化旅游创意园区",
  24927. "value": "540173"
  24928. }, {
  24929. "label": "达孜工业园区",
  24930. "value": "540174"
  24931. }], [{
  24932. "label": "桑珠孜区",
  24933. "value": "540202"
  24934. }, {
  24935. "label": "南木林县",
  24936. "value": "540221"
  24937. }, {
  24938. "label": "江孜县",
  24939. "value": "540222"
  24940. }, {
  24941. "label": "定日县",
  24942. "value": "540223"
  24943. }, {
  24944. "label": "萨迦县",
  24945. "value": "540224"
  24946. }, {
  24947. "label": "拉孜县",
  24948. "value": "540225"
  24949. }, {
  24950. "label": "昂仁县",
  24951. "value": "540226"
  24952. }, {
  24953. "label": "谢通门县",
  24954. "value": "540227"
  24955. }, {
  24956. "label": "白朗县",
  24957. "value": "540228"
  24958. }, {
  24959. "label": "仁布县",
  24960. "value": "540229"
  24961. }, {
  24962. "label": "康马县",
  24963. "value": "540230"
  24964. }, {
  24965. "label": "定结县",
  24966. "value": "540231"
  24967. }, {
  24968. "label": "仲巴县",
  24969. "value": "540232"
  24970. }, {
  24971. "label": "亚东县",
  24972. "value": "540233"
  24973. }, {
  24974. "label": "吉隆县",
  24975. "value": "540234"
  24976. }, {
  24977. "label": "聂拉木县",
  24978. "value": "540235"
  24979. }, {
  24980. "label": "萨嘎县",
  24981. "value": "540236"
  24982. }, {
  24983. "label": "岗巴县",
  24984. "value": "540237"
  24985. }], [{
  24986. "label": "卡若区",
  24987. "value": "540302"
  24988. }, {
  24989. "label": "江达县",
  24990. "value": "540321"
  24991. }, {
  24992. "label": "贡觉县",
  24993. "value": "540322"
  24994. }, {
  24995. "label": "类乌齐县",
  24996. "value": "540323"
  24997. }, {
  24998. "label": "丁青县",
  24999. "value": "540324"
  25000. }, {
  25001. "label": "察雅县",
  25002. "value": "540325"
  25003. }, {
  25004. "label": "八宿县",
  25005. "value": "540326"
  25006. }, {
  25007. "label": "左贡县",
  25008. "value": "540327"
  25009. }, {
  25010. "label": "芒康县",
  25011. "value": "540328"
  25012. }, {
  25013. "label": "洛隆县",
  25014. "value": "540329"
  25015. }, {
  25016. "label": "边坝县",
  25017. "value": "540330"
  25018. }], [{
  25019. "label": "巴宜区",
  25020. "value": "540402"
  25021. }, {
  25022. "label": "工布江达县",
  25023. "value": "540421"
  25024. }, {
  25025. "label": "米林县",
  25026. "value": "540422"
  25027. }, {
  25028. "label": "墨脱县",
  25029. "value": "540423"
  25030. }, {
  25031. "label": "波密县",
  25032. "value": "540424"
  25033. }, {
  25034. "label": "察隅县",
  25035. "value": "540425"
  25036. }, {
  25037. "label": "朗县",
  25038. "value": "540426"
  25039. }], [{
  25040. "label": "乃东区",
  25041. "value": "540502"
  25042. }, {
  25043. "label": "扎囊县",
  25044. "value": "540521"
  25045. }, {
  25046. "label": "贡嘎县",
  25047. "value": "540522"
  25048. }, {
  25049. "label": "桑日县",
  25050. "value": "540523"
  25051. }, {
  25052. "label": "琼结县",
  25053. "value": "540524"
  25054. }, {
  25055. "label": "曲松县",
  25056. "value": "540525"
  25057. }, {
  25058. "label": "措美县",
  25059. "value": "540526"
  25060. }, {
  25061. "label": "洛扎县",
  25062. "value": "540527"
  25063. }, {
  25064. "label": "加查县",
  25065. "value": "540528"
  25066. }, {
  25067. "label": "隆子县",
  25068. "value": "540529"
  25069. }, {
  25070. "label": "错那县",
  25071. "value": "540530"
  25072. }, {
  25073. "label": "浪卡子县",
  25074. "value": "540531"
  25075. }], [{
  25076. "label": "那曲县",
  25077. "value": "542421"
  25078. }, {
  25079. "label": "嘉黎县",
  25080. "value": "542422"
  25081. }, {
  25082. "label": "比如县",
  25083. "value": "542423"
  25084. }, {
  25085. "label": "聂荣县",
  25086. "value": "542424"
  25087. }, {
  25088. "label": "安多县",
  25089. "value": "542425"
  25090. }, {
  25091. "label": "申扎县",
  25092. "value": "542426"
  25093. }, {
  25094. "label": "索县",
  25095. "value": "542427"
  25096. }, {
  25097. "label": "班戈县",
  25098. "value": "542428"
  25099. }, {
  25100. "label": "巴青县",
  25101. "value": "542429"
  25102. }, {
  25103. "label": "尼玛县",
  25104. "value": "542430"
  25105. }, {
  25106. "label": "双湖县",
  25107. "value": "542431"
  25108. }], [{
  25109. "label": "普兰县",
  25110. "value": "542521"
  25111. }, {
  25112. "label": "札达县",
  25113. "value": "542522"
  25114. }, {
  25115. "label": "噶尔县",
  25116. "value": "542523"
  25117. }, {
  25118. "label": "日土县",
  25119. "value": "542524"
  25120. }, {
  25121. "label": "革吉县",
  25122. "value": "542525"
  25123. }, {
  25124. "label": "改则县",
  25125. "value": "542526"
  25126. }, {
  25127. "label": "措勤县",
  25128. "value": "542527"
  25129. }]], [[{
  25130. "label": "新城区",
  25131. "value": "610102"
  25132. }, {
  25133. "label": "碑林区",
  25134. "value": "610103"
  25135. }, {
  25136. "label": "莲湖区",
  25137. "value": "610104"
  25138. }, {
  25139. "label": "灞桥区",
  25140. "value": "610111"
  25141. }, {
  25142. "label": "未央区",
  25143. "value": "610112"
  25144. }, {
  25145. "label": "雁塔区",
  25146. "value": "610113"
  25147. }, {
  25148. "label": "阎良区",
  25149. "value": "610114"
  25150. }, {
  25151. "label": "临潼区",
  25152. "value": "610115"
  25153. }, {
  25154. "label": "长安区",
  25155. "value": "610116"
  25156. }, {
  25157. "label": "高陵区",
  25158. "value": "610117"
  25159. }, {
  25160. "label": "鄠邑区",
  25161. "value": "610118"
  25162. }, {
  25163. "label": "蓝田县",
  25164. "value": "610122"
  25165. }, {
  25166. "label": "周至县",
  25167. "value": "610124"
  25168. }], [{
  25169. "label": "王益区",
  25170. "value": "610202"
  25171. }, {
  25172. "label": "印台区",
  25173. "value": "610203"
  25174. }, {
  25175. "label": "耀州区",
  25176. "value": "610204"
  25177. }, {
  25178. "label": "宜君县",
  25179. "value": "610222"
  25180. }], [{
  25181. "label": "渭滨区",
  25182. "value": "610302"
  25183. }, {
  25184. "label": "金台区",
  25185. "value": "610303"
  25186. }, {
  25187. "label": "陈仓区",
  25188. "value": "610304"
  25189. }, {
  25190. "label": "凤翔县",
  25191. "value": "610322"
  25192. }, {
  25193. "label": "岐山县",
  25194. "value": "610323"
  25195. }, {
  25196. "label": "扶风县",
  25197. "value": "610324"
  25198. }, {
  25199. "label": "眉县",
  25200. "value": "610326"
  25201. }, {
  25202. "label": "陇县",
  25203. "value": "610327"
  25204. }, {
  25205. "label": "千阳县",
  25206. "value": "610328"
  25207. }, {
  25208. "label": "麟游县",
  25209. "value": "610329"
  25210. }, {
  25211. "label": "凤县",
  25212. "value": "610330"
  25213. }, {
  25214. "label": "太白县",
  25215. "value": "610331"
  25216. }], [{
  25217. "label": "秦都区",
  25218. "value": "610402"
  25219. }, {
  25220. "label": "杨陵区",
  25221. "value": "610403"
  25222. }, {
  25223. "label": "渭城区",
  25224. "value": "610404"
  25225. }, {
  25226. "label": "三原县",
  25227. "value": "610422"
  25228. }, {
  25229. "label": "泾阳县",
  25230. "value": "610423"
  25231. }, {
  25232. "label": "乾县",
  25233. "value": "610424"
  25234. }, {
  25235. "label": "礼泉县",
  25236. "value": "610425"
  25237. }, {
  25238. "label": "永寿县",
  25239. "value": "610426"
  25240. }, {
  25241. "label": "彬县",
  25242. "value": "610427"
  25243. }, {
  25244. "label": "长武县",
  25245. "value": "610428"
  25246. }, {
  25247. "label": "旬邑县",
  25248. "value": "610429"
  25249. }, {
  25250. "label": "淳化县",
  25251. "value": "610430"
  25252. }, {
  25253. "label": "武功县",
  25254. "value": "610431"
  25255. }, {
  25256. "label": "兴平市",
  25257. "value": "610481"
  25258. }], [{
  25259. "label": "临渭区",
  25260. "value": "610502"
  25261. }, {
  25262. "label": "华州区",
  25263. "value": "610503"
  25264. }, {
  25265. "label": "潼关县",
  25266. "value": "610522"
  25267. }, {
  25268. "label": "大荔县",
  25269. "value": "610523"
  25270. }, {
  25271. "label": "合阳县",
  25272. "value": "610524"
  25273. }, {
  25274. "label": "澄城县",
  25275. "value": "610525"
  25276. }, {
  25277. "label": "蒲城县",
  25278. "value": "610526"
  25279. }, {
  25280. "label": "白水县",
  25281. "value": "610527"
  25282. }, {
  25283. "label": "富平县",
  25284. "value": "610528"
  25285. }, {
  25286. "label": "韩城市",
  25287. "value": "610581"
  25288. }, {
  25289. "label": "华阴市",
  25290. "value": "610582"
  25291. }], [{
  25292. "label": "宝塔区",
  25293. "value": "610602"
  25294. }, {
  25295. "label": "安塞区",
  25296. "value": "610603"
  25297. }, {
  25298. "label": "延长县",
  25299. "value": "610621"
  25300. }, {
  25301. "label": "延川县",
  25302. "value": "610622"
  25303. }, {
  25304. "label": "子长县",
  25305. "value": "610623"
  25306. }, {
  25307. "label": "志丹县",
  25308. "value": "610625"
  25309. }, {
  25310. "label": "吴起县",
  25311. "value": "610626"
  25312. }, {
  25313. "label": "甘泉县",
  25314. "value": "610627"
  25315. }, {
  25316. "label": "富县",
  25317. "value": "610628"
  25318. }, {
  25319. "label": "洛川县",
  25320. "value": "610629"
  25321. }, {
  25322. "label": "宜川县",
  25323. "value": "610630"
  25324. }, {
  25325. "label": "黄龙县",
  25326. "value": "610631"
  25327. }, {
  25328. "label": "黄陵县",
  25329. "value": "610632"
  25330. }], [{
  25331. "label": "汉台区",
  25332. "value": "610702"
  25333. }, {
  25334. "label": "南郑区",
  25335. "value": "610703"
  25336. }, {
  25337. "label": "城固县",
  25338. "value": "610722"
  25339. }, {
  25340. "label": "洋县",
  25341. "value": "610723"
  25342. }, {
  25343. "label": "西乡县",
  25344. "value": "610724"
  25345. }, {
  25346. "label": "勉县",
  25347. "value": "610725"
  25348. }, {
  25349. "label": "宁强县",
  25350. "value": "610726"
  25351. }, {
  25352. "label": "略阳县",
  25353. "value": "610727"
  25354. }, {
  25355. "label": "镇巴县",
  25356. "value": "610728"
  25357. }, {
  25358. "label": "留坝县",
  25359. "value": "610729"
  25360. }, {
  25361. "label": "佛坪县",
  25362. "value": "610730"
  25363. }], [{
  25364. "label": "榆阳区",
  25365. "value": "610802"
  25366. }, {
  25367. "label": "横山区",
  25368. "value": "610803"
  25369. }, {
  25370. "label": "府谷县",
  25371. "value": "610822"
  25372. }, {
  25373. "label": "靖边县",
  25374. "value": "610824"
  25375. }, {
  25376. "label": "定边县",
  25377. "value": "610825"
  25378. }, {
  25379. "label": "绥德县",
  25380. "value": "610826"
  25381. }, {
  25382. "label": "米脂县",
  25383. "value": "610827"
  25384. }, {
  25385. "label": "佳县",
  25386. "value": "610828"
  25387. }, {
  25388. "label": "吴堡县",
  25389. "value": "610829"
  25390. }, {
  25391. "label": "清涧县",
  25392. "value": "610830"
  25393. }, {
  25394. "label": "子洲县",
  25395. "value": "610831"
  25396. }, {
  25397. "label": "神木市",
  25398. "value": "610881"
  25399. }], [{
  25400. "label": "汉滨区",
  25401. "value": "610902"
  25402. }, {
  25403. "label": "汉阴县",
  25404. "value": "610921"
  25405. }, {
  25406. "label": "石泉县",
  25407. "value": "610922"
  25408. }, {
  25409. "label": "宁陕县",
  25410. "value": "610923"
  25411. }, {
  25412. "label": "紫阳县",
  25413. "value": "610924"
  25414. }, {
  25415. "label": "岚皋县",
  25416. "value": "610925"
  25417. }, {
  25418. "label": "平利县",
  25419. "value": "610926"
  25420. }, {
  25421. "label": "镇坪县",
  25422. "value": "610927"
  25423. }, {
  25424. "label": "旬阳县",
  25425. "value": "610928"
  25426. }, {
  25427. "label": "白河县",
  25428. "value": "610929"
  25429. }], [{
  25430. "label": "商州区",
  25431. "value": "611002"
  25432. }, {
  25433. "label": "洛南县",
  25434. "value": "611021"
  25435. }, {
  25436. "label": "丹凤县",
  25437. "value": "611022"
  25438. }, {
  25439. "label": "商南县",
  25440. "value": "611023"
  25441. }, {
  25442. "label": "山阳县",
  25443. "value": "611024"
  25444. }, {
  25445. "label": "镇安县",
  25446. "value": "611025"
  25447. }, {
  25448. "label": "柞水县",
  25449. "value": "611026"
  25450. }]], [[{
  25451. "label": "城关区",
  25452. "value": "620102"
  25453. }, {
  25454. "label": "七里河区",
  25455. "value": "620103"
  25456. }, {
  25457. "label": "西固区",
  25458. "value": "620104"
  25459. }, {
  25460. "label": "安宁区",
  25461. "value": "620105"
  25462. }, {
  25463. "label": "红古区",
  25464. "value": "620111"
  25465. }, {
  25466. "label": "永登县",
  25467. "value": "620121"
  25468. }, {
  25469. "label": "皋兰县",
  25470. "value": "620122"
  25471. }, {
  25472. "label": "榆中县",
  25473. "value": "620123"
  25474. }, {
  25475. "label": "兰州新区",
  25476. "value": "620171"
  25477. }], [{
  25478. "label": "嘉峪关市",
  25479. "value": "620201"
  25480. }], [{
  25481. "label": "金川区",
  25482. "value": "620302"
  25483. }, {
  25484. "label": "永昌县",
  25485. "value": "620321"
  25486. }], [{
  25487. "label": "白银区",
  25488. "value": "620402"
  25489. }, {
  25490. "label": "平川区",
  25491. "value": "620403"
  25492. }, {
  25493. "label": "靖远县",
  25494. "value": "620421"
  25495. }, {
  25496. "label": "会宁县",
  25497. "value": "620422"
  25498. }, {
  25499. "label": "景泰县",
  25500. "value": "620423"
  25501. }], [{
  25502. "label": "秦州区",
  25503. "value": "620502"
  25504. }, {
  25505. "label": "麦积区",
  25506. "value": "620503"
  25507. }, {
  25508. "label": "清水县",
  25509. "value": "620521"
  25510. }, {
  25511. "label": "秦安县",
  25512. "value": "620522"
  25513. }, {
  25514. "label": "甘谷县",
  25515. "value": "620523"
  25516. }, {
  25517. "label": "武山县",
  25518. "value": "620524"
  25519. }, {
  25520. "label": "张家川回族自治县",
  25521. "value": "620525"
  25522. }], [{
  25523. "label": "凉州区",
  25524. "value": "620602"
  25525. }, {
  25526. "label": "民勤县",
  25527. "value": "620621"
  25528. }, {
  25529. "label": "古浪县",
  25530. "value": "620622"
  25531. }, {
  25532. "label": "天祝藏族自治县",
  25533. "value": "620623"
  25534. }], [{
  25535. "label": "甘州区",
  25536. "value": "620702"
  25537. }, {
  25538. "label": "肃南裕固族自治县",
  25539. "value": "620721"
  25540. }, {
  25541. "label": "民乐县",
  25542. "value": "620722"
  25543. }, {
  25544. "label": "临泽县",
  25545. "value": "620723"
  25546. }, {
  25547. "label": "高台县",
  25548. "value": "620724"
  25549. }, {
  25550. "label": "山丹县",
  25551. "value": "620725"
  25552. }], [{
  25553. "label": "崆峒区",
  25554. "value": "620802"
  25555. }, {
  25556. "label": "泾川县",
  25557. "value": "620821"
  25558. }, {
  25559. "label": "灵台县",
  25560. "value": "620822"
  25561. }, {
  25562. "label": "崇信县",
  25563. "value": "620823"
  25564. }, {
  25565. "label": "华亭县",
  25566. "value": "620824"
  25567. }, {
  25568. "label": "庄浪县",
  25569. "value": "620825"
  25570. }, {
  25571. "label": "静宁县",
  25572. "value": "620826"
  25573. }, {
  25574. "label": "平凉工业园区",
  25575. "value": "620871"
  25576. }], [{
  25577. "label": "肃州区",
  25578. "value": "620902"
  25579. }, {
  25580. "label": "金塔县",
  25581. "value": "620921"
  25582. }, {
  25583. "label": "瓜州县",
  25584. "value": "620922"
  25585. }, {
  25586. "label": "肃北蒙古族自治县",
  25587. "value": "620923"
  25588. }, {
  25589. "label": "阿克塞哈萨克族自治县",
  25590. "value": "620924"
  25591. }, {
  25592. "label": "玉门市",
  25593. "value": "620981"
  25594. }, {
  25595. "label": "敦煌市",
  25596. "value": "620982"
  25597. }], [{
  25598. "label": "西峰区",
  25599. "value": "621002"
  25600. }, {
  25601. "label": "庆城县",
  25602. "value": "621021"
  25603. }, {
  25604. "label": "环县",
  25605. "value": "621022"
  25606. }, {
  25607. "label": "华池县",
  25608. "value": "621023"
  25609. }, {
  25610. "label": "合水县",
  25611. "value": "621024"
  25612. }, {
  25613. "label": "正宁县",
  25614. "value": "621025"
  25615. }, {
  25616. "label": "宁县",
  25617. "value": "621026"
  25618. }, {
  25619. "label": "镇原县",
  25620. "value": "621027"
  25621. }], [{
  25622. "label": "安定区",
  25623. "value": "621102"
  25624. }, {
  25625. "label": "通渭县",
  25626. "value": "621121"
  25627. }, {
  25628. "label": "陇西县",
  25629. "value": "621122"
  25630. }, {
  25631. "label": "渭源县",
  25632. "value": "621123"
  25633. }, {
  25634. "label": "临洮县",
  25635. "value": "621124"
  25636. }, {
  25637. "label": "漳县",
  25638. "value": "621125"
  25639. }, {
  25640. "label": "岷县",
  25641. "value": "621126"
  25642. }], [{
  25643. "label": "武都区",
  25644. "value": "621202"
  25645. }, {
  25646. "label": "成县",
  25647. "value": "621221"
  25648. }, {
  25649. "label": "文县",
  25650. "value": "621222"
  25651. }, {
  25652. "label": "宕昌县",
  25653. "value": "621223"
  25654. }, {
  25655. "label": "康县",
  25656. "value": "621224"
  25657. }, {
  25658. "label": "西和县",
  25659. "value": "621225"
  25660. }, {
  25661. "label": "礼县",
  25662. "value": "621226"
  25663. }, {
  25664. "label": "徽县",
  25665. "value": "621227"
  25666. }, {
  25667. "label": "两当县",
  25668. "value": "621228"
  25669. }], [{
  25670. "label": "临夏市",
  25671. "value": "622901"
  25672. }, {
  25673. "label": "临夏县",
  25674. "value": "622921"
  25675. }, {
  25676. "label": "康乐县",
  25677. "value": "622922"
  25678. }, {
  25679. "label": "永靖县",
  25680. "value": "622923"
  25681. }, {
  25682. "label": "广河县",
  25683. "value": "622924"
  25684. }, {
  25685. "label": "和政县",
  25686. "value": "622925"
  25687. }, {
  25688. "label": "东乡族自治县",
  25689. "value": "622926"
  25690. }, {
  25691. "label": "积石山保安族东乡族撒拉族自治县",
  25692. "value": "622927"
  25693. }], [{
  25694. "label": "合作市",
  25695. "value": "623001"
  25696. }, {
  25697. "label": "临潭县",
  25698. "value": "623021"
  25699. }, {
  25700. "label": "卓尼县",
  25701. "value": "623022"
  25702. }, {
  25703. "label": "舟曲县",
  25704. "value": "623023"
  25705. }, {
  25706. "label": "迭部县",
  25707. "value": "623024"
  25708. }, {
  25709. "label": "玛曲县",
  25710. "value": "623025"
  25711. }, {
  25712. "label": "碌曲县",
  25713. "value": "623026"
  25714. }, {
  25715. "label": "夏河县",
  25716. "value": "623027"
  25717. }]], [[{
  25718. "label": "城东区",
  25719. "value": "630102"
  25720. }, {
  25721. "label": "城中区",
  25722. "value": "630103"
  25723. }, {
  25724. "label": "城西区",
  25725. "value": "630104"
  25726. }, {
  25727. "label": "城北区",
  25728. "value": "630105"
  25729. }, {
  25730. "label": "大通回族土族自治县",
  25731. "value": "630121"
  25732. }, {
  25733. "label": "湟中县",
  25734. "value": "630122"
  25735. }, {
  25736. "label": "湟源县",
  25737. "value": "630123"
  25738. }], [{
  25739. "label": "乐都区",
  25740. "value": "630202"
  25741. }, {
  25742. "label": "平安区",
  25743. "value": "630203"
  25744. }, {
  25745. "label": "民和回族土族自治县",
  25746. "value": "630222"
  25747. }, {
  25748. "label": "互助土族自治县",
  25749. "value": "630223"
  25750. }, {
  25751. "label": "化隆回族自治县",
  25752. "value": "630224"
  25753. }, {
  25754. "label": "循化撒拉族自治县",
  25755. "value": "630225"
  25756. }], [{
  25757. "label": "门源回族自治县",
  25758. "value": "632221"
  25759. }, {
  25760. "label": "祁连县",
  25761. "value": "632222"
  25762. }, {
  25763. "label": "海晏县",
  25764. "value": "632223"
  25765. }, {
  25766. "label": "刚察县",
  25767. "value": "632224"
  25768. }], [{
  25769. "label": "同仁县",
  25770. "value": "632321"
  25771. }, {
  25772. "label": "尖扎县",
  25773. "value": "632322"
  25774. }, {
  25775. "label": "泽库县",
  25776. "value": "632323"
  25777. }, {
  25778. "label": "河南蒙古族自治县",
  25779. "value": "632324"
  25780. }], [{
  25781. "label": "共和县",
  25782. "value": "632521"
  25783. }, {
  25784. "label": "同德县",
  25785. "value": "632522"
  25786. }, {
  25787. "label": "贵德县",
  25788. "value": "632523"
  25789. }, {
  25790. "label": "兴海县",
  25791. "value": "632524"
  25792. }, {
  25793. "label": "贵南县",
  25794. "value": "632525"
  25795. }], [{
  25796. "label": "玛沁县",
  25797. "value": "632621"
  25798. }, {
  25799. "label": "班玛县",
  25800. "value": "632622"
  25801. }, {
  25802. "label": "甘德县",
  25803. "value": "632623"
  25804. }, {
  25805. "label": "达日县",
  25806. "value": "632624"
  25807. }, {
  25808. "label": "久治县",
  25809. "value": "632625"
  25810. }, {
  25811. "label": "玛多县",
  25812. "value": "632626"
  25813. }], [{
  25814. "label": "玉树市",
  25815. "value": "632701"
  25816. }, {
  25817. "label": "杂多县",
  25818. "value": "632722"
  25819. }, {
  25820. "label": "称多县",
  25821. "value": "632723"
  25822. }, {
  25823. "label": "治多县",
  25824. "value": "632724"
  25825. }, {
  25826. "label": "囊谦县",
  25827. "value": "632725"
  25828. }, {
  25829. "label": "曲麻莱县",
  25830. "value": "632726"
  25831. }], [{
  25832. "label": "格尔木市",
  25833. "value": "632801"
  25834. }, {
  25835. "label": "德令哈市",
  25836. "value": "632802"
  25837. }, {
  25838. "label": "乌兰县",
  25839. "value": "632821"
  25840. }, {
  25841. "label": "都兰县",
  25842. "value": "632822"
  25843. }, {
  25844. "label": "天峻县",
  25845. "value": "632823"
  25846. }, {
  25847. "label": "大柴旦行政委员会",
  25848. "value": "632857"
  25849. }, {
  25850. "label": "冷湖行政委员会",
  25851. "value": "632858"
  25852. }, {
  25853. "label": "茫崖行政委员会",
  25854. "value": "632859"
  25855. }]], [[{
  25856. "label": "兴庆区",
  25857. "value": "640104"
  25858. }, {
  25859. "label": "西夏区",
  25860. "value": "640105"
  25861. }, {
  25862. "label": "金凤区",
  25863. "value": "640106"
  25864. }, {
  25865. "label": "永宁县",
  25866. "value": "640121"
  25867. }, {
  25868. "label": "贺兰县",
  25869. "value": "640122"
  25870. }, {
  25871. "label": "灵武市",
  25872. "value": "640181"
  25873. }], [{
  25874. "label": "大武口区",
  25875. "value": "640202"
  25876. }, {
  25877. "label": "惠农区",
  25878. "value": "640205"
  25879. }, {
  25880. "label": "平罗县",
  25881. "value": "640221"
  25882. }], [{
  25883. "label": "利通区",
  25884. "value": "640302"
  25885. }, {
  25886. "label": "红寺堡区",
  25887. "value": "640303"
  25888. }, {
  25889. "label": "盐池县",
  25890. "value": "640323"
  25891. }, {
  25892. "label": "同心县",
  25893. "value": "640324"
  25894. }, {
  25895. "label": "青铜峡市",
  25896. "value": "640381"
  25897. }], [{
  25898. "label": "原州区",
  25899. "value": "640402"
  25900. }, {
  25901. "label": "西吉县",
  25902. "value": "640422"
  25903. }, {
  25904. "label": "隆德县",
  25905. "value": "640423"
  25906. }, {
  25907. "label": "泾源县",
  25908. "value": "640424"
  25909. }, {
  25910. "label": "彭阳县",
  25911. "value": "640425"
  25912. }], [{
  25913. "label": "沙坡头区",
  25914. "value": "640502"
  25915. }, {
  25916. "label": "中宁县",
  25917. "value": "640521"
  25918. }, {
  25919. "label": "海原县",
  25920. "value": "640522"
  25921. }]], [[{
  25922. "label": "天山区",
  25923. "value": "650102"
  25924. }, {
  25925. "label": "沙依巴克区",
  25926. "value": "650103"
  25927. }, {
  25928. "label": "新市区",
  25929. "value": "650104"
  25930. }, {
  25931. "label": "水磨沟区",
  25932. "value": "650105"
  25933. }, {
  25934. "label": "头屯河区",
  25935. "value": "650106"
  25936. }, {
  25937. "label": "达坂城区",
  25938. "value": "650107"
  25939. }, {
  25940. "label": "米东区",
  25941. "value": "650109"
  25942. }, {
  25943. "label": "乌鲁木齐县",
  25944. "value": "650121"
  25945. }, {
  25946. "label": "乌鲁木齐经济技术开发区",
  25947. "value": "650171"
  25948. }, {
  25949. "label": "乌鲁木齐高新技术产业开发区",
  25950. "value": "650172"
  25951. }], [{
  25952. "label": "独山子区",
  25953. "value": "650202"
  25954. }, {
  25955. "label": "克拉玛依区",
  25956. "value": "650203"
  25957. }, {
  25958. "label": "白碱滩区",
  25959. "value": "650204"
  25960. }, {
  25961. "label": "乌尔禾区",
  25962. "value": "650205"
  25963. }], [{
  25964. "label": "高昌区",
  25965. "value": "650402"
  25966. }, {
  25967. "label": "鄯善县",
  25968. "value": "650421"
  25969. }, {
  25970. "label": "托克逊县",
  25971. "value": "650422"
  25972. }], [{
  25973. "label": "伊州区",
  25974. "value": "650502"
  25975. }, {
  25976. "label": "巴里坤哈萨克自治县",
  25977. "value": "650521"
  25978. }, {
  25979. "label": "伊吾县",
  25980. "value": "650522"
  25981. }], [{
  25982. "label": "昌吉市",
  25983. "value": "652301"
  25984. }, {
  25985. "label": "阜康市",
  25986. "value": "652302"
  25987. }, {
  25988. "label": "呼图壁县",
  25989. "value": "652323"
  25990. }, {
  25991. "label": "玛纳斯县",
  25992. "value": "652324"
  25993. }, {
  25994. "label": "奇台县",
  25995. "value": "652325"
  25996. }, {
  25997. "label": "吉木萨尔县",
  25998. "value": "652327"
  25999. }, {
  26000. "label": "木垒哈萨克自治县",
  26001. "value": "652328"
  26002. }], [{
  26003. "label": "博乐市",
  26004. "value": "652701"
  26005. }, {
  26006. "label": "阿拉山口市",
  26007. "value": "652702"
  26008. }, {
  26009. "label": "精河县",
  26010. "value": "652722"
  26011. }, {
  26012. "label": "温泉县",
  26013. "value": "652723"
  26014. }], [{
  26015. "label": "库尔勒市",
  26016. "value": "652801"
  26017. }, {
  26018. "label": "轮台县",
  26019. "value": "652822"
  26020. }, {
  26021. "label": "尉犁县",
  26022. "value": "652823"
  26023. }, {
  26024. "label": "若羌县",
  26025. "value": "652824"
  26026. }, {
  26027. "label": "且末县",
  26028. "value": "652825"
  26029. }, {
  26030. "label": "焉耆回族自治县",
  26031. "value": "652826"
  26032. }, {
  26033. "label": "和静县",
  26034. "value": "652827"
  26035. }, {
  26036. "label": "和硕县",
  26037. "value": "652828"
  26038. }, {
  26039. "label": "博湖县",
  26040. "value": "652829"
  26041. }, {
  26042. "label": "库尔勒经济技术开发区",
  26043. "value": "652871"
  26044. }], [{
  26045. "label": "阿克苏市",
  26046. "value": "652901"
  26047. }, {
  26048. "label": "温宿县",
  26049. "value": "652922"
  26050. }, {
  26051. "label": "库车县",
  26052. "value": "652923"
  26053. }, {
  26054. "label": "沙雅县",
  26055. "value": "652924"
  26056. }, {
  26057. "label": "新和县",
  26058. "value": "652925"
  26059. }, {
  26060. "label": "拜城县",
  26061. "value": "652926"
  26062. }, {
  26063. "label": "乌什县",
  26064. "value": "652927"
  26065. }, {
  26066. "label": "阿瓦提县",
  26067. "value": "652928"
  26068. }, {
  26069. "label": "柯坪县",
  26070. "value": "652929"
  26071. }], [{
  26072. "label": "阿图什市",
  26073. "value": "653001"
  26074. }, {
  26075. "label": "阿克陶县",
  26076. "value": "653022"
  26077. }, {
  26078. "label": "阿合奇县",
  26079. "value": "653023"
  26080. }, {
  26081. "label": "乌恰县",
  26082. "value": "653024"
  26083. }], [{
  26084. "label": "喀什市",
  26085. "value": "653101"
  26086. }, {
  26087. "label": "疏附县",
  26088. "value": "653121"
  26089. }, {
  26090. "label": "疏勒县",
  26091. "value": "653122"
  26092. }, {
  26093. "label": "英吉沙县",
  26094. "value": "653123"
  26095. }, {
  26096. "label": "泽普县",
  26097. "value": "653124"
  26098. }, {
  26099. "label": "莎车县",
  26100. "value": "653125"
  26101. }, {
  26102. "label": "叶城县",
  26103. "value": "653126"
  26104. }, {
  26105. "label": "麦盖提县",
  26106. "value": "653127"
  26107. }, {
  26108. "label": "岳普湖县",
  26109. "value": "653128"
  26110. }, {
  26111. "label": "伽师县",
  26112. "value": "653129"
  26113. }, {
  26114. "label": "巴楚县",
  26115. "value": "653130"
  26116. }, {
  26117. "label": "塔什库尔干塔吉克自治县",
  26118. "value": "653131"
  26119. }], [{
  26120. "label": "和田市",
  26121. "value": "653201"
  26122. }, {
  26123. "label": "和田县",
  26124. "value": "653221"
  26125. }, {
  26126. "label": "墨玉县",
  26127. "value": "653222"
  26128. }, {
  26129. "label": "皮山县",
  26130. "value": "653223"
  26131. }, {
  26132. "label": "洛浦县",
  26133. "value": "653224"
  26134. }, {
  26135. "label": "策勒县",
  26136. "value": "653225"
  26137. }, {
  26138. "label": "于田县",
  26139. "value": "653226"
  26140. }, {
  26141. "label": "民丰县",
  26142. "value": "653227"
  26143. }], [{
  26144. "label": "伊宁市",
  26145. "value": "654002"
  26146. }, {
  26147. "label": "奎屯市",
  26148. "value": "654003"
  26149. }, {
  26150. "label": "霍尔果斯市",
  26151. "value": "654004"
  26152. }, {
  26153. "label": "伊宁县",
  26154. "value": "654021"
  26155. }, {
  26156. "label": "察布查尔锡伯自治县",
  26157. "value": "654022"
  26158. }, {
  26159. "label": "霍城县",
  26160. "value": "654023"
  26161. }, {
  26162. "label": "巩留县",
  26163. "value": "654024"
  26164. }, {
  26165. "label": "新源县",
  26166. "value": "654025"
  26167. }, {
  26168. "label": "昭苏县",
  26169. "value": "654026"
  26170. }, {
  26171. "label": "特克斯县",
  26172. "value": "654027"
  26173. }, {
  26174. "label": "尼勒克县",
  26175. "value": "654028"
  26176. }], [{
  26177. "label": "塔城市",
  26178. "value": "654201"
  26179. }, {
  26180. "label": "乌苏市",
  26181. "value": "654202"
  26182. }, {
  26183. "label": "额敏县",
  26184. "value": "654221"
  26185. }, {
  26186. "label": "沙湾县",
  26187. "value": "654223"
  26188. }, {
  26189. "label": "托里县",
  26190. "value": "654224"
  26191. }, {
  26192. "label": "裕民县",
  26193. "value": "654225"
  26194. }, {
  26195. "label": "和布克赛尔蒙古自治县",
  26196. "value": "654226"
  26197. }], [{
  26198. "label": "阿勒泰市",
  26199. "value": "654301"
  26200. }, {
  26201. "label": "布尔津县",
  26202. "value": "654321"
  26203. }, {
  26204. "label": "富蕴县",
  26205. "value": "654322"
  26206. }, {
  26207. "label": "福海县",
  26208. "value": "654323"
  26209. }, {
  26210. "label": "哈巴河县",
  26211. "value": "654324"
  26212. }, {
  26213. "label": "青河县",
  26214. "value": "654325"
  26215. }, {
  26216. "label": "吉木乃县",
  26217. "value": "654326"
  26218. }], [{
  26219. "label": "石河子市",
  26220. "value": "659001"
  26221. }, {
  26222. "label": "阿拉尔市",
  26223. "value": "659002"
  26224. }, {
  26225. "label": "图木舒克市",
  26226. "value": "659003"
  26227. }, {
  26228. "label": "五家渠市",
  26229. "value": "659004"
  26230. }, {
  26231. "label": "铁门关市",
  26232. "value": "659006"
  26233. }]], [[{
  26234. "label": "台北",
  26235. "value": "660101"
  26236. }], [{
  26237. "label": "高雄",
  26238. "value": "660201"
  26239. }], [{
  26240. "label": "基隆",
  26241. "value": "660301"
  26242. }], [{
  26243. "label": "台中",
  26244. "value": "660401"
  26245. }], [{
  26246. "label": "台南",
  26247. "value": "660501"
  26248. }], [{
  26249. "label": "新竹",
  26250. "value": "660601"
  26251. }], [{
  26252. "label": "嘉义",
  26253. "value": "660701"
  26254. }], [{
  26255. "label": "宜兰",
  26256. "value": "660801"
  26257. }], [{
  26258. "label": "桃园",
  26259. "value": "660901"
  26260. }], [{
  26261. "label": "苗栗",
  26262. "value": "661001"
  26263. }], [{
  26264. "label": "彰化",
  26265. "value": "661101"
  26266. }], [{
  26267. "label": "南投",
  26268. "value": "661201"
  26269. }], [{
  26270. "label": "云林",
  26271. "value": "661301"
  26272. }], [{
  26273. "label": "屏东",
  26274. "value": "661401"
  26275. }], [{
  26276. "label": "台东",
  26277. "value": "661501"
  26278. }], [{
  26279. "label": "花莲",
  26280. "value": "661601"
  26281. }], [{
  26282. "label": "澎湖",
  26283. "value": "661701"
  26284. }]], [[{
  26285. "label": "香港岛",
  26286. "value": "670101"
  26287. }], [{
  26288. "label": "九龙",
  26289. "value": "670201"
  26290. }], [{
  26291. "label": "新界",
  26292. "value": "670301"
  26293. }]], [[{
  26294. "label": "澳门半岛",
  26295. "value": "680101"
  26296. }], [{
  26297. "label": "氹仔岛",
  26298. "value": "680201"
  26299. }], [{
  26300. "label": "路环岛",
  26301. "value": "680301"
  26302. }], [{
  26303. "label": "路氹城",
  26304. "value": "680401"
  26305. }]]];
  26306. var _default = areaData;
  26307. exports.default = _default;
  26308. /***/ }),
  26309. /***/ 48:
  26310. /*!************************************************************************!*\
  26311. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/queryParams.js ***!
  26312. \************************************************************************/
  26313. /*! no static exports found */
  26314. /***/ (function(module, exports, __webpack_require__) {
  26315. "use strict";
  26316. Object.defineProperty(exports, "__esModule", {
  26317. value: true
  26318. });
  26319. exports.default = void 0;
  26320. /**
  26321. * 对象转url参数
  26322. * @param {*} data,对象
  26323. * @param {*} isPrefix,是否自动加上"?"
  26324. */
  26325. function queryParams() {
  26326. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  26327. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  26328. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  26329. var prefix = isPrefix ? '?' : '';
  26330. var _result = [];
  26331. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  26332. var _loop = function _loop(key) {
  26333. var value = data[key];
  26334. // 去掉为空的参数
  26335. if (['', undefined, null].indexOf(value) >= 0) {
  26336. return "continue";
  26337. }
  26338. // 如果值为数组,另行处理
  26339. if (value.constructor === Array) {
  26340. // e.g. {ids: [1, 2, 3]}
  26341. switch (arrayFormat) {
  26342. case 'indices':
  26343. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  26344. for (var i = 0; i < value.length; i++) {
  26345. _result.push(key + '[' + i + ']=' + value[i]);
  26346. }
  26347. break;
  26348. case 'brackets':
  26349. // 结果: ids[]=1&ids[]=2&ids[]=3
  26350. value.forEach(function (_value) {
  26351. _result.push(key + '[]=' + _value);
  26352. });
  26353. break;
  26354. case 'repeat':
  26355. // 结果: ids=1&ids=2&ids=3
  26356. value.forEach(function (_value) {
  26357. _result.push(key + '=' + _value);
  26358. });
  26359. break;
  26360. case 'comma':
  26361. // 结果: ids=1,2,3
  26362. var commaStr = "";
  26363. value.forEach(function (_value) {
  26364. commaStr += (commaStr ? "," : "") + _value;
  26365. });
  26366. _result.push(key + '=' + commaStr);
  26367. break;
  26368. default:
  26369. value.forEach(function (_value) {
  26370. _result.push(key + '[]=' + _value);
  26371. });
  26372. }
  26373. } else {
  26374. _result.push(key + '=' + value);
  26375. }
  26376. };
  26377. for (var key in data) {
  26378. var _ret = _loop(key);
  26379. if (_ret === "continue") continue;
  26380. }
  26381. return _result.length ? prefix + _result.join('&') : '';
  26382. }
  26383. var _default = queryParams;
  26384. exports.default = _default;
  26385. /***/ }),
  26386. /***/ 49:
  26387. /*!******************************************************************!*\
  26388. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/route.js ***!
  26389. \******************************************************************/
  26390. /*! no static exports found */
  26391. /***/ (function(module, exports, __webpack_require__) {
  26392. "use strict";
  26393. /* WEBPACK VAR INJECTION */(function(uni) {
  26394. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  26395. Object.defineProperty(exports, "__esModule", {
  26396. value: true
  26397. });
  26398. exports.default = void 0;
  26399. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  26400. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  26401. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  26402. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  26403. /**
  26404. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  26405. * 并且带有路由拦截功能
  26406. */
  26407. var Router = /*#__PURE__*/function () {
  26408. function Router() {
  26409. (0, _classCallCheck2.default)(this, Router);
  26410. // 原始属性定义
  26411. this.config = {
  26412. type: 'navigateTo',
  26413. url: '',
  26414. delta: 1,
  26415. // navigateBack页面后退时,回退的层数
  26416. params: {},
  26417. // 传递的参数
  26418. animationType: 'pop-in',
  26419. // 窗口动画,只在APP有效
  26420. animationDuration: 300,
  26421. // 窗口动画持续时间,单位毫秒,只在APP有效
  26422. intercept: false // 是否需要拦截
  26423. };
  26424. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  26425. // 这里在构造函数中进行this绑定
  26426. this.route = this.route.bind(this);
  26427. }
  26428. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  26429. (0, _createClass2.default)(Router, [{
  26430. key: "addRootPath",
  26431. value: function addRootPath(url) {
  26432. return url[0] === '/' ? url : "/".concat(url);
  26433. }
  26434. // 整合路由参数
  26435. }, {
  26436. key: "mixinParam",
  26437. value: function mixinParam(url, params) {
  26438. url = url && this.addRootPath(url);
  26439. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  26440. // 如果有url中有get参数,转换后无需带上"?"
  26441. var query = '';
  26442. if (/.*\/.*\?.*=.*/.test(url)) {
  26443. // object对象转为get类型的参数
  26444. query = uni.$u.queryParams(params, false);
  26445. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  26446. return url += "&" + query;
  26447. } else {
  26448. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  26449. query = uni.$u.queryParams(params);
  26450. return url += query;
  26451. }
  26452. }
  26453. // 对外的方法名称
  26454. }, {
  26455. key: "route",
  26456. value: function () {
  26457. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  26458. var options,
  26459. params,
  26460. mergeConfig,
  26461. isNext,
  26462. _args = arguments;
  26463. return _regenerator.default.wrap(function _callee$(_context) {
  26464. while (1) {
  26465. switch (_context.prev = _context.next) {
  26466. case 0:
  26467. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  26468. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  26469. // 合并用户的配置和内部的默认配置
  26470. mergeConfig = {};
  26471. if (typeof options === 'string') {
  26472. // 如果options为字符串,则为route(url, params)的形式
  26473. mergeConfig.url = this.mixinParam(options, params);
  26474. mergeConfig.type = 'navigateTo';
  26475. } else {
  26476. mergeConfig = uni.$u.deepClone(options, this.config);
  26477. // 否则正常使用mergeConfig中的url和params进行拼接
  26478. mergeConfig.url = this.mixinParam(options.url, options.params);
  26479. }
  26480. if (params.intercept) {
  26481. this.config.intercept = params.intercept;
  26482. }
  26483. // params参数也带给拦截器
  26484. mergeConfig.params = params;
  26485. // 合并内外部参数
  26486. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  26487. // 判断用户是否定义了拦截器
  26488. if (!(typeof uni.$u.routeIntercept === 'function')) {
  26489. _context.next = 14;
  26490. break;
  26491. }
  26492. _context.next = 10;
  26493. return new Promise(function (resolve, reject) {
  26494. uni.$u.routeIntercept(mergeConfig, resolve);
  26495. });
  26496. case 10:
  26497. isNext = _context.sent;
  26498. // 如果isNext为true,则执行路由跳转
  26499. isNext && this.openPage(mergeConfig);
  26500. _context.next = 15;
  26501. break;
  26502. case 14:
  26503. this.openPage(mergeConfig);
  26504. case 15:
  26505. case "end":
  26506. return _context.stop();
  26507. }
  26508. }
  26509. }, _callee, this);
  26510. }));
  26511. function route() {
  26512. return _route.apply(this, arguments);
  26513. }
  26514. return route;
  26515. }() // 执行路由跳转
  26516. }, {
  26517. key: "openPage",
  26518. value: function openPage(config) {
  26519. // 解构参数
  26520. var url = config.url,
  26521. type = config.type,
  26522. delta = config.delta,
  26523. animationType = config.animationType,
  26524. animationDuration = config.animationDuration;
  26525. if (config.type == 'navigateTo' || config.type == 'to') {
  26526. uni.navigateTo({
  26527. url: url,
  26528. animationType: animationType,
  26529. animationDuration: animationDuration
  26530. });
  26531. }
  26532. if (config.type == 'redirectTo' || config.type == 'redirect') {
  26533. uni.redirectTo({
  26534. url: url
  26535. });
  26536. }
  26537. if (config.type == 'switchTab' || config.type == 'tab') {
  26538. uni.switchTab({
  26539. url: url
  26540. });
  26541. }
  26542. if (config.type == 'reLaunch' || config.type == 'launch') {
  26543. uni.reLaunch({
  26544. url: url
  26545. });
  26546. }
  26547. if (config.type == 'navigateBack' || config.type == 'back') {
  26548. uni.navigateBack({
  26549. delta: delta
  26550. });
  26551. }
  26552. }
  26553. }]);
  26554. return Router;
  26555. }();
  26556. var _default = new Router().route;
  26557. exports.default = _default;
  26558. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  26559. /***/ }),
  26560. /***/ 494:
  26561. /*!************************************************************************************!*\
  26562. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  26563. \************************************************************************************/
  26564. /*! no static exports found */
  26565. /***/ (function(module, exports, __webpack_require__) {
  26566. "use strict";
  26567. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  26568. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  26569. Object.defineProperty(exports, "__esModule", {
  26570. value: true
  26571. });
  26572. exports.default = void 0;
  26573. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  26574. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 495));
  26575. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  26576. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  26577. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  26578. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  26579. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  26580. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 496));
  26581. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 497));
  26582. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 498));
  26583. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 499));
  26584. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  26585. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  26586. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  26587. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 501));
  26588. 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(_e35) { throw _e35; }, 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(_e36) { didErr = true; err = _e36; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  26589. 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); }
  26590. 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; }
  26591. 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; }
  26592. 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; }
  26593. 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); }; }
  26594. 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; } }
  26595. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  26596. function n(e) {
  26597. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  26598. }
  26599. function s(e, t, n) {
  26600. return e(n = {
  26601. path: t,
  26602. exports: {},
  26603. require: function require(e, t) {
  26604. return function () {
  26605. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  26606. }(null == t && n.path);
  26607. }
  26608. }, n.exports), n.exports;
  26609. }
  26610. var r = s(function (e, t) {
  26611. var n;
  26612. e.exports = (n = n || function (e, t) {
  26613. var n = Object.create || function () {
  26614. function e() {}
  26615. return function (t) {
  26616. var n;
  26617. return e.prototype = t, n = new e(), e.prototype = null, n;
  26618. };
  26619. }(),
  26620. s = {},
  26621. r = s.lib = {},
  26622. i = r.Base = {
  26623. extend: function extend(e) {
  26624. var t = n(this);
  26625. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  26626. t.$super.init.apply(this, arguments);
  26627. }), t.init.prototype = t, t.$super = this, t;
  26628. },
  26629. create: function create() {
  26630. var e = this.extend();
  26631. return e.init.apply(e, arguments), e;
  26632. },
  26633. init: function init() {},
  26634. mixIn: function mixIn(e) {
  26635. for (var t in e) {
  26636. e.hasOwnProperty(t) && (this[t] = e[t]);
  26637. }
  26638. e.hasOwnProperty("toString") && (this.toString = e.toString);
  26639. },
  26640. clone: function clone() {
  26641. return this.init.prototype.extend(this);
  26642. }
  26643. },
  26644. o = r.WordArray = i.extend({
  26645. init: function init(e, n) {
  26646. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  26647. },
  26648. toString: function toString(e) {
  26649. return (e || c).stringify(this);
  26650. },
  26651. concat: function concat(e) {
  26652. var t = this.words,
  26653. n = e.words,
  26654. s = this.sigBytes,
  26655. r = e.sigBytes;
  26656. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  26657. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  26658. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  26659. } else for (i = 0; i < r; i += 4) {
  26660. t[s + i >>> 2] = n[i >>> 2];
  26661. }
  26662. return this.sigBytes += r, this;
  26663. },
  26664. clamp: function clamp() {
  26665. var t = this.words,
  26666. n = this.sigBytes;
  26667. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  26668. },
  26669. clone: function clone() {
  26670. var e = i.clone.call(this);
  26671. return e.words = this.words.slice(0), e;
  26672. },
  26673. random: function random(t) {
  26674. for (var n, s = [], r = function r(t) {
  26675. t = t;
  26676. var n = 987654321,
  26677. s = 4294967295;
  26678. return function () {
  26679. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  26680. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  26681. };
  26682. }, i = 0; i < t; i += 4) {
  26683. var a = r(4294967296 * (n || e.random()));
  26684. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  26685. }
  26686. return new o.init(s, t);
  26687. }
  26688. }),
  26689. a = s.enc = {},
  26690. c = a.Hex = {
  26691. stringify: function stringify(e) {
  26692. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  26693. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  26694. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  26695. }
  26696. return s.join("");
  26697. },
  26698. parse: function parse(e) {
  26699. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  26700. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  26701. }
  26702. return new o.init(n, t / 2);
  26703. }
  26704. },
  26705. u = a.Latin1 = {
  26706. stringify: function stringify(e) {
  26707. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  26708. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  26709. s.push(String.fromCharCode(i));
  26710. }
  26711. return s.join("");
  26712. },
  26713. parse: function parse(e) {
  26714. for (var t = e.length, n = [], s = 0; s < t; s++) {
  26715. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  26716. }
  26717. return new o.init(n, t);
  26718. }
  26719. },
  26720. h = a.Utf8 = {
  26721. stringify: function stringify(e) {
  26722. try {
  26723. return decodeURIComponent(escape(u.stringify(e)));
  26724. } catch (e) {
  26725. throw new Error("Malformed UTF-8 data");
  26726. }
  26727. },
  26728. parse: function parse(e) {
  26729. return u.parse(unescape(encodeURIComponent(e)));
  26730. }
  26731. },
  26732. l = r.BufferedBlockAlgorithm = i.extend({
  26733. reset: function reset() {
  26734. this._data = new o.init(), this._nDataBytes = 0;
  26735. },
  26736. _append: function _append(e) {
  26737. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  26738. },
  26739. _process: function _process(t) {
  26740. var n = this._data,
  26741. s = n.words,
  26742. r = n.sigBytes,
  26743. i = this.blockSize,
  26744. a = r / (4 * i),
  26745. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  26746. u = e.min(4 * c, r);
  26747. if (c) {
  26748. for (var h = 0; h < c; h += i) {
  26749. this._doProcessBlock(s, h);
  26750. }
  26751. var l = s.splice(0, c);
  26752. n.sigBytes -= u;
  26753. }
  26754. return new o.init(l, u);
  26755. },
  26756. clone: function clone() {
  26757. var e = i.clone.call(this);
  26758. return e._data = this._data.clone(), e;
  26759. },
  26760. _minBufferSize: 0
  26761. });
  26762. r.Hasher = l.extend({
  26763. cfg: i.extend(),
  26764. init: function init(e) {
  26765. this.cfg = this.cfg.extend(e), this.reset();
  26766. },
  26767. reset: function reset() {
  26768. l.reset.call(this), this._doReset();
  26769. },
  26770. update: function update(e) {
  26771. return this._append(e), this._process(), this;
  26772. },
  26773. finalize: function finalize(e) {
  26774. return e && this._append(e), this._doFinalize();
  26775. },
  26776. blockSize: 16,
  26777. _createHelper: function _createHelper(e) {
  26778. return function (t, n) {
  26779. return new e.init(n).finalize(t);
  26780. };
  26781. },
  26782. _createHmacHelper: function _createHmacHelper(e) {
  26783. return function (t, n) {
  26784. return new d.HMAC.init(e, n).finalize(t);
  26785. };
  26786. }
  26787. });
  26788. var d = s.algo = {};
  26789. return s;
  26790. }(Math), n);
  26791. }),
  26792. i = r,
  26793. o = (s(function (e, t) {
  26794. var n;
  26795. e.exports = (n = i, function (e) {
  26796. var t = n,
  26797. s = t.lib,
  26798. r = s.WordArray,
  26799. i = s.Hasher,
  26800. o = t.algo,
  26801. a = [];
  26802. !function () {
  26803. for (var t = 0; t < 64; t++) {
  26804. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  26805. }
  26806. }();
  26807. var c = o.MD5 = i.extend({
  26808. _doReset: function _doReset() {
  26809. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  26810. },
  26811. _doProcessBlock: function _doProcessBlock(e, t) {
  26812. for (var n = 0; n < 16; n++) {
  26813. var s = t + n,
  26814. r = e[s];
  26815. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  26816. }
  26817. var i = this._hash.words,
  26818. o = e[t + 0],
  26819. c = e[t + 1],
  26820. p = e[t + 2],
  26821. f = e[t + 3],
  26822. g = e[t + 4],
  26823. m = e[t + 5],
  26824. y = e[t + 6],
  26825. _ = e[t + 7],
  26826. w = e[t + 8],
  26827. v = e[t + 9],
  26828. I = e[t + 10],
  26829. S = e[t + 11],
  26830. b = e[t + 12],
  26831. k = e[t + 13],
  26832. C = e[t + 14],
  26833. T = e[t + 15],
  26834. P = i[0],
  26835. A = i[1],
  26836. E = i[2],
  26837. O = i[3];
  26838. 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, I, 17, a[10]), A = u(A, E, O, P, S, 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, C, 17, a[14]), P = h(P, A = u(A, E, O, P, T, 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, S, 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, I, 9, a[21]), E = h(E, O, P, A, T, 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, C, 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, S, 16, a[34]), A = l(A, E, O, P, C, 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, I, 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, T, 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, C, 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, I, 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, T, 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, S, 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;
  26839. },
  26840. _doFinalize: function _doFinalize() {
  26841. var t = this._data,
  26842. n = t.words,
  26843. s = 8 * this._nDataBytes,
  26844. r = 8 * t.sigBytes;
  26845. n[r >>> 5] |= 128 << 24 - r % 32;
  26846. var i = e.floor(s / 4294967296),
  26847. o = s;
  26848. 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();
  26849. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  26850. var h = c[u];
  26851. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  26852. }
  26853. return a;
  26854. },
  26855. clone: function clone() {
  26856. var e = i.clone.call(this);
  26857. return e._hash = this._hash.clone(), e;
  26858. }
  26859. });
  26860. function u(e, t, n, s, r, i, o) {
  26861. var a = e + (t & n | ~t & s) + r + o;
  26862. return (a << i | a >>> 32 - i) + t;
  26863. }
  26864. function h(e, t, n, s, r, i, o) {
  26865. var a = e + (t & s | n & ~s) + r + o;
  26866. return (a << i | a >>> 32 - i) + t;
  26867. }
  26868. function l(e, t, n, s, r, i, o) {
  26869. var a = e + (t ^ n ^ s) + r + o;
  26870. return (a << i | a >>> 32 - i) + t;
  26871. }
  26872. function d(e, t, n, s, r, i, o) {
  26873. var a = e + (n ^ (t | ~s)) + r + o;
  26874. return (a << i | a >>> 32 - i) + t;
  26875. }
  26876. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  26877. }(Math), n.MD5);
  26878. }), s(function (e, t) {
  26879. var n;
  26880. e.exports = (n = i, void function () {
  26881. var e = n,
  26882. t = e.lib.Base,
  26883. s = e.enc.Utf8;
  26884. e.algo.HMAC = t.extend({
  26885. init: function init(e, t) {
  26886. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  26887. var n = e.blockSize,
  26888. r = 4 * n;
  26889. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  26890. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  26891. a[u] ^= 1549556828, c[u] ^= 909522486;
  26892. }
  26893. i.sigBytes = o.sigBytes = r, this.reset();
  26894. },
  26895. reset: function reset() {
  26896. var e = this._hasher;
  26897. e.reset(), e.update(this._iKey);
  26898. },
  26899. update: function update(e) {
  26900. return this._hasher.update(e), this;
  26901. },
  26902. finalize: function finalize(e) {
  26903. var t = this._hasher,
  26904. n = t.finalize(e);
  26905. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  26906. }
  26907. });
  26908. }());
  26909. }), s(function (e, t) {
  26910. e.exports = i.HmacMD5;
  26911. })),
  26912. a = s(function (e, t) {
  26913. e.exports = i.enc.Utf8;
  26914. }),
  26915. c = s(function (e, t) {
  26916. var n;
  26917. e.exports = (n = i, function () {
  26918. var e = n,
  26919. t = e.lib.WordArray;
  26920. function s(e, n, s) {
  26921. for (var r = [], i = 0, o = 0; o < n; o++) {
  26922. if (o % 4) {
  26923. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  26924. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  26925. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  26926. }
  26927. }
  26928. return t.create(r, i);
  26929. }
  26930. e.enc.Base64 = {
  26931. stringify: function stringify(e) {
  26932. var t = e.words,
  26933. n = e.sigBytes,
  26934. s = this._map;
  26935. e.clamp();
  26936. for (var r = [], i = 0; i < n; i += 3) {
  26937. 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++) {
  26938. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  26939. }
  26940. }
  26941. var c = s.charAt(64);
  26942. if (c) for (; r.length % 4;) {
  26943. r.push(c);
  26944. }
  26945. return r.join("");
  26946. },
  26947. parse: function parse(e) {
  26948. var t = e.length,
  26949. n = this._map,
  26950. r = this._reverseMap;
  26951. if (!r) {
  26952. r = this._reverseMap = [];
  26953. for (var i = 0; i < n.length; i++) {
  26954. r[n.charCodeAt(i)] = i;
  26955. }
  26956. }
  26957. var o = n.charAt(64);
  26958. if (o) {
  26959. var a = e.indexOf(o);
  26960. -1 !== a && (t = a);
  26961. }
  26962. return s(e, t, r);
  26963. },
  26964. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  26965. };
  26966. }(), n.enc.Base64);
  26967. });
  26968. var u = "FUNCTION",
  26969. h = "OBJECT",
  26970. l = "CLIENT_DB",
  26971. d = "pending",
  26972. p = "fullfilled",
  26973. f = "rejected";
  26974. function g(e) {
  26975. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  26976. }
  26977. function m(e) {
  26978. return "object" === g(e);
  26979. }
  26980. function y(e) {
  26981. return "function" == typeof e;
  26982. }
  26983. function _(e) {
  26984. return function () {
  26985. try {
  26986. return e.apply(e, arguments);
  26987. } catch (e) {
  26988. console.error(e);
  26989. }
  26990. };
  26991. }
  26992. var w = "REJECTED",
  26993. v = "NOT_PENDING";
  26994. var I = /*#__PURE__*/function () {
  26995. function I() {
  26996. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26997. e = _ref.createPromise,
  26998. _ref$retryRule = _ref.retryRule,
  26999. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  27000. (0, _classCallCheck2.default)(this, I);
  27001. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  27002. }
  27003. (0, _createClass2.default)(I, [{
  27004. key: "needRetry",
  27005. get: function get() {
  27006. if (!this.status) return !0;
  27007. switch (this.retryRule) {
  27008. case w:
  27009. return this.status === f;
  27010. case v:
  27011. return this.status !== d;
  27012. }
  27013. }
  27014. }, {
  27015. key: "exec",
  27016. value: function exec() {
  27017. var _this = this;
  27018. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  27019. return _this.status = p, Promise.resolve(e);
  27020. }, function (e) {
  27021. return _this.status = f, Promise.reject(e);
  27022. }), this.promise) : this.promise;
  27023. }
  27024. }]);
  27025. return I;
  27026. }();
  27027. function S(e) {
  27028. return e && "string" == typeof e ? JSON.parse(e) : e;
  27029. }
  27030. var b = "development" === "development",
  27031. k = "mp-weixin",
  27032. C = "true" === undefined || !0 === undefined,
  27033. T = S([]),
  27034. P = "h5" === k ? "web" : "app-plus" === k ? "app" : k,
  27035. A = S(undefined),
  27036. E = S(undefined) || [],
  27037. O = true;
  27038. var x = "";
  27039. try {
  27040. x = (__webpack_require__(/*! uni-stat-config */ 502).default || __webpack_require__(/*! uni-stat-config */ 502)).appid;
  27041. } catch (e) {}
  27042. var R = {};
  27043. function U(e) {
  27044. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27045. var n, s;
  27046. return n = R, s = e, Object.prototype.hasOwnProperty.call(n, s) || (R[e] = t), R[e];
  27047. }
  27048. "app" === P && (R = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  27049. var L = ["invoke", "success", "fail", "complete"],
  27050. N = U("_globalUniCloudInterceptor");
  27051. function D(e, t) {
  27052. N[e] || (N[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  27053. L.indexOf(n) > -1 && function (e, t, n) {
  27054. var s = N[e][t];
  27055. s || (s = N[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  27056. }(e, n, t[n]);
  27057. });
  27058. }
  27059. function F(e, t) {
  27060. N[e] || (N[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  27061. L.indexOf(n) > -1 && function (e, t, n) {
  27062. var s = N[e][t];
  27063. if (!s) return;
  27064. var r = s.indexOf(n);
  27065. r > -1 && s.splice(r, 1);
  27066. }(e, n, t[n]);
  27067. }) : delete N[e];
  27068. }
  27069. function q(e, t) {
  27070. return e && 0 !== e.length ? e.reduce(function (e, n) {
  27071. return e.then(function () {
  27072. return n(t);
  27073. });
  27074. }, Promise.resolve()) : Promise.resolve();
  27075. }
  27076. function M(e, t) {
  27077. return N[e] && N[e][t] || [];
  27078. }
  27079. function K(e) {
  27080. D("callObject", e);
  27081. }
  27082. var j = U("_globalUniCloudListener"),
  27083. B = "response",
  27084. $ = "needLogin",
  27085. W = "refreshToken",
  27086. z = "clientdb",
  27087. J = "cloudfunction",
  27088. H = "cloudobject";
  27089. function G(e) {
  27090. return j[e] || (j[e] = []), j[e];
  27091. }
  27092. function V(e, t) {
  27093. var n = G(e);
  27094. n.includes(t) || n.push(t);
  27095. }
  27096. function Y(e, t) {
  27097. var n = G(e),
  27098. s = n.indexOf(t);
  27099. -1 !== s && n.splice(s, 1);
  27100. }
  27101. function Q(e, t) {
  27102. var n = G(e);
  27103. for (var _e2 = 0; _e2 < n.length; _e2++) {
  27104. (0, n[_e2])(t);
  27105. }
  27106. }
  27107. var X,
  27108. Z = !1;
  27109. function ee() {
  27110. return X || (X = new Promise(function (e) {
  27111. Z && e(), function t() {
  27112. if ("function" == typeof getCurrentPages) {
  27113. var _t2 = getCurrentPages();
  27114. _t2 && _t2[0] && (Z = !0, e());
  27115. }
  27116. Z || setTimeout(function () {
  27117. t();
  27118. }, 30);
  27119. }();
  27120. }), X);
  27121. }
  27122. function te(e) {
  27123. var t = {};
  27124. for (var _n2 in e) {
  27125. var _s2 = e[_n2];
  27126. y(_s2) && (t[_n2] = _(_s2));
  27127. }
  27128. return t;
  27129. }
  27130. var ne = /*#__PURE__*/function (_Error) {
  27131. (0, _inherits2.default)(ne, _Error);
  27132. var _super = _createSuper(ne);
  27133. function ne(e) {
  27134. var _this2;
  27135. (0, _classCallCheck2.default)(this, ne);
  27136. _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;
  27137. return _this2;
  27138. }
  27139. (0, _createClass2.default)(ne, [{
  27140. key: "toJson",
  27141. value: function toJson() {
  27142. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  27143. if (!(e >= 10)) return e++, {
  27144. errCode: this.errCode,
  27145. errMsg: this.errMsg,
  27146. errSubject: this.errSubject,
  27147. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  27148. };
  27149. }
  27150. }]);
  27151. return ne;
  27152. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  27153. var se = {
  27154. request: function request(e) {
  27155. return uni.request(e);
  27156. },
  27157. uploadFile: function uploadFile(e) {
  27158. return uni.uploadFile(e);
  27159. },
  27160. setStorageSync: function setStorageSync(e, t) {
  27161. return uni.setStorageSync(e, t);
  27162. },
  27163. getStorageSync: function getStorageSync(e) {
  27164. return uni.getStorageSync(e);
  27165. },
  27166. removeStorageSync: function removeStorageSync(e) {
  27167. return uni.removeStorageSync(e);
  27168. },
  27169. clearStorageSync: function clearStorageSync() {
  27170. return uni.clearStorageSync();
  27171. }
  27172. };
  27173. function re() {
  27174. return {
  27175. token: se.getStorageSync("uni_id_token") || se.getStorageSync("uniIdToken"),
  27176. tokenExpired: se.getStorageSync("uni_id_token_expired")
  27177. };
  27178. }
  27179. function ie() {
  27180. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27181. e = _ref2.token,
  27182. t = _ref2.tokenExpired;
  27183. e && se.setStorageSync("uni_id_token", e), t && se.setStorageSync("uni_id_token_expired", t);
  27184. }
  27185. var oe, ae;
  27186. function ce() {
  27187. return oe || (oe = uni.getSystemInfoSync()), oe;
  27188. }
  27189. function ue() {
  27190. var e, t;
  27191. try {
  27192. if (uni.getLaunchOptionsSync) {
  27193. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  27194. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  27195. _n3 = _uni$getLaunchOptions.scene,
  27196. _s3 = _uni$getLaunchOptions.channel;
  27197. e = _s3, t = _n3;
  27198. }
  27199. } catch (e) {}
  27200. return {
  27201. channel: e,
  27202. scene: t
  27203. };
  27204. }
  27205. function he() {
  27206. var e = uni.getLocale && uni.getLocale() || "en";
  27207. if (ae) return _objectSpread(_objectSpread({}, ae), {}, {
  27208. locale: e,
  27209. LOCALE: e
  27210. });
  27211. var t = ce(),
  27212. n = t.deviceId,
  27213. s = t.osName,
  27214. r = t.uniPlatform,
  27215. i = t.appId,
  27216. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  27217. for (var _e3 = 0; _e3 < o.length; _e3++) {
  27218. delete t[o[_e3]];
  27219. }
  27220. return ae = _objectSpread(_objectSpread({
  27221. PLATFORM: r,
  27222. OS: s,
  27223. APPID: i,
  27224. DEVICEID: n
  27225. }, ue()), t), _objectSpread(_objectSpread({}, ae), {}, {
  27226. locale: e,
  27227. LOCALE: e
  27228. });
  27229. }
  27230. var le = {
  27231. sign: function sign(e, t) {
  27232. var n = "";
  27233. return Object.keys(e).sort().forEach(function (t) {
  27234. e[t] && (n = n + "&" + t + "=" + e[t]);
  27235. }), n = n.slice(1), o(n, t).toString();
  27236. },
  27237. wrappedRequest: function wrappedRequest(e, t) {
  27238. return new Promise(function (n, s) {
  27239. t(Object.assign(e, {
  27240. complete: function complete(e) {
  27241. e || (e = {}), b && "web" === P && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  27242. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  27243. if (!e.statusCode || e.statusCode >= 400) return s(new ne({
  27244. code: "SYS_ERR",
  27245. message: e.errMsg || "request:fail",
  27246. requestId: t
  27247. }));
  27248. var r = e.data;
  27249. if (r.error) return s(new ne({
  27250. code: r.error.code,
  27251. message: r.error.message,
  27252. requestId: t
  27253. }));
  27254. r.result = r.data, r.requestId = t, delete r.data, n(r);
  27255. }
  27256. }));
  27257. });
  27258. },
  27259. toBase64: function toBase64(e) {
  27260. return c.stringify(a.parse(e));
  27261. }
  27262. },
  27263. de = {
  27264. "uniCloud.init.paramRequired": "{param} required",
  27265. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27266. };
  27267. var _e4 = (0, _uniI18n.initVueI18n)({
  27268. "zh-Hans": {
  27269. "uniCloud.init.paramRequired": "缺少参数:{param}",
  27270. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  27271. },
  27272. "zh-Hant": {
  27273. "uniCloud.init.paramRequired": "缺少参数:{param}",
  27274. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  27275. },
  27276. en: de,
  27277. fr: {
  27278. "uniCloud.init.paramRequired": "{param} required",
  27279. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27280. },
  27281. es: {
  27282. "uniCloud.init.paramRequired": "{param} required",
  27283. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27284. },
  27285. ja: de
  27286. }, "zh-Hans"),
  27287. pe = _e4.t;
  27288. var fe = /*#__PURE__*/function () {
  27289. function fe(e) {
  27290. var _this3 = this;
  27291. (0, _classCallCheck2.default)(this, fe);
  27292. ["spaceId", "clientSecret"].forEach(function (t) {
  27293. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(pe("uniCloud.init.paramRequired", {
  27294. param: t
  27295. }));
  27296. }), this.config = Object.assign({}, {
  27297. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  27298. }, 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 = se, this._getAccessTokenPromiseHub = new I({
  27299. createPromise: function createPromise() {
  27300. return _this3.requestAuth(_this3.setupRequest({
  27301. method: "serverless.auth.user.anonymousAuthorize",
  27302. params: "{}"
  27303. }, "auth")).then(function (e) {
  27304. if (!e.result || !e.result.accessToken) throw new ne({
  27305. code: "AUTH_FAILED",
  27306. message: "获取accessToken失败"
  27307. });
  27308. _this3.setAccessToken(e.result.accessToken);
  27309. });
  27310. },
  27311. retryRule: v
  27312. });
  27313. }
  27314. (0, _createClass2.default)(fe, [{
  27315. key: "hasAccessToken",
  27316. get: function get() {
  27317. return !!this.accessToken;
  27318. }
  27319. }, {
  27320. key: "setAccessToken",
  27321. value: function setAccessToken(e) {
  27322. this.accessToken = e;
  27323. }
  27324. }, {
  27325. key: "requestWrapped",
  27326. value: function requestWrapped(e) {
  27327. return le.wrappedRequest(e, this.adapter.request);
  27328. }
  27329. }, {
  27330. key: "requestAuth",
  27331. value: function requestAuth(e) {
  27332. return this.requestWrapped(e);
  27333. }
  27334. }, {
  27335. key: "request",
  27336. value: function request(e, t) {
  27337. var _this4 = this;
  27338. return Promise.resolve().then(function () {
  27339. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  27340. return new Promise(function (e, n) {
  27341. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  27342. }).then(function () {
  27343. return _this4.getAccessToken();
  27344. }).then(function () {
  27345. var t = _this4.rebuildRequest(e);
  27346. return _this4.request(t, !0);
  27347. });
  27348. }) : _this4.getAccessToken().then(function () {
  27349. var t = _this4.rebuildRequest(e);
  27350. return _this4.request(t, !0);
  27351. });
  27352. });
  27353. }
  27354. }, {
  27355. key: "rebuildRequest",
  27356. value: function rebuildRequest(e) {
  27357. var t = Object.assign({}, e);
  27358. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = le.sign(t.data, this.config.clientSecret), t;
  27359. }
  27360. }, {
  27361. key: "setupRequest",
  27362. value: function setupRequest(e, t) {
  27363. var n = Object.assign({}, e, {
  27364. spaceId: this.config.spaceId,
  27365. timestamp: Date.now()
  27366. }),
  27367. s = {
  27368. "Content-Type": "application/json"
  27369. };
  27370. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret), {
  27371. url: this.config.requestUrl,
  27372. method: "POST",
  27373. data: n,
  27374. dataType: "json",
  27375. header: s
  27376. };
  27377. }
  27378. }, {
  27379. key: "getAccessToken",
  27380. value: function getAccessToken() {
  27381. return this._getAccessTokenPromiseHub.exec();
  27382. }
  27383. }, {
  27384. key: "authorize",
  27385. value: function () {
  27386. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  27387. return _regenerator.default.wrap(function _callee$(_context) {
  27388. while (1) {
  27389. switch (_context.prev = _context.next) {
  27390. case 0:
  27391. _context.next = 2;
  27392. return this.getAccessToken();
  27393. case 2:
  27394. case "end":
  27395. return _context.stop();
  27396. }
  27397. }
  27398. }, _callee, this);
  27399. }));
  27400. function authorize() {
  27401. return _authorize.apply(this, arguments);
  27402. }
  27403. return authorize;
  27404. }()
  27405. }, {
  27406. key: "callFunction",
  27407. value: function callFunction(e) {
  27408. var t = {
  27409. method: "serverless.function.runtime.invoke",
  27410. params: JSON.stringify({
  27411. functionTarget: e.name,
  27412. functionArgs: e.data || {}
  27413. })
  27414. };
  27415. return this.request(this.setupRequest(t));
  27416. }
  27417. }, {
  27418. key: "getOSSUploadOptionsFromPath",
  27419. value: function getOSSUploadOptionsFromPath(e) {
  27420. var t = {
  27421. method: "serverless.file.resource.generateProximalSign",
  27422. params: JSON.stringify(e)
  27423. };
  27424. return this.request(this.setupRequest(t));
  27425. }
  27426. }, {
  27427. key: "uploadFileToOSS",
  27428. value: function uploadFileToOSS(_ref3) {
  27429. var _this5 = this;
  27430. var e = _ref3.url,
  27431. t = _ref3.formData,
  27432. n = _ref3.name,
  27433. s = _ref3.filePath,
  27434. r = _ref3.fileType,
  27435. i = _ref3.onUploadProgress;
  27436. return new Promise(function (o, a) {
  27437. var c = _this5.adapter.uploadFile({
  27438. url: e,
  27439. formData: t,
  27440. name: n,
  27441. filePath: s,
  27442. fileType: r,
  27443. header: {
  27444. "X-OSS-server-side-encrpytion": "AES256"
  27445. },
  27446. success: function success(e) {
  27447. e && e.statusCode < 400 ? o(e) : a(new ne({
  27448. code: "UPLOAD_FAILED",
  27449. message: "文件上传失败"
  27450. }));
  27451. },
  27452. fail: function fail(e) {
  27453. a(new ne({
  27454. code: e.code || "UPLOAD_FAILED",
  27455. message: e.message || e.errMsg || "文件上传失败"
  27456. }));
  27457. }
  27458. });
  27459. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  27460. i({
  27461. loaded: e.totalBytesSent,
  27462. total: e.totalBytesExpectedToSend
  27463. });
  27464. });
  27465. });
  27466. }
  27467. }, {
  27468. key: "reportOSSUpload",
  27469. value: function reportOSSUpload(e) {
  27470. var t = {
  27471. method: "serverless.file.resource.report",
  27472. params: JSON.stringify(e)
  27473. };
  27474. return this.request(this.setupRequest(t));
  27475. }
  27476. }, {
  27477. key: "uploadFile",
  27478. value: function () {
  27479. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  27480. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _, _e5, w;
  27481. return _regenerator.default.wrap(function _callee2$(_context2) {
  27482. while (1) {
  27483. switch (_context2.prev = _context2.next) {
  27484. case 0:
  27485. e = _ref4.filePath, t = _ref4.cloudPath, _ref4$fileType = _ref4.fileType, n = _ref4$fileType === void 0 ? "image" : _ref4$fileType, _ref4$cloudPathAsReal = _ref4.cloudPathAsRealPath, s = _ref4$cloudPathAsReal === void 0 ? !1 : _ref4$cloudPathAsReal, r = _ref4.onUploadProgress, i = _ref4.config;
  27486. if (!("string" !== g(t))) {
  27487. _context2.next = 3;
  27488. break;
  27489. }
  27490. throw new ne({
  27491. code: "INVALID_PARAM",
  27492. message: "cloudPath必须为字符串类型"
  27493. });
  27494. case 3:
  27495. if (t = t.trim()) {
  27496. _context2.next = 5;
  27497. break;
  27498. }
  27499. throw new ne({
  27500. code: "INVALID_PARAM",
  27501. message: "cloudPath不可为空"
  27502. });
  27503. case 5:
  27504. if (!/:\/\//.test(t)) {
  27505. _context2.next = 7;
  27506. break;
  27507. }
  27508. throw new ne({
  27509. code: "INVALID_PARAM",
  27510. message: "cloudPath不合法"
  27511. });
  27512. case 7:
  27513. o = i && i.envType || this.config.envType;
  27514. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  27515. _context2.next = 10;
  27516. break;
  27517. }
  27518. throw new ne({
  27519. code: "INVALID_PARAM",
  27520. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  27521. });
  27522. case 10:
  27523. _context2.next = 12;
  27524. return this.getOSSUploadOptionsFromPath({
  27525. env: o,
  27526. filename: s ? t.split("/").pop() : t,
  27527. fileId: s ? t : void 0
  27528. });
  27529. case 12:
  27530. a = _context2.sent.result;
  27531. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  27532. u = a.securityToken;
  27533. h = a.accessKeyId;
  27534. l = a.signature;
  27535. d = a.host;
  27536. p = a.ossPath;
  27537. f = a.id;
  27538. m = a.policy;
  27539. y = a.ossCallbackUrl;
  27540. _ = {
  27541. "Cache-Control": "max-age=2592000",
  27542. "Content-Disposition": "attachment",
  27543. OSSAccessKeyId: h,
  27544. Signature: l,
  27545. host: d,
  27546. id: f,
  27547. key: p,
  27548. policy: m,
  27549. success_action_status: 200
  27550. };
  27551. if (u && (_["x-oss-security-token"] = u), y) {
  27552. _e5 = JSON.stringify({
  27553. callbackUrl: y,
  27554. callbackBody: JSON.stringify({
  27555. fileId: f,
  27556. spaceId: this.config.spaceId
  27557. }),
  27558. callbackBodyType: "application/json"
  27559. });
  27560. _.callback = le.toBase64(_e5);
  27561. }
  27562. w = {
  27563. url: "https://" + a.host,
  27564. formData: _,
  27565. fileName: "file",
  27566. name: "file",
  27567. filePath: e,
  27568. fileType: n
  27569. };
  27570. _context2.next = 27;
  27571. return this.uploadFileToOSS(Object.assign({}, w, {
  27572. onUploadProgress: r
  27573. }));
  27574. case 27:
  27575. if (!y) {
  27576. _context2.next = 29;
  27577. break;
  27578. }
  27579. return _context2.abrupt("return", {
  27580. success: !0,
  27581. filePath: e,
  27582. fileID: c
  27583. });
  27584. case 29:
  27585. _context2.next = 31;
  27586. return this.reportOSSUpload({
  27587. id: f
  27588. });
  27589. case 31:
  27590. if (!_context2.sent.success) {
  27591. _context2.next = 33;
  27592. break;
  27593. }
  27594. return _context2.abrupt("return", {
  27595. success: !0,
  27596. filePath: e,
  27597. fileID: c
  27598. });
  27599. case 33:
  27600. throw new ne({
  27601. code: "UPLOAD_FAILED",
  27602. message: "文件上传失败"
  27603. });
  27604. case 34:
  27605. case "end":
  27606. return _context2.stop();
  27607. }
  27608. }
  27609. }, _callee2, this);
  27610. }));
  27611. function uploadFile(_x) {
  27612. return _uploadFile.apply(this, arguments);
  27613. }
  27614. return uploadFile;
  27615. }()
  27616. }, {
  27617. key: "getTempFileURL",
  27618. value: function getTempFileURL() {
  27619. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27620. e = _ref5.fileList;
  27621. return new Promise(function (t, n) {
  27622. Array.isArray(e) && 0 !== e.length || n(new ne({
  27623. code: "INVALID_PARAM",
  27624. message: "fileList的元素必须是非空的字符串"
  27625. })), t({
  27626. fileList: e.map(function (e) {
  27627. return {
  27628. fileID: e,
  27629. tempFileURL: e
  27630. };
  27631. })
  27632. });
  27633. });
  27634. }
  27635. }, {
  27636. key: "getFileInfo",
  27637. value: function () {
  27638. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  27639. var _ref6,
  27640. e,
  27641. t,
  27642. _args3 = arguments;
  27643. return _regenerator.default.wrap(function _callee3$(_context3) {
  27644. while (1) {
  27645. switch (_context3.prev = _context3.next) {
  27646. case 0:
  27647. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  27648. if (!(!Array.isArray(e) || 0 === e.length)) {
  27649. _context3.next = 3;
  27650. break;
  27651. }
  27652. throw new ne({
  27653. code: "INVALID_PARAM",
  27654. message: "fileList的元素必须是非空的字符串"
  27655. });
  27656. case 3:
  27657. t = {
  27658. method: "serverless.file.resource.info",
  27659. params: JSON.stringify({
  27660. id: e.map(function (e) {
  27661. return e.split("?")[0];
  27662. }).join(",")
  27663. })
  27664. };
  27665. _context3.next = 6;
  27666. return this.request(this.setupRequest(t));
  27667. case 6:
  27668. _context3.t0 = _context3.sent.result;
  27669. return _context3.abrupt("return", {
  27670. fileList: _context3.t0
  27671. });
  27672. case 8:
  27673. case "end":
  27674. return _context3.stop();
  27675. }
  27676. }
  27677. }, _callee3, this);
  27678. }));
  27679. function getFileInfo() {
  27680. return _getFileInfo.apply(this, arguments);
  27681. }
  27682. return getFileInfo;
  27683. }()
  27684. }]);
  27685. return fe;
  27686. }();
  27687. var ge = {
  27688. init: function init(e) {
  27689. var t = new fe(e),
  27690. n = {
  27691. signInAnonymously: function signInAnonymously() {
  27692. return t.authorize();
  27693. },
  27694. getLoginState: function getLoginState() {
  27695. return Promise.resolve(!1);
  27696. }
  27697. };
  27698. return t.auth = function () {
  27699. return n;
  27700. }, t.customAuth = t.auth, t;
  27701. }
  27702. };
  27703. var me = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  27704. var ye;
  27705. !function (e) {
  27706. e.local = "local", e.none = "none", e.session = "session";
  27707. }(ye || (ye = {}));
  27708. var _e = function _e() {};
  27709. var we = function we() {
  27710. var e;
  27711. if (!Promise) {
  27712. e = function e() {}, e.promise = {};
  27713. var _t3 = function _t3() {
  27714. throw new ne({
  27715. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  27716. });
  27717. };
  27718. return Object.defineProperty(e.promise, "then", {
  27719. get: _t3
  27720. }), Object.defineProperty(e.promise, "catch", {
  27721. get: _t3
  27722. }), e;
  27723. }
  27724. var t = new Promise(function (t, n) {
  27725. e = function e(_e6, s) {
  27726. return _e6 ? n(_e6) : t(s);
  27727. };
  27728. });
  27729. return e.promise = t, e;
  27730. };
  27731. function ve(e) {
  27732. return void 0 === e;
  27733. }
  27734. function Ie(e) {
  27735. return "[object Null]" === Object.prototype.toString.call(e);
  27736. }
  27737. var Se;
  27738. function be(e) {
  27739. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  27740. var n;
  27741. var _iterator = _createForOfIteratorHelper(t),
  27742. _step;
  27743. try {
  27744. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  27745. var _e7 = _step.value;
  27746. var _t4 = _e7.isMatch,
  27747. _n4 = _e7.genAdapter,
  27748. _s4 = _e7.runtime;
  27749. if (_t4()) return {
  27750. adapter: _n4(),
  27751. runtime: _s4
  27752. };
  27753. }
  27754. } catch (err) {
  27755. _iterator.e(err);
  27756. } finally {
  27757. _iterator.f();
  27758. }
  27759. }
  27760. !function (e) {
  27761. e.WEB = "web", e.WX_MP = "wx_mp";
  27762. }(Se || (Se = {}));
  27763. var ke = {
  27764. adapter: null,
  27765. runtime: void 0
  27766. },
  27767. Ce = ["anonymousUuidKey"];
  27768. var Te = /*#__PURE__*/function (_e8) {
  27769. (0, _inherits2.default)(Te, _e8);
  27770. var _super2 = _createSuper(Te);
  27771. function Te() {
  27772. var _this6;
  27773. (0, _classCallCheck2.default)(this, Te);
  27774. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  27775. return _this6;
  27776. }
  27777. (0, _createClass2.default)(Te, [{
  27778. key: "setItem",
  27779. value: function setItem(e, t) {
  27780. ke.adapter.root.tcbObject[e] = t;
  27781. }
  27782. }, {
  27783. key: "getItem",
  27784. value: function getItem(e) {
  27785. return ke.adapter.root.tcbObject[e];
  27786. }
  27787. }, {
  27788. key: "removeItem",
  27789. value: function removeItem(e) {
  27790. delete ke.adapter.root.tcbObject[e];
  27791. }
  27792. }, {
  27793. key: "clear",
  27794. value: function clear() {
  27795. delete ke.adapter.root.tcbObject;
  27796. }
  27797. }]);
  27798. return Te;
  27799. }(_e);
  27800. function Pe(e, t) {
  27801. switch (e) {
  27802. case "local":
  27803. return t.localStorage || new Te();
  27804. case "none":
  27805. return new Te();
  27806. default:
  27807. return t.sessionStorage || new Te();
  27808. }
  27809. }
  27810. var Ae = /*#__PURE__*/function () {
  27811. function Ae(e) {
  27812. (0, _classCallCheck2.default)(this, Ae);
  27813. if (!this._storage) {
  27814. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Pe(this._persistence, ke.adapter);
  27815. var _t5 = "access_token_".concat(e.env),
  27816. _n5 = "access_token_expire_".concat(e.env),
  27817. _s5 = "refresh_token_".concat(e.env),
  27818. _r = "anonymous_uuid_".concat(e.env),
  27819. _i = "login_type_".concat(e.env),
  27820. _o = "user_info_".concat(e.env);
  27821. this.keys = {
  27822. accessTokenKey: _t5,
  27823. accessTokenExpireKey: _n5,
  27824. refreshTokenKey: _s5,
  27825. anonymousUuidKey: _r,
  27826. loginTypeKey: _i,
  27827. userInfoKey: _o
  27828. };
  27829. }
  27830. }
  27831. (0, _createClass2.default)(Ae, [{
  27832. key: "updatePersistence",
  27833. value: function updatePersistence(e) {
  27834. if (e === this._persistence) return;
  27835. var t = "local" === this._persistence;
  27836. this._persistence = e;
  27837. var n = Pe(e, ke.adapter);
  27838. for (var _e9 in this.keys) {
  27839. var _s6 = this.keys[_e9];
  27840. if (t && Ce.includes(_e9)) continue;
  27841. var _r2 = this._storage.getItem(_s6);
  27842. ve(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  27843. }
  27844. this._storage = n;
  27845. }
  27846. }, {
  27847. key: "setStore",
  27848. value: function setStore(e, t, n) {
  27849. if (!this._storage) return;
  27850. var s = {
  27851. version: n || "localCachev1",
  27852. content: t
  27853. },
  27854. r = JSON.stringify(s);
  27855. try {
  27856. this._storage.setItem(e, r);
  27857. } catch (e) {
  27858. throw e;
  27859. }
  27860. }
  27861. }, {
  27862. key: "getStore",
  27863. value: function getStore(e, t) {
  27864. try {
  27865. if (!this._storage) return;
  27866. } catch (e) {
  27867. return "";
  27868. }
  27869. t = t || "localCachev1";
  27870. var n = this._storage.getItem(e);
  27871. if (!n) return "";
  27872. if (n.indexOf(t) >= 0) {
  27873. return JSON.parse(n).content;
  27874. }
  27875. return "";
  27876. }
  27877. }, {
  27878. key: "removeStore",
  27879. value: function removeStore(e) {
  27880. this._storage.removeItem(e);
  27881. }
  27882. }]);
  27883. return Ae;
  27884. }();
  27885. var Ee = {},
  27886. Oe = {};
  27887. function xe(e) {
  27888. return Ee[e];
  27889. }
  27890. var Re = /*#__PURE__*/(0, _createClass2.default)(function Re(e, t) {
  27891. (0, _classCallCheck2.default)(this, Re);
  27892. this.data = t || null, this.name = e;
  27893. });
  27894. var Ue = /*#__PURE__*/function (_Re) {
  27895. (0, _inherits2.default)(Ue, _Re);
  27896. var _super3 = _createSuper(Ue);
  27897. function Ue(e, t) {
  27898. var _this7;
  27899. (0, _classCallCheck2.default)(this, Ue);
  27900. _this7 = _super3.call(this, "error", {
  27901. error: e,
  27902. data: t
  27903. }), _this7.error = e;
  27904. return _this7;
  27905. }
  27906. return (0, _createClass2.default)(Ue);
  27907. }(Re);
  27908. var Le = new ( /*#__PURE__*/function () {
  27909. function _class() {
  27910. (0, _classCallCheck2.default)(this, _class);
  27911. this._listeners = {};
  27912. }
  27913. (0, _createClass2.default)(_class, [{
  27914. key: "on",
  27915. value: function on(e, t) {
  27916. return function (e, t, n) {
  27917. n[e] = n[e] || [], n[e].push(t);
  27918. }(e, t, this._listeners), this;
  27919. }
  27920. }, {
  27921. key: "off",
  27922. value: function off(e, t) {
  27923. return function (e, t, n) {
  27924. if (n && n[e]) {
  27925. var _s7 = n[e].indexOf(t);
  27926. -1 !== _s7 && n[e].splice(_s7, 1);
  27927. }
  27928. }(e, t, this._listeners), this;
  27929. }
  27930. }, {
  27931. key: "fire",
  27932. value: function fire(e, t) {
  27933. if (e instanceof Ue) return console.error(e.error), this;
  27934. var n = "string" == typeof e ? new Re(e, t || {}) : e;
  27935. var s = n.name;
  27936. if (this._listens(s)) {
  27937. n.target = this;
  27938. var _e10 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  27939. var _iterator2 = _createForOfIteratorHelper(_e10),
  27940. _step2;
  27941. try {
  27942. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  27943. var _t6 = _step2.value;
  27944. _t6.call(this, n);
  27945. }
  27946. } catch (err) {
  27947. _iterator2.e(err);
  27948. } finally {
  27949. _iterator2.f();
  27950. }
  27951. }
  27952. return this;
  27953. }
  27954. }, {
  27955. key: "_listens",
  27956. value: function _listens(e) {
  27957. return this._listeners[e] && this._listeners[e].length > 0;
  27958. }
  27959. }]);
  27960. return _class;
  27961. }())();
  27962. function Ne(e, t) {
  27963. Le.on(e, t);
  27964. }
  27965. function De(e) {
  27966. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27967. Le.fire(e, t);
  27968. }
  27969. function Fe(e, t) {
  27970. Le.off(e, t);
  27971. }
  27972. var qe = "loginStateChanged",
  27973. Me = "loginStateExpire",
  27974. Ke = "loginTypeChanged",
  27975. je = "anonymousConverted",
  27976. Be = "refreshAccessToken";
  27977. var $e;
  27978. !function (e) {
  27979. 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";
  27980. }($e || ($e = {}));
  27981. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  27982. ze = {
  27983. "X-SDK-Version": "1.3.5"
  27984. };
  27985. function Je(e, t, n) {
  27986. var s = e[t];
  27987. e[t] = function (t) {
  27988. var r = {},
  27989. i = {};
  27990. n.forEach(function (n) {
  27991. var _n$call = n.call(e, t),
  27992. s = _n$call.data,
  27993. o = _n$call.headers;
  27994. Object.assign(r, s), Object.assign(i, o);
  27995. });
  27996. var o = t.data;
  27997. return o && function () {
  27998. var e;
  27999. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e11 in r) {
  28000. o.append(_e11, r[_e11]);
  28001. }
  28002. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  28003. };
  28004. }
  28005. function He() {
  28006. var e = Math.random().toString(16).slice(2);
  28007. return {
  28008. data: {
  28009. seqId: e
  28010. },
  28011. headers: _objectSpread(_objectSpread({}, ze), {}, {
  28012. "x-seqid": e
  28013. })
  28014. };
  28015. }
  28016. var Ge = /*#__PURE__*/function () {
  28017. function Ge() {
  28018. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  28019. (0, _classCallCheck2.default)(this, Ge);
  28020. var t;
  28021. this.config = e, this._reqClass = new ke.adapter.reqClass({
  28022. timeout: this.config.timeout,
  28023. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  28024. restrictedMethods: ["post"]
  28025. }), this._cache = xe(this.config.env), this._localCache = (t = this.config.env, Oe[t]), Je(this._reqClass, "post", [He]), Je(this._reqClass, "upload", [He]), Je(this._reqClass, "download", [He]);
  28026. }
  28027. (0, _createClass2.default)(Ge, [{
  28028. key: "post",
  28029. value: function () {
  28030. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  28031. return _regenerator.default.wrap(function _callee4$(_context4) {
  28032. while (1) {
  28033. switch (_context4.prev = _context4.next) {
  28034. case 0:
  28035. _context4.next = 2;
  28036. return this._reqClass.post(e);
  28037. case 2:
  28038. return _context4.abrupt("return", _context4.sent);
  28039. case 3:
  28040. case "end":
  28041. return _context4.stop();
  28042. }
  28043. }
  28044. }, _callee4, this);
  28045. }));
  28046. function post(_x2) {
  28047. return _post.apply(this, arguments);
  28048. }
  28049. return post;
  28050. }()
  28051. }, {
  28052. key: "upload",
  28053. value: function () {
  28054. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  28055. return _regenerator.default.wrap(function _callee5$(_context5) {
  28056. while (1) {
  28057. switch (_context5.prev = _context5.next) {
  28058. case 0:
  28059. _context5.next = 2;
  28060. return this._reqClass.upload(e);
  28061. case 2:
  28062. return _context5.abrupt("return", _context5.sent);
  28063. case 3:
  28064. case "end":
  28065. return _context5.stop();
  28066. }
  28067. }
  28068. }, _callee5, this);
  28069. }));
  28070. function upload(_x3) {
  28071. return _upload.apply(this, arguments);
  28072. }
  28073. return upload;
  28074. }()
  28075. }, {
  28076. key: "download",
  28077. value: function () {
  28078. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  28079. return _regenerator.default.wrap(function _callee6$(_context6) {
  28080. while (1) {
  28081. switch (_context6.prev = _context6.next) {
  28082. case 0:
  28083. _context6.next = 2;
  28084. return this._reqClass.download(e);
  28085. case 2:
  28086. return _context6.abrupt("return", _context6.sent);
  28087. case 3:
  28088. case "end":
  28089. return _context6.stop();
  28090. }
  28091. }
  28092. }, _callee6, this);
  28093. }));
  28094. function download(_x4) {
  28095. return _download.apply(this, arguments);
  28096. }
  28097. return download;
  28098. }()
  28099. }, {
  28100. key: "refreshAccessToken",
  28101. value: function () {
  28102. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  28103. var e, t;
  28104. return _regenerator.default.wrap(function _callee7$(_context7) {
  28105. while (1) {
  28106. switch (_context7.prev = _context7.next) {
  28107. case 0:
  28108. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  28109. _context7.prev = 1;
  28110. _context7.next = 4;
  28111. return this._refreshAccessTokenPromise;
  28112. case 4:
  28113. e = _context7.sent;
  28114. _context7.next = 10;
  28115. break;
  28116. case 7:
  28117. _context7.prev = 7;
  28118. _context7.t0 = _context7["catch"](1);
  28119. t = _context7.t0;
  28120. case 10:
  28121. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  28122. _context7.next = 12;
  28123. break;
  28124. }
  28125. throw t;
  28126. case 12:
  28127. return _context7.abrupt("return", e);
  28128. case 13:
  28129. case "end":
  28130. return _context7.stop();
  28131. }
  28132. }
  28133. }, _callee7, this, [[1, 7]]);
  28134. }));
  28135. function refreshAccessToken() {
  28136. return _refreshAccessToken2.apply(this, arguments);
  28137. }
  28138. return refreshAccessToken;
  28139. }()
  28140. }, {
  28141. key: "_refreshAccessToken",
  28142. value: function () {
  28143. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  28144. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e12, _e13, _t7, _s8;
  28145. return _regenerator.default.wrap(function _callee8$(_context8) {
  28146. while (1) {
  28147. switch (_context8.prev = _context8.next) {
  28148. case 0:
  28149. _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;
  28150. this._cache.removeStore(e), this._cache.removeStore(t);
  28151. i = this._cache.getStore(n);
  28152. if (i) {
  28153. _context8.next = 5;
  28154. break;
  28155. }
  28156. throw new ne({
  28157. message: "未登录CloudBase"
  28158. });
  28159. case 5:
  28160. o = {
  28161. refresh_token: i
  28162. };
  28163. _context8.next = 8;
  28164. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  28165. case 8:
  28166. a = _context8.sent;
  28167. if (!a.data.code) {
  28168. _context8.next = 21;
  28169. break;
  28170. }
  28171. _e12 = a.data.code;
  28172. if (!("SIGN_PARAM_INVALID" === _e12 || "REFRESH_TOKEN_EXPIRED" === _e12 || "INVALID_REFRESH_TOKEN" === _e12)) {
  28173. _context8.next = 20;
  28174. break;
  28175. }
  28176. if (!(this._cache.getStore(s) === $e.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e12)) {
  28177. _context8.next = 19;
  28178. break;
  28179. }
  28180. _e13 = this._cache.getStore(r);
  28181. _t7 = this._cache.getStore(n);
  28182. _context8.next = 17;
  28183. return this.send("auth.signInAnonymously", {
  28184. anonymous_uuid: _e13,
  28185. refresh_token: _t7
  28186. });
  28187. case 17:
  28188. _s8 = _context8.sent;
  28189. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  28190. case 19:
  28191. De(Me), this._cache.removeStore(n);
  28192. case 20:
  28193. throw new ne({
  28194. code: a.data.code,
  28195. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  28196. });
  28197. case 21:
  28198. if (!a.data.access_token) {
  28199. _context8.next = 23;
  28200. break;
  28201. }
  28202. return _context8.abrupt("return", (De(Be), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  28203. accessToken: a.data.access_token,
  28204. accessTokenExpire: a.data.access_token_expire
  28205. }));
  28206. case 23:
  28207. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  28208. case 24:
  28209. case "end":
  28210. return _context8.stop();
  28211. }
  28212. }
  28213. }, _callee8, this);
  28214. }));
  28215. function _refreshAccessToken() {
  28216. return _refreshAccessToken3.apply(this, arguments);
  28217. }
  28218. return _refreshAccessToken;
  28219. }()
  28220. }, {
  28221. key: "getAccessToken",
  28222. value: function () {
  28223. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  28224. var _this$_cache$keys2, e, t, n, s, r, i;
  28225. return _regenerator.default.wrap(function _callee9$(_context9) {
  28226. while (1) {
  28227. switch (_context9.prev = _context9.next) {
  28228. case 0:
  28229. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  28230. if (this._cache.getStore(n)) {
  28231. _context9.next = 3;
  28232. break;
  28233. }
  28234. throw new ne({
  28235. message: "refresh token不存在,登录状态异常"
  28236. });
  28237. case 3:
  28238. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  28239. _context9.t0 = this._shouldRefreshAccessTokenHook;
  28240. if (!_context9.t0) {
  28241. _context9.next = 9;
  28242. break;
  28243. }
  28244. _context9.next = 8;
  28245. return this._shouldRefreshAccessTokenHook(s, r);
  28246. case 8:
  28247. _context9.t0 = !_context9.sent;
  28248. case 9:
  28249. _context9.t1 = _context9.t0;
  28250. if (!_context9.t1) {
  28251. _context9.next = 12;
  28252. break;
  28253. }
  28254. i = !1;
  28255. case 12:
  28256. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  28257. accessToken: s,
  28258. accessTokenExpire: r
  28259. });
  28260. case 13:
  28261. case "end":
  28262. return _context9.stop();
  28263. }
  28264. }
  28265. }, _callee9, this);
  28266. }));
  28267. function getAccessToken() {
  28268. return _getAccessToken.apply(this, arguments);
  28269. }
  28270. return getAccessToken;
  28271. }()
  28272. }, {
  28273. key: "request",
  28274. value: function () {
  28275. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  28276. var s, r, i, _e14, o, _e15, _e16, a, c, u, h, l, d, p, f, g;
  28277. return _regenerator.default.wrap(function _callee10$(_context10) {
  28278. while (1) {
  28279. switch (_context10.prev = _context10.next) {
  28280. case 0:
  28281. s = "x-tcb-trace_".concat(this.config.env);
  28282. r = "application/x-www-form-urlencoded";
  28283. i = _objectSpread({
  28284. action: e,
  28285. env: this.config.env,
  28286. dataVersion: "2019-08-16"
  28287. }, t);
  28288. if (!(-1 === We.indexOf(e))) {
  28289. _context10.next = 10;
  28290. break;
  28291. }
  28292. _e14 = this._cache.keys.refreshTokenKey;
  28293. _context10.t0 = this._cache.getStore(_e14);
  28294. if (!_context10.t0) {
  28295. _context10.next = 10;
  28296. break;
  28297. }
  28298. _context10.next = 9;
  28299. return this.getAccessToken();
  28300. case 9:
  28301. i.access_token = _context10.sent.accessToken;
  28302. case 10:
  28303. if ("storage.uploadFile" === e) {
  28304. o = new FormData();
  28305. for (_e15 in o) {
  28306. o.hasOwnProperty(_e15) && void 0 !== o[_e15] && o.append(_e15, i[_e15]);
  28307. }
  28308. r = "multipart/form-data";
  28309. } else {
  28310. r = "application/json", o = {};
  28311. for (_e16 in i) {
  28312. void 0 !== i[_e16] && (o[_e16] = i[_e16]);
  28313. }
  28314. }
  28315. a = {
  28316. headers: {
  28317. "content-type": r
  28318. }
  28319. };
  28320. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  28321. c = this._localCache.getStore(s);
  28322. c && (a.headers["X-TCB-Trace"] = c);
  28323. u = t.parse, h = t.inQuery, l = t.search;
  28324. d = {
  28325. env: this.config.env
  28326. };
  28327. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  28328. p = function (e, t) {
  28329. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  28330. var s = /\?/.test(t);
  28331. var r = "";
  28332. for (var _e17 in n) {
  28333. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e17, "=").concat(encodeURIComponent(n[_e17]));
  28334. }
  28335. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  28336. }(me, "//tcb-api.tencentcloudapi.com/web", d);
  28337. l && (p += l);
  28338. _context10.next = 22;
  28339. return this.post(_objectSpread({
  28340. url: p,
  28341. data: o
  28342. }, a));
  28343. case 22:
  28344. f = _context10.sent;
  28345. g = f.header && f.header["x-tcb-trace"];
  28346. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  28347. _context10.next = 26;
  28348. break;
  28349. }
  28350. throw new ne({
  28351. code: "NETWORK_ERROR",
  28352. message: "network request error"
  28353. });
  28354. case 26:
  28355. return _context10.abrupt("return", f);
  28356. case 27:
  28357. case "end":
  28358. return _context10.stop();
  28359. }
  28360. }
  28361. }, _callee10, this);
  28362. }));
  28363. function request(_x5, _x6, _x7) {
  28364. return _request.apply(this, arguments);
  28365. }
  28366. return request;
  28367. }()
  28368. }, {
  28369. key: "send",
  28370. value: function () {
  28371. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  28372. var t,
  28373. n,
  28374. _n6,
  28375. _args11 = arguments;
  28376. return _regenerator.default.wrap(function _callee11$(_context11) {
  28377. while (1) {
  28378. switch (_context11.prev = _context11.next) {
  28379. case 0:
  28380. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  28381. _context11.next = 3;
  28382. return this.request(e, t, {
  28383. onUploadProgress: t.onUploadProgress
  28384. });
  28385. case 3:
  28386. n = _context11.sent;
  28387. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  28388. _context11.next = 13;
  28389. break;
  28390. }
  28391. _context11.next = 7;
  28392. return this.refreshAccessToken();
  28393. case 7:
  28394. _context11.next = 9;
  28395. return this.request(e, t, {
  28396. onUploadProgress: t.onUploadProgress
  28397. });
  28398. case 9:
  28399. _n6 = _context11.sent;
  28400. if (!_n6.data.code) {
  28401. _context11.next = 12;
  28402. break;
  28403. }
  28404. throw new ne({
  28405. code: _n6.data.code,
  28406. message: _n6.data.message
  28407. });
  28408. case 12:
  28409. return _context11.abrupt("return", _n6.data);
  28410. case 13:
  28411. if (!n.data.code) {
  28412. _context11.next = 15;
  28413. break;
  28414. }
  28415. throw new ne({
  28416. code: n.data.code,
  28417. message: n.data.message
  28418. });
  28419. case 15:
  28420. return _context11.abrupt("return", n.data);
  28421. case 16:
  28422. case "end":
  28423. return _context11.stop();
  28424. }
  28425. }
  28426. }, _callee11, this);
  28427. }));
  28428. function send(_x8) {
  28429. return _send.apply(this, arguments);
  28430. }
  28431. return send;
  28432. }()
  28433. }, {
  28434. key: "setRefreshToken",
  28435. value: function setRefreshToken(e) {
  28436. var _this$_cache$keys3 = this._cache.keys,
  28437. t = _this$_cache$keys3.accessTokenKey,
  28438. n = _this$_cache$keys3.accessTokenExpireKey,
  28439. s = _this$_cache$keys3.refreshTokenKey;
  28440. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  28441. }
  28442. }]);
  28443. return Ge;
  28444. }();
  28445. var Ve = {};
  28446. function Ye(e) {
  28447. return Ve[e];
  28448. }
  28449. var Qe = /*#__PURE__*/function () {
  28450. function Qe(e) {
  28451. (0, _classCallCheck2.default)(this, Qe);
  28452. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env);
  28453. }
  28454. (0, _createClass2.default)(Qe, [{
  28455. key: "setRefreshToken",
  28456. value: function setRefreshToken(e) {
  28457. var _this$_cache$keys4 = this._cache.keys,
  28458. t = _this$_cache$keys4.accessTokenKey,
  28459. n = _this$_cache$keys4.accessTokenExpireKey,
  28460. s = _this$_cache$keys4.refreshTokenKey;
  28461. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  28462. }
  28463. }, {
  28464. key: "setAccessToken",
  28465. value: function setAccessToken(e, t) {
  28466. var _this$_cache$keys5 = this._cache.keys,
  28467. n = _this$_cache$keys5.accessTokenKey,
  28468. s = _this$_cache$keys5.accessTokenExpireKey;
  28469. this._cache.setStore(n, e), this._cache.setStore(s, t);
  28470. }
  28471. }, {
  28472. key: "refreshUserInfo",
  28473. value: function () {
  28474. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  28475. var _yield$this$_request$, e;
  28476. return _regenerator.default.wrap(function _callee12$(_context12) {
  28477. while (1) {
  28478. switch (_context12.prev = _context12.next) {
  28479. case 0:
  28480. _context12.next = 2;
  28481. return this._request.send("auth.getUserInfo", {});
  28482. case 2:
  28483. _yield$this$_request$ = _context12.sent;
  28484. e = _yield$this$_request$.data;
  28485. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  28486. case 5:
  28487. case "end":
  28488. return _context12.stop();
  28489. }
  28490. }
  28491. }, _callee12, this);
  28492. }));
  28493. function refreshUserInfo() {
  28494. return _refreshUserInfo.apply(this, arguments);
  28495. }
  28496. return refreshUserInfo;
  28497. }()
  28498. }, {
  28499. key: "setLocalUserInfo",
  28500. value: function setLocalUserInfo(e) {
  28501. var t = this._cache.keys.userInfoKey;
  28502. this._cache.setStore(t, e);
  28503. }
  28504. }]);
  28505. return Qe;
  28506. }();
  28507. var Xe = /*#__PURE__*/function () {
  28508. function Xe(e) {
  28509. (0, _classCallCheck2.default)(this, Xe);
  28510. if (!e) throw new ne({
  28511. code: "PARAM_ERROR",
  28512. message: "envId is not defined"
  28513. });
  28514. this._envId = e, this._cache = xe(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  28515. }
  28516. (0, _createClass2.default)(Xe, [{
  28517. key: "linkWithTicket",
  28518. value: function linkWithTicket(e) {
  28519. if ("string" != typeof e) throw new ne({
  28520. code: "PARAM_ERROR",
  28521. message: "ticket must be string"
  28522. });
  28523. return this._request.send("auth.linkWithTicket", {
  28524. ticket: e
  28525. });
  28526. }
  28527. }, {
  28528. key: "linkWithRedirect",
  28529. value: function linkWithRedirect(e) {
  28530. e.signInWithRedirect();
  28531. }
  28532. }, {
  28533. key: "updatePassword",
  28534. value: function updatePassword(e, t) {
  28535. return this._request.send("auth.updatePassword", {
  28536. oldPassword: t,
  28537. newPassword: e
  28538. });
  28539. }
  28540. }, {
  28541. key: "updateEmail",
  28542. value: function updateEmail(e) {
  28543. return this._request.send("auth.updateEmail", {
  28544. newEmail: e
  28545. });
  28546. }
  28547. }, {
  28548. key: "updateUsername",
  28549. value: function updateUsername(e) {
  28550. if ("string" != typeof e) throw new ne({
  28551. code: "PARAM_ERROR",
  28552. message: "username must be a string"
  28553. });
  28554. return this._request.send("auth.updateUsername", {
  28555. username: e
  28556. });
  28557. }
  28558. }, {
  28559. key: "getLinkedUidList",
  28560. value: function () {
  28561. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  28562. var _yield$this$_request$2, e, t, n;
  28563. return _regenerator.default.wrap(function _callee13$(_context13) {
  28564. while (1) {
  28565. switch (_context13.prev = _context13.next) {
  28566. case 0:
  28567. _context13.next = 2;
  28568. return this._request.send("auth.getLinkedUidList", {});
  28569. case 2:
  28570. _yield$this$_request$2 = _context13.sent;
  28571. e = _yield$this$_request$2.data;
  28572. t = !1;
  28573. n = e.users;
  28574. return _context13.abrupt("return", (n.forEach(function (e) {
  28575. e.wxOpenId && e.wxPublicId && (t = !0);
  28576. }), {
  28577. users: n,
  28578. hasPrimaryUid: t
  28579. }));
  28580. case 7:
  28581. case "end":
  28582. return _context13.stop();
  28583. }
  28584. }
  28585. }, _callee13, this);
  28586. }));
  28587. function getLinkedUidList() {
  28588. return _getLinkedUidList.apply(this, arguments);
  28589. }
  28590. return getLinkedUidList;
  28591. }()
  28592. }, {
  28593. key: "setPrimaryUid",
  28594. value: function setPrimaryUid(e) {
  28595. return this._request.send("auth.setPrimaryUid", {
  28596. uid: e
  28597. });
  28598. }
  28599. }, {
  28600. key: "unlink",
  28601. value: function unlink(e) {
  28602. return this._request.send("auth.unlink", {
  28603. platform: e
  28604. });
  28605. }
  28606. }, {
  28607. key: "update",
  28608. value: function () {
  28609. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  28610. var t, n, s, r, i, o, _yield$this$_request$3, a;
  28611. return _regenerator.default.wrap(function _callee14$(_context14) {
  28612. while (1) {
  28613. switch (_context14.prev = _context14.next) {
  28614. case 0:
  28615. t = e.nickName;
  28616. n = e.gender;
  28617. s = e.avatarUrl;
  28618. r = e.province;
  28619. i = e.country;
  28620. o = e.city;
  28621. _context14.next = 8;
  28622. return this._request.send("auth.updateUserInfo", {
  28623. nickName: t,
  28624. gender: n,
  28625. avatarUrl: s,
  28626. province: r,
  28627. country: i,
  28628. city: o
  28629. });
  28630. case 8:
  28631. _yield$this$_request$3 = _context14.sent;
  28632. a = _yield$this$_request$3.data;
  28633. this.setLocalUserInfo(a);
  28634. case 11:
  28635. case "end":
  28636. return _context14.stop();
  28637. }
  28638. }
  28639. }, _callee14, this);
  28640. }));
  28641. function update(_x9) {
  28642. return _update.apply(this, arguments);
  28643. }
  28644. return update;
  28645. }()
  28646. }, {
  28647. key: "refresh",
  28648. value: function () {
  28649. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  28650. var _yield$this$_request$4, e;
  28651. return _regenerator.default.wrap(function _callee15$(_context15) {
  28652. while (1) {
  28653. switch (_context15.prev = _context15.next) {
  28654. case 0:
  28655. _context15.next = 2;
  28656. return this._request.send("auth.getUserInfo", {});
  28657. case 2:
  28658. _yield$this$_request$4 = _context15.sent;
  28659. e = _yield$this$_request$4.data;
  28660. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  28661. case 5:
  28662. case "end":
  28663. return _context15.stop();
  28664. }
  28665. }
  28666. }, _callee15, this);
  28667. }));
  28668. function refresh() {
  28669. return _refresh.apply(this, arguments);
  28670. }
  28671. return refresh;
  28672. }()
  28673. }, {
  28674. key: "setUserInfo",
  28675. value: function setUserInfo() {
  28676. var _this8 = this;
  28677. var e = this._cache.keys.userInfoKey,
  28678. t = this._cache.getStore(e);
  28679. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  28680. _this8[e] = t[e];
  28681. }), this.location = {
  28682. country: t.country,
  28683. province: t.province,
  28684. city: t.city
  28685. };
  28686. }
  28687. }, {
  28688. key: "setLocalUserInfo",
  28689. value: function setLocalUserInfo(e) {
  28690. var t = this._cache.keys.userInfoKey;
  28691. this._cache.setStore(t, e), this.setUserInfo();
  28692. }
  28693. }]);
  28694. return Xe;
  28695. }();
  28696. var Ze = /*#__PURE__*/function () {
  28697. function Ze(e) {
  28698. (0, _classCallCheck2.default)(this, Ze);
  28699. if (!e) throw new ne({
  28700. code: "PARAM_ERROR",
  28701. message: "envId is not defined"
  28702. });
  28703. this._cache = xe(e);
  28704. var _this$_cache$keys6 = this._cache.keys,
  28705. t = _this$_cache$keys6.refreshTokenKey,
  28706. n = _this$_cache$keys6.accessTokenKey,
  28707. s = _this$_cache$keys6.accessTokenExpireKey,
  28708. r = this._cache.getStore(t),
  28709. i = this._cache.getStore(n),
  28710. o = this._cache.getStore(s);
  28711. this.credential = {
  28712. refreshToken: r,
  28713. accessToken: i,
  28714. accessTokenExpire: o
  28715. }, this.user = new Xe(e);
  28716. }
  28717. (0, _createClass2.default)(Ze, [{
  28718. key: "isAnonymousAuth",
  28719. get: function get() {
  28720. return this.loginType === $e.ANONYMOUS;
  28721. }
  28722. }, {
  28723. key: "isCustomAuth",
  28724. get: function get() {
  28725. return this.loginType === $e.CUSTOM;
  28726. }
  28727. }, {
  28728. key: "isWeixinAuth",
  28729. get: function get() {
  28730. return this.loginType === $e.WECHAT || this.loginType === $e.WECHAT_OPEN || this.loginType === $e.WECHAT_PUBLIC;
  28731. }
  28732. }, {
  28733. key: "loginType",
  28734. get: function get() {
  28735. return this._cache.getStore(this._cache.keys.loginTypeKey);
  28736. }
  28737. }]);
  28738. return Ze;
  28739. }();
  28740. var et = /*#__PURE__*/function (_Qe) {
  28741. (0, _inherits2.default)(et, _Qe);
  28742. var _super4 = _createSuper(et);
  28743. function et() {
  28744. (0, _classCallCheck2.default)(this, et);
  28745. return _super4.apply(this, arguments);
  28746. }
  28747. (0, _createClass2.default)(et, [{
  28748. key: "signIn",
  28749. value: function () {
  28750. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  28751. var _this$_cache$keys7, e, t, n, s, r, _e18;
  28752. return _regenerator.default.wrap(function _callee16$(_context16) {
  28753. while (1) {
  28754. switch (_context16.prev = _context16.next) {
  28755. case 0:
  28756. this._cache.updatePersistence("local");
  28757. _this$_cache$keys7 = this._cache.keys;
  28758. e = _this$_cache$keys7.anonymousUuidKey;
  28759. t = _this$_cache$keys7.refreshTokenKey;
  28760. n = this._cache.getStore(e) || void 0;
  28761. s = this._cache.getStore(t) || void 0;
  28762. _context16.next = 8;
  28763. return this._request.send("auth.signInAnonymously", {
  28764. anonymous_uuid: n,
  28765. refresh_token: s
  28766. });
  28767. case 8:
  28768. r = _context16.sent;
  28769. if (!(r.uuid && r.refresh_token)) {
  28770. _context16.next = 20;
  28771. break;
  28772. }
  28773. this._setAnonymousUUID(r.uuid);
  28774. this.setRefreshToken(r.refresh_token);
  28775. _context16.next = 14;
  28776. return this._request.refreshAccessToken();
  28777. case 14:
  28778. De(qe);
  28779. De(Ke, {
  28780. env: this.config.env,
  28781. loginType: $e.ANONYMOUS,
  28782. persistence: "local"
  28783. });
  28784. _e18 = new Ze(this.config.env);
  28785. _context16.next = 19;
  28786. return _e18.user.refresh();
  28787. case 19:
  28788. return _context16.abrupt("return", _e18);
  28789. case 20:
  28790. throw new ne({
  28791. message: "匿名登录失败"
  28792. });
  28793. case 21:
  28794. case "end":
  28795. return _context16.stop();
  28796. }
  28797. }
  28798. }, _callee16, this);
  28799. }));
  28800. function signIn() {
  28801. return _signIn.apply(this, arguments);
  28802. }
  28803. return signIn;
  28804. }()
  28805. }, {
  28806. key: "linkAndRetrieveDataWithTicket",
  28807. value: function () {
  28808. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  28809. var _this$_cache$keys8, t, n, s, r, i;
  28810. return _regenerator.default.wrap(function _callee17$(_context17) {
  28811. while (1) {
  28812. switch (_context17.prev = _context17.next) {
  28813. case 0:
  28814. _this$_cache$keys8 = this._cache.keys;
  28815. t = _this$_cache$keys8.anonymousUuidKey;
  28816. n = _this$_cache$keys8.refreshTokenKey;
  28817. s = this._cache.getStore(t);
  28818. r = this._cache.getStore(n);
  28819. _context17.next = 7;
  28820. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  28821. anonymous_uuid: s,
  28822. refresh_token: r,
  28823. ticket: e
  28824. });
  28825. case 7:
  28826. i = _context17.sent;
  28827. if (!i.refresh_token) {
  28828. _context17.next = 16;
  28829. break;
  28830. }
  28831. this._clearAnonymousUUID();
  28832. this.setRefreshToken(i.refresh_token);
  28833. _context17.next = 13;
  28834. return this._request.refreshAccessToken();
  28835. case 13:
  28836. De(je, {
  28837. env: this.config.env
  28838. });
  28839. De(Ke, {
  28840. loginType: $e.CUSTOM,
  28841. persistence: "local"
  28842. });
  28843. return _context17.abrupt("return", {
  28844. credential: {
  28845. refreshToken: i.refresh_token
  28846. }
  28847. });
  28848. case 16:
  28849. throw new ne({
  28850. message: "匿名转化失败"
  28851. });
  28852. case 17:
  28853. case "end":
  28854. return _context17.stop();
  28855. }
  28856. }
  28857. }, _callee17, this);
  28858. }));
  28859. function linkAndRetrieveDataWithTicket(_x10) {
  28860. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  28861. }
  28862. return linkAndRetrieveDataWithTicket;
  28863. }()
  28864. }, {
  28865. key: "_setAnonymousUUID",
  28866. value: function _setAnonymousUUID(e) {
  28867. var _this$_cache$keys9 = this._cache.keys,
  28868. t = _this$_cache$keys9.anonymousUuidKey,
  28869. n = _this$_cache$keys9.loginTypeKey;
  28870. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, $e.ANONYMOUS);
  28871. }
  28872. }, {
  28873. key: "_clearAnonymousUUID",
  28874. value: function _clearAnonymousUUID() {
  28875. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  28876. }
  28877. }]);
  28878. return et;
  28879. }(Qe);
  28880. var tt = /*#__PURE__*/function (_Qe2) {
  28881. (0, _inherits2.default)(tt, _Qe2);
  28882. var _super5 = _createSuper(tt);
  28883. function tt() {
  28884. (0, _classCallCheck2.default)(this, tt);
  28885. return _super5.apply(this, arguments);
  28886. }
  28887. (0, _createClass2.default)(tt, [{
  28888. key: "signIn",
  28889. value: function () {
  28890. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  28891. var t, n;
  28892. return _regenerator.default.wrap(function _callee18$(_context18) {
  28893. while (1) {
  28894. switch (_context18.prev = _context18.next) {
  28895. case 0:
  28896. if (!("string" != typeof e)) {
  28897. _context18.next = 2;
  28898. break;
  28899. }
  28900. throw new ne({
  28901. code: "PARAM_ERROR",
  28902. message: "ticket must be a string"
  28903. });
  28904. case 2:
  28905. t = this._cache.keys.refreshTokenKey;
  28906. _context18.next = 5;
  28907. return this._request.send("auth.signInWithTicket", {
  28908. ticket: e,
  28909. refresh_token: this._cache.getStore(t) || ""
  28910. });
  28911. case 5:
  28912. n = _context18.sent;
  28913. if (!n.refresh_token) {
  28914. _context18.next = 15;
  28915. break;
  28916. }
  28917. this.setRefreshToken(n.refresh_token);
  28918. _context18.next = 10;
  28919. return this._request.refreshAccessToken();
  28920. case 10:
  28921. De(qe);
  28922. De(Ke, {
  28923. env: this.config.env,
  28924. loginType: $e.CUSTOM,
  28925. persistence: this.config.persistence
  28926. });
  28927. _context18.next = 14;
  28928. return this.refreshUserInfo();
  28929. case 14:
  28930. return _context18.abrupt("return", new Ze(this.config.env));
  28931. case 15:
  28932. throw new ne({
  28933. message: "自定义登录失败"
  28934. });
  28935. case 16:
  28936. case "end":
  28937. return _context18.stop();
  28938. }
  28939. }
  28940. }, _callee18, this);
  28941. }));
  28942. function signIn(_x11) {
  28943. return _signIn2.apply(this, arguments);
  28944. }
  28945. return signIn;
  28946. }()
  28947. }]);
  28948. return tt;
  28949. }(Qe);
  28950. var nt = /*#__PURE__*/function (_Qe3) {
  28951. (0, _inherits2.default)(nt, _Qe3);
  28952. var _super6 = _createSuper(nt);
  28953. function nt() {
  28954. (0, _classCallCheck2.default)(this, nt);
  28955. return _super6.apply(this, arguments);
  28956. }
  28957. (0, _createClass2.default)(nt, [{
  28958. key: "signIn",
  28959. value: function () {
  28960. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  28961. var n, s, r, i, o;
  28962. return _regenerator.default.wrap(function _callee19$(_context19) {
  28963. while (1) {
  28964. switch (_context19.prev = _context19.next) {
  28965. case 0:
  28966. if (!("string" != typeof e)) {
  28967. _context19.next = 2;
  28968. break;
  28969. }
  28970. throw new ne({
  28971. code: "PARAM_ERROR",
  28972. message: "email must be a string"
  28973. });
  28974. case 2:
  28975. n = this._cache.keys.refreshTokenKey;
  28976. _context19.next = 5;
  28977. return this._request.send("auth.signIn", {
  28978. loginType: "EMAIL",
  28979. email: e,
  28980. password: t,
  28981. refresh_token: this._cache.getStore(n) || ""
  28982. });
  28983. case 5:
  28984. s = _context19.sent;
  28985. r = s.refresh_token;
  28986. i = s.access_token;
  28987. o = s.access_token_expire;
  28988. if (!r) {
  28989. _context19.next = 22;
  28990. break;
  28991. }
  28992. this.setRefreshToken(r);
  28993. if (!(i && o)) {
  28994. _context19.next = 15;
  28995. break;
  28996. }
  28997. this.setAccessToken(i, o);
  28998. _context19.next = 17;
  28999. break;
  29000. case 15:
  29001. _context19.next = 17;
  29002. return this._request.refreshAccessToken();
  29003. case 17:
  29004. _context19.next = 19;
  29005. return this.refreshUserInfo();
  29006. case 19:
  29007. De(qe);
  29008. De(Ke, {
  29009. env: this.config.env,
  29010. loginType: $e.EMAIL,
  29011. persistence: this.config.persistence
  29012. });
  29013. return _context19.abrupt("return", new Ze(this.config.env));
  29014. case 22:
  29015. throw s.code ? new ne({
  29016. code: s.code,
  29017. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  29018. }) : new ne({
  29019. message: "邮箱登录失败"
  29020. });
  29021. case 23:
  29022. case "end":
  29023. return _context19.stop();
  29024. }
  29025. }
  29026. }, _callee19, this);
  29027. }));
  29028. function signIn(_x12, _x13) {
  29029. return _signIn3.apply(this, arguments);
  29030. }
  29031. return signIn;
  29032. }()
  29033. }, {
  29034. key: "activate",
  29035. value: function () {
  29036. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  29037. return _regenerator.default.wrap(function _callee20$(_context20) {
  29038. while (1) {
  29039. switch (_context20.prev = _context20.next) {
  29040. case 0:
  29041. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  29042. token: e
  29043. }));
  29044. case 1:
  29045. case "end":
  29046. return _context20.stop();
  29047. }
  29048. }
  29049. }, _callee20, this);
  29050. }));
  29051. function activate(_x14) {
  29052. return _activate.apply(this, arguments);
  29053. }
  29054. return activate;
  29055. }()
  29056. }, {
  29057. key: "resetPasswordWithToken",
  29058. value: function () {
  29059. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  29060. return _regenerator.default.wrap(function _callee21$(_context21) {
  29061. while (1) {
  29062. switch (_context21.prev = _context21.next) {
  29063. case 0:
  29064. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  29065. token: e,
  29066. newPassword: t
  29067. }));
  29068. case 1:
  29069. case "end":
  29070. return _context21.stop();
  29071. }
  29072. }
  29073. }, _callee21, this);
  29074. }));
  29075. function resetPasswordWithToken(_x15, _x16) {
  29076. return _resetPasswordWithToken.apply(this, arguments);
  29077. }
  29078. return resetPasswordWithToken;
  29079. }()
  29080. }]);
  29081. return nt;
  29082. }(Qe);
  29083. var st = /*#__PURE__*/function (_Qe4) {
  29084. (0, _inherits2.default)(st, _Qe4);
  29085. var _super7 = _createSuper(st);
  29086. function st() {
  29087. (0, _classCallCheck2.default)(this, st);
  29088. return _super7.apply(this, arguments);
  29089. }
  29090. (0, _createClass2.default)(st, [{
  29091. key: "signIn",
  29092. value: function () {
  29093. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  29094. var n, s, r, i, o;
  29095. return _regenerator.default.wrap(function _callee22$(_context22) {
  29096. while (1) {
  29097. switch (_context22.prev = _context22.next) {
  29098. case 0:
  29099. if (!("string" != typeof e)) {
  29100. _context22.next = 2;
  29101. break;
  29102. }
  29103. throw new ne({
  29104. code: "PARAM_ERROR",
  29105. message: "username must be a string"
  29106. });
  29107. case 2:
  29108. "string" != typeof t && (t = "", console.warn("password is empty"));
  29109. n = this._cache.keys.refreshTokenKey;
  29110. _context22.next = 6;
  29111. return this._request.send("auth.signIn", {
  29112. loginType: $e.USERNAME,
  29113. username: e,
  29114. password: t,
  29115. refresh_token: this._cache.getStore(n) || ""
  29116. });
  29117. case 6:
  29118. s = _context22.sent;
  29119. r = s.refresh_token;
  29120. i = s.access_token_expire;
  29121. o = s.access_token;
  29122. if (!r) {
  29123. _context22.next = 23;
  29124. break;
  29125. }
  29126. this.setRefreshToken(r);
  29127. if (!(o && i)) {
  29128. _context22.next = 16;
  29129. break;
  29130. }
  29131. this.setAccessToken(o, i);
  29132. _context22.next = 18;
  29133. break;
  29134. case 16:
  29135. _context22.next = 18;
  29136. return this._request.refreshAccessToken();
  29137. case 18:
  29138. _context22.next = 20;
  29139. return this.refreshUserInfo();
  29140. case 20:
  29141. De(qe);
  29142. De(Ke, {
  29143. env: this.config.env,
  29144. loginType: $e.USERNAME,
  29145. persistence: this.config.persistence
  29146. });
  29147. return _context22.abrupt("return", new Ze(this.config.env));
  29148. case 23:
  29149. throw s.code ? new ne({
  29150. code: s.code,
  29151. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  29152. }) : new ne({
  29153. message: "用户名密码登录失败"
  29154. });
  29155. case 24:
  29156. case "end":
  29157. return _context22.stop();
  29158. }
  29159. }
  29160. }, _callee22, this);
  29161. }));
  29162. function signIn(_x17, _x18) {
  29163. return _signIn4.apply(this, arguments);
  29164. }
  29165. return signIn;
  29166. }()
  29167. }]);
  29168. return st;
  29169. }(Qe);
  29170. var rt = /*#__PURE__*/function () {
  29171. function rt(e) {
  29172. (0, _classCallCheck2.default)(this, rt);
  29173. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Ne(Ke, this._onLoginTypeChanged);
  29174. }
  29175. (0, _createClass2.default)(rt, [{
  29176. key: "currentUser",
  29177. get: function get() {
  29178. var e = this.hasLoginState();
  29179. return e && e.user || null;
  29180. }
  29181. }, {
  29182. key: "loginType",
  29183. get: function get() {
  29184. return this._cache.getStore(this._cache.keys.loginTypeKey);
  29185. }
  29186. }, {
  29187. key: "anonymousAuthProvider",
  29188. value: function anonymousAuthProvider() {
  29189. return new et(this.config);
  29190. }
  29191. }, {
  29192. key: "customAuthProvider",
  29193. value: function customAuthProvider() {
  29194. return new tt(this.config);
  29195. }
  29196. }, {
  29197. key: "emailAuthProvider",
  29198. value: function emailAuthProvider() {
  29199. return new nt(this.config);
  29200. }
  29201. }, {
  29202. key: "usernameAuthProvider",
  29203. value: function usernameAuthProvider() {
  29204. return new st(this.config);
  29205. }
  29206. }, {
  29207. key: "signInAnonymously",
  29208. value: function () {
  29209. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  29210. return _regenerator.default.wrap(function _callee23$(_context23) {
  29211. while (1) {
  29212. switch (_context23.prev = _context23.next) {
  29213. case 0:
  29214. return _context23.abrupt("return", new et(this.config).signIn());
  29215. case 1:
  29216. case "end":
  29217. return _context23.stop();
  29218. }
  29219. }
  29220. }, _callee23, this);
  29221. }));
  29222. function signInAnonymously() {
  29223. return _signInAnonymously.apply(this, arguments);
  29224. }
  29225. return signInAnonymously;
  29226. }()
  29227. }, {
  29228. key: "signInWithEmailAndPassword",
  29229. value: function () {
  29230. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  29231. return _regenerator.default.wrap(function _callee24$(_context24) {
  29232. while (1) {
  29233. switch (_context24.prev = _context24.next) {
  29234. case 0:
  29235. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  29236. case 1:
  29237. case "end":
  29238. return _context24.stop();
  29239. }
  29240. }
  29241. }, _callee24, this);
  29242. }));
  29243. function signInWithEmailAndPassword(_x19, _x20) {
  29244. return _signInWithEmailAndPassword.apply(this, arguments);
  29245. }
  29246. return signInWithEmailAndPassword;
  29247. }()
  29248. }, {
  29249. key: "signInWithUsernameAndPassword",
  29250. value: function signInWithUsernameAndPassword(e, t) {
  29251. return new st(this.config).signIn(e, t);
  29252. }
  29253. }, {
  29254. key: "linkAndRetrieveDataWithTicket",
  29255. value: function () {
  29256. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  29257. return _regenerator.default.wrap(function _callee25$(_context25) {
  29258. while (1) {
  29259. switch (_context25.prev = _context25.next) {
  29260. case 0:
  29261. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  29262. _context25.next = 3;
  29263. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  29264. case 3:
  29265. return _context25.abrupt("return", _context25.sent);
  29266. case 4:
  29267. case "end":
  29268. return _context25.stop();
  29269. }
  29270. }
  29271. }, _callee25, this);
  29272. }));
  29273. function linkAndRetrieveDataWithTicket(_x21) {
  29274. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  29275. }
  29276. return linkAndRetrieveDataWithTicket;
  29277. }()
  29278. }, {
  29279. key: "signOut",
  29280. value: function () {
  29281. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  29282. var _this$_cache$keys10, e, t, n, s, r;
  29283. return _regenerator.default.wrap(function _callee26$(_context26) {
  29284. while (1) {
  29285. switch (_context26.prev = _context26.next) {
  29286. case 0:
  29287. if (!(this.loginType === $e.ANONYMOUS)) {
  29288. _context26.next = 2;
  29289. break;
  29290. }
  29291. throw new ne({
  29292. message: "匿名用户不支持登出操作"
  29293. });
  29294. case 2:
  29295. _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);
  29296. if (s) {
  29297. _context26.next = 5;
  29298. break;
  29299. }
  29300. return _context26.abrupt("return");
  29301. case 5:
  29302. _context26.next = 7;
  29303. return this._request.send("auth.logout", {
  29304. refresh_token: s
  29305. });
  29306. case 7:
  29307. r = _context26.sent;
  29308. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  29309. env: this.config.env,
  29310. loginType: $e.NULL,
  29311. persistence: this.config.persistence
  29312. }), r));
  29313. case 9:
  29314. case "end":
  29315. return _context26.stop();
  29316. }
  29317. }
  29318. }, _callee26, this);
  29319. }));
  29320. function signOut() {
  29321. return _signOut.apply(this, arguments);
  29322. }
  29323. return signOut;
  29324. }()
  29325. }, {
  29326. key: "signUpWithEmailAndPassword",
  29327. value: function () {
  29328. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  29329. return _regenerator.default.wrap(function _callee27$(_context27) {
  29330. while (1) {
  29331. switch (_context27.prev = _context27.next) {
  29332. case 0:
  29333. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  29334. email: e,
  29335. password: t
  29336. }));
  29337. case 1:
  29338. case "end":
  29339. return _context27.stop();
  29340. }
  29341. }
  29342. }, _callee27, this);
  29343. }));
  29344. function signUpWithEmailAndPassword(_x22, _x23) {
  29345. return _signUpWithEmailAndPassword.apply(this, arguments);
  29346. }
  29347. return signUpWithEmailAndPassword;
  29348. }()
  29349. }, {
  29350. key: "sendPasswordResetEmail",
  29351. value: function () {
  29352. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  29353. return _regenerator.default.wrap(function _callee28$(_context28) {
  29354. while (1) {
  29355. switch (_context28.prev = _context28.next) {
  29356. case 0:
  29357. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  29358. email: e
  29359. }));
  29360. case 1:
  29361. case "end":
  29362. return _context28.stop();
  29363. }
  29364. }
  29365. }, _callee28, this);
  29366. }));
  29367. function sendPasswordResetEmail(_x24) {
  29368. return _sendPasswordResetEmail.apply(this, arguments);
  29369. }
  29370. return sendPasswordResetEmail;
  29371. }()
  29372. }, {
  29373. key: "onLoginStateChanged",
  29374. value: function onLoginStateChanged(e) {
  29375. var _this9 = this;
  29376. Ne(qe, function () {
  29377. var t = _this9.hasLoginState();
  29378. e.call(_this9, t);
  29379. });
  29380. var t = this.hasLoginState();
  29381. e.call(this, t);
  29382. }
  29383. }, {
  29384. key: "onLoginStateExpired",
  29385. value: function onLoginStateExpired(e) {
  29386. Ne(Me, e.bind(this));
  29387. }
  29388. }, {
  29389. key: "onAccessTokenRefreshed",
  29390. value: function onAccessTokenRefreshed(e) {
  29391. Ne(Be, e.bind(this));
  29392. }
  29393. }, {
  29394. key: "onAnonymousConverted",
  29395. value: function onAnonymousConverted(e) {
  29396. Ne(je, e.bind(this));
  29397. }
  29398. }, {
  29399. key: "onLoginTypeChanged",
  29400. value: function onLoginTypeChanged(e) {
  29401. var _this10 = this;
  29402. Ne(Ke, function () {
  29403. var t = _this10.hasLoginState();
  29404. e.call(_this10, t);
  29405. });
  29406. }
  29407. }, {
  29408. key: "getAccessToken",
  29409. value: function () {
  29410. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  29411. return _regenerator.default.wrap(function _callee29$(_context29) {
  29412. while (1) {
  29413. switch (_context29.prev = _context29.next) {
  29414. case 0:
  29415. _context29.next = 2;
  29416. return this._request.getAccessToken();
  29417. case 2:
  29418. _context29.t0 = _context29.sent.accessToken;
  29419. _context29.t1 = this.config.env;
  29420. return _context29.abrupt("return", {
  29421. accessToken: _context29.t0,
  29422. env: _context29.t1
  29423. });
  29424. case 5:
  29425. case "end":
  29426. return _context29.stop();
  29427. }
  29428. }
  29429. }, _callee29, this);
  29430. }));
  29431. function getAccessToken() {
  29432. return _getAccessToken2.apply(this, arguments);
  29433. }
  29434. return getAccessToken;
  29435. }()
  29436. }, {
  29437. key: "hasLoginState",
  29438. value: function hasLoginState() {
  29439. var e = this._cache.keys.refreshTokenKey;
  29440. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  29441. }
  29442. }, {
  29443. key: "isUsernameRegistered",
  29444. value: function () {
  29445. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  29446. var _yield$this$_request$5, t;
  29447. return _regenerator.default.wrap(function _callee30$(_context30) {
  29448. while (1) {
  29449. switch (_context30.prev = _context30.next) {
  29450. case 0:
  29451. if (!("string" != typeof e)) {
  29452. _context30.next = 2;
  29453. break;
  29454. }
  29455. throw new ne({
  29456. code: "PARAM_ERROR",
  29457. message: "username must be a string"
  29458. });
  29459. case 2:
  29460. _context30.next = 4;
  29461. return this._request.send("auth.isUsernameRegistered", {
  29462. username: e
  29463. });
  29464. case 4:
  29465. _yield$this$_request$5 = _context30.sent;
  29466. t = _yield$this$_request$5.data;
  29467. return _context30.abrupt("return", t && t.isRegistered);
  29468. case 7:
  29469. case "end":
  29470. return _context30.stop();
  29471. }
  29472. }
  29473. }, _callee30, this);
  29474. }));
  29475. function isUsernameRegistered(_x25) {
  29476. return _isUsernameRegistered.apply(this, arguments);
  29477. }
  29478. return isUsernameRegistered;
  29479. }()
  29480. }, {
  29481. key: "getLoginState",
  29482. value: function getLoginState() {
  29483. return Promise.resolve(this.hasLoginState());
  29484. }
  29485. }, {
  29486. key: "signInWithTicket",
  29487. value: function () {
  29488. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  29489. return _regenerator.default.wrap(function _callee31$(_context31) {
  29490. while (1) {
  29491. switch (_context31.prev = _context31.next) {
  29492. case 0:
  29493. return _context31.abrupt("return", new tt(this.config).signIn(e));
  29494. case 1:
  29495. case "end":
  29496. return _context31.stop();
  29497. }
  29498. }
  29499. }, _callee31, this);
  29500. }));
  29501. function signInWithTicket(_x26) {
  29502. return _signInWithTicket.apply(this, arguments);
  29503. }
  29504. return signInWithTicket;
  29505. }()
  29506. }, {
  29507. key: "shouldRefreshAccessToken",
  29508. value: function shouldRefreshAccessToken(e) {
  29509. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  29510. }
  29511. }, {
  29512. key: "getUserInfo",
  29513. value: function getUserInfo() {
  29514. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  29515. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  29516. requestId: e.seqId
  29517. });
  29518. });
  29519. }
  29520. }, {
  29521. key: "getAuthHeader",
  29522. value: function getAuthHeader() {
  29523. var _this$_cache$keys11 = this._cache.keys,
  29524. e = _this$_cache$keys11.refreshTokenKey,
  29525. t = _this$_cache$keys11.accessTokenKey,
  29526. n = this._cache.getStore(e);
  29527. return {
  29528. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  29529. };
  29530. }
  29531. }, {
  29532. key: "_onAnonymousConverted",
  29533. value: function _onAnonymousConverted(e) {
  29534. var t = e.data.env;
  29535. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  29536. }
  29537. }, {
  29538. key: "_onLoginTypeChanged",
  29539. value: function _onLoginTypeChanged(e) {
  29540. var _e$data = e.data,
  29541. t = _e$data.loginType,
  29542. n = _e$data.persistence,
  29543. s = _e$data.env;
  29544. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  29545. }
  29546. }]);
  29547. return rt;
  29548. }();
  29549. var it = function it(e, t) {
  29550. t = t || we();
  29551. var n = Ye(this.config.env),
  29552. s = e.cloudPath,
  29553. r = e.filePath,
  29554. i = e.onUploadProgress,
  29555. _e$fileType = e.fileType,
  29556. o = _e$fileType === void 0 ? "image" : _e$fileType;
  29557. return n.send("storage.getUploadMetadata", {
  29558. path: s
  29559. }).then(function (e) {
  29560. var _e$data2 = e.data,
  29561. a = _e$data2.url,
  29562. c = _e$data2.authorization,
  29563. u = _e$data2.token,
  29564. h = _e$data2.fileId,
  29565. l = _e$data2.cosFileId,
  29566. d = e.requestId,
  29567. p = {
  29568. key: s,
  29569. signature: c,
  29570. "x-cos-meta-fileid": l,
  29571. success_action_status: "201",
  29572. "x-cos-security-token": u
  29573. };
  29574. n.upload({
  29575. url: a,
  29576. data: p,
  29577. file: r,
  29578. name: s,
  29579. fileType: o,
  29580. onUploadProgress: i
  29581. }).then(function (e) {
  29582. 201 === e.statusCode ? t(null, {
  29583. fileID: h,
  29584. requestId: d
  29585. }) : t(new ne({
  29586. code: "STORAGE_REQUEST_FAIL",
  29587. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  29588. }));
  29589. }).catch(function (e) {
  29590. t(e);
  29591. });
  29592. }).catch(function (e) {
  29593. t(e);
  29594. }), t.promise;
  29595. },
  29596. ot = function ot(e, t) {
  29597. t = t || we();
  29598. var n = Ye(this.config.env),
  29599. s = e.cloudPath;
  29600. return n.send("storage.getUploadMetadata", {
  29601. path: s
  29602. }).then(function (e) {
  29603. t(null, e);
  29604. }).catch(function (e) {
  29605. t(e);
  29606. }), t.promise;
  29607. },
  29608. at = function at(_ref7, t) {
  29609. var e = _ref7.fileList;
  29610. if (t = t || we(), !e || !Array.isArray(e)) return {
  29611. code: "INVALID_PARAM",
  29612. message: "fileList必须是非空的数组"
  29613. };
  29614. var _iterator3 = _createForOfIteratorHelper(e),
  29615. _step3;
  29616. try {
  29617. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  29618. var _t8 = _step3.value;
  29619. if (!_t8 || "string" != typeof _t8) return {
  29620. code: "INVALID_PARAM",
  29621. message: "fileList的元素必须是非空的字符串"
  29622. };
  29623. }
  29624. } catch (err) {
  29625. _iterator3.e(err);
  29626. } finally {
  29627. _iterator3.f();
  29628. }
  29629. var n = {
  29630. fileid_list: e
  29631. };
  29632. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  29633. e.code ? t(null, e) : t(null, {
  29634. fileList: e.data.delete_list,
  29635. requestId: e.requestId
  29636. });
  29637. }).catch(function (e) {
  29638. t(e);
  29639. }), t.promise;
  29640. },
  29641. ct = function ct(_ref8, t) {
  29642. var e = _ref8.fileList;
  29643. t = t || we(), e && Array.isArray(e) || t(null, {
  29644. code: "INVALID_PARAM",
  29645. message: "fileList必须是非空的数组"
  29646. });
  29647. var n = [];
  29648. var _iterator4 = _createForOfIteratorHelper(e),
  29649. _step4;
  29650. try {
  29651. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  29652. var _s9 = _step4.value;
  29653. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  29654. code: "INVALID_PARAM",
  29655. message: "fileList的元素必须是包含fileID和maxAge的对象"
  29656. }), n.push({
  29657. fileid: _s9.fileID,
  29658. max_age: _s9.maxAge
  29659. })) : "string" == typeof _s9 ? n.push({
  29660. fileid: _s9
  29661. }) : t(null, {
  29662. code: "INVALID_PARAM",
  29663. message: "fileList的元素必须是字符串"
  29664. });
  29665. }
  29666. } catch (err) {
  29667. _iterator4.e(err);
  29668. } finally {
  29669. _iterator4.f();
  29670. }
  29671. var s = {
  29672. file_list: n
  29673. };
  29674. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  29675. e.code ? t(null, e) : t(null, {
  29676. fileList: e.data.download_list,
  29677. requestId: e.requestId
  29678. });
  29679. }).catch(function (e) {
  29680. t(e);
  29681. }), t.promise;
  29682. },
  29683. ut = /*#__PURE__*/function () {
  29684. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  29685. var e, n, s, r;
  29686. return _regenerator.default.wrap(function _callee32$(_context32) {
  29687. while (1) {
  29688. switch (_context32.prev = _context32.next) {
  29689. case 0:
  29690. e = _ref9.fileID;
  29691. _context32.next = 3;
  29692. return ct.call(this, {
  29693. fileList: [{
  29694. fileID: e,
  29695. maxAge: 600
  29696. }]
  29697. });
  29698. case 3:
  29699. n = _context32.sent.fileList[0];
  29700. if (!("SUCCESS" !== n.code)) {
  29701. _context32.next = 6;
  29702. break;
  29703. }
  29704. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  29705. e(n);
  29706. }));
  29707. case 6:
  29708. s = Ye(this.config.env);
  29709. r = n.download_url;
  29710. if (!(r = encodeURI(r), !t)) {
  29711. _context32.next = 10;
  29712. break;
  29713. }
  29714. return _context32.abrupt("return", s.download({
  29715. url: r
  29716. }));
  29717. case 10:
  29718. _context32.t0 = t;
  29719. _context32.next = 13;
  29720. return s.download({
  29721. url: r
  29722. });
  29723. case 13:
  29724. _context32.t1 = _context32.sent;
  29725. (0, _context32.t0)(_context32.t1);
  29726. case 15:
  29727. case "end":
  29728. return _context32.stop();
  29729. }
  29730. }
  29731. }, _callee32, this);
  29732. }));
  29733. return function ut(_x27, _x28) {
  29734. return _ref10.apply(this, arguments);
  29735. };
  29736. }(),
  29737. ht = function ht(_ref11, i) {
  29738. var e = _ref11.name,
  29739. t = _ref11.data,
  29740. n = _ref11.query,
  29741. s = _ref11.parse,
  29742. r = _ref11.search;
  29743. var o = i || we();
  29744. var a;
  29745. try {
  29746. a = t ? JSON.stringify(t) : "";
  29747. } catch (e) {
  29748. return Promise.reject(e);
  29749. }
  29750. if (!e) return Promise.reject(new ne({
  29751. code: "PARAM_ERROR",
  29752. message: "函数名不能为空"
  29753. }));
  29754. var c = {
  29755. inQuery: n,
  29756. parse: s,
  29757. search: r,
  29758. function_name: e,
  29759. request_data: a
  29760. };
  29761. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  29762. if (e.code) o(null, e);else {
  29763. var _t9 = e.data.response_data;
  29764. if (s) o(null, {
  29765. result: _t9,
  29766. requestId: e.requestId
  29767. });else try {
  29768. _t9 = JSON.parse(e.data.response_data), o(null, {
  29769. result: _t9,
  29770. requestId: e.requestId
  29771. });
  29772. } catch (e) {
  29773. o(new ne({
  29774. message: "response data must be json"
  29775. }));
  29776. }
  29777. }
  29778. return o.promise;
  29779. }).catch(function (e) {
  29780. o(e);
  29781. }), o.promise;
  29782. },
  29783. lt = {
  29784. timeout: 15e3,
  29785. persistence: "session"
  29786. },
  29787. dt = {};
  29788. var pt = /*#__PURE__*/function () {
  29789. function pt(e) {
  29790. (0, _classCallCheck2.default)(this, pt);
  29791. this.config = e || this.config, this.authObj = void 0;
  29792. }
  29793. (0, _createClass2.default)(pt, [{
  29794. key: "init",
  29795. value: function init(e) {
  29796. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  29797. timeout: e.timeout || 5e3,
  29798. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  29799. })), this.config = _objectSpread(_objectSpread({}, lt), e), !0) {
  29800. case this.config.timeout > 6e5:
  29801. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  29802. break;
  29803. case this.config.timeout < 100:
  29804. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  29805. }
  29806. return new pt(this.config);
  29807. }
  29808. }, {
  29809. key: "auth",
  29810. value: function auth() {
  29811. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  29812. e = _ref12.persistence;
  29813. if (this.authObj) return this.authObj;
  29814. var t = e || ke.adapter.primaryStorage || lt.persistence;
  29815. var n;
  29816. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  29817. var t = e.env;
  29818. Ee[t] = new Ae(e), Oe[t] = new Ae(_objectSpread(_objectSpread({}, e), {}, {
  29819. persistence: "local"
  29820. }));
  29821. }(this.config), n = this.config, Ve[n.env] = new Ge(n), this.authObj = new rt(this.config), this.authObj;
  29822. }
  29823. }, {
  29824. key: "on",
  29825. value: function on(e, t) {
  29826. return Ne.apply(this, [e, t]);
  29827. }
  29828. }, {
  29829. key: "off",
  29830. value: function off(e, t) {
  29831. return Fe.apply(this, [e, t]);
  29832. }
  29833. }, {
  29834. key: "callFunction",
  29835. value: function callFunction(e, t) {
  29836. return ht.apply(this, [e, t]);
  29837. }
  29838. }, {
  29839. key: "deleteFile",
  29840. value: function deleteFile(e, t) {
  29841. return at.apply(this, [e, t]);
  29842. }
  29843. }, {
  29844. key: "getTempFileURL",
  29845. value: function getTempFileURL(e, t) {
  29846. return ct.apply(this, [e, t]);
  29847. }
  29848. }, {
  29849. key: "downloadFile",
  29850. value: function downloadFile(e, t) {
  29851. return ut.apply(this, [e, t]);
  29852. }
  29853. }, {
  29854. key: "uploadFile",
  29855. value: function uploadFile(e, t) {
  29856. return it.apply(this, [e, t]);
  29857. }
  29858. }, {
  29859. key: "getUploadMetadata",
  29860. value: function getUploadMetadata(e, t) {
  29861. return ot.apply(this, [e, t]);
  29862. }
  29863. }, {
  29864. key: "registerExtension",
  29865. value: function registerExtension(e) {
  29866. dt[e.name] = e;
  29867. }
  29868. }, {
  29869. key: "invokeExtension",
  29870. value: function () {
  29871. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  29872. var n;
  29873. return _regenerator.default.wrap(function _callee33$(_context33) {
  29874. while (1) {
  29875. switch (_context33.prev = _context33.next) {
  29876. case 0:
  29877. n = dt[e];
  29878. if (n) {
  29879. _context33.next = 3;
  29880. break;
  29881. }
  29882. throw new ne({
  29883. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  29884. });
  29885. case 3:
  29886. _context33.next = 5;
  29887. return n.invoke(t, this);
  29888. case 5:
  29889. return _context33.abrupt("return", _context33.sent);
  29890. case 6:
  29891. case "end":
  29892. return _context33.stop();
  29893. }
  29894. }
  29895. }, _callee33, this);
  29896. }));
  29897. function invokeExtension(_x29, _x30) {
  29898. return _invokeExtension.apply(this, arguments);
  29899. }
  29900. return invokeExtension;
  29901. }()
  29902. }, {
  29903. key: "useAdapters",
  29904. value: function useAdapters(e) {
  29905. var _ref13 = be(e) || {},
  29906. t = _ref13.adapter,
  29907. n = _ref13.runtime;
  29908. t && (ke.adapter = t), n && (ke.runtime = n);
  29909. }
  29910. }]);
  29911. return pt;
  29912. }();
  29913. var ft = new pt();
  29914. function gt(e, t, n) {
  29915. void 0 === n && (n = {});
  29916. var s = /\?/.test(t),
  29917. r = "";
  29918. for (var i in n) {
  29919. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  29920. }
  29921. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  29922. }
  29923. var mt = /*#__PURE__*/function () {
  29924. function mt() {
  29925. (0, _classCallCheck2.default)(this, mt);
  29926. }
  29927. (0, _createClass2.default)(mt, [{
  29928. key: "post",
  29929. value: function post(e) {
  29930. var t = e.url,
  29931. n = e.data,
  29932. s = e.headers;
  29933. return new Promise(function (e, r) {
  29934. se.request({
  29935. url: gt("https:", t),
  29936. data: n,
  29937. method: "POST",
  29938. header: s,
  29939. success: function success(t) {
  29940. e(t);
  29941. },
  29942. fail: function fail(e) {
  29943. r(e);
  29944. }
  29945. });
  29946. });
  29947. }
  29948. }, {
  29949. key: "upload",
  29950. value: function upload(e) {
  29951. return new Promise(function (t, n) {
  29952. var s = e.url,
  29953. r = e.file,
  29954. i = e.data,
  29955. o = e.headers,
  29956. a = e.fileType,
  29957. c = se.uploadFile({
  29958. url: gt("https:", s),
  29959. name: "file",
  29960. formData: Object.assign({}, i),
  29961. filePath: r,
  29962. fileType: a,
  29963. header: o,
  29964. success: function success(e) {
  29965. var n = {
  29966. statusCode: e.statusCode,
  29967. data: e.data || {}
  29968. };
  29969. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  29970. },
  29971. fail: function fail(e) {
  29972. n(new Error(e.errMsg || "uploadFile:fail"));
  29973. }
  29974. });
  29975. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  29976. e.onUploadProgress({
  29977. loaded: t.totalBytesSent,
  29978. total: t.totalBytesExpectedToSend
  29979. });
  29980. });
  29981. });
  29982. }
  29983. }]);
  29984. return mt;
  29985. }();
  29986. var yt = {
  29987. setItem: function setItem(e, t) {
  29988. se.setStorageSync(e, t);
  29989. },
  29990. getItem: function getItem(e) {
  29991. return se.getStorageSync(e);
  29992. },
  29993. removeItem: function removeItem(e) {
  29994. se.removeStorageSync(e);
  29995. },
  29996. clear: function clear() {
  29997. se.clearStorageSync();
  29998. }
  29999. };
  30000. var _t = {
  30001. genAdapter: function genAdapter() {
  30002. return {
  30003. root: {},
  30004. reqClass: mt,
  30005. localStorage: yt,
  30006. primaryStorage: "local"
  30007. };
  30008. },
  30009. isMatch: function isMatch() {
  30010. return !0;
  30011. },
  30012. runtime: "uni_app"
  30013. };
  30014. ft.useAdapters(_t);
  30015. var wt = ft,
  30016. vt = wt.init;
  30017. wt.init = function (e) {
  30018. e.env = e.spaceId;
  30019. var t = vt.call(this, e);
  30020. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  30021. var n = t.auth;
  30022. return t.auth = function (e) {
  30023. var t = n.call(this, e);
  30024. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  30025. var n;
  30026. t[e] = (n = t[e], function (e) {
  30027. e = e || {};
  30028. var _te = te(e),
  30029. t = _te.success,
  30030. s = _te.fail,
  30031. r = _te.complete;
  30032. if (!(t || s || r)) return n.call(this, e);
  30033. n.call(this, e).then(function (e) {
  30034. t && t(e), r && r(e);
  30035. }, function (e) {
  30036. s && s(e), r && r(e);
  30037. });
  30038. }).bind(t);
  30039. }), t;
  30040. }, t.customAuth = t.auth, t;
  30041. };
  30042. var It = wt;
  30043. var St = /*#__PURE__*/function (_fe) {
  30044. (0, _inherits2.default)(St, _fe);
  30045. var _super8 = _createSuper(St);
  30046. function St() {
  30047. (0, _classCallCheck2.default)(this, St);
  30048. return _super8.apply(this, arguments);
  30049. }
  30050. (0, _createClass2.default)(St, [{
  30051. key: "getAccessToken",
  30052. value: function getAccessToken() {
  30053. var _this11 = this;
  30054. return new Promise(function (e, t) {
  30055. var n = "Anonymous_Access_token";
  30056. _this11.setAccessToken(n), e(n);
  30057. });
  30058. }
  30059. }, {
  30060. key: "setupRequest",
  30061. value: function setupRequest(e, t) {
  30062. var n = Object.assign({}, e, {
  30063. spaceId: this.config.spaceId,
  30064. timestamp: Date.now()
  30065. }),
  30066. s = {
  30067. "Content-Type": "application/json"
  30068. };
  30069. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret);
  30070. var r = he();
  30071. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  30072. var _re = re(),
  30073. i = _re.token;
  30074. return s["x-client-token"] = i, {
  30075. url: this.config.requestUrl,
  30076. method: "POST",
  30077. data: n,
  30078. dataType: "json",
  30079. header: JSON.parse(JSON.stringify(s))
  30080. };
  30081. }
  30082. }, {
  30083. key: "uploadFileToOSS",
  30084. value: function uploadFileToOSS(_ref14) {
  30085. var _this12 = this;
  30086. var e = _ref14.url,
  30087. t = _ref14.formData,
  30088. n = _ref14.name,
  30089. s = _ref14.filePath,
  30090. r = _ref14.fileType,
  30091. i = _ref14.onUploadProgress;
  30092. return new Promise(function (o, a) {
  30093. var c = _this12.adapter.uploadFile({
  30094. url: e,
  30095. formData: t,
  30096. name: n,
  30097. filePath: s,
  30098. fileType: r,
  30099. success: function success(e) {
  30100. e && e.statusCode < 400 ? o(e) : a(new ne({
  30101. code: "UPLOAD_FAILED",
  30102. message: "文件上传失败"
  30103. }));
  30104. },
  30105. fail: function fail(e) {
  30106. a(new ne({
  30107. code: e.code || "UPLOAD_FAILED",
  30108. message: e.message || e.errMsg || "文件上传失败"
  30109. }));
  30110. }
  30111. });
  30112. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  30113. i({
  30114. loaded: e.totalBytesSent,
  30115. total: e.totalBytesExpectedToSend
  30116. });
  30117. });
  30118. });
  30119. }
  30120. }, {
  30121. key: "uploadFile",
  30122. value: function uploadFile(_ref15) {
  30123. var _this13 = this;
  30124. var e = _ref15.filePath,
  30125. t = _ref15.cloudPath,
  30126. _ref15$fileType = _ref15.fileType,
  30127. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  30128. s = _ref15.onUploadProgress;
  30129. if (!t) throw new ne({
  30130. code: "CLOUDPATH_REQUIRED",
  30131. message: "cloudPath不可为空"
  30132. });
  30133. var r;
  30134. return this.getOSSUploadOptionsFromPath({
  30135. cloudPath: t
  30136. }).then(function (t) {
  30137. var _t$result = t.result,
  30138. i = _t$result.url,
  30139. o = _t$result.formData,
  30140. a = _t$result.name;
  30141. r = t.result.fileUrl;
  30142. var c = {
  30143. url: i,
  30144. formData: o,
  30145. name: a,
  30146. filePath: e,
  30147. fileType: n
  30148. };
  30149. return _this13.uploadFileToOSS(Object.assign({}, c, {
  30150. onUploadProgress: s
  30151. }));
  30152. }).then(function () {
  30153. return _this13.reportOSSUpload({
  30154. cloudPath: t
  30155. });
  30156. }).then(function (t) {
  30157. return new Promise(function (n, s) {
  30158. t.success ? n({
  30159. success: !0,
  30160. filePath: e,
  30161. fileID: r
  30162. }) : s(new ne({
  30163. code: "UPLOAD_FAILED",
  30164. message: "文件上传失败"
  30165. }));
  30166. });
  30167. });
  30168. }
  30169. }, {
  30170. key: "deleteFile",
  30171. value: function deleteFile(_ref16) {
  30172. var e = _ref16.fileList;
  30173. var t = {
  30174. method: "serverless.file.resource.delete",
  30175. params: JSON.stringify({
  30176. fileList: e
  30177. })
  30178. };
  30179. return this.request(this.setupRequest(t)).then(function (e) {
  30180. if (e.success) return e.result;
  30181. throw new ne({
  30182. code: "DELETE_FILE_FAILED",
  30183. message: "删除文件失败"
  30184. });
  30185. });
  30186. }
  30187. }, {
  30188. key: "getTempFileURL",
  30189. value: function getTempFileURL() {
  30190. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30191. e = _ref17.fileList;
  30192. if (!Array.isArray(e) || 0 === e.length) throw new ne({
  30193. code: "INVALID_PARAM",
  30194. message: "fileList的元素必须是非空的字符串"
  30195. });
  30196. var t = {
  30197. method: "serverless.file.resource.getTempFileURL",
  30198. params: JSON.stringify({
  30199. fileList: e
  30200. })
  30201. };
  30202. return this.request(this.setupRequest(t)).then(function (e) {
  30203. if (e.success) return {
  30204. fileList: e.result.fileList.map(function (e) {
  30205. return {
  30206. fileID: e.fileID,
  30207. tempFileURL: e.tempFileURL
  30208. };
  30209. })
  30210. };
  30211. throw new ne({
  30212. code: "GET_TEMP_FILE_URL_FAILED",
  30213. message: "获取临时文件链接失败"
  30214. });
  30215. });
  30216. }
  30217. }]);
  30218. return St;
  30219. }(fe);
  30220. var bt = {
  30221. init: function init(e) {
  30222. var t = new St(e),
  30223. n = {
  30224. signInAnonymously: function signInAnonymously() {
  30225. return t.authorize();
  30226. },
  30227. getLoginState: function getLoginState() {
  30228. return Promise.resolve(!1);
  30229. }
  30230. };
  30231. return t.auth = function () {
  30232. return n;
  30233. }, t.customAuth = t.auth, t;
  30234. }
  30235. };
  30236. function kt(_ref18) {
  30237. var e = _ref18.data;
  30238. var t;
  30239. t = he();
  30240. var n = JSON.parse(JSON.stringify(e || {}));
  30241. if (Object.assign(n, {
  30242. clientInfo: t
  30243. }), !n.uniIdToken) {
  30244. var _re2 = re(),
  30245. _e19 = _re2.token;
  30246. _e19 && (n.uniIdToken = _e19);
  30247. }
  30248. return n;
  30249. }
  30250. function Ct() {
  30251. return _Ct.apply(this, arguments);
  30252. }
  30253. function _Ct() {
  30254. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  30255. var _this26 = this;
  30256. var _ref60,
  30257. e,
  30258. t,
  30259. _this$__dev__,
  30260. n,
  30261. s,
  30262. r,
  30263. i,
  30264. o,
  30265. a,
  30266. _args6 = arguments;
  30267. return _regenerator.default.wrap(function _callee54$(_context54) {
  30268. while (1) {
  30269. switch (_context54.prev = _context54.next) {
  30270. case 0:
  30271. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  30272. _context54.next = 3;
  30273. return this.__dev__.initLocalNetwork();
  30274. case 3:
  30275. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  30276. aliyun: "aliyun",
  30277. tencent: "tcb"
  30278. }[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);
  30279. return _context54.abrupt("return", new Promise(function (t, n) {
  30280. se.request({
  30281. method: "POST",
  30282. url: o,
  30283. data: {
  30284. name: e,
  30285. platform: P,
  30286. provider: r,
  30287. spaceId: i
  30288. },
  30289. timeout: 3e3,
  30290. success: function success(e) {
  30291. t(e);
  30292. },
  30293. fail: function fail() {
  30294. t({
  30295. data: {
  30296. code: "NETWORK_ERROR",
  30297. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  30298. }
  30299. });
  30300. }
  30301. });
  30302. }).then(function () {
  30303. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30304. e = _ref61.data;
  30305. var _ref62 = e || {},
  30306. t = _ref62.code,
  30307. n = _ref62.message;
  30308. return {
  30309. code: 0 === t ? 0 : t || "SYS_ERR",
  30310. message: n || "SYS_ERR"
  30311. };
  30312. }).then(function (_ref63) {
  30313. var n = _ref63.code,
  30314. s = _ref63.message;
  30315. if (0 !== n) {
  30316. switch (n) {
  30317. case "MODULE_ENCRYPTED":
  30318. 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"));
  30319. break;
  30320. case "FUNCTION_ENCRYPTED":
  30321. 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"));
  30322. break;
  30323. case "ACTION_ENCRYPTED":
  30324. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  30325. break;
  30326. case "NETWORK_ERROR":
  30327. {
  30328. var _e31 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  30329. throw console.error(_e31), new Error(_e31);
  30330. }
  30331. case "SWITCH_TO_CLOUD":
  30332. break;
  30333. default:
  30334. {
  30335. var _e32 = "\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");
  30336. throw console.error(_e32), new Error(_e32);
  30337. }
  30338. }
  30339. return _this26._callCloudFunction({
  30340. name: e,
  30341. data: t
  30342. });
  30343. }
  30344. return new Promise(function (e, n) {
  30345. var s = kt.call(_this26, {
  30346. data: t
  30347. });
  30348. se.request({
  30349. method: "POST",
  30350. url: a,
  30351. data: {
  30352. provider: r,
  30353. platform: P,
  30354. param: s
  30355. },
  30356. success: function success() {
  30357. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30358. t = _ref64.statusCode,
  30359. s = _ref64.data;
  30360. return !t || t >= 400 ? n(new ne({
  30361. code: s.code || "SYS_ERR",
  30362. message: s.message || "request:fail"
  30363. })) : e({
  30364. result: s
  30365. });
  30366. },
  30367. fail: function fail(e) {
  30368. n(new ne({
  30369. code: e.code || e.errCode || "SYS_ERR",
  30370. message: e.message || e.errMsg || "request:fail"
  30371. }));
  30372. }
  30373. });
  30374. });
  30375. }));
  30376. case 5:
  30377. case "end":
  30378. return _context54.stop();
  30379. }
  30380. }
  30381. }, _callee54, this);
  30382. }));
  30383. return _Ct.apply(this, arguments);
  30384. }
  30385. var Tt = [{
  30386. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  30387. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  30388. mode: "append"
  30389. }];
  30390. var Pt = /[\\^$.*+?()[\]{}|]/g,
  30391. At = RegExp(Pt.source);
  30392. function Et(e, t, n) {
  30393. return e.replace(new RegExp((s = t) && At.test(s) ? s.replace(Pt, "\\$&") : s, "g"), n);
  30394. var s;
  30395. }
  30396. var Ot = "none",
  30397. xt = "request",
  30398. Rt = "response",
  30399. Ut = "both";
  30400. var Lt = /*#__PURE__*/function () {
  30401. function Lt() {
  30402. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30403. e = _ref19.secretType,
  30404. t = _ref19.uniCloudIns;
  30405. (0, _classCallCheck2.default)(this, Lt);
  30406. this.clientType = "", this.secretType = e || Ot, this.uniCloudIns = t;
  30407. var _this$uniCloudIns$con = this.uniCloudIns.config,
  30408. n = _this$uniCloudIns$con.provider,
  30409. s = _this$uniCloudIns$con.spaceId;
  30410. var r;
  30411. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  30412. }
  30413. (0, _createClass2.default)(Lt, [{
  30414. key: "getSystemInfo",
  30415. value: function getSystemInfo() {
  30416. return this._systemInfo || (this._systemInfo = ce()), this._systemInfo;
  30417. }
  30418. }, {
  30419. key: "appId",
  30420. get: function get() {
  30421. return this.getSystemInfo().appId;
  30422. }
  30423. }, {
  30424. key: "deviceId",
  30425. get: function get() {
  30426. return this.getSystemInfo().deviceId;
  30427. }
  30428. }, {
  30429. key: "encryptData",
  30430. value: function () {
  30431. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  30432. return _regenerator.default.wrap(function _callee34$(_context34) {
  30433. while (1) {
  30434. switch (_context34.prev = _context34.next) {
  30435. case 0:
  30436. return _context34.abrupt("return", this.secretType === Ot ? e : this.platformEncryptData(e));
  30437. case 1:
  30438. case "end":
  30439. return _context34.stop();
  30440. }
  30441. }
  30442. }, _callee34, this);
  30443. }));
  30444. function encryptData(_x31) {
  30445. return _encryptData.apply(this, arguments);
  30446. }
  30447. return encryptData;
  30448. }()
  30449. }, {
  30450. key: "decryptResult",
  30451. value: function () {
  30452. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  30453. var _ref20, t, n;
  30454. return _regenerator.default.wrap(function _callee35$(_context35) {
  30455. while (1) {
  30456. switch (_context35.prev = _context35.next) {
  30457. case 0:
  30458. if (!(this.secretType === Ot)) {
  30459. _context35.next = 2;
  30460. break;
  30461. }
  30462. return _context35.abrupt("return", e);
  30463. case 2:
  30464. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  30465. return _context35.abrupt("return", t || !n ? e : this.secretType === xt ? n : this.platformDecryptResult(e));
  30466. case 4:
  30467. case "end":
  30468. return _context35.stop();
  30469. }
  30470. }
  30471. }, _callee35, this);
  30472. }));
  30473. function decryptResult(_x32) {
  30474. return _decryptResult.apply(this, arguments);
  30475. }
  30476. return decryptResult;
  30477. }()
  30478. }, {
  30479. key: "wrapVerifyClientCallFunction",
  30480. value: function wrapVerifyClientCallFunction(e) {
  30481. var t = this;
  30482. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  30483. var _ref22,
  30484. n,
  30485. _ref22$data,
  30486. s,
  30487. r,
  30488. _args36 = arguments;
  30489. return _regenerator.default.wrap(function _callee36$(_context36) {
  30490. while (1) {
  30491. switch (_context36.prev = _context36.next) {
  30492. case 0:
  30493. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  30494. _context36.next = 3;
  30495. return t.prepare();
  30496. case 3:
  30497. _context36.next = 5;
  30498. return t.platformGetSignOption();
  30499. case 5:
  30500. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  30501. _context36.next = 8;
  30502. return e({
  30503. name: n,
  30504. data: s
  30505. });
  30506. case 8:
  30507. r = _context36.sent;
  30508. _context36.t0 = t.isClientKeyNotFound(r);
  30509. if (!_context36.t0) {
  30510. _context36.next = 19;
  30511. break;
  30512. }
  30513. _context36.next = 13;
  30514. return t.prepare({
  30515. forceUpdate: !0
  30516. });
  30517. case 13:
  30518. _context36.next = 15;
  30519. return t.platformGetSignOption();
  30520. case 15:
  30521. s._uniCloudOptions = _context36.sent;
  30522. _context36.next = 18;
  30523. return e({
  30524. name: n,
  30525. data: s
  30526. });
  30527. case 18:
  30528. r = _context36.sent;
  30529. case 19:
  30530. return _context36.abrupt("return", r);
  30531. case 20:
  30532. case "end":
  30533. return _context36.stop();
  30534. }
  30535. }
  30536. }, _callee36);
  30537. }));
  30538. }
  30539. }, {
  30540. key: "wrapEncryptDataCallFunction",
  30541. value: function wrapEncryptDataCallFunction(e) {
  30542. var t = this;
  30543. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  30544. var _ref24,
  30545. n,
  30546. _ref24$data,
  30547. s,
  30548. r,
  30549. i,
  30550. _r3,
  30551. _args37 = arguments;
  30552. return _regenerator.default.wrap(function _callee37$(_context37) {
  30553. while (1) {
  30554. switch (_context37.prev = _context37.next) {
  30555. case 0:
  30556. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  30557. _context37.next = 3;
  30558. return t.prepare();
  30559. case 3:
  30560. _context37.next = 5;
  30561. return t.encryptData(s);
  30562. case 5:
  30563. r = _context37.sent;
  30564. _context37.next = 8;
  30565. return e({
  30566. name: n,
  30567. data: r
  30568. });
  30569. case 8:
  30570. i = _context37.sent;
  30571. if (!t.isClientKeyNotFound(i)) {
  30572. _context37.next = 21;
  30573. break;
  30574. }
  30575. _context37.next = 12;
  30576. return t.prepare({
  30577. forceUpdate: !0
  30578. });
  30579. case 12:
  30580. _context37.next = 14;
  30581. return t.encryptData(s);
  30582. case 14:
  30583. _r3 = _context37.sent;
  30584. _context37.next = 17;
  30585. return t.platformGetSignOption();
  30586. case 17:
  30587. s._uniCloudOptions = _context37.sent;
  30588. _context37.next = 20;
  30589. return e({
  30590. name: n,
  30591. data: _r3
  30592. });
  30593. case 20:
  30594. i = _context37.sent;
  30595. case 21:
  30596. _context37.next = 23;
  30597. return t.decryptResult(i.result);
  30598. case 23:
  30599. i.result = _context37.sent;
  30600. return _context37.abrupt("return", i);
  30601. case 25:
  30602. case "end":
  30603. return _context37.stop();
  30604. }
  30605. }
  30606. }, _callee37);
  30607. }));
  30608. }
  30609. }]);
  30610. return Lt;
  30611. }();
  30612. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  30613. function Nt(e) {
  30614. return parseInt(e) === e;
  30615. }
  30616. function Dt(e) {
  30617. if (!Nt(e.length)) return !1;
  30618. for (var t = 0; t < e.length; t++) {
  30619. if (!Nt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  30620. }
  30621. return !0;
  30622. }
  30623. function Ft(e, t) {
  30624. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  30625. if (Array.isArray(e)) {
  30626. if (!Dt(e)) throw new Error("Array contains invalid value: " + e);
  30627. return new Uint8Array(e);
  30628. }
  30629. if (Nt(e.length) && Dt(e)) return new Uint8Array(e);
  30630. throw new Error("unsupported array-like object");
  30631. }
  30632. function qt(e) {
  30633. return new Uint8Array(e);
  30634. }
  30635. function Mt(e, t, n, s, r) {
  30636. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  30637. }
  30638. var Kt,
  30639. jt = {
  30640. toBytes: function toBytes(e) {
  30641. var t = [],
  30642. n = 0;
  30643. for (e = encodeURI(e); n < e.length;) {
  30644. var s = e.charCodeAt(n++);
  30645. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  30646. }
  30647. return Ft(t);
  30648. },
  30649. fromBytes: function fromBytes(e) {
  30650. for (var t = [], n = 0; n < e.length;) {
  30651. var s = e[n];
  30652. 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);
  30653. }
  30654. return t.join("");
  30655. }
  30656. },
  30657. Bt = (Kt = "0123456789abcdef", {
  30658. toBytes: function toBytes(e) {
  30659. for (var t = [], n = 0; n < e.length; n += 2) {
  30660. t.push(parseInt(e.substr(n, 2), 16));
  30661. }
  30662. return t;
  30663. },
  30664. fromBytes: function fromBytes(e) {
  30665. for (var t = [], n = 0; n < e.length; n++) {
  30666. var s = e[n];
  30667. t.push(Kt[(240 & s) >> 4] + Kt[15 & s]);
  30668. }
  30669. return t.join("");
  30670. }
  30671. }),
  30672. $t = {
  30673. 16: 10,
  30674. 24: 12,
  30675. 32: 14
  30676. },
  30677. Wt = [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],
  30678. zt = [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],
  30679. Jt = [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],
  30680. Ht = [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],
  30681. Gt = [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],
  30682. Vt = [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],
  30683. 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],
  30684. Qt = [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],
  30685. Xt = [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],
  30686. Zt = [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],
  30687. en = [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],
  30688. tn = [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],
  30689. nn = [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],
  30690. sn = [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],
  30691. rn = [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];
  30692. function on(e) {
  30693. for (var t = [], n = 0; n < e.length; n += 4) {
  30694. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  30695. }
  30696. return t;
  30697. }
  30698. var an = /*#__PURE__*/function () {
  30699. function an(e) {
  30700. (0, _classCallCheck2.default)(this, an);
  30701. if (!(this instanceof an)) throw Error("AES must be instanitated with `new`");
  30702. Object.defineProperty(this, "key", {
  30703. value: Ft(e, !0)
  30704. }), this._prepare();
  30705. }
  30706. (0, _createClass2.default)(an, [{
  30707. key: "_prepare",
  30708. value: function _prepare() {
  30709. var e = $t[this.key.length];
  30710. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  30711. this._Ke = [], this._Kd = [];
  30712. for (var t = 0; t <= e; t++) {
  30713. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  30714. }
  30715. var n,
  30716. s = 4 * (e + 1),
  30717. r = this.key.length / 4,
  30718. i = on(this.key);
  30719. for (t = 0; t < r; t++) {
  30720. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  30721. }
  30722. for (var o, a = 0, c = r; c < s;) {
  30723. if (o = i[r - 1], i[0] ^= zt[o >> 16 & 255] << 24 ^ zt[o >> 8 & 255] << 16 ^ zt[255 & o] << 8 ^ zt[o >> 24 & 255] ^ Wt[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  30724. i[t] ^= i[t - 1];
  30725. } else {
  30726. for (t = 1; t < r / 2; t++) {
  30727. i[t] ^= i[t - 1];
  30728. }
  30729. o = i[r / 2 - 1], i[r / 2] ^= zt[255 & o] ^ zt[o >> 8 & 255] << 8 ^ zt[o >> 16 & 255] << 16 ^ zt[o >> 24 & 255] << 24;
  30730. for (t = r / 2 + 1; t < r; t++) {
  30731. i[t] ^= i[t - 1];
  30732. }
  30733. }
  30734. for (t = 0; t < r && c < s;) {
  30735. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  30736. }
  30737. }
  30738. for (var u = 1; u < e; u++) {
  30739. for (var h = 0; h < 4; h++) {
  30740. o = this._Kd[u][h], this._Kd[u][h] = tn[o >> 24 & 255] ^ nn[o >> 16 & 255] ^ sn[o >> 8 & 255] ^ rn[255 & o];
  30741. }
  30742. }
  30743. }
  30744. }, {
  30745. key: "encrypt",
  30746. value: function encrypt(e) {
  30747. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  30748. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  30749. s[r] ^= this._Ke[0][r];
  30750. }
  30751. for (var i = 1; i < t; i++) {
  30752. for (r = 0; r < 4; r++) {
  30753. n[r] = Ht[s[r] >> 24 & 255] ^ Gt[s[(r + 1) % 4] >> 16 & 255] ^ Vt[s[(r + 2) % 4] >> 8 & 255] ^ Yt[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  30754. }
  30755. s = n.slice();
  30756. }
  30757. var o,
  30758. a = qt(16);
  30759. for (r = 0; r < 4; r++) {
  30760. o = this._Ke[t][r], a[4 * r] = 255 & (zt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (zt[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (zt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (zt[255 & s[(r + 3) % 4]] ^ o);
  30761. }
  30762. return a;
  30763. }
  30764. }, {
  30765. key: "decrypt",
  30766. value: function decrypt(e) {
  30767. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  30768. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  30769. s[r] ^= this._Kd[0][r];
  30770. }
  30771. for (var i = 1; i < t; i++) {
  30772. for (r = 0; r < 4; r++) {
  30773. n[r] = Qt[s[r] >> 24 & 255] ^ Xt[s[(r + 3) % 4] >> 16 & 255] ^ Zt[s[(r + 2) % 4] >> 8 & 255] ^ en[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  30774. }
  30775. s = n.slice();
  30776. }
  30777. var o,
  30778. a = qt(16);
  30779. for (r = 0; r < 4; r++) {
  30780. o = this._Kd[t][r], a[4 * r] = 255 & (Jt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Jt[s[(r + 3) % 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 + 1) % 4]] ^ o);
  30781. }
  30782. return a;
  30783. }
  30784. }]);
  30785. return an;
  30786. }();
  30787. var cn = /*#__PURE__*/function () {
  30788. function cn(e) {
  30789. (0, _classCallCheck2.default)(this, cn);
  30790. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  30791. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new an(e);
  30792. }
  30793. (0, _createClass2.default)(cn, [{
  30794. key: "encrypt",
  30795. value: function encrypt(e) {
  30796. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  30797. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30798. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.encrypt(n), t, s);
  30799. }
  30800. return t;
  30801. }
  30802. }, {
  30803. key: "decrypt",
  30804. value: function decrypt(e) {
  30805. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  30806. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30807. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.decrypt(n), t, s);
  30808. }
  30809. return t;
  30810. }
  30811. }]);
  30812. return cn;
  30813. }();
  30814. var un = /*#__PURE__*/function () {
  30815. function un(e, t) {
  30816. (0, _classCallCheck2.default)(this, un);
  30817. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  30818. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  30819. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  30820. } else t = qt(16);
  30821. this._lastCipherblock = Ft(t, !0), this._aes = new an(e);
  30822. }
  30823. (0, _createClass2.default)(un, [{
  30824. key: "encrypt",
  30825. value: function encrypt(e) {
  30826. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  30827. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30828. Mt(e, n, 0, s, s + 16);
  30829. for (var r = 0; r < 16; r++) {
  30830. n[r] ^= this._lastCipherblock[r];
  30831. }
  30832. this._lastCipherblock = this._aes.encrypt(n), Mt(this._lastCipherblock, t, s);
  30833. }
  30834. return t;
  30835. }
  30836. }, {
  30837. key: "decrypt",
  30838. value: function decrypt(e) {
  30839. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  30840. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30841. Mt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  30842. for (var r = 0; r < 16; r++) {
  30843. t[s + r] = n[r] ^ this._lastCipherblock[r];
  30844. }
  30845. Mt(e, this._lastCipherblock, 0, s, s + 16);
  30846. }
  30847. return t;
  30848. }
  30849. }]);
  30850. return un;
  30851. }();
  30852. var hn = /*#__PURE__*/function () {
  30853. function hn(e, t, n) {
  30854. (0, _classCallCheck2.default)(this, hn);
  30855. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  30856. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  30857. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  30858. } else t = qt(16);
  30859. n || (n = 1), this.segmentSize = n, this._shiftRegister = Ft(t, !0), this._aes = new an(e);
  30860. }
  30861. (0, _createClass2.default)(hn, [{
  30862. key: "encrypt",
  30863. value: function encrypt(e) {
  30864. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  30865. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  30866. t = this._aes.encrypt(this._shiftRegister);
  30867. for (var r = 0; r < this.segmentSize; r++) {
  30868. n[s + r] ^= t[r];
  30869. }
  30870. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  30871. }
  30872. return n;
  30873. }
  30874. }, {
  30875. key: "decrypt",
  30876. value: function decrypt(e) {
  30877. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  30878. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  30879. t = this._aes.encrypt(this._shiftRegister);
  30880. for (var r = 0; r < this.segmentSize; r++) {
  30881. n[s + r] ^= t[r];
  30882. }
  30883. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  30884. }
  30885. return n;
  30886. }
  30887. }]);
  30888. return hn;
  30889. }();
  30890. var ln = /*#__PURE__*/function () {
  30891. function ln(e, t) {
  30892. (0, _classCallCheck2.default)(this, ln);
  30893. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  30894. if (this.description = "Output Feedback", this.name = "ofb", t) {
  30895. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  30896. } else t = qt(16);
  30897. this._lastPrecipher = Ft(t, !0), this._lastPrecipherIndex = 16, this._aes = new an(e);
  30898. }
  30899. (0, _createClass2.default)(ln, [{
  30900. key: "encrypt",
  30901. value: function encrypt(e) {
  30902. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  30903. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  30904. }
  30905. return t;
  30906. }
  30907. }, {
  30908. key: "decrypt",
  30909. value: function decrypt(e) {
  30910. return this.encrypt(e);
  30911. }
  30912. }]);
  30913. return ln;
  30914. }();
  30915. var dn = /*#__PURE__*/function () {
  30916. function dn(e) {
  30917. (0, _classCallCheck2.default)(this, dn);
  30918. if (!(this instanceof dn)) throw Error("Counter must be instanitated with `new`");
  30919. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = qt(16), this.setValue(e)) : this.setBytes(e);
  30920. }
  30921. (0, _createClass2.default)(dn, [{
  30922. key: "setValue",
  30923. value: function setValue(e) {
  30924. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  30925. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  30926. for (var t = 15; t >= 0; --t) {
  30927. this._counter[t] = e % 256, e = parseInt(e / 256);
  30928. }
  30929. }
  30930. }, {
  30931. key: "setBytes",
  30932. value: function setBytes(e) {
  30933. if (16 != (e = Ft(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  30934. this._counter = e;
  30935. }
  30936. }, {
  30937. key: "increment",
  30938. value: function increment() {
  30939. for (var e = 15; e >= 0; e--) {
  30940. if (255 !== this._counter[e]) {
  30941. this._counter[e]++;
  30942. break;
  30943. }
  30944. this._counter[e] = 0;
  30945. }
  30946. }
  30947. }]);
  30948. return dn;
  30949. }();
  30950. var pn = /*#__PURE__*/function () {
  30951. function pn(e, t) {
  30952. (0, _classCallCheck2.default)(this, pn);
  30953. if (!(this instanceof pn)) throw Error("AES must be instanitated with `new`");
  30954. this.description = "Counter", this.name = "ctr", t instanceof dn || (t = new dn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new an(e);
  30955. }
  30956. (0, _createClass2.default)(pn, [{
  30957. key: "encrypt",
  30958. value: function encrypt(e) {
  30959. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  30960. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  30961. }
  30962. return t;
  30963. }
  30964. }, {
  30965. key: "decrypt",
  30966. value: function decrypt(e) {
  30967. return this.encrypt(e);
  30968. }
  30969. }]);
  30970. return pn;
  30971. }();
  30972. var fn = {
  30973. AES: an,
  30974. Counter: dn,
  30975. ModeOfOperation: {
  30976. ecb: cn,
  30977. cbc: un,
  30978. cfb: hn,
  30979. ofb: ln,
  30980. ctr: pn
  30981. },
  30982. utils: {
  30983. hex: Bt,
  30984. utf8: jt
  30985. },
  30986. padding: {
  30987. pkcs7: {
  30988. pad: function pad(e) {
  30989. var t = 16 - (e = Ft(e, !0)).length % 16,
  30990. n = qt(e.length + t);
  30991. Mt(e, n);
  30992. for (var s = e.length; s < n.length; s++) {
  30993. n[s] = t;
  30994. }
  30995. return n;
  30996. },
  30997. strip: function strip(e) {
  30998. if ((e = Ft(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  30999. var t = e[e.length - 1];
  31000. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  31001. for (var n = e.length - t, s = 0; s < t; s++) {
  31002. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  31003. }
  31004. var r = qt(n);
  31005. return Mt(e, r, 0, 0, n), r;
  31006. }
  31007. }
  31008. },
  31009. _arrayTest: {
  31010. coerceArray: Ft,
  31011. createArray: qt,
  31012. copyArray: Mt
  31013. }
  31014. };
  31015. function gn(e, t, n) {
  31016. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  31017. r = fn.utils.utf8.toBytes(n),
  31018. i = fn.utils.utf8.toBytes(e),
  31019. o = new fn.ModeOfOperation.cbc(s, r),
  31020. a = fn.padding.pkcs7.pad(i),
  31021. c = o.encrypt(a);
  31022. return uni.arrayBufferToBase64(c);
  31023. }
  31024. var mn = {
  31025. code: 2e4,
  31026. message: "System error"
  31027. },
  31028. yn = {
  31029. code: 20101,
  31030. message: "Invalid client"
  31031. },
  31032. _n = {
  31033. code: 20102,
  31034. message: "Get encrypt key failed"
  31035. },
  31036. wn = {
  31037. 10001: "Secure network is not supported on current playground or unimpsdk",
  31038. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  31039. 10009: "Encrypt payload failed",
  31040. 10010: "Decrypt response failed"
  31041. };
  31042. function vn(e) {
  31043. var _ref25 = e || {},
  31044. t = _ref25.errSubject,
  31045. n = _ref25.subject,
  31046. s = _ref25.errCode,
  31047. r = _ref25.errMsg,
  31048. i = _ref25.code,
  31049. o = _ref25.message,
  31050. a = _ref25.cause;
  31051. return new ne({
  31052. subject: t || n || "uni-secure-network",
  31053. code: s || i || mn.code,
  31054. message: r || o,
  31055. cause: a
  31056. });
  31057. }
  31058. var In,
  31059. Sn,
  31060. bn = null;
  31061. var kn = /*#__PURE__*/function (_Lt) {
  31062. (0, _inherits2.default)(kn, _Lt);
  31063. var _super9 = _createSuper(kn);
  31064. function kn(e) {
  31065. var _this14;
  31066. (0, _classCallCheck2.default)(this, kn);
  31067. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  31068. return _this14;
  31069. }
  31070. (0, _createClass2.default)(kn, [{
  31071. key: "isLogin",
  31072. value: function isLogin() {
  31073. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  31074. }
  31075. }, {
  31076. key: "prepare",
  31077. value: function () {
  31078. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  31079. return _regenerator.default.wrap(function _callee38$(_context38) {
  31080. while (1) {
  31081. switch (_context38.prev = _context38.next) {
  31082. case 0:
  31083. if (this.isLogin()) {
  31084. _context38.next = 7;
  31085. break;
  31086. }
  31087. if (this.scopedGlobalCache.initPromise) {
  31088. _context38.next = 3;
  31089. break;
  31090. }
  31091. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  31092. case 3:
  31093. _context38.next = 5;
  31094. return this.scopedGlobalCache.initPromise;
  31095. case 5:
  31096. if (this.isLogin()) {
  31097. _context38.next = 7;
  31098. break;
  31099. }
  31100. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  31101. case 7:
  31102. case "end":
  31103. return _context38.stop();
  31104. }
  31105. }
  31106. }, _callee38, this);
  31107. }));
  31108. function prepare() {
  31109. return _prepare2.apply(this, arguments);
  31110. }
  31111. return prepare;
  31112. }()
  31113. }, {
  31114. key: "getUserEncryptKey",
  31115. value: function () {
  31116. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  31117. var _this15 = this;
  31118. var e;
  31119. return _regenerator.default.wrap(function _callee39$(_context39) {
  31120. while (1) {
  31121. switch (_context39.prev = _context39.next) {
  31122. case 0:
  31123. if (!this.userEncryptKey) {
  31124. _context39.next = 2;
  31125. break;
  31126. }
  31127. return _context39.abrupt("return", this.userEncryptKey);
  31128. case 2:
  31129. if (!(bn && bn.expireTime)) {
  31130. _context39.next = 6;
  31131. break;
  31132. }
  31133. e = Date.now();
  31134. if (!(bn.expireTime - e > 0)) {
  31135. _context39.next = 6;
  31136. break;
  31137. }
  31138. return _context39.abrupt("return", (this.userEncryptKey = bn, this.userEncryptKey));
  31139. case 6:
  31140. return _context39.abrupt("return", new Promise(function (e, t) {
  31141. uni.getUserCryptoManager().getLatestUserKey({
  31142. success: function success(t) {
  31143. bn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  31144. },
  31145. fail: function fail(e) {
  31146. t(vn(_objectSpread(_objectSpread({}, _n), {}, {
  31147. cause: e
  31148. })));
  31149. }
  31150. });
  31151. }));
  31152. case 7:
  31153. case "end":
  31154. return _context39.stop();
  31155. }
  31156. }
  31157. }, _callee39, this);
  31158. }));
  31159. function getUserEncryptKey() {
  31160. return _getUserEncryptKey.apply(this, arguments);
  31161. }
  31162. return getUserEncryptKey;
  31163. }()
  31164. }, {
  31165. key: "getWxAppId",
  31166. value: function getWxAppId() {
  31167. return wx.getAccountInfoSync().miniProgram.appId;
  31168. }
  31169. }, {
  31170. key: "platformGetSignOption",
  31171. value: function () {
  31172. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  31173. var _yield$this$getUserEn, e, t, n;
  31174. return _regenerator.default.wrap(function _callee40$(_context40) {
  31175. while (1) {
  31176. switch (_context40.prev = _context40.next) {
  31177. case 0:
  31178. _context40.next = 2;
  31179. return this.getUserEncryptKey();
  31180. case 2:
  31181. _yield$this$getUserEn = _context40.sent;
  31182. e = _yield$this$getUserEn.encryptKey;
  31183. t = _yield$this$getUserEn.iv;
  31184. n = _yield$this$getUserEn.version;
  31185. return _context40.abrupt("return", {
  31186. verifyClientSign: gn(JSON.stringify({
  31187. data: JSON.stringify({}),
  31188. appId: this.appId,
  31189. deviceId: this.deviceId,
  31190. wxAppId: this.getWxAppId(),
  31191. simulator: "devtools" === ce().platform,
  31192. timestamp: Date.now()
  31193. }), e, t),
  31194. encryptKeyId: n,
  31195. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  31196. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  31197. });
  31198. case 7:
  31199. case "end":
  31200. return _context40.stop();
  31201. }
  31202. }
  31203. }, _callee40, this);
  31204. }));
  31205. function platformGetSignOption() {
  31206. return _platformGetSignOption.apply(this, arguments);
  31207. }
  31208. return platformGetSignOption;
  31209. }()
  31210. }, {
  31211. key: "platformEncryptData",
  31212. value: function () {
  31213. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  31214. var _yield$this$getUserEn2, t, n, s, r;
  31215. return _regenerator.default.wrap(function _callee41$(_context41) {
  31216. while (1) {
  31217. switch (_context41.prev = _context41.next) {
  31218. case 0:
  31219. _context41.next = 2;
  31220. return this.getUserEncryptKey();
  31221. case 2:
  31222. _yield$this$getUserEn2 = _context41.sent;
  31223. t = _yield$this$getUserEn2.encryptKey;
  31224. n = _yield$this$getUserEn2.iv;
  31225. s = _yield$this$getUserEn2.version;
  31226. r = {
  31227. secretType: this.secretType,
  31228. encryptKeyId: s,
  31229. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  31230. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  31231. };
  31232. return _context41.abrupt("return", this.secretType === Rt ? {
  31233. content: e,
  31234. _uniCloudOptions: r
  31235. } : {
  31236. content: gn(JSON.stringify({
  31237. data: JSON.stringify(e),
  31238. appId: this.appId,
  31239. deviceId: this.deviceId,
  31240. wxAppId: this.getWxAppId(),
  31241. simulator: "devtools" === ce().platform,
  31242. timestamp: Date.now()
  31243. }), t, n),
  31244. _uniCloudOptions: r
  31245. });
  31246. case 8:
  31247. case "end":
  31248. return _context41.stop();
  31249. }
  31250. }
  31251. }, _callee41, this);
  31252. }));
  31253. function platformEncryptData(_x33) {
  31254. return _platformEncryptData.apply(this, arguments);
  31255. }
  31256. return platformEncryptData;
  31257. }()
  31258. }, {
  31259. key: "platformDecryptResult",
  31260. value: function () {
  31261. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  31262. var t, _yield$this$getUserEn3, n, s;
  31263. return _regenerator.default.wrap(function _callee42$(_context42) {
  31264. while (1) {
  31265. switch (_context42.prev = _context42.next) {
  31266. case 0:
  31267. t = e.content;
  31268. _context42.next = 3;
  31269. return this.getUserEncryptKey();
  31270. case 3:
  31271. _yield$this$getUserEn3 = _context42.sent;
  31272. n = _yield$this$getUserEn3.encryptKey;
  31273. s = _yield$this$getUserEn3.iv;
  31274. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  31275. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  31276. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  31277. i = fn.utils.utf8.toBytes(n),
  31278. o = new fn.ModeOfOperation.cbc(r, i),
  31279. a = fn.padding.pkcs7.strip(o.decrypt(s));
  31280. return fn.utils.utf8.fromBytes(a);
  31281. }(t, n, s)));
  31282. case 7:
  31283. case "end":
  31284. return _context42.stop();
  31285. }
  31286. }
  31287. }, _callee42, this);
  31288. }));
  31289. function platformDecryptResult(_x34) {
  31290. return _platformDecryptResult.apply(this, arguments);
  31291. }
  31292. return platformDecryptResult;
  31293. }()
  31294. }, {
  31295. key: "isClientKeyNotFound",
  31296. value: function isClientKeyNotFound() {
  31297. return !1;
  31298. }
  31299. }]);
  31300. return kn;
  31301. }(Lt);
  31302. function Cn(e) {
  31303. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  31304. n = {};
  31305. var _loop = function _loop(_s10) {
  31306. var r = t[_s10];
  31307. n[r] = function () {
  31308. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  31309. t[_key] = arguments[_key];
  31310. }
  31311. return new Promise(function (n, s) {
  31312. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  31313. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31314. e = _ref26.type,
  31315. t = _ref26.data,
  31316. r = _ref26.errCode,
  31317. i = _ref26.errMsg,
  31318. o = _ref26.errSubject,
  31319. a = _ref26.message;
  31320. "success" === e ? n(t) : s(vn({
  31321. errCode: r,
  31322. errMsg: wn[r] || i || a,
  31323. errSubject: o
  31324. }));
  31325. }])) : s(vn({
  31326. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  31327. }));
  31328. });
  31329. };
  31330. };
  31331. for (var _s10 = 0; _s10 < t.length; _s10++) {
  31332. _loop(_s10);
  31333. }
  31334. return n;
  31335. }
  31336. var Tn = /*#__PURE__*/function (_Lt2) {
  31337. (0, _inherits2.default)(Tn, _Lt2);
  31338. var _super10 = _createSuper(Tn);
  31339. function Tn(e) {
  31340. var _this16;
  31341. (0, _classCallCheck2.default)(this, Tn);
  31342. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ce());
  31343. return _this16;
  31344. }
  31345. (0, _createClass2.default)(Tn, [{
  31346. key: "hasClientKey",
  31347. value: function () {
  31348. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  31349. return _regenerator.default.wrap(function _callee43$(_context43) {
  31350. while (1) {
  31351. switch (_context43.prev = _context43.next) {
  31352. case 0:
  31353. _context43.next = 2;
  31354. return this.appUtils.hasClientKey({
  31355. provider: this.provider,
  31356. spaceId: this.spaceId
  31357. });
  31358. case 2:
  31359. this._hasClientKey = _context43.sent;
  31360. return _context43.abrupt("return", this._hasClientKey);
  31361. case 4:
  31362. case "end":
  31363. return _context43.stop();
  31364. }
  31365. }
  31366. }, _callee43, this);
  31367. }));
  31368. function hasClientKey() {
  31369. return _hasClientKey.apply(this, arguments);
  31370. }
  31371. return hasClientKey;
  31372. }()
  31373. }, {
  31374. key: "getAppClientKey",
  31375. value: function () {
  31376. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  31377. var _yield$this$appUtils$, e, t, n, s, r;
  31378. return _regenerator.default.wrap(function _callee44$(_context44) {
  31379. while (1) {
  31380. switch (_context44.prev = _context44.next) {
  31381. case 0:
  31382. _context44.next = 2;
  31383. return this.appUtils.encryptGetClientKeyPayload({
  31384. data: JSON.stringify({})
  31385. });
  31386. case 2:
  31387. _yield$this$appUtils$ = _context44.sent;
  31388. e = _yield$this$appUtils$.data;
  31389. t = _yield$this$appUtils$.key;
  31390. _context44.next = 7;
  31391. return this.uniCloudIns.callFunction({
  31392. name: "DCloud-clientDB",
  31393. data: {
  31394. redirectTo: "encryption",
  31395. action: "getAppClientKey",
  31396. data: e,
  31397. key: t
  31398. }
  31399. });
  31400. case 7:
  31401. _context44.t0 = _context44.sent.result;
  31402. if (_context44.t0) {
  31403. _context44.next = 10;
  31404. break;
  31405. }
  31406. _context44.t0 = {};
  31407. case 10:
  31408. n = _context44.t0;
  31409. if (!(0 !== n.errCode)) {
  31410. _context44.next = 13;
  31411. break;
  31412. }
  31413. throw function (e) {
  31414. return new ne({
  31415. subject: e.errSubject || "uni-secure-network",
  31416. code: e.errCode || e.code || mn.code,
  31417. message: e.errMsg || e.message
  31418. });
  31419. }(n);
  31420. case 13:
  31421. s = n.clientKey, r = n.key;
  31422. _context44.next = 16;
  31423. return this.appUtils.setClientKey({
  31424. provider: this.provider,
  31425. spaceId: this.spaceId,
  31426. clientKey: s,
  31427. key: r
  31428. });
  31429. case 16:
  31430. case "end":
  31431. return _context44.stop();
  31432. }
  31433. }
  31434. }, _callee44, this);
  31435. }));
  31436. function getAppClientKey() {
  31437. return _getAppClientKey.apply(this, arguments);
  31438. }
  31439. return getAppClientKey;
  31440. }()
  31441. }, {
  31442. key: "ensureClientKey",
  31443. value: function () {
  31444. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  31445. var _this17 = this;
  31446. var _ref27,
  31447. _ref27$forceUpdate,
  31448. e,
  31449. _args45 = arguments;
  31450. return _regenerator.default.wrap(function _callee45$(_context45) {
  31451. while (1) {
  31452. switch (_context45.prev = _context45.next) {
  31453. case 0:
  31454. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  31455. _context45.t1 = !0;
  31456. _context45.next = 4;
  31457. return this.hasClientKey();
  31458. case 4:
  31459. _context45.t2 = _context45.sent;
  31460. _context45.t0 = _context45.t1 !== _context45.t2;
  31461. if (_context45.t0) {
  31462. _context45.next = 8;
  31463. break;
  31464. }
  31465. _context45.t0 = e;
  31466. case 8:
  31467. if (!_context45.t0) {
  31468. _context45.next = 10;
  31469. break;
  31470. }
  31471. 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) {
  31472. _this17.scopedGlobalCache.initStatus = p;
  31473. }).catch(function (e) {
  31474. throw _this17.scopedGlobalCache.initStatus = f, e;
  31475. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  31476. case 10:
  31477. case "end":
  31478. return _context45.stop();
  31479. }
  31480. }
  31481. }, _callee45, this);
  31482. }));
  31483. function ensureClientKey() {
  31484. return _ensureClientKey.apply(this, arguments);
  31485. }
  31486. return ensureClientKey;
  31487. }()
  31488. }, {
  31489. key: "prepare",
  31490. value: function () {
  31491. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  31492. var _ref28,
  31493. _ref28$forceUpdate,
  31494. e,
  31495. _args46 = arguments;
  31496. return _regenerator.default.wrap(function _callee46$(_context46) {
  31497. while (1) {
  31498. switch (_context46.prev = _context46.next) {
  31499. case 0:
  31500. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  31501. _context46.next = 3;
  31502. return this.ensureClientKey({
  31503. forceUpdate: e
  31504. });
  31505. case 3:
  31506. case "end":
  31507. return _context46.stop();
  31508. }
  31509. }
  31510. }, _callee46, this);
  31511. }));
  31512. function prepare() {
  31513. return _prepare3.apply(this, arguments);
  31514. }
  31515. return prepare;
  31516. }()
  31517. }, {
  31518. key: "platformGetSignOption",
  31519. value: function () {
  31520. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  31521. var _yield$this$appUtils$2, e, t;
  31522. return _regenerator.default.wrap(function _callee47$(_context47) {
  31523. while (1) {
  31524. switch (_context47.prev = _context47.next) {
  31525. case 0:
  31526. _context47.next = 2;
  31527. return this.appUtils.encrypt({
  31528. provider: this.provider,
  31529. spaceId: this.spaceId,
  31530. data: JSON.stringify({})
  31531. });
  31532. case 2:
  31533. _yield$this$appUtils$2 = _context47.sent;
  31534. e = _yield$this$appUtils$2.data;
  31535. t = _yield$this$appUtils$2.key;
  31536. return _context47.abrupt("return", {
  31537. verifyClientSign: e,
  31538. encryptKeyId: t
  31539. });
  31540. case 6:
  31541. case "end":
  31542. return _context47.stop();
  31543. }
  31544. }
  31545. }, _callee47, this);
  31546. }));
  31547. function platformGetSignOption() {
  31548. return _platformGetSignOption2.apply(this, arguments);
  31549. }
  31550. return platformGetSignOption;
  31551. }()
  31552. }, {
  31553. key: "platformEncryptData",
  31554. value: function () {
  31555. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  31556. var _yield$this$appUtils$3, t, n, s;
  31557. return _regenerator.default.wrap(function _callee48$(_context48) {
  31558. while (1) {
  31559. switch (_context48.prev = _context48.next) {
  31560. case 0:
  31561. _context48.next = 2;
  31562. return this.appUtils.encrypt({
  31563. provider: this.provider,
  31564. spaceId: this.spaceId,
  31565. data: JSON.stringify(e)
  31566. });
  31567. case 2:
  31568. _yield$this$appUtils$3 = _context48.sent;
  31569. t = _yield$this$appUtils$3.data;
  31570. n = _yield$this$appUtils$3.key;
  31571. s = {
  31572. secretType: this.secretType,
  31573. encryptKeyId: n
  31574. };
  31575. return _context48.abrupt("return", this.secretType === Rt ? {
  31576. content: e,
  31577. _uniCloudOptions: s
  31578. } : {
  31579. content: t,
  31580. _uniCloudOptions: s
  31581. });
  31582. case 7:
  31583. case "end":
  31584. return _context48.stop();
  31585. }
  31586. }
  31587. }, _callee48, this);
  31588. }));
  31589. function platformEncryptData(_x35) {
  31590. return _platformEncryptData2.apply(this, arguments);
  31591. }
  31592. return platformEncryptData;
  31593. }()
  31594. }, {
  31595. key: "platformDecryptResult",
  31596. value: function () {
  31597. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  31598. var t, _e$_uniCloudOptions, n, s, r;
  31599. return _regenerator.default.wrap(function _callee49$(_context49) {
  31600. while (1) {
  31601. switch (_context49.prev = _context49.next) {
  31602. case 0:
  31603. t = e.content;
  31604. _e$_uniCloudOptions = e._uniCloudOptions;
  31605. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  31606. s = n.encryptKeyId;
  31607. _context49.next = 6;
  31608. return this.appUtils.decrypt({
  31609. provider: this.provider,
  31610. spaceId: this.spaceId,
  31611. data: t,
  31612. key: s
  31613. });
  31614. case 6:
  31615. r = _context49.sent;
  31616. return _context49.abrupt("return", JSON.parse(r.data));
  31617. case 8:
  31618. case "end":
  31619. return _context49.stop();
  31620. }
  31621. }
  31622. }, _callee49, this);
  31623. }));
  31624. function platformDecryptResult(_x36) {
  31625. return _platformDecryptResult2.apply(this, arguments);
  31626. }
  31627. return platformDecryptResult;
  31628. }()
  31629. }, {
  31630. key: "isClientKeyNotFound",
  31631. value: function isClientKeyNotFound() {
  31632. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31633. var t = e.result || {};
  31634. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  31635. }
  31636. }]);
  31637. return Tn;
  31638. }(Lt);
  31639. function Pn() {
  31640. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31641. e = _ref29.secretType;
  31642. return e === xt || e === Rt || e === Ut;
  31643. }
  31644. function An() {
  31645. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31646. e = _ref30.name,
  31647. _ref30$data = _ref30.data,
  31648. t = _ref30$data === void 0 ? {} : _ref30$data;
  31649. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  31650. }
  31651. function En() {
  31652. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31653. e = _ref31.provider,
  31654. t = _ref31.spaceId,
  31655. n = _ref31.functionName;
  31656. var _ce = ce(),
  31657. s = _ce.appId,
  31658. r = _ce.uniPlatform,
  31659. i = _ce.osName;
  31660. var o = r;
  31661. "app" === r && (o = i);
  31662. var a = function () {
  31663. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31664. e = _ref32.provider,
  31665. t = _ref32.spaceId;
  31666. var n = T;
  31667. if (!n) return {};
  31668. e = function (e) {
  31669. return "tencent" === e ? "tcb" : e;
  31670. }(e);
  31671. var s = n.find(function (n) {
  31672. return n.provider === e && n.spaceId === t;
  31673. });
  31674. return s && s.config;
  31675. }({
  31676. provider: e,
  31677. spaceId: t
  31678. });
  31679. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  31680. var c = a.accessControl.function || {},
  31681. u = Object.keys(c);
  31682. if (0 === u.length) return !0;
  31683. var h = function (e, t) {
  31684. var n, s, r;
  31685. for (var _i2 = 0; _i2 < e.length; _i2++) {
  31686. var _o2 = e[_i2];
  31687. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  31688. return e.trim();
  31689. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  31690. }
  31691. return n || s || r;
  31692. }(u, n);
  31693. if (!h) return !1;
  31694. if ((c[h] || []).find(function () {
  31695. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31696. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  31697. })) return !0;
  31698. 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")), vn(yn);
  31699. }
  31700. function On(_ref33) {
  31701. var e = _ref33.functionName,
  31702. t = _ref33.result,
  31703. n = _ref33.logPvd;
  31704. if (b && this.__dev__.debugLog && t && t.requestId) {
  31705. var _s11 = JSON.stringify({
  31706. spaceId: this.config.spaceId,
  31707. functionName: e,
  31708. requestId: t.requestId
  31709. });
  31710. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  31711. }
  31712. }
  31713. function xn(e) {
  31714. var t = e.callFunction,
  31715. n = function n(_n7) {
  31716. var _this18 = this;
  31717. var s = _n7.name;
  31718. _n7.data = kt.call(e, {
  31719. data: _n7.data
  31720. });
  31721. var r = {
  31722. aliyun: "aliyun",
  31723. tencent: "tcb",
  31724. tcb: "tcb"
  31725. }[this.config.provider],
  31726. i = Pn(_n7),
  31727. o = An(_n7),
  31728. a = i || o;
  31729. return t.call(this, _n7).then(function (e) {
  31730. return e.errCode = 0, !a && On.call(_this18, {
  31731. functionName: s,
  31732. result: e,
  31733. logPvd: r
  31734. }), Promise.resolve(e);
  31735. }, function (e) {
  31736. return !a && On.call(_this18, {
  31737. functionName: s,
  31738. result: e,
  31739. logPvd: r
  31740. }), e && e.message && (e.message = function () {
  31741. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31742. _ref34$message = _ref34.message,
  31743. e = _ref34$message === void 0 ? "" : _ref34$message,
  31744. _ref34$extraInfo = _ref34.extraInfo,
  31745. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  31746. _ref34$formatter = _ref34.formatter,
  31747. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  31748. for (var _s12 = 0; _s12 < n.length; _s12++) {
  31749. var _n$_s = n[_s12],
  31750. _r4 = _n$_s.rule,
  31751. _i3 = _n$_s.content,
  31752. _o3 = _n$_s.mode,
  31753. _a = e.match(_r4);
  31754. if (!_a) continue;
  31755. var _c = _i3;
  31756. for (var _e20 = 1; _e20 < _a.length; _e20++) {
  31757. _c = Et(_c, "{$".concat(_e20, "}"), _a[_e20]);
  31758. }
  31759. for (var _e21 in t) {
  31760. _c = Et(_c, "{".concat(_e21, "}"), t[_e21]);
  31761. }
  31762. return "replace" === _o3 ? _c : e + _c;
  31763. }
  31764. return e;
  31765. }({
  31766. message: "[".concat(_n7.name, "]: ").concat(e.message),
  31767. formatter: Tt,
  31768. extraInfo: {
  31769. functionName: s
  31770. }
  31771. })), Promise.reject(e);
  31772. });
  31773. };
  31774. e.callFunction = function (t) {
  31775. var _e$config = e.config,
  31776. s = _e$config.provider,
  31777. r = _e$config.spaceId,
  31778. i = t.name;
  31779. var o, a;
  31780. if (t.data = t.data || {}, b && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && E ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Ct), o = Ct) : o = n, o = o.bind(e), An(t)) a = n.call(e, t);else if (function (_ref35) {
  31781. var e = _ref35.name,
  31782. _ref35$data = _ref35.data,
  31783. t = _ref35$data === void 0 ? {} : _ref35$data;
  31784. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  31785. }(t)) a = o.call(e, t);else if (Pn(t)) {
  31786. a = new Sn({
  31787. secretType: t.secretType,
  31788. uniCloudIns: e
  31789. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  31790. } else if (En({
  31791. provider: s,
  31792. spaceId: r,
  31793. functionName: i
  31794. })) {
  31795. a = new Sn({
  31796. secretType: t.secretType,
  31797. uniCloudIns: e
  31798. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  31799. } else a = o(t);
  31800. return Object.defineProperty(a, "result", {
  31801. get: function get() {
  31802. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  31803. }
  31804. }), a;
  31805. };
  31806. }
  31807. Sn = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  31808. function _class2() {
  31809. (0, _classCallCheck2.default)(this, _class2);
  31810. throw vn({
  31811. message: "Platform ".concat(P, " is not supported by secure network")
  31812. });
  31813. }
  31814. return (0, _createClass2.default)(_class2);
  31815. }() : C ? "mp-weixin" === P ? kn : Tn : /*#__PURE__*/function () {
  31816. function _class3() {
  31817. (0, _classCallCheck2.default)(this, _class3);
  31818. throw vn({
  31819. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  31820. });
  31821. }
  31822. return (0, _createClass2.default)(_class3);
  31823. }();
  31824. var Rn = Symbol("CLIENT_DB_INTERNAL");
  31825. function Un(e, t) {
  31826. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Rn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  31827. get: function get(e, n, s) {
  31828. if ("_uniClient" === n) return null;
  31829. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  31830. if (n in e || "string" != typeof n) {
  31831. var _t10 = e[n];
  31832. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  31833. }
  31834. return t.get(e, n, s);
  31835. }
  31836. });
  31837. }
  31838. function Ln(e) {
  31839. return {
  31840. on: function on(t, n) {
  31841. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  31842. },
  31843. off: function off(t, n) {
  31844. e[t] = e[t] || [];
  31845. var s = e[t].indexOf(n);
  31846. -1 !== s && e[t].splice(s, 1);
  31847. }
  31848. };
  31849. }
  31850. var Nn = ["db.Geo", "db.command", "command.aggregate"];
  31851. function Dn(e, t) {
  31852. return Nn.indexOf("".concat(e, ".").concat(t)) > -1;
  31853. }
  31854. function Fn(e) {
  31855. switch (g(e)) {
  31856. case "array":
  31857. return e.map(function (e) {
  31858. return Fn(e);
  31859. });
  31860. case "object":
  31861. return e._internalType === Rn || Object.keys(e).forEach(function (t) {
  31862. e[t] = Fn(e[t]);
  31863. }), e;
  31864. case "regexp":
  31865. return {
  31866. $regexp: {
  31867. source: e.source,
  31868. flags: e.flags
  31869. }
  31870. };
  31871. case "date":
  31872. return {
  31873. $date: e.toISOString()
  31874. };
  31875. default:
  31876. return e;
  31877. }
  31878. }
  31879. function qn(e) {
  31880. return e && e.content && e.content.$method;
  31881. }
  31882. var Mn = /*#__PURE__*/function () {
  31883. function Mn(e, t, n) {
  31884. (0, _classCallCheck2.default)(this, Mn);
  31885. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  31886. }
  31887. (0, _createClass2.default)(Mn, [{
  31888. key: "toJSON",
  31889. value: function toJSON() {
  31890. var e = this;
  31891. var t = [e.content];
  31892. for (; e.prevStage;) {
  31893. e = e.prevStage, t.push(e.content);
  31894. }
  31895. return {
  31896. $db: t.reverse().map(function (e) {
  31897. return {
  31898. $method: e.$method,
  31899. $param: Fn(e.$param)
  31900. };
  31901. })
  31902. };
  31903. }
  31904. }, {
  31905. key: "toString",
  31906. value: function toString() {
  31907. return JSON.stringify(this.toJSON());
  31908. }
  31909. }, {
  31910. key: "getAction",
  31911. value: function getAction() {
  31912. var e = this.toJSON().$db.find(function (e) {
  31913. return "action" === e.$method;
  31914. });
  31915. return e && e.$param && e.$param[0];
  31916. }
  31917. }, {
  31918. key: "getCommand",
  31919. value: function getCommand() {
  31920. return {
  31921. $db: this.toJSON().$db.filter(function (e) {
  31922. return "action" !== e.$method;
  31923. })
  31924. };
  31925. }
  31926. }, {
  31927. key: "isAggregate",
  31928. get: function get() {
  31929. var e = this;
  31930. for (; e;) {
  31931. var t = qn(e),
  31932. _n8 = qn(e.prevStage);
  31933. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  31934. e = e.prevStage;
  31935. }
  31936. return !1;
  31937. }
  31938. }, {
  31939. key: "isCommand",
  31940. get: function get() {
  31941. var e = this;
  31942. for (; e;) {
  31943. if ("command" === qn(e)) return !0;
  31944. e = e.prevStage;
  31945. }
  31946. return !1;
  31947. }
  31948. }, {
  31949. key: "isAggregateCommand",
  31950. get: function get() {
  31951. var e = this;
  31952. for (; e;) {
  31953. var t = qn(e),
  31954. _n9 = qn(e.prevStage);
  31955. if ("aggregate" === t && "command" === _n9) return !0;
  31956. e = e.prevStage;
  31957. }
  31958. return !1;
  31959. }
  31960. }, {
  31961. key: "getNextStageFn",
  31962. value: function getNextStageFn(e) {
  31963. var t = this;
  31964. return function () {
  31965. return Kn({
  31966. $method: e,
  31967. $param: Fn(Array.from(arguments))
  31968. }, t, t._database);
  31969. };
  31970. }
  31971. }, {
  31972. key: "count",
  31973. get: function get() {
  31974. return this.isAggregate ? this.getNextStageFn("count") : function () {
  31975. return this._send("count", Array.from(arguments));
  31976. };
  31977. }
  31978. }, {
  31979. key: "remove",
  31980. get: function get() {
  31981. return this.isCommand ? this.getNextStageFn("remove") : function () {
  31982. return this._send("remove", Array.from(arguments));
  31983. };
  31984. }
  31985. }, {
  31986. key: "get",
  31987. value: function get() {
  31988. return this._send("get", Array.from(arguments));
  31989. }
  31990. }, {
  31991. key: "add",
  31992. get: function get() {
  31993. return this.isCommand ? this.getNextStageFn("add") : function () {
  31994. return this._send("add", Array.from(arguments));
  31995. };
  31996. }
  31997. }, {
  31998. key: "update",
  31999. value: function update() {
  32000. return this._send("update", Array.from(arguments));
  32001. }
  32002. }, {
  32003. key: "end",
  32004. value: function end() {
  32005. return this._send("end", Array.from(arguments));
  32006. }
  32007. }, {
  32008. key: "set",
  32009. get: function get() {
  32010. return this.isCommand ? this.getNextStageFn("set") : function () {
  32011. throw new Error("JQL禁止使用set方法");
  32012. };
  32013. }
  32014. }, {
  32015. key: "_send",
  32016. value: function _send(e, t) {
  32017. var n = this.getAction(),
  32018. s = this.getCommand();
  32019. if (s.$db.push({
  32020. $method: e,
  32021. $param: Fn(t)
  32022. }), b) {
  32023. var _e22 = s.$db.find(function (e) {
  32024. return "collection" === e.$method;
  32025. }),
  32026. _t11 = _e22 && _e22.$param;
  32027. _t11 && 1 === _t11.length && "string" == typeof _e22.$param[0] && _e22.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  32028. }
  32029. return this._database._callCloudFunction({
  32030. action: n,
  32031. command: s
  32032. });
  32033. }
  32034. }]);
  32035. return Mn;
  32036. }();
  32037. function Kn(e, t, n) {
  32038. return Un(new Mn(e, t, n), {
  32039. get: function get(e, t) {
  32040. var s = "db";
  32041. return e && e.content && (s = e.content.$method), Dn(s, t) ? Kn({
  32042. $method: t
  32043. }, e, n) : function () {
  32044. return Kn({
  32045. $method: t,
  32046. $param: Fn(Array.from(arguments))
  32047. }, e, n);
  32048. };
  32049. }
  32050. });
  32051. }
  32052. function jn(_ref36) {
  32053. var e = _ref36.path,
  32054. t = _ref36.method;
  32055. return /*#__PURE__*/function () {
  32056. function _class4() {
  32057. (0, _classCallCheck2.default)(this, _class4);
  32058. this.param = Array.from(arguments);
  32059. }
  32060. (0, _createClass2.default)(_class4, [{
  32061. key: "toJSON",
  32062. value: function toJSON() {
  32063. return {
  32064. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  32065. return {
  32066. $method: e
  32067. };
  32068. })), [{
  32069. $method: t,
  32070. $param: this.param
  32071. }])
  32072. };
  32073. }
  32074. }, {
  32075. key: "toString",
  32076. value: function toString() {
  32077. return JSON.stringify(this.toJSON());
  32078. }
  32079. }]);
  32080. return _class4;
  32081. }();
  32082. }
  32083. function Bn(e) {
  32084. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32085. return Un(new e(t), {
  32086. get: function get(e, t) {
  32087. return Dn("db", t) ? Kn({
  32088. $method: t
  32089. }, null, e) : function () {
  32090. return Kn({
  32091. $method: t,
  32092. $param: Fn(Array.from(arguments))
  32093. }, null, e);
  32094. };
  32095. }
  32096. });
  32097. }
  32098. var $n = /*#__PURE__*/function (_ref37) {
  32099. (0, _inherits2.default)($n, _ref37);
  32100. var _super11 = _createSuper($n);
  32101. function $n() {
  32102. (0, _classCallCheck2.default)(this, $n);
  32103. return _super11.apply(this, arguments);
  32104. }
  32105. (0, _createClass2.default)($n, [{
  32106. key: "_parseResult",
  32107. value: function _parseResult(e) {
  32108. return this._isJQL ? e.result : e;
  32109. }
  32110. }, {
  32111. key: "_callCloudFunction",
  32112. value: function _callCloudFunction(_ref38) {
  32113. var _this19 = this;
  32114. var e = _ref38.action,
  32115. t = _ref38.command,
  32116. n = _ref38.multiCommand,
  32117. s = _ref38.queryList;
  32118. function r(e, t) {
  32119. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  32120. var _r5 = s[_n10];
  32121. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  32122. }
  32123. }
  32124. var i = this,
  32125. o = this._isJQL ? "databaseForJQL" : "database";
  32126. function a(e) {
  32127. return i._callback("error", [e]), q(M(o, "fail"), e).then(function () {
  32128. return q(M(o, "complete"), e);
  32129. }).then(function () {
  32130. return r(null, e), Q(B, {
  32131. type: z,
  32132. content: e
  32133. }), Promise.reject(e);
  32134. });
  32135. }
  32136. var c = q(M(o, "invoke")),
  32137. u = this._uniClient;
  32138. return c.then(function () {
  32139. return u.callFunction({
  32140. name: "DCloud-clientDB",
  32141. type: l,
  32142. data: {
  32143. action: e,
  32144. command: t,
  32145. multiCommand: n
  32146. }
  32147. });
  32148. }).then(function (e) {
  32149. var _e$result = e.result,
  32150. t = _e$result.code,
  32151. n = _e$result.message,
  32152. s = _e$result.token,
  32153. c = _e$result.tokenExpired,
  32154. _e$result$systemInfo = _e$result.systemInfo,
  32155. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  32156. if (u) for (var _e23 = 0; _e23 < u.length; _e23++) {
  32157. var _u$_e = u[_e23],
  32158. _t12 = _u$_e.level,
  32159. _n11 = _u$_e.message,
  32160. _s13 = _u$_e.detail,
  32161. _r6 = console["app" === P && "warn" === _t12 ? "error" : _t12] || console.log;
  32162. var _i4 = "[System Info]" + _n11;
  32163. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  32164. }
  32165. if (t) {
  32166. return a(new ne({
  32167. code: t,
  32168. message: n,
  32169. requestId: e.requestId
  32170. }));
  32171. }
  32172. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (ie({
  32173. token: s,
  32174. tokenExpired: c
  32175. }), _this19._callbackAuth("refreshToken", [{
  32176. token: s,
  32177. tokenExpired: c
  32178. }]), _this19._callback("refreshToken", [{
  32179. token: s,
  32180. tokenExpired: c
  32181. }]), Q(W, {
  32182. token: s,
  32183. tokenExpired: c
  32184. }));
  32185. var h = [{
  32186. prop: "affectedDocs",
  32187. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  32188. }, {
  32189. prop: "code",
  32190. tips: "code不再推荐使用,请使用errCode替代"
  32191. }, {
  32192. prop: "message",
  32193. tips: "message不再推荐使用,请使用errMsg替代"
  32194. }];
  32195. var _loop2 = function _loop2(_t13) {
  32196. var _h$_t = h[_t13],
  32197. n = _h$_t.prop,
  32198. s = _h$_t.tips;
  32199. if (n in e.result) {
  32200. var _t14 = e.result[n];
  32201. Object.defineProperty(e.result, n, {
  32202. get: function get() {
  32203. return console.warn(s), _t14;
  32204. }
  32205. });
  32206. }
  32207. };
  32208. for (var _t13 = 0; _t13 < h.length; _t13++) {
  32209. _loop2(_t13);
  32210. }
  32211. return function (e) {
  32212. return q(M(o, "success"), e).then(function () {
  32213. return q(M(o, "complete"), e);
  32214. }).then(function () {
  32215. r(e, null);
  32216. var t = i._parseResult(e);
  32217. return Q(B, {
  32218. type: z,
  32219. content: t
  32220. }), Promise.resolve(t);
  32221. });
  32222. }(e);
  32223. }, function (e) {
  32224. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  32225. return a(new ne({
  32226. code: e.code || "SYSTEM_ERROR",
  32227. message: e.message,
  32228. requestId: e.requestId
  32229. }));
  32230. });
  32231. }
  32232. }]);
  32233. return $n;
  32234. }( /*#__PURE__*/function () {
  32235. function _class5() {
  32236. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32237. _ref39$uniClient = _ref39.uniClient,
  32238. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  32239. _ref39$isJQL = _ref39.isJQL,
  32240. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  32241. (0, _classCallCheck2.default)(this, _class5);
  32242. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = U("_globalUniCloudDatabaseCallback")), t || (this.auth = Ln(this._authCallBacks)), this._isJQL = t, Object.assign(this, Ln(this._dbCallBacks)), this.env = Un({}, {
  32243. get: function get(e, t) {
  32244. return {
  32245. $env: t
  32246. };
  32247. }
  32248. }), this.Geo = Un({}, {
  32249. get: function get(e, t) {
  32250. return jn({
  32251. path: ["Geo"],
  32252. method: t
  32253. });
  32254. }
  32255. }), this.serverDate = jn({
  32256. path: [],
  32257. method: "serverDate"
  32258. }), this.RegExp = jn({
  32259. path: [],
  32260. method: "RegExp"
  32261. });
  32262. }
  32263. (0, _createClass2.default)(_class5, [{
  32264. key: "getCloudEnv",
  32265. value: function getCloudEnv(e) {
  32266. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  32267. return {
  32268. $env: e.replace("$cloudEnv_", "")
  32269. };
  32270. }
  32271. }, {
  32272. key: "_callback",
  32273. value: function _callback(e, t) {
  32274. var n = this._dbCallBacks;
  32275. n[e] && n[e].forEach(function (e) {
  32276. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  32277. });
  32278. }
  32279. }, {
  32280. key: "_callbackAuth",
  32281. value: function _callbackAuth(e, t) {
  32282. var n = this._authCallBacks;
  32283. n[e] && n[e].forEach(function (e) {
  32284. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  32285. });
  32286. }
  32287. }, {
  32288. key: "multiSend",
  32289. value: function multiSend() {
  32290. var e = Array.from(arguments),
  32291. t = e.map(function (e) {
  32292. var t = e.getAction(),
  32293. n = e.getCommand();
  32294. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  32295. return {
  32296. action: t,
  32297. command: n
  32298. };
  32299. });
  32300. return this._callCloudFunction({
  32301. multiCommand: t,
  32302. queryList: e
  32303. });
  32304. }
  32305. }]);
  32306. return _class5;
  32307. }());
  32308. var Wn = "token无效,跳转登录页面",
  32309. zn = "token过期,跳转登录页面",
  32310. Jn = {
  32311. TOKEN_INVALID_TOKEN_EXPIRED: zn,
  32312. TOKEN_INVALID_INVALID_CLIENTID: Wn,
  32313. TOKEN_INVALID: Wn,
  32314. TOKEN_INVALID_WRONG_TOKEN: Wn,
  32315. TOKEN_INVALID_ANONYMOUS_USER: Wn
  32316. },
  32317. Hn = {
  32318. "uni-id-token-expired": zn,
  32319. "uni-id-check-token-failed": Wn,
  32320. "uni-id-token-not-exist": Wn,
  32321. "uni-id-check-device-feature-failed": Wn
  32322. };
  32323. function Gn(e, t) {
  32324. var n = "";
  32325. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  32326. }
  32327. function Vn() {
  32328. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  32329. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  32330. var n = [],
  32331. s = [];
  32332. return e.forEach(function (e) {
  32333. !0 === e.needLogin ? n.push(Gn(t, e.path)) : !1 === e.needLogin && s.push(Gn(t, e.path));
  32334. }), {
  32335. needLoginPage: n,
  32336. notNeedLoginPage: s
  32337. };
  32338. }
  32339. function Yn(e) {
  32340. return e.split("?")[0].replace(/^\//, "");
  32341. }
  32342. function Qn() {
  32343. return function (e) {
  32344. var t = e && e.$page && e.$page.fullPath || "";
  32345. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  32346. }(function () {
  32347. var e = getCurrentPages();
  32348. return e[e.length - 1];
  32349. }());
  32350. }
  32351. function Xn() {
  32352. return Yn(Qn());
  32353. }
  32354. function Zn() {
  32355. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  32356. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32357. if (!e) return !1;
  32358. if (!(t && t.list && t.list.length)) return !1;
  32359. var n = t.list,
  32360. s = Yn(e);
  32361. return n.some(function (e) {
  32362. return e.pagePath === s;
  32363. });
  32364. }
  32365. var es = !!_pages.default.uniIdRouter;
  32366. var _ref40 = function () {
  32367. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  32368. _ref21$pages = _ref21.pages,
  32369. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  32370. _ref21$subPackages = _ref21.subPackages,
  32371. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  32372. _ref21$uniIdRouter = _ref21.uniIdRouter,
  32373. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  32374. _ref21$tabBar = _ref21.tabBar,
  32375. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  32376. var i = s.loginPage,
  32377. _s$needLogin = s.needLogin,
  32378. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  32379. _s$resToLogin = s.resToLogin,
  32380. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  32381. _Vn = Vn(e),
  32382. c = _Vn.needLoginPage,
  32383. u = _Vn.notNeedLoginPage,
  32384. _ref23 = function () {
  32385. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  32386. var t = [],
  32387. n = [];
  32388. return e.forEach(function (e) {
  32389. var s = e.root,
  32390. _e$pages = e.pages,
  32391. r = _e$pages === void 0 ? [] : _e$pages,
  32392. _Vn2 = Vn(r, s),
  32393. i = _Vn2.needLoginPage,
  32394. o = _Vn2.notNeedLoginPage;
  32395. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  32396. }), {
  32397. needLoginPage: t,
  32398. notNeedLoginPage: n
  32399. };
  32400. }(n),
  32401. h = _ref23.needLoginPage,
  32402. l = _ref23.notNeedLoginPage;
  32403. return {
  32404. loginPage: i,
  32405. routerNeedLogin: o,
  32406. resToLogin: a,
  32407. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  32408. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  32409. loginPageInTabBar: Zn(i, r)
  32410. };
  32411. }(),
  32412. ts = _ref40.loginPage,
  32413. ns = _ref40.routerNeedLogin,
  32414. ss = _ref40.resToLogin,
  32415. rs = _ref40.needLoginPage,
  32416. is = _ref40.notNeedLoginPage,
  32417. os = _ref40.loginPageInTabBar;
  32418. if (rs.indexOf(ts) > -1) throw new Error("Login page [".concat(ts, "] should not be \"needLogin\", please check your pages.json"));
  32419. function as(e) {
  32420. var t = Xn();
  32421. if ("/" === e.charAt(0)) return e;
  32422. var _e$split = e.split("?"),
  32423. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  32424. n = _e$split2[0],
  32425. s = _e$split2[1],
  32426. r = n.replace(/^\//, "").split("/"),
  32427. i = t.split("/");
  32428. i.pop();
  32429. for (var _e24 = 0; _e24 < r.length; _e24++) {
  32430. var _t15 = r[_e24];
  32431. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  32432. }
  32433. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  32434. }
  32435. function cs(e) {
  32436. var t = Yn(as(e));
  32437. return !(is.indexOf(t) > -1) && (rs.indexOf(t) > -1 || ns.some(function (t) {
  32438. return function (e, t) {
  32439. return new RegExp(t).test(e);
  32440. }(e, t);
  32441. }));
  32442. }
  32443. function us(_ref41) {
  32444. var e = _ref41.redirect;
  32445. var t = Yn(e),
  32446. n = Yn(ts);
  32447. return Xn() !== n && t !== n;
  32448. }
  32449. function hs() {
  32450. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32451. e = _ref42.api,
  32452. t = _ref42.redirect;
  32453. if (!t || !us({
  32454. redirect: t
  32455. })) return;
  32456. var n = function (e, t) {
  32457. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  32458. }(ts, t);
  32459. os ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  32460. var s = {
  32461. navigateTo: uni.navigateTo,
  32462. redirectTo: uni.redirectTo,
  32463. switchTab: uni.switchTab,
  32464. reLaunch: uni.reLaunch
  32465. };
  32466. setTimeout(function () {
  32467. s[e]({
  32468. url: n
  32469. });
  32470. });
  32471. }
  32472. function ls() {
  32473. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32474. e = _ref43.url;
  32475. var t = {
  32476. abortLoginPageJump: !1,
  32477. autoToLoginPage: !1
  32478. },
  32479. n = function () {
  32480. var _re3 = re(),
  32481. e = _re3.token,
  32482. t = _re3.tokenExpired;
  32483. var n;
  32484. if (e) {
  32485. if (t < Date.now()) {
  32486. var _e25 = "uni-id-token-expired";
  32487. n = {
  32488. errCode: _e25,
  32489. errMsg: Hn[_e25]
  32490. };
  32491. }
  32492. } else {
  32493. var _e26 = "uni-id-check-token-failed";
  32494. n = {
  32495. errCode: _e26,
  32496. errMsg: Hn[_e26]
  32497. };
  32498. }
  32499. return n;
  32500. }();
  32501. if (cs(e) && n) {
  32502. n.uniIdRedirectUrl = e;
  32503. if (G($).length > 0) return setTimeout(function () {
  32504. Q($, n);
  32505. }, 0), t.abortLoginPageJump = !0, t;
  32506. t.autoToLoginPage = !0;
  32507. }
  32508. return t;
  32509. }
  32510. function ds() {
  32511. !function () {
  32512. var e = Qn(),
  32513. _ls = ls({
  32514. url: e
  32515. }),
  32516. t = _ls.abortLoginPageJump,
  32517. n = _ls.autoToLoginPage;
  32518. t || n && hs({
  32519. api: "redirectTo",
  32520. redirect: e
  32521. });
  32522. }();
  32523. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  32524. var _loop3 = function _loop3(_t16) {
  32525. var n = e[_t16];
  32526. uni.addInterceptor(n, {
  32527. invoke: function invoke(e) {
  32528. var _ls2 = ls({
  32529. url: e.url
  32530. }),
  32531. t = _ls2.abortLoginPageJump,
  32532. s = _ls2.autoToLoginPage;
  32533. return t ? e : s ? (hs({
  32534. api: n,
  32535. redirect: as(e.url)
  32536. }), !1) : e;
  32537. }
  32538. });
  32539. };
  32540. for (var _t16 = 0; _t16 < e.length; _t16++) {
  32541. _loop3(_t16);
  32542. }
  32543. }
  32544. function ps() {
  32545. this.onResponse(function (e) {
  32546. var t = e.type,
  32547. n = e.content;
  32548. var s = !1;
  32549. switch (t) {
  32550. case "cloudobject":
  32551. s = function (e) {
  32552. if ("object" != (0, _typeof2.default)(e)) return !1;
  32553. var _ref44 = e || {},
  32554. t = _ref44.errCode;
  32555. return t in Hn;
  32556. }(n);
  32557. break;
  32558. case "clientdb":
  32559. s = function (e) {
  32560. if ("object" != (0, _typeof2.default)(e)) return !1;
  32561. var _ref45 = e || {},
  32562. t = _ref45.errCode;
  32563. return t in Jn;
  32564. }(n);
  32565. }
  32566. s && function () {
  32567. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32568. var t = G($);
  32569. ee().then(function () {
  32570. var n = Qn();
  32571. if (n && us({
  32572. redirect: n
  32573. })) return t.length > 0 ? Q($, Object.assign({
  32574. uniIdRedirectUrl: n
  32575. }, e)) : void (ts && hs({
  32576. api: "navigateTo",
  32577. redirect: n
  32578. }));
  32579. });
  32580. }(n);
  32581. });
  32582. }
  32583. function fs(e) {
  32584. !function (e) {
  32585. e.onResponse = function (e) {
  32586. V(B, e);
  32587. }, e.offResponse = function (e) {
  32588. Y(B, e);
  32589. };
  32590. }(e), function (e) {
  32591. e.onNeedLogin = function (e) {
  32592. V($, e);
  32593. }, e.offNeedLogin = function (e) {
  32594. Y($, e);
  32595. }, es && (U("_globalUniCloudStatus").needLoginInit || (U("_globalUniCloudStatus").needLoginInit = !0, ee().then(function () {
  32596. ds.call(e);
  32597. }), ss && ps.call(e)));
  32598. }(e), function (e) {
  32599. e.onRefreshToken = function (e) {
  32600. V(W, e);
  32601. }, e.offRefreshToken = function (e) {
  32602. Y(W, e);
  32603. };
  32604. }(e);
  32605. }
  32606. var gs;
  32607. var ms = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  32608. ys = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  32609. function _s() {
  32610. var e = re().token || "",
  32611. t = e.split(".");
  32612. if (!e || 3 !== t.length) return {
  32613. uid: null,
  32614. role: [],
  32615. permission: [],
  32616. tokenExpired: 0
  32617. };
  32618. var n;
  32619. try {
  32620. n = JSON.parse((s = t[1], decodeURIComponent(gs(s).split("").map(function (e) {
  32621. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  32622. }).join(""))));
  32623. } catch (e) {
  32624. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  32625. }
  32626. var s;
  32627. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  32628. }
  32629. gs = "function" != typeof atob ? function (e) {
  32630. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !ys.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  32631. var t;
  32632. e += "==".slice(2 - (3 & e.length));
  32633. for (var n, s, r = "", i = 0; i < e.length;) {
  32634. t = ms.indexOf(e.charAt(i++)) << 18 | ms.indexOf(e.charAt(i++)) << 12 | (n = ms.indexOf(e.charAt(i++))) << 6 | (s = ms.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);
  32635. }
  32636. return r;
  32637. } : atob;
  32638. var ws = s(function (e, t) {
  32639. Object.defineProperty(t, "__esModule", {
  32640. value: !0
  32641. });
  32642. var n = "chooseAndUploadFile:ok",
  32643. s = "chooseAndUploadFile:fail";
  32644. function r(e, t) {
  32645. return e.tempFiles.forEach(function (e, n) {
  32646. 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("."));
  32647. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  32648. return e.path;
  32649. })), e;
  32650. }
  32651. function i(e, t, _ref46) {
  32652. var s = _ref46.onChooseFile,
  32653. r = _ref46.onUploadProgress;
  32654. return t.then(function (e) {
  32655. if (s) {
  32656. var _t17 = s(e);
  32657. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  32658. return void 0 === t ? e : t;
  32659. });
  32660. }
  32661. return e;
  32662. }).then(function (t) {
  32663. return !1 === t ? {
  32664. errMsg: n,
  32665. tempFilePaths: [],
  32666. tempFiles: []
  32667. } : function (e, t) {
  32668. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  32669. var r = arguments.length > 3 ? arguments[3] : undefined;
  32670. (t = Object.assign({}, t)).errMsg = n;
  32671. var i = t.tempFiles,
  32672. o = i.length;
  32673. var a = 0;
  32674. return new Promise(function (n) {
  32675. for (; a < s;) {
  32676. c();
  32677. }
  32678. function c() {
  32679. var s = a++;
  32680. if (s >= o) return void (!i.find(function (e) {
  32681. return !e.url && !e.errMsg;
  32682. }) && n(t));
  32683. var u = i[s];
  32684. e.uploadFile({
  32685. filePath: u.path,
  32686. cloudPath: u.cloudPath,
  32687. fileType: u.fileType,
  32688. onUploadProgress: function onUploadProgress(e) {
  32689. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  32690. }
  32691. }).then(function (e) {
  32692. u.url = e.fileID, s < o && c();
  32693. }).catch(function (e) {
  32694. u.errMsg = e.errMsg || e.message, s < o && c();
  32695. });
  32696. }
  32697. });
  32698. }(e, t, 5, r);
  32699. });
  32700. }
  32701. t.initChooseAndUploadFile = function (e) {
  32702. return function () {
  32703. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  32704. type: "all"
  32705. };
  32706. return "image" === t.type ? i(e, function (e) {
  32707. var t = e.count,
  32708. n = e.sizeType,
  32709. _e$sourceType = e.sourceType,
  32710. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  32711. o = e.extension;
  32712. return new Promise(function (e, a) {
  32713. uni.chooseImage({
  32714. count: t,
  32715. sizeType: n,
  32716. sourceType: i,
  32717. extension: o,
  32718. success: function success(t) {
  32719. e(r(t, "image"));
  32720. },
  32721. fail: function fail(e) {
  32722. a({
  32723. errMsg: e.errMsg.replace("chooseImage:fail", s)
  32724. });
  32725. }
  32726. });
  32727. });
  32728. }(t), t) : "video" === t.type ? i(e, function (e) {
  32729. var t = e.camera,
  32730. n = e.compressed,
  32731. i = e.maxDuration,
  32732. _e$sourceType2 = e.sourceType,
  32733. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  32734. a = e.extension;
  32735. return new Promise(function (e, c) {
  32736. uni.chooseVideo({
  32737. camera: t,
  32738. compressed: n,
  32739. maxDuration: i,
  32740. sourceType: o,
  32741. extension: a,
  32742. success: function success(t) {
  32743. var n = t.tempFilePath,
  32744. s = t.duration,
  32745. i = t.size,
  32746. o = t.height,
  32747. a = t.width;
  32748. e(r({
  32749. errMsg: "chooseVideo:ok",
  32750. tempFilePaths: [n],
  32751. tempFiles: [{
  32752. name: t.tempFile && t.tempFile.name || "",
  32753. path: n,
  32754. size: i,
  32755. type: t.tempFile && t.tempFile.type || "",
  32756. width: a,
  32757. height: o,
  32758. duration: s,
  32759. fileType: "video",
  32760. cloudPath: ""
  32761. }]
  32762. }, "video"));
  32763. },
  32764. fail: function fail(e) {
  32765. c({
  32766. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  32767. });
  32768. }
  32769. });
  32770. });
  32771. }(t), t) : i(e, function (e) {
  32772. var t = e.count,
  32773. n = e.extension;
  32774. return new Promise(function (e, i) {
  32775. var o = uni.chooseFile;
  32776. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  32777. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  32778. });
  32779. o({
  32780. type: "all",
  32781. count: t,
  32782. extension: n,
  32783. success: function success(t) {
  32784. e(r(t));
  32785. },
  32786. fail: function fail(e) {
  32787. i({
  32788. errMsg: e.errMsg.replace("chooseFile:fail", s)
  32789. });
  32790. }
  32791. });
  32792. });
  32793. }(t), t);
  32794. };
  32795. };
  32796. }),
  32797. vs = n(ws);
  32798. var Is = "manual";
  32799. function Ss(e) {
  32800. return {
  32801. props: {
  32802. localdata: {
  32803. type: Array,
  32804. default: function _default() {
  32805. return [];
  32806. }
  32807. },
  32808. options: {
  32809. type: [Object, Array],
  32810. default: function _default() {
  32811. return {};
  32812. }
  32813. },
  32814. spaceInfo: {
  32815. type: Object,
  32816. default: function _default() {
  32817. return {};
  32818. }
  32819. },
  32820. collection: {
  32821. type: [String, Array],
  32822. default: ""
  32823. },
  32824. action: {
  32825. type: String,
  32826. default: ""
  32827. },
  32828. field: {
  32829. type: String,
  32830. default: ""
  32831. },
  32832. orderby: {
  32833. type: String,
  32834. default: ""
  32835. },
  32836. where: {
  32837. type: [String, Object],
  32838. default: ""
  32839. },
  32840. pageData: {
  32841. type: String,
  32842. default: "add"
  32843. },
  32844. pageCurrent: {
  32845. type: Number,
  32846. default: 1
  32847. },
  32848. pageSize: {
  32849. type: Number,
  32850. default: 20
  32851. },
  32852. getcount: {
  32853. type: [Boolean, String],
  32854. default: !1
  32855. },
  32856. gettree: {
  32857. type: [Boolean, String],
  32858. default: !1
  32859. },
  32860. gettreepath: {
  32861. type: [Boolean, String],
  32862. default: !1
  32863. },
  32864. startwith: {
  32865. type: String,
  32866. default: ""
  32867. },
  32868. limitlevel: {
  32869. type: Number,
  32870. default: 10
  32871. },
  32872. groupby: {
  32873. type: String,
  32874. default: ""
  32875. },
  32876. groupField: {
  32877. type: String,
  32878. default: ""
  32879. },
  32880. distinct: {
  32881. type: [Boolean, String],
  32882. default: !1
  32883. },
  32884. foreignKey: {
  32885. type: String,
  32886. default: ""
  32887. },
  32888. loadtime: {
  32889. type: String,
  32890. default: "auto"
  32891. },
  32892. manual: {
  32893. type: Boolean,
  32894. default: !1
  32895. }
  32896. },
  32897. data: function data() {
  32898. return {
  32899. mixinDatacomLoading: !1,
  32900. mixinDatacomHasMore: !1,
  32901. mixinDatacomResData: [],
  32902. mixinDatacomErrorMessage: "",
  32903. mixinDatacomPage: {}
  32904. };
  32905. },
  32906. created: function created() {
  32907. var _this20 = this;
  32908. this.mixinDatacomPage = {
  32909. current: this.pageCurrent,
  32910. size: this.pageSize,
  32911. count: 0
  32912. }, this.$watch(function () {
  32913. var e = [];
  32914. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  32915. e.push(_this20[t]);
  32916. }), e;
  32917. }, function (e, t) {
  32918. if (_this20.loadtime === Is) return;
  32919. var n = !1;
  32920. var s = [];
  32921. for (var _r7 = 2; _r7 < e.length; _r7++) {
  32922. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  32923. }
  32924. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  32925. });
  32926. },
  32927. methods: {
  32928. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  32929. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  32930. var _this21 = this;
  32931. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32932. _ref47$getone = _ref47.getone,
  32933. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  32934. t = _ref47.success,
  32935. n = _ref47.fail;
  32936. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  32937. _this21.mixinDatacomLoading = !1;
  32938. var _n$result = n.result,
  32939. s = _n$result.data,
  32940. r = _n$result.count;
  32941. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  32942. var i = e ? s.length ? s[0] : void 0 : s;
  32943. _this21.mixinDatacomResData = i, t && t(i);
  32944. }).catch(function (e) {
  32945. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  32946. }));
  32947. },
  32948. mixinDatacomGet: function mixinDatacomGet() {
  32949. var _n12;
  32950. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32951. var n = e.database(this.spaceInfo);
  32952. var s = t.action || this.action;
  32953. s && (n = n.action(s));
  32954. var r = t.collection || this.collection;
  32955. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  32956. var i = t.where || this.where;
  32957. i && Object.keys(i).length && (n = n.where(i));
  32958. var o = t.field || this.field;
  32959. o && (n = n.field(o));
  32960. var a = t.foreignKey || this.foreignKey;
  32961. a && (n = n.foreignKey(a));
  32962. var c = t.groupby || this.groupby;
  32963. c && (n = n.groupBy(c));
  32964. var u = t.groupField || this.groupField;
  32965. u && (n = n.groupField(u));
  32966. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  32967. var h = t.orderby || this.orderby;
  32968. h && (n = n.orderBy(h));
  32969. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  32970. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  32971. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  32972. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  32973. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  32974. m = {
  32975. getCount: p
  32976. },
  32977. y = {
  32978. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  32979. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  32980. };
  32981. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  32982. }
  32983. }
  32984. };
  32985. }
  32986. function bs(e) {
  32987. return function (t) {
  32988. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32989. n = function (e) {
  32990. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32991. 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;
  32992. }({
  32993. customUI: !1,
  32994. loadingOptions: {
  32995. title: "加载中...",
  32996. mask: !0
  32997. },
  32998. errorOptions: {
  32999. type: "modal",
  33000. retry: !1
  33001. }
  33002. }, n);
  33003. var _n13 = n,
  33004. s = _n13.customUI,
  33005. r = _n13.loadingOptions,
  33006. i = _n13.errorOptions,
  33007. o = _n13.parseSystemError,
  33008. a = !s;
  33009. return new Proxy({}, {
  33010. get: function get(s, c) {
  33011. return function () {
  33012. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33013. e = _ref48.fn,
  33014. t = _ref48.interceptorName,
  33015. n = _ref48.getCallbackArgs;
  33016. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  33017. var _len2,
  33018. s,
  33019. _key2,
  33020. r,
  33021. i,
  33022. o,
  33023. _args = arguments;
  33024. return _regenerator.default.wrap(function _callee50$(_context50) {
  33025. while (1) {
  33026. switch (_context50.prev = _context50.next) {
  33027. case 0:
  33028. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  33029. s[_key2] = _args[_key2];
  33030. }
  33031. r = n ? n({
  33032. params: s
  33033. }) : {};
  33034. _context50.prev = 2;
  33035. _context50.next = 5;
  33036. return q(M(t, "invoke"), _objectSpread({}, r));
  33037. case 5:
  33038. _context50.next = 7;
  33039. return e.apply(void 0, s);
  33040. case 7:
  33041. i = _context50.sent;
  33042. _context50.next = 10;
  33043. return q(M(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  33044. result: i
  33045. }));
  33046. case 10:
  33047. return _context50.abrupt("return", i);
  33048. case 13:
  33049. _context50.prev = 13;
  33050. _context50.t0 = _context50["catch"](2);
  33051. o = _context50.t0;
  33052. _context50.next = 18;
  33053. return q(M(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  33054. error: o
  33055. }));
  33056. case 18:
  33057. throw o;
  33058. case 19:
  33059. _context50.prev = 19;
  33060. _context50.next = 22;
  33061. return q(M(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  33062. error: o
  33063. }) : _objectSpread(_objectSpread({}, r), {}, {
  33064. result: i
  33065. }));
  33066. case 22:
  33067. return _context50.finish(19);
  33068. case 23:
  33069. case "end":
  33070. return _context50.stop();
  33071. }
  33072. }
  33073. }, _callee50, null, [[2, 13, 19, 23]]);
  33074. }));
  33075. }({
  33076. fn: function () {
  33077. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  33078. var l,
  33079. _len3,
  33080. u,
  33081. _key3,
  33082. d,
  33083. p,
  33084. _ref50,
  33085. f,
  33086. g,
  33087. m,
  33088. y,
  33089. _e27,
  33090. _yield,
  33091. _t18,
  33092. _n14,
  33093. _args4 = arguments;
  33094. return _regenerator.default.wrap(function _callee52$(_context52) {
  33095. while (1) {
  33096. switch (_context52.prev = _context52.next) {
  33097. case 0:
  33098. a && uni.showLoading({
  33099. title: r.title,
  33100. mask: r.mask
  33101. });
  33102. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  33103. u[_key3] = _args4[_key3];
  33104. }
  33105. d = {
  33106. name: t,
  33107. type: h,
  33108. data: {
  33109. method: c,
  33110. params: u
  33111. }
  33112. };
  33113. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  33114. var n = t.data.method,
  33115. s = e.secretMethods || {},
  33116. r = s[n] || s["*"];
  33117. r && (t.secretType = r);
  33118. }(n, d);
  33119. p = !1;
  33120. _context52.prev = 5;
  33121. _context52.next = 8;
  33122. return e.callFunction(d);
  33123. case 8:
  33124. l = _context52.sent;
  33125. _context52.next = 14;
  33126. break;
  33127. case 11:
  33128. _context52.prev = 11;
  33129. _context52.t0 = _context52["catch"](5);
  33130. p = !0, l = {
  33131. result: new ne(_context52.t0)
  33132. };
  33133. case 14:
  33134. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  33135. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (ie(y), Q(W, _objectSpread({}, y))), g)) {
  33136. _context52.next = 39;
  33137. break;
  33138. }
  33139. _e27 = m;
  33140. if (!(p && o)) {
  33141. _context52.next = 24;
  33142. break;
  33143. }
  33144. _context52.next = 20;
  33145. return o({
  33146. objectName: t,
  33147. methodName: c,
  33148. params: u,
  33149. errSubject: f,
  33150. errCode: g,
  33151. errMsg: m
  33152. });
  33153. case 20:
  33154. _context52.t1 = _context52.sent.errMsg;
  33155. if (_context52.t1) {
  33156. _context52.next = 23;
  33157. break;
  33158. }
  33159. _context52.t1 = m;
  33160. case 23:
  33161. _e27 = _context52.t1;
  33162. case 24:
  33163. if (!a) {
  33164. _context52.next = 37;
  33165. break;
  33166. }
  33167. if (!("toast" === i.type)) {
  33168. _context52.next = 29;
  33169. break;
  33170. }
  33171. uni.showToast({
  33172. title: _e27,
  33173. icon: "none"
  33174. });
  33175. _context52.next = 37;
  33176. break;
  33177. case 29:
  33178. if (!("modal" !== i.type)) {
  33179. _context52.next = 31;
  33180. break;
  33181. }
  33182. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  33183. case 31:
  33184. _context52.next = 33;
  33185. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  33186. var _ref52,
  33187. e,
  33188. t,
  33189. n,
  33190. s,
  33191. r,
  33192. _args2 = arguments;
  33193. return _regenerator.default.wrap(function _callee51$(_context51) {
  33194. while (1) {
  33195. switch (_context51.prev = _context51.next) {
  33196. case 0:
  33197. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  33198. return _context51.abrupt("return", new Promise(function (i, o) {
  33199. uni.showModal({
  33200. title: e,
  33201. content: t,
  33202. showCancel: n,
  33203. cancelText: s,
  33204. confirmText: r,
  33205. success: function success(e) {
  33206. i(e);
  33207. },
  33208. fail: function fail() {
  33209. i({
  33210. confirm: !1,
  33211. cancel: !0
  33212. });
  33213. }
  33214. });
  33215. }));
  33216. case 2:
  33217. case "end":
  33218. return _context51.stop();
  33219. }
  33220. }
  33221. }, _callee51);
  33222. }))({
  33223. title: "提示",
  33224. content: _e27,
  33225. showCancel: i.retry,
  33226. cancelText: "取消",
  33227. confirmText: i.retry ? "重试" : "确定"
  33228. });
  33229. case 33:
  33230. _yield = _context52.sent;
  33231. _t18 = _yield.confirm;
  33232. if (!(i.retry && _t18)) {
  33233. _context52.next = 37;
  33234. break;
  33235. }
  33236. return _context52.abrupt("return", s.apply(void 0, u));
  33237. case 37:
  33238. _n14 = new ne({
  33239. subject: f,
  33240. code: g,
  33241. message: m,
  33242. requestId: l.requestId
  33243. });
  33244. throw _n14.detail = l.result, Q(B, {
  33245. type: H,
  33246. content: _n14
  33247. }), _n14;
  33248. case 39:
  33249. return _context52.abrupt("return", (Q(B, {
  33250. type: H,
  33251. content: l.result
  33252. }), l.result));
  33253. case 40:
  33254. case "end":
  33255. return _context52.stop();
  33256. }
  33257. }
  33258. }, _callee52, null, [[5, 11]]);
  33259. }));
  33260. function s() {
  33261. return _s14.apply(this, arguments);
  33262. }
  33263. return s;
  33264. }(),
  33265. interceptorName: "callObject",
  33266. getCallbackArgs: function getCallbackArgs() {
  33267. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33268. e = _ref53.params;
  33269. return {
  33270. objectName: t,
  33271. methodName: c,
  33272. params: e
  33273. };
  33274. }
  33275. });
  33276. }
  33277. });
  33278. };
  33279. }
  33280. function ks(e) {
  33281. return U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  33282. }
  33283. function Cs() {
  33284. return _Cs.apply(this, arguments);
  33285. }
  33286. function _Cs() {
  33287. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  33288. var _ref65,
  33289. e,
  33290. _ref65$callLoginByWei,
  33291. t,
  33292. n,
  33293. s,
  33294. r,
  33295. _args7 = arguments;
  33296. return _regenerator.default.wrap(function _callee55$(_context55) {
  33297. while (1) {
  33298. switch (_context55.prev = _context55.next) {
  33299. case 0:
  33300. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  33301. n = ks(this);
  33302. if (!("mp-weixin" !== P)) {
  33303. _context55.next = 4;
  33304. break;
  33305. }
  33306. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  33307. case 4:
  33308. if (!(e && t)) {
  33309. _context55.next = 6;
  33310. break;
  33311. }
  33312. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  33313. case 6:
  33314. if (!e) {
  33315. _context55.next = 8;
  33316. break;
  33317. }
  33318. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  33319. case 8:
  33320. _context55.next = 10;
  33321. return new Promise(function (e, t) {
  33322. uni.login({
  33323. success: function success(t) {
  33324. e(t.code);
  33325. },
  33326. fail: function fail(e) {
  33327. t(new Error(e.errMsg));
  33328. }
  33329. });
  33330. });
  33331. case 10:
  33332. s = _context55.sent;
  33333. r = this.importObject("uni-id-co", {
  33334. customUI: !0
  33335. });
  33336. _context55.next = 14;
  33337. return r.secureNetworkHandshakeByWeixin({
  33338. code: s,
  33339. callLoginByWeixin: t
  33340. });
  33341. case 14:
  33342. n.mpWeixinCode = s;
  33343. return _context55.abrupt("return", {
  33344. code: s
  33345. });
  33346. case 16:
  33347. case "end":
  33348. return _context55.stop();
  33349. }
  33350. }
  33351. }, _callee55, this);
  33352. }));
  33353. return _Cs.apply(this, arguments);
  33354. }
  33355. function Ts(_x37) {
  33356. return _Ts.apply(this, arguments);
  33357. }
  33358. function _Ts() {
  33359. _Ts = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  33360. var t;
  33361. return _regenerator.default.wrap(function _callee56$(_context56) {
  33362. while (1) {
  33363. switch (_context56.prev = _context56.next) {
  33364. case 0:
  33365. t = ks(this);
  33366. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  33367. case 2:
  33368. case "end":
  33369. return _context56.stop();
  33370. }
  33371. }
  33372. }, _callee56, this);
  33373. }));
  33374. return _Ts.apply(this, arguments);
  33375. }
  33376. function Ps(e) {
  33377. return function () {
  33378. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33379. t = _ref54.openid,
  33380. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  33381. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  33382. return Ts.call(e, {
  33383. openid: t,
  33384. callLoginByWeixin: n
  33385. });
  33386. };
  33387. }
  33388. function As(e) {
  33389. var t = {
  33390. getSystemInfo: uni.getSystemInfo,
  33391. getPushClientId: uni.getPushClientId
  33392. };
  33393. return function (n) {
  33394. return new Promise(function (s, r) {
  33395. t[e](_objectSpread(_objectSpread({}, n), {}, {
  33396. success: function success(e) {
  33397. s(e);
  33398. },
  33399. fail: function fail(e) {
  33400. r(e);
  33401. }
  33402. }));
  33403. });
  33404. };
  33405. }
  33406. var Es = /*#__PURE__*/function (_ref55) {
  33407. (0, _inherits2.default)(Es, _ref55);
  33408. var _super12 = _createSuper(Es);
  33409. function Es() {
  33410. var _this22;
  33411. (0, _classCallCheck2.default)(this, Es);
  33412. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  33413. return _this22;
  33414. }
  33415. (0, _createClass2.default)(Es, [{
  33416. key: "init",
  33417. value: function init() {
  33418. var _this23 = this;
  33419. return Promise.all([As("getSystemInfo")(), As("getPushClientId")()]).then(function () {
  33420. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  33421. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  33422. _ref57$ = _ref57[0];
  33423. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  33424. var e = _ref57$.appId,
  33425. _ref57$2 = _ref57[1];
  33426. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  33427. var t = _ref57$2.cid;
  33428. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  33429. if (!t) throw new Error("Invalid push client id");
  33430. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  33431. }, function (e) {
  33432. throw _this23.emit("error", e), _this23.close(), e;
  33433. });
  33434. }
  33435. }, {
  33436. key: "open",
  33437. value: function () {
  33438. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  33439. return _regenerator.default.wrap(function _callee53$(_context53) {
  33440. while (1) {
  33441. switch (_context53.prev = _context53.next) {
  33442. case 0:
  33443. return _context53.abrupt("return", this.init());
  33444. case 1:
  33445. case "end":
  33446. return _context53.stop();
  33447. }
  33448. }
  33449. }, _callee53, this);
  33450. }));
  33451. function open() {
  33452. return _open.apply(this, arguments);
  33453. }
  33454. return open;
  33455. }()
  33456. }, {
  33457. key: "_isUniCloudSSE",
  33458. value: function _isUniCloudSSE(e) {
  33459. if ("receive" !== e.type) return !1;
  33460. var t = e && e.data && e.data.payload;
  33461. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  33462. }
  33463. }, {
  33464. key: "_receivePushMessage",
  33465. value: function _receivePushMessage(e) {
  33466. if (!this._isUniCloudSSE(e)) return;
  33467. var t = e && e.data && e.data.payload,
  33468. n = t.action,
  33469. s = t.messageId,
  33470. r = t.message;
  33471. this._payloadQueue.push({
  33472. action: n,
  33473. messageId: s,
  33474. message: r
  33475. }), this._consumMessage();
  33476. }
  33477. }, {
  33478. key: "_consumMessage",
  33479. value: function _consumMessage() {
  33480. var _this24 = this;
  33481. for (;;) {
  33482. var _e28 = this._payloadQueue.find(function (e) {
  33483. return e.messageId === _this24._currentMessageId + 1;
  33484. });
  33485. if (!_e28) break;
  33486. this._currentMessageId++, this._parseMessagePayload(_e28);
  33487. }
  33488. }
  33489. }, {
  33490. key: "_parseMessagePayload",
  33491. value: function _parseMessagePayload(e) {
  33492. var t = e.action,
  33493. n = e.messageId,
  33494. s = e.message;
  33495. "end" === t ? this._end({
  33496. messageId: n,
  33497. message: s
  33498. }) : "message" === t && this._appendMessage({
  33499. messageId: n,
  33500. message: s
  33501. });
  33502. }
  33503. }, {
  33504. key: "_appendMessage",
  33505. value: function _appendMessage() {
  33506. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33507. e = _ref58.messageId,
  33508. t = _ref58.message;
  33509. this.emit("message", t);
  33510. }
  33511. }, {
  33512. key: "_end",
  33513. value: function _end() {
  33514. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33515. e = _ref59.messageId,
  33516. t = _ref59.message;
  33517. this.emit("end", t), this.close();
  33518. }
  33519. }, {
  33520. key: "_initMessageListener",
  33521. value: function _initMessageListener() {
  33522. uni.onPushMessage(this._uniPushMessageCallback);
  33523. }
  33524. }, {
  33525. key: "_destroy",
  33526. value: function _destroy() {
  33527. uni.offPushMessage(this._uniPushMessageCallback);
  33528. }
  33529. }, {
  33530. key: "toJSON",
  33531. value: function toJSON() {
  33532. return {
  33533. appId: this._appId,
  33534. pushClientId: this._pushClientId,
  33535. seqId: this._seqId
  33536. };
  33537. }
  33538. }, {
  33539. key: "close",
  33540. value: function close() {
  33541. this._destroy(), this.emit("close");
  33542. }
  33543. }]);
  33544. return Es;
  33545. }( /*#__PURE__*/function () {
  33546. function _class6() {
  33547. (0, _classCallCheck2.default)(this, _class6);
  33548. this._callback = {};
  33549. }
  33550. (0, _createClass2.default)(_class6, [{
  33551. key: "addListener",
  33552. value: function addListener(e, t) {
  33553. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  33554. }
  33555. }, {
  33556. key: "on",
  33557. value: function on(e, t) {
  33558. return this.addListener(e, t);
  33559. }
  33560. }, {
  33561. key: "removeListener",
  33562. value: function removeListener(e, t) {
  33563. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  33564. var n = this._callback[e];
  33565. if (!n) return;
  33566. var s = function (e, t) {
  33567. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  33568. if (e[_n15] === t) return _n15;
  33569. }
  33570. return -1;
  33571. }(n, t);
  33572. n.splice(s, 1);
  33573. }
  33574. }, {
  33575. key: "off",
  33576. value: function off(e, t) {
  33577. return this.removeListener(e, t);
  33578. }
  33579. }, {
  33580. key: "removeAllListener",
  33581. value: function removeAllListener(e) {
  33582. delete this._callback[e];
  33583. }
  33584. }, {
  33585. key: "emit",
  33586. value: function emit(e) {
  33587. var n = this._callback[e];
  33588. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  33589. t[_key4 - 1] = arguments[_key4];
  33590. }
  33591. if (n) for (var _e29 = 0; _e29 < n.length; _e29++) {
  33592. n[_e29].apply(n, t);
  33593. }
  33594. }
  33595. }]);
  33596. return _class6;
  33597. }());
  33598. function Os(_x38, _x39) {
  33599. return _Os.apply(this, arguments);
  33600. }
  33601. function _Os() {
  33602. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  33603. var n, _e33, s;
  33604. return _regenerator.default.wrap(function _callee57$(_context57) {
  33605. while (1) {
  33606. switch (_context57.prev = _context57.next) {
  33607. case 0:
  33608. n = "http://".concat(e, ":").concat(t, "/system/ping");
  33609. _context57.prev = 1;
  33610. _context57.next = 4;
  33611. return s = {
  33612. url: n,
  33613. timeout: 500
  33614. }, new Promise(function (e, t) {
  33615. se.request(_objectSpread(_objectSpread({}, s), {}, {
  33616. success: function success(t) {
  33617. e(t);
  33618. },
  33619. fail: function fail(e) {
  33620. t(e);
  33621. }
  33622. }));
  33623. });
  33624. case 4:
  33625. _e33 = _context57.sent;
  33626. return _context57.abrupt("return", !(!_e33.data || 0 !== _e33.data.code));
  33627. case 8:
  33628. _context57.prev = 8;
  33629. _context57.t0 = _context57["catch"](1);
  33630. return _context57.abrupt("return", !1);
  33631. case 11:
  33632. case "end":
  33633. return _context57.stop();
  33634. }
  33635. }
  33636. }, _callee57, null, [[1, 8]]);
  33637. }));
  33638. return _Os.apply(this, arguments);
  33639. }
  33640. function xs(_x40) {
  33641. return _xs.apply(this, arguments);
  33642. }
  33643. function _xs() {
  33644. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  33645. var _ce2, _e34, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  33646. return _regenerator.default.wrap(function _callee59$(_context59) {
  33647. while (1) {
  33648. switch (_context59.prev = _context59.next) {
  33649. case 0:
  33650. if (b) {
  33651. _context59.next = 2;
  33652. break;
  33653. }
  33654. return _context59.abrupt("return", Promise.resolve());
  33655. case 2:
  33656. if ("app" === P) {
  33657. _ce2 = ce(), _e34 = _ce2.osName, _t20 = _ce2.osVersion;
  33658. "ios" === _e34 && function (e) {
  33659. if (!e || "string" != typeof e) return 0;
  33660. var t = e.match(/^(\d+)./);
  33661. return t && t[1] ? parseInt(t[1]) : 0;
  33662. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  33663. }
  33664. t = e.__dev__;
  33665. if (t.debugInfo) {
  33666. _context59.next = 6;
  33667. break;
  33668. }
  33669. return _context59.abrupt("return");
  33670. case 6:
  33671. _t$debugInfo = t.debugInfo;
  33672. n = _t$debugInfo.address;
  33673. s = _t$debugInfo.servePort;
  33674. _context59.next = 11;
  33675. return function () {
  33676. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  33677. var n, _s15, _r8;
  33678. return _regenerator.default.wrap(function _callee58$(_context58) {
  33679. while (1) {
  33680. switch (_context58.prev = _context58.next) {
  33681. case 0:
  33682. _s15 = 0;
  33683. case 1:
  33684. if (!(_s15 < e.length)) {
  33685. _context58.next = 11;
  33686. break;
  33687. }
  33688. _r8 = e[_s15];
  33689. _context58.next = 5;
  33690. return Os(_r8, t);
  33691. case 5:
  33692. if (!_context58.sent) {
  33693. _context58.next = 8;
  33694. break;
  33695. }
  33696. n = _r8;
  33697. return _context58.abrupt("break", 11);
  33698. case 8:
  33699. _s15++;
  33700. _context58.next = 1;
  33701. break;
  33702. case 11:
  33703. return _context58.abrupt("return", {
  33704. address: n,
  33705. port: t
  33706. });
  33707. case 12:
  33708. case "end":
  33709. return _context58.stop();
  33710. }
  33711. }
  33712. }, _callee58);
  33713. }));
  33714. return function (_x41, _x42) {
  33715. return _ref66.apply(this, arguments);
  33716. };
  33717. }()(n, s);
  33718. case 11:
  33719. _yield2 = _context59.sent;
  33720. r = _yield2.address;
  33721. if (!r) {
  33722. _context59.next = 15;
  33723. break;
  33724. }
  33725. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  33726. case 15:
  33727. i = console["app" === P ? "error" : "warn"];
  33728. o = "";
  33729. 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" === P && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === P.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  33730. _context59.next = 19;
  33731. break;
  33732. }
  33733. throw new Error(o);
  33734. case 19:
  33735. i(o);
  33736. case 20:
  33737. case "end":
  33738. return _context59.stop();
  33739. }
  33740. }
  33741. }, _callee59);
  33742. }));
  33743. return _xs.apply(this, arguments);
  33744. }
  33745. function Rs(e) {
  33746. e._initPromiseHub || (e._initPromiseHub = new I({
  33747. createPromise: function createPromise() {
  33748. var t = Promise.resolve();
  33749. var n;
  33750. n = 1, t = new Promise(function (e) {
  33751. setTimeout(function () {
  33752. e();
  33753. }, n);
  33754. });
  33755. var s = e.auth();
  33756. return t.then(function () {
  33757. return s.getLoginState();
  33758. }).then(function (e) {
  33759. return e ? Promise.resolve() : s.signInAnonymously();
  33760. });
  33761. }
  33762. }));
  33763. }
  33764. var Us = {
  33765. tcb: It,
  33766. tencent: It,
  33767. aliyun: ge,
  33768. private: bt
  33769. };
  33770. var Ls = new ( /*#__PURE__*/function () {
  33771. function _class7() {
  33772. (0, _classCallCheck2.default)(this, _class7);
  33773. }
  33774. (0, _createClass2.default)(_class7, [{
  33775. key: "init",
  33776. value: function init(e) {
  33777. var t = {};
  33778. var n = Us[e.provider];
  33779. if (!n) throw new Error("未提供正确的provider参数");
  33780. t = n.init(e), b && function (e) {
  33781. if (!b) return;
  33782. var t = {};
  33783. e.__dev__ = t, t.debugLog = b && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  33784. var n = A;
  33785. n && !n.code && (t.debugInfo = n);
  33786. var s = new I({
  33787. createPromise: function createPromise() {
  33788. return xs(e);
  33789. }
  33790. });
  33791. t.initLocalNetwork = function () {
  33792. return s.exec();
  33793. };
  33794. }(t), Rs(t), xn(t), function (e) {
  33795. var t = e.uploadFile;
  33796. e.uploadFile = function (e) {
  33797. return t.call(this, e);
  33798. };
  33799. }(t), function (e) {
  33800. e.database = function (t) {
  33801. if (t && Object.keys(t).length > 0) return e.init(t).database();
  33802. if (this._database) return this._database;
  33803. var n = Bn($n, {
  33804. uniClient: e
  33805. });
  33806. return this._database = n, n;
  33807. }, e.databaseForJQL = function (t) {
  33808. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  33809. if (this._databaseForJQL) return this._databaseForJQL;
  33810. var n = Bn($n, {
  33811. uniClient: e,
  33812. isJQL: !0
  33813. });
  33814. return this._databaseForJQL = n, n;
  33815. };
  33816. }(t), function (e) {
  33817. e.getCurrentUserInfo = _s, e.chooseAndUploadFile = vs.initChooseAndUploadFile(e), Object.assign(e, {
  33818. get mixinDatacom() {
  33819. return Ss(e);
  33820. }
  33821. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = Ps(e), e.importObject = bs(e);
  33822. }(t);
  33823. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  33824. if (!t[e]) return;
  33825. var n = t[e];
  33826. t[e] = function () {
  33827. return n.apply(t, Array.from(arguments));
  33828. }, t[e] = function (e, t) {
  33829. return function (n) {
  33830. var _this25 = this;
  33831. var s = !1;
  33832. if ("callFunction" === t) {
  33833. var _e30 = n && n.type || u;
  33834. s = _e30 !== u;
  33835. }
  33836. var r = "callFunction" === t && !s,
  33837. i = this._initPromiseHub.exec();
  33838. n = n || {};
  33839. var _te2 = te(n),
  33840. o = _te2.success,
  33841. a = _te2.fail,
  33842. c = _te2.complete,
  33843. h = i.then(function () {
  33844. return s ? Promise.resolve() : q(M(t, "invoke"), n);
  33845. }).then(function () {
  33846. return e.call(_this25, n);
  33847. }).then(function (e) {
  33848. return s ? Promise.resolve(e) : q(M(t, "success"), e).then(function () {
  33849. return q(M(t, "complete"), e);
  33850. }).then(function () {
  33851. return r && Q(B, {
  33852. type: J,
  33853. content: e
  33854. }), Promise.resolve(e);
  33855. });
  33856. }, function (e) {
  33857. return s ? Promise.reject(e) : q(M(t, "fail"), e).then(function () {
  33858. return q(M(t, "complete"), e);
  33859. }).then(function () {
  33860. return Q(B, {
  33861. type: J,
  33862. content: e
  33863. }), Promise.reject(e);
  33864. });
  33865. });
  33866. if (!(o || a || c)) return h;
  33867. h.then(function (e) {
  33868. o && o(e), c && c(e), r && Q(B, {
  33869. type: J,
  33870. content: e
  33871. });
  33872. }, function (e) {
  33873. a && a(e), c && c(e), r && Q(B, {
  33874. type: J,
  33875. content: e
  33876. });
  33877. });
  33878. };
  33879. }(t[e], e).bind(t);
  33880. }), t.init = this.init, t;
  33881. }
  33882. }]);
  33883. return _class7;
  33884. }())();
  33885. (function () {
  33886. var e = E;
  33887. var t = {};
  33888. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  33889. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  33890. var _n16;
  33891. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : O ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  33892. Ls[e] = function () {
  33893. return console.error(_n16), Promise.reject(new ne({
  33894. code: "SYS_ERR",
  33895. message: _n16
  33896. }));
  33897. };
  33898. });
  33899. }
  33900. Object.assign(Ls, {
  33901. get mixinDatacom() {
  33902. return Ss(Ls);
  33903. }
  33904. }), fs(Ls), Ls.addInterceptor = D, Ls.removeInterceptor = F, Ls.interceptObject = K, b && "web" === P && (window.uniCloud = Ls);
  33905. })();
  33906. var Ns = Ls;
  33907. exports.default = Ns;
  33908. /* 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"]))
  33909. /***/ }),
  33910. /***/ 495:
  33911. /*!**********************************************************************!*\
  33912. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  33913. \**********************************************************************/
  33914. /*! no static exports found */
  33915. /***/ (function(module, exports) {
  33916. function _assertThisInitialized(self) {
  33917. if (self === void 0) {
  33918. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  33919. }
  33920. return self;
  33921. }
  33922. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33923. /***/ }),
  33924. /***/ 496:
  33925. /*!*********************************************************!*\
  33926. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  33927. \*********************************************************/
  33928. /*! no static exports found */
  33929. /***/ (function(module, exports, __webpack_require__) {
  33930. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  33931. function _inherits(subClass, superClass) {
  33932. if (typeof superClass !== "function" && superClass !== null) {
  33933. throw new TypeError("Super expression must either be null or a function");
  33934. }
  33935. subClass.prototype = Object.create(superClass && superClass.prototype, {
  33936. constructor: {
  33937. value: subClass,
  33938. writable: true,
  33939. configurable: true
  33940. }
  33941. });
  33942. Object.defineProperty(subClass, "prototype", {
  33943. writable: false
  33944. });
  33945. if (superClass) setPrototypeOf(subClass, superClass);
  33946. }
  33947. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33948. /***/ }),
  33949. /***/ 497:
  33950. /*!**************************************************************************!*\
  33951. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  33952. \**************************************************************************/
  33953. /*! no static exports found */
  33954. /***/ (function(module, exports, __webpack_require__) {
  33955. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  33956. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 495);
  33957. function _possibleConstructorReturn(self, call) {
  33958. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  33959. return call;
  33960. } else if (call !== void 0) {
  33961. throw new TypeError("Derived constructors may only return object or undefined");
  33962. }
  33963. return assertThisInitialized(self);
  33964. }
  33965. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33966. /***/ }),
  33967. /***/ 498:
  33968. /*!***************************************************************!*\
  33969. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  33970. \***************************************************************/
  33971. /*! no static exports found */
  33972. /***/ (function(module, exports) {
  33973. function _getPrototypeOf(o) {
  33974. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  33975. return o.__proto__ || Object.getPrototypeOf(o);
  33976. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33977. return _getPrototypeOf(o);
  33978. }
  33979. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33980. /***/ }),
  33981. /***/ 499:
  33982. /*!****************************************************************!*\
  33983. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  33984. \****************************************************************/
  33985. /*! no static exports found */
  33986. /***/ (function(module, exports, __webpack_require__) {
  33987. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 498);
  33988. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  33989. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 500);
  33990. var construct = __webpack_require__(/*! ./construct.js */ 15);
  33991. function _wrapNativeSuper(Class) {
  33992. var _cache = typeof Map === "function" ? new Map() : undefined;
  33993. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  33994. if (Class === null || !isNativeFunction(Class)) return Class;
  33995. if (typeof Class !== "function") {
  33996. throw new TypeError("Super expression must either be null or a function");
  33997. }
  33998. if (typeof _cache !== "undefined") {
  33999. if (_cache.has(Class)) return _cache.get(Class);
  34000. _cache.set(Class, Wrapper);
  34001. }
  34002. function Wrapper() {
  34003. return construct(Class, arguments, getPrototypeOf(this).constructor);
  34004. }
  34005. Wrapper.prototype = Object.create(Class.prototype, {
  34006. constructor: {
  34007. value: Wrapper,
  34008. enumerable: false,
  34009. writable: true,
  34010. configurable: true
  34011. }
  34012. });
  34013. return setPrototypeOf(Wrapper, Class);
  34014. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34015. return _wrapNativeSuper(Class);
  34016. }
  34017. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34018. /***/ }),
  34019. /***/ 5:
  34020. /*!**************************************************************!*\
  34021. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  34022. \**************************************************************/
  34023. /*! no static exports found */
  34024. /***/ (function(module, exports, __webpack_require__) {
  34025. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  34026. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  34027. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  34028. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  34029. function _slicedToArray(arr, i) {
  34030. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  34031. }
  34032. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34033. /***/ }),
  34034. /***/ 50:
  34035. /*!************************************************************************************************!*\
  34036. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  34037. \************************************************************************************************/
  34038. /*! no static exports found */
  34039. /***/ (function(module, exports, __webpack_require__) {
  34040. // TODO(Babel 8): Remove this file.
  34041. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 51)();
  34042. module.exports = runtime;
  34043. /***/ }),
  34044. /***/ 500:
  34045. /*!*****************************************************************!*\
  34046. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  34047. \*****************************************************************/
  34048. /*! no static exports found */
  34049. /***/ (function(module, exports) {
  34050. function _isNativeFunction(fn) {
  34051. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  34052. }
  34053. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34054. /***/ }),
  34055. /***/ 501:
  34056. /*!**************************************************************************!*\
  34057. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"origin-pages-json"} ***!
  34058. \**************************************************************************/
  34059. /*! no static exports found */
  34060. /***/ (function(module, exports, __webpack_require__) {
  34061. "use strict";
  34062. Object.defineProperty(exports, "__esModule", {
  34063. value: true
  34064. });
  34065. exports.default = void 0;
  34066. var _default = {
  34067. "easycom": {
  34068. "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
  34069. },
  34070. "pages": [{
  34071. "path": "pages/login/login",
  34072. "style": {
  34073. "navigationStyle": "custom"
  34074. }
  34075. }, {
  34076. "path": "pages/noLogin/PressureRegulatingBox/PressureRegulatingBox",
  34077. "style": {
  34078. "navigationBarTitleText": "",
  34079. "enablePullDownRefresh": false
  34080. }
  34081. }, {
  34082. "path": "pages/index/index",
  34083. "style": {
  34084. "navigationStyle": "custom"
  34085. }
  34086. }, {
  34087. "path": "pages/noLogin/uploadProject",
  34088. "style": {
  34089. "navigationStyle": "custom"
  34090. }
  34091. }, {
  34092. "path": "pages/noLogin/typeList",
  34093. "style": {
  34094. "navigationStyle": "custom"
  34095. }
  34096. }, {
  34097. "path": "pages/noLogin/communitylist",
  34098. "style": {
  34099. "navigationBarTitleText": "",
  34100. "enablePullDownRefresh": false
  34101. }
  34102. }, {
  34103. "path": "pages/noLogin/buildinglist",
  34104. "style": {
  34105. "navigationStyle": "custom"
  34106. }
  34107. }, {
  34108. "path": "pages/noLogin/unitlist",
  34109. "style": {
  34110. "navigationStyle": "custom"
  34111. }
  34112. }, {
  34113. "path": "pages/historyConstruction/historyDetail",
  34114. "style": {
  34115. "navigationStyle": "custom"
  34116. }
  34117. }, {
  34118. "path": "pages/noLogin/listProject",
  34119. "style": {
  34120. "navigationBarTitleText": "历史记录",
  34121. "enablePullDownRefresh": true
  34122. }
  34123. }, {
  34124. "path": "pages/historyConstruction/updateInfo",
  34125. "style": {
  34126. "navigationBarTitleText": "修改"
  34127. }
  34128. }, {
  34129. "path": "pages/noLogin/cityProject",
  34130. "style": {
  34131. "navigationStyle": "custom"
  34132. }
  34133. }, {
  34134. "path": "pages/noLogin/data",
  34135. "style": {
  34136. "navigationStyle": "custom"
  34137. }
  34138. }, {
  34139. "path": "pages/noLogin/list",
  34140. "style": {
  34141. "navigationBarTitleText": "列表",
  34142. "enablePullDownRefresh": true
  34143. }
  34144. }, {
  34145. "path": "pages/notice/noticeDetail",
  34146. "style": {
  34147. "navigationStyle": "custom"
  34148. }
  34149. }, {
  34150. "path": "pages/notice/noticeList",
  34151. "style": {
  34152. "navigationBarTitleText": "公告列表",
  34153. "enablePullDownRefresh": true
  34154. }
  34155. }, {
  34156. "path": "pages/cityConstrution/cityConstrution",
  34157. "style": {
  34158. "navigationStyle": "custom"
  34159. }
  34160. }, {
  34161. "path": "pages/historyConstruction/historyConstruction",
  34162. "style": {
  34163. "navigationStyle": "custom"
  34164. }
  34165. }, {
  34166. "path": "pages/service/service",
  34167. "style": {
  34168. "navigationStyle": "custom"
  34169. }
  34170. }, {
  34171. "path": "pages/aboutme/aboutme",
  34172. "style": {
  34173. "navigationStyle": "custom"
  34174. }
  34175. }, {
  34176. "path": "pages/chart/chart",
  34177. "style": {
  34178. "navigationStyle": "custom"
  34179. }
  34180. }, {
  34181. "path": "pages/chart/chartAll",
  34182. "style": {
  34183. "navigationStyle": "custom"
  34184. }
  34185. }, {
  34186. "path": "pages/chart/chartDetail",
  34187. "style": {
  34188. "navigationStyle": "custom"
  34189. }
  34190. }, {
  34191. "path": "pages/chart/newchartDetail",
  34192. "style": {
  34193. "navigationStyle": "custom"
  34194. }
  34195. }, {
  34196. "path": "pages/chart/chartList",
  34197. "style": {
  34198. "navigationBarTitleText": "工程管理"
  34199. }
  34200. }, {
  34201. "path": "pages/chart/details",
  34202. "style": {
  34203. "navigationBarTitleText": "详情"
  34204. }
  34205. }, {
  34206. "path": "pages/noLogin/repair",
  34207. "style": {
  34208. "navigationStyle": "custom"
  34209. }
  34210. }, {
  34211. "path": "pages/noLogin/My",
  34212. "style": {
  34213. "navigationStyle": "custom"
  34214. }
  34215. }, {
  34216. "path": "pages/noLogin/Myphoto",
  34217. "style": {
  34218. "navigationStyle": "custom"
  34219. }
  34220. }, {
  34221. "path": "pages/noLogin/home/home",
  34222. "style": {
  34223. "navigationBarTitleText": "",
  34224. "enablePullDownRefresh": false
  34225. }
  34226. }, {
  34227. "path": "pages/noLogin/emergencyRepairOrder/emergencyRepairOrder",
  34228. "style": {
  34229. "navigationBarTitleText": "",
  34230. "enablePullDownRefresh": false
  34231. }
  34232. }, {
  34233. "path": "pages/noLogin/WarningPileForm/WarningPileForm",
  34234. "style": {
  34235. "navigationBarTitleText": "",
  34236. "enablePullDownRefresh": false
  34237. }
  34238. }, {
  34239. "path": "pages/noLogin/WarningPileList",
  34240. "style": {
  34241. "navigationBarTitleText": "",
  34242. "enablePullDownRefresh": false
  34243. }
  34244. }, {
  34245. "path": "pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement",
  34246. "style": {
  34247. "navigationBarTitleText": "",
  34248. "enablePullDownRefresh": false
  34249. }
  34250. }],
  34251. "globalStyle": {
  34252. "navigationBarTextStyle": "black",
  34253. "navigationBarTitleText": "长春贞达市政施工管理平台",
  34254. "navigationBarBackgroundColor": "#F8F8F8",
  34255. "backgroundColor": "#F8F8F8"
  34256. },
  34257. "tabBar": {
  34258. "list": [{
  34259. "pagePath": "pages/index/index",
  34260. "text": "首页",
  34261. "iconPath": "static/icon/home.png",
  34262. "selectedIconPath": "static/icon/home-on.png"
  34263. }, {
  34264. "pagePath": "pages/noLogin/typeList",
  34265. "text": "工作",
  34266. "iconPath": "static/icon/work.png",
  34267. "selectedIconPath": "static/icon/work-on.png"
  34268. }]
  34269. },
  34270. "condition": {
  34271. "current": 0,
  34272. "list": [{
  34273. "name": "",
  34274. "path": "",
  34275. "query": ""
  34276. }]
  34277. }
  34278. };
  34279. exports.default = _default;
  34280. /***/ }),
  34281. /***/ 502:
  34282. /*!*************************************************************!*\
  34283. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"stat"} ***!
  34284. \*************************************************************/
  34285. /*! no static exports found */
  34286. /***/ (function(module, exports, __webpack_require__) {
  34287. "use strict";
  34288. Object.defineProperty(exports, "__esModule", {
  34289. value: true
  34290. });
  34291. exports.default = void 0;
  34292. var _default = {
  34293. "appid": "__UNI__5FB7046"
  34294. };
  34295. exports.default = _default;
  34296. /***/ }),
  34297. /***/ 503:
  34298. /*!*******************************************************************************************!*\
  34299. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js ***!
  34300. \*******************************************************************************************/
  34301. /*! no static exports found */
  34302. /***/ (function(module, exports, __webpack_require__) {
  34303. "use strict";
  34304. /* WEBPACK VAR INJECTION */(function(module) {/*
  34305. * uCharts®
  34306. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  34307. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  34308. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  34309. * 复制使用请保留本段注释,感谢支持开源!
  34310. *
  34311. * uCharts®官方网站
  34312. * https://www.uCharts.cn
  34313. *
  34314. * 开源地址:
  34315. * https://gitee.com/uCharts/uCharts
  34316. *
  34317. * uni-app插件市场地址:
  34318. * http://ext.dcloud.net.cn/plugin?id=271
  34319. *
  34320. */
  34321. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  34322. Object.defineProperty(exports, "__esModule", {
  34323. value: true
  34324. });
  34325. exports.default = void 0;
  34326. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  34327. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  34328. var config = {
  34329. version: 'v2.3.6-20211201',
  34330. yAxisWidth: 15,
  34331. yAxisSplit: 5,
  34332. xAxisHeight: 22,
  34333. xAxisLineHeight: 22,
  34334. legendHeight: 15,
  34335. yAxisTitleWidth: 15,
  34336. padding: [10, 10, 10, 10],
  34337. pixelRatio: 1,
  34338. rotate: false,
  34339. columePadding: 3,
  34340. fontSize: 13,
  34341. fontColor: '#666666',
  34342. dataPointShape: ['circle', 'circle', 'circle', 'circle'],
  34343. color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
  34344. linearColor: ['#0EE2F8', '#2BDCA8', '#FA7D8D', '#EB88E2', '#2AE3A0', '#0EE2F8', '#EB88E2', '#6773E3', '#F78A85'],
  34345. pieChartLinePadding: 15,
  34346. pieChartTextPadding: 5,
  34347. xAxisTextPadding: 3,
  34348. titleColor: '#333333',
  34349. titleFontSize: 20,
  34350. subtitleColor: '#999999',
  34351. subtitleFontSize: 15,
  34352. toolTipPadding: 3,
  34353. toolTipBackground: '#000000',
  34354. toolTipOpacity: 0.7,
  34355. toolTipLineHeight: 20,
  34356. radarLabelTextMargin: 13,
  34357. gaugeLabelTextMargin: 13
  34358. };
  34359. var assign = function assign(target) {
  34360. for (var _len2 = arguments.length, varArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  34361. varArgs[_key2 - 1] = arguments[_key2];
  34362. }
  34363. if (target == null) {
  34364. throw new TypeError('[uCharts] Cannot convert undefined or null to object');
  34365. }
  34366. if (!varArgs || varArgs.length <= 0) {
  34367. return target;
  34368. }
  34369. // 深度合并对象
  34370. function deepAssign(obj1, obj2) {
  34371. for (var key in obj2) {
  34372. obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
  34373. }
  34374. return obj1;
  34375. }
  34376. varArgs.forEach(function (val) {
  34377. target = deepAssign(target, val);
  34378. });
  34379. return target;
  34380. };
  34381. var util = {
  34382. toFixed: function toFixed(num, limit) {
  34383. limit = limit || 2;
  34384. if (this.isFloat(num)) {
  34385. num = num.toFixed(limit);
  34386. }
  34387. return num;
  34388. },
  34389. isFloat: function isFloat(num) {
  34390. return num % 1 !== 0;
  34391. },
  34392. approximatelyEqual: function approximatelyEqual(num1, num2) {
  34393. return Math.abs(num1 - num2) < 1e-10;
  34394. },
  34395. isSameSign: function isSameSign(num1, num2) {
  34396. return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
  34397. },
  34398. isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
  34399. return this.isSameSign(p1.x, p2.x);
  34400. },
  34401. isCollision: function isCollision(obj1, obj2) {
  34402. obj1.end = {};
  34403. obj1.end.x = obj1.start.x + obj1.width;
  34404. obj1.end.y = obj1.start.y - obj1.height;
  34405. obj2.end = {};
  34406. obj2.end.x = obj2.start.x + obj2.width;
  34407. obj2.end.y = obj2.start.y - obj2.height;
  34408. var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y;
  34409. return !flag;
  34410. }
  34411. };
  34412. //兼容H5点击事件
  34413. function getH5Offset(e) {
  34414. e.mp = {
  34415. changedTouches: []
  34416. };
  34417. e.mp.changedTouches.push({
  34418. x: e.offsetX,
  34419. y: e.offsetY
  34420. });
  34421. return e;
  34422. }
  34423. // 经纬度转墨卡托
  34424. function lonlat2mercator(longitude, latitude) {
  34425. var mercator = Array(2);
  34426. var x = longitude * 20037508.34 / 180;
  34427. var y = Math.log(Math.tan((90 + latitude) * Math.PI / 360)) / (Math.PI / 180);
  34428. y = y * 20037508.34 / 180;
  34429. mercator[0] = x;
  34430. mercator[1] = y;
  34431. return mercator;
  34432. }
  34433. // 墨卡托转经纬度
  34434. function mercator2lonlat(longitude, latitude) {
  34435. var lonlat = Array(2);
  34436. var x = longitude / 20037508.34 * 180;
  34437. var y = latitude / 20037508.34 * 180;
  34438. y = 180 / Math.PI * (2 * Math.atan(Math.exp(y * Math.PI / 180)) - Math.PI / 2);
  34439. lonlat[0] = x;
  34440. lonlat[1] = y;
  34441. return lonlat;
  34442. }
  34443. // hex 转 rgba
  34444. function hexToRgb(hexValue, opc) {
  34445. var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  34446. var hex = hexValue.replace(rgx, function (m, r, g, b) {
  34447. return r + r + g + g + b + b;
  34448. });
  34449. var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  34450. var r = parseInt(rgb[1], 16);
  34451. var g = parseInt(rgb[2], 16);
  34452. var b = parseInt(rgb[3], 16);
  34453. return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
  34454. }
  34455. function findRange(num, type, limit) {
  34456. if (isNaN(num)) {
  34457. throw new Error('[uCharts] series数据需为Number格式');
  34458. }
  34459. limit = limit || 10;
  34460. type = type ? type : 'upper';
  34461. var multiple = 1;
  34462. while (limit < 1) {
  34463. limit *= 10;
  34464. multiple *= 10;
  34465. }
  34466. if (type === 'upper') {
  34467. num = Math.ceil(num * multiple);
  34468. } else {
  34469. num = Math.floor(num * multiple);
  34470. }
  34471. while (num % limit !== 0) {
  34472. if (type === 'upper') {
  34473. num++;
  34474. } else {
  34475. num--;
  34476. }
  34477. }
  34478. return num / multiple;
  34479. }
  34480. function calCandleMA(dayArr, nameArr, colorArr, kdata) {
  34481. var seriesTemp = [];
  34482. for (var k = 0; k < dayArr.length; k++) {
  34483. var seriesItem = {
  34484. data: [],
  34485. name: nameArr[k],
  34486. color: colorArr[k]
  34487. };
  34488. for (var i = 0, len = kdata.length; i < len; i++) {
  34489. if (i < dayArr[k]) {
  34490. seriesItem.data.push(null);
  34491. continue;
  34492. }
  34493. var sum = 0;
  34494. for (var j = 0; j < dayArr[k]; j++) {
  34495. sum += kdata[i - j][1];
  34496. }
  34497. seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
  34498. }
  34499. seriesTemp.push(seriesItem);
  34500. }
  34501. return seriesTemp;
  34502. }
  34503. function calValidDistance(self, distance, chartData, config, opts) {
  34504. var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
  34505. var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
  34506. var validDistance = distance;
  34507. if (distance >= 0) {
  34508. validDistance = 0;
  34509. self.uevent.trigger('scrollLeft');
  34510. self.scrollOption.position = 'left';
  34511. opts.xAxis.scrollPosition = 'left';
  34512. } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
  34513. validDistance = dataChartAreaWidth - dataChartWidth;
  34514. self.uevent.trigger('scrollRight');
  34515. self.scrollOption.position = 'right';
  34516. opts.xAxis.scrollPosition = 'right';
  34517. } else {
  34518. self.scrollOption.position = distance;
  34519. opts.xAxis.scrollPosition = distance;
  34520. }
  34521. return validDistance;
  34522. }
  34523. function isInAngleRange(angle, startAngle, endAngle) {
  34524. function adjust(angle) {
  34525. while (angle < 0) {
  34526. angle += 2 * Math.PI;
  34527. }
  34528. while (angle > 2 * Math.PI) {
  34529. angle -= 2 * Math.PI;
  34530. }
  34531. return angle;
  34532. }
  34533. angle = adjust(angle);
  34534. startAngle = adjust(startAngle);
  34535. endAngle = adjust(endAngle);
  34536. if (startAngle > endAngle) {
  34537. endAngle += 2 * Math.PI;
  34538. if (angle < startAngle) {
  34539. angle += 2 * Math.PI;
  34540. }
  34541. }
  34542. return angle >= startAngle && angle <= endAngle;
  34543. }
  34544. function calRotateTranslate(x, y, h) {
  34545. var xv = x;
  34546. var yv = h - y;
  34547. var transX = xv + (h - yv - xv) / Math.sqrt(2);
  34548. transX *= -1;
  34549. var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
  34550. return {
  34551. transX: transX,
  34552. transY: transY
  34553. };
  34554. }
  34555. function createCurveControlPoints(points, i) {
  34556. function isNotMiddlePoint(points, i) {
  34557. if (points[i - 1] && points[i + 1]) {
  34558. return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y, points[i + 1].y);
  34559. } else {
  34560. return false;
  34561. }
  34562. }
  34563. function isNotMiddlePointX(points, i) {
  34564. if (points[i - 1] && points[i + 1]) {
  34565. return points[i].x >= Math.max(points[i - 1].x, points[i + 1].x) || points[i].x <= Math.min(points[i - 1].x, points[i + 1].x);
  34566. } else {
  34567. return false;
  34568. }
  34569. }
  34570. var a = 0.2;
  34571. var b = 0.2;
  34572. var pAx = null;
  34573. var pAy = null;
  34574. var pBx = null;
  34575. var pBy = null;
  34576. if (i < 1) {
  34577. pAx = points[0].x + (points[1].x - points[0].x) * a;
  34578. pAy = points[0].y + (points[1].y - points[0].y) * a;
  34579. } else {
  34580. pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
  34581. pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
  34582. }
  34583. if (i > points.length - 3) {
  34584. var last = points.length - 1;
  34585. pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
  34586. pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
  34587. } else {
  34588. pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
  34589. pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
  34590. }
  34591. if (isNotMiddlePoint(points, i + 1)) {
  34592. pBy = points[i + 1].y;
  34593. }
  34594. if (isNotMiddlePoint(points, i)) {
  34595. pAy = points[i].y;
  34596. }
  34597. if (isNotMiddlePointX(points, i + 1)) {
  34598. pBx = points[i + 1].x;
  34599. }
  34600. if (isNotMiddlePointX(points, i)) {
  34601. pAx = points[i].x;
  34602. }
  34603. if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
  34604. pAy = points[i].y;
  34605. }
  34606. if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
  34607. pBy = points[i + 1].y;
  34608. }
  34609. if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
  34610. pAx = points[i].x;
  34611. }
  34612. if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
  34613. pBx = points[i + 1].x;
  34614. }
  34615. return {
  34616. ctrA: {
  34617. x: pAx,
  34618. y: pAy
  34619. },
  34620. ctrB: {
  34621. x: pBx,
  34622. y: pBy
  34623. }
  34624. };
  34625. }
  34626. function convertCoordinateOrigin(x, y, center) {
  34627. return {
  34628. x: center.x + x,
  34629. y: center.y - y
  34630. };
  34631. }
  34632. function avoidCollision(obj, target) {
  34633. if (target) {
  34634. // is collision test
  34635. while (util.isCollision(obj, target)) {
  34636. if (obj.start.x > 0) {
  34637. obj.start.y--;
  34638. } else if (obj.start.x < 0) {
  34639. obj.start.y++;
  34640. } else {
  34641. if (obj.start.y > 0) {
  34642. obj.start.y++;
  34643. } else {
  34644. obj.start.y--;
  34645. }
  34646. }
  34647. }
  34648. }
  34649. return obj;
  34650. }
  34651. function fixPieSeries(series, opts, config) {
  34652. var pieSeriesArr = [];
  34653. if (series.length > 0 && series[0].data.constructor.toString().indexOf('Array') > -1) {
  34654. opts._pieSeries_ = series;
  34655. var oldseries = series[0].data;
  34656. for (var i = 0; i < oldseries.length; i++) {
  34657. oldseries[i].formatter = series[0].formatter;
  34658. oldseries[i].data = oldseries[i].value;
  34659. pieSeriesArr.push(oldseries[i]);
  34660. }
  34661. opts.series = pieSeriesArr;
  34662. } else {
  34663. pieSeriesArr = series;
  34664. }
  34665. return pieSeriesArr;
  34666. }
  34667. function fillSeries(series, opts, config) {
  34668. var index = 0;
  34669. for (var i = 0; i < series.length; i++) {
  34670. var item = series[i];
  34671. if (!item.color) {
  34672. item.color = config.color[index];
  34673. index = (index + 1) % config.color.length;
  34674. }
  34675. if (!item.linearIndex) {
  34676. item.linearIndex = i;
  34677. }
  34678. if (!item.index) {
  34679. item.index = 0;
  34680. }
  34681. if (!item.type) {
  34682. item.type = opts.type;
  34683. }
  34684. if (typeof item.show == "undefined") {
  34685. item.show = true;
  34686. }
  34687. if (!item.type) {
  34688. item.type = opts.type;
  34689. }
  34690. if (!item.pointShape) {
  34691. item.pointShape = "circle";
  34692. }
  34693. if (!item.legendShape) {
  34694. switch (item.type) {
  34695. case 'line':
  34696. item.legendShape = "line";
  34697. break;
  34698. case 'column':
  34699. item.legendShape = "rect";
  34700. break;
  34701. case 'area':
  34702. item.legendShape = "triangle";
  34703. break;
  34704. case 'bar':
  34705. item.legendShape = "rect";
  34706. break;
  34707. default:
  34708. item.legendShape = "circle";
  34709. }
  34710. }
  34711. }
  34712. return series;
  34713. }
  34714. function fillCustomColor(linearType, customColor, series, config) {
  34715. var newcolor = customColor || [];
  34716. if (linearType == 'custom' && newcolor.length == 0) {
  34717. newcolor = config.linearColor;
  34718. }
  34719. if (linearType == 'custom' && newcolor.length < series.length) {
  34720. var chazhi = series.length - newcolor.length;
  34721. for (var i = 0; i < chazhi; i++) {
  34722. newcolor.push(config.linearColor[(i + 1) % config.linearColor.length]);
  34723. }
  34724. }
  34725. return newcolor;
  34726. }
  34727. function getDataRange(minData, maxData) {
  34728. var limit = 0;
  34729. var range = maxData - minData;
  34730. if (range >= 10000) {
  34731. limit = 1000;
  34732. } else if (range >= 1000) {
  34733. limit = 100;
  34734. } else if (range >= 100) {
  34735. limit = 10;
  34736. } else if (range >= 10) {
  34737. limit = 5;
  34738. } else if (range >= 1) {
  34739. limit = 1;
  34740. } else if (range >= 0.1) {
  34741. limit = 0.1;
  34742. } else if (range >= 0.01) {
  34743. limit = 0.01;
  34744. } else if (range >= 0.001) {
  34745. limit = 0.001;
  34746. } else if (range >= 0.0001) {
  34747. limit = 0.0001;
  34748. } else if (range >= 0.00001) {
  34749. limit = 0.00001;
  34750. } else {
  34751. limit = 0.000001;
  34752. }
  34753. return {
  34754. minRange: findRange(minData, 'lower', limit),
  34755. maxRange: findRange(maxData, 'upper', limit)
  34756. };
  34757. }
  34758. function measureText(text, fontSize, context) {
  34759. var width = 0;
  34760. text = String(text);
  34761. if (context !== false && context !== undefined && context.setFontSize && context.measureText) {
  34762. context.setFontSize(fontSize);
  34763. return context.measureText(text).width;
  34764. } else {
  34765. var text = text.split('');
  34766. for (var i = 0; i < text.length; i++) {
  34767. var item = text[i];
  34768. if (/[a-zA-Z]/.test(item)) {
  34769. width += 7;
  34770. } else if (/[0-9]/.test(item)) {
  34771. width += 5.5;
  34772. } else if (/\./.test(item)) {
  34773. width += 2.7;
  34774. } else if (/-/.test(item)) {
  34775. width += 3.25;
  34776. } else if (/:/.test(item)) {
  34777. width += 2.5;
  34778. } else if (/[\u4e00-\u9fa5]/.test(item)) {
  34779. width += 10;
  34780. } else if (/\(|\)/.test(item)) {
  34781. width += 3.73;
  34782. } else if (/\s/.test(item)) {
  34783. width += 2.5;
  34784. } else if (/%/.test(item)) {
  34785. width += 8;
  34786. } else {
  34787. width += 10;
  34788. }
  34789. }
  34790. return width * fontSize / 10;
  34791. }
  34792. }
  34793. function dataCombine(series) {
  34794. return series.reduce(function (a, b) {
  34795. return (a.data ? a.data : a).concat(b.data);
  34796. }, []);
  34797. }
  34798. function dataCombineStack(series, len) {
  34799. var sum = new Array(len);
  34800. for (var j = 0; j < sum.length; j++) {
  34801. sum[j] = 0;
  34802. }
  34803. for (var i = 0; i < series.length; i++) {
  34804. for (var j = 0; j < sum.length; j++) {
  34805. sum[j] += series[i].data[j];
  34806. }
  34807. }
  34808. return series.reduce(function (a, b) {
  34809. return (a.data ? a.data : a).concat(b.data).concat(sum);
  34810. }, []);
  34811. }
  34812. function getTouches(touches, opts, e) {
  34813. var x, y;
  34814. if (touches.clientX) {
  34815. if (opts.rotate) {
  34816. y = opts.height - touches.clientX * opts.pix;
  34817. x = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34818. } else {
  34819. x = touches.clientX * opts.pix;
  34820. y = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34821. }
  34822. } else {
  34823. if (opts.rotate) {
  34824. y = opts.height - touches.x * opts.pix;
  34825. x = touches.y * opts.pix;
  34826. } else {
  34827. x = touches.x * opts.pix;
  34828. y = touches.y * opts.pix;
  34829. }
  34830. }
  34831. return {
  34832. x: x,
  34833. y: y
  34834. };
  34835. }
  34836. function getSeriesDataItem(series, index, group) {
  34837. var data = [];
  34838. var newSeries = [];
  34839. var indexIsArr = index.constructor.toString().indexOf('Array') > -1;
  34840. if (indexIsArr) {
  34841. var tempSeries = filterSeries(series);
  34842. for (var i = 0; i < group.length; i++) {
  34843. newSeries.push(tempSeries[group[i]]);
  34844. }
  34845. } else {
  34846. newSeries = series;
  34847. }
  34848. ;
  34849. for (var _i = 0; _i < newSeries.length; _i++) {
  34850. var item = newSeries[_i];
  34851. var tmpindex = -1;
  34852. if (indexIsArr) {
  34853. tmpindex = index[_i];
  34854. } else {
  34855. tmpindex = index;
  34856. }
  34857. if (item.data[tmpindex] !== null && typeof item.data[tmpindex] !== 'undefined' && item.show) {
  34858. var seriesItem = {};
  34859. seriesItem.color = item.color;
  34860. seriesItem.type = item.type;
  34861. seriesItem.style = item.style;
  34862. seriesItem.pointShape = item.pointShape;
  34863. seriesItem.disableLegend = item.disableLegend;
  34864. seriesItem.name = item.name;
  34865. seriesItem.show = item.show;
  34866. seriesItem.data = item.formatter ? item.formatter(item.data[tmpindex]) : item.data[tmpindex];
  34867. data.push(seriesItem);
  34868. }
  34869. }
  34870. return data;
  34871. }
  34872. function getMaxTextListLength(list, fontSize, context) {
  34873. var lengthList = list.map(function (item) {
  34874. return measureText(item, fontSize, context);
  34875. });
  34876. return Math.max.apply(null, lengthList);
  34877. }
  34878. function getRadarCoordinateSeries(length) {
  34879. var eachAngle = 2 * Math.PI / length;
  34880. var CoordinateSeries = [];
  34881. for (var i = 0; i < length; i++) {
  34882. CoordinateSeries.push(eachAngle * i);
  34883. }
  34884. return CoordinateSeries.map(function (item) {
  34885. return -1 * item + Math.PI / 2;
  34886. });
  34887. }
  34888. function getToolTipData(seriesData, opts, index, group, categories) {
  34889. var option = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  34890. var calPoints = opts.chartData.calPoints ? opts.chartData.calPoints : [];
  34891. var points = {};
  34892. if (group.length > 0) {
  34893. var filterPoints = [];
  34894. for (var i = 0; i < group.length; i++) {
  34895. filterPoints.push(calPoints[group[i]]);
  34896. }
  34897. points = filterPoints[0][index[0]];
  34898. } else {
  34899. points = calPoints[0][index];
  34900. }
  34901. ;
  34902. var textList = seriesData.map(function (item) {
  34903. var titleText = null;
  34904. if (opts.categories && opts.categories.length > 0) {
  34905. titleText = categories[index];
  34906. }
  34907. ;
  34908. return {
  34909. text: option.formatter ? option.formatter(item, titleText, index, opts) : item.name + ': ' + item.data,
  34910. color: item.color
  34911. };
  34912. });
  34913. var offset = {
  34914. x: Math.round(points.x),
  34915. y: Math.round(points.y)
  34916. };
  34917. return {
  34918. textList: textList,
  34919. offset: offset
  34920. };
  34921. }
  34922. function getMixToolTipData(seriesData, opts, index, categories) {
  34923. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  34924. var points = opts.chartData.xAxisPoints[index] + opts.chartData.eachSpacing / 2;
  34925. var textList = seriesData.map(function (item) {
  34926. return {
  34927. text: option.formatter ? option.formatter(item, categories[index], index, opts) : item.name + ': ' + item.data,
  34928. color: item.color,
  34929. disableLegend: item.disableLegend ? true : false
  34930. };
  34931. });
  34932. textList = textList.filter(function (item) {
  34933. if (item.disableLegend !== true) {
  34934. return item;
  34935. }
  34936. });
  34937. var offset = {
  34938. x: Math.round(points),
  34939. y: 0
  34940. };
  34941. return {
  34942. textList: textList,
  34943. offset: offset
  34944. };
  34945. }
  34946. function getCandleToolTipData(series, seriesData, opts, index, categories, extra) {
  34947. var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  34948. var calPoints = opts.chartData.calPoints;
  34949. var upColor = extra.color.upFill;
  34950. var downColor = extra.color.downFill;
  34951. //颜色顺序为开盘,收盘,最低,最高
  34952. var color = [upColor, upColor, downColor, upColor];
  34953. var textList = [];
  34954. seriesData.map(function (item) {
  34955. if (index == 0) {
  34956. if (item.data[1] - item.data[0] < 0) {
  34957. color[1] = downColor;
  34958. } else {
  34959. color[1] = upColor;
  34960. }
  34961. } else {
  34962. if (item.data[0] < series[index - 1][1]) {
  34963. color[0] = downColor;
  34964. }
  34965. if (item.data[1] < item.data[0]) {
  34966. color[1] = downColor;
  34967. }
  34968. if (item.data[2] > series[index - 1][1]) {
  34969. color[2] = upColor;
  34970. }
  34971. if (item.data[3] < series[index - 1][1]) {
  34972. color[3] = downColor;
  34973. }
  34974. }
  34975. var text1 = {
  34976. text: '开盘:' + item.data[0],
  34977. color: color[0]
  34978. };
  34979. var text2 = {
  34980. text: '收盘:' + item.data[1],
  34981. color: color[1]
  34982. };
  34983. var text3 = {
  34984. text: '最低:' + item.data[2],
  34985. color: color[2]
  34986. };
  34987. var text4 = {
  34988. text: '最高:' + item.data[3],
  34989. color: color[3]
  34990. };
  34991. textList.push(text1, text2, text3, text4);
  34992. });
  34993. var validCalPoints = [];
  34994. var offset = {
  34995. x: 0,
  34996. y: 0
  34997. };
  34998. for (var i = 0; i < calPoints.length; i++) {
  34999. var points = calPoints[i];
  35000. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  35001. validCalPoints.push(points[index]);
  35002. }
  35003. }
  35004. offset.x = Math.round(validCalPoints[0][0].x);
  35005. return {
  35006. textList: textList,
  35007. offset: offset
  35008. };
  35009. }
  35010. function filterSeries(series) {
  35011. var tempSeries = [];
  35012. for (var i = 0; i < series.length; i++) {
  35013. if (series[i].show == true) {
  35014. tempSeries.push(series[i]);
  35015. }
  35016. }
  35017. return tempSeries;
  35018. }
  35019. function findCurrentIndex(currentPoints, calPoints, opts, config) {
  35020. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  35021. var current = {
  35022. index: -1,
  35023. group: []
  35024. };
  35025. var spacing = opts.chartData.eachSpacing / 2;
  35026. var xAxisPoints = [];
  35027. if (calPoints && calPoints.length > 0) {
  35028. if (!opts.categories) {
  35029. spacing = 0;
  35030. } else {
  35031. for (var i = 1; i < opts.chartData.xAxisPoints.length; i++) {
  35032. xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
  35033. }
  35034. if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
  35035. xAxisPoints = opts.chartData.xAxisPoints;
  35036. }
  35037. }
  35038. if (isInExactChartArea(currentPoints, opts, config)) {
  35039. if (!opts.categories) {
  35040. var timePoints = Array(calPoints.length);
  35041. for (var _i2 = 0; _i2 < calPoints.length; _i2++) {
  35042. timePoints[_i2] = Array(calPoints[_i2].length);
  35043. for (var j = 0; j < calPoints[_i2].length; j++) {
  35044. timePoints[_i2][j] = Math.abs(calPoints[_i2][j].x - currentPoints.x);
  35045. }
  35046. }
  35047. ;
  35048. var pointValue = Array(timePoints.length);
  35049. var pointIndex = Array(timePoints.length);
  35050. for (var _i3 = 0; _i3 < timePoints.length; _i3++) {
  35051. pointValue[_i3] = Math.min.apply(null, timePoints[_i3]);
  35052. pointIndex[_i3] = timePoints[_i3].indexOf(pointValue[_i3]);
  35053. }
  35054. var minValue = Math.min.apply(null, pointValue);
  35055. current.index = [];
  35056. for (var _i4 = 0; _i4 < pointValue.length; _i4++) {
  35057. if (pointValue[_i4] == minValue) {
  35058. current.group.push(_i4);
  35059. current.index.push(pointIndex[_i4]);
  35060. }
  35061. }
  35062. ;
  35063. } else {
  35064. xAxisPoints.forEach(function (item, index) {
  35065. if (currentPoints.x + offset + spacing > item) {
  35066. current.index = index;
  35067. }
  35068. });
  35069. }
  35070. }
  35071. }
  35072. return current;
  35073. }
  35074. function findBarChartCurrentIndex(currentPoints, calPoints, opts, config) {
  35075. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  35076. var current = {
  35077. index: -1,
  35078. group: []
  35079. };
  35080. var spacing = opts.chartData.eachSpacing / 2;
  35081. var yAxisPoints = opts.chartData.yAxisPoints;
  35082. if (calPoints && calPoints.length > 0) {
  35083. if (isInExactChartArea(currentPoints, opts, config)) {
  35084. yAxisPoints.forEach(function (item, index) {
  35085. if (currentPoints.y + offset + spacing > item) {
  35086. current.index = index;
  35087. }
  35088. });
  35089. }
  35090. }
  35091. return current;
  35092. }
  35093. function findLegendIndex(currentPoints, legendData, opts) {
  35094. var currentIndex = -1;
  35095. var gap = 0;
  35096. if (isInExactLegendArea(currentPoints, legendData.area)) {
  35097. var points = legendData.points;
  35098. var index = -1;
  35099. for (var i = 0, len = points.length; i < len; i++) {
  35100. var item = points[i];
  35101. for (var j = 0; j < item.length; j++) {
  35102. index += 1;
  35103. var area = item[j]['area'];
  35104. if (area && currentPoints.x > area[0] - gap && currentPoints.x < area[2] + gap && currentPoints.y > area[1] - gap && currentPoints.y < area[3] + gap) {
  35105. currentIndex = index;
  35106. break;
  35107. }
  35108. }
  35109. }
  35110. return currentIndex;
  35111. }
  35112. return currentIndex;
  35113. }
  35114. function isInExactLegendArea(currentPoints, area) {
  35115. return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
  35116. }
  35117. function isInExactChartArea(currentPoints, opts, config) {
  35118. return currentPoints.x <= opts.width - opts.area[1] + 10 && currentPoints.x >= opts.area[3] - 10 && currentPoints.y >= opts.area[0] && currentPoints.y <= opts.height - opts.area[2];
  35119. }
  35120. function findRadarChartCurrentIndex(currentPoints, radarData, count) {
  35121. var eachAngleArea = 2 * Math.PI / count;
  35122. var currentIndex = -1;
  35123. if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
  35124. var fixAngle = function fixAngle(angle) {
  35125. if (angle < 0) {
  35126. angle += 2 * Math.PI;
  35127. }
  35128. if (angle > 2 * Math.PI) {
  35129. angle -= 2 * Math.PI;
  35130. }
  35131. return angle;
  35132. };
  35133. var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
  35134. angle = -1 * angle;
  35135. if (angle < 0) {
  35136. angle += 2 * Math.PI;
  35137. }
  35138. var angleList = radarData.angleList.map(function (item) {
  35139. item = fixAngle(-1 * item);
  35140. return item;
  35141. });
  35142. angleList.forEach(function (item, index) {
  35143. var rangeStart = fixAngle(item - eachAngleArea / 2);
  35144. var rangeEnd = fixAngle(item + eachAngleArea / 2);
  35145. if (rangeEnd < rangeStart) {
  35146. rangeEnd += 2 * Math.PI;
  35147. }
  35148. if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
  35149. currentIndex = index;
  35150. }
  35151. });
  35152. }
  35153. return currentIndex;
  35154. }
  35155. function findFunnelChartCurrentIndex(currentPoints, funnelData) {
  35156. var currentIndex = -1;
  35157. for (var i = 0, len = funnelData.series.length; i < len; i++) {
  35158. var item = funnelData.series[i];
  35159. if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
  35160. currentIndex = i;
  35161. break;
  35162. }
  35163. }
  35164. return currentIndex;
  35165. }
  35166. function findWordChartCurrentIndex(currentPoints, wordData) {
  35167. var currentIndex = -1;
  35168. for (var i = 0, len = wordData.length; i < len; i++) {
  35169. var item = wordData[i];
  35170. if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
  35171. currentIndex = i;
  35172. break;
  35173. }
  35174. }
  35175. return currentIndex;
  35176. }
  35177. function findMapChartCurrentIndex(currentPoints, opts) {
  35178. var currentIndex = -1;
  35179. var cData = opts.chartData.mapData;
  35180. var data = opts.series;
  35181. var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
  35182. var poi = [tmp.x, tmp.y];
  35183. for (var i = 0, len = data.length; i < len; i++) {
  35184. var item = data[i].geometry.coordinates;
  35185. if (isPoiWithinPoly(poi, item, opts.chartData.mapData.mercator)) {
  35186. currentIndex = i;
  35187. break;
  35188. }
  35189. }
  35190. return currentIndex;
  35191. }
  35192. function findRoseChartCurrentIndex(currentPoints, pieData, opts) {
  35193. var currentIndex = -1;
  35194. var series = getRoseDataPoints(opts._series_, opts.extra.rose.type, pieData.radius, pieData.radius);
  35195. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  35196. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  35197. angle = -angle;
  35198. if (opts.extra.rose && opts.extra.rose.offsetAngle) {
  35199. angle = angle - opts.extra.rose.offsetAngle * Math.PI / 180;
  35200. }
  35201. for (var i = 0, len = series.length; i < len; i++) {
  35202. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._rose_proportion_ * 2 * Math.PI)) {
  35203. currentIndex = i;
  35204. break;
  35205. }
  35206. }
  35207. }
  35208. return currentIndex;
  35209. }
  35210. function findPieChartCurrentIndex(currentPoints, pieData, opts) {
  35211. var currentIndex = -1;
  35212. var series = getPieDataPoints(pieData.series);
  35213. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  35214. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  35215. angle = -angle;
  35216. if (opts.extra.pie && opts.extra.pie.offsetAngle) {
  35217. angle = angle - opts.extra.pie.offsetAngle * Math.PI / 180;
  35218. }
  35219. if (opts.extra.ring && opts.extra.ring.offsetAngle) {
  35220. angle = angle - opts.extra.ring.offsetAngle * Math.PI / 180;
  35221. }
  35222. for (var i = 0, len = series.length; i < len; i++) {
  35223. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._proportion_ * 2 * Math.PI)) {
  35224. currentIndex = i;
  35225. break;
  35226. }
  35227. }
  35228. }
  35229. return currentIndex;
  35230. }
  35231. function isInExactPieChartArea(currentPoints, center, radius) {
  35232. return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
  35233. }
  35234. function splitPoints(points, eachSeries) {
  35235. var newPoints = [];
  35236. var items = [];
  35237. points.forEach(function (item, index) {
  35238. if (eachSeries.connectNulls) {
  35239. if (item !== null) {
  35240. items.push(item);
  35241. }
  35242. } else {
  35243. if (item !== null) {
  35244. items.push(item);
  35245. } else {
  35246. if (items.length) {
  35247. newPoints.push(items);
  35248. }
  35249. items = [];
  35250. }
  35251. }
  35252. });
  35253. if (items.length) {
  35254. newPoints.push(items);
  35255. }
  35256. return newPoints;
  35257. }
  35258. function calLegendData(series, opts, config, chartData, context) {
  35259. var legendData = {
  35260. area: {
  35261. start: {
  35262. x: 0,
  35263. y: 0
  35264. },
  35265. end: {
  35266. x: 0,
  35267. y: 0
  35268. },
  35269. width: 0,
  35270. height: 0,
  35271. wholeWidth: 0,
  35272. wholeHeight: 0
  35273. },
  35274. points: [],
  35275. widthArr: [],
  35276. heightArr: []
  35277. };
  35278. if (opts.legend.show === false) {
  35279. chartData.legendData = legendData;
  35280. return legendData;
  35281. }
  35282. var padding = opts.legend.padding * opts.pix;
  35283. var margin = opts.legend.margin * opts.pix;
  35284. var fontSize = opts.legend.fontSize ? opts.legend.fontSize * opts.pix : config.fontSize;
  35285. var shapeWidth = 15 * opts.pix;
  35286. var shapeRight = 5 * opts.pix;
  35287. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  35288. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  35289. var legendList = [];
  35290. var widthCount = 0;
  35291. var widthCountArr = [];
  35292. var currentRow = [];
  35293. for (var i = 0; i < series.length; i++) {
  35294. var item = series[i];
  35295. var itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  35296. if (widthCount + itemWidth > opts.width - opts.area[1] - opts.area[3]) {
  35297. legendList.push(currentRow);
  35298. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  35299. widthCount = itemWidth;
  35300. currentRow = [item];
  35301. } else {
  35302. widthCount += itemWidth;
  35303. currentRow.push(item);
  35304. }
  35305. }
  35306. if (currentRow.length) {
  35307. legendList.push(currentRow);
  35308. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  35309. legendData.widthArr = widthCountArr;
  35310. var legendWidth = Math.max.apply(null, widthCountArr);
  35311. switch (opts.legend.float) {
  35312. case 'left':
  35313. legendData.area.start.x = opts.area[3];
  35314. legendData.area.end.x = opts.area[3] + legendWidth + 2 * padding;
  35315. break;
  35316. case 'right':
  35317. legendData.area.start.x = opts.width - opts.area[1] - legendWidth - 2 * padding;
  35318. legendData.area.end.x = opts.width - opts.area[1];
  35319. break;
  35320. default:
  35321. legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
  35322. legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
  35323. }
  35324. legendData.area.width = legendWidth + 2 * padding;
  35325. legendData.area.wholeWidth = legendWidth + 2 * padding;
  35326. legendData.area.height = legendList.length * lineHeight + 2 * padding;
  35327. legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
  35328. legendData.points = legendList;
  35329. }
  35330. } else {
  35331. var len = series.length;
  35332. var maxHeight = opts.height - opts.area[0] - opts.area[2] - 2 * margin - 2 * padding;
  35333. var maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
  35334. legendData.area.height = maxLength * lineHeight + padding * 2;
  35335. legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
  35336. switch (opts.legend.float) {
  35337. case 'top':
  35338. legendData.area.start.y = opts.area[0] + margin;
  35339. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  35340. break;
  35341. case 'bottom':
  35342. legendData.area.start.y = opts.height - opts.area[2] - margin - legendData.area.height;
  35343. legendData.area.end.y = opts.height - opts.area[2] - margin;
  35344. break;
  35345. default:
  35346. legendData.area.start.y = (opts.height - legendData.area.height) / 2;
  35347. legendData.area.end.y = (opts.height + legendData.area.height) / 2;
  35348. }
  35349. var lineNum = len % maxLength === 0 ? len / maxLength : Math.floor(len / maxLength + 1);
  35350. var _currentRow = [];
  35351. for (var _i5 = 0; _i5 < lineNum; _i5++) {
  35352. var temp = series.slice(_i5 * maxLength, _i5 * maxLength + maxLength);
  35353. _currentRow.push(temp);
  35354. }
  35355. legendData.points = _currentRow;
  35356. if (_currentRow.length) {
  35357. for (var _i6 = 0; _i6 < _currentRow.length; _i6++) {
  35358. var _item = _currentRow[_i6];
  35359. var maxWidth = 0;
  35360. for (var j = 0; j < _item.length; j++) {
  35361. var _itemWidth = shapeWidth + shapeRight + measureText(_item[j].name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  35362. if (_itemWidth > maxWidth) {
  35363. maxWidth = _itemWidth;
  35364. }
  35365. }
  35366. legendData.widthArr.push(maxWidth);
  35367. legendData.heightArr.push(_item.length * lineHeight + padding * 2);
  35368. }
  35369. var _legendWidth = 0;
  35370. for (var _i7 = 0; _i7 < legendData.widthArr.length; _i7++) {
  35371. _legendWidth += legendData.widthArr[_i7];
  35372. }
  35373. legendData.area.width = _legendWidth - opts.legend.itemGap * opts.pix + 2 * padding;
  35374. legendData.area.wholeWidth = legendData.area.width + padding;
  35375. }
  35376. }
  35377. switch (opts.legend.position) {
  35378. case 'top':
  35379. legendData.area.start.y = opts.area[0] + margin;
  35380. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  35381. break;
  35382. case 'bottom':
  35383. legendData.area.start.y = opts.height - opts.area[2] - legendData.area.height - margin;
  35384. legendData.area.end.y = opts.height - opts.area[2] - margin;
  35385. break;
  35386. case 'left':
  35387. legendData.area.start.x = opts.area[3];
  35388. legendData.area.end.x = opts.area[3] + legendData.area.width;
  35389. break;
  35390. case 'right':
  35391. legendData.area.start.x = opts.width - opts.area[1] - legendData.area.width;
  35392. legendData.area.end.x = opts.width - opts.area[1];
  35393. break;
  35394. }
  35395. chartData.legendData = legendData;
  35396. return legendData;
  35397. }
  35398. function calCategoriesData(categories, opts, config, eachSpacing, context) {
  35399. var result = {
  35400. angle: 0,
  35401. xAxisHeight: config.xAxisHeight
  35402. };
  35403. var categoriesTextLenth = categories.map(function (item) {
  35404. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  35405. });
  35406. var maxTextLength = Math.max.apply(this, categoriesTextLenth);
  35407. if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  35408. result.angle = 45 * Math.PI / 180;
  35409. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  35410. }
  35411. return result;
  35412. }
  35413. function getXAxisTextList(series, opts, config, stack) {
  35414. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  35415. var data;
  35416. if (stack == 'stack') {
  35417. data = dataCombineStack(series, opts.categories.length);
  35418. } else {
  35419. data = dataCombine(series);
  35420. }
  35421. var sorted = [];
  35422. // remove null from data
  35423. data = data.filter(function (item) {
  35424. //return item !== null;
  35425. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35426. if (item.constructor.toString().indexOf('Array') > -1) {
  35427. return item !== null;
  35428. } else {
  35429. return item.value !== null;
  35430. }
  35431. } else {
  35432. return item !== null;
  35433. }
  35434. });
  35435. data.map(function (item) {
  35436. if ((0, _typeof2.default)(item) === 'object') {
  35437. if (item.constructor.toString().indexOf('Array') > -1) {
  35438. if (opts.type == 'candle') {
  35439. item.map(function (subitem) {
  35440. sorted.push(subitem);
  35441. });
  35442. } else {
  35443. sorted.push(item[0]);
  35444. }
  35445. } else {
  35446. sorted.push(item.value);
  35447. }
  35448. } else {
  35449. sorted.push(item);
  35450. }
  35451. });
  35452. var minData = 0;
  35453. var maxData = 0;
  35454. if (sorted.length > 0) {
  35455. minData = Math.min.apply(this, sorted);
  35456. maxData = Math.max.apply(this, sorted);
  35457. }
  35458. //为了兼容v1.9.0之前的项目
  35459. if (index > -1) {
  35460. if (typeof opts.xAxis.data[index].min === 'number') {
  35461. minData = Math.min(opts.xAxis.data[index].min, minData);
  35462. }
  35463. if (typeof opts.xAxis.data[index].max === 'number') {
  35464. maxData = Math.max(opts.xAxis.data[index].max, maxData);
  35465. }
  35466. } else {
  35467. if (typeof opts.xAxis.min === 'number') {
  35468. minData = Math.min(opts.xAxis.min, minData);
  35469. }
  35470. if (typeof opts.xAxis.max === 'number') {
  35471. maxData = Math.max(opts.xAxis.max, maxData);
  35472. }
  35473. }
  35474. if (minData === maxData) {
  35475. var rangeSpan = maxData || 10;
  35476. maxData += rangeSpan;
  35477. }
  35478. //var dataRange = getDataRange(minData, maxData);
  35479. var minRange = minData;
  35480. var maxRange = maxData;
  35481. var range = [];
  35482. var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
  35483. for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
  35484. range.push(minRange + eachRange * i);
  35485. }
  35486. return range;
  35487. }
  35488. function calXAxisData(series, opts, config, context) {
  35489. //堆叠图重算Y轴
  35490. var columnstyle = assign({}, {
  35491. type: ""
  35492. }, opts.extra.bar);
  35493. var result = {
  35494. angle: 0,
  35495. xAxisHeight: config.xAxisHeight
  35496. };
  35497. result.ranges = getXAxisTextList(series, opts, config, columnstyle.type);
  35498. result.rangesFormat = result.ranges.map(function (item) {
  35499. //item = opts.xAxis.formatter ? opts.xAxis.formatter(item) : util.toFixed(item, 2);
  35500. item = util.toFixed(item, 2);
  35501. return item;
  35502. });
  35503. var xAxisScaleValues = result.ranges.map(function (item) {
  35504. // 如果刻度值是浮点数,则保留两位小数
  35505. item = util.toFixed(item, 2);
  35506. // 若有自定义格式则调用自定义的格式化函数
  35507. //item = opts.xAxis.formatter ? opts.xAxis.formatter(Number(item)) : item;
  35508. return item;
  35509. });
  35510. result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
  35511. // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
  35512. var eachSpacing = result.eachSpacing;
  35513. var textLength = xAxisScaleValues.map(function (item) {
  35514. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  35515. });
  35516. // get max length of categories text
  35517. var maxTextLength = Math.max.apply(this, textLength);
  35518. // 如果刻度值文本内容过长,则将其逆时针旋转45°
  35519. if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  35520. result.angle = 45 * Math.PI / 180;
  35521. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  35522. }
  35523. if (opts.xAxis.disabled === true) {
  35524. result.xAxisHeight = 0;
  35525. }
  35526. return result;
  35527. }
  35528. function getRadarDataPoints(angleList, center, radius, series, opts) {
  35529. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  35530. var radarOption = opts.extra.radar || {};
  35531. radarOption.max = radarOption.max || 0;
  35532. var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
  35533. var data = [];
  35534. var _loop2 = function _loop2(i) {
  35535. var each = series[i];
  35536. var listItem = {};
  35537. listItem.color = each.color;
  35538. listItem.legendShape = each.legendShape;
  35539. listItem.pointShape = each.pointShape;
  35540. listItem.data = [];
  35541. each.data.forEach(function (item, index) {
  35542. var tmp = {};
  35543. tmp.angle = angleList[index];
  35544. tmp.proportion = item / maxData;
  35545. tmp.value = item;
  35546. tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
  35547. listItem.data.push(tmp);
  35548. });
  35549. data.push(listItem);
  35550. };
  35551. for (var i = 0; i < series.length; i++) {
  35552. _loop2(i);
  35553. }
  35554. return data;
  35555. }
  35556. function getPieDataPoints(series, radius) {
  35557. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  35558. var count = 0;
  35559. var _start_ = 0;
  35560. for (var i = 0; i < series.length; i++) {
  35561. var item = series[i];
  35562. item.data = item.data === null ? 0 : item.data;
  35563. count += item.data;
  35564. }
  35565. for (var _i8 = 0; _i8 < series.length; _i8++) {
  35566. var _item2 = series[_i8];
  35567. _item2.data = _item2.data === null ? 0 : _item2.data;
  35568. if (count === 0) {
  35569. _item2._proportion_ = 1 / series.length * process;
  35570. } else {
  35571. _item2._proportion_ = _item2.data / count * process;
  35572. }
  35573. _item2._radius_ = radius;
  35574. }
  35575. for (var _i9 = 0; _i9 < series.length; _i9++) {
  35576. var _item3 = series[_i9];
  35577. _item3._start_ = _start_;
  35578. _start_ += 2 * _item3._proportion_ * Math.PI;
  35579. }
  35580. return series;
  35581. }
  35582. function getFunnelDataPoints(series, radius, type, eachSpacing) {
  35583. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  35584. series = series.sort(function (a, b) {
  35585. return parseInt(b.data) - parseInt(a.data);
  35586. });
  35587. for (var i = 0; i < series.length; i++) {
  35588. if (type == 'funnel') {
  35589. series[i].radius = series[i].data / series[0].data * radius * process;
  35590. } else {
  35591. series[i].radius = eachSpacing * (series.length - i) / (eachSpacing * series.length) * radius * process;
  35592. }
  35593. series[i]._proportion_ = series[i].data / series[0].data;
  35594. }
  35595. if (type !== 'pyramid') {
  35596. series.reverse();
  35597. }
  35598. return series;
  35599. }
  35600. function getRoseDataPoints(series, type, minRadius, radius) {
  35601. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  35602. var count = 0;
  35603. var _start_ = 0;
  35604. var dataArr = [];
  35605. for (var i = 0; i < series.length; i++) {
  35606. var item = series[i];
  35607. item.data = item.data === null ? 0 : item.data;
  35608. count += item.data;
  35609. dataArr.push(item.data);
  35610. }
  35611. var minData = Math.min.apply(null, dataArr);
  35612. var maxData = Math.max.apply(null, dataArr);
  35613. var radiusLength = radius - minRadius;
  35614. for (var _i10 = 0; _i10 < series.length; _i10++) {
  35615. var _item4 = series[_i10];
  35616. _item4.data = _item4.data === null ? 0 : _item4.data;
  35617. if (count === 0) {
  35618. _item4._proportion_ = 1 / series.length * process;
  35619. _item4._rose_proportion_ = 1 / series.length * process;
  35620. } else {
  35621. _item4._proportion_ = _item4.data / count * process;
  35622. if (type == 'area') {
  35623. _item4._rose_proportion_ = 1 / series.length * process;
  35624. } else {
  35625. _item4._rose_proportion_ = _item4.data / count * process;
  35626. }
  35627. }
  35628. _item4._radius_ = minRadius + radiusLength * ((_item4.data - minData) / (maxData - minData)) || radius;
  35629. }
  35630. for (var _i11 = 0; _i11 < series.length; _i11++) {
  35631. var _item5 = series[_i11];
  35632. _item5._start_ = _start_;
  35633. _start_ += 2 * _item5._rose_proportion_ * Math.PI;
  35634. }
  35635. return series;
  35636. }
  35637. function getArcbarDataPoints(series, arcbarOption) {
  35638. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  35639. if (process == 1) {
  35640. process = 0.999999;
  35641. }
  35642. for (var i = 0; i < series.length; i++) {
  35643. var item = series[i];
  35644. item.data = item.data === null ? 0 : item.data;
  35645. var totalAngle = void 0;
  35646. if (arcbarOption.type == 'circle') {
  35647. totalAngle = 2;
  35648. } else {
  35649. if (arcbarOption.endAngle < arcbarOption.startAngle) {
  35650. totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
  35651. } else {
  35652. totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
  35653. }
  35654. }
  35655. item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
  35656. if (item._proportion_ >= 2) {
  35657. item._proportion_ = item._proportion_ % 2;
  35658. }
  35659. }
  35660. return series;
  35661. }
  35662. function getGaugeAxisPoints(categories, startAngle, endAngle) {
  35663. var totalAngle = startAngle - endAngle + 1;
  35664. var tempStartAngle = startAngle;
  35665. for (var i = 0; i < categories.length; i++) {
  35666. categories[i].value = categories[i].value === null ? 0 : categories[i].value;
  35667. categories[i]._startAngle_ = tempStartAngle;
  35668. categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
  35669. if (categories[i]._endAngle_ >= 2) {
  35670. categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
  35671. }
  35672. tempStartAngle = categories[i]._endAngle_;
  35673. }
  35674. return categories;
  35675. }
  35676. function getGaugeDataPoints(series, categories, gaugeOption) {
  35677. var process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  35678. for (var i = 0; i < series.length; i++) {
  35679. var item = series[i];
  35680. item.data = item.data === null ? 0 : item.data;
  35681. if (gaugeOption.pointer.color == 'auto') {
  35682. for (var _i12 = 0; _i12 < categories.length; _i12++) {
  35683. if (item.data <= categories[_i12].value) {
  35684. item.color = categories[_i12].color;
  35685. break;
  35686. }
  35687. }
  35688. } else {
  35689. item.color = gaugeOption.pointer.color;
  35690. }
  35691. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  35692. item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
  35693. item._oldAngle_ = gaugeOption.oldAngle;
  35694. if (gaugeOption.oldAngle < gaugeOption.endAngle) {
  35695. item._oldAngle_ += 2;
  35696. }
  35697. if (item.data >= gaugeOption.oldData) {
  35698. item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
  35699. } else {
  35700. item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
  35701. }
  35702. if (item._proportion_ >= 2) {
  35703. item._proportion_ = item._proportion_ % 2;
  35704. }
  35705. }
  35706. return series;
  35707. }
  35708. function getPieTextMaxLength(series, config, context, opts) {
  35709. series = getPieDataPoints(series);
  35710. var maxLength = 0;
  35711. for (var i = 0; i < series.length; i++) {
  35712. var item = series[i];
  35713. var text = item.formatter ? item.formatter(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  35714. maxLength = Math.max(maxLength, measureText(text, item.textSize * opts.pix || config.fontSize, context));
  35715. }
  35716. return maxLength;
  35717. }
  35718. function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
  35719. return points.map(function (item) {
  35720. if (item === null) {
  35721. return null;
  35722. }
  35723. var seriesGap = 0;
  35724. var categoryGap = 0;
  35725. if (opts.type == 'mix') {
  35726. seriesGap = opts.extra.mix.column.seriesGap * opts.pix || 0;
  35727. categoryGap = opts.extra.mix.column.categoryGap * opts.pix || 0;
  35728. } else {
  35729. seriesGap = opts.extra.column.seriesGap * opts.pix || 0;
  35730. categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35731. }
  35732. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  35733. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  35734. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  35735. if (opts.extra.mix && opts.extra.mix.column.width && +opts.extra.mix.column.width > 0) {
  35736. item.width = Math.min(item.width, +opts.extra.mix.column.width * opts.pix);
  35737. }
  35738. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35739. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35740. }
  35741. if (item.width <= 0) {
  35742. item.width = 1;
  35743. }
  35744. item.x += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  35745. return item;
  35746. });
  35747. }
  35748. function fixBarData(points, eachSpacing, columnLen, index, config, opts) {
  35749. return points.map(function (item) {
  35750. if (item === null) {
  35751. return null;
  35752. }
  35753. var seriesGap = 0;
  35754. var categoryGap = 0;
  35755. seriesGap = opts.extra.bar.seriesGap * opts.pix || 0;
  35756. categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  35757. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  35758. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  35759. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  35760. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  35761. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  35762. }
  35763. if (item.width <= 0) {
  35764. item.width = 1;
  35765. }
  35766. item.y += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  35767. return item;
  35768. });
  35769. }
  35770. function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
  35771. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35772. return points.map(function (item) {
  35773. if (item === null) {
  35774. return null;
  35775. }
  35776. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35777. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35778. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35779. }
  35780. if (index > 0) {
  35781. item.width -= 2 * border;
  35782. }
  35783. return item;
  35784. });
  35785. }
  35786. function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  35787. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35788. return points.map(function (item, indexn) {
  35789. if (item === null) {
  35790. return null;
  35791. }
  35792. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35793. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35794. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35795. }
  35796. if (item.width <= 0) {
  35797. item.width = 1;
  35798. }
  35799. return item;
  35800. });
  35801. }
  35802. function fixBarStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  35803. var categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  35804. return points.map(function (item, indexn) {
  35805. if (item === null) {
  35806. return null;
  35807. }
  35808. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35809. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  35810. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  35811. }
  35812. if (item.width <= 0) {
  35813. item.width = 1;
  35814. }
  35815. return item;
  35816. });
  35817. }
  35818. function getXAxisPoints(categories, opts, config) {
  35819. var spacingValid = opts.width - opts.area[1] - opts.area[3];
  35820. var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
  35821. if ((opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble' || opts.type == 'bar') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
  35822. dataCount -= 1;
  35823. }
  35824. var eachSpacing = spacingValid / dataCount;
  35825. var xAxisPoints = [];
  35826. var startX = opts.area[3];
  35827. var endX = opts.width - opts.area[1];
  35828. categories.forEach(function (item, index) {
  35829. xAxisPoints.push(startX + index * eachSpacing);
  35830. });
  35831. if (opts.xAxis.boundaryGap !== 'justify') {
  35832. if (opts.enableScroll === true) {
  35833. xAxisPoints.push(startX + categories.length * eachSpacing);
  35834. } else {
  35835. xAxisPoints.push(endX);
  35836. }
  35837. }
  35838. return {
  35839. xAxisPoints: xAxisPoints,
  35840. startX: startX,
  35841. endX: endX,
  35842. eachSpacing: eachSpacing
  35843. };
  35844. }
  35845. function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35846. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35847. var points = [];
  35848. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35849. data.forEach(function (item, index) {
  35850. if (item === null) {
  35851. points.push(null);
  35852. } else {
  35853. var cPoints = [];
  35854. item.forEach(function (items, indexs) {
  35855. var point = {};
  35856. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35857. var value = items.value || items;
  35858. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35859. height *= process;
  35860. point.y = opts.height - Math.round(height) - opts.area[2];
  35861. cPoints.push(point);
  35862. });
  35863. points.push(cPoints);
  35864. }
  35865. });
  35866. return points;
  35867. }
  35868. function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35869. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35870. var boundaryGap = 'center';
  35871. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  35872. boundaryGap = opts.xAxis.boundaryGap;
  35873. }
  35874. var points = [];
  35875. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35876. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35877. data.forEach(function (item, index) {
  35878. if (item === null) {
  35879. points.push(null);
  35880. } else {
  35881. var point = {};
  35882. point.color = item.color;
  35883. point.x = xAxisPoints[index];
  35884. var value = item;
  35885. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35886. if (item.constructor.toString().indexOf('Array') > -1) {
  35887. var xranges, xminRange, xmaxRange;
  35888. xranges = [].concat(opts.chartData.xAxisData.ranges);
  35889. xminRange = xranges.shift();
  35890. xmaxRange = xranges.pop();
  35891. value = item[1];
  35892. point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
  35893. if (opts.type == 'bubble') {
  35894. point.r = item[2];
  35895. point.t = item[3];
  35896. }
  35897. } else {
  35898. value = item.value;
  35899. }
  35900. }
  35901. if (boundaryGap == 'center') {
  35902. point.x += eachSpacing / 2;
  35903. }
  35904. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35905. height *= process;
  35906. point.y = opts.height - height - opts.area[2];
  35907. points.push(point);
  35908. }
  35909. });
  35910. return points;
  35911. }
  35912. function getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config) {
  35913. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35914. var points = [];
  35915. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35916. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35917. data.forEach(function (item, index) {
  35918. if (item === null) {
  35919. points.push(null);
  35920. } else {
  35921. var point = {};
  35922. point.color = item.color;
  35923. point.y = yAxisPoints[index];
  35924. var value = item;
  35925. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35926. value = item.value;
  35927. }
  35928. var height = validWidth * (value - minRange) / (maxRange - minRange);
  35929. height *= process;
  35930. point.height = height;
  35931. point.value = value;
  35932. point.x = height + opts.area[3];
  35933. points.push(point);
  35934. }
  35935. });
  35936. return points;
  35937. }
  35938. function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35939. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35940. var points = [];
  35941. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35942. data.forEach(function (item, index) {
  35943. if (item === null) {
  35944. points.push(null);
  35945. } else {
  35946. var point = {};
  35947. point.color = item.color;
  35948. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35949. if (seriesIndex > 0) {
  35950. var value = 0;
  35951. for (var i = 0; i <= seriesIndex; i++) {
  35952. value += stackSeries[i].data[index];
  35953. }
  35954. var value0 = value - item;
  35955. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35956. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35957. } else {
  35958. var value = item;
  35959. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35960. var height0 = 0;
  35961. }
  35962. var heightc = height0;
  35963. height *= process;
  35964. heightc *= process;
  35965. point.y = opts.height - Math.round(height) - opts.area[2];
  35966. point.y0 = opts.height - Math.round(heightc) - opts.area[2];
  35967. points.push(point);
  35968. }
  35969. });
  35970. return points;
  35971. }
  35972. function getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35973. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35974. var points = [];
  35975. var validHeight = opts.width - opts.area[1] - opts.area[3];
  35976. data.forEach(function (item, index) {
  35977. if (item === null) {
  35978. points.push(null);
  35979. } else {
  35980. var point = {};
  35981. point.color = item.color;
  35982. point.y = yAxisPoints[index];
  35983. if (seriesIndex > 0) {
  35984. var value = 0;
  35985. for (var i = 0; i <= seriesIndex; i++) {
  35986. value += stackSeries[i].data[index];
  35987. }
  35988. var value0 = value - item;
  35989. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35990. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35991. } else {
  35992. var value = item;
  35993. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35994. var height0 = 0;
  35995. }
  35996. var heightc = height0;
  35997. height *= process;
  35998. heightc *= process;
  35999. point.height = height - heightc;
  36000. point.x = opts.area[3] + height;
  36001. point.x0 = opts.area[3] + heightc;
  36002. points.push(point);
  36003. }
  36004. });
  36005. return points;
  36006. }
  36007. function getYAxisTextList(series, opts, config, stack, yData) {
  36008. var index = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : -1;
  36009. var data;
  36010. if (stack == 'stack') {
  36011. data = dataCombineStack(series, opts.categories.length);
  36012. } else {
  36013. data = dataCombine(series);
  36014. }
  36015. var sorted = [];
  36016. // remove null from data
  36017. data = data.filter(function (item) {
  36018. //return item !== null;
  36019. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  36020. if (item.constructor.toString().indexOf('Array') > -1) {
  36021. return item !== null;
  36022. } else {
  36023. return item.value !== null;
  36024. }
  36025. } else {
  36026. return item !== null;
  36027. }
  36028. });
  36029. data.map(function (item) {
  36030. if ((0, _typeof2.default)(item) === 'object') {
  36031. if (item.constructor.toString().indexOf('Array') > -1) {
  36032. if (opts.type == 'candle') {
  36033. item.map(function (subitem) {
  36034. sorted.push(subitem);
  36035. });
  36036. } else {
  36037. sorted.push(item[1]);
  36038. }
  36039. } else {
  36040. sorted.push(item.value);
  36041. }
  36042. } else {
  36043. sorted.push(item);
  36044. }
  36045. });
  36046. var minData = yData.min || 0;
  36047. var maxData = yData.max || 0;
  36048. if (sorted.length > 0) {
  36049. minData = Math.min.apply(this, sorted);
  36050. maxData = Math.max.apply(this, sorted);
  36051. }
  36052. //为了兼容v1.9.0之前的项目
  36053. // if (index > -1) {
  36054. // if (typeof opts.yAxis.data[index].min === 'number') {
  36055. // minData = Math.min(opts.yAxis.data[index].min, minData);
  36056. // }
  36057. // if (typeof opts.yAxis.data[index].max === 'number') {
  36058. // maxData = Math.max(opts.yAxis.data[index].max, maxData);
  36059. // }
  36060. // } else {
  36061. // if (typeof opts.yAxis.min === 'number') {
  36062. // minData = Math.min(opts.yAxis.min, minData);
  36063. // }
  36064. // if (typeof opts.yAxis.max === 'number') {
  36065. // maxData = Math.max(opts.yAxis.max, maxData);
  36066. // }
  36067. // }
  36068. if (minData === maxData) {
  36069. var rangeSpan = maxData || 10;
  36070. maxData += rangeSpan;
  36071. }
  36072. var dataRange = getDataRange(minData, maxData);
  36073. var minRange = yData.min === undefined || yData.min === null ? dataRange.minRange : yData.min;
  36074. var maxRange = yData.max === undefined || yData.min === null ? dataRange.maxRange : yData.max;
  36075. var range = [];
  36076. var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
  36077. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  36078. range.push(minRange + eachRange * i);
  36079. }
  36080. return range.reverse();
  36081. }
  36082. function calYAxisData(series, opts, config, context) {
  36083. //堆叠图重算Y轴
  36084. var columnstyle = assign({}, {
  36085. type: ""
  36086. }, opts.extra.column);
  36087. //如果是多Y轴,重新计算
  36088. var YLength = opts.yAxis.data.length;
  36089. var newSeries = new Array(YLength);
  36090. if (YLength > 0) {
  36091. for (var i = 0; i < YLength; i++) {
  36092. newSeries[i] = [];
  36093. for (var j = 0; j < series.length; j++) {
  36094. if (series[j].index == i) {
  36095. newSeries[i].push(series[j]);
  36096. }
  36097. }
  36098. }
  36099. var rangesArr = new Array(YLength);
  36100. var rangesFormatArr = new Array(YLength);
  36101. var yAxisWidthArr = new Array(YLength);
  36102. var _loop3 = function _loop3(_i13) {
  36103. var yData = opts.yAxis.data[_i13];
  36104. //如果总开关不显示,强制每个Y轴为不显示
  36105. if (opts.yAxis.disabled == true) {
  36106. yData.disabled = true;
  36107. }
  36108. if (yData.type === 'categories') {
  36109. if (!yData.formatter) {
  36110. yData.formatter = function (val) {
  36111. return val + (yData.unit || '');
  36112. };
  36113. }
  36114. yData.categories = yData.categories || opts.categories;
  36115. rangesArr[_i13] = yData.categories;
  36116. } else {
  36117. if (!yData.formatter) {
  36118. yData.formatter = function (val) {
  36119. return val.toFixed(yData.tofix) + (yData.unit || '');
  36120. };
  36121. }
  36122. rangesArr[_i13] = getYAxisTextList(newSeries[_i13], opts, config, columnstyle.type, yData, _i13);
  36123. }
  36124. var yAxisFontSizes = yData.fontSize * opts.pix || config.fontSize;
  36125. yAxisWidthArr[_i13] = {
  36126. position: yData.position ? yData.position : 'left',
  36127. width: 0
  36128. };
  36129. rangesFormatArr[_i13] = rangesArr[_i13].map(function (items) {
  36130. items = yData.formatter(items);
  36131. yAxisWidthArr[_i13].width = Math.max(yAxisWidthArr[_i13].width, measureText(items, yAxisFontSizes, context) + 5);
  36132. return items;
  36133. });
  36134. var calibration = yData.calibration ? 4 * opts.pix : 0;
  36135. yAxisWidthArr[_i13].width += calibration + 3 * opts.pix;
  36136. if (yData.disabled === true) {
  36137. yAxisWidthArr[_i13].width = 0;
  36138. }
  36139. };
  36140. for (var _i13 = 0; _i13 < YLength; _i13++) {
  36141. _loop3(_i13);
  36142. }
  36143. } else {
  36144. var rangesArr = new Array(1);
  36145. var rangesFormatArr = new Array(1);
  36146. var yAxisWidthArr = new Array(1);
  36147. if (opts.type === 'bar') {
  36148. rangesArr[0] = opts.categories;
  36149. if (!opts.yAxis.formatter) {
  36150. opts.yAxis.formatter = function (val) {
  36151. return val + (opts.yAxis.unit || '');
  36152. };
  36153. }
  36154. } else {
  36155. if (!opts.yAxis.formatter) {
  36156. opts.yAxis.formatter = function (val) {
  36157. return val.toFixed(opts.yAxis.tofix) + (opts.yAxis.unit || '');
  36158. };
  36159. }
  36160. rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type, {});
  36161. }
  36162. yAxisWidthArr[0] = {
  36163. position: 'left',
  36164. width: 0
  36165. };
  36166. var yAxisFontSize = opts.yAxis.fontSize * opts.pix || config.fontSize;
  36167. rangesFormatArr[0] = rangesArr[0].map(function (item) {
  36168. item = opts.yAxis.formatter(item);
  36169. yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize, context) + 5);
  36170. return item;
  36171. });
  36172. yAxisWidthArr[0].width += 3 * opts.pix;
  36173. if (opts.yAxis.disabled === true) {
  36174. yAxisWidthArr[0] = {
  36175. position: 'left',
  36176. width: 0
  36177. };
  36178. opts.yAxis.data[0] = {
  36179. disabled: true
  36180. };
  36181. } else {
  36182. opts.yAxis.data[0] = {
  36183. disabled: false,
  36184. position: 'left',
  36185. max: opts.yAxis.max,
  36186. min: opts.yAxis.min,
  36187. formatter: opts.yAxis.formatter
  36188. };
  36189. if (opts.type === 'bar') {
  36190. opts.yAxis.data[0].categories = opts.categories;
  36191. opts.yAxis.data[0].type = 'categories';
  36192. }
  36193. }
  36194. }
  36195. return {
  36196. rangesFormat: rangesFormatArr,
  36197. ranges: rangesArr,
  36198. yAxisWidth: yAxisWidthArr
  36199. };
  36200. }
  36201. function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
  36202. var ranges = [].concat(opts.chartData.yAxisData.ranges);
  36203. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  36204. var minAxis = opts.area[0];
  36205. var items = [];
  36206. for (var i = 0; i < ranges.length; i++) {
  36207. var maxVal = ranges[i].shift();
  36208. var minVal = ranges[i].pop();
  36209. var item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
  36210. item = opts.yAxis.data[i].formatter ? opts.yAxis.data[i].formatter(item) : item.toFixed(0);
  36211. items.push(String(item));
  36212. }
  36213. return items;
  36214. }
  36215. function calMarkLineData(points, opts) {
  36216. var minRange, maxRange;
  36217. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  36218. for (var i = 0; i < points.length; i++) {
  36219. points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
  36220. var range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
  36221. minRange = range.pop();
  36222. maxRange = range.shift();
  36223. var height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
  36224. points[i].y = opts.height - Math.round(height) - opts.area[2];
  36225. }
  36226. return points;
  36227. }
  36228. function contextRotate(context, opts) {
  36229. if (opts.rotateLock !== true) {
  36230. context.translate(opts.height, 0);
  36231. context.rotate(90 * Math.PI / 180);
  36232. } else if (opts._rotate_ !== true) {
  36233. context.translate(opts.height, 0);
  36234. context.rotate(90 * Math.PI / 180);
  36235. opts._rotate_ = true;
  36236. }
  36237. }
  36238. function drawPointShape(points, color, shape, context, opts) {
  36239. context.beginPath();
  36240. if (opts.dataPointShapeType == 'hollow') {
  36241. context.setStrokeStyle(color);
  36242. context.setFillStyle(opts.background);
  36243. context.setLineWidth(2 * opts.pix);
  36244. } else {
  36245. context.setStrokeStyle("#ffffff");
  36246. context.setFillStyle(color);
  36247. context.setLineWidth(1 * opts.pix);
  36248. }
  36249. if (shape === 'diamond') {
  36250. points.forEach(function (item, index) {
  36251. if (item !== null) {
  36252. context.moveTo(item.x, item.y - 4.5);
  36253. context.lineTo(item.x - 4.5, item.y);
  36254. context.lineTo(item.x, item.y + 4.5);
  36255. context.lineTo(item.x + 4.5, item.y);
  36256. context.lineTo(item.x, item.y - 4.5);
  36257. }
  36258. });
  36259. } else if (shape === 'circle') {
  36260. points.forEach(function (item, index) {
  36261. if (item !== null) {
  36262. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  36263. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  36264. }
  36265. });
  36266. } else if (shape === 'square') {
  36267. points.forEach(function (item, index) {
  36268. if (item !== null) {
  36269. context.moveTo(item.x - 3.5, item.y - 3.5);
  36270. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  36271. }
  36272. });
  36273. } else if (shape === 'triangle') {
  36274. points.forEach(function (item, index) {
  36275. if (item !== null) {
  36276. context.moveTo(item.x, item.y - 4.5);
  36277. context.lineTo(item.x - 4.5, item.y + 4.5);
  36278. context.lineTo(item.x + 4.5, item.y + 4.5);
  36279. context.lineTo(item.x, item.y - 4.5);
  36280. }
  36281. });
  36282. } else if (shape === 'triangle') {
  36283. return;
  36284. }
  36285. context.closePath();
  36286. context.fill();
  36287. context.stroke();
  36288. }
  36289. function drawRingTitle(opts, config, context, center) {
  36290. var titlefontSize = opts.title.fontSize || config.titleFontSize;
  36291. var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
  36292. var title = opts.title.name || '';
  36293. var subtitle = opts.subtitle.name || '';
  36294. var titleFontColor = opts.title.color || opts.fontColor;
  36295. var subtitleFontColor = opts.subtitle.color || opts.fontColor;
  36296. var titleHeight = title ? titlefontSize : 0;
  36297. var subtitleHeight = subtitle ? subtitlefontSize : 0;
  36298. var margin = 5;
  36299. if (subtitle) {
  36300. var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
  36301. var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix;
  36302. var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
  36303. if (title) {
  36304. startY += (titleHeight * opts.pix + margin) / 2;
  36305. }
  36306. context.beginPath();
  36307. context.setFontSize(subtitlefontSize * opts.pix);
  36308. context.setFillStyle(subtitleFontColor);
  36309. context.fillText(subtitle, startX, startY);
  36310. context.closePath();
  36311. context.stroke();
  36312. }
  36313. if (title) {
  36314. var _textWidth = measureText(title, titlefontSize * opts.pix, context);
  36315. var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
  36316. var _startY = center.y + titlefontSize * opts.pix / 2 + (opts.title.offsetY || 0) * opts.pix;
  36317. if (subtitle) {
  36318. _startY -= (subtitleHeight * opts.pix + margin) / 2;
  36319. }
  36320. context.beginPath();
  36321. context.setFontSize(titlefontSize * opts.pix);
  36322. context.setFillStyle(titleFontColor);
  36323. context.fillText(title, _startX, _startY);
  36324. context.closePath();
  36325. context.stroke();
  36326. }
  36327. }
  36328. function drawPointText(points, series, config, context, opts) {
  36329. // 绘制数据文案
  36330. var data = series.data;
  36331. var textOffset = series.textOffset ? series.textOffset : 0;
  36332. points.forEach(function (item, index) {
  36333. if (item !== null) {
  36334. context.beginPath();
  36335. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  36336. context.setFontSize(fontSize);
  36337. context.setFillStyle(series.textColor || opts.fontColor);
  36338. var value = data[index];
  36339. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  36340. if (data[index].constructor.toString().indexOf('Array') > -1) {
  36341. value = data[index][1];
  36342. } else {
  36343. value = data[index].value;
  36344. }
  36345. }
  36346. var formatVal = series.formatter ? series.formatter(value, index) : value;
  36347. context.setTextAlign('center');
  36348. context.fillText(String(formatVal), item.x, item.y - 4 + textOffset * opts.pix);
  36349. context.closePath();
  36350. context.stroke();
  36351. context.setTextAlign('left');
  36352. }
  36353. });
  36354. }
  36355. function drawBarPointText(points, series, config, context, opts) {
  36356. // 绘制数据文案
  36357. var data = series.data;
  36358. var textOffset = series.textOffset ? series.textOffset : 0;
  36359. points.forEach(function (item, index) {
  36360. if (item !== null) {
  36361. context.beginPath();
  36362. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  36363. context.setFontSize(fontSize);
  36364. context.setFillStyle(series.textColor || opts.fontColor);
  36365. var value = data[index];
  36366. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  36367. value = data[index].value;
  36368. }
  36369. var formatVal = series.formatter ? series.formatter(value, index) : value;
  36370. context.setTextAlign('left');
  36371. context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
  36372. context.closePath();
  36373. context.stroke();
  36374. }
  36375. });
  36376. }
  36377. function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
  36378. radius -= gaugeOption.width / 2 + gaugeOption.labelOffset * opts.pix;
  36379. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  36380. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  36381. var totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
  36382. var splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
  36383. var nowAngle = gaugeOption.startAngle;
  36384. var nowNumber = gaugeOption.startNumber;
  36385. for (var i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
  36386. var pos = {
  36387. x: radius * Math.cos(nowAngle * Math.PI),
  36388. y: radius * Math.sin(nowAngle * Math.PI)
  36389. };
  36390. var labelText = gaugeOption.formatter ? gaugeOption.formatter(nowNumber) : nowNumber;
  36391. pos.x += centerPosition.x - measureText(labelText, config.fontSize, context) / 2;
  36392. pos.y += centerPosition.y;
  36393. var startX = pos.x;
  36394. var startY = pos.y;
  36395. context.beginPath();
  36396. context.setFontSize(config.fontSize);
  36397. context.setFillStyle(gaugeOption.labelColor || opts.fontColor);
  36398. context.fillText(labelText, startX, startY + config.fontSize / 2);
  36399. context.closePath();
  36400. context.stroke();
  36401. nowAngle += splitAngle;
  36402. if (nowAngle >= 2) {
  36403. nowAngle = nowAngle % 2;
  36404. }
  36405. nowNumber += splitNumber;
  36406. }
  36407. }
  36408. function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
  36409. var radarOption = opts.extra.radar || {};
  36410. radius += config.radarLabelTextMargin * opts.pix;
  36411. angleList.forEach(function (angle, index) {
  36412. var pos = {
  36413. x: radius * Math.cos(angle),
  36414. y: radius * Math.sin(angle)
  36415. };
  36416. var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
  36417. var startX = posRelativeCanvas.x;
  36418. var startY = posRelativeCanvas.y;
  36419. if (util.approximatelyEqual(pos.x, 0)) {
  36420. startX -= measureText(opts.categories[index] || '', config.fontSize, context) / 2;
  36421. } else if (pos.x < 0) {
  36422. startX -= measureText(opts.categories[index] || '', config.fontSize, context);
  36423. }
  36424. context.beginPath();
  36425. context.setFontSize(config.fontSize);
  36426. context.setFillStyle(radarOption.labelColor || opts.fontColor);
  36427. context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
  36428. context.closePath();
  36429. context.stroke();
  36430. });
  36431. }
  36432. function drawPieText(series, opts, config, context, radius, center) {
  36433. var lineRadius = config.pieChartLinePadding;
  36434. var textObjectCollection = [];
  36435. var lastTextObject = null;
  36436. var seriesConvert = series.map(function (item, index, series) {
  36437. var text = item.formatter ? item.formatter(item, index, series) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
  36438. var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
  36439. if (item._rose_proportion_) {
  36440. arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._rose_proportion_ / 2);
  36441. }
  36442. var color = item.color;
  36443. var radius = item._radius_;
  36444. return {
  36445. arc: arc,
  36446. text: text,
  36447. color: color,
  36448. radius: radius,
  36449. textColor: item.textColor,
  36450. textSize: item.textSize
  36451. };
  36452. });
  36453. for (var i = 0; i < seriesConvert.length; i++) {
  36454. var item = seriesConvert[i];
  36455. // line end
  36456. var orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
  36457. var orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
  36458. // line start
  36459. var orginX2 = Math.cos(item.arc) * item.radius;
  36460. var orginY2 = Math.sin(item.arc) * item.radius;
  36461. // text start
  36462. var orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
  36463. var orginY3 = orginY1;
  36464. var textWidth = measureText(item.text, item.textSize * opts.pix || config.fontSize, context);
  36465. var startY = orginY3;
  36466. if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
  36467. x: orginX3
  36468. })) {
  36469. if (orginX3 > 0) {
  36470. startY = Math.min(orginY3, lastTextObject.start.y);
  36471. } else if (orginX1 < 0) {
  36472. startY = Math.max(orginY3, lastTextObject.start.y);
  36473. } else {
  36474. if (orginY3 > 0) {
  36475. startY = Math.max(orginY3, lastTextObject.start.y);
  36476. } else {
  36477. startY = Math.min(orginY3, lastTextObject.start.y);
  36478. }
  36479. }
  36480. }
  36481. if (orginX3 < 0) {
  36482. orginX3 -= textWidth;
  36483. }
  36484. var textObject = {
  36485. lineStart: {
  36486. x: orginX2,
  36487. y: orginY2
  36488. },
  36489. lineEnd: {
  36490. x: orginX1,
  36491. y: orginY1
  36492. },
  36493. start: {
  36494. x: orginX3,
  36495. y: startY
  36496. },
  36497. width: textWidth,
  36498. height: config.fontSize,
  36499. text: item.text,
  36500. color: item.color,
  36501. textColor: item.textColor,
  36502. textSize: item.textSize
  36503. };
  36504. lastTextObject = avoidCollision(textObject, lastTextObject);
  36505. textObjectCollection.push(lastTextObject);
  36506. }
  36507. for (var _i14 = 0; _i14 < textObjectCollection.length; _i14++) {
  36508. var _item6 = textObjectCollection[_i14];
  36509. var lineStartPoistion = convertCoordinateOrigin(_item6.lineStart.x, _item6.lineStart.y, center);
  36510. var lineEndPoistion = convertCoordinateOrigin(_item6.lineEnd.x, _item6.lineEnd.y, center);
  36511. var textPosition = convertCoordinateOrigin(_item6.start.x, _item6.start.y, center);
  36512. context.setLineWidth(1 * opts.pix);
  36513. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  36514. context.beginPath();
  36515. context.setStrokeStyle(_item6.color);
  36516. context.setFillStyle(_item6.color);
  36517. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  36518. var curveStartX = _item6.start.x < 0 ? textPosition.x + _item6.width : textPosition.x;
  36519. var textStartX = _item6.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
  36520. context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
  36521. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  36522. context.stroke();
  36523. context.closePath();
  36524. context.beginPath();
  36525. context.moveTo(textPosition.x + _item6.width, textPosition.y);
  36526. context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
  36527. context.closePath();
  36528. context.fill();
  36529. context.beginPath();
  36530. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  36531. context.setFillStyle(_item6.textColor || opts.fontColor);
  36532. context.fillText(_item6.text, textStartX, textPosition.y + 3);
  36533. context.closePath();
  36534. context.stroke();
  36535. context.closePath();
  36536. }
  36537. }
  36538. function drawToolTipSplitLine(offsetX, opts, config, context) {
  36539. var toolTipOption = opts.extra.tooltip || {};
  36540. toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
  36541. toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
  36542. var startY = opts.area[0];
  36543. var endY = opts.height - opts.area[2];
  36544. if (toolTipOption.gridType == 'dash') {
  36545. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  36546. }
  36547. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  36548. context.setLineWidth(1 * opts.pix);
  36549. context.beginPath();
  36550. context.moveTo(offsetX, startY);
  36551. context.lineTo(offsetX, endY);
  36552. context.stroke();
  36553. context.setLineDash([]);
  36554. if (toolTipOption.xAxisLabel) {
  36555. var labelText = opts.categories[opts.tooltip.index];
  36556. context.setFontSize(config.fontSize);
  36557. var textWidth = measureText(labelText, config.fontSize, context);
  36558. var textX = offsetX - 0.5 * textWidth;
  36559. var textY = endY;
  36560. context.beginPath();
  36561. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  36562. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  36563. context.setLineWidth(1 * opts.pix);
  36564. context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
  36565. context.closePath();
  36566. context.stroke();
  36567. context.fill();
  36568. context.beginPath();
  36569. context.setFontSize(config.fontSize);
  36570. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  36571. context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
  36572. context.closePath();
  36573. context.stroke();
  36574. }
  36575. }
  36576. function drawMarkLine(opts, config, context) {
  36577. var markLineOption = assign({}, {
  36578. type: 'solid',
  36579. dashLength: 4,
  36580. data: []
  36581. }, opts.extra.markLine);
  36582. var startX = opts.area[3];
  36583. var endX = opts.width - opts.area[1];
  36584. var points = calMarkLineData(markLineOption.data, opts);
  36585. for (var i = 0; i < points.length; i++) {
  36586. var item = assign({}, {
  36587. lineColor: '#DE4A42',
  36588. showLabel: false,
  36589. labelFontColor: '#666666',
  36590. labelBgColor: '#DFE8FF',
  36591. labelBgOpacity: 0.8,
  36592. yAxisIndex: 0
  36593. }, points[i]);
  36594. if (markLineOption.type == 'dash') {
  36595. context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
  36596. }
  36597. context.setStrokeStyle(item.lineColor);
  36598. context.setLineWidth(1 * opts.pix);
  36599. context.beginPath();
  36600. context.moveTo(startX, item.y);
  36601. context.lineTo(endX, item.y);
  36602. context.stroke();
  36603. context.setLineDash([]);
  36604. if (item.showLabel) {
  36605. var labelText = opts.yAxis.formatter ? opts.yAxis.formatter(item.value) : item.value;
  36606. context.setFontSize(config.fontSize);
  36607. var textWidth = measureText(labelText, config.fontSize, context);
  36608. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[0].width;
  36609. var bgStartX = opts.area[3] - textWidth - config.toolTipPadding * 2;
  36610. var bgEndX = opts.area[3];
  36611. var bgWidth = bgEndX - bgStartX;
  36612. var textX = bgEndX - config.toolTipPadding;
  36613. var textY = item.y;
  36614. context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
  36615. context.setStrokeStyle(item.labelBgColor);
  36616. context.setLineWidth(1 * opts.pix);
  36617. context.beginPath();
  36618. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  36619. context.closePath();
  36620. context.stroke();
  36621. context.fill();
  36622. context.setFontSize(config.fontSize);
  36623. context.setTextAlign('right');
  36624. context.setFillStyle(item.labelFontColor);
  36625. context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
  36626. context.stroke();
  36627. context.setTextAlign('left');
  36628. }
  36629. }
  36630. }
  36631. function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
  36632. var toolTipOption = assign({}, {
  36633. gridType: 'solid',
  36634. dashLength: 4
  36635. }, opts.extra.tooltip);
  36636. var startX = opts.area[3];
  36637. var endX = opts.width - opts.area[1];
  36638. if (toolTipOption.gridType == 'dash') {
  36639. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  36640. }
  36641. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  36642. context.setLineWidth(1 * opts.pix);
  36643. context.beginPath();
  36644. context.moveTo(startX, opts.tooltip.offset.y);
  36645. context.lineTo(endX, opts.tooltip.offset.y);
  36646. context.stroke();
  36647. context.setLineDash([]);
  36648. if (toolTipOption.yAxisLabel) {
  36649. var labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
  36650. var widthArr = opts.chartData.yAxisData.yAxisWidth;
  36651. var tStartLeft = opts.area[3];
  36652. var tStartRight = opts.width - opts.area[1];
  36653. for (var i = 0; i < labelText.length; i++) {
  36654. context.setFontSize(config.fontSize);
  36655. var textWidth = measureText(labelText[i], config.fontSize, context);
  36656. var bgStartX = void 0,
  36657. bgEndX = void 0,
  36658. bgWidth = void 0;
  36659. if (widthArr[i].position == 'left') {
  36660. bgStartX = tStartLeft - widthArr[i].width;
  36661. bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
  36662. } else {
  36663. bgStartX = tStartRight;
  36664. bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
  36665. }
  36666. bgWidth = bgEndX - bgStartX;
  36667. var textX = bgStartX + (bgWidth - textWidth) / 2;
  36668. var textY = opts.tooltip.offset.y;
  36669. context.beginPath();
  36670. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  36671. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  36672. context.setLineWidth(1 * opts.pix);
  36673. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  36674. context.closePath();
  36675. context.stroke();
  36676. context.fill();
  36677. context.beginPath();
  36678. context.setFontSize(config.fontSize);
  36679. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  36680. context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
  36681. context.closePath();
  36682. context.stroke();
  36683. if (widthArr[i].position == 'left') {
  36684. tStartLeft -= widthArr[i].width + opts.yAxis.padding * opts.pix;
  36685. } else {
  36686. tStartRight += widthArr[i].width + opts.yAxis.padding * opts.pix;
  36687. }
  36688. }
  36689. }
  36690. }
  36691. function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  36692. var toolTipOption = assign({}, {
  36693. activeBgColor: '#000000',
  36694. activeBgOpacity: 0.08
  36695. }, opts.extra.column);
  36696. var startY = opts.area[0];
  36697. var endY = opts.height - opts.area[2];
  36698. context.beginPath();
  36699. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  36700. context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
  36701. context.closePath();
  36702. context.fill();
  36703. context.setFillStyle("#FFFFFF");
  36704. }
  36705. function drawBarToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  36706. var toolTipOption = assign({}, {
  36707. activeBgColor: '#000000',
  36708. activeBgOpacity: 0.08
  36709. }, opts.extra.bar);
  36710. var startX = opts.area[3];
  36711. var endX = opts.width - opts.area[1];
  36712. context.beginPath();
  36713. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  36714. context.rect(startX, offsetX - eachSpacing / 2, endX - startX, eachSpacing);
  36715. context.closePath();
  36716. context.fill();
  36717. context.setFillStyle("#FFFFFF");
  36718. }
  36719. function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
  36720. var toolTipOption = assign({}, {
  36721. showBox: true,
  36722. showArrow: true,
  36723. showCategory: false,
  36724. bgColor: '#000000',
  36725. bgOpacity: 0.7,
  36726. borderColor: '#000000',
  36727. borderWidth: 0,
  36728. borderRadius: 0,
  36729. borderOpacity: 0.7,
  36730. fontColor: '#FFFFFF',
  36731. splitLine: true
  36732. }, opts.extra.tooltip);
  36733. if (toolTipOption.showCategory == true && opts.categories) {
  36734. textList.unshift({
  36735. text: opts.categories[opts.tooltip.index],
  36736. color: null
  36737. });
  36738. }
  36739. var legendWidth = 4 * opts.pix;
  36740. var legendMarginRight = 5 * opts.pix;
  36741. var arrowWidth = toolTipOption.showArrow ? 8 * opts.pix : 0;
  36742. var isOverRightBorder = false;
  36743. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
  36744. if (toolTipOption.splitLine == true) {
  36745. drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
  36746. }
  36747. }
  36748. offset = assign({
  36749. x: 0,
  36750. y: 0
  36751. }, offset);
  36752. offset.y -= 8 * opts.pix;
  36753. var textWidth = textList.map(function (item) {
  36754. return measureText(item.text, config.fontSize, context);
  36755. });
  36756. var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
  36757. var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
  36758. if (toolTipOption.showBox == false) {
  36759. return;
  36760. }
  36761. // if beyond the right border
  36762. if (offset.x - Math.abs(opts._scrollDistance_ || 0) + arrowWidth + toolTipWidth > opts.width) {
  36763. isOverRightBorder = true;
  36764. }
  36765. if (toolTipHeight + offset.y > opts.height) {
  36766. offset.y = opts.height - toolTipHeight;
  36767. }
  36768. // draw background rect
  36769. context.beginPath();
  36770. context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
  36771. context.setLineWidth(toolTipOption.borderWidth * opts.pix);
  36772. context.setStrokeStyle(hexToRgb(toolTipOption.borderColor, toolTipOption.borderOpacity));
  36773. var radius = toolTipOption.borderRadius;
  36774. if (isOverRightBorder) {
  36775. if (toolTipOption.showArrow) {
  36776. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  36777. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  36778. }
  36779. context.arc(offset.x - arrowWidth - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  36780. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  36781. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  36782. context.arc(offset.x - arrowWidth - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  36783. if (toolTipOption.showArrow) {
  36784. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  36785. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  36786. }
  36787. } else {
  36788. if (toolTipOption.showArrow) {
  36789. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  36790. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  36791. }
  36792. context.arc(offset.x + arrowWidth + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  36793. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  36794. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  36795. context.arc(offset.x + arrowWidth + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  36796. if (toolTipOption.showArrow) {
  36797. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  36798. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  36799. }
  36800. }
  36801. context.closePath();
  36802. context.fill();
  36803. if (toolTipOption.borderWidth > 0) {
  36804. context.stroke();
  36805. }
  36806. // draw legend
  36807. textList.forEach(function (item, index) {
  36808. if (item.color !== null) {
  36809. context.beginPath();
  36810. context.setFillStyle(item.color);
  36811. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
  36812. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1;
  36813. if (isOverRightBorder) {
  36814. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
  36815. }
  36816. context.fillRect(startX, startY, legendWidth, config.fontSize);
  36817. context.closePath();
  36818. }
  36819. });
  36820. // draw text list
  36821. textList.forEach(function (item, index) {
  36822. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
  36823. if (isOverRightBorder) {
  36824. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
  36825. }
  36826. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding;
  36827. context.beginPath();
  36828. context.setFontSize(config.fontSize);
  36829. context.setFillStyle(toolTipOption.fontColor);
  36830. context.fillText(item.text, startX, startY + config.fontSize);
  36831. context.closePath();
  36832. context.stroke();
  36833. });
  36834. }
  36835. function drawColumnDataPoints(series, opts, config, context) {
  36836. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36837. var xAxisData = opts.chartData.xAxisData,
  36838. xAxisPoints = xAxisData.xAxisPoints,
  36839. eachSpacing = xAxisData.eachSpacing;
  36840. var columnOption = assign({}, {
  36841. type: 'group',
  36842. width: eachSpacing / 2,
  36843. meterBorder: 4,
  36844. meterFillColor: '#FFFFFF',
  36845. barBorderCircle: false,
  36846. barBorderRadius: [],
  36847. seriesGap: 2,
  36848. linearType: 'none',
  36849. linearOpacity: 1,
  36850. customColor: [],
  36851. colorStop: 0
  36852. }, opts.extra.column);
  36853. var calPoints = [];
  36854. context.save();
  36855. var leftNum = -2;
  36856. var rightNum = xAxisPoints.length + 2;
  36857. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36858. context.translate(opts._scrollDistance_, 0);
  36859. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  36860. rightNum = leftNum + opts.xAxis.itemCount + 4;
  36861. }
  36862. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  36863. drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
  36864. }
  36865. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  36866. series.forEach(function (eachSeries, seriesIndex) {
  36867. var ranges, minRange, maxRange;
  36868. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36869. minRange = ranges.pop();
  36870. maxRange = ranges.shift();
  36871. var data = eachSeries.data;
  36872. switch (columnOption.type) {
  36873. case 'group':
  36874. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36875. var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36876. calPoints.push(tooltipPoints);
  36877. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  36878. for (var i = 0; i < points.length; i++) {
  36879. var item = points[i];
  36880. //fix issues/I27B1N yyoinge & Joeshu
  36881. if (item !== null && i > leftNum && i < rightNum) {
  36882. var startX = item.x - item.width / 2;
  36883. var height = opts.height - item.y - opts.area[2];
  36884. context.beginPath();
  36885. var fillColor = item.color || eachSeries.color;
  36886. var strokeColor = item.color || eachSeries.color;
  36887. if (columnOption.linearType !== 'none') {
  36888. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  36889. //透明渐变
  36890. if (columnOption.linearType == 'opacity') {
  36891. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  36892. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36893. } else {
  36894. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36895. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36896. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36897. }
  36898. fillColor = grd;
  36899. }
  36900. // 圆角边框
  36901. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  36902. var left = startX;
  36903. var top = item.y;
  36904. var width = item.width;
  36905. var _height = opts.height - opts.area[2] - item.y;
  36906. if (columnOption.barBorderCircle) {
  36907. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  36908. }
  36909. var _columnOption$barBord = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  36910. r0 = _columnOption$barBord[0],
  36911. r1 = _columnOption$barBord[1],
  36912. r2 = _columnOption$barBord[2],
  36913. r3 = _columnOption$barBord[3];
  36914. var minRadius = Math.min(width / 2, _height / 2);
  36915. r0 = r0 > minRadius ? minRadius : r0;
  36916. r1 = r1 > minRadius ? minRadius : r1;
  36917. r2 = r2 > minRadius ? minRadius : r2;
  36918. r3 = r3 > minRadius ? minRadius : r3;
  36919. r0 = r0 < 0 ? 0 : r0;
  36920. r1 = r1 < 0 ? 0 : r1;
  36921. r2 = r2 < 0 ? 0 : r2;
  36922. r3 = r3 < 0 ? 0 : r3;
  36923. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  36924. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  36925. context.arc(left + width - r2, top + _height - r2, r2, 0, Math.PI / 2);
  36926. context.arc(left + r3, top + _height - r3, r3, Math.PI / 2, Math.PI);
  36927. } else {
  36928. context.moveTo(startX, item.y);
  36929. context.lineTo(startX + item.width - 2, item.y);
  36930. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  36931. context.lineTo(startX, opts.height - opts.area[2]);
  36932. context.lineTo(startX, item.y);
  36933. context.setLineWidth(1);
  36934. context.setStrokeStyle(strokeColor);
  36935. }
  36936. context.setFillStyle(fillColor);
  36937. context.closePath();
  36938. //context.stroke();
  36939. context.fill();
  36940. }
  36941. }
  36942. ;
  36943. break;
  36944. case 'stack':
  36945. // 绘制堆叠数据图
  36946. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36947. calPoints.push(points);
  36948. points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  36949. for (var _i15 = 0; _i15 < points.length; _i15++) {
  36950. var _item7 = points[_i15];
  36951. if (_item7 !== null && _i15 > leftNum && _i15 < rightNum) {
  36952. context.beginPath();
  36953. var fillColor = _item7.color || eachSeries.color;
  36954. var startX = _item7.x - _item7.width / 2 + 1;
  36955. var height = opts.height - _item7.y - opts.area[2];
  36956. var height0 = opts.height - _item7.y0 - opts.area[2];
  36957. if (seriesIndex > 0) {
  36958. height -= height0;
  36959. }
  36960. context.setFillStyle(fillColor);
  36961. context.moveTo(startX, _item7.y);
  36962. context.fillRect(startX, _item7.y, _item7.width - 2, height);
  36963. context.closePath();
  36964. context.fill();
  36965. }
  36966. }
  36967. ;
  36968. break;
  36969. case 'meter':
  36970. // 绘制温度计数据图
  36971. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36972. calPoints.push(points);
  36973. points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meterBorder);
  36974. if (seriesIndex == 0) {
  36975. for (var _i16 = 0; _i16 < points.length; _i16++) {
  36976. var _item8 = points[_i16];
  36977. if (_item8 !== null && _i16 > leftNum && _i16 < rightNum) {
  36978. //画背景颜色
  36979. context.beginPath();
  36980. context.setFillStyle(columnOption.meterFillColor);
  36981. var startX = _item8.x - _item8.width / 2;
  36982. var height = opts.height - _item8.y - opts.area[2];
  36983. if (columnOption.barBorderCircle) {
  36984. var barBorderRadius = (_item8.width - columnOption.meterBorder * 2) / 2;
  36985. if (barBorderRadius > height) {
  36986. barBorderRadius = height;
  36987. }
  36988. context.moveTo(startX + columnOption.meterBorder, opts.height - opts.area[2]);
  36989. context.lineTo(startX + columnOption.meterBorder, _item8.y + barBorderRadius);
  36990. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius, barBorderRadius, -Math.PI, 0);
  36991. context.lineTo(startX + _item8.width - columnOption.meterBorder, opts.height - opts.area[2]);
  36992. context.lineTo(startX, opts.height - opts.area[2]);
  36993. context.fill();
  36994. } else {
  36995. context.moveTo(startX, _item8.y);
  36996. context.fillRect(startX, _item8.y, _item8.width, height);
  36997. context.closePath();
  36998. context.fill();
  36999. }
  37000. //画边框线
  37001. if (columnOption.meterBorder > 0) {
  37002. context.beginPath();
  37003. context.setStrokeStyle(eachSeries.color);
  37004. context.setLineWidth(columnOption.meterBorder * opts.pix);
  37005. if (columnOption.barBorderCircle) {
  37006. var barBorderRadius = (_item8.width - columnOption.meterBorder) / 2;
  37007. if (barBorderRadius > height) {
  37008. barBorderRadius = height;
  37009. }
  37010. context.moveTo(startX + columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  37011. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + barBorderRadius);
  37012. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius - columnOption.meterBorder * 0.5, barBorderRadius, -Math.PI, 0);
  37013. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  37014. } else {
  37015. context.moveTo(startX + columnOption.meterBorder * 0.5, _item8.y + height);
  37016. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  37017. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  37018. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + height);
  37019. }
  37020. context.stroke();
  37021. }
  37022. }
  37023. }
  37024. ;
  37025. } else {
  37026. for (var _i17 = 0; _i17 < points.length; _i17++) {
  37027. var _item9 = points[_i17];
  37028. if (_item9 !== null && _i17 > leftNum && _i17 < rightNum) {
  37029. context.beginPath();
  37030. context.setFillStyle(_item9.color || eachSeries.color);
  37031. var startX = _item9.x - _item9.width / 2;
  37032. var height = opts.height - _item9.y - opts.area[2];
  37033. if (columnOption.barBorderCircle) {
  37034. var barBorderRadius = _item9.width / 2;
  37035. if (barBorderRadius > height) {
  37036. barBorderRadius = height;
  37037. }
  37038. context.moveTo(startX, opts.height - opts.area[2]);
  37039. context.arc(startX + barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI, -Math.PI / 2);
  37040. context.arc(startX + _item9.width - barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI / 2, 0);
  37041. context.lineTo(startX + _item9.width, opts.height - opts.area[2]);
  37042. context.lineTo(startX, opts.height - opts.area[2]);
  37043. context.fill();
  37044. } else {
  37045. context.moveTo(startX, _item9.y);
  37046. context.fillRect(startX, _item9.y, _item9.width, height);
  37047. context.closePath();
  37048. context.fill();
  37049. }
  37050. }
  37051. }
  37052. ;
  37053. }
  37054. break;
  37055. }
  37056. });
  37057. if (opts.dataLabel !== false && process === 1) {
  37058. series.forEach(function (eachSeries, seriesIndex) {
  37059. var ranges, minRange, maxRange;
  37060. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37061. minRange = ranges.pop();
  37062. maxRange = ranges.shift();
  37063. var data = eachSeries.data;
  37064. switch (columnOption.type) {
  37065. case 'group':
  37066. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37067. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37068. drawPointText(points, eachSeries, config, context, opts);
  37069. break;
  37070. case 'stack':
  37071. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37072. drawPointText(points, eachSeries, config, context, opts);
  37073. break;
  37074. case 'meter':
  37075. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37076. drawPointText(points, eachSeries, config, context, opts);
  37077. break;
  37078. }
  37079. });
  37080. }
  37081. context.restore();
  37082. return {
  37083. xAxisPoints: xAxisPoints,
  37084. calPoints: calPoints,
  37085. eachSpacing: eachSpacing
  37086. };
  37087. }
  37088. function drawBarDataPoints(series, opts, config, context) {
  37089. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37090. var yAxisPoints = [];
  37091. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / opts.categories.length;
  37092. for (var i = 0; i < opts.categories.length; i++) {
  37093. yAxisPoints.push(opts.area[0] + eachSpacing / 2 + eachSpacing * i);
  37094. }
  37095. var columnOption = assign({}, {
  37096. type: 'group',
  37097. width: eachSpacing / 2,
  37098. meterBorder: 4,
  37099. meterFillColor: '#FFFFFF',
  37100. barBorderCircle: false,
  37101. barBorderRadius: [],
  37102. seriesGap: 2,
  37103. linearType: 'none',
  37104. linearOpacity: 1,
  37105. customColor: [],
  37106. colorStop: 0
  37107. }, opts.extra.bar);
  37108. var calPoints = [];
  37109. context.save();
  37110. var leftNum = -2;
  37111. var rightNum = yAxisPoints.length + 2;
  37112. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  37113. drawBarToolTipSplitArea(opts.tooltip.offset.y, opts, config, context, eachSpacing);
  37114. }
  37115. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  37116. series.forEach(function (eachSeries, seriesIndex) {
  37117. var ranges, minRange, maxRange;
  37118. ranges = [].concat(opts.chartData.xAxisData.ranges);
  37119. maxRange = ranges.pop();
  37120. minRange = ranges.shift();
  37121. var data = eachSeries.data;
  37122. switch (columnOption.type) {
  37123. case 'group':
  37124. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  37125. var tooltipPoints = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37126. calPoints.push(tooltipPoints);
  37127. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37128. for (var _i18 = 0; _i18 < points.length; _i18++) {
  37129. var item = points[_i18];
  37130. //fix issues/I27B1N yyoinge & Joeshu
  37131. if (item !== null && _i18 > leftNum && _i18 < rightNum) {
  37132. //var startX = item.x - item.width / 2;
  37133. var startX = opts.area[3];
  37134. var startY = item.y - item.width / 2;
  37135. var height = item.height;
  37136. context.beginPath();
  37137. var fillColor = item.color || eachSeries.color;
  37138. var strokeColor = item.color || eachSeries.color;
  37139. if (columnOption.linearType !== 'none') {
  37140. var grd = context.createLinearGradient(startX, item.y, item.x, item.y);
  37141. //透明渐变
  37142. if (columnOption.linearType == 'opacity') {
  37143. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  37144. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37145. } else {
  37146. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37147. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37148. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37149. }
  37150. fillColor = grd;
  37151. }
  37152. // 圆角边框
  37153. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  37154. var left = startX;
  37155. var width = item.width;
  37156. var top = item.y - item.width / 2;
  37157. var _height2 = item.heigh;
  37158. if (columnOption.barBorderCircle) {
  37159. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  37160. }
  37161. var _columnOption$barBord2 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  37162. r0 = _columnOption$barBord2[0],
  37163. r1 = _columnOption$barBord2[1],
  37164. r2 = _columnOption$barBord2[2],
  37165. r3 = _columnOption$barBord2[3];
  37166. var minRadius = Math.min(width / 2, _height2 / 2);
  37167. r0 = r0 > minRadius ? minRadius : r0;
  37168. r1 = r1 > minRadius ? minRadius : r1;
  37169. r2 = r2 > minRadius ? minRadius : r2;
  37170. r3 = r3 > minRadius ? minRadius : r3;
  37171. r0 = r0 < 0 ? 0 : r0;
  37172. r1 = r1 < 0 ? 0 : r1;
  37173. r2 = r2 < 0 ? 0 : r2;
  37174. r3 = r3 < 0 ? 0 : r3;
  37175. context.arc(left + r3, top + r3, r3, -Math.PI, -Math.PI / 2);
  37176. context.arc(item.x - r0, top + r0, r0, -Math.PI / 2, 0);
  37177. context.arc(item.x - r1, top + width - r1, r1, 0, Math.PI / 2);
  37178. context.arc(left + r2, top + width - r2, r2, Math.PI / 2, Math.PI);
  37179. } else {
  37180. context.moveTo(startX, startY);
  37181. context.lineTo(item.x, startY);
  37182. context.lineTo(item.x, startY + item.width - 2);
  37183. context.lineTo(startX, startY + item.width - 2);
  37184. context.lineTo(startX, startY);
  37185. context.setLineWidth(1);
  37186. context.setStrokeStyle(strokeColor);
  37187. }
  37188. context.setFillStyle(fillColor);
  37189. context.closePath();
  37190. //context.stroke();
  37191. context.fill();
  37192. }
  37193. }
  37194. ;
  37195. break;
  37196. case 'stack':
  37197. // 绘制堆叠数据图
  37198. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37199. calPoints.push(points);
  37200. points = fixBarStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  37201. for (var _i19 = 0; _i19 < points.length; _i19++) {
  37202. var _item10 = points[_i19];
  37203. if (_item10 !== null && _i19 > leftNum && _i19 < rightNum) {
  37204. context.beginPath();
  37205. var fillColor = _item10.color || eachSeries.color;
  37206. var startX = _item10.x0;
  37207. context.setFillStyle(fillColor);
  37208. context.moveTo(startX, _item10.y - _item10.width / 2);
  37209. context.fillRect(startX, _item10.y - _item10.width / 2, _item10.height, _item10.width - 2);
  37210. context.closePath();
  37211. context.fill();
  37212. }
  37213. }
  37214. ;
  37215. break;
  37216. }
  37217. });
  37218. if (opts.dataLabel !== false && process === 1) {
  37219. series.forEach(function (eachSeries, seriesIndex) {
  37220. var ranges, minRange, maxRange;
  37221. ranges = [].concat(opts.chartData.xAxisData.ranges);
  37222. maxRange = ranges.pop();
  37223. minRange = ranges.shift();
  37224. var data = eachSeries.data;
  37225. switch (columnOption.type) {
  37226. case 'group':
  37227. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  37228. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37229. drawBarPointText(points, eachSeries, config, context, opts);
  37230. break;
  37231. case 'stack':
  37232. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37233. drawBarPointText(points, eachSeries, config, context, opts);
  37234. break;
  37235. }
  37236. });
  37237. }
  37238. return {
  37239. yAxisPoints: yAxisPoints,
  37240. calPoints: calPoints,
  37241. eachSpacing: eachSpacing
  37242. };
  37243. }
  37244. function drawCandleDataPoints(series, seriesMA, opts, config, context) {
  37245. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  37246. var candleOption = assign({}, {
  37247. color: {},
  37248. average: {}
  37249. }, opts.extra.candle);
  37250. candleOption.color = assign({}, {
  37251. upLine: '#f04864',
  37252. upFill: '#f04864',
  37253. downLine: '#2fc25b',
  37254. downFill: '#2fc25b'
  37255. }, candleOption.color);
  37256. candleOption.average = assign({}, {
  37257. show: false,
  37258. name: [],
  37259. day: [],
  37260. color: config.color
  37261. }, candleOption.average);
  37262. opts.extra.candle = candleOption;
  37263. var xAxisData = opts.chartData.xAxisData,
  37264. xAxisPoints = xAxisData.xAxisPoints,
  37265. eachSpacing = xAxisData.eachSpacing;
  37266. var calPoints = [];
  37267. context.save();
  37268. var leftNum = -2;
  37269. var rightNum = xAxisPoints.length + 2;
  37270. var leftSpace = 0;
  37271. var rightSpace = opts.width + eachSpacing;
  37272. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37273. context.translate(opts._scrollDistance_, 0);
  37274. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  37275. rightNum = leftNum + opts.xAxis.itemCount + 4;
  37276. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37277. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37278. }
  37279. //画均线
  37280. if (candleOption.average.show || seriesMA) {
  37281. //Merge pull request !12 from 邱贵翔
  37282. seriesMA.forEach(function (eachSeries, seriesIndex) {
  37283. var ranges, minRange, maxRange;
  37284. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37285. minRange = ranges.pop();
  37286. maxRange = ranges.shift();
  37287. var data = eachSeries.data;
  37288. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37289. var splitPointList = splitPoints(points, eachSeries);
  37290. for (var i = 0; i < splitPointList.length; i++) {
  37291. var _points = splitPointList[i];
  37292. context.beginPath();
  37293. context.setStrokeStyle(eachSeries.color);
  37294. context.setLineWidth(1);
  37295. if (_points.length === 1) {
  37296. context.moveTo(_points[0].x, _points[0].y);
  37297. context.arc(_points[0].x, _points[0].y, 1, 0, 2 * Math.PI);
  37298. } else {
  37299. context.moveTo(_points[0].x, _points[0].y);
  37300. var startPoint = 0;
  37301. for (var j = 0; j < _points.length; j++) {
  37302. var item = _points[j];
  37303. if (startPoint == 0 && item.x > leftSpace) {
  37304. context.moveTo(item.x, item.y);
  37305. startPoint = 1;
  37306. }
  37307. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37308. var ctrlPoint = createCurveControlPoints(_points, j - 1);
  37309. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37310. }
  37311. }
  37312. context.moveTo(_points[0].x, _points[0].y);
  37313. }
  37314. context.closePath();
  37315. context.stroke();
  37316. }
  37317. });
  37318. }
  37319. //画K线
  37320. series.forEach(function (eachSeries, seriesIndex) {
  37321. var ranges, minRange, maxRange;
  37322. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37323. minRange = ranges.pop();
  37324. maxRange = ranges.shift();
  37325. var data = eachSeries.data;
  37326. var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37327. calPoints.push(points);
  37328. var splitPointList = splitPoints(points, eachSeries);
  37329. for (var i = 0; i < splitPointList[0].length; i++) {
  37330. if (i > leftNum && i < rightNum) {
  37331. var item = splitPointList[0][i];
  37332. context.beginPath();
  37333. //如果上涨
  37334. if (data[i][1] - data[i][0] > 0) {
  37335. context.setStrokeStyle(candleOption.color.upLine);
  37336. context.setFillStyle(candleOption.color.upFill);
  37337. context.setLineWidth(1 * opts.pix);
  37338. context.moveTo(item[3].x, item[3].y); //顶点
  37339. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37340. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  37341. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  37342. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37343. context.lineTo(item[2].x, item[2].y); //底点
  37344. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37345. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  37346. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  37347. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37348. context.moveTo(item[3].x, item[3].y); //顶点
  37349. } else {
  37350. context.setStrokeStyle(candleOption.color.downLine);
  37351. context.setFillStyle(candleOption.color.downFill);
  37352. context.setLineWidth(1 * opts.pix);
  37353. context.moveTo(item[3].x, item[3].y); //顶点
  37354. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37355. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  37356. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  37357. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37358. context.lineTo(item[2].x, item[2].y); //底点
  37359. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37360. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  37361. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  37362. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37363. context.moveTo(item[3].x, item[3].y); //顶点
  37364. }
  37365. context.closePath();
  37366. context.fill();
  37367. context.stroke();
  37368. }
  37369. }
  37370. });
  37371. context.restore();
  37372. return {
  37373. xAxisPoints: xAxisPoints,
  37374. calPoints: calPoints,
  37375. eachSpacing: eachSpacing
  37376. };
  37377. }
  37378. function drawAreaDataPoints(series, opts, config, context) {
  37379. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37380. var areaOption = assign({}, {
  37381. type: 'straight',
  37382. opacity: 0.2,
  37383. addLine: false,
  37384. width: 2,
  37385. gradient: false
  37386. }, opts.extra.area);
  37387. var xAxisData = opts.chartData.xAxisData,
  37388. xAxisPoints = xAxisData.xAxisPoints,
  37389. eachSpacing = xAxisData.eachSpacing;
  37390. var endY = opts.height - opts.area[2];
  37391. var calPoints = [];
  37392. context.save();
  37393. var leftSpace = 0;
  37394. var rightSpace = opts.width + eachSpacing;
  37395. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37396. context.translate(opts._scrollDistance_, 0);
  37397. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37398. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37399. }
  37400. series.forEach(function (eachSeries, seriesIndex) {
  37401. var ranges, minRange, maxRange;
  37402. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37403. minRange = ranges.pop();
  37404. maxRange = ranges.shift();
  37405. var data = eachSeries.data;
  37406. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37407. calPoints.push(points);
  37408. var splitPointList = splitPoints(points, eachSeries);
  37409. for (var i = 0; i < splitPointList.length; i++) {
  37410. var _points2 = splitPointList[i];
  37411. // 绘制区域数
  37412. context.beginPath();
  37413. context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  37414. if (areaOption.gradient) {
  37415. var gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
  37416. gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
  37417. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  37418. context.setFillStyle(gradient);
  37419. } else {
  37420. context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  37421. }
  37422. context.setLineWidth(areaOption.width * opts.pix);
  37423. if (_points2.length > 1) {
  37424. var firstPoint = _points2[0];
  37425. var lastPoint = _points2[_points2.length - 1];
  37426. context.moveTo(firstPoint.x, firstPoint.y);
  37427. var startPoint = 0;
  37428. if (areaOption.type === 'curve') {
  37429. for (var j = 0; j < _points2.length; j++) {
  37430. var item = _points2[j];
  37431. if (startPoint == 0 && item.x > leftSpace) {
  37432. context.moveTo(item.x, item.y);
  37433. startPoint = 1;
  37434. }
  37435. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37436. var ctrlPoint = createCurveControlPoints(_points2, j - 1);
  37437. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37438. }
  37439. }
  37440. ;
  37441. }
  37442. if (areaOption.type === 'straight') {
  37443. for (var _j = 0; _j < _points2.length; _j++) {
  37444. var _item11 = _points2[_j];
  37445. if (startPoint == 0 && _item11.x > leftSpace) {
  37446. context.moveTo(_item11.x, _item11.y);
  37447. startPoint = 1;
  37448. }
  37449. if (_j > 0 && _item11.x > leftSpace && _item11.x < rightSpace) {
  37450. context.lineTo(_item11.x, _item11.y);
  37451. }
  37452. }
  37453. ;
  37454. }
  37455. if (areaOption.type === 'step') {
  37456. for (var _j2 = 0; _j2 < _points2.length; _j2++) {
  37457. var _item12 = _points2[_j2];
  37458. if (startPoint == 0 && _item12.x > leftSpace) {
  37459. context.moveTo(_item12.x, _item12.y);
  37460. startPoint = 1;
  37461. }
  37462. if (_j2 > 0 && _item12.x > leftSpace && _item12.x < rightSpace) {
  37463. context.lineTo(_item12.x, _points2[_j2 - 1].y);
  37464. context.lineTo(_item12.x, _item12.y);
  37465. }
  37466. }
  37467. ;
  37468. }
  37469. context.lineTo(lastPoint.x, endY);
  37470. context.lineTo(firstPoint.x, endY);
  37471. context.lineTo(firstPoint.x, firstPoint.y);
  37472. } else {
  37473. var _item13 = _points2[0];
  37474. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  37475. context.lineTo(_item13.x + eachSpacing / 2, _item13.y);
  37476. context.lineTo(_item13.x + eachSpacing / 2, endY);
  37477. context.lineTo(_item13.x - eachSpacing / 2, endY);
  37478. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  37479. }
  37480. context.closePath();
  37481. context.fill();
  37482. //画连线
  37483. if (areaOption.addLine) {
  37484. if (eachSeries.lineType == 'dash') {
  37485. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37486. dashLength *= opts.pix;
  37487. context.setLineDash([dashLength, dashLength]);
  37488. }
  37489. context.beginPath();
  37490. context.setStrokeStyle(eachSeries.color);
  37491. context.setLineWidth(areaOption.width * opts.pix);
  37492. if (_points2.length === 1) {
  37493. context.moveTo(_points2[0].x, _points2[0].y);
  37494. context.arc(_points2[0].x, _points2[0].y, 1, 0, 2 * Math.PI);
  37495. } else {
  37496. context.moveTo(_points2[0].x, _points2[0].y);
  37497. var _startPoint = 0;
  37498. if (areaOption.type === 'curve') {
  37499. for (var _j3 = 0; _j3 < _points2.length; _j3++) {
  37500. var _item14 = _points2[_j3];
  37501. if (_startPoint == 0 && _item14.x > leftSpace) {
  37502. context.moveTo(_item14.x, _item14.y);
  37503. _startPoint = 1;
  37504. }
  37505. if (_j3 > 0 && _item14.x > leftSpace && _item14.x < rightSpace) {
  37506. var _ctrlPoint = createCurveControlPoints(_points2, _j3 - 1);
  37507. context.bezierCurveTo(_ctrlPoint.ctrA.x, _ctrlPoint.ctrA.y, _ctrlPoint.ctrB.x, _ctrlPoint.ctrB.y, _item14.x, _item14.y);
  37508. }
  37509. }
  37510. ;
  37511. }
  37512. if (areaOption.type === 'straight') {
  37513. for (var _j4 = 0; _j4 < _points2.length; _j4++) {
  37514. var _item15 = _points2[_j4];
  37515. if (_startPoint == 0 && _item15.x > leftSpace) {
  37516. context.moveTo(_item15.x, _item15.y);
  37517. _startPoint = 1;
  37518. }
  37519. if (_j4 > 0 && _item15.x > leftSpace && _item15.x < rightSpace) {
  37520. context.lineTo(_item15.x, _item15.y);
  37521. }
  37522. }
  37523. ;
  37524. }
  37525. if (areaOption.type === 'step') {
  37526. for (var _j5 = 0; _j5 < _points2.length; _j5++) {
  37527. var _item16 = _points2[_j5];
  37528. if (_startPoint == 0 && _item16.x > leftSpace) {
  37529. context.moveTo(_item16.x, _item16.y);
  37530. _startPoint = 1;
  37531. }
  37532. if (_j5 > 0 && _item16.x > leftSpace && _item16.x < rightSpace) {
  37533. context.lineTo(_item16.x, _points2[_j5 - 1].y);
  37534. context.lineTo(_item16.x, _item16.y);
  37535. }
  37536. }
  37537. ;
  37538. }
  37539. context.moveTo(_points2[0].x, _points2[0].y);
  37540. }
  37541. context.stroke();
  37542. context.setLineDash([]);
  37543. }
  37544. }
  37545. //画点
  37546. if (opts.dataPointShape !== false) {
  37547. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  37548. }
  37549. });
  37550. if (opts.dataLabel !== false && process === 1) {
  37551. series.forEach(function (eachSeries, seriesIndex) {
  37552. var ranges, minRange, maxRange;
  37553. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37554. minRange = ranges.pop();
  37555. maxRange = ranges.shift();
  37556. var data = eachSeries.data;
  37557. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37558. drawPointText(points, eachSeries, config, context, opts);
  37559. });
  37560. }
  37561. context.restore();
  37562. return {
  37563. xAxisPoints: xAxisPoints,
  37564. calPoints: calPoints,
  37565. eachSpacing: eachSpacing
  37566. };
  37567. }
  37568. function drawScatterDataPoints(series, opts, config, context) {
  37569. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37570. var scatterOption = assign({}, {
  37571. type: 'circle'
  37572. }, opts.extra.scatter);
  37573. var xAxisData = opts.chartData.xAxisData,
  37574. xAxisPoints = xAxisData.xAxisPoints,
  37575. eachSpacing = xAxisData.eachSpacing;
  37576. var calPoints = [];
  37577. context.save();
  37578. var leftSpace = 0;
  37579. var rightSpace = opts.width + eachSpacing;
  37580. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37581. context.translate(opts._scrollDistance_, 0);
  37582. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37583. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37584. }
  37585. series.forEach(function (eachSeries, seriesIndex) {
  37586. var ranges, minRange, maxRange;
  37587. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37588. minRange = ranges.pop();
  37589. maxRange = ranges.shift();
  37590. var data = eachSeries.data;
  37591. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37592. context.beginPath();
  37593. context.setStrokeStyle(eachSeries.color);
  37594. context.setFillStyle(eachSeries.color);
  37595. context.setLineWidth(1 * opts.pix);
  37596. var shape = eachSeries.pointShape;
  37597. if (shape === 'diamond') {
  37598. points.forEach(function (item, index) {
  37599. if (item !== null) {
  37600. context.moveTo(item.x, item.y - 4.5);
  37601. context.lineTo(item.x - 4.5, item.y);
  37602. context.lineTo(item.x, item.y + 4.5);
  37603. context.lineTo(item.x + 4.5, item.y);
  37604. context.lineTo(item.x, item.y - 4.5);
  37605. }
  37606. });
  37607. } else if (shape === 'circle') {
  37608. points.forEach(function (item, index) {
  37609. if (item !== null) {
  37610. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  37611. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  37612. }
  37613. });
  37614. } else if (shape === 'square') {
  37615. points.forEach(function (item, index) {
  37616. if (item !== null) {
  37617. context.moveTo(item.x - 3.5, item.y - 3.5);
  37618. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  37619. }
  37620. });
  37621. } else if (shape === 'triangle') {
  37622. points.forEach(function (item, index) {
  37623. if (item !== null) {
  37624. context.moveTo(item.x, item.y - 4.5);
  37625. context.lineTo(item.x - 4.5, item.y + 4.5);
  37626. context.lineTo(item.x + 4.5, item.y + 4.5);
  37627. context.lineTo(item.x, item.y - 4.5);
  37628. }
  37629. });
  37630. } else if (shape === 'triangle') {
  37631. return;
  37632. }
  37633. context.closePath();
  37634. context.fill();
  37635. context.stroke();
  37636. });
  37637. if (opts.dataLabel !== false && process === 1) {
  37638. series.forEach(function (eachSeries, seriesIndex) {
  37639. var ranges, minRange, maxRange;
  37640. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37641. minRange = ranges.pop();
  37642. maxRange = ranges.shift();
  37643. var data = eachSeries.data;
  37644. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37645. drawPointText(points, eachSeries, config, context, opts);
  37646. });
  37647. }
  37648. context.restore();
  37649. return {
  37650. xAxisPoints: xAxisPoints,
  37651. calPoints: calPoints,
  37652. eachSpacing: eachSpacing
  37653. };
  37654. }
  37655. function drawBubbleDataPoints(series, opts, config, context) {
  37656. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37657. var bubbleOption = assign({}, {
  37658. opacity: 1,
  37659. border: 2
  37660. }, opts.extra.bubble);
  37661. var xAxisData = opts.chartData.xAxisData,
  37662. xAxisPoints = xAxisData.xAxisPoints,
  37663. eachSpacing = xAxisData.eachSpacing;
  37664. var calPoints = [];
  37665. context.save();
  37666. var leftSpace = 0;
  37667. var rightSpace = opts.width + eachSpacing;
  37668. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37669. context.translate(opts._scrollDistance_, 0);
  37670. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37671. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37672. }
  37673. series.forEach(function (eachSeries, seriesIndex) {
  37674. var ranges, minRange, maxRange;
  37675. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37676. minRange = ranges.pop();
  37677. maxRange = ranges.shift();
  37678. var data = eachSeries.data;
  37679. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37680. context.beginPath();
  37681. context.setStrokeStyle(eachSeries.color);
  37682. context.setLineWidth(bubbleOption.border * opts.pix);
  37683. context.setFillStyle(hexToRgb(eachSeries.color, bubbleOption.opacity));
  37684. points.forEach(function (item, index) {
  37685. context.moveTo(item.x + item.r, item.y);
  37686. context.arc(item.x, item.y, item.r * opts.pix, 0, 2 * Math.PI, false);
  37687. });
  37688. context.closePath();
  37689. context.fill();
  37690. context.stroke();
  37691. if (opts.dataLabel !== false && process === 1) {
  37692. points.forEach(function (item, index) {
  37693. context.beginPath();
  37694. var fontSize = series.textSize * opts.pix || config.fontSize;
  37695. context.setFontSize(fontSize);
  37696. context.setFillStyle(series.textColor || "#FFFFFF");
  37697. context.setTextAlign('center');
  37698. context.fillText(String(item.t), item.x, item.y + fontSize / 2);
  37699. context.closePath();
  37700. context.stroke();
  37701. context.setTextAlign('left');
  37702. });
  37703. }
  37704. });
  37705. context.restore();
  37706. return {
  37707. xAxisPoints: xAxisPoints,
  37708. calPoints: calPoints,
  37709. eachSpacing: eachSpacing
  37710. };
  37711. }
  37712. function drawLineDataPoints(series, opts, config, context) {
  37713. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37714. var lineOption = assign({}, {
  37715. type: 'straight',
  37716. width: 2
  37717. }, opts.extra.line);
  37718. lineOption.width *= opts.pix;
  37719. var xAxisData = opts.chartData.xAxisData,
  37720. xAxisPoints = xAxisData.xAxisPoints,
  37721. eachSpacing = xAxisData.eachSpacing;
  37722. var calPoints = [];
  37723. context.save();
  37724. var leftSpace = 0;
  37725. var rightSpace = opts.width + eachSpacing;
  37726. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37727. context.translate(opts._scrollDistance_, 0);
  37728. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37729. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37730. }
  37731. series.forEach(function (eachSeries, seriesIndex) {
  37732. var ranges, minRange, maxRange;
  37733. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37734. minRange = ranges.pop();
  37735. maxRange = ranges.shift();
  37736. var data = eachSeries.data;
  37737. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37738. calPoints.push(points);
  37739. var splitPointList = splitPoints(points, eachSeries);
  37740. if (eachSeries.lineType == 'dash') {
  37741. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37742. dashLength *= opts.pix;
  37743. context.setLineDash([dashLength, dashLength]);
  37744. }
  37745. context.beginPath();
  37746. context.setStrokeStyle(eachSeries.color);
  37747. context.setLineWidth(lineOption.width);
  37748. splitPointList.forEach(function (points, index) {
  37749. if (points.length === 1) {
  37750. context.moveTo(points[0].x, points[0].y);
  37751. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  37752. } else {
  37753. context.moveTo(points[0].x, points[0].y);
  37754. var startPoint = 0;
  37755. if (lineOption.type === 'curve') {
  37756. for (var j = 0; j < points.length; j++) {
  37757. var item = points[j];
  37758. if (startPoint == 0 && item.x > leftSpace) {
  37759. context.moveTo(item.x, item.y);
  37760. startPoint = 1;
  37761. }
  37762. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37763. var ctrlPoint = createCurveControlPoints(points, j - 1);
  37764. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37765. }
  37766. }
  37767. ;
  37768. }
  37769. if (lineOption.type === 'straight') {
  37770. for (var _j6 = 0; _j6 < points.length; _j6++) {
  37771. var _item17 = points[_j6];
  37772. if (startPoint == 0 && _item17.x > leftSpace) {
  37773. context.moveTo(_item17.x, _item17.y);
  37774. startPoint = 1;
  37775. }
  37776. if (_j6 > 0 && _item17.x > leftSpace && _item17.x < rightSpace) {
  37777. context.lineTo(_item17.x, _item17.y);
  37778. }
  37779. }
  37780. ;
  37781. }
  37782. if (lineOption.type === 'step') {
  37783. for (var _j7 = 0; _j7 < points.length; _j7++) {
  37784. var _item18 = points[_j7];
  37785. if (startPoint == 0 && _item18.x > leftSpace) {
  37786. context.moveTo(_item18.x, _item18.y);
  37787. startPoint = 1;
  37788. }
  37789. if (_j7 > 0 && _item18.x > leftSpace && _item18.x < rightSpace) {
  37790. context.lineTo(_item18.x, points[_j7 - 1].y);
  37791. context.lineTo(_item18.x, _item18.y);
  37792. }
  37793. }
  37794. ;
  37795. }
  37796. context.moveTo(points[0].x, points[0].y);
  37797. }
  37798. });
  37799. context.stroke();
  37800. context.setLineDash([]);
  37801. if (opts.dataPointShape !== false) {
  37802. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  37803. }
  37804. });
  37805. if (opts.dataLabel !== false && process === 1) {
  37806. series.forEach(function (eachSeries, seriesIndex) {
  37807. var ranges, minRange, maxRange;
  37808. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37809. minRange = ranges.pop();
  37810. maxRange = ranges.shift();
  37811. var data = eachSeries.data;
  37812. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37813. drawPointText(points, eachSeries, config, context, opts);
  37814. });
  37815. }
  37816. context.restore();
  37817. return {
  37818. xAxisPoints: xAxisPoints,
  37819. calPoints: calPoints,
  37820. eachSpacing: eachSpacing
  37821. };
  37822. }
  37823. function drawMixDataPoints(series, opts, config, context) {
  37824. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37825. var columnOption = assign({}, {
  37826. width: eachSpacing / 2,
  37827. barBorderCircle: false,
  37828. barBorderRadius: [],
  37829. seriesGap: 2,
  37830. linearType: 'none',
  37831. linearOpacity: 1,
  37832. customColor: [],
  37833. colorStop: 0
  37834. }, opts.extra.mix.column);
  37835. var xAxisData = opts.chartData.xAxisData,
  37836. xAxisPoints = xAxisData.xAxisPoints,
  37837. eachSpacing = xAxisData.eachSpacing;
  37838. var endY = opts.height - opts.area[2];
  37839. var calPoints = [];
  37840. var columnIndex = 0;
  37841. var columnLength = 0;
  37842. series.forEach(function (eachSeries, seriesIndex) {
  37843. if (eachSeries.type == 'column') {
  37844. columnLength += 1;
  37845. }
  37846. });
  37847. context.save();
  37848. var leftNum = -2;
  37849. var rightNum = xAxisPoints.length + 2;
  37850. var leftSpace = 0;
  37851. var rightSpace = opts.width + eachSpacing;
  37852. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37853. context.translate(opts._scrollDistance_, 0);
  37854. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  37855. rightNum = leftNum + opts.xAxis.itemCount + 4;
  37856. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37857. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37858. }
  37859. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  37860. series.forEach(function (eachSeries, seriesIndex) {
  37861. var ranges, minRange, maxRange;
  37862. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37863. minRange = ranges.pop();
  37864. maxRange = ranges.shift();
  37865. var data = eachSeries.data;
  37866. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37867. calPoints.push(points);
  37868. // 绘制柱状数据图
  37869. if (eachSeries.type == 'column') {
  37870. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  37871. for (var i = 0; i < points.length; i++) {
  37872. var item = points[i];
  37873. if (item !== null && i > leftNum && i < rightNum) {
  37874. var startX = item.x - item.width / 2;
  37875. var height = opts.height - item.y - opts.area[2];
  37876. context.beginPath();
  37877. var fillColor = item.color || eachSeries.color;
  37878. var strokeColor = item.color || eachSeries.color;
  37879. if (columnOption.linearType !== 'none') {
  37880. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  37881. //透明渐变
  37882. if (columnOption.linearType == 'opacity') {
  37883. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  37884. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37885. } else {
  37886. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37887. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37888. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37889. }
  37890. fillColor = grd;
  37891. }
  37892. // 圆角边框
  37893. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle) {
  37894. var left = startX;
  37895. var top = item.y;
  37896. var width = item.width;
  37897. var _height3 = opts.height - opts.area[2] - item.y;
  37898. if (columnOption.barBorderCircle) {
  37899. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  37900. }
  37901. var _columnOption$barBord3 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  37902. r0 = _columnOption$barBord3[0],
  37903. r1 = _columnOption$barBord3[1],
  37904. r2 = _columnOption$barBord3[2],
  37905. r3 = _columnOption$barBord3[3];
  37906. var minRadius = Math.min(width / 2, _height3 / 2);
  37907. r0 = r0 > minRadius ? minRadius : r0;
  37908. r1 = r1 > minRadius ? minRadius : r1;
  37909. r2 = r2 > minRadius ? minRadius : r2;
  37910. r3 = r3 > minRadius ? minRadius : r3;
  37911. r0 = r0 < 0 ? 0 : r0;
  37912. r1 = r1 < 0 ? 0 : r1;
  37913. r2 = r2 < 0 ? 0 : r2;
  37914. r3 = r3 < 0 ? 0 : r3;
  37915. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  37916. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  37917. context.arc(left + width - r2, top + _height3 - r2, r2, 0, Math.PI / 2);
  37918. context.arc(left + r3, top + _height3 - r3, r3, Math.PI / 2, Math.PI);
  37919. } else {
  37920. context.moveTo(startX, item.y);
  37921. context.lineTo(startX + item.width - 2, item.y);
  37922. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  37923. context.lineTo(startX, opts.height - opts.area[2]);
  37924. context.lineTo(startX, item.y);
  37925. context.setLineWidth(1);
  37926. context.setStrokeStyle(strokeColor);
  37927. }
  37928. context.setFillStyle(fillColor);
  37929. context.closePath();
  37930. context.fill();
  37931. }
  37932. }
  37933. columnIndex += 1;
  37934. }
  37935. //绘制区域图数据
  37936. if (eachSeries.type == 'area') {
  37937. var _splitPointList = splitPoints(points, eachSeries);
  37938. for (var _i20 = 0; _i20 < _splitPointList.length; _i20++) {
  37939. var _points3 = _splitPointList[_i20];
  37940. // 绘制区域数据
  37941. context.beginPath();
  37942. context.setStrokeStyle(eachSeries.color);
  37943. context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
  37944. context.setLineWidth(2 * opts.pix);
  37945. if (_points3.length > 1) {
  37946. var firstPoint = _points3[0];
  37947. var lastPoint = _points3[_points3.length - 1];
  37948. context.moveTo(firstPoint.x, firstPoint.y);
  37949. var startPoint = 0;
  37950. if (eachSeries.style === 'curve') {
  37951. for (var j = 0; j < _points3.length; j++) {
  37952. var _item19 = _points3[j];
  37953. if (startPoint == 0 && _item19.x > leftSpace) {
  37954. context.moveTo(_item19.x, _item19.y);
  37955. startPoint = 1;
  37956. }
  37957. if (j > 0 && _item19.x > leftSpace && _item19.x < rightSpace) {
  37958. var ctrlPoint = createCurveControlPoints(_points3, j - 1);
  37959. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item19.x, _item19.y);
  37960. }
  37961. }
  37962. ;
  37963. } else {
  37964. for (var _j8 = 0; _j8 < _points3.length; _j8++) {
  37965. var _item20 = _points3[_j8];
  37966. if (startPoint == 0 && _item20.x > leftSpace) {
  37967. context.moveTo(_item20.x, _item20.y);
  37968. startPoint = 1;
  37969. }
  37970. if (_j8 > 0 && _item20.x > leftSpace && _item20.x < rightSpace) {
  37971. context.lineTo(_item20.x, _item20.y);
  37972. }
  37973. }
  37974. ;
  37975. }
  37976. context.lineTo(lastPoint.x, endY);
  37977. context.lineTo(firstPoint.x, endY);
  37978. context.lineTo(firstPoint.x, firstPoint.y);
  37979. } else {
  37980. var _item21 = _points3[0];
  37981. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37982. context.lineTo(_item21.x + eachSpacing / 2, _item21.y);
  37983. context.lineTo(_item21.x + eachSpacing / 2, endY);
  37984. context.lineTo(_item21.x - eachSpacing / 2, endY);
  37985. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37986. }
  37987. context.closePath();
  37988. context.fill();
  37989. }
  37990. }
  37991. // 绘制折线数据图
  37992. if (eachSeries.type == 'line') {
  37993. var splitPointList = splitPoints(points, eachSeries);
  37994. splitPointList.forEach(function (points, index) {
  37995. if (eachSeries.lineType == 'dash') {
  37996. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37997. dashLength *= opts.pix;
  37998. context.setLineDash([dashLength, dashLength]);
  37999. }
  38000. context.beginPath();
  38001. context.setStrokeStyle(eachSeries.color);
  38002. context.setLineWidth(2 * opts.pix);
  38003. if (points.length === 1) {
  38004. context.moveTo(points[0].x, points[0].y);
  38005. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  38006. } else {
  38007. context.moveTo(points[0].x, points[0].y);
  38008. var _startPoint2 = 0;
  38009. if (eachSeries.style == 'curve') {
  38010. for (var _j9 = 0; _j9 < points.length; _j9++) {
  38011. var _item22 = points[_j9];
  38012. if (_startPoint2 == 0 && _item22.x > leftSpace) {
  38013. context.moveTo(_item22.x, _item22.y);
  38014. _startPoint2 = 1;
  38015. }
  38016. if (_j9 > 0 && _item22.x > leftSpace && _item22.x < rightSpace) {
  38017. var ctrlPoint = createCurveControlPoints(points, _j9 - 1);
  38018. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item22.x, _item22.y);
  38019. }
  38020. }
  38021. } else {
  38022. for (var _j10 = 0; _j10 < points.length; _j10++) {
  38023. var _item23 = points[_j10];
  38024. if (_startPoint2 == 0 && _item23.x > leftSpace) {
  38025. context.moveTo(_item23.x, _item23.y);
  38026. _startPoint2 = 1;
  38027. }
  38028. if (_j10 > 0 && _item23.x > leftSpace && _item23.x < rightSpace) {
  38029. context.lineTo(_item23.x, _item23.y);
  38030. }
  38031. }
  38032. }
  38033. context.moveTo(points[0].x, points[0].y);
  38034. }
  38035. context.stroke();
  38036. context.setLineDash([]);
  38037. });
  38038. }
  38039. // 绘制点数据图
  38040. if (eachSeries.type == 'point') {
  38041. eachSeries.addPoint = true;
  38042. }
  38043. if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
  38044. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  38045. }
  38046. });
  38047. if (opts.dataLabel !== false && process === 1) {
  38048. var columnIndex = 0;
  38049. series.forEach(function (eachSeries, seriesIndex) {
  38050. var ranges, minRange, maxRange;
  38051. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38052. minRange = ranges.pop();
  38053. maxRange = ranges.shift();
  38054. var data = eachSeries.data;
  38055. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38056. if (eachSeries.type !== 'column') {
  38057. drawPointText(points, eachSeries, config, context, opts);
  38058. } else {
  38059. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  38060. drawPointText(points, eachSeries, config, context, opts);
  38061. columnIndex += 1;
  38062. }
  38063. });
  38064. }
  38065. context.restore();
  38066. return {
  38067. xAxisPoints: xAxisPoints,
  38068. calPoints: calPoints,
  38069. eachSpacing: eachSpacing
  38070. };
  38071. }
  38072. function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
  38073. var toolTipOption = opts.extra.tooltip || {};
  38074. if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
  38075. drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints);
  38076. }
  38077. context.save();
  38078. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38079. context.translate(opts._scrollDistance_, 0);
  38080. }
  38081. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  38082. drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
  38083. }
  38084. context.restore();
  38085. }
  38086. function drawXAxis(categories, opts, config, context) {
  38087. var xAxisData = opts.chartData.xAxisData,
  38088. xAxisPoints = xAxisData.xAxisPoints,
  38089. startX = xAxisData.startX,
  38090. endX = xAxisData.endX,
  38091. eachSpacing = xAxisData.eachSpacing;
  38092. var boundaryGap = 'center';
  38093. if (opts.type == 'bar' || opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  38094. boundaryGap = opts.xAxis.boundaryGap;
  38095. }
  38096. var startY = opts.height - opts.area[2];
  38097. var endY = opts.area[0];
  38098. //绘制滚动条
  38099. if (opts.enableScroll && opts.xAxis.scrollShow) {
  38100. var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
  38101. var scrollScreenWidth = endX - startX;
  38102. var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
  38103. var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
  38104. var scrollLeft = 0;
  38105. if (opts._scrollDistance_) {
  38106. scrollLeft = -opts._scrollDistance_ * scrollScreenWidth / scrollTotalWidth;
  38107. }
  38108. context.beginPath();
  38109. context.setLineCap('round');
  38110. context.setLineWidth(6 * opts.pix);
  38111. context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
  38112. context.moveTo(startX, scrollY);
  38113. context.lineTo(endX, scrollY);
  38114. context.stroke();
  38115. context.closePath();
  38116. context.beginPath();
  38117. context.setLineCap('round');
  38118. context.setLineWidth(6 * opts.pix);
  38119. context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
  38120. context.moveTo(startX + scrollLeft, scrollY);
  38121. context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
  38122. context.stroke();
  38123. context.closePath();
  38124. context.setLineCap('butt');
  38125. }
  38126. context.save();
  38127. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  38128. context.translate(opts._scrollDistance_, 0);
  38129. }
  38130. //绘制X轴刻度线
  38131. if (opts.xAxis.calibration === true) {
  38132. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  38133. context.setLineCap('butt');
  38134. context.setLineWidth(1 * opts.pix);
  38135. xAxisPoints.forEach(function (item, index) {
  38136. if (index > 0) {
  38137. context.beginPath();
  38138. context.moveTo(item - eachSpacing / 2, startY);
  38139. context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pix);
  38140. context.closePath();
  38141. context.stroke();
  38142. }
  38143. });
  38144. }
  38145. //绘制X轴网格
  38146. if (opts.xAxis.disableGrid !== true) {
  38147. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  38148. context.setLineCap('butt');
  38149. context.setLineWidth(1 * opts.pix);
  38150. if (opts.xAxis.gridType == 'dash') {
  38151. context.setLineDash([opts.xAxis.dashLength * opts.pix, opts.xAxis.dashLength * opts.pix]);
  38152. }
  38153. opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
  38154. xAxisPoints.forEach(function (item, index) {
  38155. if (index % opts.xAxis.gridEval == 0) {
  38156. context.beginPath();
  38157. context.moveTo(item, startY);
  38158. context.lineTo(item, endY);
  38159. context.stroke();
  38160. }
  38161. });
  38162. context.setLineDash([]);
  38163. }
  38164. //绘制X轴文案
  38165. if (opts.xAxis.disabled !== true) {
  38166. // 对X轴列表做抽稀处理
  38167. //默认全部显示X轴标签
  38168. var maxXAxisListLength = categories.length;
  38169. //如果设置了X轴单屏数量
  38170. if (opts.xAxis.labelCount) {
  38171. //如果设置X轴密度
  38172. if (opts.xAxis.itemCount) {
  38173. maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
  38174. } else {
  38175. maxXAxisListLength = opts.xAxis.labelCount;
  38176. }
  38177. maxXAxisListLength -= 1;
  38178. }
  38179. var ratio = Math.ceil(categories.length / maxXAxisListLength);
  38180. var newCategories = [];
  38181. var cgLength = categories.length;
  38182. for (var i = 0; i < cgLength; i++) {
  38183. if (i % ratio !== 0) {
  38184. newCategories.push("");
  38185. } else {
  38186. newCategories.push(categories[i]);
  38187. }
  38188. }
  38189. newCategories[cgLength - 1] = categories[cgLength - 1];
  38190. var xAxisFontSize = opts.xAxis.fontSize * opts.pix || config.fontSize;
  38191. if (config._xAxisTextAngle_ === 0) {
  38192. newCategories.forEach(function (item, index) {
  38193. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  38194. var offset = -measureText(String(xitem), xAxisFontSize, context) / 2;
  38195. if (boundaryGap == 'center') {
  38196. offset += eachSpacing / 2;
  38197. }
  38198. var scrollHeight = 0;
  38199. if (opts.xAxis.scrollShow) {
  38200. scrollHeight = 6 * opts.pix;
  38201. }
  38202. context.beginPath();
  38203. context.setFontSize(xAxisFontSize);
  38204. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  38205. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
  38206. context.closePath();
  38207. context.stroke();
  38208. });
  38209. } else {
  38210. newCategories.forEach(function (item, index) {
  38211. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  38212. context.save();
  38213. context.beginPath();
  38214. context.setFontSize(xAxisFontSize);
  38215. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  38216. var textWidth = measureText(String(xitem), xAxisFontSize, context);
  38217. var offset = -textWidth;
  38218. if (boundaryGap == 'center') {
  38219. offset += eachSpacing / 2;
  38220. }
  38221. var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
  38222. transX = _calRotateTranslate.transX,
  38223. transY = _calRotateTranslate.transY;
  38224. context.rotate(-1 * config._xAxisTextAngle_);
  38225. context.translate(transX, transY);
  38226. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
  38227. context.closePath();
  38228. context.stroke();
  38229. context.restore();
  38230. });
  38231. }
  38232. }
  38233. context.restore();
  38234. //绘制X轴轴线
  38235. if (opts.xAxis.axisLine) {
  38236. context.beginPath();
  38237. context.setStrokeStyle(opts.xAxis.axisLineColor);
  38238. context.setLineWidth(1 * opts.pix);
  38239. context.moveTo(startX, opts.height - opts.area[2]);
  38240. context.lineTo(endX, opts.height - opts.area[2]);
  38241. context.stroke();
  38242. }
  38243. }
  38244. function drawYAxisGrid(categories, opts, config, context) {
  38245. if (opts.yAxis.disableGrid === true) {
  38246. return;
  38247. }
  38248. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  38249. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  38250. var startX = opts.area[3];
  38251. var xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  38252. xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
  38253. var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
  38254. var endX = startX + TotalWidth;
  38255. var points = [];
  38256. var startY = 1;
  38257. if (opts.xAxis.axisLine === false) {
  38258. startY = 0;
  38259. }
  38260. for (var i = startY; i < opts.yAxis.splitNumber + 1; i++) {
  38261. points.push(opts.height - opts.area[2] - eachSpacing * i);
  38262. }
  38263. context.save();
  38264. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  38265. context.translate(opts._scrollDistance_, 0);
  38266. }
  38267. if (opts.yAxis.gridType == 'dash') {
  38268. context.setLineDash([opts.yAxis.dashLength * opts.pix, opts.yAxis.dashLength * opts.pix]);
  38269. }
  38270. context.setStrokeStyle(opts.yAxis.gridColor);
  38271. context.setLineWidth(1 * opts.pix);
  38272. points.forEach(function (item, index) {
  38273. context.beginPath();
  38274. context.moveTo(startX, item);
  38275. context.lineTo(endX, item);
  38276. context.stroke();
  38277. });
  38278. context.setLineDash([]);
  38279. context.restore();
  38280. }
  38281. function drawYAxis(series, opts, config, context) {
  38282. if (opts.yAxis.disabled === true) {
  38283. return;
  38284. }
  38285. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  38286. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  38287. var startX = opts.area[3];
  38288. var endX = opts.width - opts.area[1];
  38289. var endY = opts.height - opts.area[2];
  38290. var fillEndY = endY + config.xAxisHeight;
  38291. if (opts.xAxis.scrollShow) {
  38292. fillEndY -= 3 * opts.pix;
  38293. }
  38294. if (opts.xAxis.rotateLabel) {
  38295. fillEndY = opts.height - opts.area[2] + opts.fontSize * opts.pix / 2;
  38296. }
  38297. // set YAxis background
  38298. context.beginPath();
  38299. context.setFillStyle(opts.background);
  38300. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'left') {
  38301. context.fillRect(0, 0, startX, fillEndY);
  38302. }
  38303. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'right') {
  38304. context.fillRect(endX, 0, opts.width, fillEndY);
  38305. }
  38306. context.closePath();
  38307. context.stroke();
  38308. var tStartLeft = opts.area[3];
  38309. var tStartRight = opts.width - opts.area[1];
  38310. var tStartCenter = opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2;
  38311. if (opts.yAxis.data) {
  38312. var _loop4 = function _loop4(i) {
  38313. var yData = opts.yAxis.data[i];
  38314. points = [];
  38315. if (yData.type === 'categories') {
  38316. for (var _i21 = 0; _i21 <= yData.categories.length; _i21++) {
  38317. points.push(opts.area[0] + spacingValid / yData.categories.length / 2 + spacingValid / yData.categories.length * _i21);
  38318. }
  38319. } else {
  38320. for (var _i22 = 0; _i22 <= opts.yAxis.splitNumber; _i22++) {
  38321. points.push(opts.area[0] + eachSpacing * _i22);
  38322. }
  38323. }
  38324. if (yData.disabled !== true) {
  38325. var rangesFormat = opts.chartData.yAxisData.rangesFormat[i];
  38326. var yAxisFontSize = yData.fontSize ? yData.fontSize * opts.pix : config.fontSize;
  38327. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];
  38328. var textAlign = yData.textAlign || "right";
  38329. //画Y轴刻度及文案
  38330. rangesFormat.forEach(function (item, index) {
  38331. var pos = points[index] ? points[index] : endY;
  38332. context.beginPath();
  38333. context.setFontSize(yAxisFontSize);
  38334. context.setLineWidth(1 * opts.pix);
  38335. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  38336. context.setFillStyle(yData.fontColor || opts.fontColor);
  38337. var tmpstrat = 0;
  38338. var gapwidth = 4 * opts.pix;
  38339. if (yAxisWidth.position == 'left') {
  38340. //画刻度线
  38341. if (yData.calibration == true) {
  38342. context.moveTo(tStartLeft, pos);
  38343. context.lineTo(tStartLeft - 3 * opts.pix, pos);
  38344. gapwidth += 3 * opts.pix;
  38345. }
  38346. //画文字
  38347. switch (textAlign) {
  38348. case "left":
  38349. context.setTextAlign('left');
  38350. tmpstrat = tStartLeft - yAxisWidth.width;
  38351. break;
  38352. case "right":
  38353. context.setTextAlign('right');
  38354. tmpstrat = tStartLeft - gapwidth;
  38355. break;
  38356. default:
  38357. context.setTextAlign('center');
  38358. tmpstrat = tStartLeft - yAxisWidth.width / 2;
  38359. }
  38360. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38361. } else if (yAxisWidth.position == 'right') {
  38362. //画刻度线
  38363. if (yData.calibration == true) {
  38364. context.moveTo(tStartRight, pos);
  38365. context.lineTo(tStartRight + 3 * opts.pix, pos);
  38366. gapwidth += 3 * opts.pix;
  38367. }
  38368. switch (textAlign) {
  38369. case "left":
  38370. context.setTextAlign('left');
  38371. tmpstrat = tStartRight + gapwidth;
  38372. break;
  38373. case "right":
  38374. context.setTextAlign('right');
  38375. tmpstrat = tStartRight + yAxisWidth.width;
  38376. break;
  38377. default:
  38378. context.setTextAlign('center');
  38379. tmpstrat = tStartRight + yAxisWidth.width / 2;
  38380. }
  38381. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38382. } else if (yAxisWidth.position == 'center') {
  38383. //画刻度线
  38384. if (yData.calibration == true) {
  38385. context.moveTo(tStartCenter, pos);
  38386. context.lineTo(tStartCenter - 3 * opts.pix, pos);
  38387. gapwidth += 3 * opts.pix;
  38388. }
  38389. //画文字
  38390. switch (textAlign) {
  38391. case "left":
  38392. context.setTextAlign('left');
  38393. tmpstrat = tStartCenter - yAxisWidth.width;
  38394. break;
  38395. case "right":
  38396. context.setTextAlign('right');
  38397. tmpstrat = tStartCenter - gapwidth;
  38398. break;
  38399. default:
  38400. context.setTextAlign('center');
  38401. tmpstrat = tStartCenter - yAxisWidth.width / 2;
  38402. }
  38403. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38404. }
  38405. context.closePath();
  38406. context.stroke();
  38407. context.setTextAlign('left');
  38408. });
  38409. //画Y轴轴线
  38410. if (yData.axisLine !== false) {
  38411. context.beginPath();
  38412. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  38413. context.setLineWidth(1 * opts.pix);
  38414. if (yAxisWidth.position == 'left') {
  38415. context.moveTo(tStartLeft, opts.height - opts.area[2]);
  38416. context.lineTo(tStartLeft, opts.area[0]);
  38417. } else if (yAxisWidth.position == 'right') {
  38418. context.moveTo(tStartRight, opts.height - opts.area[2]);
  38419. context.lineTo(tStartRight, opts.area[0]);
  38420. } else if (yAxisWidth.position == 'center') {
  38421. context.moveTo(tStartCenter, opts.height - opts.area[2]);
  38422. context.lineTo(tStartCenter, opts.area[0]);
  38423. }
  38424. context.stroke();
  38425. }
  38426. //画Y轴标题
  38427. if (opts.yAxis.showTitle) {
  38428. var titleFontSize = yData.titleFontSize * opts.pix || config.fontSize;
  38429. var title = yData.title;
  38430. context.beginPath();
  38431. context.setFontSize(titleFontSize);
  38432. context.setFillStyle(yData.titleFontColor || opts.fontColor);
  38433. if (yAxisWidth.position == 'left') {
  38434. context.fillText(title, tStartLeft - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38435. } else if (yAxisWidth.position == 'right') {
  38436. context.fillText(title, tStartRight - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38437. } else if (yAxisWidth.position == 'center') {
  38438. context.fillText(title, tStartCenter - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38439. }
  38440. context.closePath();
  38441. context.stroke();
  38442. }
  38443. if (yAxisWidth.position == 'left') {
  38444. tStartLeft -= yAxisWidth.width + opts.yAxis.padding * opts.pix;
  38445. } else {
  38446. tStartRight += yAxisWidth.width + opts.yAxis.padding * opts.pix;
  38447. }
  38448. }
  38449. };
  38450. for (var i = 0; i < opts.yAxis.data.length; i++) {
  38451. var points;
  38452. _loop4(i);
  38453. }
  38454. }
  38455. }
  38456. function drawLegend(series, opts, config, context, chartData) {
  38457. if (opts.legend.show === false) {
  38458. return;
  38459. }
  38460. var legendData = chartData.legendData;
  38461. var legendList = legendData.points;
  38462. var legendArea = legendData.area;
  38463. var padding = opts.legend.padding * opts.pix;
  38464. var fontSize = opts.legend.fontSize * opts.pix;
  38465. var shapeWidth = 15 * opts.pix;
  38466. var shapeRight = 5 * opts.pix;
  38467. var itemGap = opts.legend.itemGap * opts.pix;
  38468. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  38469. //画背景及边框
  38470. context.beginPath();
  38471. context.setLineWidth(opts.legend.borderWidth * opts.pix);
  38472. context.setStrokeStyle(opts.legend.borderColor);
  38473. context.setFillStyle(opts.legend.backgroundColor);
  38474. context.moveTo(legendArea.start.x, legendArea.start.y);
  38475. context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
  38476. context.closePath();
  38477. context.fill();
  38478. context.stroke();
  38479. legendList.forEach(function (itemList, listIndex) {
  38480. var width = 0;
  38481. var height = 0;
  38482. width = legendData.widthArr[listIndex];
  38483. height = legendData.heightArr[listIndex];
  38484. var startX = 0;
  38485. var startY = 0;
  38486. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  38487. switch (opts.legend.float) {
  38488. case 'left':
  38489. startX = legendArea.start.x + padding;
  38490. break;
  38491. case 'right':
  38492. startX = legendArea.start.x + legendArea.width - width;
  38493. break;
  38494. default:
  38495. startX = legendArea.start.x + (legendArea.width - width) / 2;
  38496. }
  38497. startY = legendArea.start.y + padding + listIndex * lineHeight;
  38498. } else {
  38499. if (listIndex == 0) {
  38500. width = 0;
  38501. } else {
  38502. width = legendData.widthArr[listIndex - 1];
  38503. }
  38504. startX = legendArea.start.x + padding + width;
  38505. startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
  38506. }
  38507. context.setFontSize(config.fontSize);
  38508. for (var i = 0; i < itemList.length; i++) {
  38509. var item = itemList[i];
  38510. item.area = [0, 0, 0, 0];
  38511. item.area[0] = startX;
  38512. item.area[1] = startY;
  38513. item.area[3] = startY + lineHeight;
  38514. context.beginPath();
  38515. context.setLineWidth(1 * opts.pix);
  38516. context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
  38517. context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
  38518. switch (item.legendShape) {
  38519. case 'line':
  38520. context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pix);
  38521. context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pix, 15 * opts.pix, 4 * opts.pix);
  38522. break;
  38523. case 'triangle':
  38524. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38525. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38526. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38527. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38528. break;
  38529. case 'diamond':
  38530. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38531. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight);
  38532. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38533. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight);
  38534. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38535. break;
  38536. case 'circle':
  38537. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight);
  38538. context.arc(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight, 5 * opts.pix, 0, 2 * Math.PI);
  38539. break;
  38540. case 'rect':
  38541. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  38542. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  38543. break;
  38544. case 'square':
  38545. context.moveTo(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38546. context.fillRect(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix, 10 * opts.pix, 10 * opts.pix);
  38547. break;
  38548. case 'none':
  38549. break;
  38550. default:
  38551. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  38552. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  38553. }
  38554. context.closePath();
  38555. context.fill();
  38556. context.stroke();
  38557. startX += shapeWidth + shapeRight;
  38558. var fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
  38559. context.beginPath();
  38560. context.setFontSize(fontSize);
  38561. context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
  38562. context.fillText(item.name, startX, startY + fontTrans);
  38563. context.closePath();
  38564. context.stroke();
  38565. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  38566. startX += measureText(item.name, fontSize, context) + itemGap;
  38567. item.area[2] = startX;
  38568. } else {
  38569. item.area[2] = startX + measureText(item.name, fontSize, context) + itemGap;
  38570. ;
  38571. startX -= shapeWidth + shapeRight;
  38572. startY += lineHeight;
  38573. }
  38574. }
  38575. });
  38576. }
  38577. function drawPieDataPoints(series, opts, config, context) {
  38578. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38579. var pieOption = assign({}, {
  38580. activeOpacity: 0.5,
  38581. activeRadius: 10,
  38582. offsetAngle: 0,
  38583. labelWidth: 15,
  38584. ringWidth: 30,
  38585. customRadius: 0,
  38586. border: false,
  38587. borderWidth: 2,
  38588. borderColor: '#FFFFFF',
  38589. centerColor: '#FFFFFF',
  38590. linearType: 'none',
  38591. customColor: []
  38592. }, opts.type == "pie" ? opts.extra.pie : opts.extra.ring);
  38593. var centerPosition = {
  38594. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38595. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  38596. };
  38597. if (config.pieChartLinePadding == 0) {
  38598. config.pieChartLinePadding = pieOption.activeRadius * opts.pix;
  38599. }
  38600. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  38601. if (pieOption.customRadius > 0) {
  38602. radius = pieOption.customRadius * opts.pix;
  38603. }
  38604. series = getPieDataPoints(series, radius, process);
  38605. var activeRadius = pieOption.activeRadius * opts.pix;
  38606. pieOption.customColor = fillCustomColor(pieOption.linearType, pieOption.customColor, series, config);
  38607. series = series.map(function (eachSeries) {
  38608. eachSeries._start_ += pieOption.offsetAngle * Math.PI / 180;
  38609. return eachSeries;
  38610. });
  38611. series.forEach(function (eachSeries, seriesIndex) {
  38612. if (opts.tooltip) {
  38613. if (opts.tooltip.index == seriesIndex) {
  38614. context.beginPath();
  38615. context.setFillStyle(hexToRgb(eachSeries.color, pieOption.activeOpacity || 0.5));
  38616. context.moveTo(centerPosition.x, centerPosition.y);
  38617. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  38618. context.closePath();
  38619. context.fill();
  38620. }
  38621. }
  38622. context.beginPath();
  38623. context.setLineWidth(pieOption.borderWidth * opts.pix);
  38624. context.lineJoin = "round";
  38625. context.setStrokeStyle(pieOption.borderColor);
  38626. var fillcolor = eachSeries.color;
  38627. if (pieOption.linearType == 'custom') {
  38628. var grd;
  38629. if (context.createCircularGradient) {
  38630. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  38631. } else {
  38632. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  38633. }
  38634. grd.addColorStop(0, hexToRgb(pieOption.customColor[eachSeries.linearIndex], 1));
  38635. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  38636. fillcolor = grd;
  38637. }
  38638. context.setFillStyle(fillcolor);
  38639. context.moveTo(centerPosition.x, centerPosition.y);
  38640. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  38641. context.closePath();
  38642. context.fill();
  38643. if (pieOption.border == true) {
  38644. context.stroke();
  38645. }
  38646. });
  38647. if (opts.type === 'ring') {
  38648. var innerPieWidth = radius * 0.6;
  38649. if (typeof pieOption.ringWidth === 'number' && pieOption.ringWidth > 0) {
  38650. innerPieWidth = Math.max(0, radius - pieOption.ringWidth * opts.pix);
  38651. }
  38652. context.beginPath();
  38653. context.setFillStyle(pieOption.centerColor);
  38654. context.moveTo(centerPosition.x, centerPosition.y);
  38655. context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
  38656. context.closePath();
  38657. context.fill();
  38658. }
  38659. if (opts.dataLabel !== false && process === 1) {
  38660. var valid = false;
  38661. for (var i = 0, len = series.length; i < len; i++) {
  38662. if (series[i].data > 0) {
  38663. valid = true;
  38664. break;
  38665. }
  38666. }
  38667. if (valid) {
  38668. drawPieText(series, opts, config, context, radius, centerPosition);
  38669. }
  38670. }
  38671. if (process === 1 && opts.type === 'ring') {
  38672. drawRingTitle(opts, config, context, centerPosition);
  38673. }
  38674. return {
  38675. center: centerPosition,
  38676. radius: radius,
  38677. series: series
  38678. };
  38679. }
  38680. function drawRoseDataPoints(series, opts, config, context) {
  38681. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38682. var roseOption = assign({}, {
  38683. type: 'area',
  38684. activeOpacity: 0.5,
  38685. activeRadius: 10,
  38686. offsetAngle: 0,
  38687. labelWidth: 15,
  38688. border: false,
  38689. borderWidth: 2,
  38690. borderColor: '#FFFFFF',
  38691. linearType: 'none',
  38692. customColor: []
  38693. }, opts.extra.rose);
  38694. if (config.pieChartLinePadding == 0) {
  38695. config.pieChartLinePadding = roseOption.activeRadius * opts.pix;
  38696. }
  38697. var centerPosition = {
  38698. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38699. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  38700. };
  38701. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  38702. var minRadius = roseOption.minRadius || radius * 0.5;
  38703. series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
  38704. var activeRadius = roseOption.activeRadius * opts.pix;
  38705. roseOption.customColor = fillCustomColor(roseOption.linearType, roseOption.customColor, series, config);
  38706. series = series.map(function (eachSeries) {
  38707. eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
  38708. return eachSeries;
  38709. });
  38710. series.forEach(function (eachSeries, seriesIndex) {
  38711. if (opts.tooltip) {
  38712. if (opts.tooltip.index == seriesIndex) {
  38713. context.beginPath();
  38714. context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
  38715. context.moveTo(centerPosition.x, centerPosition.y);
  38716. context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  38717. context.closePath();
  38718. context.fill();
  38719. }
  38720. }
  38721. context.beginPath();
  38722. context.setLineWidth(roseOption.borderWidth * opts.pix);
  38723. context.lineJoin = "round";
  38724. context.setStrokeStyle(roseOption.borderColor);
  38725. var fillcolor = eachSeries.color;
  38726. if (roseOption.linearType == 'custom') {
  38727. var grd;
  38728. if (context.createCircularGradient) {
  38729. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  38730. } else {
  38731. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  38732. }
  38733. grd.addColorStop(0, hexToRgb(roseOption.customColor[eachSeries.linearIndex], 1));
  38734. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  38735. fillcolor = grd;
  38736. }
  38737. context.setFillStyle(fillcolor);
  38738. context.moveTo(centerPosition.x, centerPosition.y);
  38739. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  38740. context.closePath();
  38741. context.fill();
  38742. if (roseOption.border == true) {
  38743. context.stroke();
  38744. }
  38745. });
  38746. if (opts.dataLabel !== false && process === 1) {
  38747. var valid = false;
  38748. for (var i = 0, len = series.length; i < len; i++) {
  38749. if (series[i].data > 0) {
  38750. valid = true;
  38751. break;
  38752. }
  38753. }
  38754. if (valid) {
  38755. drawPieText(series, opts, config, context, radius, centerPosition);
  38756. }
  38757. }
  38758. return {
  38759. center: centerPosition,
  38760. radius: radius,
  38761. series: series
  38762. };
  38763. }
  38764. function drawArcbarDataPoints(series, opts, config, context) {
  38765. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38766. var arcbarOption = assign({}, {
  38767. startAngle: 0.75,
  38768. endAngle: 0.25,
  38769. type: 'default',
  38770. width: 12,
  38771. gap: 2,
  38772. linearType: 'none',
  38773. customColor: []
  38774. }, opts.extra.arcbar);
  38775. series = getArcbarDataPoints(series, arcbarOption, process);
  38776. var centerPosition;
  38777. if (arcbarOption.centerX || arcbarOption.centerY) {
  38778. centerPosition = {
  38779. x: arcbarOption.centerX ? arcbarOption.centerX : opts.width / 2,
  38780. y: arcbarOption.centerY ? arcbarOption.centerY : opts.height / 2
  38781. };
  38782. } else {
  38783. centerPosition = {
  38784. x: opts.width / 2,
  38785. y: opts.height / 2
  38786. };
  38787. }
  38788. var radius;
  38789. if (arcbarOption.radius) {
  38790. radius = arcbarOption.radius;
  38791. } else {
  38792. radius = Math.min(centerPosition.x, centerPosition.y);
  38793. radius -= 5 * opts.pix;
  38794. radius -= arcbarOption.width / 2;
  38795. }
  38796. arcbarOption.customColor = fillCustomColor(arcbarOption.linearType, arcbarOption.customColor, series, config);
  38797. for (var i = 0; i < series.length; i++) {
  38798. var eachSeries = series[i];
  38799. //背景颜色
  38800. context.setLineWidth(arcbarOption.width * opts.pix);
  38801. context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
  38802. context.setLineCap('round');
  38803. context.beginPath();
  38804. if (arcbarOption.type == 'default') {
  38805. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * Math.PI, false);
  38806. } else {
  38807. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, 0, 2 * Math.PI, false);
  38808. }
  38809. context.stroke();
  38810. //进度条
  38811. var fillColor = eachSeries.color;
  38812. if (arcbarOption.linearType == 'custom') {
  38813. var grd = context.createLinearGradient(centerPosition.x - radius, centerPosition.y, centerPosition.x + radius, centerPosition.y);
  38814. grd.addColorStop(1, hexToRgb(arcbarOption.customColor[eachSeries.linearIndex], 1));
  38815. grd.addColorStop(0, hexToRgb(eachSeries.color, 1));
  38816. fillColor = grd;
  38817. }
  38818. context.setLineWidth(arcbarOption.width * opts.pix);
  38819. context.setStrokeStyle(fillColor);
  38820. context.setLineCap('round');
  38821. context.beginPath();
  38822. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, false);
  38823. context.stroke();
  38824. }
  38825. drawRingTitle(opts, config, context, centerPosition);
  38826. return {
  38827. center: centerPosition,
  38828. radius: radius,
  38829. series: series
  38830. };
  38831. }
  38832. function drawGaugeDataPoints(categories, series, opts, config, context) {
  38833. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  38834. var gaugeOption = assign({}, {
  38835. type: 'default',
  38836. startAngle: 0.75,
  38837. endAngle: 0.25,
  38838. width: 15,
  38839. labelOffset: 13,
  38840. splitLine: {
  38841. fixRadius: 0,
  38842. splitNumber: 10,
  38843. width: 15,
  38844. color: '#FFFFFF',
  38845. childNumber: 5,
  38846. childWidth: 5
  38847. },
  38848. pointer: {
  38849. width: 15,
  38850. color: 'auto'
  38851. }
  38852. }, opts.extra.gauge);
  38853. if (gaugeOption.oldAngle == undefined) {
  38854. gaugeOption.oldAngle = gaugeOption.startAngle;
  38855. }
  38856. if (gaugeOption.oldData == undefined) {
  38857. gaugeOption.oldData = 0;
  38858. }
  38859. categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
  38860. var centerPosition = {
  38861. x: opts.width / 2,
  38862. y: opts.height / 2
  38863. };
  38864. var radius = Math.min(centerPosition.x, centerPosition.y);
  38865. radius -= 5 * opts.pix;
  38866. radius -= gaugeOption.width / 2;
  38867. var innerRadius = radius - gaugeOption.width;
  38868. var totalAngle = 0;
  38869. //判断仪表盘的样式:default百度样式,progress新样式
  38870. if (gaugeOption.type == 'progress') {
  38871. //## 第一步画中心圆形背景和进度条背景
  38872. //中心圆形背景
  38873. var pieRadius = radius - gaugeOption.width * 3;
  38874. context.beginPath();
  38875. var gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
  38876. //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
  38877. gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
  38878. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  38879. context.setFillStyle(gradient);
  38880. context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
  38881. context.fill();
  38882. //画进度条背景
  38883. context.setLineWidth(gaugeOption.width);
  38884. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38885. context.setLineCap('round');
  38886. context.beginPath();
  38887. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
  38888. context.stroke();
  38889. //## 第二步画刻度线
  38890. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38891. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38892. var childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38893. var startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38894. var endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38895. context.save();
  38896. context.translate(centerPosition.x, centerPosition.y);
  38897. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38898. var len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
  38899. var proc = series[0].data * process;
  38900. for (var i = 0; i < len; i++) {
  38901. context.beginPath();
  38902. //刻度线随进度变色
  38903. if (proc > i / len) {
  38904. context.setStrokeStyle(hexToRgb(series[0].color, 1));
  38905. } else {
  38906. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38907. }
  38908. context.setLineWidth(3 * opts.pix);
  38909. context.moveTo(startX, 0);
  38910. context.lineTo(endX, 0);
  38911. context.stroke();
  38912. context.rotate(childAngle * Math.PI);
  38913. }
  38914. context.restore();
  38915. //## 第三步画进度条
  38916. series = getArcbarDataPoints(series, gaugeOption, process);
  38917. context.setLineWidth(gaugeOption.width);
  38918. context.setStrokeStyle(series[0].color);
  38919. context.setLineCap('round');
  38920. context.beginPath();
  38921. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
  38922. context.stroke();
  38923. //## 第四步画指针
  38924. var pointerRadius = radius - gaugeOption.width * 2.5;
  38925. context.save();
  38926. context.translate(centerPosition.x, centerPosition.y);
  38927. context.rotate((series[0]._proportion_ - 1) * Math.PI);
  38928. context.beginPath();
  38929. context.setLineWidth(gaugeOption.width / 3);
  38930. var gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
  38931. gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
  38932. gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
  38933. gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
  38934. context.setStrokeStyle(gradient3);
  38935. context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
  38936. context.stroke();
  38937. context.beginPath();
  38938. context.setLineWidth(1);
  38939. context.setStrokeStyle(series[0].color);
  38940. context.setFillStyle(series[0].color);
  38941. context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38942. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
  38943. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
  38944. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38945. context.stroke();
  38946. context.fill();
  38947. context.restore();
  38948. //default百度样式
  38949. } else {
  38950. //画背景
  38951. context.setLineWidth(gaugeOption.width);
  38952. context.setLineCap('butt');
  38953. for (var _i23 = 0; _i23 < categories.length; _i23++) {
  38954. var eachCategories = categories[_i23];
  38955. context.beginPath();
  38956. context.setStrokeStyle(eachCategories.color);
  38957. context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
  38958. context.stroke();
  38959. }
  38960. context.save();
  38961. //画刻度线
  38962. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38963. var _splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38964. var _childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38965. var _startX2 = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38966. var _endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38967. var childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
  38968. context.translate(centerPosition.x, centerPosition.y);
  38969. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38970. for (var _i24 = 0; _i24 < gaugeOption.splitLine.splitNumber + 1; _i24++) {
  38971. context.beginPath();
  38972. context.setStrokeStyle(gaugeOption.splitLine.color);
  38973. context.setLineWidth(2 * opts.pix);
  38974. context.moveTo(_startX2, 0);
  38975. context.lineTo(_endX, 0);
  38976. context.stroke();
  38977. context.rotate(_splitAngle * Math.PI);
  38978. }
  38979. context.restore();
  38980. context.save();
  38981. context.translate(centerPosition.x, centerPosition.y);
  38982. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38983. for (var _i25 = 0; _i25 < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; _i25++) {
  38984. context.beginPath();
  38985. context.setStrokeStyle(gaugeOption.splitLine.color);
  38986. context.setLineWidth(1 * opts.pix);
  38987. context.moveTo(_startX2, 0);
  38988. context.lineTo(childendX, 0);
  38989. context.stroke();
  38990. context.rotate(_childAngle * Math.PI);
  38991. }
  38992. context.restore();
  38993. //画指针
  38994. series = getGaugeDataPoints(series, categories, gaugeOption, process);
  38995. for (var _i26 = 0; _i26 < series.length; _i26++) {
  38996. var eachSeries = series[_i26];
  38997. context.save();
  38998. context.translate(centerPosition.x, centerPosition.y);
  38999. context.rotate((eachSeries._proportion_ - 1) * Math.PI);
  39000. context.beginPath();
  39001. context.setFillStyle(eachSeries.color);
  39002. context.moveTo(gaugeOption.pointer.width, 0);
  39003. context.lineTo(0, -gaugeOption.pointer.width / 2);
  39004. context.lineTo(-innerRadius, 0);
  39005. context.lineTo(0, gaugeOption.pointer.width / 2);
  39006. context.lineTo(gaugeOption.pointer.width, 0);
  39007. context.closePath();
  39008. context.fill();
  39009. context.beginPath();
  39010. context.setFillStyle('#FFFFFF');
  39011. context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
  39012. context.fill();
  39013. context.restore();
  39014. }
  39015. if (opts.dataLabel !== false) {
  39016. drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
  39017. }
  39018. }
  39019. //画仪表盘标题,副标题
  39020. drawRingTitle(opts, config, context, centerPosition);
  39021. if (process === 1 && opts.type === 'gauge') {
  39022. opts.extra.gauge.oldAngle = series[0]._proportion_;
  39023. opts.extra.gauge.oldData = series[0].data;
  39024. }
  39025. return {
  39026. center: centerPosition,
  39027. radius: radius,
  39028. innerRadius: innerRadius,
  39029. categories: categories,
  39030. totalAngle: totalAngle
  39031. };
  39032. }
  39033. function drawRadarDataPoints(series, opts, config, context) {
  39034. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39035. var radarOption = assign({}, {
  39036. gridColor: '#cccccc',
  39037. gridType: 'radar',
  39038. opacity: 0.2,
  39039. gridCount: 3,
  39040. border: false,
  39041. borderWidth: 2
  39042. }, opts.extra.radar);
  39043. var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
  39044. var centerPosition = {
  39045. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39046. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  39047. };
  39048. var xr = (opts.width - opts.area[1] - opts.area[3]) / 2;
  39049. var yr = (opts.height - opts.area[0] - opts.area[2]) / 2;
  39050. var radius = Math.min(xr - (getMaxTextListLength(opts.categories, config.fontSize, context) + config.radarLabelTextMargin), yr - config.radarLabelTextMargin);
  39051. radius -= config.radarLabelTextMargin * opts.pix;
  39052. // 画分割线
  39053. context.beginPath();
  39054. context.setLineWidth(1 * opts.pix);
  39055. context.setStrokeStyle(radarOption.gridColor);
  39056. coordinateAngle.forEach(function (angle) {
  39057. var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
  39058. context.moveTo(centerPosition.x, centerPosition.y);
  39059. context.lineTo(pos.x, pos.y);
  39060. });
  39061. context.stroke();
  39062. context.closePath();
  39063. // 画背景网格
  39064. var _loop = function _loop(i) {
  39065. var startPos = {};
  39066. context.beginPath();
  39067. context.setLineWidth(1 * opts.pix);
  39068. context.setStrokeStyle(radarOption.gridColor);
  39069. if (radarOption.gridType == 'radar') {
  39070. coordinateAngle.forEach(function (angle, index) {
  39071. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
  39072. if (index === 0) {
  39073. startPos = pos;
  39074. context.moveTo(pos.x, pos.y);
  39075. } else {
  39076. context.lineTo(pos.x, pos.y);
  39077. }
  39078. });
  39079. context.lineTo(startPos.x, startPos.y);
  39080. } else {
  39081. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
  39082. context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
  39083. }
  39084. context.stroke();
  39085. context.closePath();
  39086. };
  39087. for (var i = 1; i <= radarOption.gridCount; i++) {
  39088. _loop(i);
  39089. }
  39090. var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
  39091. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  39092. // 绘制区域数据
  39093. context.beginPath();
  39094. context.setLineWidth(radarOption.borderWidth * opts.pix);
  39095. context.setStrokeStyle(eachSeries.color);
  39096. context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
  39097. eachSeries.data.forEach(function (item, index) {
  39098. if (index === 0) {
  39099. context.moveTo(item.position.x, item.position.y);
  39100. } else {
  39101. context.lineTo(item.position.x, item.position.y);
  39102. }
  39103. });
  39104. context.closePath();
  39105. context.fill();
  39106. if (radarOption.border === true) {
  39107. context.stroke();
  39108. }
  39109. context.closePath();
  39110. if (opts.dataPointShape !== false) {
  39111. var points = eachSeries.data.map(function (item) {
  39112. return item.position;
  39113. });
  39114. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39115. }
  39116. });
  39117. // draw label text
  39118. drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
  39119. // draw dataLabel
  39120. if (opts.dataLabel !== false && process === 1) {
  39121. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  39122. context.beginPath();
  39123. var fontSize = eachSeries.textSize * opts.pix || config.fontSize;
  39124. context.setFontSize(fontSize);
  39125. context.setFillStyle(eachSeries.textColor || opts.fontColor);
  39126. eachSeries.data.forEach(function (item, index) {
  39127. //如果是中心点垂直的上下点位
  39128. if (Math.abs(item.position.x - centerPosition.x) < 2) {
  39129. //如果在上面
  39130. if (item.position.y < centerPosition.y) {
  39131. context.setTextAlign('center');
  39132. context.fillText(item.value, item.position.x, item.position.y - 4);
  39133. } else {
  39134. context.setTextAlign('center');
  39135. context.fillText(item.value, item.position.x, item.position.y + fontSize + 2);
  39136. }
  39137. } else {
  39138. //如果在左侧
  39139. if (item.position.x < centerPosition.x) {
  39140. context.setTextAlign('right');
  39141. context.fillText(item.value, item.position.x - 4, item.position.y + fontSize / 2 - 2);
  39142. } else {
  39143. context.setTextAlign('left');
  39144. context.fillText(item.value, item.position.x + 4, item.position.y + fontSize / 2 - 2);
  39145. }
  39146. }
  39147. });
  39148. context.closePath();
  39149. context.stroke();
  39150. });
  39151. context.setTextAlign('left');
  39152. }
  39153. return {
  39154. center: centerPosition,
  39155. radius: radius,
  39156. angleList: coordinateAngle
  39157. };
  39158. }
  39159. function normalInt(min, max, iter) {
  39160. iter = iter == 0 ? 1 : iter;
  39161. var arr = [];
  39162. for (var i = 0; i < iter; i++) {
  39163. arr[i] = Math.random();
  39164. }
  39165. ;
  39166. return Math.floor(arr.reduce(function (i, j) {
  39167. return i + j;
  39168. }) / iter * (max - min)) + min;
  39169. }
  39170. ;
  39171. function collisionNew(area, points, width, height) {
  39172. var isIn = false;
  39173. for (var i = 0; i < points.length; i++) {
  39174. if (points[i].area) {
  39175. if (area[3] < points[i].area[1] || area[0] > points[i].area[2] || area[1] > points[i].area[3] || area[2] < points[i].area[0]) {
  39176. if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
  39177. isIn = true;
  39178. break;
  39179. } else {
  39180. isIn = false;
  39181. }
  39182. } else {
  39183. isIn = true;
  39184. break;
  39185. }
  39186. }
  39187. }
  39188. return isIn;
  39189. }
  39190. ;
  39191. function getBoundingBox(data) {
  39192. var bounds = {},
  39193. coords;
  39194. bounds.xMin = 180;
  39195. bounds.xMax = 0;
  39196. bounds.yMin = 90;
  39197. bounds.yMax = 0;
  39198. for (var i = 0; i < data.length; i++) {
  39199. var coorda = data[i].geometry.coordinates;
  39200. for (var k = 0; k < coorda.length; k++) {
  39201. coords = coorda[k];
  39202. if (coords.length == 1) {
  39203. coords = coords[0];
  39204. }
  39205. for (var j = 0; j < coords.length; j++) {
  39206. var longitude = coords[j][0];
  39207. var latitude = coords[j][1];
  39208. var point = {
  39209. x: longitude,
  39210. y: latitude
  39211. };
  39212. bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
  39213. bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
  39214. bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
  39215. bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
  39216. }
  39217. }
  39218. }
  39219. return bounds;
  39220. }
  39221. function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
  39222. return {
  39223. x: (longitude - bounds.xMin) * scale + xoffset,
  39224. y: (bounds.yMax - latitude) * scale + yoffset
  39225. };
  39226. }
  39227. function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
  39228. return {
  39229. x: (pointX - xoffset) / scale + bounds.xMin,
  39230. y: bounds.yMax - (pointY - yoffset) / scale
  39231. };
  39232. }
  39233. function isRayIntersectsSegment(poi, s_poi, e_poi) {
  39234. if (s_poi[1] == e_poi[1]) {
  39235. return false;
  39236. }
  39237. if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
  39238. return false;
  39239. }
  39240. if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
  39241. return false;
  39242. }
  39243. if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
  39244. return false;
  39245. }
  39246. if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
  39247. return false;
  39248. }
  39249. if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
  39250. return false;
  39251. }
  39252. var xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
  39253. if (xseg < poi[0]) {
  39254. return false;
  39255. } else {
  39256. return true;
  39257. }
  39258. }
  39259. function isPoiWithinPoly(poi, poly, mercator) {
  39260. var sinsc = 0;
  39261. for (var i = 0; i < poly.length; i++) {
  39262. var epoly = poly[i][0];
  39263. if (poly.length == 1) {
  39264. epoly = poly[i][0];
  39265. }
  39266. for (var j = 0; j < epoly.length - 1; j++) {
  39267. var s_poi = epoly[j];
  39268. var e_poi = epoly[j + 1];
  39269. if (mercator) {
  39270. s_poi = lonlat2mercator(epoly[j][0], epoly[j][1]);
  39271. e_poi = lonlat2mercator(epoly[j + 1][0], epoly[j + 1][1]);
  39272. }
  39273. if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
  39274. sinsc += 1;
  39275. }
  39276. }
  39277. }
  39278. if (sinsc % 2 == 1) {
  39279. return true;
  39280. } else {
  39281. return false;
  39282. }
  39283. }
  39284. function drawMapDataPoints(series, opts, config, context) {
  39285. var mapOption = assign({}, {
  39286. border: true,
  39287. mercator: false,
  39288. borderWidth: 1,
  39289. borderColor: '#666666',
  39290. fillOpacity: 0.6,
  39291. activeBorderColor: '#f04864',
  39292. activeFillColor: '#facc14',
  39293. activeFillOpacity: 1
  39294. }, opts.extra.map);
  39295. var coords, point;
  39296. var data = series;
  39297. var bounds = getBoundingBox(data);
  39298. if (mapOption.mercator) {
  39299. var max = lonlat2mercator(bounds.xMax, bounds.yMax);
  39300. var min = lonlat2mercator(bounds.xMin, bounds.yMin);
  39301. bounds.xMax = max[0];
  39302. bounds.yMax = max[1];
  39303. bounds.xMin = min[0];
  39304. bounds.yMin = min[1];
  39305. }
  39306. var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
  39307. var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
  39308. var scale = xScale < yScale ? xScale : yScale;
  39309. var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
  39310. var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
  39311. for (var i = 0; i < data.length; i++) {
  39312. context.beginPath();
  39313. context.setLineWidth(mapOption.borderWidth * opts.pix);
  39314. context.setStrokeStyle(mapOption.borderColor);
  39315. context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
  39316. if (opts.tooltip) {
  39317. if (opts.tooltip.index == i) {
  39318. context.setStrokeStyle(mapOption.activeBorderColor);
  39319. context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
  39320. }
  39321. }
  39322. var coorda = data[i].geometry.coordinates;
  39323. for (var k = 0; k < coorda.length; k++) {
  39324. coords = coorda[k];
  39325. if (coords.length == 1) {
  39326. coords = coords[0];
  39327. }
  39328. for (var j = 0; j < coords.length; j++) {
  39329. var gaosi = Array(2);
  39330. if (mapOption.mercator) {
  39331. gaosi = lonlat2mercator(coords[j][0], coords[j][1]);
  39332. } else {
  39333. gaosi = coords[j];
  39334. }
  39335. point = coordinateToPoint(gaosi[1], gaosi[0], bounds, scale, xoffset, yoffset);
  39336. if (j === 0) {
  39337. context.beginPath();
  39338. context.moveTo(point.x, point.y);
  39339. } else {
  39340. context.lineTo(point.x, point.y);
  39341. }
  39342. }
  39343. context.fill();
  39344. if (mapOption.border == true) {
  39345. context.stroke();
  39346. }
  39347. }
  39348. if (opts.dataLabel == true) {
  39349. var centerPoint = data[i].properties.centroid;
  39350. if (centerPoint) {
  39351. if (mapOption.mercator) {
  39352. centerPoint = lonlat2mercator(data[i].properties.centroid[0], data[i].properties.centroid[1]);
  39353. }
  39354. point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
  39355. var fontSize = data[i].textSize * opts.pix || config.fontSize;
  39356. var text = data[i].properties.name;
  39357. context.beginPath();
  39358. context.setFontSize(fontSize);
  39359. context.setFillStyle(data[i].textColor || opts.fontColor);
  39360. context.fillText(text, point.x - measureText(text, fontSize, context) / 2, point.y + fontSize / 2);
  39361. context.closePath();
  39362. context.stroke();
  39363. }
  39364. }
  39365. }
  39366. opts.chartData.mapData = {
  39367. bounds: bounds,
  39368. scale: scale,
  39369. xoffset: xoffset,
  39370. yoffset: yoffset,
  39371. mercator: mapOption.mercator
  39372. };
  39373. drawToolTipBridge(opts, config, context, 1);
  39374. context.draw();
  39375. }
  39376. function getWordCloudPoint(opts, type, context) {
  39377. var points = opts.series;
  39378. switch (type) {
  39379. case 'normal':
  39380. for (var i = 0; i < points.length; i++) {
  39381. var text = points[i].name;
  39382. var tHeight = points[i].textSize * opts.pix;
  39383. var tWidth = measureText(text, tHeight, context);
  39384. var x = void 0,
  39385. y = void 0;
  39386. var area = void 0;
  39387. var breaknum = 0;
  39388. while (true) {
  39389. breaknum++;
  39390. x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
  39391. y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
  39392. area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
  39393. var isCollision = collisionNew(area, points, opts.width, opts.height);
  39394. if (!isCollision) break;
  39395. if (breaknum == 1000) {
  39396. area = [-100, -100, -100, -100];
  39397. break;
  39398. }
  39399. }
  39400. ;
  39401. points[i].area = area;
  39402. }
  39403. break;
  39404. case 'vertical':
  39405. var Spin = function Spin() {
  39406. //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
  39407. if (Math.random() > 0.7) {
  39408. return true;
  39409. } else {
  39410. return false;
  39411. }
  39412. ;
  39413. };
  39414. ;
  39415. for (var _i27 = 0; _i27 < points.length; _i27++) {
  39416. var _text = points[_i27].name;
  39417. var _tHeight = points[_i27].textSize * opts.pix;
  39418. var _tWidth = measureText(_text, _tHeight, context);
  39419. var isSpin = Spin();
  39420. var _x = void 0,
  39421. _y = void 0,
  39422. _area = void 0,
  39423. areav = void 0;
  39424. var _breaknum = 0;
  39425. while (true) {
  39426. _breaknum++;
  39427. var _isCollision = void 0;
  39428. if (isSpin) {
  39429. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  39430. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  39431. _area = [_y - 5 - _tWidth + opts.width / 2, -_x - 5 + opts.height / 2, _y + 5 + opts.width / 2, -_x + _tHeight + 5 + opts.height / 2];
  39432. areav = [opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) - 5, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) - 5, opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) + _tHeight, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) + _tWidth + 5];
  39433. _isCollision = collisionNew(areav, points, opts.height, opts.width);
  39434. } else {
  39435. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  39436. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  39437. _area = [_x - 5 + opts.width / 2, _y - 5 - _tHeight + opts.height / 2, _x + _tWidth + 5 + opts.width / 2, _y + 5 + opts.height / 2];
  39438. _isCollision = collisionNew(_area, points, opts.width, opts.height);
  39439. }
  39440. if (!_isCollision) break;
  39441. if (_breaknum == 1000) {
  39442. _area = [-1000, -1000, -1000, -1000];
  39443. break;
  39444. }
  39445. }
  39446. ;
  39447. if (isSpin) {
  39448. points[_i27].area = areav;
  39449. points[_i27].areav = _area;
  39450. } else {
  39451. points[_i27].area = _area;
  39452. }
  39453. points[_i27].rotate = isSpin;
  39454. }
  39455. ;
  39456. break;
  39457. }
  39458. return points;
  39459. }
  39460. function drawWordCloudDataPoints(series, opts, config, context) {
  39461. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39462. var wordOption = assign({}, {
  39463. type: 'normal',
  39464. autoColors: true
  39465. }, opts.extra.word);
  39466. if (!opts.chartData.wordCloudData) {
  39467. opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type, context);
  39468. }
  39469. context.beginPath();
  39470. context.setFillStyle(opts.background);
  39471. context.rect(0, 0, opts.width, opts.height);
  39472. context.fill();
  39473. context.save();
  39474. var points = opts.chartData.wordCloudData;
  39475. context.translate(opts.width / 2, opts.height / 2);
  39476. for (var i = 0; i < points.length; i++) {
  39477. context.save();
  39478. if (points[i].rotate) {
  39479. context.rotate(90 * Math.PI / 180);
  39480. }
  39481. var text = points[i].name;
  39482. var tHeight = points[i].textSize * opts.pix;
  39483. var tWidth = measureText(text, tHeight, context);
  39484. context.beginPath();
  39485. context.setStrokeStyle(points[i].color);
  39486. context.setFillStyle(points[i].color);
  39487. context.setFontSize(tHeight);
  39488. if (points[i].rotate) {
  39489. if (points[i].areav[0] > 0) {
  39490. if (opts.tooltip) {
  39491. if (opts.tooltip.index == i) {
  39492. context.strokeText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  39493. } else {
  39494. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  39495. }
  39496. } else {
  39497. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  39498. }
  39499. }
  39500. } else {
  39501. if (points[i].area[0] > 0) {
  39502. if (opts.tooltip) {
  39503. if (opts.tooltip.index == i) {
  39504. context.strokeText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  39505. } else {
  39506. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  39507. }
  39508. } else {
  39509. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  39510. }
  39511. }
  39512. }
  39513. context.stroke();
  39514. context.restore();
  39515. }
  39516. context.restore();
  39517. }
  39518. function drawFunnelDataPoints(series, opts, config, context) {
  39519. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39520. var funnelOption = assign({}, {
  39521. type: 'funnel',
  39522. activeWidth: 10,
  39523. activeOpacity: 0.3,
  39524. border: false,
  39525. borderWidth: 2,
  39526. borderColor: '#FFFFFF',
  39527. fillOpacity: 1,
  39528. labelAlign: 'right',
  39529. linearType: 'none',
  39530. customColor: []
  39531. }, opts.extra.funnel);
  39532. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
  39533. var centerPosition = {
  39534. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39535. y: opts.height - opts.area[2]
  39536. };
  39537. var activeWidth = funnelOption.activeWidth * opts.pix;
  39538. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
  39539. series = getFunnelDataPoints(series, radius, funnelOption.type, eachSpacing, process);
  39540. context.save();
  39541. context.translate(centerPosition.x, centerPosition.y);
  39542. funnelOption.customColor = fillCustomColor(funnelOption.linearType, funnelOption.customColor, series, config);
  39543. if (funnelOption.type == 'pyramid') {
  39544. for (var i = 0; i < series.length; i++) {
  39545. if (i == series.length - 1) {
  39546. if (opts.tooltip) {
  39547. if (opts.tooltip.index == i) {
  39548. context.beginPath();
  39549. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  39550. context.moveTo(-activeWidth, -eachSpacing);
  39551. context.lineTo(-series[i].radius - activeWidth, 0);
  39552. context.lineTo(series[i].radius + activeWidth, 0);
  39553. context.lineTo(activeWidth, -eachSpacing);
  39554. context.lineTo(-activeWidth, -eachSpacing);
  39555. context.closePath();
  39556. context.fill();
  39557. }
  39558. }
  39559. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  39560. context.beginPath();
  39561. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39562. context.setStrokeStyle(funnelOption.borderColor);
  39563. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  39564. if (funnelOption.linearType == 'custom') {
  39565. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  39566. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39567. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  39568. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39569. fillColor = grd;
  39570. }
  39571. context.setFillStyle(fillColor);
  39572. context.moveTo(0, -eachSpacing);
  39573. context.lineTo(-series[i].radius, 0);
  39574. context.lineTo(series[i].radius, 0);
  39575. context.lineTo(0, -eachSpacing);
  39576. context.closePath();
  39577. context.fill();
  39578. if (funnelOption.border == true) {
  39579. context.stroke();
  39580. }
  39581. } else {
  39582. if (opts.tooltip) {
  39583. if (opts.tooltip.index == i) {
  39584. context.beginPath();
  39585. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  39586. context.moveTo(0, 0);
  39587. context.lineTo(-series[i].radius - activeWidth, 0);
  39588. context.lineTo(-series[i + 1].radius - activeWidth, -eachSpacing);
  39589. context.lineTo(series[i + 1].radius + activeWidth, -eachSpacing);
  39590. context.lineTo(series[i].radius + activeWidth, 0);
  39591. context.lineTo(0, 0);
  39592. context.closePath();
  39593. context.fill();
  39594. }
  39595. }
  39596. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  39597. context.beginPath();
  39598. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39599. context.setStrokeStyle(funnelOption.borderColor);
  39600. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  39601. if (funnelOption.linearType == 'custom') {
  39602. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  39603. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39604. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  39605. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39606. fillColor = grd;
  39607. }
  39608. context.setFillStyle(fillColor);
  39609. context.moveTo(0, 0);
  39610. context.lineTo(-series[i].radius, 0);
  39611. context.lineTo(-series[i + 1].radius, -eachSpacing);
  39612. context.lineTo(series[i + 1].radius, -eachSpacing);
  39613. context.lineTo(series[i].radius, 0);
  39614. context.lineTo(0, 0);
  39615. context.closePath();
  39616. context.fill();
  39617. if (funnelOption.border == true) {
  39618. context.stroke();
  39619. }
  39620. }
  39621. context.translate(0, -eachSpacing);
  39622. }
  39623. } else {
  39624. for (var _i28 = 0; _i28 < series.length; _i28++) {
  39625. if (_i28 == 0) {
  39626. if (opts.tooltip) {
  39627. if (opts.tooltip.index == _i28) {
  39628. context.beginPath();
  39629. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  39630. context.moveTo(-activeWidth, 0);
  39631. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  39632. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  39633. context.lineTo(activeWidth, 0);
  39634. context.lineTo(-activeWidth, 0);
  39635. context.closePath();
  39636. context.fill();
  39637. }
  39638. }
  39639. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing, centerPosition.x + series[_i28].radius, centerPosition.y];
  39640. context.beginPath();
  39641. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39642. context.setStrokeStyle(funnelOption.borderColor);
  39643. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  39644. if (funnelOption.linearType == 'custom') {
  39645. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  39646. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39647. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  39648. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39649. fillColor = grd;
  39650. }
  39651. context.setFillStyle(fillColor);
  39652. context.moveTo(0, 0);
  39653. context.lineTo(-series[_i28].radius, -eachSpacing);
  39654. context.lineTo(series[_i28].radius, -eachSpacing);
  39655. context.lineTo(0, 0);
  39656. context.closePath();
  39657. context.fill();
  39658. if (funnelOption.border == true) {
  39659. context.stroke();
  39660. }
  39661. } else {
  39662. if (opts.tooltip) {
  39663. if (opts.tooltip.index == _i28) {
  39664. context.beginPath();
  39665. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  39666. context.moveTo(0, 0);
  39667. context.lineTo(-series[_i28 - 1].radius - activeWidth, 0);
  39668. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  39669. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  39670. context.lineTo(series[_i28 - 1].radius + activeWidth, 0);
  39671. context.lineTo(0, 0);
  39672. context.closePath();
  39673. context.fill();
  39674. }
  39675. }
  39676. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing * (_i28 + 1), centerPosition.x + series[_i28].radius, centerPosition.y - eachSpacing * _i28];
  39677. context.beginPath();
  39678. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39679. context.setStrokeStyle(funnelOption.borderColor);
  39680. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  39681. if (funnelOption.linearType == 'custom') {
  39682. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  39683. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39684. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  39685. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39686. fillColor = grd;
  39687. }
  39688. context.setFillStyle(fillColor);
  39689. context.moveTo(0, 0);
  39690. context.lineTo(-series[_i28 - 1].radius, 0);
  39691. context.lineTo(-series[_i28].radius, -eachSpacing);
  39692. context.lineTo(series[_i28].radius, -eachSpacing);
  39693. context.lineTo(series[_i28 - 1].radius, 0);
  39694. context.lineTo(0, 0);
  39695. context.closePath();
  39696. context.fill();
  39697. if (funnelOption.border == true) {
  39698. context.stroke();
  39699. }
  39700. }
  39701. context.translate(0, -eachSpacing);
  39702. }
  39703. }
  39704. context.restore();
  39705. if (opts.dataLabel !== false && process === 1) {
  39706. drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
  39707. }
  39708. return {
  39709. center: centerPosition,
  39710. radius: radius,
  39711. series: series
  39712. };
  39713. }
  39714. function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
  39715. for (var i = 0; i < series.length; i++) {
  39716. var item = series[i];
  39717. var startX = void 0,
  39718. endX = void 0,
  39719. startY = void 0,
  39720. fontSize = void 0;
  39721. var text = item.formatter ? item.formatter(item, i, series) : util.toFixed(item._proportion_ * 100) + '%';
  39722. if (labelAlign == 'right') {
  39723. if (opts.extra.funnel.type === 'pyramid') {
  39724. if (i == series.length - 1) {
  39725. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  39726. } else {
  39727. startX = (item.funnelArea[2] + series[i + 1].funnelArea[2]) / 2;
  39728. }
  39729. } else {
  39730. if (i == 0) {
  39731. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  39732. } else {
  39733. startX = (item.funnelArea[2] + series[i - 1].funnelArea[2]) / 2;
  39734. }
  39735. }
  39736. endX = startX + activeWidth * 2;
  39737. startY = item.funnelArea[1] + eachSpacing / 2;
  39738. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  39739. context.setLineWidth(1 * opts.pix);
  39740. context.setStrokeStyle(item.color);
  39741. context.setFillStyle(item.color);
  39742. context.beginPath();
  39743. context.moveTo(startX, startY);
  39744. context.lineTo(endX, startY);
  39745. context.stroke();
  39746. context.closePath();
  39747. context.beginPath();
  39748. context.moveTo(endX, startY);
  39749. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  39750. context.closePath();
  39751. context.fill();
  39752. context.beginPath();
  39753. context.setFontSize(fontSize);
  39754. context.setFillStyle(item.textColor || opts.fontColor);
  39755. context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
  39756. context.closePath();
  39757. context.stroke();
  39758. context.closePath();
  39759. } else {
  39760. if (opts.extra.funnel.type === 'pyramid') {
  39761. if (i == series.length - 1) {
  39762. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  39763. } else {
  39764. startX = (item.funnelArea[0] + series[i + 1].funnelArea[0]) / 2;
  39765. }
  39766. } else {
  39767. if (i == 0) {
  39768. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  39769. } else {
  39770. startX = (item.funnelArea[0] + series[i - 1].funnelArea[0]) / 2;
  39771. }
  39772. }
  39773. endX = startX - activeWidth * 2;
  39774. startY = item.funnelArea[1] + eachSpacing / 2;
  39775. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  39776. context.setLineWidth(1 * opts.pix);
  39777. context.setStrokeStyle(item.color);
  39778. context.setFillStyle(item.color);
  39779. context.beginPath();
  39780. context.moveTo(startX, startY);
  39781. context.lineTo(endX, startY);
  39782. context.stroke();
  39783. context.closePath();
  39784. context.beginPath();
  39785. context.moveTo(endX, startY);
  39786. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  39787. context.closePath();
  39788. context.fill();
  39789. context.beginPath();
  39790. context.setFontSize(fontSize);
  39791. context.setFillStyle(item.textColor || opts.fontColor);
  39792. context.fillText(text, endX - 5 - measureText(text, fontSize, context), startY + fontSize / 2 - 2);
  39793. context.closePath();
  39794. context.stroke();
  39795. context.closePath();
  39796. }
  39797. }
  39798. }
  39799. function drawCanvas(opts, context) {
  39800. context.draw();
  39801. }
  39802. var Timing = {
  39803. easeIn: function easeIn(pos) {
  39804. return Math.pow(pos, 3);
  39805. },
  39806. easeOut: function easeOut(pos) {
  39807. return Math.pow(pos - 1, 3) + 1;
  39808. },
  39809. easeInOut: function easeInOut(pos) {
  39810. if ((pos /= 0.5) < 1) {
  39811. return 0.5 * Math.pow(pos, 3);
  39812. } else {
  39813. return 0.5 * (Math.pow(pos - 2, 3) + 2);
  39814. }
  39815. },
  39816. linear: function linear(pos) {
  39817. return pos;
  39818. }
  39819. };
  39820. function Animation(opts) {
  39821. this.isStop = false;
  39822. opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
  39823. opts.timing = opts.timing || 'easeInOut';
  39824. var delay = 17;
  39825. function createAnimationFrame() {
  39826. if (typeof setTimeout !== 'undefined') {
  39827. return function (step, delay) {
  39828. setTimeout(function () {
  39829. var timeStamp = +new Date();
  39830. step(timeStamp);
  39831. }, delay);
  39832. };
  39833. } else if (typeof requestAnimationFrame !== 'undefined') {
  39834. return requestAnimationFrame;
  39835. } else {
  39836. return function (step) {
  39837. step(null);
  39838. };
  39839. }
  39840. }
  39841. ;
  39842. var animationFrame = createAnimationFrame();
  39843. var startTimeStamp = null;
  39844. var _step = function step(timestamp) {
  39845. if (timestamp === null || this.isStop === true) {
  39846. opts.onProcess && opts.onProcess(1);
  39847. opts.onAnimationFinish && opts.onAnimationFinish();
  39848. return;
  39849. }
  39850. if (startTimeStamp === null) {
  39851. startTimeStamp = timestamp;
  39852. }
  39853. if (timestamp - startTimeStamp < opts.duration) {
  39854. var process = (timestamp - startTimeStamp) / opts.duration;
  39855. var timingFunction = Timing[opts.timing];
  39856. process = timingFunction(process);
  39857. opts.onProcess && opts.onProcess(process);
  39858. animationFrame(_step, delay);
  39859. } else {
  39860. opts.onProcess && opts.onProcess(1);
  39861. opts.onAnimationFinish && opts.onAnimationFinish();
  39862. }
  39863. };
  39864. _step = _step.bind(this);
  39865. animationFrame(_step, delay);
  39866. }
  39867. Animation.prototype.stop = function () {
  39868. this.isStop = true;
  39869. };
  39870. function drawCharts(type, opts, config, context) {
  39871. var _this = this;
  39872. var series = opts.series;
  39873. //兼容ECharts饼图类数据格式
  39874. if (type === 'pie' || type === 'ring' || type === 'rose' || type === 'funnel') {
  39875. series = fixPieSeries(series, opts, config);
  39876. }
  39877. var categories = opts.categories;
  39878. series = fillSeries(series, opts, config);
  39879. var duration = opts.animation ? opts.duration : 0;
  39880. _this.animationInstance && _this.animationInstance.stop();
  39881. var seriesMA = null;
  39882. if (type == 'candle') {
  39883. var average = assign({}, opts.extra.candle.average);
  39884. if (average.show) {
  39885. seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
  39886. seriesMA = fillSeries(seriesMA, opts, config);
  39887. opts.seriesMA = seriesMA;
  39888. } else if (opts.seriesMA) {
  39889. seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
  39890. } else {
  39891. seriesMA = series;
  39892. }
  39893. } else {
  39894. seriesMA = series;
  39895. }
  39896. /* 过滤掉show=false的series */
  39897. opts._series_ = series = filterSeries(series);
  39898. //重新计算图表区域
  39899. opts.area = new Array(4);
  39900. //复位绘图区域
  39901. for (var j = 0; j < 4; j++) {
  39902. opts.area[j] = opts.padding[j] * opts.pix;
  39903. }
  39904. //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
  39905. var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData, context),
  39906. legendHeight = _calLegendData.area.wholeHeight,
  39907. legendWidth = _calLegendData.area.wholeWidth;
  39908. switch (opts.legend.position) {
  39909. case 'top':
  39910. opts.area[0] += legendHeight;
  39911. break;
  39912. case 'bottom':
  39913. opts.area[2] += legendHeight;
  39914. break;
  39915. case 'left':
  39916. opts.area[3] += legendWidth;
  39917. break;
  39918. case 'right':
  39919. opts.area[1] += legendWidth;
  39920. break;
  39921. }
  39922. var _calYAxisData = {},
  39923. yAxisWidth = 0;
  39924. if (opts.type === 'line' || opts.type === 'column' || opts.type === 'area' || opts.type === 'mix' || opts.type === 'candle' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  39925. _calYAxisData = calYAxisData(series, opts, config, context);
  39926. yAxisWidth = _calYAxisData.yAxisWidth;
  39927. //如果显示Y轴标题
  39928. if (opts.yAxis.showTitle) {
  39929. var maxTitleHeight = 0;
  39930. for (var i = 0; i < opts.yAxis.data.length; i++) {
  39931. maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize * opts.pix : config.fontSize);
  39932. }
  39933. opts.area[0] += maxTitleHeight;
  39934. }
  39935. var rightIndex = 0,
  39936. leftIndex = 0;
  39937. //计算主绘图区域左右位置
  39938. for (var _i29 = 0; _i29 < yAxisWidth.length; _i29++) {
  39939. if (yAxisWidth[_i29].position == 'left') {
  39940. if (leftIndex > 0) {
  39941. opts.area[3] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39942. } else {
  39943. opts.area[3] += yAxisWidth[_i29].width;
  39944. }
  39945. leftIndex += 1;
  39946. } else if (yAxisWidth[_i29].position == 'right') {
  39947. if (rightIndex > 0) {
  39948. opts.area[1] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39949. } else {
  39950. opts.area[1] += yAxisWidth[_i29].width;
  39951. }
  39952. rightIndex += 1;
  39953. }
  39954. }
  39955. } else {
  39956. config.yAxisWidth = yAxisWidth;
  39957. }
  39958. opts.chartData.yAxisData = _calYAxisData;
  39959. if (opts.categories && opts.categories.length && opts.type !== 'radar' && opts.type !== 'gauge' && opts.type !== 'bar') {
  39960. opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
  39961. var _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39962. xAxisHeight = _calCategoriesData.xAxisHeight,
  39963. angle = _calCategoriesData.angle;
  39964. config.xAxisHeight = xAxisHeight;
  39965. config._xAxisTextAngle_ = angle;
  39966. opts.area[2] += xAxisHeight;
  39967. opts.chartData.categoriesData = _calCategoriesData;
  39968. } else {
  39969. if (opts.type === 'line' || opts.type === 'area' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  39970. opts.chartData.xAxisData = calXAxisData(series, opts, config, context);
  39971. categories = opts.chartData.xAxisData.rangesFormat;
  39972. var _calCategoriesData2 = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39973. _xAxisHeight = _calCategoriesData2.xAxisHeight,
  39974. _angle = _calCategoriesData2.angle;
  39975. config.xAxisHeight = _xAxisHeight;
  39976. config._xAxisTextAngle_ = _angle;
  39977. opts.area[2] += _xAxisHeight;
  39978. opts.chartData.categoriesData = _calCategoriesData2;
  39979. } else {
  39980. opts.chartData.xAxisData = {
  39981. xAxisPoints: []
  39982. };
  39983. }
  39984. }
  39985. //计算右对齐偏移距离
  39986. if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
  39987. var offsetLeft = 0,
  39988. xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  39989. startX = opts.chartData.xAxisData.startX,
  39990. endX = opts.chartData.xAxisData.endX,
  39991. eachSpacing = opts.chartData.xAxisData.eachSpacing;
  39992. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  39993. var screenWidth = endX - startX;
  39994. offsetLeft = screenWidth - totalWidth;
  39995. _this.scrollOption = {
  39996. currentOffset: offsetLeft,
  39997. startTouchX: offsetLeft,
  39998. distance: 0,
  39999. lastMoveTime: 0
  40000. };
  40001. opts._scrollDistance_ = offsetLeft;
  40002. }
  40003. if (type === 'pie' || type === 'ring' || type === 'rose') {
  40004. config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA, config, context, opts);
  40005. }
  40006. switch (type) {
  40007. case 'word':
  40008. this.animationInstance = new Animation({
  40009. timing: opts.timing,
  40010. duration: duration,
  40011. onProcess: function onProcess(process) {
  40012. context.clearRect(0, 0, opts.width, opts.height);
  40013. if (opts.rotate) {
  40014. contextRotate(context, opts);
  40015. }
  40016. drawWordCloudDataPoints(series, opts, config, context, process);
  40017. drawCanvas(opts, context);
  40018. },
  40019. onAnimationFinish: function onAnimationFinish() {
  40020. _this.uevent.trigger('renderComplete');
  40021. }
  40022. });
  40023. break;
  40024. case 'map':
  40025. context.clearRect(0, 0, opts.width, opts.height);
  40026. drawMapDataPoints(series, opts, config, context);
  40027. break;
  40028. case 'funnel':
  40029. this.animationInstance = new Animation({
  40030. timing: opts.timing,
  40031. duration: duration,
  40032. onProcess: function onProcess(process) {
  40033. context.clearRect(0, 0, opts.width, opts.height);
  40034. if (opts.rotate) {
  40035. contextRotate(context, opts);
  40036. }
  40037. opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
  40038. drawLegend(opts.series, opts, config, context, opts.chartData);
  40039. drawToolTipBridge(opts, config, context, process);
  40040. drawCanvas(opts, context);
  40041. },
  40042. onAnimationFinish: function onAnimationFinish() {
  40043. _this.uevent.trigger('renderComplete');
  40044. }
  40045. });
  40046. break;
  40047. case 'line':
  40048. this.animationInstance = new Animation({
  40049. timing: opts.timing,
  40050. duration: duration,
  40051. onProcess: function onProcess(process) {
  40052. context.clearRect(0, 0, opts.width, opts.height);
  40053. if (opts.rotate) {
  40054. contextRotate(context, opts);
  40055. }
  40056. drawYAxisGrid(categories, opts, config, context);
  40057. drawXAxis(categories, opts, config, context);
  40058. var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
  40059. xAxisPoints = _drawLineDataPoints.xAxisPoints,
  40060. calPoints = _drawLineDataPoints.calPoints,
  40061. eachSpacing = _drawLineDataPoints.eachSpacing;
  40062. opts.chartData.xAxisPoints = xAxisPoints;
  40063. opts.chartData.calPoints = calPoints;
  40064. opts.chartData.eachSpacing = eachSpacing;
  40065. drawYAxis(series, opts, config, context);
  40066. if (opts.enableMarkLine !== false && process === 1) {
  40067. drawMarkLine(opts, config, context);
  40068. }
  40069. drawLegend(opts.series, opts, config, context, opts.chartData);
  40070. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40071. drawCanvas(opts, context);
  40072. },
  40073. onAnimationFinish: function onAnimationFinish() {
  40074. _this.uevent.trigger('renderComplete');
  40075. }
  40076. });
  40077. break;
  40078. case 'scatter':
  40079. this.animationInstance = new Animation({
  40080. timing: opts.timing,
  40081. duration: duration,
  40082. onProcess: function onProcess(process) {
  40083. context.clearRect(0, 0, opts.width, opts.height);
  40084. if (opts.rotate) {
  40085. contextRotate(context, opts);
  40086. }
  40087. drawYAxisGrid(categories, opts, config, context);
  40088. drawXAxis(categories, opts, config, context);
  40089. var _drawScatterDataPoints = drawScatterDataPoints(series, opts, config, context, process),
  40090. xAxisPoints = _drawScatterDataPoints.xAxisPoints,
  40091. calPoints = _drawScatterDataPoints.calPoints,
  40092. eachSpacing = _drawScatterDataPoints.eachSpacing;
  40093. opts.chartData.xAxisPoints = xAxisPoints;
  40094. opts.chartData.calPoints = calPoints;
  40095. opts.chartData.eachSpacing = eachSpacing;
  40096. drawYAxis(series, opts, config, context);
  40097. if (opts.enableMarkLine !== false && process === 1) {
  40098. drawMarkLine(opts, config, context);
  40099. }
  40100. drawLegend(opts.series, opts, config, context, opts.chartData);
  40101. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40102. drawCanvas(opts, context);
  40103. },
  40104. onAnimationFinish: function onAnimationFinish() {
  40105. _this.uevent.trigger('renderComplete');
  40106. }
  40107. });
  40108. break;
  40109. case 'bubble':
  40110. this.animationInstance = new Animation({
  40111. timing: opts.timing,
  40112. duration: duration,
  40113. onProcess: function onProcess(process) {
  40114. context.clearRect(0, 0, opts.width, opts.height);
  40115. if (opts.rotate) {
  40116. contextRotate(context, opts);
  40117. }
  40118. drawYAxisGrid(categories, opts, config, context);
  40119. drawXAxis(categories, opts, config, context);
  40120. var _drawBubbleDataPoints = drawBubbleDataPoints(series, opts, config, context, process),
  40121. xAxisPoints = _drawBubbleDataPoints.xAxisPoints,
  40122. calPoints = _drawBubbleDataPoints.calPoints,
  40123. eachSpacing = _drawBubbleDataPoints.eachSpacing;
  40124. opts.chartData.xAxisPoints = xAxisPoints;
  40125. opts.chartData.calPoints = calPoints;
  40126. opts.chartData.eachSpacing = eachSpacing;
  40127. drawYAxis(series, opts, config, context);
  40128. if (opts.enableMarkLine !== false && process === 1) {
  40129. drawMarkLine(opts, config, context);
  40130. }
  40131. drawLegend(opts.series, opts, config, context, opts.chartData);
  40132. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40133. drawCanvas(opts, context);
  40134. },
  40135. onAnimationFinish: function onAnimationFinish() {
  40136. _this.uevent.trigger('renderComplete');
  40137. }
  40138. });
  40139. break;
  40140. case 'mix':
  40141. this.animationInstance = new Animation({
  40142. timing: opts.timing,
  40143. duration: duration,
  40144. onProcess: function onProcess(process) {
  40145. context.clearRect(0, 0, opts.width, opts.height);
  40146. if (opts.rotate) {
  40147. contextRotate(context, opts);
  40148. }
  40149. drawYAxisGrid(categories, opts, config, context);
  40150. drawXAxis(categories, opts, config, context);
  40151. var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
  40152. xAxisPoints = _drawMixDataPoints.xAxisPoints,
  40153. calPoints = _drawMixDataPoints.calPoints,
  40154. eachSpacing = _drawMixDataPoints.eachSpacing;
  40155. opts.chartData.xAxisPoints = xAxisPoints;
  40156. opts.chartData.calPoints = calPoints;
  40157. opts.chartData.eachSpacing = eachSpacing;
  40158. drawYAxis(series, opts, config, context);
  40159. if (opts.enableMarkLine !== false && process === 1) {
  40160. drawMarkLine(opts, config, context);
  40161. }
  40162. drawLegend(opts.series, opts, config, context, opts.chartData);
  40163. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40164. drawCanvas(opts, context);
  40165. },
  40166. onAnimationFinish: function onAnimationFinish() {
  40167. _this.uevent.trigger('renderComplete');
  40168. }
  40169. });
  40170. break;
  40171. case 'column':
  40172. this.animationInstance = new Animation({
  40173. timing: opts.timing,
  40174. duration: duration,
  40175. onProcess: function onProcess(process) {
  40176. context.clearRect(0, 0, opts.width, opts.height);
  40177. if (opts.rotate) {
  40178. contextRotate(context, opts);
  40179. }
  40180. drawYAxisGrid(categories, opts, config, context);
  40181. drawXAxis(categories, opts, config, context);
  40182. var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
  40183. xAxisPoints = _drawColumnDataPoints.xAxisPoints,
  40184. calPoints = _drawColumnDataPoints.calPoints,
  40185. eachSpacing = _drawColumnDataPoints.eachSpacing;
  40186. opts.chartData.xAxisPoints = xAxisPoints;
  40187. opts.chartData.calPoints = calPoints;
  40188. opts.chartData.eachSpacing = eachSpacing;
  40189. drawYAxis(series, opts, config, context);
  40190. if (opts.enableMarkLine !== false && process === 1) {
  40191. drawMarkLine(opts, config, context);
  40192. }
  40193. drawLegend(opts.series, opts, config, context, opts.chartData);
  40194. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40195. drawCanvas(opts, context);
  40196. },
  40197. onAnimationFinish: function onAnimationFinish() {
  40198. _this.uevent.trigger('renderComplete');
  40199. }
  40200. });
  40201. break;
  40202. case 'bar':
  40203. this.animationInstance = new Animation({
  40204. timing: opts.timing,
  40205. duration: duration,
  40206. onProcess: function onProcess(process) {
  40207. context.clearRect(0, 0, opts.width, opts.height);
  40208. if (opts.rotate) {
  40209. contextRotate(context, opts);
  40210. }
  40211. drawXAxis(categories, opts, config, context);
  40212. var _drawBarDataPoints = drawBarDataPoints(series, opts, config, context, process),
  40213. yAxisPoints = _drawBarDataPoints.yAxisPoints,
  40214. calPoints = _drawBarDataPoints.calPoints,
  40215. eachSpacing = _drawBarDataPoints.eachSpacing;
  40216. opts.chartData.yAxisPoints = yAxisPoints;
  40217. opts.chartData.xAxisPoints = opts.chartData.xAxisData.xAxisPoints;
  40218. opts.chartData.calPoints = calPoints;
  40219. opts.chartData.eachSpacing = eachSpacing;
  40220. drawYAxis(series, opts, config, context);
  40221. if (opts.enableMarkLine !== false && process === 1) {
  40222. drawMarkLine(opts, config, context);
  40223. }
  40224. drawLegend(opts.series, opts, config, context, opts.chartData);
  40225. drawToolTipBridge(opts, config, context, process, eachSpacing, yAxisPoints);
  40226. drawCanvas(opts, context);
  40227. },
  40228. onAnimationFinish: function onAnimationFinish() {
  40229. _this.uevent.trigger('renderComplete');
  40230. }
  40231. });
  40232. break;
  40233. case 'area':
  40234. this.animationInstance = new Animation({
  40235. timing: opts.timing,
  40236. duration: duration,
  40237. onProcess: function onProcess(process) {
  40238. context.clearRect(0, 0, opts.width, opts.height);
  40239. if (opts.rotate) {
  40240. contextRotate(context, opts);
  40241. }
  40242. drawYAxisGrid(categories, opts, config, context);
  40243. drawXAxis(categories, opts, config, context);
  40244. var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
  40245. xAxisPoints = _drawAreaDataPoints.xAxisPoints,
  40246. calPoints = _drawAreaDataPoints.calPoints,
  40247. eachSpacing = _drawAreaDataPoints.eachSpacing;
  40248. opts.chartData.xAxisPoints = xAxisPoints;
  40249. opts.chartData.calPoints = calPoints;
  40250. opts.chartData.eachSpacing = eachSpacing;
  40251. drawYAxis(series, opts, config, context);
  40252. if (opts.enableMarkLine !== false && process === 1) {
  40253. drawMarkLine(opts, config, context);
  40254. }
  40255. drawLegend(opts.series, opts, config, context, opts.chartData);
  40256. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40257. drawCanvas(opts, context);
  40258. },
  40259. onAnimationFinish: function onAnimationFinish() {
  40260. _this.uevent.trigger('renderComplete');
  40261. }
  40262. });
  40263. break;
  40264. case 'ring':
  40265. case 'pie':
  40266. this.animationInstance = new Animation({
  40267. timing: opts.timing,
  40268. duration: duration,
  40269. onProcess: function onProcess(process) {
  40270. context.clearRect(0, 0, opts.width, opts.height);
  40271. if (opts.rotate) {
  40272. contextRotate(context, opts);
  40273. }
  40274. opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
  40275. drawLegend(opts.series, opts, config, context, opts.chartData);
  40276. drawToolTipBridge(opts, config, context, process);
  40277. drawCanvas(opts, context);
  40278. },
  40279. onAnimationFinish: function onAnimationFinish() {
  40280. _this.uevent.trigger('renderComplete');
  40281. }
  40282. });
  40283. break;
  40284. case 'rose':
  40285. this.animationInstance = new Animation({
  40286. timing: opts.timing,
  40287. duration: duration,
  40288. onProcess: function onProcess(process) {
  40289. context.clearRect(0, 0, opts.width, opts.height);
  40290. if (opts.rotate) {
  40291. contextRotate(context, opts);
  40292. }
  40293. opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
  40294. drawLegend(opts.series, opts, config, context, opts.chartData);
  40295. drawToolTipBridge(opts, config, context, process);
  40296. drawCanvas(opts, context);
  40297. },
  40298. onAnimationFinish: function onAnimationFinish() {
  40299. _this.uevent.trigger('renderComplete');
  40300. }
  40301. });
  40302. break;
  40303. case 'radar':
  40304. this.animationInstance = new Animation({
  40305. timing: opts.timing,
  40306. duration: duration,
  40307. onProcess: function onProcess(process) {
  40308. context.clearRect(0, 0, opts.width, opts.height);
  40309. if (opts.rotate) {
  40310. contextRotate(context, opts);
  40311. }
  40312. opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
  40313. drawLegend(opts.series, opts, config, context, opts.chartData);
  40314. drawToolTipBridge(opts, config, context, process);
  40315. drawCanvas(opts, context);
  40316. },
  40317. onAnimationFinish: function onAnimationFinish() {
  40318. _this.uevent.trigger('renderComplete');
  40319. }
  40320. });
  40321. break;
  40322. case 'arcbar':
  40323. this.animationInstance = new Animation({
  40324. timing: opts.timing,
  40325. duration: duration,
  40326. onProcess: function onProcess(process) {
  40327. context.clearRect(0, 0, opts.width, opts.height);
  40328. if (opts.rotate) {
  40329. contextRotate(context, opts);
  40330. }
  40331. opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
  40332. drawCanvas(opts, context);
  40333. },
  40334. onAnimationFinish: function onAnimationFinish() {
  40335. _this.uevent.trigger('renderComplete');
  40336. }
  40337. });
  40338. break;
  40339. case 'gauge':
  40340. this.animationInstance = new Animation({
  40341. timing: opts.timing,
  40342. duration: duration,
  40343. onProcess: function onProcess(process) {
  40344. context.clearRect(0, 0, opts.width, opts.height);
  40345. if (opts.rotate) {
  40346. contextRotate(context, opts);
  40347. }
  40348. opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
  40349. drawCanvas(opts, context);
  40350. },
  40351. onAnimationFinish: function onAnimationFinish() {
  40352. _this.uevent.trigger('renderComplete');
  40353. }
  40354. });
  40355. break;
  40356. case 'candle':
  40357. this.animationInstance = new Animation({
  40358. timing: opts.timing,
  40359. duration: duration,
  40360. onProcess: function onProcess(process) {
  40361. context.clearRect(0, 0, opts.width, opts.height);
  40362. if (opts.rotate) {
  40363. contextRotate(context, opts);
  40364. }
  40365. drawYAxisGrid(categories, opts, config, context);
  40366. drawXAxis(categories, opts, config, context);
  40367. var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
  40368. xAxisPoints = _drawCandleDataPoints.xAxisPoints,
  40369. calPoints = _drawCandleDataPoints.calPoints,
  40370. eachSpacing = _drawCandleDataPoints.eachSpacing;
  40371. opts.chartData.xAxisPoints = xAxisPoints;
  40372. opts.chartData.calPoints = calPoints;
  40373. opts.chartData.eachSpacing = eachSpacing;
  40374. drawYAxis(series, opts, config, context);
  40375. if (opts.enableMarkLine !== false && process === 1) {
  40376. drawMarkLine(opts, config, context);
  40377. }
  40378. if (seriesMA) {
  40379. drawLegend(seriesMA, opts, config, context, opts.chartData);
  40380. } else {
  40381. drawLegend(opts.series, opts, config, context, opts.chartData);
  40382. }
  40383. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40384. drawCanvas(opts, context);
  40385. },
  40386. onAnimationFinish: function onAnimationFinish() {
  40387. _this.uevent.trigger('renderComplete');
  40388. }
  40389. });
  40390. break;
  40391. }
  40392. }
  40393. function uChartsEvent() {
  40394. this.events = {};
  40395. }
  40396. uChartsEvent.prototype.addEventListener = function (type, listener) {
  40397. this.events[type] = this.events[type] || [];
  40398. this.events[type].push(listener);
  40399. };
  40400. uChartsEvent.prototype.delEventListener = function (type) {
  40401. this.events[type] = [];
  40402. };
  40403. uChartsEvent.prototype.trigger = function () {
  40404. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  40405. args[_key] = arguments[_key];
  40406. }
  40407. var type = args[0];
  40408. var params = args.slice(1);
  40409. if (!!this.events[type]) {
  40410. this.events[type].forEach(function (listener) {
  40411. try {
  40412. listener.apply(null, params);
  40413. } catch (e) {
  40414. //console.log('[uCharts] '+e);
  40415. }
  40416. });
  40417. }
  40418. };
  40419. var uCharts = function uCharts(opts) {
  40420. opts.pix = opts.pixelRatio ? opts.pixelRatio : 1;
  40421. opts.fontSize = opts.fontSize ? opts.fontSize : 13;
  40422. opts.fontColor = opts.fontColor ? opts.fontColor : config.fontColor;
  40423. if (opts.background == "" || opts.background == "none") {
  40424. opts.background = "#FFFFFF";
  40425. }
  40426. opts.title = assign({}, opts.title);
  40427. opts.subtitle = assign({}, opts.subtitle);
  40428. opts.duration = opts.duration ? opts.duration : 1000;
  40429. opts.yAxis = assign({}, {
  40430. data: [],
  40431. showTitle: false,
  40432. disabled: false,
  40433. disableGrid: false,
  40434. splitNumber: 5,
  40435. gridType: 'solid',
  40436. dashLength: 4 * opts.pix,
  40437. gridColor: '#cccccc',
  40438. padding: 10,
  40439. fontColor: '#666666'
  40440. }, opts.yAxis);
  40441. opts.xAxis = assign({}, {
  40442. rotateLabel: false,
  40443. disabled: false,
  40444. disableGrid: false,
  40445. splitNumber: 5,
  40446. calibration: false,
  40447. gridType: 'solid',
  40448. dashLength: 4,
  40449. scrollAlign: 'left',
  40450. boundaryGap: 'center',
  40451. axisLine: true,
  40452. axisLineColor: '#cccccc'
  40453. }, opts.xAxis);
  40454. opts.xAxis.scrollPosition = opts.xAxis.scrollAlign;
  40455. opts.legend = assign({}, {
  40456. show: true,
  40457. position: 'bottom',
  40458. float: 'center',
  40459. backgroundColor: 'rgba(0,0,0,0)',
  40460. borderColor: 'rgba(0,0,0,0)',
  40461. borderWidth: 0,
  40462. padding: 5,
  40463. margin: 5,
  40464. itemGap: 10,
  40465. fontSize: opts.fontSize,
  40466. lineHeight: opts.fontSize,
  40467. fontColor: opts.fontColor,
  40468. formatter: {},
  40469. hiddenColor: '#CECECE'
  40470. }, opts.legend);
  40471. opts.extra = assign({}, opts.extra);
  40472. opts.rotate = opts.rotate ? true : false;
  40473. opts.animation = opts.animation ? true : false;
  40474. opts.rotate = opts.rotate ? true : false;
  40475. opts.canvas2d = opts.canvas2d ? true : false;
  40476. var config$$1 = JSON.parse(JSON.stringify(config));
  40477. config$$1.color = opts.color ? opts.color : config$$1.color;
  40478. config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
  40479. if (opts.type == 'pie') {
  40480. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40481. }
  40482. if (opts.type == 'ring') {
  40483. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.ring.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40484. }
  40485. if (opts.type == 'rose') {
  40486. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40487. }
  40488. config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pix;
  40489. config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
  40490. //屏幕旋转
  40491. config$$1.rotate = opts.rotate;
  40492. if (opts.rotate) {
  40493. var tempWidth = opts.width;
  40494. var tempHeight = opts.height;
  40495. opts.width = tempHeight;
  40496. opts.height = tempWidth;
  40497. }
  40498. //适配高分屏
  40499. opts.padding = opts.padding ? opts.padding : config$$1.padding;
  40500. config$$1.yAxisWidth = config.yAxisWidth * opts.pix;
  40501. config$$1.xAxisHeight = config.xAxisHeight * opts.pix;
  40502. if (opts.enableScroll && opts.xAxis.scrollShow) {
  40503. config$$1.xAxisHeight += 6 * opts.pix;
  40504. }
  40505. config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pix;
  40506. config$$1.fontSize = opts.fontSize * opts.pix;
  40507. config$$1.titleFontSize = config.titleFontSize * opts.pix;
  40508. config$$1.subtitleFontSize = config.subtitleFontSize * opts.pix;
  40509. config$$1.toolTipPadding = config.toolTipPadding * opts.pix;
  40510. config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pix;
  40511. config$$1.columePadding = config.columePadding * opts.pix;
  40512. //this.context = opts.context ? opts.context : uni.createCanvasContext(opts.canvasId, opts.$this);
  40513. //v2.0版本后需要自行获取context并传入opts进行初始化,这么做是为了确保uCharts可以跨更多端使用,并保证了自定义组件this实例不被循环嵌套。如果您觉得不便请取消上面注释,采用v1.0版本的方式使用,对此给您带来的不便敬请谅解!
  40514. if (!opts.context) {
  40515. throw new Error('[uCharts] 未获取到context!注意:v2.0版本后,需要自行获取canvas的绘图上下文并传入opts.context!');
  40516. }
  40517. this.context = opts.context;
  40518. if (!this.context.setTextAlign) {
  40519. this.context.setStrokeStyle = function (e) {
  40520. return this.strokeStyle = e;
  40521. };
  40522. this.context.setLineWidth = function (e) {
  40523. return this.lineWidth = e;
  40524. };
  40525. this.context.setLineCap = function (e) {
  40526. return this.lineCap = e;
  40527. };
  40528. this.context.setFontSize = function (e) {
  40529. return this.font = e + "px sans-serif";
  40530. };
  40531. this.context.setFillStyle = function (e) {
  40532. return this.fillStyle = e;
  40533. };
  40534. this.context.setTextAlign = function (e) {
  40535. return this.textAlign = e;
  40536. };
  40537. this.context.draw = function () {};
  40538. }
  40539. //兼容NVUEsetLineDash
  40540. if (!this.context.setLineDash) {
  40541. this.context.setLineDash = function (e) {};
  40542. }
  40543. opts.chartData = {};
  40544. this.uevent = new uChartsEvent();
  40545. this.scrollOption = {
  40546. currentOffset: 0,
  40547. startTouchX: 0,
  40548. distance: 0,
  40549. lastMoveTime: 0
  40550. };
  40551. this.opts = opts;
  40552. this.config = config$$1;
  40553. drawCharts.call(this, opts.type, opts, config$$1, this.context);
  40554. };
  40555. uCharts.prototype.updateData = function () {
  40556. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  40557. this.opts = assign({}, this.opts, data);
  40558. this.opts.updateData = true;
  40559. var scrollPosition = data.scrollPosition || 'current';
  40560. switch (scrollPosition) {
  40561. case 'current':
  40562. //this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  40563. break;
  40564. case 'left':
  40565. this.opts._scrollDistance_ = 0;
  40566. this.scrollOption = {
  40567. currentOffset: 0,
  40568. startTouchX: 0,
  40569. distance: 0,
  40570. lastMoveTime: 0
  40571. };
  40572. break;
  40573. case 'right':
  40574. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  40575. yAxisWidth = _calYAxisData.yAxisWidth;
  40576. this.config.yAxisWidth = yAxisWidth;
  40577. var offsetLeft = 0;
  40578. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  40579. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  40580. startX = _getXAxisPoints0.startX,
  40581. endX = _getXAxisPoints0.endX,
  40582. eachSpacing = _getXAxisPoints0.eachSpacing;
  40583. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  40584. var screenWidth = endX - startX;
  40585. offsetLeft = screenWidth - totalWidth;
  40586. this.scrollOption = {
  40587. currentOffset: offsetLeft,
  40588. startTouchX: offsetLeft,
  40589. distance: 0,
  40590. lastMoveTime: 0
  40591. };
  40592. this.opts._scrollDistance_ = offsetLeft;
  40593. break;
  40594. }
  40595. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40596. };
  40597. uCharts.prototype.zoom = function () {
  40598. var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
  40599. if (this.opts.enableScroll !== true) {
  40600. console.log('[uCharts] 请启用滚动条后使用');
  40601. return;
  40602. }
  40603. //当前屏幕中间点
  40604. var centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
  40605. this.opts.animation = false;
  40606. this.opts.xAxis.itemCount = val.itemCount;
  40607. //重新计算x轴偏移距离
  40608. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  40609. yAxisWidth = _calYAxisData.yAxisWidth;
  40610. this.config.yAxisWidth = yAxisWidth;
  40611. var offsetLeft = 0;
  40612. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  40613. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  40614. startX = _getXAxisPoints0.startX,
  40615. endX = _getXAxisPoints0.endX,
  40616. eachSpacing = _getXAxisPoints0.eachSpacing;
  40617. var centerLeft = eachSpacing * centerPoint;
  40618. var screenWidth = endX - startX;
  40619. var MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
  40620. offsetLeft = screenWidth / 2 - centerLeft;
  40621. if (offsetLeft > 0) {
  40622. offsetLeft = 0;
  40623. }
  40624. if (offsetLeft < MaxLeft) {
  40625. offsetLeft = MaxLeft;
  40626. }
  40627. this.scrollOption = {
  40628. currentOffset: offsetLeft,
  40629. startTouchX: offsetLeft,
  40630. distance: 0,
  40631. lastMoveTime: 0
  40632. };
  40633. this.opts._scrollDistance_ = offsetLeft;
  40634. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40635. };
  40636. uCharts.prototype.stopAnimation = function () {
  40637. this.animationInstance && this.animationInstance.stop();
  40638. };
  40639. uCharts.prototype.addEventListener = function (type, listener) {
  40640. this.uevent.addEventListener(type, listener);
  40641. };
  40642. uCharts.prototype.delEventListener = function (type) {
  40643. this.uevent.delEventListener(type);
  40644. };
  40645. uCharts.prototype.getCurrentDataIndex = function (e) {
  40646. var touches = null;
  40647. if (e.changedTouches) {
  40648. touches = e.changedTouches[0];
  40649. } else {
  40650. touches = e.mp.changedTouches[0];
  40651. }
  40652. if (touches) {
  40653. var _touches$ = getTouches(touches, this.opts, e);
  40654. if (this.opts.type === 'pie' || this.opts.type === 'ring') {
  40655. return findPieChartCurrentIndex({
  40656. x: _touches$.x,
  40657. y: _touches$.y
  40658. }, this.opts.chartData.pieData, this.opts);
  40659. } else if (this.opts.type === 'rose') {
  40660. return findRoseChartCurrentIndex({
  40661. x: _touches$.x,
  40662. y: _touches$.y
  40663. }, this.opts.chartData.pieData, this.opts);
  40664. } else if (this.opts.type === 'radar') {
  40665. return findRadarChartCurrentIndex({
  40666. x: _touches$.x,
  40667. y: _touches$.y
  40668. }, this.opts.chartData.radarData, this.opts.categories.length);
  40669. } else if (this.opts.type === 'funnel') {
  40670. return findFunnelChartCurrentIndex({
  40671. x: _touches$.x,
  40672. y: _touches$.y
  40673. }, this.opts.chartData.funnelData);
  40674. } else if (this.opts.type === 'map') {
  40675. return findMapChartCurrentIndex({
  40676. x: _touches$.x,
  40677. y: _touches$.y
  40678. }, this.opts);
  40679. } else if (this.opts.type === 'word') {
  40680. return findWordChartCurrentIndex({
  40681. x: _touches$.x,
  40682. y: _touches$.y
  40683. }, this.opts.chartData.wordCloudData);
  40684. } else if (this.opts.type === 'bar') {
  40685. return findBarChartCurrentIndex({
  40686. x: _touches$.x,
  40687. y: _touches$.y
  40688. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  40689. } else {
  40690. return findCurrentIndex({
  40691. x: _touches$.x,
  40692. y: _touches$.y
  40693. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  40694. }
  40695. }
  40696. return -1;
  40697. };
  40698. uCharts.prototype.getLegendDataIndex = function (e) {
  40699. var touches = null;
  40700. if (e.changedTouches) {
  40701. touches = e.changedTouches[0];
  40702. } else {
  40703. touches = e.mp.changedTouches[0];
  40704. }
  40705. if (touches) {
  40706. var _touches$ = getTouches(touches, this.opts, e);
  40707. return findLegendIndex({
  40708. x: _touches$.x,
  40709. y: _touches$.y
  40710. }, this.opts.chartData.legendData);
  40711. }
  40712. return -1;
  40713. };
  40714. uCharts.prototype.touchLegend = function (e) {
  40715. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  40716. var touches = null;
  40717. if (e.changedTouches) {
  40718. touches = e.changedTouches[0];
  40719. } else {
  40720. touches = e.mp.changedTouches[0];
  40721. }
  40722. if (touches) {
  40723. var _touches$ = getTouches(touches, this.opts, e);
  40724. var index = this.getLegendDataIndex(e);
  40725. if (index >= 0) {
  40726. if (this.opts.type == 'candle') {
  40727. this.opts.seriesMA[index].show = !this.opts.seriesMA[index].show;
  40728. } else {
  40729. this.opts.series[index].show = !this.opts.series[index].show;
  40730. }
  40731. this.opts.animation = option.animation ? true : false;
  40732. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  40733. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40734. }
  40735. }
  40736. };
  40737. uCharts.prototype.showToolTip = function (e) {
  40738. var _this2 = this;
  40739. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  40740. var touches = null;
  40741. if (e.changedTouches) {
  40742. touches = e.changedTouches[0];
  40743. } else {
  40744. touches = e.mp.changedTouches[0];
  40745. }
  40746. if (!touches) {
  40747. console.log("[uCharts] 未获取到event坐标信息");
  40748. }
  40749. var _touches$ = getTouches(touches, this.opts, e);
  40750. var currentOffset = this.scrollOption.currentOffset;
  40751. var opts = assign({}, this.opts, {
  40752. _scrollDistance_: currentOffset,
  40753. animation: false
  40754. });
  40755. if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column' || this.opts.type === 'scatter' || this.opts.type === 'bubble') {
  40756. var current = this.getCurrentDataIndex(e);
  40757. var index = option.index == undefined ? current.index : option.index;
  40758. if (index > -1 || index.length > 0) {
  40759. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  40760. if (seriesData.length !== 0) {
  40761. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  40762. textList = _getToolTipData.textList,
  40763. offset = _getToolTipData.offset;
  40764. offset.y = _touches$.y;
  40765. opts.tooltip = {
  40766. textList: option.textList !== undefined ? option.textList : textList,
  40767. offset: option.offset !== undefined ? option.offset : offset,
  40768. option: option,
  40769. index: index
  40770. };
  40771. }
  40772. }
  40773. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40774. }
  40775. if (this.opts.type === 'bar') {
  40776. var current = this.getCurrentDataIndex(e);
  40777. var index = option.index == undefined ? current.index : option.index;
  40778. if (index > -1 || index.length > 0) {
  40779. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  40780. if (seriesData.length !== 0) {
  40781. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  40782. textList = _getToolTipData.textList,
  40783. offset = _getToolTipData.offset;
  40784. offset.x = _touches$.x;
  40785. opts.tooltip = {
  40786. textList: option.textList !== undefined ? option.textList : textList,
  40787. offset: option.offset !== undefined ? option.offset : offset,
  40788. option: option,
  40789. index: index
  40790. };
  40791. }
  40792. }
  40793. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40794. }
  40795. if (this.opts.type === 'mix') {
  40796. var current = this.getCurrentDataIndex(e);
  40797. var index = option.index == undefined ? current.index : option.index;
  40798. if (index > -1) {
  40799. var currentOffset = this.scrollOption.currentOffset;
  40800. var opts = assign({}, this.opts, {
  40801. _scrollDistance_: currentOffset,
  40802. animation: false
  40803. });
  40804. var seriesData = getSeriesDataItem(this.opts.series, index);
  40805. if (seriesData.length !== 0) {
  40806. var _getMixToolTipData = getMixToolTipData(seriesData, this.opts, index, this.opts.categories, option),
  40807. textList = _getMixToolTipData.textList,
  40808. offset = _getMixToolTipData.offset;
  40809. offset.y = _touches$.y;
  40810. opts.tooltip = {
  40811. textList: option.textList ? option.textList : textList,
  40812. offset: option.offset !== undefined ? option.offset : offset,
  40813. option: option,
  40814. index: index
  40815. };
  40816. }
  40817. }
  40818. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40819. }
  40820. if (this.opts.type === 'candle') {
  40821. var current = this.getCurrentDataIndex(e);
  40822. var index = option.index == undefined ? current.index : option.index;
  40823. if (index > -1) {
  40824. var currentOffset = this.scrollOption.currentOffset;
  40825. var opts = assign({}, this.opts, {
  40826. _scrollDistance_: currentOffset,
  40827. animation: false
  40828. });
  40829. var seriesData = getSeriesDataItem(this.opts.series, index);
  40830. if (seriesData.length !== 0) {
  40831. var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts, index, this.opts.categories, this.opts.extra.candle, option),
  40832. textList = _getToolTipData.textList,
  40833. offset = _getToolTipData.offset;
  40834. offset.y = _touches$.y;
  40835. opts.tooltip = {
  40836. textList: option.textList ? option.textList : textList,
  40837. offset: option.offset !== undefined ? option.offset : offset,
  40838. option: option,
  40839. index: index
  40840. };
  40841. }
  40842. }
  40843. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40844. }
  40845. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
  40846. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40847. if (index > -1) {
  40848. var opts = assign({}, this.opts, {
  40849. animation: false
  40850. });
  40851. var seriesData = assign({}, opts._series_[index]);
  40852. var textList = [{
  40853. text: option.formatter ? option.formatter(seriesData, undefined, index, opts) : seriesData.name + ': ' + seriesData.data,
  40854. color: seriesData.color
  40855. }];
  40856. var offset = {
  40857. x: _touches$.x,
  40858. y: _touches$.y
  40859. };
  40860. opts.tooltip = {
  40861. textList: option.textList ? option.textList : textList,
  40862. offset: option.offset !== undefined ? option.offset : offset,
  40863. option: option,
  40864. index: index
  40865. };
  40866. }
  40867. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40868. }
  40869. if (this.opts.type === 'map') {
  40870. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40871. if (index > -1) {
  40872. var opts = assign({}, this.opts, {
  40873. animation: false
  40874. });
  40875. var seriesData = assign({}, this.opts.series[index]);
  40876. seriesData.name = seriesData.properties.name;
  40877. var textList = [{
  40878. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40879. color: seriesData.color
  40880. }];
  40881. var offset = {
  40882. x: _touches$.x,
  40883. y: _touches$.y
  40884. };
  40885. opts.tooltip = {
  40886. textList: option.textList ? option.textList : textList,
  40887. offset: option.offset !== undefined ? option.offset : offset,
  40888. option: option,
  40889. index: index
  40890. };
  40891. }
  40892. opts.updateData = false;
  40893. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40894. }
  40895. if (this.opts.type === 'word') {
  40896. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40897. if (index > -1) {
  40898. var opts = assign({}, this.opts, {
  40899. animation: false
  40900. });
  40901. var seriesData = assign({}, this.opts.series[index]);
  40902. var textList = [{
  40903. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40904. color: seriesData.color
  40905. }];
  40906. var offset = {
  40907. x: _touches$.x,
  40908. y: _touches$.y
  40909. };
  40910. opts.tooltip = {
  40911. textList: option.textList ? option.textList : textList,
  40912. offset: option.offset !== undefined ? option.offset : offset,
  40913. option: option,
  40914. index: index
  40915. };
  40916. }
  40917. opts.updateData = false;
  40918. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40919. }
  40920. if (this.opts.type === 'radar') {
  40921. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40922. if (index > -1) {
  40923. var opts = assign({}, this.opts, {
  40924. animation: false
  40925. });
  40926. var seriesData = getSeriesDataItem(this.opts.series, index);
  40927. if (seriesData.length !== 0) {
  40928. var textList = seriesData.map(function (item) {
  40929. return {
  40930. text: option.formatter ? option.formatter(item, _this2.opts.categories[index], index, _this2.opts) : item.name + ': ' + item.data,
  40931. color: item.color
  40932. };
  40933. });
  40934. var offset = {
  40935. x: _touches$.x,
  40936. y: _touches$.y
  40937. };
  40938. opts.tooltip = {
  40939. textList: option.textList ? option.textList : textList,
  40940. offset: option.offset !== undefined ? option.offset : offset,
  40941. option: option,
  40942. index: index
  40943. };
  40944. }
  40945. }
  40946. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40947. }
  40948. };
  40949. uCharts.prototype.translate = function (distance) {
  40950. this.scrollOption = {
  40951. currentOffset: distance,
  40952. startTouchX: distance,
  40953. distance: 0,
  40954. lastMoveTime: 0
  40955. };
  40956. var opts = assign({}, this.opts, {
  40957. _scrollDistance_: distance,
  40958. animation: false
  40959. });
  40960. drawCharts.call(this, this.opts.type, opts, this.config, this.context);
  40961. };
  40962. uCharts.prototype.scrollStart = function (e) {
  40963. var touches = null;
  40964. if (e.changedTouches) {
  40965. touches = e.changedTouches[0];
  40966. } else {
  40967. touches = e.mp.changedTouches[0];
  40968. }
  40969. var _touches$ = getTouches(touches, this.opts, e);
  40970. if (touches && this.opts.enableScroll === true) {
  40971. this.scrollOption.startTouchX = _touches$.x;
  40972. }
  40973. };
  40974. uCharts.prototype.scroll = function (e) {
  40975. if (this.scrollOption.lastMoveTime === 0) {
  40976. this.scrollOption.lastMoveTime = Date.now();
  40977. }
  40978. var Limit = this.opts.touchMoveLimit || 60;
  40979. var currMoveTime = Date.now();
  40980. var duration = currMoveTime - this.scrollOption.lastMoveTime;
  40981. if (duration < Math.floor(1000 / Limit)) return;
  40982. this.scrollOption.lastMoveTime = currMoveTime;
  40983. var touches = null;
  40984. if (e.changedTouches) {
  40985. touches = e.changedTouches[0];
  40986. } else {
  40987. touches = e.mp.changedTouches[0];
  40988. }
  40989. if (touches && this.opts.enableScroll === true) {
  40990. var _touches$ = getTouches(touches, this.opts, e);
  40991. var _distance;
  40992. _distance = _touches$.x - this.scrollOption.startTouchX;
  40993. var currentOffset = this.scrollOption.currentOffset;
  40994. var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
  40995. this.scrollOption.distance = _distance = validDistance - currentOffset;
  40996. var opts = assign({}, this.opts, {
  40997. _scrollDistance_: currentOffset + _distance,
  40998. animation: false
  40999. });
  41000. this.opts = opts;
  41001. drawCharts.call(this, opts.type, opts, this.config, this.context);
  41002. return currentOffset + _distance;
  41003. }
  41004. };
  41005. uCharts.prototype.scrollEnd = function (e) {
  41006. if (this.opts.enableScroll === true) {
  41007. var _scrollOption = this.scrollOption,
  41008. currentOffset = _scrollOption.currentOffset,
  41009. distance = _scrollOption.distance;
  41010. this.scrollOption.currentOffset = currentOffset + distance;
  41011. this.scrollOption.distance = 0;
  41012. }
  41013. };
  41014. if (( false ? undefined : (0, _typeof2.default)(module)) === "object" && (0, _typeof2.default)(module.exports) === "object") {
  41015. module.exports = uCharts;
  41016. }
  41017. var _default = uCharts;
  41018. exports.default = _default;
  41019. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  41020. /***/ }),
  41021. /***/ 504:
  41022. /*!*************************************************************************************************!*\
  41023. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js ***!
  41024. \*************************************************************************************************/
  41025. /*! no static exports found */
  41026. /***/ (function(module, exports, __webpack_require__) {
  41027. "use strict";
  41028. Object.defineProperty(exports, "__esModule", {
  41029. value: true
  41030. });
  41031. exports.default = void 0;
  41032. /*
  41033. * uCharts®
  41034. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  41035. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  41036. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  41037. * 复制使用请保留本段注释,感谢支持开源!
  41038. *
  41039. * uCharts®官方网站
  41040. * https://www.uCharts.cn
  41041. *
  41042. * 开源地址:
  41043. * https://gitee.com/uCharts/uCharts
  41044. *
  41045. * uni-app插件市场地址:
  41046. * http://ext.dcloud.net.cn/plugin?id=271
  41047. *
  41048. */
  41049. // 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
  41050. var color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
  41051. //事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
  41052. var formatDateTime = function formatDateTime(timeStamp, returnType) {
  41053. var date = new Date();
  41054. date.setTime(timeStamp * 1000);
  41055. var y = date.getFullYear();
  41056. var m = date.getMonth() + 1;
  41057. m = m < 10 ? '0' + m : m;
  41058. var d = date.getDate();
  41059. d = d < 10 ? '0' + d : d;
  41060. var h = date.getHours();
  41061. h = h < 10 ? '0' + h : h;
  41062. var minute = date.getMinutes();
  41063. var second = date.getSeconds();
  41064. minute = minute < 10 ? '0' + minute : minute;
  41065. second = second < 10 ? '0' + second : second;
  41066. if (returnType == 'full') {
  41067. return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
  41068. }
  41069. if (returnType == 'y-m-d') {
  41070. return y + '-' + m + '-' + d;
  41071. }
  41072. if (returnType == 'h:m') {
  41073. return h + ':' + minute;
  41074. }
  41075. if (returnType == 'h:m:s') {
  41076. return h + ':' + minute + ':' + second;
  41077. }
  41078. return [y, m, d, h, minute, second];
  41079. };
  41080. var cfu = {
  41081. //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
  41082. "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"],
  41083. "range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "条状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"],
  41084. //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
  41085. //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
  41086. "categories": ["line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "demotype"],
  41087. //instance为实例变量承载属性,不要删除
  41088. "instance": {},
  41089. //option为opts及eopts承载属性,不要删除
  41090. "option": {},
  41091. //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
  41092. "formatter": {
  41093. "yAxisDemo1": function yAxisDemo1(val) {
  41094. return val + '元';
  41095. },
  41096. "yAxisDemo2": function yAxisDemo2(val) {
  41097. return val.toFixed(2);
  41098. },
  41099. "xAxisDemo1": function xAxisDemo1(val) {
  41100. return val + '年';
  41101. },
  41102. "xAxisDemo2": function xAxisDemo2(val) {
  41103. return formatDateTime(val, 'h:m');
  41104. },
  41105. "seriesDemo1": function seriesDemo1(val) {
  41106. return val + '元';
  41107. },
  41108. "tooltipDemo1": function tooltipDemo1(item, category, index, opts) {
  41109. if (index == 0) {
  41110. return '随便用' + item.data + '年';
  41111. } else {
  41112. return '其他我没改' + item.data + '天';
  41113. }
  41114. },
  41115. "pieDemo": function pieDemo(val, index, series) {
  41116. if (index !== undefined) {
  41117. return series[index].name + ':' + series[index].data + '元';
  41118. }
  41119. }
  41120. },
  41121. //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
  41122. "demotype": {
  41123. //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
  41124. "type": "line",
  41125. "color": color,
  41126. "padding": [15, 10, 0, 15],
  41127. "xAxis": {
  41128. "disableGrid": true
  41129. },
  41130. "yAxis": {
  41131. "gridType": "dash",
  41132. "dashLength": 2
  41133. },
  41134. "legend": {},
  41135. "extra": {
  41136. "line": {
  41137. "type": "curve",
  41138. "width": 2
  41139. }
  41140. }
  41141. },
  41142. //下面是自定义配置,请添加项目所需的通用配置
  41143. "pie": {
  41144. "type": "pie",
  41145. "color": color,
  41146. "padding": [5, 5, 5, 5],
  41147. "extra": {
  41148. "pie": {
  41149. "activeOpacity": 0.5,
  41150. "activeRadius": 10,
  41151. "offsetAngle": 0,
  41152. "labelWidth": 15,
  41153. "border": true,
  41154. "borderWidth": 3,
  41155. "borderColor": "#FFFFFF"
  41156. }
  41157. }
  41158. },
  41159. "ring": {
  41160. "type": "ring",
  41161. "color": color,
  41162. "padding": [5, 5, 5, 5],
  41163. "rotate": false,
  41164. "dataLabel": true,
  41165. "legend": {
  41166. "show": true,
  41167. "position": "right",
  41168. "lineHeight": 25
  41169. },
  41170. "title": {
  41171. "name": "收益率",
  41172. "fontSize": 15,
  41173. "color": "#666666"
  41174. },
  41175. "subtitle": {
  41176. "name": "70%",
  41177. "fontSize": 25,
  41178. "color": "#7cb5ec"
  41179. },
  41180. "extra": {
  41181. "ring": {
  41182. "ringWidth": 30,
  41183. "activeOpacity": 0.5,
  41184. "activeRadius": 10,
  41185. "offsetAngle": 0,
  41186. "labelWidth": 15,
  41187. "border": true,
  41188. "borderWidth": 3,
  41189. "borderColor": "#FFFFFF"
  41190. }
  41191. }
  41192. },
  41193. "rose": {
  41194. "type": "rose",
  41195. "color": color,
  41196. "padding": [5, 5, 5, 5],
  41197. "legend": {
  41198. "show": true,
  41199. "position": "left",
  41200. "lineHeight": 25
  41201. },
  41202. "extra": {
  41203. "rose": {
  41204. "type": "area",
  41205. "minRadius": 50,
  41206. "activeOpacity": 0.5,
  41207. "activeRadius": 10,
  41208. "offsetAngle": 0,
  41209. "labelWidth": 15,
  41210. "border": false,
  41211. "borderWidth": 2,
  41212. "borderColor": "#FFFFFF"
  41213. }
  41214. }
  41215. },
  41216. "word": {
  41217. "type": "word",
  41218. "color": color,
  41219. "extra": {
  41220. "word": {
  41221. "type": "normal",
  41222. "autoColors": false
  41223. }
  41224. }
  41225. },
  41226. "funnel": {
  41227. "type": "funnel",
  41228. "color": color,
  41229. "padding": [15, 15, 0, 15],
  41230. "extra": {
  41231. "funnel": {
  41232. "activeOpacity": 0.3,
  41233. "activeWidth": 10,
  41234. "border": true,
  41235. "borderWidth": 2,
  41236. "borderColor": "#FFFFFF",
  41237. "fillOpacity": 1,
  41238. "labelAlign": "right"
  41239. }
  41240. }
  41241. },
  41242. "map": {
  41243. "type": "map",
  41244. "color": color,
  41245. "padding": [0, 0, 0, 0],
  41246. "dataLabel": true,
  41247. "extra": {
  41248. "map": {
  41249. "border": true,
  41250. "borderWidth": 1,
  41251. "borderColor": "#666666",
  41252. "fillOpacity": 0.6,
  41253. "activeBorderColor": "#F04864",
  41254. "activeFillColor": "#FACC14",
  41255. "activeFillOpacity": 1
  41256. }
  41257. }
  41258. },
  41259. "arcbar": {
  41260. "type": "arcbar",
  41261. "color": color,
  41262. "title": {
  41263. "name": "百分比",
  41264. "fontSize": 25,
  41265. "color": "#00FF00"
  41266. },
  41267. "subtitle": {
  41268. "name": "默认标题",
  41269. "fontSize": 15,
  41270. "color": "#666666"
  41271. },
  41272. "extra": {
  41273. "arcbar": {
  41274. "type": "default",
  41275. "width": 12,
  41276. "backgroundColor": "#E9E9E9",
  41277. "startAngle": 0.75,
  41278. "endAngle": 0.25,
  41279. "gap": 2
  41280. }
  41281. }
  41282. },
  41283. "line": {
  41284. "type": "line",
  41285. "color": color,
  41286. "padding": [15, 10, 0, 15],
  41287. "xAxis": {
  41288. "disableGrid": true
  41289. },
  41290. "yAxis": {
  41291. "gridType": "dash",
  41292. "dashLength": 2
  41293. },
  41294. "legend": {},
  41295. "extra": {
  41296. "line": {
  41297. "type": "straight",
  41298. "width": 2
  41299. }
  41300. }
  41301. },
  41302. "tline": {
  41303. "type": "line",
  41304. "color": color,
  41305. "padding": [15, 10, 0, 15],
  41306. "xAxis": {
  41307. "disableGrid": false,
  41308. "boundaryGap": "justify"
  41309. },
  41310. "yAxis": {
  41311. "gridType": "dash",
  41312. "dashLength": 2,
  41313. "data": [{
  41314. "min": 0,
  41315. "max": 80
  41316. }]
  41317. },
  41318. "legend": {},
  41319. "extra": {
  41320. "line": {
  41321. "type": "curve",
  41322. "width": 2
  41323. }
  41324. }
  41325. },
  41326. "tarea": {
  41327. "type": "area",
  41328. "color": color,
  41329. "padding": [15, 10, 0, 15],
  41330. "xAxis": {
  41331. "disableGrid": true,
  41332. "boundaryGap": "justify"
  41333. },
  41334. "yAxis": {
  41335. "gridType": "dash",
  41336. "dashLength": 2,
  41337. "data": [{
  41338. "min": 0,
  41339. "max": 80
  41340. }]
  41341. },
  41342. "legend": {},
  41343. "extra": {
  41344. "area": {
  41345. "type": "curve",
  41346. "opacity": 0.2,
  41347. "addLine": true,
  41348. "width": 2,
  41349. "gradient": true
  41350. }
  41351. }
  41352. },
  41353. "column": {
  41354. "type": "column",
  41355. "color": color,
  41356. "padding": [15, 15, 0, 5],
  41357. "xAxis": {
  41358. "disableGrid": true
  41359. },
  41360. "yAxis": {
  41361. "data": [{
  41362. "min": 0
  41363. }]
  41364. },
  41365. "legend": {},
  41366. "extra": {
  41367. "column": {
  41368. "type": "group",
  41369. "width": 30,
  41370. "meterBorde": 1,
  41371. "meterFillColor": "#FFFFFF",
  41372. "activeBgColor": "#000000",
  41373. "activeBgOpacity": 0.08
  41374. }
  41375. }
  41376. },
  41377. "bar": {
  41378. "type": "bar",
  41379. "color": color,
  41380. "padding": [15, 30, 0, 5],
  41381. "xAxis": {
  41382. "boundaryGap": "justify",
  41383. "disableGrid": false,
  41384. "min": 0,
  41385. "axisLine": false
  41386. },
  41387. "yAxis": {},
  41388. "legend": {},
  41389. "extra": {
  41390. "bar": {
  41391. "type": "group",
  41392. "width": 30,
  41393. "meterBorde": 1,
  41394. "meterFillColor": "#FFFFFF",
  41395. "activeBgColor": "#000000",
  41396. "activeBgOpacity": 0.08
  41397. }
  41398. }
  41399. },
  41400. "area": {
  41401. "type": "area",
  41402. "color": color,
  41403. "padding": [15, 15, 0, 15],
  41404. "xAxis": {
  41405. "disableGrid": true
  41406. },
  41407. "yAxis": {
  41408. "gridType": "dash",
  41409. "dashLength": 2
  41410. },
  41411. "legend": {},
  41412. "extra": {
  41413. "area": {
  41414. "type": "straight",
  41415. "opacity": 0.2,
  41416. "addLine": true,
  41417. "width": 2,
  41418. "gradient": false
  41419. }
  41420. }
  41421. },
  41422. "radar": {
  41423. "type": "radar",
  41424. "color": color,
  41425. "padding": [5, 5, 5, 5],
  41426. "dataLabel": false,
  41427. "legend": {
  41428. "show": true,
  41429. "position": "right",
  41430. "lineHeight": 25
  41431. },
  41432. "extra": {
  41433. "radar": {
  41434. "gridType": "radar",
  41435. "gridColor": "#CCCCCC",
  41436. "gridCount": 3,
  41437. "opacity": 0.2,
  41438. "max": 200
  41439. }
  41440. }
  41441. },
  41442. "gauge": {
  41443. "type": "gauge",
  41444. "color": color,
  41445. "title": {
  41446. "name": "66Km/H",
  41447. "fontSize": 25,
  41448. "color": "#2fc25b",
  41449. "offsetY": 50
  41450. },
  41451. "subtitle": {
  41452. "name": "实时速度",
  41453. "fontSize": 15,
  41454. "color": "#1890ff",
  41455. "offsetY": -50
  41456. },
  41457. "extra": {
  41458. "gauge": {
  41459. "type": "default",
  41460. "width": 30,
  41461. "labelColor": "#666666",
  41462. "startAngle": 0.75,
  41463. "endAngle": 0.25,
  41464. "startNumber": 0,
  41465. "endNumber": 100,
  41466. "labelFormat": "",
  41467. "splitLine": {
  41468. "fixRadius": 0,
  41469. "splitNumber": 10,
  41470. "width": 30,
  41471. "color": "#FFFFFF",
  41472. "childNumber": 5,
  41473. "childWidth": 12
  41474. },
  41475. "pointer": {
  41476. "width": 24,
  41477. "color": "auto"
  41478. }
  41479. }
  41480. }
  41481. },
  41482. "candle": {
  41483. "type": "candle",
  41484. "color": color,
  41485. "padding": [15, 15, 0, 15],
  41486. "enableScroll": true,
  41487. "enableMarkLine": true,
  41488. "dataLabel": false,
  41489. "xAxis": {
  41490. "labelCount": 4,
  41491. "itemCount": 40,
  41492. "disableGrid": true,
  41493. "gridColor": "#CCCCCC",
  41494. "gridType": "solid",
  41495. "dashLength": 4,
  41496. "scrollShow": true,
  41497. "scrollAlign": "left",
  41498. "scrollColor": "#A6A6A6",
  41499. "scrollBackgroundColor": "#EFEBEF"
  41500. },
  41501. "yAxis": {},
  41502. "legend": {},
  41503. "extra": {
  41504. "candle": {
  41505. "color": {
  41506. "upLine": "#f04864",
  41507. "upFill": "#f04864",
  41508. "downLine": "#2fc25b",
  41509. "downFill": "#2fc25b"
  41510. },
  41511. "average": {
  41512. "show": true,
  41513. "name": ["MA5", "MA10", "MA30"],
  41514. "day": [5, 10, 20],
  41515. "color": ["#1890ff", "#2fc25b", "#facc14"]
  41516. }
  41517. },
  41518. "markLine": {
  41519. "type": "dash",
  41520. "dashLength": 5,
  41521. "data": [{
  41522. "value": 2150,
  41523. "lineColor": "#f04864",
  41524. "showLabel": true
  41525. }, {
  41526. "value": 2350,
  41527. "lineColor": "#f04864",
  41528. "showLabel": true
  41529. }]
  41530. }
  41531. }
  41532. },
  41533. "mix": {
  41534. "type": "mix",
  41535. "color": color,
  41536. "padding": [15, 15, 0, 15],
  41537. "xAxis": {
  41538. "disableGrid": true
  41539. },
  41540. "yAxis": {
  41541. "disabled": false,
  41542. "disableGrid": false,
  41543. "splitNumber": 5,
  41544. "gridType": "dash",
  41545. "dashLength": 4,
  41546. "gridColor": "#CCCCCC",
  41547. "padding": 10,
  41548. "showTitle": true,
  41549. "data": []
  41550. },
  41551. "legend": {},
  41552. "extra": {
  41553. "mix": {
  41554. "column": {
  41555. "width": 20
  41556. }
  41557. }
  41558. }
  41559. },
  41560. "scatter": {
  41561. "type": "scatter",
  41562. "color": color,
  41563. "padding": [15, 15, 0, 15],
  41564. "dataLabel": false,
  41565. "xAxis": {
  41566. "disableGrid": false,
  41567. "gridType": "dash",
  41568. "splitNumber": 5,
  41569. "boundaryGap": "justify",
  41570. "min": 0
  41571. },
  41572. "yAxis": {
  41573. "disableGrid": false,
  41574. "gridType": "dash"
  41575. },
  41576. "legend": {},
  41577. "extra": {
  41578. "scatter": {}
  41579. }
  41580. },
  41581. "bubble": {
  41582. "type": "bubble",
  41583. "color": color,
  41584. "padding": [15, 15, 0, 15],
  41585. "xAxis": {
  41586. "disableGrid": false,
  41587. "gridType": "dash",
  41588. "splitNumber": 5,
  41589. "boundaryGap": "justify",
  41590. "min": 0,
  41591. "max": 250
  41592. },
  41593. "yAxis": {
  41594. "disableGrid": false,
  41595. "gridType": "dash",
  41596. "data": [{
  41597. "min": 0,
  41598. "max": 150
  41599. }]
  41600. },
  41601. "legend": {},
  41602. "extra": {
  41603. "bubble": {
  41604. "border": 2,
  41605. "opacity": 0.5
  41606. }
  41607. }
  41608. }
  41609. };
  41610. var _default = cfu;
  41611. exports.default = _default;
  41612. /***/ }),
  41613. /***/ 51:
  41614. /*!*******************************************************************!*\
  41615. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  41616. \*******************************************************************/
  41617. /*! no static exports found */
  41618. /***/ (function(module, exports, __webpack_require__) {
  41619. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  41620. function _regeneratorRuntime() {
  41621. "use strict";
  41622. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  41623. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  41624. return exports;
  41625. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41626. var exports = {},
  41627. Op = Object.prototype,
  41628. hasOwn = Op.hasOwnProperty,
  41629. defineProperty = Object.defineProperty || function (obj, key, desc) {
  41630. obj[key] = desc.value;
  41631. },
  41632. $Symbol = "function" == typeof Symbol ? Symbol : {},
  41633. iteratorSymbol = $Symbol.iterator || "@@iterator",
  41634. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  41635. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  41636. function define(obj, key, value) {
  41637. return Object.defineProperty(obj, key, {
  41638. value: value,
  41639. enumerable: !0,
  41640. configurable: !0,
  41641. writable: !0
  41642. }), obj[key];
  41643. }
  41644. try {
  41645. define({}, "");
  41646. } catch (err) {
  41647. define = function define(obj, key, value) {
  41648. return obj[key] = value;
  41649. };
  41650. }
  41651. function wrap(innerFn, outerFn, self, tryLocsList) {
  41652. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  41653. generator = Object.create(protoGenerator.prototype),
  41654. context = new Context(tryLocsList || []);
  41655. return defineProperty(generator, "_invoke", {
  41656. value: makeInvokeMethod(innerFn, self, context)
  41657. }), generator;
  41658. }
  41659. function tryCatch(fn, obj, arg) {
  41660. try {
  41661. return {
  41662. type: "normal",
  41663. arg: fn.call(obj, arg)
  41664. };
  41665. } catch (err) {
  41666. return {
  41667. type: "throw",
  41668. arg: err
  41669. };
  41670. }
  41671. }
  41672. exports.wrap = wrap;
  41673. var ContinueSentinel = {};
  41674. function Generator() {}
  41675. function GeneratorFunction() {}
  41676. function GeneratorFunctionPrototype() {}
  41677. var IteratorPrototype = {};
  41678. define(IteratorPrototype, iteratorSymbol, function () {
  41679. return this;
  41680. });
  41681. var getProto = Object.getPrototypeOf,
  41682. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  41683. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  41684. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  41685. function defineIteratorMethods(prototype) {
  41686. ["next", "throw", "return"].forEach(function (method) {
  41687. define(prototype, method, function (arg) {
  41688. return this._invoke(method, arg);
  41689. });
  41690. });
  41691. }
  41692. function AsyncIterator(generator, PromiseImpl) {
  41693. function invoke(method, arg, resolve, reject) {
  41694. var record = tryCatch(generator[method], generator, arg);
  41695. if ("throw" !== record.type) {
  41696. var result = record.arg,
  41697. value = result.value;
  41698. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  41699. invoke("next", value, resolve, reject);
  41700. }, function (err) {
  41701. invoke("throw", err, resolve, reject);
  41702. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  41703. result.value = unwrapped, resolve(result);
  41704. }, function (error) {
  41705. return invoke("throw", error, resolve, reject);
  41706. });
  41707. }
  41708. reject(record.arg);
  41709. }
  41710. var previousPromise;
  41711. defineProperty(this, "_invoke", {
  41712. value: function value(method, arg) {
  41713. function callInvokeWithMethodAndArg() {
  41714. return new PromiseImpl(function (resolve, reject) {
  41715. invoke(method, arg, resolve, reject);
  41716. });
  41717. }
  41718. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  41719. }
  41720. });
  41721. }
  41722. function makeInvokeMethod(innerFn, self, context) {
  41723. var state = "suspendedStart";
  41724. return function (method, arg) {
  41725. if ("executing" === state) throw new Error("Generator is already running");
  41726. if ("completed" === state) {
  41727. if ("throw" === method) throw arg;
  41728. return doneResult();
  41729. }
  41730. for (context.method = method, context.arg = arg;;) {
  41731. var delegate = context.delegate;
  41732. if (delegate) {
  41733. var delegateResult = maybeInvokeDelegate(delegate, context);
  41734. if (delegateResult) {
  41735. if (delegateResult === ContinueSentinel) continue;
  41736. return delegateResult;
  41737. }
  41738. }
  41739. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  41740. if ("suspendedStart" === state) throw state = "completed", context.arg;
  41741. context.dispatchException(context.arg);
  41742. } else "return" === context.method && context.abrupt("return", context.arg);
  41743. state = "executing";
  41744. var record = tryCatch(innerFn, self, context);
  41745. if ("normal" === record.type) {
  41746. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  41747. return {
  41748. value: record.arg,
  41749. done: context.done
  41750. };
  41751. }
  41752. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  41753. }
  41754. };
  41755. }
  41756. function maybeInvokeDelegate(delegate, context) {
  41757. var methodName = context.method,
  41758. method = delegate.iterator[methodName];
  41759. 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;
  41760. var record = tryCatch(method, delegate.iterator, context.arg);
  41761. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  41762. var info = record.arg;
  41763. 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);
  41764. }
  41765. function pushTryEntry(locs) {
  41766. var entry = {
  41767. tryLoc: locs[0]
  41768. };
  41769. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  41770. }
  41771. function resetTryEntry(entry) {
  41772. var record = entry.completion || {};
  41773. record.type = "normal", delete record.arg, entry.completion = record;
  41774. }
  41775. function Context(tryLocsList) {
  41776. this.tryEntries = [{
  41777. tryLoc: "root"
  41778. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  41779. }
  41780. function values(iterable) {
  41781. if (iterable) {
  41782. var iteratorMethod = iterable[iteratorSymbol];
  41783. if (iteratorMethod) return iteratorMethod.call(iterable);
  41784. if ("function" == typeof iterable.next) return iterable;
  41785. if (!isNaN(iterable.length)) {
  41786. var i = -1,
  41787. next = function next() {
  41788. for (; ++i < iterable.length;) {
  41789. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  41790. }
  41791. return next.value = undefined, next.done = !0, next;
  41792. };
  41793. return next.next = next;
  41794. }
  41795. }
  41796. return {
  41797. next: doneResult
  41798. };
  41799. }
  41800. function doneResult() {
  41801. return {
  41802. value: undefined,
  41803. done: !0
  41804. };
  41805. }
  41806. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  41807. value: GeneratorFunctionPrototype,
  41808. configurable: !0
  41809. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  41810. value: GeneratorFunction,
  41811. configurable: !0
  41812. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  41813. var ctor = "function" == typeof genFun && genFun.constructor;
  41814. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  41815. }, exports.mark = function (genFun) {
  41816. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  41817. }, exports.awrap = function (arg) {
  41818. return {
  41819. __await: arg
  41820. };
  41821. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  41822. return this;
  41823. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  41824. void 0 === PromiseImpl && (PromiseImpl = Promise);
  41825. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  41826. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  41827. return result.done ? result.value : iter.next();
  41828. });
  41829. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  41830. return this;
  41831. }), define(Gp, "toString", function () {
  41832. return "[object Generator]";
  41833. }), exports.keys = function (val) {
  41834. var object = Object(val),
  41835. keys = [];
  41836. for (var key in object) {
  41837. keys.push(key);
  41838. }
  41839. return keys.reverse(), function next() {
  41840. for (; keys.length;) {
  41841. var key = keys.pop();
  41842. if (key in object) return next.value = key, next.done = !1, next;
  41843. }
  41844. return next.done = !0, next;
  41845. };
  41846. }, exports.values = values, Context.prototype = {
  41847. constructor: Context,
  41848. reset: function reset(skipTempReset) {
  41849. 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) {
  41850. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  41851. }
  41852. },
  41853. stop: function stop() {
  41854. this.done = !0;
  41855. var rootRecord = this.tryEntries[0].completion;
  41856. if ("throw" === rootRecord.type) throw rootRecord.arg;
  41857. return this.rval;
  41858. },
  41859. dispatchException: function dispatchException(exception) {
  41860. if (this.done) throw exception;
  41861. var context = this;
  41862. function handle(loc, caught) {
  41863. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  41864. }
  41865. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41866. var entry = this.tryEntries[i],
  41867. record = entry.completion;
  41868. if ("root" === entry.tryLoc) return handle("end");
  41869. if (entry.tryLoc <= this.prev) {
  41870. var hasCatch = hasOwn.call(entry, "catchLoc"),
  41871. hasFinally = hasOwn.call(entry, "finallyLoc");
  41872. if (hasCatch && hasFinally) {
  41873. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41874. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41875. } else if (hasCatch) {
  41876. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41877. } else {
  41878. if (!hasFinally) throw new Error("try statement without catch or finally");
  41879. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41880. }
  41881. }
  41882. }
  41883. },
  41884. abrupt: function abrupt(type, arg) {
  41885. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41886. var entry = this.tryEntries[i];
  41887. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  41888. var finallyEntry = entry;
  41889. break;
  41890. }
  41891. }
  41892. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  41893. var record = finallyEntry ? finallyEntry.completion : {};
  41894. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  41895. },
  41896. complete: function complete(record, afterLoc) {
  41897. if ("throw" === record.type) throw record.arg;
  41898. 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;
  41899. },
  41900. finish: function finish(finallyLoc) {
  41901. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41902. var entry = this.tryEntries[i];
  41903. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  41904. }
  41905. },
  41906. "catch": function _catch(tryLoc) {
  41907. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41908. var entry = this.tryEntries[i];
  41909. if (entry.tryLoc === tryLoc) {
  41910. var record = entry.completion;
  41911. if ("throw" === record.type) {
  41912. var thrown = record.arg;
  41913. resetTryEntry(entry);
  41914. }
  41915. return thrown;
  41916. }
  41917. }
  41918. throw new Error("illegal catch attempt");
  41919. },
  41920. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  41921. return this.delegate = {
  41922. iterator: values(iterable),
  41923. resultName: resultName,
  41924. nextLoc: nextLoc
  41925. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  41926. }
  41927. }, exports;
  41928. }
  41929. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41930. /***/ }),
  41931. /***/ 52:
  41932. /*!*****************************************************************!*\
  41933. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  41934. \*****************************************************************/
  41935. /*! no static exports found */
  41936. /***/ (function(module, exports) {
  41937. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  41938. try {
  41939. var info = gen[key](arg);
  41940. var value = info.value;
  41941. } catch (error) {
  41942. reject(error);
  41943. return;
  41944. }
  41945. if (info.done) {
  41946. resolve(value);
  41947. } else {
  41948. Promise.resolve(value).then(_next, _throw);
  41949. }
  41950. }
  41951. function _asyncToGenerator(fn) {
  41952. return function () {
  41953. var self = this,
  41954. args = arguments;
  41955. return new Promise(function (resolve, reject) {
  41956. var gen = fn.apply(self, args);
  41957. function _next(value) {
  41958. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  41959. }
  41960. function _throw(err) {
  41961. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  41962. }
  41963. _next(undefined);
  41964. });
  41965. };
  41966. }
  41967. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41968. /***/ }),
  41969. /***/ 53:
  41970. /*!***********************************************************************!*\
  41971. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFormat.js ***!
  41972. \***********************************************************************/
  41973. /*! no static exports found */
  41974. /***/ (function(module, exports, __webpack_require__) {
  41975. "use strict";
  41976. Object.defineProperty(exports, "__esModule", {
  41977. value: true
  41978. });
  41979. exports.default = void 0;
  41980. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  41981. // 所以这里做一个兼容polyfill的兼容处理
  41982. if (!String.prototype.padStart) {
  41983. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  41984. String.prototype.padStart = function (maxLength) {
  41985. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  41986. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  41987. var str = this;
  41988. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  41989. if (str.length >= maxLength) return String(str);
  41990. var fillLength = maxLength - str.length,
  41991. times = Math.ceil(fillLength / fillString.length);
  41992. while (times >>= 1) {
  41993. fillString += fillString;
  41994. if (times === 1) {
  41995. fillString += fillString;
  41996. }
  41997. }
  41998. return fillString.slice(0, fillLength) + str;
  41999. };
  42000. }
  42001. // 其他更多是格式化有如下:
  42002. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  42003. function timeFormat() {
  42004. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  42005. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  42006. // 如果为null,则格式化当前时间
  42007. if (!dateTime) dateTime = Number(new Date());
  42008. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  42009. if (dateTime.toString().length == 10) dateTime *= 1000;
  42010. var date = new Date(dateTime);
  42011. var ret;
  42012. var opt = {
  42013. "y+": date.getFullYear().toString(),
  42014. // 年
  42015. "m+": (date.getMonth() + 1).toString(),
  42016. // 月
  42017. "d+": date.getDate().toString(),
  42018. // 日
  42019. "h+": date.getHours().toString(),
  42020. // 时
  42021. "M+": date.getMinutes().toString(),
  42022. // 分
  42023. "s+": date.getSeconds().toString() // 秒
  42024. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  42025. };
  42026. for (var k in opt) {
  42027. ret = new RegExp("(" + k + ")").exec(fmt);
  42028. if (ret) {
  42029. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  42030. }
  42031. ;
  42032. }
  42033. ;
  42034. return fmt;
  42035. }
  42036. var _default = timeFormat;
  42037. exports.default = _default;
  42038. /***/ }),
  42039. /***/ 54:
  42040. /*!*********************************************************************!*\
  42041. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFrom.js ***!
  42042. \*********************************************************************/
  42043. /*! no static exports found */
  42044. /***/ (function(module, exports, __webpack_require__) {
  42045. "use strict";
  42046. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42047. Object.defineProperty(exports, "__esModule", {
  42048. value: true
  42049. });
  42050. exports.default = void 0;
  42051. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 53));
  42052. /**
  42053. * 时间戳转为多久之前
  42054. * @param String timestamp 时间戳
  42055. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  42056. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  42057. */
  42058. function timeFrom() {
  42059. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  42060. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  42061. // 如果为null,则格式化当前时间
  42062. if (!dateTime) dateTime = Number(new Date());
  42063. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  42064. if (dateTime.toString().length == 10) dateTime *= 1000;
  42065. var timestamp = +new Date(Number(dateTime));
  42066. var timer = (Number(new Date()) - timestamp) / 1000;
  42067. // 如果小于5分钟,则返回"刚刚",其他以此类推
  42068. var tips = '';
  42069. switch (true) {
  42070. case timer < 300:
  42071. tips = '刚刚';
  42072. break;
  42073. case timer >= 300 && timer < 3600:
  42074. tips = parseInt(timer / 60) + '分钟前';
  42075. break;
  42076. case timer >= 3600 && timer < 86400:
  42077. tips = parseInt(timer / 3600) + '小时前';
  42078. break;
  42079. case timer >= 86400 && timer < 2592000:
  42080. tips = parseInt(timer / 86400) + '天前';
  42081. break;
  42082. default:
  42083. // 如果format为false,则无论什么时间戳,都显示xx之前
  42084. if (format === false) {
  42085. if (timer >= 2592000 && timer < 365 * 86400) {
  42086. tips = parseInt(timer / (86400 * 30)) + '个月前';
  42087. } else {
  42088. tips = parseInt(timer / (86400 * 365)) + '年前';
  42089. }
  42090. } else {
  42091. tips = (0, _timeFormat.default)(timestamp, format);
  42092. }
  42093. }
  42094. return tips;
  42095. }
  42096. var _default = timeFrom;
  42097. exports.default = _default;
  42098. /***/ }),
  42099. /***/ 55:
  42100. /*!**************************************************************************!*\
  42101. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/colorGradient.js ***!
  42102. \**************************************************************************/
  42103. /*! no static exports found */
  42104. /***/ (function(module, exports, __webpack_require__) {
  42105. "use strict";
  42106. Object.defineProperty(exports, "__esModule", {
  42107. value: true
  42108. });
  42109. exports.default = void 0;
  42110. /**
  42111. * 求两个颜色之间的渐变值
  42112. * @param {string} startColor 开始的颜色
  42113. * @param {string} endColor 结束的颜色
  42114. * @param {number} step 颜色等分的份额
  42115. * */
  42116. function colorGradient() {
  42117. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  42118. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  42119. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  42120. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  42121. var startR = startRGB[0];
  42122. var startG = startRGB[1];
  42123. var startB = startRGB[2];
  42124. var endRGB = hexToRgb(endColor, false);
  42125. var endR = endRGB[0];
  42126. var endG = endRGB[1];
  42127. var endB = endRGB[2];
  42128. var sR = (endR - startR) / step; //总差值
  42129. var sG = (endG - startG) / step;
  42130. var sB = (endB - startB) / step;
  42131. var colorArr = [];
  42132. for (var i = 0; i < step; i++) {
  42133. //计算每一步的hex值
  42134. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  42135. colorArr.push(hex);
  42136. }
  42137. return colorArr;
  42138. }
  42139. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  42140. function hexToRgb(sColor) {
  42141. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42142. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42143. sColor = sColor.toLowerCase();
  42144. if (sColor && reg.test(sColor)) {
  42145. if (sColor.length === 4) {
  42146. var sColorNew = "#";
  42147. for (var i = 1; i < 4; i += 1) {
  42148. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  42149. }
  42150. sColor = sColorNew;
  42151. }
  42152. //处理六位的颜色值
  42153. var sColorChange = [];
  42154. for (var _i = 1; _i < 7; _i += 2) {
  42155. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  42156. }
  42157. if (!str) {
  42158. return sColorChange;
  42159. } else {
  42160. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  42161. }
  42162. } else if (/^(rgb|RGB)/.test(sColor)) {
  42163. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  42164. return arr.map(function (val) {
  42165. return Number(val);
  42166. });
  42167. } else {
  42168. return sColor;
  42169. }
  42170. }
  42171. ;
  42172. // 将rgb表示方式转换为hex表示方式
  42173. function rgbToHex(rgb) {
  42174. var _this = rgb;
  42175. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42176. if (/^(rgb|RGB)/.test(_this)) {
  42177. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  42178. var strHex = "#";
  42179. for (var i = 0; i < aColor.length; i++) {
  42180. var hex = Number(aColor[i]).toString(16);
  42181. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  42182. if (hex === "0") {
  42183. hex += hex;
  42184. }
  42185. strHex += hex;
  42186. }
  42187. if (strHex.length !== 7) {
  42188. strHex = _this;
  42189. }
  42190. return strHex;
  42191. } else if (reg.test(_this)) {
  42192. var aNum = _this.replace(/#/, "").split("");
  42193. if (aNum.length === 6) {
  42194. return _this;
  42195. } else if (aNum.length === 3) {
  42196. var numHex = "#";
  42197. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  42198. numHex += aNum[_i2] + aNum[_i2];
  42199. }
  42200. return numHex;
  42201. }
  42202. } else {
  42203. return _this;
  42204. }
  42205. }
  42206. /**
  42207. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  42208. * sHex为传入的十六进制的色值
  42209. * alpha为rgba的透明度
  42210. */
  42211. function colorToRgba(color) {
  42212. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  42213. color = rgbToHex(color);
  42214. // 十六进制颜色值的正则表达式
  42215. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42216. /* 16进制颜色转为RGB格式 */
  42217. var sColor = color.toLowerCase();
  42218. if (sColor && reg.test(sColor)) {
  42219. if (sColor.length === 4) {
  42220. var sColorNew = '#';
  42221. for (var i = 1; i < 4; i += 1) {
  42222. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  42223. }
  42224. sColor = sColorNew;
  42225. }
  42226. // 处理六位的颜色值
  42227. var sColorChange = [];
  42228. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  42229. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  42230. }
  42231. // return sColorChange.join(',')
  42232. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  42233. } else {
  42234. return sColor;
  42235. }
  42236. }
  42237. var _default = {
  42238. colorGradient: colorGradient,
  42239. hexToRgb: hexToRgb,
  42240. rgbToHex: rgbToHex,
  42241. colorToRgba: colorToRgba
  42242. };
  42243. exports.default = _default;
  42244. /***/ }),
  42245. /***/ 56:
  42246. /*!*****************************************************************!*\
  42247. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/guid.js ***!
  42248. \*****************************************************************/
  42249. /*! no static exports found */
  42250. /***/ (function(module, exports, __webpack_require__) {
  42251. "use strict";
  42252. Object.defineProperty(exports, "__esModule", {
  42253. value: true
  42254. });
  42255. exports.default = void 0;
  42256. /**
  42257. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  42258. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  42259. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  42260. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  42261. * v-for的时候,推荐使用后端返回的id而不是循环的index
  42262. * @param {Number} len uuid的长度
  42263. * @param {Boolean} firstU 将返回的首字母置为"u"
  42264. * @param {Number} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  42265. */
  42266. function guid() {
  42267. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  42268. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42269. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  42270. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  42271. var uuid = [];
  42272. radix = radix || chars.length;
  42273. if (len) {
  42274. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  42275. for (var i = 0; i < len; i++) {
  42276. uuid[i] = chars[0 | Math.random() * radix];
  42277. }
  42278. } else {
  42279. var r;
  42280. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  42281. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  42282. uuid[14] = '4';
  42283. for (var _i = 0; _i < 36; _i++) {
  42284. if (!uuid[_i]) {
  42285. r = 0 | Math.random() * 16;
  42286. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  42287. }
  42288. }
  42289. }
  42290. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guid不能用作id或者class
  42291. if (firstU) {
  42292. uuid.shift();
  42293. return 'u' + uuid.join('');
  42294. } else {
  42295. return uuid.join('');
  42296. }
  42297. }
  42298. var _default = guid;
  42299. exports.default = _default;
  42300. /***/ }),
  42301. /***/ 57:
  42302. /*!******************************************************************!*\
  42303. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/color.js ***!
  42304. \******************************************************************/
  42305. /*! no static exports found */
  42306. /***/ (function(module, exports, __webpack_require__) {
  42307. "use strict";
  42308. Object.defineProperty(exports, "__esModule", {
  42309. value: true
  42310. });
  42311. exports.default = void 0;
  42312. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  42313. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  42314. var color = {
  42315. primary: "#2979ff",
  42316. primaryDark: "#2b85e4",
  42317. primaryDisabled: "#a0cfff",
  42318. primaryLight: "#ecf5ff",
  42319. bgColor: "#f3f4f6",
  42320. info: "#909399",
  42321. infoDark: "#82848a",
  42322. infoDisabled: "#c8c9cc",
  42323. infoLight: "#f4f4f5",
  42324. warning: "#ff9900",
  42325. warningDark: "#f29100",
  42326. warningDisabled: "#fcbd71",
  42327. warningLight: "#fdf6ec",
  42328. error: "#fa3534",
  42329. errorDark: "#dd6161",
  42330. errorDisabled: "#fab6b6",
  42331. errorLight: "#fef0f0",
  42332. success: "#19be6b",
  42333. successDark: "#18b566",
  42334. successDisabled: "#71d5a1",
  42335. successLight: "#dbf1e1",
  42336. mainColor: "#303133",
  42337. contentColor: "#606266",
  42338. tipsColor: "#909399",
  42339. lightColor: "#c0c4cc",
  42340. borderColor: "#e4e7ed"
  42341. };
  42342. var _default = color;
  42343. exports.default = _default;
  42344. /***/ }),
  42345. /***/ 58:
  42346. /*!**********************************************************************!*\
  42347. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/type2icon.js ***!
  42348. \**********************************************************************/
  42349. /*! no static exports found */
  42350. /***/ (function(module, exports, __webpack_require__) {
  42351. "use strict";
  42352. Object.defineProperty(exports, "__esModule", {
  42353. value: true
  42354. });
  42355. exports.default = void 0;
  42356. /**
  42357. * 根据主题type值,获取对应的图标
  42358. * @param String type 主题名称,primary|info|error|warning|success
  42359. * @param String fill 是否使用fill填充实体的图标
  42360. */
  42361. function type2icon() {
  42362. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  42363. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  42364. // 如果非预置值,默认为success
  42365. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  42366. var iconName = '';
  42367. // 目前(2019-12-12),info和primary使用同一个图标
  42368. switch (type) {
  42369. case 'primary':
  42370. iconName = 'info-circle';
  42371. break;
  42372. case 'info':
  42373. iconName = 'info-circle';
  42374. break;
  42375. case 'error':
  42376. iconName = 'close-circle';
  42377. break;
  42378. case 'warning':
  42379. iconName = 'error-circle';
  42380. break;
  42381. case 'success':
  42382. iconName = 'checkmark-circle';
  42383. break;
  42384. default:
  42385. iconName = 'checkmark-circle';
  42386. }
  42387. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  42388. if (fill) iconName += '-fill';
  42389. return iconName;
  42390. }
  42391. var _default = type2icon;
  42392. exports.default = _default;
  42393. /***/ }),
  42394. /***/ 59:
  42395. /*!************************************************************************!*\
  42396. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/randomArray.js ***!
  42397. \************************************************************************/
  42398. /*! no static exports found */
  42399. /***/ (function(module, exports, __webpack_require__) {
  42400. "use strict";
  42401. Object.defineProperty(exports, "__esModule", {
  42402. value: true
  42403. });
  42404. exports.default = void 0;
  42405. // 打乱数组
  42406. function randomArray() {
  42407. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  42408. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  42409. return array.sort(function () {
  42410. return Math.random() - 0.5;
  42411. });
  42412. }
  42413. var _default = randomArray;
  42414. exports.default = _default;
  42415. /***/ }),
  42416. /***/ 6:
  42417. /*!***************************************************************!*\
  42418. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  42419. \***************************************************************/
  42420. /*! no static exports found */
  42421. /***/ (function(module, exports) {
  42422. function _arrayWithHoles(arr) {
  42423. if (Array.isArray(arr)) return arr;
  42424. }
  42425. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42426. /***/ }),
  42427. /***/ 60:
  42428. /*!********************************************************************!*\
  42429. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/addUnit.js ***!
  42430. \********************************************************************/
  42431. /*! no static exports found */
  42432. /***/ (function(module, exports, __webpack_require__) {
  42433. "use strict";
  42434. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42435. Object.defineProperty(exports, "__esModule", {
  42436. value: true
  42437. });
  42438. exports.default = addUnit;
  42439. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 47));
  42440. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  42441. function addUnit() {
  42442. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  42443. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  42444. value = String(value);
  42445. // 用uView内置验证规则中的number判断是否为数值
  42446. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  42447. }
  42448. /***/ }),
  42449. /***/ 61:
  42450. /*!*******************************************************************!*\
  42451. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/random.js ***!
  42452. \*******************************************************************/
  42453. /*! no static exports found */
  42454. /***/ (function(module, exports, __webpack_require__) {
  42455. "use strict";
  42456. Object.defineProperty(exports, "__esModule", {
  42457. value: true
  42458. });
  42459. exports.default = void 0;
  42460. function random(min, max) {
  42461. if (min >= 0 && max > 0 && max >= min) {
  42462. var gab = max - min + 1;
  42463. return Math.floor(Math.random() * gab + min);
  42464. } else {
  42465. return 0;
  42466. }
  42467. }
  42468. var _default = random;
  42469. exports.default = _default;
  42470. /***/ }),
  42471. /***/ 62:
  42472. /*!*****************************************************************!*\
  42473. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/trim.js ***!
  42474. \*****************************************************************/
  42475. /*! no static exports found */
  42476. /***/ (function(module, exports, __webpack_require__) {
  42477. "use strict";
  42478. Object.defineProperty(exports, "__esModule", {
  42479. value: true
  42480. });
  42481. exports.default = void 0;
  42482. function trim(str) {
  42483. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  42484. if (pos == 'both') {
  42485. return str.replace(/^\s+|\s+$/g, "");
  42486. } else if (pos == "left") {
  42487. return str.replace(/^\s*/, '');
  42488. } else if (pos == 'right') {
  42489. return str.replace(/(\s*$)/g, "");
  42490. } else if (pos == 'all') {
  42491. return str.replace(/\s+/g, "");
  42492. } else {
  42493. return str;
  42494. }
  42495. }
  42496. var _default = trim;
  42497. exports.default = _default;
  42498. /***/ }),
  42499. /***/ 63:
  42500. /*!******************************************************************!*\
  42501. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/toast.js ***!
  42502. \******************************************************************/
  42503. /*! no static exports found */
  42504. /***/ (function(module, exports, __webpack_require__) {
  42505. "use strict";
  42506. /* WEBPACK VAR INJECTION */(function(uni) {
  42507. Object.defineProperty(exports, "__esModule", {
  42508. value: true
  42509. });
  42510. exports.default = void 0;
  42511. function toast(title) {
  42512. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  42513. uni.showToast({
  42514. title: title,
  42515. icon: 'none',
  42516. duration: duration
  42517. });
  42518. }
  42519. var _default = toast;
  42520. exports.default = _default;
  42521. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42522. /***/ }),
  42523. /***/ 64:
  42524. /*!**********************************************************************!*\
  42525. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/getParent.js ***!
  42526. \**********************************************************************/
  42527. /*! no static exports found */
  42528. /***/ (function(module, exports, __webpack_require__) {
  42529. "use strict";
  42530. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42531. Object.defineProperty(exports, "__esModule", {
  42532. value: true
  42533. });
  42534. exports.default = getParent;
  42535. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  42536. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42537. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42538. function getParent(name, keys) {
  42539. var parent = this.$parent;
  42540. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42541. while (parent) {
  42542. // 父组件
  42543. if (parent.$options.name !== name) {
  42544. // 如果组件的name不相等,继续上一级寻找
  42545. parent = parent.$parent;
  42546. } else {
  42547. var _ret = function () {
  42548. var data = {};
  42549. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  42550. if (Array.isArray(keys)) {
  42551. keys.map(function (val) {
  42552. data[val] = parent[val] ? parent[val] : '';
  42553. });
  42554. } else {
  42555. // 历遍传过来的对象参数
  42556. for (var i in keys) {
  42557. // 如果子组件有此值则用,无此值则用父组件的值
  42558. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  42559. if (Array.isArray(keys[i])) {
  42560. if (keys[i].length) {
  42561. data[i] = keys[i];
  42562. } else {
  42563. data[i] = parent[i];
  42564. }
  42565. } else if (keys[i].constructor === Object) {
  42566. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  42567. if (Object.keys(keys[i]).length) {
  42568. data[i] = keys[i];
  42569. } else {
  42570. data[i] = parent[i];
  42571. }
  42572. } else {
  42573. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  42574. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  42575. }
  42576. }
  42577. }
  42578. return {
  42579. v: data
  42580. };
  42581. }();
  42582. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  42583. }
  42584. }
  42585. return {};
  42586. }
  42587. /***/ }),
  42588. /***/ 65:
  42589. /*!********************************************************************!*\
  42590. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/$parent.js ***!
  42591. \********************************************************************/
  42592. /*! no static exports found */
  42593. /***/ (function(module, exports, __webpack_require__) {
  42594. "use strict";
  42595. Object.defineProperty(exports, "__esModule", {
  42596. value: true
  42597. });
  42598. exports.default = $parent;
  42599. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42600. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42601. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  42602. // 值(默认为undefined),就是查找最顶层的$parent
  42603. function $parent() {
  42604. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  42605. var parent = this.$parent;
  42606. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42607. while (parent) {
  42608. // 父组件
  42609. if (parent.$options && parent.$options.name !== name) {
  42610. // 如果组件的name不相等,继续上一级寻找
  42611. parent = parent.$parent;
  42612. } else {
  42613. return parent;
  42614. }
  42615. }
  42616. return false;
  42617. }
  42618. /***/ }),
  42619. /***/ 66:
  42620. /*!****************************************************************!*\
  42621. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/sys.js ***!
  42622. \****************************************************************/
  42623. /*! no static exports found */
  42624. /***/ (function(module, exports, __webpack_require__) {
  42625. "use strict";
  42626. /* WEBPACK VAR INJECTION */(function(uni) {
  42627. Object.defineProperty(exports, "__esModule", {
  42628. value: true
  42629. });
  42630. exports.os = os;
  42631. exports.sys = sys;
  42632. function os() {
  42633. return uni.getSystemInfoSync().platform;
  42634. }
  42635. ;
  42636. function sys() {
  42637. return uni.getSystemInfoSync();
  42638. }
  42639. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42640. /***/ }),
  42641. /***/ 67:
  42642. /*!*********************************************************************!*\
  42643. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/debounce.js ***!
  42644. \*********************************************************************/
  42645. /*! no static exports found */
  42646. /***/ (function(module, exports, __webpack_require__) {
  42647. "use strict";
  42648. Object.defineProperty(exports, "__esModule", {
  42649. value: true
  42650. });
  42651. exports.default = void 0;
  42652. var timeout = null;
  42653. /**
  42654. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  42655. *
  42656. * @param {Function} func 要执行的回调函数
  42657. * @param {Number} wait 延时的时间
  42658. * @param {Boolean} immediate 是否立即执行
  42659. * @return null
  42660. */
  42661. function debounce(func) {
  42662. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42663. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  42664. // 清除定时器
  42665. if (timeout !== null) clearTimeout(timeout);
  42666. // 立即执行,此类情况一般用不到
  42667. if (immediate) {
  42668. var callNow = !timeout;
  42669. timeout = setTimeout(function () {
  42670. timeout = null;
  42671. }, wait);
  42672. if (callNow) typeof func === 'function' && func();
  42673. } else {
  42674. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  42675. timeout = setTimeout(function () {
  42676. typeof func === 'function' && func();
  42677. }, wait);
  42678. }
  42679. }
  42680. var _default = debounce;
  42681. exports.default = _default;
  42682. /***/ }),
  42683. /***/ 68:
  42684. /*!*********************************************************************!*\
  42685. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/throttle.js ***!
  42686. \*********************************************************************/
  42687. /*! no static exports found */
  42688. /***/ (function(module, exports, __webpack_require__) {
  42689. "use strict";
  42690. Object.defineProperty(exports, "__esModule", {
  42691. value: true
  42692. });
  42693. exports.default = void 0;
  42694. var timer, flag;
  42695. /**
  42696. * 节流原理:在一定时间内,只能触发一次
  42697. *
  42698. * @param {Function} func 要执行的回调函数
  42699. * @param {Number} wait 延时的时间
  42700. * @param {Boolean} immediate 是否立即执行
  42701. * @return null
  42702. */
  42703. function throttle(func) {
  42704. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42705. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  42706. if (immediate) {
  42707. if (!flag) {
  42708. flag = true;
  42709. // 如果是立即执行,则在wait毫秒内开始时执行
  42710. typeof func === 'function' && func();
  42711. timer = setTimeout(function () {
  42712. flag = false;
  42713. }, wait);
  42714. }
  42715. } else {
  42716. if (!flag) {
  42717. flag = true;
  42718. // 如果是非立即执行,则在wait毫秒内的结束处执行
  42719. timer = setTimeout(function () {
  42720. flag = false;
  42721. typeof func === 'function' && func();
  42722. }, wait);
  42723. }
  42724. }
  42725. }
  42726. ;
  42727. var _default = throttle;
  42728. exports.default = _default;
  42729. /***/ }),
  42730. /***/ 69:
  42731. /*!*****************************************************************!*\
  42732. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/config.js ***!
  42733. \*****************************************************************/
  42734. /*! no static exports found */
  42735. /***/ (function(module, exports, __webpack_require__) {
  42736. "use strict";
  42737. Object.defineProperty(exports, "__esModule", {
  42738. value: true
  42739. });
  42740. exports.default = void 0;
  42741. // 此版本发布于2022-04-19
  42742. var version = '1.8.6';
  42743. var _default = {
  42744. v: version,
  42745. version: version,
  42746. // 主题名称
  42747. type: ['primary', 'success', 'info', 'error', 'warning']
  42748. };
  42749. exports.default = _default;
  42750. /***/ }),
  42751. /***/ 7:
  42752. /*!*********************************************************************!*\
  42753. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  42754. \*********************************************************************/
  42755. /*! no static exports found */
  42756. /***/ (function(module, exports) {
  42757. function _iterableToArrayLimit(arr, i) {
  42758. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  42759. if (null != _i) {
  42760. var _s,
  42761. _e,
  42762. _x,
  42763. _r,
  42764. _arr = [],
  42765. _n = !0,
  42766. _d = !1;
  42767. try {
  42768. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  42769. if (Object(_i) !== _i) return;
  42770. _n = !1;
  42771. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  42772. ;
  42773. }
  42774. } catch (err) {
  42775. _d = !0, _e = err;
  42776. } finally {
  42777. try {
  42778. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  42779. } finally {
  42780. if (_d) throw _e;
  42781. }
  42782. }
  42783. return _arr;
  42784. }
  42785. }
  42786. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42787. /***/ }),
  42788. /***/ 70:
  42789. /*!*****************************************************************!*\
  42790. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/zIndex.js ***!
  42791. \*****************************************************************/
  42792. /*! no static exports found */
  42793. /***/ (function(module, exports, __webpack_require__) {
  42794. "use strict";
  42795. Object.defineProperty(exports, "__esModule", {
  42796. value: true
  42797. });
  42798. exports.default = void 0;
  42799. // uniapp在H5中各API的z-index值如下:
  42800. /**
  42801. * actionsheet: 999
  42802. * modal: 999
  42803. * navigate: 998
  42804. * tabbar: 998
  42805. * toast: 999
  42806. */
  42807. var _default = {
  42808. toast: 10090,
  42809. noNetwork: 10080,
  42810. // popup包含popup,actionsheet,keyboard,picker的值
  42811. popup: 10075,
  42812. mask: 10070,
  42813. navbar: 980,
  42814. topTips: 975,
  42815. sticky: 970,
  42816. indexListSticky: 965
  42817. };
  42818. exports.default = _default;
  42819. /***/ }),
  42820. /***/ 8:
  42821. /*!***************************************************************************!*\
  42822. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  42823. \***************************************************************************/
  42824. /*! no static exports found */
  42825. /***/ (function(module, exports, __webpack_require__) {
  42826. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  42827. function _unsupportedIterableToArray(o, minLen) {
  42828. if (!o) return;
  42829. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  42830. var n = Object.prototype.toString.call(o).slice(8, -1);
  42831. if (n === "Object" && o.constructor) n = o.constructor.name;
  42832. if (n === "Map" || n === "Set") return Array.from(o);
  42833. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  42834. }
  42835. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42836. /***/ }),
  42837. /***/ 9:
  42838. /*!*****************************************************************!*\
  42839. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  42840. \*****************************************************************/
  42841. /*! no static exports found */
  42842. /***/ (function(module, exports) {
  42843. function _arrayLikeToArray(arr, len) {
  42844. if (len == null || len > arr.length) len = arr.length;
  42845. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  42846. arr2[i] = arr[i];
  42847. }
  42848. return arr2;
  42849. }
  42850. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42851. /***/ })
  42852. }]);
  42853. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map