vendor.js 1.3 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953
  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$getArea$;
  8864. var _default = (_getDistrict$getArea$ = {
  8865. //选择行政区
  8866. getDistrict: function getDistrict(data) {
  8867. return _request.default.requestFn("/system/dict/data/type/district", data);
  8868. },
  8869. //选择小区
  8870. getArea: function getArea(data) {
  8871. return _request.default.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. }, (0, _defineProperty2.default)(_getDistrict$getArea$, "getArea", function getArea() {
  9027. return _request.default.requestEn("/mobile/area/getArea");
  9028. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getDictInfoList", function getDictInfoList(data) {
  9029. return _request.default.requestEn("/mobile/sysInfo/dictlist", data, 'POST');
  9030. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "setregulatorBox", function setregulatorBox(data) {
  9031. return _request.default.requestEn("/mobile/regulatorBox", data, 'POST');
  9032. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "setwarningPile", function setwarningPile(data) {
  9033. return _request.default.requestEn("/mobile/warningPile", data, 'Put');
  9034. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getwarningPileList", function getwarningPileList(data) {
  9035. return _request.default.requestEn("/mobile/warningPile/getList", data);
  9036. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getwarningPileInfo", function getwarningPileInfo(data) {
  9037. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9038. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "setcourtyardNetworkManagement", function setcourtyardNetworkManagement(data) {
  9039. return _request.default.requestEn("/mobile/courtyardNetworkManagement", data, 'POST');
  9040. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "setemergencyRepair", function setemergencyRepair(data) {
  9041. return _request.default.requestEn("/mobile/emergencyRepair", data, 'POST');
  9042. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getOne", function getOne() {
  9043. return _request.default.requestEn("/mobile/explain/getOne");
  9044. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getWorker", function getWorker() {
  9045. return _request.default.requestEn("/mobile/user/getWorker");
  9046. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getSearch", function getSearch(data) {
  9047. return _request.default.requestEn("/mobile/sysInfo/search", data);
  9048. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getcourtyardNetworkManagement", function getcourtyardNetworkManagement(data) {
  9049. return _request.default.requestEn("/mobile/courtyardNetworkManagement/".concat(data));
  9050. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getemergencyRepair", function getemergencyRepair(data) {
  9051. return _request.default.requestEn("/mobile/emergencyRepair/".concat(data));
  9052. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getregulatorBox", function getregulatorBox(data) {
  9053. return _request.default.requestEn("/mobile/regulatorBox/".concat(data));
  9054. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getwarningPile", function getwarningPile(data) {
  9055. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9056. }), _getDistrict$getArea$);
  9057. exports.default = _default;
  9058. /***/ }),
  9059. /***/ 35:
  9060. /*!****************************************************!*\
  9061. !*** E:/Desktop/zd_wechatApp(1)/common/request.js ***!
  9062. \****************************************************/
  9063. /*! no static exports found */
  9064. /***/ (function(module, exports, __webpack_require__) {
  9065. "use strict";
  9066. /* WEBPACK VAR INJECTION */(function(uni) {
  9067. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9068. Object.defineProperty(exports, "__esModule", {
  9069. value: true
  9070. });
  9071. exports.default = void 0;
  9072. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 36));
  9073. var _default = {
  9074. // 请求方法
  9075. requestEn: function requestEn(url) {
  9076. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9077. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9078. return new Promise(function (resolve, reject) {
  9079. // console.log(http.webUrl + url +'---'+ uni.getStorageSync('token'))
  9080. uni.request({
  9081. url: _http.default.webUrl + url,
  9082. method: methods ? methods : 'GET',
  9083. data: data,
  9084. success: function success(res) {
  9085. if (res.data.code === 200) {
  9086. resolve(res.data.data === undefined ? null : res.data.data);
  9087. } else if (res.data.code === 403 || res.data.code === 401) {
  9088. uni.showToast({
  9089. title: 'Token超时,请重新登录',
  9090. icon: 'none'
  9091. });
  9092. if (uni.getStorageSync('token')) {
  9093. uni.removeStorage({
  9094. key: 'token',
  9095. success: function success() {
  9096. uni.navigateTo({
  9097. url: '/pages/login/login'
  9098. });
  9099. }
  9100. });
  9101. } else {
  9102. uni.navigateTo({
  9103. url: '/pages/login/login'
  9104. });
  9105. }
  9106. } else {
  9107. uni.showToast({
  9108. title: res.data.msg ? res.data.msg : '系统异常',
  9109. icon: 'none'
  9110. });
  9111. }
  9112. },
  9113. fail: function fail() {
  9114. uni.showToast({
  9115. title: '网络异常',
  9116. icon: 'none'
  9117. });
  9118. }
  9119. });
  9120. });
  9121. },
  9122. // 请求方法
  9123. requestFn: function requestFn(url) {
  9124. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9125. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9126. return new Promise(function (resolve, reject) {
  9127. console.log(_http.default.webUrl + url + '---' + uni.getStorageSync('token'));
  9128. uni.request({
  9129. url: _http.default.webUrl + url,
  9130. method: methods ? methods : 'GET',
  9131. data: data,
  9132. header: {
  9133. "MAuthorization": "wxBearer ".concat(uni.getStorageSync('token') ? uni.getStorageSync('token') : ''),
  9134. "userType": 'MOdBILE'
  9135. },
  9136. success: function success(res) {
  9137. console.log(res);
  9138. if (res.data.code === 200) {
  9139. resolve(res.data.data === undefined ? null : res.data.data);
  9140. } else if (res.data.code === 403 || res.data.code === 401) {
  9141. uni.showToast({
  9142. title: 'Token超时,请重新登录',
  9143. icon: 'none'
  9144. });
  9145. if (uni.getStorageSync('token')) {
  9146. uni.removeStorage({
  9147. key: 'token',
  9148. success: function success() {
  9149. uni.navigateTo({
  9150. url: '/pages/login/login'
  9151. });
  9152. }
  9153. });
  9154. } else {
  9155. uni.navigateTo({
  9156. url: '/pages/login/login'
  9157. });
  9158. }
  9159. } else {
  9160. uni.showToast({
  9161. title: res.data.msg ? res.data.msg : '系统异常',
  9162. icon: 'none'
  9163. });
  9164. }
  9165. },
  9166. fail: function fail() {
  9167. uni.showToast({
  9168. title: '网络异常',
  9169. icon: 'none'
  9170. });
  9171. }
  9172. });
  9173. });
  9174. },
  9175. requestLo: function requestLo(url) {
  9176. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9177. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9178. return new Promise(function (resolve, reject) {
  9179. console.log(_http.default.webUrl + url);
  9180. uni.request({
  9181. url: _http.default.webUrl + url,
  9182. method: methods ? methods : 'GET',
  9183. data: data,
  9184. header: {
  9185. "userType": 'MOBILE'
  9186. },
  9187. success: function success(res) {
  9188. console.log(res);
  9189. if (res.data.code === 200) {
  9190. resolve(res.data === undefined ? null : res.data);
  9191. } else if (res.data.code === 403) {
  9192. uni.showToast({
  9193. title: res.data.msg ? res.data.msg : 'Token超时,请重新登录',
  9194. icon: 'none'
  9195. });
  9196. if (uni.getStorageSync('token')) {
  9197. uni.removeStorage({
  9198. key: 'token',
  9199. success: function success() {
  9200. uni.navigateTo({
  9201. url: '/pages/login/login'
  9202. });
  9203. }
  9204. });
  9205. } else {
  9206. uni.navigateTo({
  9207. url: '/pages/login/login'
  9208. });
  9209. }
  9210. } else {
  9211. uni.showToast({
  9212. title: res.data.msg ? res.data.msg : '系统异常',
  9213. icon: 'none'
  9214. });
  9215. }
  9216. },
  9217. fail: function fail() {
  9218. uni.showToast({
  9219. title: '网络异常',
  9220. icon: 'none'
  9221. });
  9222. }
  9223. });
  9224. });
  9225. }
  9226. };
  9227. exports.default = _default;
  9228. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9229. /***/ }),
  9230. /***/ 358:
  9231. /*!****************************************************************!*\
  9232. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/emitter.js ***!
  9233. \****************************************************************/
  9234. /*! no static exports found */
  9235. /***/ (function(module, exports, __webpack_require__) {
  9236. "use strict";
  9237. Object.defineProperty(exports, "__esModule", {
  9238. value: true
  9239. });
  9240. exports.default = void 0;
  9241. /**
  9242. * 递归使用 call 方式this指向
  9243. * @param componentName // 需要找的组件的名称
  9244. * @param eventName // 事件名称
  9245. * @param params // 需要传递的参数
  9246. */
  9247. function _broadcast(componentName, eventName, params) {
  9248. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  9249. this.$children.map(function (child) {
  9250. if (componentName === child.$options.name) {
  9251. child.$emit.apply(child, [eventName].concat(params));
  9252. } else {
  9253. _broadcast.apply(child, [componentName, eventName].concat(params));
  9254. }
  9255. });
  9256. }
  9257. var _default = {
  9258. methods: {
  9259. /**
  9260. * 派发 (向上查找) (一个)
  9261. * @param componentName // 需要找的组件的名称
  9262. * @param eventName // 事件名称
  9263. * @param params // 需要传递的参数
  9264. */
  9265. dispatch: function dispatch(componentName, eventName, params) {
  9266. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  9267. var name = parent.$options.name; // 获取当前组件实例的name
  9268. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  9269. // 循环出当前名称的一样的组件实例
  9270. while (parent && (!name || name !== componentName)) {
  9271. parent = parent.$parent;
  9272. if (parent) {
  9273. name = parent.$options.name;
  9274. }
  9275. }
  9276. // 有节点表示当前找到了name一样的实例
  9277. if (parent) {
  9278. parent.$emit.apply(parent, [eventName].concat(params));
  9279. }
  9280. },
  9281. /**
  9282. * 广播 (向下查找) (广播多个)
  9283. * @param componentName // 需要找的组件的名称
  9284. * @param eventName // 事件名称
  9285. * @param params // 需要传递的参数
  9286. */
  9287. broadcast: function broadcast(componentName, eventName, params) {
  9288. _broadcast.call(this, componentName, eventName, params);
  9289. }
  9290. }
  9291. };
  9292. exports.default = _default;
  9293. /***/ }),
  9294. /***/ 36:
  9295. /*!*************************************************!*\
  9296. !*** E:/Desktop/zd_wechatApp(1)/common/http.js ***!
  9297. \*************************************************/
  9298. /*! no static exports found */
  9299. /***/ (function(module, exports, __webpack_require__) {
  9300. "use strict";
  9301. Object.defineProperty(exports, "__esModule", {
  9302. value: true
  9303. });
  9304. exports.default = void 0;
  9305. // 配置信息
  9306. var _default = {
  9307. // webUrl: 'http://127.0.0.1:8080',
  9308. //webUrl: 'https://cczdsz.com/prod-api/',
  9309. webUrl: 'http://124.221.101.24:8082'
  9310. //webUrl: 'http://192.168.4.20:8081',
  9311. };
  9312. exports.default = _default;
  9313. /***/ }),
  9314. /***/ 37:
  9315. /*!***********************************************!*\
  9316. !*** E:/Desktop/zd_wechatApp(1)/api/login.js ***!
  9317. \***********************************************/
  9318. /*! no static exports found */
  9319. /***/ (function(module, exports, __webpack_require__) {
  9320. "use strict";
  9321. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9322. Object.defineProperty(exports, "__esModule", {
  9323. value: true
  9324. });
  9325. exports.default = void 0;
  9326. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  9327. var _default = {
  9328. // 登录
  9329. login: function login(data) {
  9330. return _request.default.requestEn('/mobile/user', data, 'POST');
  9331. }
  9332. };
  9333. exports.default = _default;
  9334. /***/ }),
  9335. /***/ 38:
  9336. /*!**************************************************!*\
  9337. !*** E:/Desktop/zd_wechatApp(1)/common/utils.js ***!
  9338. \**************************************************/
  9339. /*! no static exports found */
  9340. /***/ (function(module, exports, __webpack_require__) {
  9341. "use strict";
  9342. /* WEBPACK VAR INJECTION */(function(uni) {
  9343. Object.defineProperty(exports, "__esModule", {
  9344. value: true
  9345. });
  9346. exports.default = void 0;
  9347. var _default = {
  9348. // 页面提示信息函数
  9349. showPrompt: function showPrompt(msg) {
  9350. uni.showToast({
  9351. title: msg,
  9352. icon: 'none',
  9353. mask: true
  9354. });
  9355. },
  9356. // APP名称
  9357. appName: function appName() {
  9358. return "贞达市政工程";
  9359. },
  9360. formatRichText: function formatRichText(html) {
  9361. var newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
  9362. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  9363. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  9364. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  9365. return match;
  9366. });
  9367. newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
  9368. match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
  9369. return match;
  9370. });
  9371. newContent = newContent.replace(/<br[^>]*\/>/gi, '');
  9372. newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
  9373. return newContent;
  9374. },
  9375. getHeight: function getHeight(e) {
  9376. console.log(e);
  9377. },
  9378. changeTwoDecimal_f: function changeTwoDecimal_f(x) {
  9379. var f_x = parseFloat(x);
  9380. if (isNaN(f_x)) {
  9381. return 0;
  9382. }
  9383. var f_x = Math.round(x * 100) / 100;
  9384. var s_x = f_x.toString();
  9385. var pos_decimal = s_x.indexOf('.');
  9386. if (pos_decimal < 0) {
  9387. pos_decimal = s_x.length;
  9388. s_x += '.';
  9389. }
  9390. while (s_x.length <= pos_decimal + 2) {
  9391. s_x += '0';
  9392. }
  9393. return s_x;
  9394. },
  9395. // token过期
  9396. tokenOverdue: function tokenOverdue() {
  9397. uni.setStorage({
  9398. key: "jumpUrl",
  9399. data: ''
  9400. });
  9401. uni.setStorage({
  9402. key: "jumpType",
  9403. data: ''
  9404. });
  9405. uni.navigateTo({
  9406. url: "/pages/login/login"
  9407. });
  9408. },
  9409. checkLoginTo: function checkLoginTo(url, type) {
  9410. console.log(type);
  9411. var status = uni.getStorageSync('token');
  9412. console.log(status);
  9413. if (status) {
  9414. uni.navigateTo({
  9415. url: url
  9416. });
  9417. } else {
  9418. uni.showModal({
  9419. title: '',
  9420. content: '您未登录,是否登录?',
  9421. success: function success(res) {
  9422. if (res.confirm) {
  9423. uni.setStorage({
  9424. key: "jumpUrl",
  9425. data: url
  9426. });
  9427. uni.setStorage({
  9428. key: "jumpType",
  9429. data: type
  9430. });
  9431. uni.navigateTo({
  9432. url: "/pages/login/login"
  9433. });
  9434. }
  9435. }
  9436. });
  9437. }
  9438. },
  9439. // 拨打电话
  9440. toCall: function toCall(tel) {
  9441. if (!tel) {
  9442. this.showPrompt('暂无商家电话');
  9443. return;
  9444. }
  9445. uni.makePhoneCall({
  9446. phoneNumber: tel
  9447. });
  9448. },
  9449. toBack: function toBack() {
  9450. uni.navigateBack({
  9451. delta: 1
  9452. });
  9453. },
  9454. // 图片预览
  9455. previewImage: function previewImage(url) {
  9456. var urlList = [];
  9457. if (typeof url == 'string') {
  9458. urlList.push(url);
  9459. } else {
  9460. urlList = url;
  9461. }
  9462. uni.previewImage({
  9463. urls: urlList
  9464. });
  9465. },
  9466. // 登录成功后的跳转
  9467. loginSuccess: function loginSuccess() {
  9468. var type = uni.getStorageSync('jumpType');
  9469. // console.log(type)
  9470. if (type) {
  9471. var url = uni.getStorageSync('jumpUrl');
  9472. // console.log(url)
  9473. if (!url) {
  9474. uni.navigateBack({
  9475. delta: 1
  9476. });
  9477. return;
  9478. }
  9479. if (type == 'page') {
  9480. uni.redirectTo({
  9481. url: url
  9482. });
  9483. } else {
  9484. uni.switchTab({
  9485. url: url,
  9486. fail: function fail(error) {
  9487. console.log(error);
  9488. }
  9489. });
  9490. }
  9491. } else {
  9492. // uni.switchTab({
  9493. // url: "/pages/index/index"
  9494. // })
  9495. uni.navigateBack({
  9496. delta: 1
  9497. });
  9498. }
  9499. },
  9500. parseNumber: function parseNumber(num) {
  9501. return num < 10 ? "0" + num : num;
  9502. },
  9503. // 时间格式化基类
  9504. dateFormat: function dateFormat(date, formatStr) {
  9505. var dateObj = {},
  9506. rStr = /\{([^}]+)\}/,
  9507. mons = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
  9508. dateObj["Y"] = date.getFullYear();
  9509. dateObj["M"] = date.getMonth() + 1;
  9510. dateObj["MM"] = this.parseNumber(dateObj["M"]);
  9511. dateObj["Mon"] = mons[dateObj['M'] - 1];
  9512. dateObj["D"] = date.getDate();
  9513. dateObj["DD"] = this.parseNumber(dateObj["D"]);
  9514. dateObj["h"] = date.getHours();
  9515. dateObj["hh"] = this.parseNumber(dateObj["h"]);
  9516. // dateObj["t"] = dateObj["h"] > 12 ? dateObj["h"] - 12 : dateObj["h"];
  9517. dateObj["t"] = dateObj["h"];
  9518. dateObj["tt"] = this.parseNumber(dateObj["t"]);
  9519. // dateObj["A"] = dateObj["h"] > 12 ? '下午' : '上午';
  9520. dateObj["i"] = date.getMinutes();
  9521. dateObj["ii"] = this.parseNumber(dateObj["i"]);
  9522. dateObj["s"] = date.getSeconds();
  9523. dateObj["ss"] = this.parseNumber(dateObj["s"]);
  9524. while (rStr.test(formatStr)) {
  9525. formatStr = formatStr.replace(rStr, dateObj[RegExp.$1]);
  9526. }
  9527. return formatStr;
  9528. },
  9529. // 时间格式 年月日时分秒
  9530. gettime: function gettime(shorttime, type) {
  9531. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9532. var now = new Date().getTime();
  9533. var cha = (now - parseInt(shorttime)) / 1000;
  9534. // type: 格式化类型 1为年月日时分秒 2为年月日时分 3为年月日
  9535. if (type == 1) {
  9536. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}:{ss}");
  9537. } else if (type == 2) {
  9538. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}");
  9539. } else if (type == 3) {
  9540. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9541. }
  9542. },
  9543. // 时间格式 年月日
  9544. getDate: function getDate(shorttime) {
  9545. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9546. var now = new Date().getTime();
  9547. var cha = (now - parseInt(shorttime)) / 1000;
  9548. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9549. },
  9550. // 时间格式 月日
  9551. getDateMd: function getDateMd(shorttime) {
  9552. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9553. var now = new Date().getTime();
  9554. var cha = (now - parseInt(shorttime)) / 1000;
  9555. return this.dateFormat(new Date(shorttime), "{MM}-{DD}");
  9556. },
  9557. getSevenDate: function getSevenDate(num) {
  9558. var date1 = new Date();
  9559. //今天时间
  9560. var time1 = (date1.getMonth() + 1 < 10 ? '0' + (date1.getMonth() + 1).toString() : date1.getMonth() + 1) + "-" + (date1.getDate() < 10 ? '0' + date1.getDate().toString() : date1.getDate());
  9561. var date2 = new Date(date1);
  9562. date2.setDate(date1.getDate() + num);
  9563. //num是正数表示之后的时间,num负数表示之前的时间,0表示今天
  9564. var time2 = date2.getMonth() + 1 + "-" + date2.getDate();
  9565. return this.getdiffdate(time1, time2, num);
  9566. },
  9567. //获取两日期之间日期列表函数
  9568. getdiffdate: function getdiffdate(stime, etime, num) {
  9569. //初始化日期列表,数组
  9570. var diffdate = new Array();
  9571. var i = 0;
  9572. //开始日期小于等于结束日期,并循环
  9573. while (i <= num - 1) {
  9574. diffdate.push({
  9575. dateStr: stime,
  9576. weekStr: this.getWeek(new Date().getFullYear().toString() + "-" + stime)
  9577. });
  9578. //获取开始日期时间戳
  9579. var stime_ts = new Date(stime).getTime();
  9580. // console.log('当前日期:'+stime +'当前时间戳:'+stime_ts)
  9581. //增加一天时间戳后的日期
  9582. var next_date = stime_ts + 24 * 60 * 60 * 1000;
  9583. //拼接年月日,这里的月份会返回(0-11),所以要+1
  9584. var next_dates_y = new Date(next_date).getFullYear() + '-';
  9585. var next_dates_m = new Date(next_date).getMonth() + 1 < 10 ? '0' + (new Date(next_date).getMonth() + 1) + '-' : new Date(next_date).getMonth() + 1 + '-';
  9586. var next_dates_d = new Date(next_date).getDate() < 10 ? '0' + new Date(next_date).getDate() : new Date(next_date).getDate();
  9587. stime = next_dates_m + next_dates_d;
  9588. // 增加数组key
  9589. i++;
  9590. }
  9591. return diffdate;
  9592. },
  9593. // 根据日期转换星期
  9594. getWeek: function getWeek(dateString) {
  9595. var dateArray = dateString.split("-");
  9596. var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
  9597. return "周" + "日一二三四五六".charAt(date.getDay());
  9598. },
  9599. // 获取当前位置
  9600. getNowAddress: function getNowAddress() {
  9601. console.log(222);
  9602. return new Promise(function (resolve, reject) {
  9603. var mapkey = '';
  9604. mapkey = 'c827c04d1d74d8589ec826fce02a135a';
  9605. console.log(mapkey);
  9606. var amapPlugin = new amap.AMapWX({
  9607. key: mapkey
  9608. });
  9609. amapPlugin.getRegeo({
  9610. success: function success(res) {
  9611. resolve(res[0]);
  9612. },
  9613. fail: function fail(error) {
  9614. console.log(error);
  9615. uni.showToast({
  9616. mask: true,
  9617. icon: "none",
  9618. title: error
  9619. });
  9620. }
  9621. });
  9622. });
  9623. }
  9624. };
  9625. exports.default = _default;
  9626. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9627. /***/ }),
  9628. /***/ 387:
  9629. /*!************************************************************************!*\
  9630. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/async-validator.js ***!
  9631. \************************************************************************/
  9632. /*! no static exports found */
  9633. /***/ (function(module, exports, __webpack_require__) {
  9634. "use strict";
  9635. /* WEBPACK VAR INJECTION */(function(process) {
  9636. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9637. Object.defineProperty(exports, "__esModule", {
  9638. value: true
  9639. });
  9640. exports.default = void 0;
  9641. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9642. function _extends() {
  9643. _extends = Object.assign || function (target) {
  9644. for (var i = 1; i < arguments.length; i++) {
  9645. var source = arguments[i];
  9646. for (var key in source) {
  9647. if (Object.prototype.hasOwnProperty.call(source, key)) {
  9648. target[key] = source[key];
  9649. }
  9650. }
  9651. }
  9652. return target;
  9653. };
  9654. return _extends.apply(this, arguments);
  9655. }
  9656. /* eslint no-console:0 */
  9657. var formatRegExp = /%[sdj%]/g;
  9658. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  9659. 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') {
  9660. warning = function warning(type, errors) {
  9661. if (typeof console !== 'undefined' && console.warn) {
  9662. if (errors.every(function (e) {
  9663. return typeof e === 'string';
  9664. })) {
  9665. console.warn(type, errors);
  9666. }
  9667. }
  9668. };
  9669. }
  9670. function convertFieldsError(errors) {
  9671. if (!errors || !errors.length) return null;
  9672. var fields = {};
  9673. errors.forEach(function (error) {
  9674. var field = error.field;
  9675. fields[field] = fields[field] || [];
  9676. fields[field].push(error);
  9677. });
  9678. return fields;
  9679. }
  9680. function format() {
  9681. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  9682. args[_key] = arguments[_key];
  9683. }
  9684. var i = 1;
  9685. var f = args[0];
  9686. var len = args.length;
  9687. if (typeof f === 'function') {
  9688. return f.apply(null, args.slice(1));
  9689. }
  9690. if (typeof f === 'string') {
  9691. var str = String(f).replace(formatRegExp, function (x) {
  9692. if (x === '%%') {
  9693. return '%';
  9694. }
  9695. if (i >= len) {
  9696. return x;
  9697. }
  9698. switch (x) {
  9699. case '%s':
  9700. return String(args[i++]);
  9701. case '%d':
  9702. return Number(args[i++]);
  9703. case '%j':
  9704. try {
  9705. return JSON.stringify(args[i++]);
  9706. } catch (_) {
  9707. return '[Circular]';
  9708. }
  9709. break;
  9710. default:
  9711. return x;
  9712. }
  9713. });
  9714. for (var arg = args[i]; i < len; arg = args[++i]) {
  9715. str += " " + arg;
  9716. }
  9717. return str;
  9718. }
  9719. return f;
  9720. }
  9721. function isNativeStringType(type) {
  9722. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  9723. }
  9724. function isEmptyValue(value, type) {
  9725. if (value === undefined || value === null) {
  9726. return true;
  9727. }
  9728. if (type === 'array' && Array.isArray(value) && !value.length) {
  9729. return true;
  9730. }
  9731. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  9732. return true;
  9733. }
  9734. return false;
  9735. }
  9736. function asyncParallelArray(arr, func, callback) {
  9737. var results = [];
  9738. var total = 0;
  9739. var arrLength = arr.length;
  9740. function count(errors) {
  9741. results.push.apply(results, errors);
  9742. total++;
  9743. if (total === arrLength) {
  9744. callback(results);
  9745. }
  9746. }
  9747. arr.forEach(function (a) {
  9748. func(a, count);
  9749. });
  9750. }
  9751. function asyncSerialArray(arr, func, callback) {
  9752. var index = 0;
  9753. var arrLength = arr.length;
  9754. function next(errors) {
  9755. if (errors && errors.length) {
  9756. callback(errors);
  9757. return;
  9758. }
  9759. var original = index;
  9760. index = index + 1;
  9761. if (original < arrLength) {
  9762. func(arr[original], next);
  9763. } else {
  9764. callback([]);
  9765. }
  9766. }
  9767. next([]);
  9768. }
  9769. function flattenObjArr(objArr) {
  9770. var ret = [];
  9771. Object.keys(objArr).forEach(function (k) {
  9772. ret.push.apply(ret, objArr[k]);
  9773. });
  9774. return ret;
  9775. }
  9776. function asyncMap(objArr, option, func, callback) {
  9777. if (option.first) {
  9778. var _pending = new Promise(function (resolve, reject) {
  9779. var next = function next(errors) {
  9780. callback(errors);
  9781. return errors.length ? reject({
  9782. errors: errors,
  9783. fields: convertFieldsError(errors)
  9784. }) : resolve();
  9785. };
  9786. var flattenArr = flattenObjArr(objArr);
  9787. asyncSerialArray(flattenArr, func, next);
  9788. });
  9789. _pending["catch"](function (e) {
  9790. return e;
  9791. });
  9792. return _pending;
  9793. }
  9794. var firstFields = option.firstFields || [];
  9795. if (firstFields === true) {
  9796. firstFields = Object.keys(objArr);
  9797. }
  9798. var objArrKeys = Object.keys(objArr);
  9799. var objArrLength = objArrKeys.length;
  9800. var total = 0;
  9801. var results = [];
  9802. var pending = new Promise(function (resolve, reject) {
  9803. var next = function next(errors) {
  9804. results.push.apply(results, errors);
  9805. total++;
  9806. if (total === objArrLength) {
  9807. callback(results);
  9808. return results.length ? reject({
  9809. errors: results,
  9810. fields: convertFieldsError(results)
  9811. }) : resolve();
  9812. }
  9813. };
  9814. if (!objArrKeys.length) {
  9815. callback(results);
  9816. resolve();
  9817. }
  9818. objArrKeys.forEach(function (key) {
  9819. var arr = objArr[key];
  9820. if (firstFields.indexOf(key) !== -1) {
  9821. asyncSerialArray(arr, func, next);
  9822. } else {
  9823. asyncParallelArray(arr, func, next);
  9824. }
  9825. });
  9826. });
  9827. pending["catch"](function (e) {
  9828. return e;
  9829. });
  9830. return pending;
  9831. }
  9832. function complementError(rule) {
  9833. return function (oe) {
  9834. if (oe && oe.message) {
  9835. oe.field = oe.field || rule.fullField;
  9836. return oe;
  9837. }
  9838. return {
  9839. message: typeof oe === 'function' ? oe() : oe,
  9840. field: oe.field || rule.fullField
  9841. };
  9842. };
  9843. }
  9844. function deepMerge(target, source) {
  9845. if (source) {
  9846. for (var s in source) {
  9847. if (source.hasOwnProperty(s)) {
  9848. var value = source[s];
  9849. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  9850. target[s] = _extends({}, target[s], {}, value);
  9851. } else {
  9852. target[s] = value;
  9853. }
  9854. }
  9855. }
  9856. }
  9857. return target;
  9858. }
  9859. /**
  9860. * Rule for validating required fields.
  9861. *
  9862. * @param rule The validation rule.
  9863. * @param value The value of the field on the source object.
  9864. * @param source The source object being validated.
  9865. * @param errors An array of errors that this rule may add
  9866. * validation errors to.
  9867. * @param options The validation options.
  9868. * @param options.messages The validation messages.
  9869. */
  9870. function required(rule, value, source, errors, options, type) {
  9871. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  9872. errors.push(format(options.messages.required, rule.fullField));
  9873. }
  9874. }
  9875. /**
  9876. * Rule for validating whitespace.
  9877. *
  9878. * @param rule The validation rule.
  9879. * @param value The value of the field on the source object.
  9880. * @param source The source object being validated.
  9881. * @param errors An array of errors that this rule may add
  9882. * validation errors to.
  9883. * @param options The validation options.
  9884. * @param options.messages The validation messages.
  9885. */
  9886. function whitespace(rule, value, source, errors, options) {
  9887. if (/^\s+$/.test(value) || value === '') {
  9888. errors.push(format(options.messages.whitespace, rule.fullField));
  9889. }
  9890. }
  9891. /* eslint max-len:0 */
  9892. var pattern = {
  9893. // http://emailregex.com/
  9894. 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,}))$/,
  9895. 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'),
  9896. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  9897. };
  9898. var types = {
  9899. integer: function integer(value) {
  9900. return types.number(value) && parseInt(value, 10) === value;
  9901. },
  9902. "float": function float(value) {
  9903. return types.number(value) && !types.integer(value);
  9904. },
  9905. array: function array(value) {
  9906. return Array.isArray(value);
  9907. },
  9908. regexp: function regexp(value) {
  9909. if (value instanceof RegExp) {
  9910. return true;
  9911. }
  9912. try {
  9913. return !!new RegExp(value);
  9914. } catch (e) {
  9915. return false;
  9916. }
  9917. },
  9918. date: function date(value) {
  9919. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  9920. },
  9921. number: function number(value) {
  9922. if (isNaN(value)) {
  9923. return false;
  9924. }
  9925. // 修改源码,将字符串数值先转为数值
  9926. return typeof +value === 'number';
  9927. },
  9928. object: function object(value) {
  9929. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  9930. },
  9931. method: function method(value) {
  9932. return typeof value === 'function';
  9933. },
  9934. email: function email(value) {
  9935. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  9936. },
  9937. url: function url(value) {
  9938. return typeof value === 'string' && !!value.match(pattern.url);
  9939. },
  9940. hex: function hex(value) {
  9941. return typeof value === 'string' && !!value.match(pattern.hex);
  9942. }
  9943. };
  9944. /**
  9945. * Rule for validating the type of a value.
  9946. *
  9947. * @param rule The validation rule.
  9948. * @param value The value of the field on the source object.
  9949. * @param source The source object being validated.
  9950. * @param errors An array of errors that this rule may add
  9951. * validation errors to.
  9952. * @param options The validation options.
  9953. * @param options.messages The validation messages.
  9954. */
  9955. function type(rule, value, source, errors, options) {
  9956. if (rule.required && value === undefined) {
  9957. required(rule, value, source, errors, options);
  9958. return;
  9959. }
  9960. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  9961. var ruleType = rule.type;
  9962. if (custom.indexOf(ruleType) > -1) {
  9963. if (!types[ruleType](value)) {
  9964. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9965. } // straight typeof check
  9966. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  9967. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9968. }
  9969. }
  9970. /**
  9971. * Rule for validating minimum and maximum allowed values.
  9972. *
  9973. * @param rule The validation rule.
  9974. * @param value The value of the field on the source object.
  9975. * @param source The source object being validated.
  9976. * @param errors An array of errors that this rule may add
  9977. * validation errors to.
  9978. * @param options The validation options.
  9979. * @param options.messages The validation messages.
  9980. */
  9981. function range(rule, value, source, errors, options) {
  9982. var len = typeof rule.len === 'number';
  9983. var min = typeof rule.min === 'number';
  9984. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  9985. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  9986. var val = value;
  9987. var key = null;
  9988. var num = typeof value === 'number';
  9989. var str = typeof value === 'string';
  9990. var arr = Array.isArray(value);
  9991. if (num) {
  9992. key = 'number';
  9993. } else if (str) {
  9994. key = 'string';
  9995. } else if (arr) {
  9996. key = 'array';
  9997. } // if the value is not of a supported type for range validation
  9998. // the validation rule rule should use the
  9999. // type property to also test for a particular type
  10000. if (!key) {
  10001. return false;
  10002. }
  10003. if (arr) {
  10004. val = value.length;
  10005. }
  10006. if (str) {
  10007. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".length !== 3
  10008. val = value.replace(spRegexp, '_').length;
  10009. }
  10010. if (len) {
  10011. if (val !== rule.len) {
  10012. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  10013. }
  10014. } else if (min && !max && val < rule.min) {
  10015. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  10016. } else if (max && !min && val > rule.max) {
  10017. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  10018. } else if (min && max && (val < rule.min || val > rule.max)) {
  10019. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  10020. }
  10021. }
  10022. var ENUM = 'enum';
  10023. /**
  10024. * Rule for validating a value exists in an enumerable list.
  10025. *
  10026. * @param rule The validation rule.
  10027. * @param value The value of the field on the source object.
  10028. * @param source The source object being validated.
  10029. * @param errors An array of errors that this rule may add
  10030. * validation errors to.
  10031. * @param options The validation options.
  10032. * @param options.messages The validation messages.
  10033. */
  10034. function enumerable(rule, value, source, errors, options) {
  10035. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  10036. if (rule[ENUM].indexOf(value) === -1) {
  10037. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  10038. }
  10039. }
  10040. /**
  10041. * Rule for validating a regular expression pattern.
  10042. *
  10043. * @param rule The validation rule.
  10044. * @param value The value of the field on the source object.
  10045. * @param source The source object being validated.
  10046. * @param errors An array of errors that this rule may add
  10047. * validation errors to.
  10048. * @param options The validation options.
  10049. * @param options.messages The validation messages.
  10050. */
  10051. function pattern$1(rule, value, source, errors, options) {
  10052. if (rule.pattern) {
  10053. if (rule.pattern instanceof RegExp) {
  10054. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  10055. // flag is accidentally set to `true`, which in a validation scenario
  10056. // is not necessary and the result might be misleading
  10057. rule.pattern.lastIndex = 0;
  10058. if (!rule.pattern.test(value)) {
  10059. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10060. }
  10061. } else if (typeof rule.pattern === 'string') {
  10062. var _pattern = new RegExp(rule.pattern);
  10063. if (!_pattern.test(value)) {
  10064. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10065. }
  10066. }
  10067. }
  10068. }
  10069. var rules = {
  10070. required: required,
  10071. whitespace: whitespace,
  10072. type: type,
  10073. range: range,
  10074. "enum": enumerable,
  10075. pattern: pattern$1
  10076. };
  10077. /**
  10078. * Performs validation for string types.
  10079. *
  10080. * @param rule The validation rule.
  10081. * @param value The value of the field on the source object.
  10082. * @param callback The callback function.
  10083. * @param source The source object being validated.
  10084. * @param options The validation options.
  10085. * @param options.messages The validation messages.
  10086. */
  10087. function string(rule, value, callback, source, options) {
  10088. var errors = [];
  10089. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10090. if (validate) {
  10091. if (isEmptyValue(value, 'string') && !rule.required) {
  10092. return callback();
  10093. }
  10094. rules.required(rule, value, source, errors, options, 'string');
  10095. if (!isEmptyValue(value, 'string')) {
  10096. rules.type(rule, value, source, errors, options);
  10097. rules.range(rule, value, source, errors, options);
  10098. rules.pattern(rule, value, source, errors, options);
  10099. if (rule.whitespace === true) {
  10100. rules.whitespace(rule, value, source, errors, options);
  10101. }
  10102. }
  10103. }
  10104. callback(errors);
  10105. }
  10106. /**
  10107. * Validates a function.
  10108. *
  10109. * @param rule The validation rule.
  10110. * @param value The value of the field on the source object.
  10111. * @param callback The callback function.
  10112. * @param source The source object being validated.
  10113. * @param options The validation options.
  10114. * @param options.messages The validation messages.
  10115. */
  10116. function method(rule, value, callback, source, options) {
  10117. var errors = [];
  10118. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10119. if (validate) {
  10120. if (isEmptyValue(value) && !rule.required) {
  10121. return callback();
  10122. }
  10123. rules.required(rule, value, source, errors, options);
  10124. if (value !== undefined) {
  10125. rules.type(rule, value, source, errors, options);
  10126. }
  10127. }
  10128. callback(errors);
  10129. }
  10130. /**
  10131. * Validates a number.
  10132. *
  10133. * @param rule The validation rule.
  10134. * @param value The value of the field on the source object.
  10135. * @param callback The callback function.
  10136. * @param source The source object being validated.
  10137. * @param options The validation options.
  10138. * @param options.messages The validation messages.
  10139. */
  10140. function number(rule, value, callback, source, options) {
  10141. var errors = [];
  10142. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10143. if (validate) {
  10144. if (value === '') {
  10145. value = undefined;
  10146. }
  10147. if (isEmptyValue(value) && !rule.required) {
  10148. return callback();
  10149. }
  10150. rules.required(rule, value, source, errors, options);
  10151. if (value !== undefined) {
  10152. rules.type(rule, value, source, errors, options);
  10153. rules.range(rule, value, source, errors, options);
  10154. }
  10155. }
  10156. callback(errors);
  10157. }
  10158. /**
  10159. * Validates a boolean.
  10160. *
  10161. * @param rule The validation rule.
  10162. * @param value The value of the field on the source object.
  10163. * @param callback The callback function.
  10164. * @param source The source object being validated.
  10165. * @param options The validation options.
  10166. * @param options.messages The validation messages.
  10167. */
  10168. function _boolean(rule, value, callback, source, options) {
  10169. var errors = [];
  10170. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10171. if (validate) {
  10172. if (isEmptyValue(value) && !rule.required) {
  10173. return callback();
  10174. }
  10175. rules.required(rule, value, source, errors, options);
  10176. if (value !== undefined) {
  10177. rules.type(rule, value, source, errors, options);
  10178. }
  10179. }
  10180. callback(errors);
  10181. }
  10182. /**
  10183. * Validates the regular expression type.
  10184. *
  10185. * @param rule The validation rule.
  10186. * @param value The value of the field on the source object.
  10187. * @param callback The callback function.
  10188. * @param source The source object being validated.
  10189. * @param options The validation options.
  10190. * @param options.messages The validation messages.
  10191. */
  10192. function regexp(rule, value, callback, source, options) {
  10193. var errors = [];
  10194. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10195. if (validate) {
  10196. if (isEmptyValue(value) && !rule.required) {
  10197. return callback();
  10198. }
  10199. rules.required(rule, value, source, errors, options);
  10200. if (!isEmptyValue(value)) {
  10201. rules.type(rule, value, source, errors, options);
  10202. }
  10203. }
  10204. callback(errors);
  10205. }
  10206. /**
  10207. * Validates a number is an integer.
  10208. *
  10209. * @param rule The validation rule.
  10210. * @param value The value of the field on the source object.
  10211. * @param callback The callback function.
  10212. * @param source The source object being validated.
  10213. * @param options The validation options.
  10214. * @param options.messages The validation messages.
  10215. */
  10216. function integer(rule, value, callback, source, options) {
  10217. var errors = [];
  10218. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10219. if (validate) {
  10220. if (isEmptyValue(value) && !rule.required) {
  10221. return callback();
  10222. }
  10223. rules.required(rule, value, source, errors, options);
  10224. if (value !== undefined) {
  10225. rules.type(rule, value, source, errors, options);
  10226. rules.range(rule, value, source, errors, options);
  10227. }
  10228. }
  10229. callback(errors);
  10230. }
  10231. /**
  10232. * Validates a number is a floating point number.
  10233. *
  10234. * @param rule The validation rule.
  10235. * @param value The value of the field on the source object.
  10236. * @param callback The callback function.
  10237. * @param source The source object being validated.
  10238. * @param options The validation options.
  10239. * @param options.messages The validation messages.
  10240. */
  10241. function floatFn(rule, value, callback, source, options) {
  10242. var errors = [];
  10243. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10244. if (validate) {
  10245. if (isEmptyValue(value) && !rule.required) {
  10246. return callback();
  10247. }
  10248. rules.required(rule, value, source, errors, options);
  10249. if (value !== undefined) {
  10250. rules.type(rule, value, source, errors, options);
  10251. rules.range(rule, value, source, errors, options);
  10252. }
  10253. }
  10254. callback(errors);
  10255. }
  10256. /**
  10257. * Validates an array.
  10258. *
  10259. * @param rule The validation rule.
  10260. * @param value The value of the field on the source object.
  10261. * @param callback The callback function.
  10262. * @param source The source object being validated.
  10263. * @param options The validation options.
  10264. * @param options.messages The validation messages.
  10265. */
  10266. function array(rule, value, callback, source, options) {
  10267. var errors = [];
  10268. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10269. if (validate) {
  10270. if (isEmptyValue(value, 'array') && !rule.required) {
  10271. return callback();
  10272. }
  10273. rules.required(rule, value, source, errors, options, 'array');
  10274. if (!isEmptyValue(value, 'array')) {
  10275. rules.type(rule, value, source, errors, options);
  10276. rules.range(rule, value, source, errors, options);
  10277. }
  10278. }
  10279. callback(errors);
  10280. }
  10281. /**
  10282. * Validates an object.
  10283. *
  10284. * @param rule The validation rule.
  10285. * @param value The value of the field on the source object.
  10286. * @param callback The callback function.
  10287. * @param source The source object being validated.
  10288. * @param options The validation options.
  10289. * @param options.messages The validation messages.
  10290. */
  10291. function object(rule, value, callback, source, options) {
  10292. var errors = [];
  10293. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10294. if (validate) {
  10295. if (isEmptyValue(value) && !rule.required) {
  10296. return callback();
  10297. }
  10298. rules.required(rule, value, source, errors, options);
  10299. if (value !== undefined) {
  10300. rules.type(rule, value, source, errors, options);
  10301. }
  10302. }
  10303. callback(errors);
  10304. }
  10305. var ENUM$1 = 'enum';
  10306. /**
  10307. * Validates an enumerable list.
  10308. *
  10309. * @param rule The validation rule.
  10310. * @param value The value of the field on the source object.
  10311. * @param callback The callback function.
  10312. * @param source The source object being validated.
  10313. * @param options The validation options.
  10314. * @param options.messages The validation messages.
  10315. */
  10316. function enumerable$1(rule, value, callback, source, options) {
  10317. var errors = [];
  10318. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10319. if (validate) {
  10320. if (isEmptyValue(value) && !rule.required) {
  10321. return callback();
  10322. }
  10323. rules.required(rule, value, source, errors, options);
  10324. if (value !== undefined) {
  10325. rules[ENUM$1](rule, value, source, errors, options);
  10326. }
  10327. }
  10328. callback(errors);
  10329. }
  10330. /**
  10331. * Validates a regular expression pattern.
  10332. *
  10333. * Performs validation when a rule only contains
  10334. * a pattern property but is not declared as a string type.
  10335. *
  10336. * @param rule The validation rule.
  10337. * @param value The value of the field on the source object.
  10338. * @param callback The callback function.
  10339. * @param source The source object being validated.
  10340. * @param options The validation options.
  10341. * @param options.messages The validation messages.
  10342. */
  10343. function pattern$2(rule, value, callback, source, options) {
  10344. var errors = [];
  10345. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10346. if (validate) {
  10347. if (isEmptyValue(value, 'string') && !rule.required) {
  10348. return callback();
  10349. }
  10350. rules.required(rule, value, source, errors, options);
  10351. if (!isEmptyValue(value, 'string')) {
  10352. rules.pattern(rule, value, source, errors, options);
  10353. }
  10354. }
  10355. callback(errors);
  10356. }
  10357. function date(rule, value, callback, source, options) {
  10358. var errors = [];
  10359. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10360. if (validate) {
  10361. if (isEmptyValue(value) && !rule.required) {
  10362. return callback();
  10363. }
  10364. rules.required(rule, value, source, errors, options);
  10365. if (!isEmptyValue(value)) {
  10366. var dateObject;
  10367. if (typeof value === 'number') {
  10368. dateObject = new Date(value);
  10369. } else {
  10370. dateObject = value;
  10371. }
  10372. rules.type(rule, dateObject, source, errors, options);
  10373. if (dateObject) {
  10374. rules.range(rule, dateObject.getTime(), source, errors, options);
  10375. }
  10376. }
  10377. }
  10378. callback(errors);
  10379. }
  10380. function required$1(rule, value, callback, source, options) {
  10381. var errors = [];
  10382. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  10383. rules.required(rule, value, source, errors, options, type);
  10384. callback(errors);
  10385. }
  10386. function type$1(rule, value, callback, source, options) {
  10387. var ruleType = rule.type;
  10388. var errors = [];
  10389. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10390. if (validate) {
  10391. if (isEmptyValue(value, ruleType) && !rule.required) {
  10392. return callback();
  10393. }
  10394. rules.required(rule, value, source, errors, options, ruleType);
  10395. if (!isEmptyValue(value, ruleType)) {
  10396. rules.type(rule, value, source, errors, options);
  10397. }
  10398. }
  10399. callback(errors);
  10400. }
  10401. /**
  10402. * Performs validation for any type.
  10403. *
  10404. * @param rule The validation rule.
  10405. * @param value The value of the field on the source object.
  10406. * @param callback The callback function.
  10407. * @param source The source object being validated.
  10408. * @param options The validation options.
  10409. * @param options.messages The validation messages.
  10410. */
  10411. function any(rule, value, callback, source, options) {
  10412. var errors = [];
  10413. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10414. if (validate) {
  10415. if (isEmptyValue(value) && !rule.required) {
  10416. return callback();
  10417. }
  10418. rules.required(rule, value, source, errors, options);
  10419. }
  10420. callback(errors);
  10421. }
  10422. var validators = {
  10423. string: string,
  10424. method: method,
  10425. number: number,
  10426. "boolean": _boolean,
  10427. regexp: regexp,
  10428. integer: integer,
  10429. "float": floatFn,
  10430. array: array,
  10431. object: object,
  10432. "enum": enumerable$1,
  10433. pattern: pattern$2,
  10434. date: date,
  10435. url: type$1,
  10436. hex: type$1,
  10437. email: type$1,
  10438. required: required$1,
  10439. any: any
  10440. };
  10441. function newMessages() {
  10442. return {
  10443. "default": 'Validation error on field %s',
  10444. required: '%s is required',
  10445. "enum": '%s must be one of %s',
  10446. whitespace: '%s cannot be empty',
  10447. date: {
  10448. format: '%s date %s is invalid for format %s',
  10449. parse: '%s date could not be parsed, %s is invalid ',
  10450. invalid: '%s date %s is invalid'
  10451. },
  10452. types: {
  10453. string: '%s is not a %s',
  10454. method: '%s is not a %s (function)',
  10455. array: '%s is not an %s',
  10456. object: '%s is not an %s',
  10457. number: '%s is not a %s',
  10458. date: '%s is not a %s',
  10459. "boolean": '%s is not a %s',
  10460. integer: '%s is not an %s',
  10461. "float": '%s is not a %s',
  10462. regexp: '%s is not a valid %s',
  10463. email: '%s is not a valid %s',
  10464. url: '%s is not a valid %s',
  10465. hex: '%s is not a valid %s'
  10466. },
  10467. string: {
  10468. len: '%s must be exactly %s characters',
  10469. min: '%s must be at least %s characters',
  10470. max: '%s cannot be longer than %s characters',
  10471. range: '%s must be between %s and %s characters'
  10472. },
  10473. number: {
  10474. len: '%s must equal %s',
  10475. min: '%s cannot be less than %s',
  10476. max: '%s cannot be greater than %s',
  10477. range: '%s must be between %s and %s'
  10478. },
  10479. array: {
  10480. len: '%s must be exactly %s in length',
  10481. min: '%s cannot be less than %s in length',
  10482. max: '%s cannot be greater than %s in length',
  10483. range: '%s must be between %s and %s in length'
  10484. },
  10485. pattern: {
  10486. mismatch: '%s value %s does not match pattern %s'
  10487. },
  10488. clone: function clone() {
  10489. var cloned = JSON.parse(JSON.stringify(this));
  10490. cloned.clone = this.clone;
  10491. return cloned;
  10492. }
  10493. };
  10494. }
  10495. var messages = newMessages();
  10496. /**
  10497. * Encapsulates a validation schema.
  10498. *
  10499. * @param descriptor An object declaring validation rules
  10500. * for this schema.
  10501. */
  10502. function Schema(descriptor) {
  10503. this.rules = null;
  10504. this._messages = messages;
  10505. this.define(descriptor);
  10506. }
  10507. Schema.prototype = {
  10508. messages: function messages(_messages) {
  10509. if (_messages) {
  10510. this._messages = deepMerge(newMessages(), _messages);
  10511. }
  10512. return this._messages;
  10513. },
  10514. define: function define(rules) {
  10515. if (!rules) {
  10516. throw new Error('Cannot configure a schema with no rules');
  10517. }
  10518. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  10519. throw new Error('Rules must be an object');
  10520. }
  10521. this.rules = {};
  10522. var z;
  10523. var item;
  10524. for (z in rules) {
  10525. if (rules.hasOwnProperty(z)) {
  10526. item = rules[z];
  10527. this.rules[z] = Array.isArray(item) ? item : [item];
  10528. }
  10529. }
  10530. },
  10531. validate: function validate(source_, o, oc) {
  10532. var _this = this;
  10533. if (o === void 0) {
  10534. o = {};
  10535. }
  10536. if (oc === void 0) {
  10537. oc = function oc() {};
  10538. }
  10539. var source = source_;
  10540. var options = o;
  10541. var callback = oc;
  10542. if (typeof options === 'function') {
  10543. callback = options;
  10544. options = {};
  10545. }
  10546. if (!this.rules || Object.keys(this.rules).length === 0) {
  10547. if (callback) {
  10548. callback();
  10549. }
  10550. return Promise.resolve();
  10551. }
  10552. function complete(results) {
  10553. var i;
  10554. var errors = [];
  10555. var fields = {};
  10556. function add(e) {
  10557. if (Array.isArray(e)) {
  10558. var _errors;
  10559. errors = (_errors = errors).concat.apply(_errors, e);
  10560. } else {
  10561. errors.push(e);
  10562. }
  10563. }
  10564. for (i = 0; i < results.length; i++) {
  10565. add(results[i]);
  10566. }
  10567. if (!errors.length) {
  10568. errors = null;
  10569. fields = null;
  10570. } else {
  10571. fields = convertFieldsError(errors);
  10572. }
  10573. callback(errors, fields);
  10574. }
  10575. if (options.messages) {
  10576. var messages$1 = this.messages();
  10577. if (messages$1 === messages) {
  10578. messages$1 = newMessages();
  10579. }
  10580. deepMerge(messages$1, options.messages);
  10581. options.messages = messages$1;
  10582. } else {
  10583. options.messages = this.messages();
  10584. }
  10585. var arr;
  10586. var value;
  10587. var series = {};
  10588. var keys = options.keys || Object.keys(this.rules);
  10589. keys.forEach(function (z) {
  10590. arr = _this.rules[z];
  10591. value = source[z];
  10592. arr.forEach(function (r) {
  10593. var rule = r;
  10594. if (typeof rule.transform === 'function') {
  10595. if (source === source_) {
  10596. source = _extends({}, source);
  10597. }
  10598. value = source[z] = rule.transform(value);
  10599. }
  10600. if (typeof rule === 'function') {
  10601. rule = {
  10602. validator: rule
  10603. };
  10604. } else {
  10605. rule = _extends({}, rule);
  10606. }
  10607. rule.validator = _this.getValidationMethod(rule);
  10608. rule.field = z;
  10609. rule.fullField = rule.fullField || z;
  10610. rule.type = _this.getType(rule);
  10611. if (!rule.validator) {
  10612. return;
  10613. }
  10614. series[z] = series[z] || [];
  10615. series[z].push({
  10616. rule: rule,
  10617. value: value,
  10618. source: source,
  10619. field: z
  10620. });
  10621. });
  10622. });
  10623. var errorFields = {};
  10624. return asyncMap(series, options, function (data, doIt) {
  10625. var rule = data.rule;
  10626. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  10627. deep = deep && (rule.required || !rule.required && data.value);
  10628. rule.field = data.field;
  10629. function addFullfield(key, schema) {
  10630. return _extends({}, schema, {
  10631. fullField: rule.fullField + "." + key
  10632. });
  10633. }
  10634. function cb(e) {
  10635. if (e === void 0) {
  10636. e = [];
  10637. }
  10638. var errors = e;
  10639. if (!Array.isArray(errors)) {
  10640. errors = [errors];
  10641. }
  10642. if (!options.suppressWarning && errors.length) {
  10643. Schema.warning('async-validator:', errors);
  10644. }
  10645. if (errors.length && rule.message) {
  10646. errors = [].concat(rule.message);
  10647. }
  10648. errors = errors.map(complementError(rule));
  10649. if (options.first && errors.length) {
  10650. errorFields[rule.field] = 1;
  10651. return doIt(errors);
  10652. }
  10653. if (!deep) {
  10654. doIt(errors);
  10655. } else {
  10656. // if rule is required but the target object
  10657. // does not exist fail at the rule level and don't
  10658. // go deeper
  10659. if (rule.required && !data.value) {
  10660. if (rule.message) {
  10661. errors = [].concat(rule.message).map(complementError(rule));
  10662. } else if (options.error) {
  10663. errors = [options.error(rule, format(options.messages.required, rule.field))];
  10664. } else {
  10665. errors = [];
  10666. }
  10667. return doIt(errors);
  10668. }
  10669. var fieldsSchema = {};
  10670. if (rule.defaultField) {
  10671. for (var k in data.value) {
  10672. if (data.value.hasOwnProperty(k)) {
  10673. fieldsSchema[k] = rule.defaultField;
  10674. }
  10675. }
  10676. }
  10677. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  10678. for (var f in fieldsSchema) {
  10679. if (fieldsSchema.hasOwnProperty(f)) {
  10680. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  10681. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  10682. }
  10683. }
  10684. var schema = new Schema(fieldsSchema);
  10685. schema.messages(options.messages);
  10686. if (data.rule.options) {
  10687. data.rule.options.messages = options.messages;
  10688. data.rule.options.error = options.error;
  10689. }
  10690. schema.validate(data.value, data.rule.options || options, function (errs) {
  10691. var finalErrors = [];
  10692. if (errors && errors.length) {
  10693. finalErrors.push.apply(finalErrors, errors);
  10694. }
  10695. if (errs && errs.length) {
  10696. finalErrors.push.apply(finalErrors, errs);
  10697. }
  10698. doIt(finalErrors.length ? finalErrors : null);
  10699. });
  10700. }
  10701. }
  10702. var res;
  10703. if (rule.asyncValidator) {
  10704. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  10705. } else if (rule.validator) {
  10706. res = rule.validator(rule, data.value, cb, data.source, options);
  10707. if (res === true) {
  10708. cb();
  10709. } else if (res === false) {
  10710. cb(rule.message || rule.field + " fails");
  10711. } else if (res instanceof Array) {
  10712. cb(res);
  10713. } else if (res instanceof Error) {
  10714. cb(res.message);
  10715. }
  10716. }
  10717. if (res && res.then) {
  10718. res.then(function () {
  10719. return cb();
  10720. }, function (e) {
  10721. return cb(e);
  10722. });
  10723. }
  10724. }, function (results) {
  10725. complete(results);
  10726. });
  10727. },
  10728. getType: function getType(rule) {
  10729. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  10730. rule.type = 'pattern';
  10731. }
  10732. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  10733. throw new Error(format('Unknown rule type %s', rule.type));
  10734. }
  10735. return rule.type || 'string';
  10736. },
  10737. getValidationMethod: function getValidationMethod(rule) {
  10738. if (typeof rule.validator === 'function') {
  10739. return rule.validator;
  10740. }
  10741. var keys = Object.keys(rule);
  10742. var messageIndex = keys.indexOf('message');
  10743. if (messageIndex !== -1) {
  10744. keys.splice(messageIndex, 1);
  10745. }
  10746. if (keys.length === 1 && keys[0] === 'required') {
  10747. return validators.required;
  10748. }
  10749. return validators[this.getType(rule)] || false;
  10750. }
  10751. };
  10752. Schema.register = function register(type, validator) {
  10753. if (typeof validator !== 'function') {
  10754. throw new Error('Cannot register a validator by type, validator is not a function');
  10755. }
  10756. validators[type] = validator;
  10757. };
  10758. Schema.warning = warning;
  10759. Schema.messages = messages;
  10760. var _default = Schema;
  10761. exports.default = _default;
  10762. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 388)))
  10763. /***/ }),
  10764. /***/ 388:
  10765. /*!********************************************************!*\
  10766. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  10767. \********************************************************/
  10768. /*! no static exports found */
  10769. /***/ (function(module, exports, __webpack_require__) {
  10770. exports.nextTick = function nextTick(fn) {
  10771. var args = Array.prototype.slice.call(arguments);
  10772. args.shift();
  10773. setTimeout(function () {
  10774. fn.apply(null, args);
  10775. }, 0);
  10776. };
  10777. exports.platform = exports.arch =
  10778. exports.execPath = exports.title = 'browser';
  10779. exports.pid = 1;
  10780. exports.browser = true;
  10781. exports.env = {};
  10782. exports.argv = [];
  10783. exports.binding = function (name) {
  10784. throw new Error('No such module. (Possibly not yet loaded)')
  10785. };
  10786. (function () {
  10787. var cwd = '/';
  10788. var path;
  10789. exports.cwd = function () { return cwd };
  10790. exports.chdir = function (dir) {
  10791. if (!path) path = __webpack_require__(/*! path */ 389);
  10792. cwd = path.resolve(dir, cwd);
  10793. };
  10794. })();
  10795. exports.exit = exports.kill =
  10796. exports.umask = exports.dlopen =
  10797. exports.uptime = exports.memoryUsage =
  10798. exports.uvCounters = function() {};
  10799. exports.features = {};
  10800. /***/ }),
  10801. /***/ 389:
  10802. /*!***********************************************!*\
  10803. !*** ./node_modules/path-browserify/index.js ***!
  10804. \***********************************************/
  10805. /*! no static exports found */
  10806. /***/ (function(module, exports, __webpack_require__) {
  10807. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  10808. // backported and transplited with Babel, with backwards-compat fixes
  10809. // Copyright Joyent, Inc. and other Node contributors.
  10810. //
  10811. // Permission is hereby granted, free of charge, to any person obtaining a
  10812. // copy of this software and associated documentation files (the
  10813. // "Software"), to deal in the Software without restriction, including
  10814. // without limitation the rights to use, copy, modify, merge, publish,
  10815. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10816. // persons to whom the Software is furnished to do so, subject to the
  10817. // following conditions:
  10818. //
  10819. // The above copyright notice and this permission notice shall be included
  10820. // in all copies or substantial portions of the Software.
  10821. //
  10822. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10823. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10824. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10825. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10826. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10827. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10828. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10829. // resolves . and .. elements in a path array with directory names there
  10830. // must be no slashes, empty elements, or device names (c:\) in the array
  10831. // (so also no leading and trailing slashes - it does not distinguish
  10832. // relative and absolute paths)
  10833. function normalizeArray(parts, allowAboveRoot) {
  10834. // if the path tries to go above the root, `up` ends up > 0
  10835. var up = 0;
  10836. for (var i = parts.length - 1; i >= 0; i--) {
  10837. var last = parts[i];
  10838. if (last === '.') {
  10839. parts.splice(i, 1);
  10840. } else if (last === '..') {
  10841. parts.splice(i, 1);
  10842. up++;
  10843. } else if (up) {
  10844. parts.splice(i, 1);
  10845. up--;
  10846. }
  10847. }
  10848. // if the path is allowed to go above the root, restore leading ..s
  10849. if (allowAboveRoot) {
  10850. for (; up--; up) {
  10851. parts.unshift('..');
  10852. }
  10853. }
  10854. return parts;
  10855. }
  10856. // path.resolve([from ...], to)
  10857. // posix version
  10858. exports.resolve = function() {
  10859. var resolvedPath = '',
  10860. resolvedAbsolute = false;
  10861. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  10862. var path = (i >= 0) ? arguments[i] : process.cwd();
  10863. // Skip empty and invalid entries
  10864. if (typeof path !== 'string') {
  10865. throw new TypeError('Arguments to path.resolve must be strings');
  10866. } else if (!path) {
  10867. continue;
  10868. }
  10869. resolvedPath = path + '/' + resolvedPath;
  10870. resolvedAbsolute = path.charAt(0) === '/';
  10871. }
  10872. // At this point the path should be resolved to a full absolute path, but
  10873. // handle relative paths to be safe (might happen when process.cwd() fails)
  10874. // Normalize the path
  10875. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  10876. return !!p;
  10877. }), !resolvedAbsolute).join('/');
  10878. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  10879. };
  10880. // path.normalize(path)
  10881. // posix version
  10882. exports.normalize = function(path) {
  10883. var isAbsolute = exports.isAbsolute(path),
  10884. trailingSlash = substr(path, -1) === '/';
  10885. // Normalize the path
  10886. path = normalizeArray(filter(path.split('/'), function(p) {
  10887. return !!p;
  10888. }), !isAbsolute).join('/');
  10889. if (!path && !isAbsolute) {
  10890. path = '.';
  10891. }
  10892. if (path && trailingSlash) {
  10893. path += '/';
  10894. }
  10895. return (isAbsolute ? '/' : '') + path;
  10896. };
  10897. // posix version
  10898. exports.isAbsolute = function(path) {
  10899. return path.charAt(0) === '/';
  10900. };
  10901. // posix version
  10902. exports.join = function() {
  10903. var paths = Array.prototype.slice.call(arguments, 0);
  10904. return exports.normalize(filter(paths, function(p, index) {
  10905. if (typeof p !== 'string') {
  10906. throw new TypeError('Arguments to path.join must be strings');
  10907. }
  10908. return p;
  10909. }).join('/'));
  10910. };
  10911. // path.relative(from, to)
  10912. // posix version
  10913. exports.relative = function(from, to) {
  10914. from = exports.resolve(from).substr(1);
  10915. to = exports.resolve(to).substr(1);
  10916. function trim(arr) {
  10917. var start = 0;
  10918. for (; start < arr.length; start++) {
  10919. if (arr[start] !== '') break;
  10920. }
  10921. var end = arr.length - 1;
  10922. for (; end >= 0; end--) {
  10923. if (arr[end] !== '') break;
  10924. }
  10925. if (start > end) return [];
  10926. return arr.slice(start, end - start + 1);
  10927. }
  10928. var fromParts = trim(from.split('/'));
  10929. var toParts = trim(to.split('/'));
  10930. var length = Math.min(fromParts.length, toParts.length);
  10931. var samePartsLength = length;
  10932. for (var i = 0; i < length; i++) {
  10933. if (fromParts[i] !== toParts[i]) {
  10934. samePartsLength = i;
  10935. break;
  10936. }
  10937. }
  10938. var outputParts = [];
  10939. for (var i = samePartsLength; i < fromParts.length; i++) {
  10940. outputParts.push('..');
  10941. }
  10942. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  10943. return outputParts.join('/');
  10944. };
  10945. exports.sep = '/';
  10946. exports.delimiter = ':';
  10947. exports.dirname = function (path) {
  10948. if (typeof path !== 'string') path = path + '';
  10949. if (path.length === 0) return '.';
  10950. var code = path.charCodeAt(0);
  10951. var hasRoot = code === 47 /*/*/;
  10952. var end = -1;
  10953. var matchedSlash = true;
  10954. for (var i = path.length - 1; i >= 1; --i) {
  10955. code = path.charCodeAt(i);
  10956. if (code === 47 /*/*/) {
  10957. if (!matchedSlash) {
  10958. end = i;
  10959. break;
  10960. }
  10961. } else {
  10962. // We saw the first non-path separator
  10963. matchedSlash = false;
  10964. }
  10965. }
  10966. if (end === -1) return hasRoot ? '/' : '.';
  10967. if (hasRoot && end === 1) {
  10968. // return '//';
  10969. // Backwards-compat fix:
  10970. return '/';
  10971. }
  10972. return path.slice(0, end);
  10973. };
  10974. function basename(path) {
  10975. if (typeof path !== 'string') path = path + '';
  10976. var start = 0;
  10977. var end = -1;
  10978. var matchedSlash = true;
  10979. var i;
  10980. for (i = path.length - 1; i >= 0; --i) {
  10981. if (path.charCodeAt(i) === 47 /*/*/) {
  10982. // If we reached a path separator that was not part of a set of path
  10983. // separators at the end of the string, stop now
  10984. if (!matchedSlash) {
  10985. start = i + 1;
  10986. break;
  10987. }
  10988. } else if (end === -1) {
  10989. // We saw the first non-path separator, mark this as the end of our
  10990. // path component
  10991. matchedSlash = false;
  10992. end = i + 1;
  10993. }
  10994. }
  10995. if (end === -1) return '';
  10996. return path.slice(start, end);
  10997. }
  10998. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  10999. // in new Node.js versions, so only basename() above is backported here
  11000. exports.basename = function (path, ext) {
  11001. var f = basename(path);
  11002. if (ext && f.substr(-1 * ext.length) === ext) {
  11003. f = f.substr(0, f.length - ext.length);
  11004. }
  11005. return f;
  11006. };
  11007. exports.extname = function (path) {
  11008. if (typeof path !== 'string') path = path + '';
  11009. var startDot = -1;
  11010. var startPart = 0;
  11011. var end = -1;
  11012. var matchedSlash = true;
  11013. // Track the state of characters (if any) we see before our first dot and
  11014. // after any path separator we find
  11015. var preDotState = 0;
  11016. for (var i = path.length - 1; i >= 0; --i) {
  11017. var code = path.charCodeAt(i);
  11018. if (code === 47 /*/*/) {
  11019. // If we reached a path separator that was not part of a set of path
  11020. // separators at the end of the string, stop now
  11021. if (!matchedSlash) {
  11022. startPart = i + 1;
  11023. break;
  11024. }
  11025. continue;
  11026. }
  11027. if (end === -1) {
  11028. // We saw the first non-path separator, mark this as the end of our
  11029. // extension
  11030. matchedSlash = false;
  11031. end = i + 1;
  11032. }
  11033. if (code === 46 /*.*/) {
  11034. // If this is our first dot, mark it as the start of our extension
  11035. if (startDot === -1)
  11036. startDot = i;
  11037. else if (preDotState !== 1)
  11038. preDotState = 1;
  11039. } else if (startDot !== -1) {
  11040. // We saw a non-dot and non-path separator before our dot, so we should
  11041. // have a good chance at having a non-empty extension
  11042. preDotState = -1;
  11043. }
  11044. }
  11045. if (startDot === -1 || end === -1 ||
  11046. // We saw a non-dot character immediately before the dot
  11047. preDotState === 0 ||
  11048. // The (right-most) trimmed path component is exactly '..'
  11049. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  11050. return '';
  11051. }
  11052. return path.slice(startDot, end);
  11053. };
  11054. function filter (xs, f) {
  11055. if (xs.filter) return xs.filter(f);
  11056. var res = [];
  11057. for (var i = 0; i < xs.length; i++) {
  11058. if (f(xs[i], i, xs)) res.push(xs[i]);
  11059. }
  11060. return res;
  11061. }
  11062. // String.prototype.substr - negative index don't work in IE8
  11063. var substr = 'ab'.substr(-1) === 'b'
  11064. ? function (str, start, len) { return str.substr(start, len) }
  11065. : function (str, start, len) {
  11066. if (start < 0) start = str.length + start;
  11067. return str.substr(start, len);
  11068. }
  11069. ;
  11070. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 388)))
  11071. /***/ }),
  11072. /***/ 39:
  11073. /*!*******************************************************!*\
  11074. !*** E:/Desktop/zd_wechatApp(1)/common/lodash.min.js ***!
  11075. \*******************************************************/
  11076. /*! no static exports found */
  11077. /***/ (function(module, exports, __webpack_require__) {
  11078. /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  11079. /**
  11080. * @license
  11081. * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
  11082. */
  11083. ;
  11084. (function () {
  11085. function n(n, t, r) {
  11086. switch (r.length) {
  11087. case 0:
  11088. return n.call(t);
  11089. case 1:
  11090. return n.call(t, r[0]);
  11091. case 2:
  11092. return n.call(t, r[0], r[1]);
  11093. case 3:
  11094. return n.call(t, r[0], r[1], r[2]);
  11095. }
  11096. return n.apply(t, r);
  11097. }
  11098. function t(n, t, r, e) {
  11099. for (var u = -1, i = null == n ? 0 : n.length; ++u < i;) {
  11100. var o = n[u];
  11101. t(e, o, r(o), n);
  11102. }
  11103. return e;
  11104. }
  11105. function r(n, t) {
  11106. for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n);) {
  11107. ;
  11108. }
  11109. return n;
  11110. }
  11111. function e(n, t) {
  11112. for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n);) {
  11113. ;
  11114. }
  11115. return n;
  11116. }
  11117. function u(n, t) {
  11118. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11119. if (!t(n[r], r, n)) return false;
  11120. }
  11121. return true;
  11122. }
  11123. function i(n, t) {
  11124. for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e;) {
  11125. var o = n[r];
  11126. t(o, r, n) && (i[u++] = o);
  11127. }
  11128. return i;
  11129. }
  11130. function o(n, t) {
  11131. return !(null == n || !n.length) && -1 < v(n, t, 0);
  11132. }
  11133. function f(n, t, r) {
  11134. for (var e = -1, u = null == n ? 0 : n.length; ++e < u;) {
  11135. if (r(t, n[e])) return true;
  11136. }
  11137. return false;
  11138. }
  11139. function c(n, t) {
  11140. for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e;) {
  11141. u[r] = t(n[r], r, n);
  11142. }
  11143. return u;
  11144. }
  11145. function a(n, t) {
  11146. for (var r = -1, e = t.length, u = n.length; ++r < e;) {
  11147. n[u + r] = t[r];
  11148. }
  11149. return n;
  11150. }
  11151. function l(n, t, r, e) {
  11152. var u = -1,
  11153. i = null == n ? 0 : n.length;
  11154. for (e && i && (r = n[++u]); ++u < i;) {
  11155. r = t(r, n[u], u, n);
  11156. }
  11157. return r;
  11158. }
  11159. function s(n, t, r, e) {
  11160. var u = null == n ? 0 : n.length;
  11161. for (e && u && (r = n[--u]); u--;) {
  11162. r = t(r, n[u], u, n);
  11163. }
  11164. return r;
  11165. }
  11166. function h(n, t) {
  11167. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11168. if (t(n[r], r, n)) return true;
  11169. }
  11170. return false;
  11171. }
  11172. function p(n, t, r) {
  11173. var e;
  11174. return r(n, function (n, r, u) {
  11175. if (t(n, r, u)) return e = r, false;
  11176. }), e;
  11177. }
  11178. function _(n, t, r, e) {
  11179. var u = n.length;
  11180. for (r += e ? 1 : -1; e ? r-- : ++r < u;) {
  11181. if (t(n[r], r, n)) return r;
  11182. }
  11183. return -1;
  11184. }
  11185. function v(n, t, r) {
  11186. if (t === t) n: {
  11187. --r;
  11188. for (var e = n.length; ++r < e;) {
  11189. if (n[r] === t) {
  11190. n = r;
  11191. break n;
  11192. }
  11193. }
  11194. n = -1;
  11195. } else n = _(n, d, r);
  11196. return n;
  11197. }
  11198. function g(n, t, r, e) {
  11199. --r;
  11200. for (var u = n.length; ++r < u;) {
  11201. if (e(n[r], t)) return r;
  11202. }
  11203. return -1;
  11204. }
  11205. function d(n) {
  11206. return n !== n;
  11207. }
  11208. function y(n, t) {
  11209. var r = null == n ? 0 : n.length;
  11210. return r ? m(n, t) / r : F;
  11211. }
  11212. function b(n) {
  11213. return function (t) {
  11214. return null == t ? T : t[n];
  11215. };
  11216. }
  11217. function x(n) {
  11218. return function (t) {
  11219. return null == n ? T : n[t];
  11220. };
  11221. }
  11222. function j(n, t, r, e, u) {
  11223. return u(n, function (n, u, i) {
  11224. r = e ? (e = false, n) : t(r, n, u, i);
  11225. }), r;
  11226. }
  11227. function w(n, t) {
  11228. var r = n.length;
  11229. for (n.sort(t); r--;) {
  11230. n[r] = n[r].c;
  11231. }
  11232. return n;
  11233. }
  11234. function m(n, t) {
  11235. for (var r, e = -1, u = n.length; ++e < u;) {
  11236. var i = t(n[e]);
  11237. i !== T && (r = r === T ? i : r + i);
  11238. }
  11239. return r;
  11240. }
  11241. function A(n, t) {
  11242. for (var r = -1, e = Array(n); ++r < n;) {
  11243. e[r] = t(r);
  11244. }
  11245. return e;
  11246. }
  11247. function E(n, t) {
  11248. return c(t, function (t) {
  11249. return [t, n[t]];
  11250. });
  11251. }
  11252. function k(n) {
  11253. return function (t) {
  11254. return n(t);
  11255. };
  11256. }
  11257. function S(n, t) {
  11258. return c(t, function (t) {
  11259. return n[t];
  11260. });
  11261. }
  11262. function O(n, t) {
  11263. return n.has(t);
  11264. }
  11265. function I(n, t) {
  11266. for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0);) {
  11267. ;
  11268. }
  11269. return r;
  11270. }
  11271. function R(n, t) {
  11272. for (var r = n.length; r-- && -1 < v(t, n[r], 0);) {
  11273. ;
  11274. }
  11275. return r;
  11276. }
  11277. function z(n) {
  11278. return "\\" + Un[n];
  11279. }
  11280. function W(n) {
  11281. var t = -1,
  11282. r = Array(n.size);
  11283. return n.forEach(function (n, e) {
  11284. r[++t] = [e, n];
  11285. }), r;
  11286. }
  11287. function B(n, t) {
  11288. return function (r) {
  11289. return n(t(r));
  11290. };
  11291. }
  11292. function L(n, t) {
  11293. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  11294. var o = n[r];
  11295. o !== t && "__lodash_placeholder__" !== o || (n[r] = "__lodash_placeholder__", i[u++] = r);
  11296. }
  11297. return i;
  11298. }
  11299. function U(n) {
  11300. var t = -1,
  11301. r = Array(n.size);
  11302. return n.forEach(function (n) {
  11303. r[++t] = n;
  11304. }), r;
  11305. }
  11306. function C(n) {
  11307. var t = -1,
  11308. r = Array(n.size);
  11309. return n.forEach(function (n) {
  11310. r[++t] = [n, n];
  11311. }), r;
  11312. }
  11313. function D(n) {
  11314. if (Rn.test(n)) {
  11315. for (var t = On.lastIndex = 0; On.test(n);) {
  11316. ++t;
  11317. }
  11318. n = t;
  11319. } else n = Qn(n);
  11320. return n;
  11321. }
  11322. function M(n) {
  11323. return Rn.test(n) ? n.match(On) || [] : n.split("");
  11324. }
  11325. var T,
  11326. $ = 1 / 0,
  11327. F = NaN,
  11328. N = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]],
  11329. P = /\b__p\+='';/g,
  11330. Z = /\b(__p\+=)''\+/g,
  11331. q = /(__e\(.*?\)|\b__t\))\+'';/g,
  11332. V = /&(?:amp|lt|gt|quot|#39);/g,
  11333. K = /[&<>"']/g,
  11334. G = RegExp(V.source),
  11335. H = RegExp(K.source),
  11336. J = /<%-([\s\S]+?)%>/g,
  11337. Y = /<%([\s\S]+?)%>/g,
  11338. Q = /<%=([\s\S]+?)%>/g,
  11339. X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  11340. nn = /^\w*$/,
  11341. tn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
  11342. rn = /[\\^$.*+?()[\]{}|]/g,
  11343. en = RegExp(rn.source),
  11344. un = /^\s+|\s+$/g,
  11345. on = /^\s+/,
  11346. fn = /\s+$/,
  11347. cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  11348. an = /\{\n\/\* \[wrapped with (.+)\] \*/,
  11349. ln = /,? & /,
  11350. sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,
  11351. hn = /\\(\\)?/g,
  11352. pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,
  11353. _n = /\w*$/,
  11354. vn = /^[-+]0x[0-9a-f]+$/i,
  11355. gn = /^0b[01]+$/i,
  11356. dn = /^\[object .+?Constructor\]$/,
  11357. yn = /^0o[0-7]+$/i,
  11358. bn = /^(?:0|[1-9]\d*)$/,
  11359. xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
  11360. jn = /($^)/,
  11361. wn = /['\n\r\u2028\u2029\\]/g,
  11362. 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])?)*",
  11363. An = "(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])" + mn,
  11364. 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])",
  11365. kn = RegExp("['\u2019]", "g"),
  11366. Sn = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"),
  11367. On = RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + En + mn, "g"),
  11368. 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"),
  11369. Rn = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),
  11370. zn = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
  11371. 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(" "),
  11372. Bn = {};
  11373. 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;
  11374. var Ln = {};
  11375. 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;
  11376. var Un = {
  11377. "\\": "\\",
  11378. "'": "'",
  11379. "\n": "n",
  11380. "\r": "r",
  11381. "\u2028": "u2028",
  11382. "\u2029": "u2029"
  11383. },
  11384. Cn = parseFloat,
  11385. Dn = parseInt,
  11386. Mn = (typeof global === "undefined" ? "undefined" : _typeof(global)) == "object" && global && global.Object === Object && global,
  11387. Tn = (typeof self === "undefined" ? "undefined" : _typeof(self)) == "object" && self && self.Object === Object && self,
  11388. $n = Mn || Tn || Function("return this")(),
  11389. Fn = ( false ? undefined : _typeof(exports)) == "object" && exports && !exports.nodeType && exports,
  11390. Nn = Fn && ( false ? undefined : _typeof(module)) == "object" && module && !module.nodeType && module,
  11391. Pn = Nn && Nn.exports === Fn,
  11392. Zn = Pn && Mn.process,
  11393. qn = function () {
  11394. try {
  11395. var n = Nn && Nn.f && Nn.f("util").types;
  11396. return n ? n : Zn && Zn.binding && Zn.binding("util");
  11397. } catch (n) {}
  11398. }(),
  11399. Vn = qn && qn.isArrayBuffer,
  11400. Kn = qn && qn.isDate,
  11401. Gn = qn && qn.isMap,
  11402. Hn = qn && qn.isRegExp,
  11403. Jn = qn && qn.isSet,
  11404. Yn = qn && qn.isTypedArray,
  11405. Qn = b("length"),
  11406. Xn = x({
  11407. "\xc0": "A",
  11408. "\xc1": "A",
  11409. "\xc2": "A",
  11410. "\xc3": "A",
  11411. "\xc4": "A",
  11412. "\xc5": "A",
  11413. "\xe0": "a",
  11414. "\xe1": "a",
  11415. "\xe2": "a",
  11416. "\xe3": "a",
  11417. "\xe4": "a",
  11418. "\xe5": "a",
  11419. "\xc7": "C",
  11420. "\xe7": "c",
  11421. "\xd0": "D",
  11422. "\xf0": "d",
  11423. "\xc8": "E",
  11424. "\xc9": "E",
  11425. "\xca": "E",
  11426. "\xcb": "E",
  11427. "\xe8": "e",
  11428. "\xe9": "e",
  11429. "\xea": "e",
  11430. "\xeb": "e",
  11431. "\xcc": "I",
  11432. "\xcd": "I",
  11433. "\xce": "I",
  11434. "\xcf": "I",
  11435. "\xec": "i",
  11436. "\xed": "i",
  11437. "\xee": "i",
  11438. "\xef": "i",
  11439. "\xd1": "N",
  11440. "\xf1": "n",
  11441. "\xd2": "O",
  11442. "\xd3": "O",
  11443. "\xd4": "O",
  11444. "\xd5": "O",
  11445. "\xd6": "O",
  11446. "\xd8": "O",
  11447. "\xf2": "o",
  11448. "\xf3": "o",
  11449. "\xf4": "o",
  11450. "\xf5": "o",
  11451. "\xf6": "o",
  11452. "\xf8": "o",
  11453. "\xd9": "U",
  11454. "\xda": "U",
  11455. "\xdb": "U",
  11456. "\xdc": "U",
  11457. "\xf9": "u",
  11458. "\xfa": "u",
  11459. "\xfb": "u",
  11460. "\xfc": "u",
  11461. "\xdd": "Y",
  11462. "\xfd": "y",
  11463. "\xff": "y",
  11464. "\xc6": "Ae",
  11465. "\xe6": "ae",
  11466. "\xde": "Th",
  11467. "\xfe": "th",
  11468. "\xdf": "ss",
  11469. "\u0100": "A",
  11470. "\u0102": "A",
  11471. "\u0104": "A",
  11472. "\u0101": "a",
  11473. "\u0103": "a",
  11474. "\u0105": "a",
  11475. "\u0106": "C",
  11476. "\u0108": "C",
  11477. "\u010A": "C",
  11478. "\u010C": "C",
  11479. "\u0107": "c",
  11480. "\u0109": "c",
  11481. "\u010B": "c",
  11482. "\u010D": "c",
  11483. "\u010E": "D",
  11484. "\u0110": "D",
  11485. "\u010F": "d",
  11486. "\u0111": "d",
  11487. "\u0112": "E",
  11488. "\u0114": "E",
  11489. "\u0116": "E",
  11490. "\u0118": "E",
  11491. "\u011A": "E",
  11492. "\u0113": "e",
  11493. "\u0115": "e",
  11494. "\u0117": "e",
  11495. "\u0119": "e",
  11496. "\u011B": "e",
  11497. "\u011C": "G",
  11498. "\u011E": "G",
  11499. "\u0120": "G",
  11500. "\u0122": "G",
  11501. "\u011D": "g",
  11502. "\u011F": "g",
  11503. "\u0121": "g",
  11504. "\u0123": "g",
  11505. "\u0124": "H",
  11506. "\u0126": "H",
  11507. "\u0125": "h",
  11508. "\u0127": "h",
  11509. "\u0128": "I",
  11510. "\u012A": "I",
  11511. "\u012C": "I",
  11512. "\u012E": "I",
  11513. "\u0130": "I",
  11514. "\u0129": "i",
  11515. "\u012B": "i",
  11516. "\u012D": "i",
  11517. "\u012F": "i",
  11518. "\u0131": "i",
  11519. "\u0134": "J",
  11520. "\u0135": "j",
  11521. "\u0136": "K",
  11522. "\u0137": "k",
  11523. "\u0138": "k",
  11524. "\u0139": "L",
  11525. "\u013B": "L",
  11526. "\u013D": "L",
  11527. "\u013F": "L",
  11528. "\u0141": "L",
  11529. "\u013A": "l",
  11530. "\u013C": "l",
  11531. "\u013E": "l",
  11532. "\u0140": "l",
  11533. "\u0142": "l",
  11534. "\u0143": "N",
  11535. "\u0145": "N",
  11536. "\u0147": "N",
  11537. "\u014A": "N",
  11538. "\u0144": "n",
  11539. "\u0146": "n",
  11540. "\u0148": "n",
  11541. "\u014B": "n",
  11542. "\u014C": "O",
  11543. "\u014E": "O",
  11544. "\u0150": "O",
  11545. "\u014D": "o",
  11546. "\u014F": "o",
  11547. "\u0151": "o",
  11548. "\u0154": "R",
  11549. "\u0156": "R",
  11550. "\u0158": "R",
  11551. "\u0155": "r",
  11552. "\u0157": "r",
  11553. "\u0159": "r",
  11554. "\u015A": "S",
  11555. "\u015C": "S",
  11556. "\u015E": "S",
  11557. "\u0160": "S",
  11558. "\u015B": "s",
  11559. "\u015D": "s",
  11560. "\u015F": "s",
  11561. "\u0161": "s",
  11562. "\u0162": "T",
  11563. "\u0164": "T",
  11564. "\u0166": "T",
  11565. "\u0163": "t",
  11566. "\u0165": "t",
  11567. "\u0167": "t",
  11568. "\u0168": "U",
  11569. "\u016A": "U",
  11570. "\u016C": "U",
  11571. "\u016E": "U",
  11572. "\u0170": "U",
  11573. "\u0172": "U",
  11574. "\u0169": "u",
  11575. "\u016B": "u",
  11576. "\u016D": "u",
  11577. "\u016F": "u",
  11578. "\u0171": "u",
  11579. "\u0173": "u",
  11580. "\u0174": "W",
  11581. "\u0175": "w",
  11582. "\u0176": "Y",
  11583. "\u0177": "y",
  11584. "\u0178": "Y",
  11585. "\u0179": "Z",
  11586. "\u017B": "Z",
  11587. "\u017D": "Z",
  11588. "\u017A": "z",
  11589. "\u017C": "z",
  11590. "\u017E": "z",
  11591. "\u0132": "IJ",
  11592. "\u0133": "ij",
  11593. "\u0152": "Oe",
  11594. "\u0153": "oe",
  11595. "\u0149": "'n",
  11596. "\u017F": "s"
  11597. }),
  11598. nt = x({
  11599. "&": "&amp;",
  11600. "<": "&lt;",
  11601. ">": "&gt;",
  11602. '"': "&quot;",
  11603. "'": "&#39;"
  11604. }),
  11605. tt = x({
  11606. "&amp;": "&",
  11607. "&lt;": "<",
  11608. "&gt;": ">",
  11609. "&quot;": '"',
  11610. "&#39;": "'"
  11611. }),
  11612. rt = function x(mn) {
  11613. function An(n) {
  11614. if (du(n) && !of(n) && !(n instanceof Un)) {
  11615. if (n instanceof On) return n;
  11616. if (ii.call(n, "__wrapped__")) return $e(n);
  11617. }
  11618. return new On(n);
  11619. }
  11620. function En() {}
  11621. function On(n, t) {
  11622. this.__wrapped__ = n, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = T;
  11623. }
  11624. function Un(n) {
  11625. this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = [];
  11626. }
  11627. function Mn(n) {
  11628. var t = -1,
  11629. r = null == n ? 0 : n.length;
  11630. for (this.clear(); ++t < r;) {
  11631. var e = n[t];
  11632. this.set(e[0], e[1]);
  11633. }
  11634. }
  11635. function Tn(n) {
  11636. var t = -1,
  11637. r = null == n ? 0 : n.length;
  11638. for (this.clear(); ++t < r;) {
  11639. var e = n[t];
  11640. this.set(e[0], e[1]);
  11641. }
  11642. }
  11643. function Fn(n) {
  11644. var t = -1,
  11645. r = null == n ? 0 : n.length;
  11646. for (this.clear(); ++t < r;) {
  11647. var e = n[t];
  11648. this.set(e[0], e[1]);
  11649. }
  11650. }
  11651. function Nn(n) {
  11652. var t = -1,
  11653. r = null == n ? 0 : n.length;
  11654. for (this.__data__ = new Fn(); ++t < r;) {
  11655. this.add(n[t]);
  11656. }
  11657. }
  11658. function Zn(n) {
  11659. this.size = (this.__data__ = new Tn(n)).size;
  11660. }
  11661. function qn(n, t) {
  11662. var r,
  11663. e = of(n),
  11664. u = !e && uf(n),
  11665. i = !e && !u && cf(n),
  11666. o = !e && !u && !i && pf(n),
  11667. u = (e = e || u || i || o) ? A(n.length, Xu) : [],
  11668. f = u.length;
  11669. for (r in n) {
  11670. !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);
  11671. }
  11672. return u;
  11673. }
  11674. function Qn(n) {
  11675. var t = n.length;
  11676. return t ? n[ir(0, t - 1)] : T;
  11677. }
  11678. function et(n, t) {
  11679. return Ce(Ur(n), pt(t, 0, n.length));
  11680. }
  11681. function ut(n) {
  11682. return Ce(Ur(n));
  11683. }
  11684. function it(n, t, r) {
  11685. (r === T || au(n[t], r)) && (r !== T || t in n) || st(n, t, r);
  11686. }
  11687. function ot(n, t, r) {
  11688. var e = n[t];
  11689. ii.call(n, t) && au(e, r) && (r !== T || t in n) || st(n, t, r);
  11690. }
  11691. function ft(n, t) {
  11692. for (var r = n.length; r--;) {
  11693. if (au(n[r][0], t)) return r;
  11694. }
  11695. return -1;
  11696. }
  11697. function ct(n, t, r, e) {
  11698. return eo(n, function (n, u, i) {
  11699. t(e, n, r(n), i);
  11700. }), e;
  11701. }
  11702. function at(n, t) {
  11703. return n && Cr(t, zu(t), n);
  11704. }
  11705. function lt(n, t) {
  11706. return n && Cr(t, Wu(t), n);
  11707. }
  11708. function st(n, t, r) {
  11709. "__proto__" == t && mi ? mi(n, t, {
  11710. configurable: true,
  11711. enumerable: true,
  11712. value: r,
  11713. writable: true
  11714. }) : n[t] = r;
  11715. }
  11716. function ht(n, t) {
  11717. for (var r = -1, e = t.length, u = Vu(e), i = null == n; ++r < e;) {
  11718. u[r] = i ? T : Iu(n, t[r]);
  11719. }
  11720. return u;
  11721. }
  11722. function pt(n, t, r) {
  11723. return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n;
  11724. }
  11725. function _t(n, t, e, u, i, o) {
  11726. var f,
  11727. c = 1 & t,
  11728. a = 2 & t,
  11729. l = 4 & t;
  11730. if (e && (f = i ? e(n, u, i, o) : e(n)), f !== T) return f;
  11731. if (!gu(n)) return n;
  11732. if (u = of(n)) {
  11733. if (f = me(n), !c) return Ur(n, f);
  11734. } else {
  11735. var s = _o(n),
  11736. h = "[object Function]" == s || "[object GeneratorFunction]" == s;
  11737. if (cf(n)) return Ir(n, c);
  11738. if ("[object Object]" == s || "[object Arguments]" == s || h && !i) {
  11739. if (f = a || h ? {} : Ae(n), !c) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n));
  11740. } else {
  11741. if (!Ln[s]) return i ? n : {};
  11742. f = Ee(n, s, c);
  11743. }
  11744. }
  11745. if (o || (o = new Zn()), i = o.get(n)) return i;
  11746. if (o.set(n, f), hf(n)) return n.forEach(function (r) {
  11747. f.add(_t(r, t, e, r, n, o));
  11748. }), f;
  11749. if (lf(n)) return n.forEach(function (r, u) {
  11750. f.set(u, _t(r, t, e, u, n, o));
  11751. }), f;
  11752. var a = l ? a ? ve : _e : a ? Wu : zu,
  11753. p = u ? T : a(n);
  11754. return r(p || n, function (r, u) {
  11755. p && (u = r, r = n[u]), ot(f, u, _t(r, t, e, u, n, o));
  11756. }), f;
  11757. }
  11758. function vt(n) {
  11759. var t = zu(n);
  11760. return function (r) {
  11761. return gt(r, n, t);
  11762. };
  11763. }
  11764. function gt(n, t, r) {
  11765. var e = r.length;
  11766. if (null == n) return !e;
  11767. for (n = Yu(n); e--;) {
  11768. var u = r[e],
  11769. i = t[u],
  11770. o = n[u];
  11771. if (o === T && !(u in n) || !i(o)) return false;
  11772. }
  11773. return true;
  11774. }
  11775. function dt(n, t, r) {
  11776. if (typeof n != "function") throw new ni("Expected a function");
  11777. return yo(function () {
  11778. n.apply(T, r);
  11779. }, t);
  11780. }
  11781. function yt(n, t, r, e) {
  11782. var u = -1,
  11783. i = o,
  11784. a = true,
  11785. l = n.length,
  11786. s = [],
  11787. h = t.length;
  11788. if (!l) return s;
  11789. r && (t = c(t, k(r))), e ? (i = f, a = false) : 200 <= t.length && (i = O, a = false, t = new Nn(t));
  11790. n: for (; ++u < l;) {
  11791. var p = n[u],
  11792. _ = null == r ? p : r(p),
  11793. p = e || 0 !== p ? p : 0;
  11794. if (a && _ === _) {
  11795. for (var v = h; v--;) {
  11796. if (t[v] === _) continue n;
  11797. }
  11798. s.push(p);
  11799. } else i(t, _, e) || s.push(p);
  11800. }
  11801. return s;
  11802. }
  11803. function bt(n, t) {
  11804. var r = true;
  11805. return eo(n, function (n, e, u) {
  11806. return r = !!t(n, e, u);
  11807. }), r;
  11808. }
  11809. function xt(n, t, r) {
  11810. for (var e = -1, u = n.length; ++e < u;) {
  11811. var i = n[e],
  11812. o = t(i);
  11813. if (null != o && (f === T ? o === o && !ju(o) : r(o, f))) var f = o,
  11814. c = i;
  11815. }
  11816. return c;
  11817. }
  11818. function jt(n, t) {
  11819. var r = [];
  11820. return eo(n, function (n, e, u) {
  11821. t(n, e, u) && r.push(n);
  11822. }), r;
  11823. }
  11824. function wt(n, t, r, e, u) {
  11825. var i = -1,
  11826. o = n.length;
  11827. for (r || (r = ke), u || (u = []); ++i < o;) {
  11828. var f = n[i];
  11829. 0 < t && r(f) ? 1 < t ? wt(f, t - 1, r, e, u) : a(u, f) : e || (u[u.length] = f);
  11830. }
  11831. return u;
  11832. }
  11833. function mt(n, t) {
  11834. return n && io(n, t, zu);
  11835. }
  11836. function At(n, t) {
  11837. return n && oo(n, t, zu);
  11838. }
  11839. function Et(n, t) {
  11840. return i(t, function (t) {
  11841. return pu(n[t]);
  11842. });
  11843. }
  11844. function kt(n, t) {
  11845. t = Sr(t, n);
  11846. for (var r = 0, e = t.length; null != n && r < e;) {
  11847. n = n[De(t[r++])];
  11848. }
  11849. return r && r == e ? n : T;
  11850. }
  11851. function St(n, t, r) {
  11852. return t = t(n), of(n) ? t : a(t, r(n));
  11853. }
  11854. function Ot(n) {
  11855. if (null == n) n = n === T ? "[object Undefined]" : "[object Null]";else if (wi && wi in Yu(n)) {
  11856. var t = ii.call(n, wi),
  11857. r = n[wi];
  11858. try {
  11859. n[wi] = T;
  11860. var e = true;
  11861. } catch (n) {}
  11862. var u = ci.call(n);
  11863. e && (t ? n[wi] = r : delete n[wi]), n = u;
  11864. } else n = ci.call(n);
  11865. return n;
  11866. }
  11867. function It(n, t) {
  11868. return n > t;
  11869. }
  11870. function Rt(n, t) {
  11871. return null != n && ii.call(n, t);
  11872. }
  11873. function zt(n, t) {
  11874. return null != n && t in Yu(n);
  11875. }
  11876. function Wt(n, t, r) {
  11877. for (var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Vu(i), s = 1 / 0, h = []; a--;) {
  11878. var p = n[a];
  11879. 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;
  11880. }
  11881. var p = n[0],
  11882. _ = -1,
  11883. v = l[0];
  11884. n: for (; ++_ < u && h.length < s;) {
  11885. var g = p[_],
  11886. d = t ? t(g) : g,
  11887. g = r || 0 !== g ? g : 0;
  11888. if (v ? !O(v, d) : !e(h, d, r)) {
  11889. for (a = i; --a;) {
  11890. var y = l[a];
  11891. if (y ? !O(y, d) : !e(n[a], d, r)) continue n;
  11892. }
  11893. v && v.push(d), h.push(g);
  11894. }
  11895. }
  11896. return h;
  11897. }
  11898. function Bt(n, t, r) {
  11899. var e = {};
  11900. return mt(n, function (n, u, i) {
  11901. t(e, r(n), u, i);
  11902. }), e;
  11903. }
  11904. function Lt(t, r, e) {
  11905. 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);
  11906. }
  11907. function Ut(n) {
  11908. return du(n) && "[object Arguments]" == Ot(n);
  11909. }
  11910. function Ct(n) {
  11911. return du(n) && "[object ArrayBuffer]" == Ot(n);
  11912. }
  11913. function Dt(n) {
  11914. return du(n) && "[object Date]" == Ot(n);
  11915. }
  11916. function Mt(n, t, r, e, u) {
  11917. if (n === t) t = true;else if (null == n || null == t || !du(n) && !du(t)) t = n !== n && t !== t;else n: {
  11918. var i = of(n),
  11919. o = of(t),
  11920. f = i ? "[object Array]" : _o(n),
  11921. c = o ? "[object Array]" : _o(t),
  11922. f = "[object Arguments]" == f ? "[object Object]" : f,
  11923. c = "[object Arguments]" == c ? "[object Object]" : c,
  11924. a = "[object Object]" == f,
  11925. o = "[object Object]" == c;
  11926. if ((c = f == c) && cf(n)) {
  11927. if (!cf(t)) {
  11928. t = false;
  11929. break n;
  11930. }
  11931. i = true, a = false;
  11932. }
  11933. 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 {
  11934. if (!(1 & r) && (i = a && ii.call(n, "__wrapped__"), f = o && ii.call(t, "__wrapped__"), i || f)) {
  11935. n = i ? n.value() : n, t = f ? t.value() : t, u || (u = new Zn()), t = Mt(n, t, r, e, u);
  11936. break n;
  11937. }
  11938. if (c) {
  11939. t: if (u || (u = new Zn()), i = 1 & r, f = _e(n), o = f.length, c = _e(t).length, o == c || i) {
  11940. for (a = o; a--;) {
  11941. var l = f[a];
  11942. if (!(i ? l in t : ii.call(t, l))) {
  11943. t = false;
  11944. break t;
  11945. }
  11946. }
  11947. if ((c = u.get(n)) && u.get(t)) t = c == t;else {
  11948. c = true, u.set(n, t), u.set(t, n);
  11949. for (var s = i; ++a < o;) {
  11950. var l = f[a],
  11951. h = n[l],
  11952. p = t[l];
  11953. if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u);
  11954. if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) {
  11955. c = false;
  11956. break;
  11957. }
  11958. s || (s = "constructor" == l);
  11959. }
  11960. 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;
  11961. }
  11962. } else t = false;
  11963. } else t = false;
  11964. }
  11965. }
  11966. return t;
  11967. }
  11968. function Tt(n) {
  11969. return du(n) && "[object Map]" == _o(n);
  11970. }
  11971. function $t(n, t, r, e) {
  11972. var u = r.length,
  11973. i = u,
  11974. o = !e;
  11975. if (null == n) return !i;
  11976. for (n = Yu(n); u--;) {
  11977. var f = r[u];
  11978. if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false;
  11979. }
  11980. for (; ++u < i;) {
  11981. var f = r[u],
  11982. c = f[0],
  11983. a = n[c],
  11984. l = f[1];
  11985. if (o && f[2]) {
  11986. if (a === T && !(c in n)) return false;
  11987. } else {
  11988. if (f = new Zn(), e) var s = e(a, l, c, n, t, f);
  11989. if (s === T ? !Mt(l, a, 3, e, f) : !s) return false;
  11990. }
  11991. }
  11992. return true;
  11993. }
  11994. function Ft(n) {
  11995. return !(!gu(n) || fi && fi in n) && (pu(n) ? si : dn).test(Me(n));
  11996. }
  11997. function Nt(n) {
  11998. return du(n) && "[object RegExp]" == Ot(n);
  11999. }
  12000. function Pt(n) {
  12001. return du(n) && "[object Set]" == _o(n);
  12002. }
  12003. function Zt(n) {
  12004. return du(n) && vu(n.length) && !!Bn[Ot(n)];
  12005. }
  12006. function qt(n) {
  12007. return typeof n == "function" ? n : null == n ? Tu : _typeof(n) == "object" ? of(n) ? Jt(n[0], n[1]) : Ht(n) : Pu(n);
  12008. }
  12009. function Vt(n) {
  12010. if (!ze(n)) return Bi(n);
  12011. var t,
  12012. r = [];
  12013. for (t in Yu(n)) {
  12014. ii.call(n, t) && "constructor" != t && r.push(t);
  12015. }
  12016. return r;
  12017. }
  12018. function Kt(n, t) {
  12019. return n < t;
  12020. }
  12021. function Gt(n, t) {
  12022. var r = -1,
  12023. e = lu(n) ? Vu(n.length) : [];
  12024. return eo(n, function (n, u, i) {
  12025. e[++r] = t(n, u, i);
  12026. }), e;
  12027. }
  12028. function Ht(n) {
  12029. var t = xe(n);
  12030. return 1 == t.length && t[0][2] ? We(t[0][0], t[0][1]) : function (r) {
  12031. return r === n || $t(r, n, t);
  12032. };
  12033. }
  12034. function Jt(n, t) {
  12035. return Ie(n) && t === t && !gu(t) ? We(De(n), t) : function (r) {
  12036. var e = Iu(r, n);
  12037. return e === T && e === t ? Ru(r, n) : Mt(t, e, 3);
  12038. };
  12039. }
  12040. function Yt(n, t, r, e, u) {
  12041. n !== t && io(t, function (i, o) {
  12042. if (gu(i)) {
  12043. u || (u = new Zn());
  12044. var f = u,
  12045. c = "__proto__" == o ? T : n[o],
  12046. a = "__proto__" == o ? T : t[o],
  12047. l = f.get(a);
  12048. if (l) it(n, o, l);else {
  12049. var l = e ? e(c, a, o + "", n, t, f) : T,
  12050. s = l === T;
  12051. if (s) {
  12052. var h = of(a),
  12053. p = !h && cf(a),
  12054. _ = !h && !p && pf(a),
  12055. l = a;
  12056. 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;
  12057. }
  12058. s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l);
  12059. }
  12060. } else f = e ? e("__proto__" == o ? T : n[o], i, o + "", n, t, u) : T, f === T && (f = i), it(n, o, f);
  12061. }, Wu);
  12062. }
  12063. function Qt(n, t) {
  12064. var r = n.length;
  12065. if (r) return t += 0 > t ? r : 0, Se(t, r) ? n[t] : T;
  12066. }
  12067. function Xt(n, t, r) {
  12068. var e = -1;
  12069. return t = c(t.length ? t : [Tu], k(ye())), n = Gt(n, function (n) {
  12070. return {
  12071. a: c(t, function (t) {
  12072. return t(n);
  12073. }),
  12074. b: ++e,
  12075. c: n
  12076. };
  12077. }), w(n, function (n, t) {
  12078. var e;
  12079. n: {
  12080. e = -1;
  12081. for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o;) {
  12082. var c = Wr(u[e], i[e]);
  12083. if (c) {
  12084. e = e >= f ? c : c * ("desc" == r[e] ? -1 : 1);
  12085. break n;
  12086. }
  12087. }
  12088. e = n.b - t.b;
  12089. }
  12090. return e;
  12091. });
  12092. }
  12093. function nr(n, t) {
  12094. return tr(n, t, function (t, r) {
  12095. return Ru(n, r);
  12096. });
  12097. }
  12098. function tr(n, t, r) {
  12099. for (var e = -1, u = t.length, i = {}; ++e < u;) {
  12100. var o = t[e],
  12101. f = kt(n, o);
  12102. r(f, o) && lr(i, Sr(o, n), f);
  12103. }
  12104. return i;
  12105. }
  12106. function rr(n) {
  12107. return function (t) {
  12108. return kt(t, n);
  12109. };
  12110. }
  12111. function er(n, t, r, e) {
  12112. var u = e ? g : v,
  12113. i = -1,
  12114. o = t.length,
  12115. f = n;
  12116. for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o;) {
  12117. for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e));) {
  12118. f !== n && bi.call(f, a, 1), bi.call(n, a, 1);
  12119. }
  12120. }
  12121. return n;
  12122. }
  12123. function ur(n, t) {
  12124. for (var r = n ? t.length : 0, e = r - 1; r--;) {
  12125. var u = t[r];
  12126. if (r == e || u !== i) {
  12127. var i = u;
  12128. Se(u) ? bi.call(n, u, 1) : xr(n, u);
  12129. }
  12130. }
  12131. }
  12132. function ir(n, t) {
  12133. return n + Oi(Mi() * (t - n + 1));
  12134. }
  12135. function or(n, t) {
  12136. var r = "";
  12137. if (!n || 1 > t || 9007199254740991 < t) return r;
  12138. do {
  12139. t % 2 && (r += n), (t = Oi(t / 2)) && (n += n);
  12140. } while (t);
  12141. return r;
  12142. }
  12143. function fr(n, t) {
  12144. return bo(Be(n, t, Tu), n + "");
  12145. }
  12146. function cr(n) {
  12147. return Qn(Lu(n));
  12148. }
  12149. function ar(n, t) {
  12150. var r = Lu(n);
  12151. return Ce(r, pt(t, 0, r.length));
  12152. }
  12153. function lr(n, t, r, e) {
  12154. if (!gu(n)) return n;
  12155. t = Sr(t, n);
  12156. for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i;) {
  12157. var c = De(t[u]),
  12158. a = r;
  12159. if (u != o) {
  12160. var l = f[c],
  12161. a = e ? e(l, c, f) : T;
  12162. a === T && (a = gu(l) ? l : Se(t[u + 1]) ? [] : {});
  12163. }
  12164. ot(f, c, a), f = f[c];
  12165. }
  12166. return n;
  12167. }
  12168. function sr(n) {
  12169. return Ce(Lu(n));
  12170. }
  12171. function hr(n, t, r) {
  12172. var e = -1,
  12173. u = n.length;
  12174. 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;) {
  12175. r[e] = n[e + t];
  12176. }
  12177. return r;
  12178. }
  12179. function pr(n, t) {
  12180. var r;
  12181. return eo(n, function (n, e, u) {
  12182. return r = t(n, e, u), !r;
  12183. }), !!r;
  12184. }
  12185. function _r(n, t, r) {
  12186. var e = 0,
  12187. u = null == n ? e : n.length;
  12188. if (typeof t == "number" && t === t && 2147483647 >= u) {
  12189. for (; e < u;) {
  12190. var i = e + u >>> 1,
  12191. o = n[i];
  12192. null !== o && !ju(o) && (r ? o <= t : o < t) ? e = i + 1 : u = i;
  12193. }
  12194. return u;
  12195. }
  12196. return vr(n, t, Tu, r);
  12197. }
  12198. function vr(n, t, r, e) {
  12199. t = r(t);
  12200. for (var u = 0, i = null == n ? 0 : n.length, o = t !== t, f = null === t, c = ju(t), a = t === T; u < i;) {
  12201. var l = Oi((u + i) / 2),
  12202. s = r(n[l]),
  12203. h = s !== T,
  12204. p = null === s,
  12205. _ = s === s,
  12206. v = ju(s);
  12207. (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;
  12208. }
  12209. return Ui(i, 4294967294);
  12210. }
  12211. function gr(n, t) {
  12212. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  12213. var o = n[r],
  12214. f = t ? t(o) : o;
  12215. if (!r || !au(f, c)) {
  12216. var c = f;
  12217. i[u++] = 0 === o ? 0 : o;
  12218. }
  12219. }
  12220. return i;
  12221. }
  12222. function dr(n) {
  12223. return typeof n == "number" ? n : ju(n) ? F : +n;
  12224. }
  12225. function yr(n) {
  12226. if (typeof n == "string") return n;
  12227. if (of(n)) return c(n, yr) + "";
  12228. if (ju(n)) return to ? to.call(n) : "";
  12229. var t = n + "";
  12230. return "0" == t && 1 / n == -$ ? "-0" : t;
  12231. }
  12232. function br(n, t, r) {
  12233. var e = -1,
  12234. u = o,
  12235. i = n.length,
  12236. c = true,
  12237. a = [],
  12238. l = a;
  12239. if (r) c = false, u = f;else if (200 <= i) {
  12240. if (u = t ? null : lo(n)) return U(u);
  12241. c = false, u = O, l = new Nn();
  12242. } else l = t ? [] : a;
  12243. n: for (; ++e < i;) {
  12244. var s = n[e],
  12245. h = t ? t(s) : s,
  12246. s = r || 0 !== s ? s : 0;
  12247. if (c && h === h) {
  12248. for (var p = l.length; p--;) {
  12249. if (l[p] === h) continue n;
  12250. }
  12251. t && l.push(h), a.push(s);
  12252. } else u(l, h, r) || (l !== a && l.push(h), a.push(s));
  12253. }
  12254. return a;
  12255. }
  12256. function xr(n, t) {
  12257. return t = Sr(t, n), n = 2 > t.length ? n : kt(n, hr(t, 0, -1)), null == n || delete n[De(qe(t))];
  12258. }
  12259. function jr(n, t, r, e) {
  12260. for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n);) {
  12261. ;
  12262. }
  12263. return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i);
  12264. }
  12265. function wr(n, t) {
  12266. var r = n;
  12267. return r instanceof Un && (r = r.value()), l(t, function (n, t) {
  12268. return t.func.apply(t.thisArg, a([n], t.args));
  12269. }, r);
  12270. }
  12271. function mr(n, t, r) {
  12272. var e = n.length;
  12273. if (2 > e) return e ? br(n[0]) : [];
  12274. for (var u = -1, i = Vu(e); ++u < e;) {
  12275. for (var o = n[u], f = -1; ++f < e;) {
  12276. f != u && (i[u] = yt(i[u] || o, n[f], t, r));
  12277. }
  12278. }
  12279. return br(wt(i, 1), t, r);
  12280. }
  12281. function Ar(n, t, r) {
  12282. for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u;) {
  12283. r(o, n[e], e < i ? t[e] : T);
  12284. }
  12285. return o;
  12286. }
  12287. function Er(n) {
  12288. return su(n) ? n : [];
  12289. }
  12290. function kr(n) {
  12291. return typeof n == "function" ? n : Tu;
  12292. }
  12293. function Sr(n, t) {
  12294. return of(n) ? n : Ie(n, t) ? [n] : xo(Ou(n));
  12295. }
  12296. function Or(n, t, r) {
  12297. var e = n.length;
  12298. return r = r === T ? e : r, !t && r >= e ? n : hr(n, t, r);
  12299. }
  12300. function Ir(n, t) {
  12301. if (t) return n.slice();
  12302. var r = n.length,
  12303. r = vi ? vi(r) : new n.constructor(r);
  12304. return n.copy(r), r;
  12305. }
  12306. function Rr(n) {
  12307. var t = new n.constructor(n.byteLength);
  12308. return new _i(t).set(new _i(n)), t;
  12309. }
  12310. function zr(n, t) {
  12311. return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length);
  12312. }
  12313. function Wr(n, t) {
  12314. if (n !== t) {
  12315. var r = n !== T,
  12316. e = null === n,
  12317. u = n === n,
  12318. i = ju(n),
  12319. o = t !== T,
  12320. f = null === t,
  12321. c = t === t,
  12322. a = ju(t);
  12323. if (!f && !a && !i && n > t || i && o && c && !f && !a || e && o && c || !r && c || !u) return 1;
  12324. if (!e && !i && !a && n < t || a && r && u && !e && !i || f && r && u || !o && u || !c) return -1;
  12325. }
  12326. return 0;
  12327. }
  12328. function Br(n, t, r, e) {
  12329. var u = -1,
  12330. i = n.length,
  12331. o = r.length,
  12332. f = -1,
  12333. c = t.length,
  12334. a = Li(i - o, 0),
  12335. l = Vu(c + a);
  12336. for (e = !e; ++f < c;) {
  12337. l[f] = t[f];
  12338. }
  12339. for (; ++u < o;) {
  12340. (e || u < i) && (l[r[u]] = n[u]);
  12341. }
  12342. for (; a--;) {
  12343. l[f++] = n[u++];
  12344. }
  12345. return l;
  12346. }
  12347. function Lr(n, t, r, e) {
  12348. var u = -1,
  12349. i = n.length,
  12350. o = -1,
  12351. f = r.length,
  12352. c = -1,
  12353. a = t.length,
  12354. l = Li(i - f, 0),
  12355. s = Vu(l + a);
  12356. for (e = !e; ++u < l;) {
  12357. s[u] = n[u];
  12358. }
  12359. for (l = u; ++c < a;) {
  12360. s[l + c] = t[c];
  12361. }
  12362. for (; ++o < f;) {
  12363. (e || u < i) && (s[l + r[o]] = n[u++]);
  12364. }
  12365. return s;
  12366. }
  12367. function Ur(n, t) {
  12368. var r = -1,
  12369. e = n.length;
  12370. for (t || (t = Vu(e)); ++r < e;) {
  12371. t[r] = n[r];
  12372. }
  12373. return t;
  12374. }
  12375. function Cr(n, t, r, e) {
  12376. var u = !r;
  12377. r || (r = {});
  12378. for (var i = -1, o = t.length; ++i < o;) {
  12379. var f = t[i],
  12380. c = e ? e(r[f], n[f], f, r, n) : T;
  12381. c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c);
  12382. }
  12383. return r;
  12384. }
  12385. function Dr(n, t) {
  12386. return Cr(n, ho(n), t);
  12387. }
  12388. function Mr(n, t) {
  12389. return Cr(n, po(n), t);
  12390. }
  12391. function Tr(n, r) {
  12392. return function (e, u) {
  12393. var i = of(e) ? t : ct,
  12394. o = r ? r() : {};
  12395. return i(e, n, ye(u, 2), o);
  12396. };
  12397. }
  12398. function $r(n) {
  12399. return fr(function (t, r) {
  12400. var e = -1,
  12401. u = r.length,
  12402. i = 1 < u ? r[u - 1] : T,
  12403. o = 2 < u ? r[2] : T,
  12404. i = 3 < n.length && typeof i == "function" ? (u--, i) : T;
  12405. for (o && Oe(r[0], r[1], o) && (i = 3 > u ? T : i, u = 1), t = Yu(t); ++e < u;) {
  12406. (o = r[e]) && n(t, o, e, i);
  12407. }
  12408. return t;
  12409. });
  12410. }
  12411. function Fr(n, t) {
  12412. return function (r, e) {
  12413. if (null == r) return r;
  12414. if (!lu(r)) return n(r, e);
  12415. for (var u = r.length, i = t ? u : -1, o = Yu(r); (t ? i-- : ++i < u) && false !== e(o[i], i, o);) {
  12416. ;
  12417. }
  12418. return r;
  12419. };
  12420. }
  12421. function Nr(n) {
  12422. return function (t, r, e) {
  12423. var u = -1,
  12424. i = Yu(t);
  12425. e = e(t);
  12426. for (var o = e.length; o--;) {
  12427. var f = e[n ? o : ++u];
  12428. if (false === r(i[f], f, i)) break;
  12429. }
  12430. return t;
  12431. };
  12432. }
  12433. function Pr(n, t, r) {
  12434. function e() {
  12435. return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments);
  12436. }
  12437. var u = 1 & t,
  12438. i = Vr(n);
  12439. return e;
  12440. }
  12441. function Zr(n) {
  12442. return function (t) {
  12443. t = Ou(t);
  12444. var r = Rn.test(t) ? M(t) : T,
  12445. e = r ? r[0] : t.charAt(0);
  12446. return t = r ? Or(r, 1).join("") : t.slice(1), e[n]() + t;
  12447. };
  12448. }
  12449. function qr(n) {
  12450. return function (t) {
  12451. return l(Du(Cu(t).replace(kn, "")), n, "");
  12452. };
  12453. }
  12454. function Vr(n) {
  12455. return function () {
  12456. var t = arguments;
  12457. switch (t.length) {
  12458. case 0:
  12459. return new n();
  12460. case 1:
  12461. return new n(t[0]);
  12462. case 2:
  12463. return new n(t[0], t[1]);
  12464. case 3:
  12465. return new n(t[0], t[1], t[2]);
  12466. case 4:
  12467. return new n(t[0], t[1], t[2], t[3]);
  12468. case 5:
  12469. return new n(t[0], t[1], t[2], t[3], t[4]);
  12470. case 6:
  12471. return new n(t[0], t[1], t[2], t[3], t[4], t[5]);
  12472. case 7:
  12473. return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]);
  12474. }
  12475. var r = ro(n.prototype),
  12476. t = n.apply(r, t);
  12477. return gu(t) ? t : r;
  12478. };
  12479. }
  12480. function Kr(t, r, e) {
  12481. function u() {
  12482. for (var o = arguments.length, f = Vu(o), c = o, a = de(u); c--;) {
  12483. f[c] = arguments[c];
  12484. }
  12485. 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);
  12486. }
  12487. var i = Vr(t);
  12488. return u;
  12489. }
  12490. function Gr(n) {
  12491. return function (t, r, e) {
  12492. var u = Yu(t);
  12493. if (!lu(t)) {
  12494. var i = ye(r, 3);
  12495. t = zu(t), r = function r(n) {
  12496. return i(u[n], n, u);
  12497. };
  12498. }
  12499. return r = n(t, r, e), -1 < r ? u[i ? t[r] : r] : T;
  12500. };
  12501. }
  12502. function Hr(n) {
  12503. return pe(function (t) {
  12504. var r = t.length,
  12505. e = r,
  12506. u = On.prototype.thru;
  12507. for (n && t.reverse(); e--;) {
  12508. var i = t[e];
  12509. if (typeof i != "function") throw new ni("Expected a function");
  12510. if (u && !o && "wrapper" == ge(i)) var o = new On([], true);
  12511. }
  12512. for (e = o ? e : r; ++e < r;) {
  12513. var i = t[e],
  12514. u = ge(i),
  12515. f = "wrapper" == u ? so(i) : T,
  12516. 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);
  12517. }
  12518. return function () {
  12519. var n = arguments,
  12520. e = n[0];
  12521. if (o && 1 == n.length && of(e)) return o.plant(e).value();
  12522. for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r;) {
  12523. n = t[u].call(this, n);
  12524. }
  12525. return n;
  12526. };
  12527. });
  12528. }
  12529. function Jr(n, t, r, e, u, i, o, f, c, a) {
  12530. function l() {
  12531. for (var d = arguments.length, y = Vu(d), b = d; b--;) {
  12532. y[b] = arguments[b];
  12533. }
  12534. if (_) {
  12535. var x,
  12536. j = de(l),
  12537. b = y.length;
  12538. for (x = 0; b--;) {
  12539. y[b] === j && ++x;
  12540. }
  12541. }
  12542. 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);
  12543. if (j = h ? r : this, b = p ? j[n] : n, d = y.length, f) {
  12544. x = y.length;
  12545. for (var w = Ui(f.length, x), m = Ur(y); w--;) {
  12546. var A = f[w];
  12547. y[w] = Se(A, x) ? m[A] : T;
  12548. }
  12549. } else v && 1 < d && y.reverse();
  12550. return s && c < d && (y.length = c), this && this !== $n && this instanceof l && (b = g || Vr(b)), b.apply(j, y);
  12551. }
  12552. var s = 128 & t,
  12553. h = 1 & t,
  12554. p = 2 & t,
  12555. _ = 24 & t,
  12556. v = 512 & t,
  12557. g = p ? T : Vr(n);
  12558. return l;
  12559. }
  12560. function Yr(n, t) {
  12561. return function (r, e) {
  12562. return Bt(r, n, t(e));
  12563. };
  12564. }
  12565. function Qr(n, t) {
  12566. return function (r, e) {
  12567. var u;
  12568. if (r === T && e === T) return t;
  12569. if (r !== T && (u = r), e !== T) {
  12570. if (u === T) return e;
  12571. typeof r == "string" || typeof e == "string" ? (r = yr(r), e = yr(e)) : (r = dr(r), e = dr(e)), u = n(r, e);
  12572. }
  12573. return u;
  12574. };
  12575. }
  12576. function Xr(t) {
  12577. return pe(function (r) {
  12578. return r = c(r, k(ye())), fr(function (e) {
  12579. var u = this;
  12580. return t(r, function (t) {
  12581. return n(t, u, e);
  12582. });
  12583. });
  12584. });
  12585. }
  12586. function ne(n, t) {
  12587. t = t === T ? " " : yr(t);
  12588. var r = t.length;
  12589. 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));
  12590. }
  12591. function te(t, r, e, u) {
  12592. function i() {
  12593. 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;) {
  12594. s[a] = u[a];
  12595. }
  12596. for (; c--;) {
  12597. s[a++] = arguments[++r];
  12598. }
  12599. return n(h, o ? e : this, s);
  12600. }
  12601. var o = 1 & r,
  12602. f = Vr(t);
  12603. return i;
  12604. }
  12605. function re(n) {
  12606. return function (t, r, e) {
  12607. 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);
  12608. var u = -1;
  12609. r = Li(Si((r - t) / (e || 1)), 0);
  12610. for (var i = Vu(r); r--;) {
  12611. i[n ? r : ++u] = t, t += e;
  12612. }
  12613. return i;
  12614. };
  12615. }
  12616. function ee(n) {
  12617. return function (t, r) {
  12618. return typeof t == "string" && typeof r == "string" || (t = ku(t), r = ku(r)), n(t, r);
  12619. };
  12620. }
  12621. function ue(n, t, r, e, u, i, o, f, c, a) {
  12622. var l = 8 & t,
  12623. s = l ? o : T;
  12624. o = l ? T : o;
  12625. var h = l ? i : T;
  12626. 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);
  12627. }
  12628. function ie(n) {
  12629. var t = Ju[n];
  12630. return function (n, r) {
  12631. if (n = ku(n), r = null == r ? 0 : Ui(Au(r), 292)) {
  12632. var e = (Ou(n) + "e").split("e"),
  12633. e = t(e[0] + "e" + (+e[1] + r)),
  12634. e = (Ou(e) + "e").split("e");
  12635. return +(e[0] + "e" + (+e[1] - r));
  12636. }
  12637. return t(n);
  12638. };
  12639. }
  12640. function oe(n) {
  12641. return function (t) {
  12642. var r = _o(t);
  12643. return "[object Map]" == r ? W(t) : "[object Set]" == r ? C(t) : E(t, n(t));
  12644. };
  12645. }
  12646. function fe(n, t, r, e, u, i, o, f) {
  12647. var c = 2 & t;
  12648. if (!c && typeof n != "function") throw new ni("Expected a function");
  12649. var a = e ? e.length : 0;
  12650. 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) {
  12651. var l = e,
  12652. s = u;
  12653. e = u = T;
  12654. }
  12655. var h = c ? T : so(n);
  12656. 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);
  12657. }
  12658. function ce(n, t, r, e) {
  12659. return n === T || au(n, ri[r]) && !ii.call(e, r) ? t : n;
  12660. }
  12661. function ae(n, t, r, e, u, i) {
  12662. return gu(n) && gu(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n;
  12663. }
  12664. function le(n) {
  12665. return bu(n) ? T : n;
  12666. }
  12667. function se(n, t, r, e, u, i) {
  12668. var o = 1 & r,
  12669. f = n.length,
  12670. c = t.length;
  12671. if (f != c && !(o && c > f)) return false;
  12672. if ((c = i.get(n)) && i.get(t)) return c == t;
  12673. var c = -1,
  12674. a = true,
  12675. l = 2 & r ? new Nn() : T;
  12676. for (i.set(n, t), i.set(t, n); ++c < f;) {
  12677. var s = n[c],
  12678. p = t[c];
  12679. if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i);
  12680. if (_ !== T) {
  12681. if (_) continue;
  12682. a = false;
  12683. break;
  12684. }
  12685. if (l) {
  12686. if (!h(t, function (n, t) {
  12687. if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t);
  12688. })) {
  12689. a = false;
  12690. break;
  12691. }
  12692. } else if (s !== p && !u(s, p, r, e, i)) {
  12693. a = false;
  12694. break;
  12695. }
  12696. }
  12697. return i.delete(n), i.delete(t), a;
  12698. }
  12699. function he(n, t, r, e, u, i, o) {
  12700. switch (r) {
  12701. case "[object DataView]":
  12702. if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break;
  12703. n = n.buffer, t = t.buffer;
  12704. case "[object ArrayBuffer]":
  12705. if (n.byteLength != t.byteLength || !i(new _i(n), new _i(t))) break;
  12706. return true;
  12707. case "[object Boolean]":
  12708. case "[object Date]":
  12709. case "[object Number]":
  12710. return au(+n, +t);
  12711. case "[object Error]":
  12712. return n.name == t.name && n.message == t.message;
  12713. case "[object RegExp]":
  12714. case "[object String]":
  12715. return n == t + "";
  12716. case "[object Map]":
  12717. var f = W;
  12718. case "[object Set]":
  12719. if (f || (f = U), n.size != t.size && !(1 & e)) break;
  12720. 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);
  12721. case "[object Symbol]":
  12722. if (no) return no.call(n) == no.call(t);
  12723. }
  12724. return false;
  12725. }
  12726. function pe(n) {
  12727. return bo(Be(n, T, Pe), n + "");
  12728. }
  12729. function _e(n) {
  12730. return St(n, zu, ho);
  12731. }
  12732. function ve(n) {
  12733. return St(n, Wu, po);
  12734. }
  12735. function ge(n) {
  12736. for (var t = n.name + "", r = Ki[t], e = ii.call(Ki, t) ? r.length : 0; e--;) {
  12737. var u = r[e],
  12738. i = u.func;
  12739. if (null == i || i == n) return u.name;
  12740. }
  12741. return t;
  12742. }
  12743. function de(n) {
  12744. return (ii.call(An, "placeholder") ? An : n).placeholder;
  12745. }
  12746. function ye() {
  12747. var n = An.iteratee || $u,
  12748. n = n === $u ? qt : n;
  12749. return arguments.length ? n(arguments[0], arguments[1]) : n;
  12750. }
  12751. function be(n, t) {
  12752. var r = n.__data__,
  12753. e = _typeof(t);
  12754. return ("string" == e || "number" == e || "symbol" == e || "boolean" == e ? "__proto__" !== t : null === t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
  12755. }
  12756. function xe(n) {
  12757. for (var t = zu(n), r = t.length; r--;) {
  12758. var e = t[r],
  12759. u = n[e];
  12760. t[r] = [e, u, u === u && !gu(u)];
  12761. }
  12762. return t;
  12763. }
  12764. function je(n, t) {
  12765. var r = null == n ? T : n[t];
  12766. return Ft(r) ? r : T;
  12767. }
  12768. function we(n, t, r) {
  12769. t = Sr(t, n);
  12770. for (var e = -1, u = t.length, i = false; ++e < u;) {
  12771. var o = De(t[e]);
  12772. if (!(i = null != n && r(n, o))) break;
  12773. n = n[o];
  12774. }
  12775. return i || ++e != u ? i : (u = null == n ? 0 : n.length, !!u && vu(u) && Se(o, u) && (of(n) || uf(n)));
  12776. }
  12777. function me(n) {
  12778. var t = n.length,
  12779. r = new n.constructor(t);
  12780. return t && "string" == typeof n[0] && ii.call(n, "index") && (r.index = n.index, r.input = n.input), r;
  12781. }
  12782. function Ae(n) {
  12783. return typeof n.constructor != "function" || ze(n) ? {} : ro(gi(n));
  12784. }
  12785. function Ee(n, t, r) {
  12786. var e = n.constructor;
  12787. switch (t) {
  12788. case "[object ArrayBuffer]":
  12789. return Rr(n);
  12790. case "[object Boolean]":
  12791. case "[object Date]":
  12792. return new e(+n);
  12793. case "[object DataView]":
  12794. return t = r ? Rr(n.buffer) : n.buffer, new n.constructor(t, n.byteOffset, n.byteLength);
  12795. case "[object Float32Array]":
  12796. case "[object Float64Array]":
  12797. case "[object Int8Array]":
  12798. case "[object Int16Array]":
  12799. case "[object Int32Array]":
  12800. case "[object Uint8Array]":
  12801. case "[object Uint8ClampedArray]":
  12802. case "[object Uint16Array]":
  12803. case "[object Uint32Array]":
  12804. return zr(n, r);
  12805. case "[object Map]":
  12806. return new e();
  12807. case "[object Number]":
  12808. case "[object String]":
  12809. return new e(n);
  12810. case "[object RegExp]":
  12811. return t = new n.constructor(n.source, _n.exec(n)), t.lastIndex = n.lastIndex, t;
  12812. case "[object Set]":
  12813. return new e();
  12814. case "[object Symbol]":
  12815. return no ? Yu(no.call(n)) : {};
  12816. }
  12817. }
  12818. function ke(n) {
  12819. return of(n) || uf(n) || !!(xi && n && n[xi]);
  12820. }
  12821. function Se(n, t) {
  12822. var r = _typeof(n);
  12823. return t = null == t ? 9007199254740991 : t, !!t && ("number" == r || "symbol" != r && bn.test(n)) && -1 < n && 0 == n % 1 && n < t;
  12824. }
  12825. function Oe(n, t, r) {
  12826. if (!gu(r)) return false;
  12827. var e = _typeof(t);
  12828. return !!("number" == e ? lu(r) && Se(t, r.length) : "string" == e && t in r) && au(r[t], n);
  12829. }
  12830. function Ie(n, t) {
  12831. if (of(n)) return false;
  12832. var r = _typeof(n);
  12833. return !("number" != r && "symbol" != r && "boolean" != r && null != n && !ju(n)) || nn.test(n) || !X.test(n) || null != t && n in Yu(t);
  12834. }
  12835. function Re(n) {
  12836. var t = ge(n),
  12837. r = An[t];
  12838. return typeof r == "function" && t in Un.prototype && (n === r || (t = so(r), !!t && n === t[0]));
  12839. }
  12840. function ze(n) {
  12841. var t = n && n.constructor;
  12842. return n === (typeof t == "function" && t.prototype || ri);
  12843. }
  12844. function We(n, t) {
  12845. return function (r) {
  12846. return null != r && r[n] === t && (t !== T || n in Yu(r));
  12847. };
  12848. }
  12849. function Be(t, r, e) {
  12850. return r = Li(r === T ? t.length - 1 : r, 0), function () {
  12851. for (var u = arguments, i = -1, o = Li(u.length - r, 0), f = Vu(o); ++i < o;) {
  12852. f[i] = u[r + i];
  12853. }
  12854. for (i = -1, o = Vu(r + 1); ++i < r;) {
  12855. o[i] = u[i];
  12856. }
  12857. return o[r] = e(f), n(t, this, o);
  12858. };
  12859. }
  12860. function Le(n, t, r) {
  12861. var e = t + "";
  12862. t = bo;
  12863. var u,
  12864. i = Te;
  12865. 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);
  12866. }
  12867. function Ue(n) {
  12868. var t = 0,
  12869. r = 0;
  12870. return function () {
  12871. var e = Ci(),
  12872. u = 16 - (e - r);
  12873. if (r = e, 0 < u) {
  12874. if (800 <= ++t) return arguments[0];
  12875. } else t = 0;
  12876. return n.apply(T, arguments);
  12877. };
  12878. }
  12879. function Ce(n, t) {
  12880. var r = -1,
  12881. e = n.length,
  12882. u = e - 1;
  12883. for (t = t === T ? e : t; ++r < t;) {
  12884. var e = ir(r, u),
  12885. i = n[e];
  12886. n[e] = n[r], n[r] = i;
  12887. }
  12888. return n.length = t, n;
  12889. }
  12890. function De(n) {
  12891. if (typeof n == "string" || ju(n)) return n;
  12892. var t = n + "";
  12893. return "0" == t && 1 / n == -$ ? "-0" : t;
  12894. }
  12895. function Me(n) {
  12896. if (null != n) {
  12897. try {
  12898. return ui.call(n);
  12899. } catch (n) {}
  12900. return n + "";
  12901. }
  12902. return "";
  12903. }
  12904. function Te(n, t) {
  12905. return r(N, function (r) {
  12906. var e = "_." + r[0];
  12907. t & r[1] && !o(n, e) && n.push(e);
  12908. }), n.sort();
  12909. }
  12910. function $e(n) {
  12911. if (n instanceof Un) return n.clone();
  12912. var t = new On(n.__wrapped__, n.__chain__);
  12913. return t.__actions__ = Ur(n.__actions__), t.__index__ = n.__index__, t.__values__ = n.__values__, t;
  12914. }
  12915. function Fe(n, t, r) {
  12916. var e = null == n ? 0 : n.length;
  12917. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), _(n, ye(t, 3), r)) : -1;
  12918. }
  12919. function Ne(n, t, r) {
  12920. var e = null == n ? 0 : n.length;
  12921. if (!e) return -1;
  12922. var u = e - 1;
  12923. return r !== T && (u = Au(r), u = 0 > r ? Li(e + u, 0) : Ui(u, e - 1)), _(n, ye(t, 3), u, true);
  12924. }
  12925. function Pe(n) {
  12926. return (null == n ? 0 : n.length) ? wt(n, 1) : [];
  12927. }
  12928. function Ze(n) {
  12929. return n && n.length ? n[0] : T;
  12930. }
  12931. function qe(n) {
  12932. var t = null == n ? 0 : n.length;
  12933. return t ? n[t - 1] : T;
  12934. }
  12935. function Ve(n, t) {
  12936. return n && n.length && t && t.length ? er(n, t) : n;
  12937. }
  12938. function Ke(n) {
  12939. return null == n ? n : Ti.call(n);
  12940. }
  12941. function Ge(n) {
  12942. if (!n || !n.length) return [];
  12943. var t = 0;
  12944. return n = i(n, function (n) {
  12945. if (su(n)) return t = Li(n.length, t), true;
  12946. }), A(t, function (t) {
  12947. return c(n, b(t));
  12948. });
  12949. }
  12950. function He(t, r) {
  12951. if (!t || !t.length) return [];
  12952. var e = Ge(t);
  12953. return null == r ? e : c(e, function (t) {
  12954. return n(r, T, t);
  12955. });
  12956. }
  12957. function Je(n) {
  12958. return n = An(n), n.__chain__ = true, n;
  12959. }
  12960. function Ye(n, t) {
  12961. return t(n);
  12962. }
  12963. function Qe() {
  12964. return this;
  12965. }
  12966. function Xe(n, t) {
  12967. return (of(n) ? r : eo)(n, ye(t, 3));
  12968. }
  12969. function nu(n, t) {
  12970. return (of(n) ? e : uo)(n, ye(t, 3));
  12971. }
  12972. function tu(n, t) {
  12973. return (of(n) ? c : Gt)(n, ye(t, 3));
  12974. }
  12975. function ru(n, t, r) {
  12976. return t = r ? T : t, t = n && null == t ? n.length : t, fe(n, 128, T, T, T, T, t);
  12977. }
  12978. function eu(n, t) {
  12979. var r;
  12980. if (typeof t != "function") throw new ni("Expected a function");
  12981. return n = Au(n), function () {
  12982. return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r;
  12983. };
  12984. }
  12985. function uu(n, t, r) {
  12986. return t = r ? T : t, n = fe(n, 8, T, T, T, T, T, t), n.placeholder = uu.placeholder, n;
  12987. }
  12988. function iu(n, t, r) {
  12989. return t = r ? T : t, n = fe(n, 16, T, T, T, T, T, t), n.placeholder = iu.placeholder, n;
  12990. }
  12991. function ou(n, t, r) {
  12992. function e(t) {
  12993. var r = c,
  12994. e = a;
  12995. return c = a = T, _ = t, s = n.apply(e, r);
  12996. }
  12997. function u(n) {
  12998. var r = n - p;
  12999. return n -= _, p === T || r >= t || 0 > r || g && n >= l;
  13000. }
  13001. function i() {
  13002. var n = Ko();
  13003. if (u(n)) return o(n);
  13004. var r,
  13005. e = yo;
  13006. r = n - _, n = t - (n - p), r = g ? Ui(n, l - r) : n, h = e(i, r);
  13007. }
  13008. function o(n) {
  13009. return h = T, d && c ? e(n) : (c = a = T, s);
  13010. }
  13011. function f() {
  13012. var n = Ko(),
  13013. r = u(n);
  13014. if (c = arguments, a = this, p = n, r) {
  13015. if (h === T) return _ = n = p, h = yo(i, t), v ? e(n) : s;
  13016. if (g) return h = yo(i, t), e(p);
  13017. }
  13018. return h === T && (h = yo(i, t)), s;
  13019. }
  13020. var c,
  13021. a,
  13022. l,
  13023. s,
  13024. h,
  13025. p,
  13026. _ = 0,
  13027. v = false,
  13028. g = false,
  13029. d = true;
  13030. if (typeof n != "function") throw new ni("Expected a function");
  13031. 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 () {
  13032. h !== T && ao(h), _ = 0, c = p = a = h = T;
  13033. }, f.flush = function () {
  13034. return h === T ? s : o(Ko());
  13035. }, f;
  13036. }
  13037. function fu(n, t) {
  13038. function r() {
  13039. var e = arguments,
  13040. u = t ? t.apply(this, e) : e[0],
  13041. i = r.cache;
  13042. return i.has(u) ? i.get(u) : (e = n.apply(this, e), r.cache = i.set(u, e) || i, e);
  13043. }
  13044. if (typeof n != "function" || null != t && typeof t != "function") throw new ni("Expected a function");
  13045. return r.cache = new (fu.Cache || Fn)(), r;
  13046. }
  13047. function cu(n) {
  13048. if (typeof n != "function") throw new ni("Expected a function");
  13049. return function () {
  13050. var t = arguments;
  13051. switch (t.length) {
  13052. case 0:
  13053. return !n.call(this);
  13054. case 1:
  13055. return !n.call(this, t[0]);
  13056. case 2:
  13057. return !n.call(this, t[0], t[1]);
  13058. case 3:
  13059. return !n.call(this, t[0], t[1], t[2]);
  13060. }
  13061. return !n.apply(this, t);
  13062. };
  13063. }
  13064. function au(n, t) {
  13065. return n === t || n !== n && t !== t;
  13066. }
  13067. function lu(n) {
  13068. return null != n && vu(n.length) && !pu(n);
  13069. }
  13070. function su(n) {
  13071. return du(n) && lu(n);
  13072. }
  13073. function hu(n) {
  13074. if (!du(n)) return false;
  13075. var t = Ot(n);
  13076. return "[object Error]" == t || "[object DOMException]" == t || typeof n.message == "string" && typeof n.name == "string" && !bu(n);
  13077. }
  13078. function pu(n) {
  13079. return !!gu(n) && (n = Ot(n), "[object Function]" == n || "[object GeneratorFunction]" == n || "[object AsyncFunction]" == n || "[object Proxy]" == n);
  13080. }
  13081. function _u(n) {
  13082. return typeof n == "number" && n == Au(n);
  13083. }
  13084. function vu(n) {
  13085. return typeof n == "number" && -1 < n && 0 == n % 1 && 9007199254740991 >= n;
  13086. }
  13087. function gu(n) {
  13088. var t = _typeof(n);
  13089. return null != n && ("object" == t || "function" == t);
  13090. }
  13091. function du(n) {
  13092. return null != n && _typeof(n) == "object";
  13093. }
  13094. function yu(n) {
  13095. return typeof n == "number" || du(n) && "[object Number]" == Ot(n);
  13096. }
  13097. function bu(n) {
  13098. 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));
  13099. }
  13100. function xu(n) {
  13101. return typeof n == "string" || !of(n) && du(n) && "[object String]" == Ot(n);
  13102. }
  13103. function ju(n) {
  13104. return _typeof(n) == "symbol" || du(n) && "[object Symbol]" == Ot(n);
  13105. }
  13106. function wu(n) {
  13107. if (!n) return [];
  13108. if (lu(n)) return xu(n) ? M(n) : Ur(n);
  13109. if (ji && n[ji]) {
  13110. n = n[ji]();
  13111. for (var t, r = []; !(t = n.next()).done;) {
  13112. r.push(t.value);
  13113. }
  13114. return r;
  13115. }
  13116. return t = _o(n), ("[object Map]" == t ? W : "[object Set]" == t ? U : Lu)(n);
  13117. }
  13118. function mu(n) {
  13119. return n ? (n = ku(n), n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) : 0 === n ? n : 0;
  13120. }
  13121. function Au(n) {
  13122. n = mu(n);
  13123. var t = n % 1;
  13124. return n === n ? t ? n - t : n : 0;
  13125. }
  13126. function Eu(n) {
  13127. return n ? pt(Au(n), 0, 4294967295) : 0;
  13128. }
  13129. function ku(n) {
  13130. if (typeof n == "number") return n;
  13131. if (ju(n)) return F;
  13132. if (gu(n) && (n = typeof n.valueOf == "function" ? n.valueOf() : n, n = gu(n) ? n + "" : n), typeof n != "string") return 0 === n ? n : +n;
  13133. n = n.replace(un, "");
  13134. var t = gn.test(n);
  13135. return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n;
  13136. }
  13137. function Su(n) {
  13138. return Cr(n, Wu(n));
  13139. }
  13140. function Ou(n) {
  13141. return null == n ? "" : yr(n);
  13142. }
  13143. function Iu(n, t, r) {
  13144. return n = null == n ? T : kt(n, t), n === T ? r : n;
  13145. }
  13146. function Ru(n, t) {
  13147. return null != n && we(n, t, zt);
  13148. }
  13149. function zu(n) {
  13150. return lu(n) ? qn(n) : Vt(n);
  13151. }
  13152. function Wu(n) {
  13153. if (lu(n)) n = qn(n, true);else if (gu(n)) {
  13154. var t,
  13155. r = ze(n),
  13156. e = [];
  13157. for (t in n) {
  13158. ("constructor" != t || !r && ii.call(n, t)) && e.push(t);
  13159. }
  13160. n = e;
  13161. } else {
  13162. if (t = [], null != n) for (r in Yu(n)) {
  13163. t.push(r);
  13164. }
  13165. n = t;
  13166. }
  13167. return n;
  13168. }
  13169. function Bu(n, t) {
  13170. if (null == n) return {};
  13171. var r = c(ve(n), function (n) {
  13172. return [n];
  13173. });
  13174. return t = ye(t), tr(n, r, function (n, r) {
  13175. return t(n, r[0]);
  13176. });
  13177. }
  13178. function Lu(n) {
  13179. return null == n ? [] : S(n, zu(n));
  13180. }
  13181. function Uu(n) {
  13182. return Tf(Ou(n).toLowerCase());
  13183. }
  13184. function Cu(n) {
  13185. return (n = Ou(n)) && n.replace(xn, Xn).replace(Sn, "");
  13186. }
  13187. function Du(n, t, r) {
  13188. return n = Ou(n), t = r ? T : t, t === T ? zn.test(n) ? n.match(In) || [] : n.match(sn) || [] : n.match(t) || [];
  13189. }
  13190. function Mu(n) {
  13191. return function () {
  13192. return n;
  13193. };
  13194. }
  13195. function Tu(n) {
  13196. return n;
  13197. }
  13198. function $u(n) {
  13199. return qt(typeof n == "function" ? n : _t(n, 1));
  13200. }
  13201. function Fu(n, t, e) {
  13202. var u = zu(t),
  13203. i = Et(t, u);
  13204. null != e || gu(t) && (i.length || !u.length) || (e = t, t = n, n = this, i = Et(t, zu(t)));
  13205. var o = !(gu(e) && "chain" in e && !e.chain),
  13206. f = pu(n);
  13207. return r(i, function (r) {
  13208. var e = t[r];
  13209. n[r] = e, f && (n.prototype[r] = function () {
  13210. var t = this.__chain__;
  13211. if (o || t) {
  13212. var r = n(this.__wrapped__);
  13213. return (r.__actions__ = Ur(this.__actions__)).push({
  13214. func: e,
  13215. args: arguments,
  13216. thisArg: n
  13217. }), r.__chain__ = t, r;
  13218. }
  13219. return e.apply(n, a([this.value()], arguments));
  13220. });
  13221. }), n;
  13222. }
  13223. function Nu() {}
  13224. function Pu(n) {
  13225. return Ie(n) ? b(De(n)) : rr(n);
  13226. }
  13227. function Zu() {
  13228. return [];
  13229. }
  13230. function qu() {
  13231. return false;
  13232. }
  13233. mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn));
  13234. var Vu = mn.Array,
  13235. Ku = mn.Date,
  13236. Gu = mn.Error,
  13237. Hu = mn.Function,
  13238. Ju = mn.Math,
  13239. Yu = mn.Object,
  13240. Qu = mn.RegExp,
  13241. Xu = mn.String,
  13242. ni = mn.TypeError,
  13243. ti = Vu.prototype,
  13244. ri = Yu.prototype,
  13245. ei = mn["__core-js_shared__"],
  13246. ui = Hu.prototype.toString,
  13247. ii = ri.hasOwnProperty,
  13248. oi = 0,
  13249. fi = function () {
  13250. var n = /[^.]+$/.exec(ei && ei.keys && ei.keys.IE_PROTO || "");
  13251. return n ? "Symbol(src)_1." + n : "";
  13252. }(),
  13253. ci = ri.toString,
  13254. ai = ui.call(Yu),
  13255. li = $n._,
  13256. si = Qu("^" + ui.call(ii).replace(rn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"),
  13257. hi = Pn ? mn.Buffer : T,
  13258. pi = mn.Symbol,
  13259. _i = mn.Uint8Array,
  13260. vi = hi ? hi.g : T,
  13261. gi = B(Yu.getPrototypeOf, Yu),
  13262. di = Yu.create,
  13263. yi = ri.propertyIsEnumerable,
  13264. bi = ti.splice,
  13265. xi = pi ? pi.isConcatSpreadable : T,
  13266. ji = pi ? pi.iterator : T,
  13267. wi = pi ? pi.toStringTag : T,
  13268. mi = function () {
  13269. try {
  13270. var n = je(Yu, "defineProperty");
  13271. return n({}, "", {}), n;
  13272. } catch (n) {}
  13273. }(),
  13274. Ai = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout,
  13275. Ei = Ku && Ku.now !== $n.Date.now && Ku.now,
  13276. ki = mn.setTimeout !== $n.setTimeout && mn.setTimeout,
  13277. Si = Ju.ceil,
  13278. Oi = Ju.floor,
  13279. Ii = Yu.getOwnPropertySymbols,
  13280. Ri = hi ? hi.isBuffer : T,
  13281. zi = mn.isFinite,
  13282. Wi = ti.join,
  13283. Bi = B(Yu.keys, Yu),
  13284. Li = Ju.max,
  13285. Ui = Ju.min,
  13286. Ci = Ku.now,
  13287. Di = mn.parseInt,
  13288. Mi = Ju.random,
  13289. Ti = ti.reverse,
  13290. $i = je(mn, "DataView"),
  13291. Fi = je(mn, "Map"),
  13292. Ni = je(mn, "Promise"),
  13293. Pi = je(mn, "Set"),
  13294. Zi = je(mn, "WeakMap"),
  13295. qi = je(Yu, "create"),
  13296. Vi = Zi && new Zi(),
  13297. Ki = {},
  13298. Gi = Me($i),
  13299. Hi = Me(Fi),
  13300. Ji = Me(Ni),
  13301. Yi = Me(Pi),
  13302. Qi = Me(Zi),
  13303. Xi = pi ? pi.prototype : T,
  13304. no = Xi ? Xi.valueOf : T,
  13305. to = Xi ? Xi.toString : T,
  13306. ro = function () {
  13307. function n() {}
  13308. return function (t) {
  13309. return gu(t) ? di ? di(t) : (n.prototype = t, t = new n(), n.prototype = T, t) : {};
  13310. };
  13311. }();
  13312. An.templateSettings = {
  13313. escape: J,
  13314. evaluate: Y,
  13315. interpolate: Q,
  13316. variable: "",
  13317. imports: {
  13318. _: An
  13319. }
  13320. }, 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 () {
  13321. this.__data__ = qi ? qi(null) : {}, this.size = 0;
  13322. }, Mn.prototype.delete = function (n) {
  13323. return n = this.has(n) && delete this.__data__[n], this.size -= n ? 1 : 0, n;
  13324. }, Mn.prototype.get = function (n) {
  13325. var t = this.__data__;
  13326. return qi ? (n = t[n], "__lodash_hash_undefined__" === n ? T : n) : ii.call(t, n) ? t[n] : T;
  13327. }, Mn.prototype.has = function (n) {
  13328. var t = this.__data__;
  13329. return qi ? t[n] !== T : ii.call(t, n);
  13330. }, Mn.prototype.set = function (n, t) {
  13331. var r = this.__data__;
  13332. return this.size += this.has(n) ? 0 : 1, r[n] = qi && t === T ? "__lodash_hash_undefined__" : t, this;
  13333. }, Tn.prototype.clear = function () {
  13334. this.__data__ = [], this.size = 0;
  13335. }, Tn.prototype.delete = function (n) {
  13336. var t = this.__data__;
  13337. return n = ft(t, n), !(0 > n) && (n == t.length - 1 ? t.pop() : bi.call(t, n, 1), --this.size, true);
  13338. }, Tn.prototype.get = function (n) {
  13339. var t = this.__data__;
  13340. return n = ft(t, n), 0 > n ? T : t[n][1];
  13341. }, Tn.prototype.has = function (n) {
  13342. return -1 < ft(this.__data__, n);
  13343. }, Tn.prototype.set = function (n, t) {
  13344. var r = this.__data__,
  13345. e = ft(r, n);
  13346. return 0 > e ? (++this.size, r.push([n, t])) : r[e][1] = t, this;
  13347. }, Fn.prototype.clear = function () {
  13348. this.size = 0, this.__data__ = {
  13349. hash: new Mn(),
  13350. map: new (Fi || Tn)(),
  13351. string: new Mn()
  13352. };
  13353. }, Fn.prototype.delete = function (n) {
  13354. return n = be(this, n).delete(n), this.size -= n ? 1 : 0, n;
  13355. }, Fn.prototype.get = function (n) {
  13356. return be(this, n).get(n);
  13357. }, Fn.prototype.has = function (n) {
  13358. return be(this, n).has(n);
  13359. }, Fn.prototype.set = function (n, t) {
  13360. var r = be(this, n),
  13361. e = r.size;
  13362. return r.set(n, t), this.size += r.size == e ? 0 : 1, this;
  13363. }, Nn.prototype.add = Nn.prototype.push = function (n) {
  13364. return this.__data__.set(n, "__lodash_hash_undefined__"), this;
  13365. }, Nn.prototype.has = function (n) {
  13366. return this.__data__.has(n);
  13367. }, Zn.prototype.clear = function () {
  13368. this.__data__ = new Tn(), this.size = 0;
  13369. }, Zn.prototype.delete = function (n) {
  13370. var t = this.__data__;
  13371. return n = t.delete(n), this.size = t.size, n;
  13372. }, Zn.prototype.get = function (n) {
  13373. return this.__data__.get(n);
  13374. }, Zn.prototype.has = function (n) {
  13375. return this.__data__.has(n);
  13376. }, Zn.prototype.set = function (n, t) {
  13377. var r = this.__data__;
  13378. if (r instanceof Tn) {
  13379. var e = r.__data__;
  13380. if (!Fi || 199 > e.length) return e.push([n, t]), this.size = ++r.size, this;
  13381. r = this.__data__ = new Fn(e);
  13382. }
  13383. return r.set(n, t), this.size = r.size, this;
  13384. };
  13385. var eo = Fr(mt),
  13386. uo = Fr(At, true),
  13387. io = Nr(),
  13388. oo = Nr(true),
  13389. fo = Vi ? function (n, t) {
  13390. return Vi.set(n, t), n;
  13391. } : Tu,
  13392. co = mi ? function (n, t) {
  13393. return mi(n, "toString", {
  13394. configurable: true,
  13395. enumerable: false,
  13396. value: Mu(t),
  13397. writable: true
  13398. });
  13399. } : Tu,
  13400. ao = Ai || function (n) {
  13401. return $n.clearTimeout(n);
  13402. },
  13403. lo = Pi && 1 / U(new Pi([, -0]))[1] == $ ? function (n) {
  13404. return new Pi(n);
  13405. } : Nu,
  13406. so = Vi ? function (n) {
  13407. return Vi.get(n);
  13408. } : Nu,
  13409. ho = Ii ? function (n) {
  13410. return null == n ? [] : (n = Yu(n), i(Ii(n), function (t) {
  13411. return yi.call(n, t);
  13412. }));
  13413. } : Zu,
  13414. po = Ii ? function (n) {
  13415. for (var t = []; n;) {
  13416. a(t, ho(n)), n = gi(n);
  13417. }
  13418. return t;
  13419. } : Zu,
  13420. _o = Ot;
  13421. ($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) {
  13422. var t = Ot(n);
  13423. if (n = (n = "[object Object]" == t ? n.constructor : T) ? Me(n) : "") switch (n) {
  13424. case Gi:
  13425. return "[object DataView]";
  13426. case Hi:
  13427. return "[object Map]";
  13428. case Ji:
  13429. return "[object Promise]";
  13430. case Yi:
  13431. return "[object Set]";
  13432. case Qi:
  13433. return "[object WeakMap]";
  13434. }
  13435. return t;
  13436. });
  13437. var vo = ei ? pu : qu,
  13438. go = Ue(fo),
  13439. yo = ki || function (n, t) {
  13440. return $n.setTimeout(n, t);
  13441. },
  13442. bo = Ue(co),
  13443. xo = function (n) {
  13444. n = fu(n, function (n) {
  13445. return 500 === t.size && t.clear(), n;
  13446. });
  13447. var t = n.cache;
  13448. return n;
  13449. }(function (n) {
  13450. var t = [];
  13451. return 46 === n.charCodeAt(0) && t.push(""), n.replace(tn, function (n, r, e, u) {
  13452. t.push(e ? u.replace(hn, "$1") : r || n);
  13453. }), t;
  13454. }),
  13455. jo = fr(function (n, t) {
  13456. return su(n) ? yt(n, wt(t, 1, su, true)) : [];
  13457. }),
  13458. wo = fr(function (n, t) {
  13459. var r = qe(t);
  13460. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), ye(r, 2)) : [];
  13461. }),
  13462. mo = fr(function (n, t) {
  13463. var r = qe(t);
  13464. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), T, r) : [];
  13465. }),
  13466. Ao = fr(function (n) {
  13467. var t = c(n, Er);
  13468. return t.length && t[0] === n[0] ? Wt(t) : [];
  13469. }),
  13470. Eo = fr(function (n) {
  13471. var t = qe(n),
  13472. r = c(n, Er);
  13473. return t === qe(r) ? t = T : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : [];
  13474. }),
  13475. ko = fr(function (n) {
  13476. var t = qe(n),
  13477. r = c(n, Er);
  13478. return (t = typeof t == "function" ? t : T) && r.pop(), r.length && r[0] === n[0] ? Wt(r, T, t) : [];
  13479. }),
  13480. So = fr(Ve),
  13481. Oo = pe(function (n, t) {
  13482. var r = null == n ? 0 : n.length,
  13483. e = ht(n, t);
  13484. return ur(n, c(t, function (n) {
  13485. return Se(n, r) ? +n : n;
  13486. }).sort(Wr)), e;
  13487. }),
  13488. Io = fr(function (n) {
  13489. return br(wt(n, 1, su, true));
  13490. }),
  13491. Ro = fr(function (n) {
  13492. var t = qe(n);
  13493. return su(t) && (t = T), br(wt(n, 1, su, true), ye(t, 2));
  13494. }),
  13495. zo = fr(function (n) {
  13496. var t = qe(n),
  13497. t = typeof t == "function" ? t : T;
  13498. return br(wt(n, 1, su, true), T, t);
  13499. }),
  13500. Wo = fr(function (n, t) {
  13501. return su(n) ? yt(n, t) : [];
  13502. }),
  13503. Bo = fr(function (n) {
  13504. return mr(i(n, su));
  13505. }),
  13506. Lo = fr(function (n) {
  13507. var t = qe(n);
  13508. return su(t) && (t = T), mr(i(n, su), ye(t, 2));
  13509. }),
  13510. Uo = fr(function (n) {
  13511. var t = qe(n),
  13512. t = typeof t == "function" ? t : T;
  13513. return mr(i(n, su), T, t);
  13514. }),
  13515. Co = fr(Ge),
  13516. Do = fr(function (n) {
  13517. var t = n.length,
  13518. t = 1 < t ? n[t - 1] : T,
  13519. t = typeof t == "function" ? (n.pop(), t) : T;
  13520. return He(n, t);
  13521. }),
  13522. Mo = pe(function (n) {
  13523. function t(t) {
  13524. return ht(t, n);
  13525. }
  13526. var r = n.length,
  13527. e = r ? n[0] : 0,
  13528. u = this.__wrapped__;
  13529. return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) ? (u = u.slice(e, +e + (r ? 1 : 0)), u.__actions__.push({
  13530. func: Ye,
  13531. args: [t],
  13532. thisArg: T
  13533. }), new On(u, this.__chain__).thru(function (n) {
  13534. return r && !n.length && n.push(T), n;
  13535. })) : this.thru(t);
  13536. }),
  13537. To = Tr(function (n, t, r) {
  13538. ii.call(n, r) ? ++n[r] : st(n, r, 1);
  13539. }),
  13540. $o = Gr(Fe),
  13541. Fo = Gr(Ne),
  13542. No = Tr(function (n, t, r) {
  13543. ii.call(n, r) ? n[r].push(t) : st(n, r, [t]);
  13544. }),
  13545. Po = fr(function (t, r, e) {
  13546. var u = -1,
  13547. i = typeof r == "function",
  13548. o = lu(t) ? Vu(t.length) : [];
  13549. return eo(t, function (t) {
  13550. o[++u] = i ? n(r, t, e) : Lt(t, r, e);
  13551. }), o;
  13552. }),
  13553. Zo = Tr(function (n, t, r) {
  13554. st(n, r, t);
  13555. }),
  13556. qo = Tr(function (n, t, r) {
  13557. n[r ? 0 : 1].push(t);
  13558. }, function () {
  13559. return [[], []];
  13560. }),
  13561. Vo = fr(function (n, t) {
  13562. if (null == n) return [];
  13563. var r = t.length;
  13564. 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), []);
  13565. }),
  13566. Ko = Ei || function () {
  13567. return $n.Date.now();
  13568. },
  13569. Go = fr(function (n, t, r) {
  13570. var e = 1;
  13571. if (r.length) var u = L(r, de(Go)),
  13572. e = 32 | e;
  13573. return fe(n, e, t, r, u);
  13574. }),
  13575. Ho = fr(function (n, t, r) {
  13576. var e = 3;
  13577. if (r.length) var u = L(r, de(Ho)),
  13578. e = 32 | e;
  13579. return fe(t, e, n, r, u);
  13580. }),
  13581. Jo = fr(function (n, t) {
  13582. return dt(n, 1, t);
  13583. }),
  13584. Yo = fr(function (n, t, r) {
  13585. return dt(n, ku(t) || 0, r);
  13586. });
  13587. fu.Cache = Fn;
  13588. var Qo = fr(function (t, r) {
  13589. r = 1 == r.length && of(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye()));
  13590. var e = r.length;
  13591. return fr(function (u) {
  13592. for (var i = -1, o = Ui(u.length, e); ++i < o;) {
  13593. u[i] = r[i].call(this, u[i]);
  13594. }
  13595. return n(t, this, u);
  13596. });
  13597. }),
  13598. Xo = fr(function (n, t) {
  13599. return fe(n, 32, T, t, L(t, de(Xo)));
  13600. }),
  13601. nf = fr(function (n, t) {
  13602. return fe(n, 64, T, t, L(t, de(nf)));
  13603. }),
  13604. tf = pe(function (n, t) {
  13605. return fe(n, 256, T, T, T, t);
  13606. }),
  13607. rf = ee(It),
  13608. ef = ee(function (n, t) {
  13609. return n >= t;
  13610. }),
  13611. uf = Ut(function () {
  13612. return arguments;
  13613. }()) ? Ut : function (n) {
  13614. return du(n) && ii.call(n, "callee") && !yi.call(n, "callee");
  13615. },
  13616. of = Vu.isArray,
  13617. ff = Vn ? k(Vn) : Ct,
  13618. cf = Ri || qu,
  13619. af = Kn ? k(Kn) : Dt,
  13620. lf = Gn ? k(Gn) : Tt,
  13621. sf = Hn ? k(Hn) : Nt,
  13622. hf = Jn ? k(Jn) : Pt,
  13623. pf = Yn ? k(Yn) : Zt,
  13624. _f = ee(Kt),
  13625. vf = ee(function (n, t) {
  13626. return n <= t;
  13627. }),
  13628. gf = $r(function (n, t) {
  13629. if (ze(t) || lu(t)) Cr(t, zu(t), n);else for (var r in t) {
  13630. ii.call(t, r) && ot(n, r, t[r]);
  13631. }
  13632. }),
  13633. df = $r(function (n, t) {
  13634. Cr(t, Wu(t), n);
  13635. }),
  13636. yf = $r(function (n, t, r, e) {
  13637. Cr(t, Wu(t), n, e);
  13638. }),
  13639. bf = $r(function (n, t, r, e) {
  13640. Cr(t, zu(t), n, e);
  13641. }),
  13642. xf = pe(ht),
  13643. jf = fr(function (n, t) {
  13644. n = Yu(n);
  13645. var r = -1,
  13646. e = t.length,
  13647. u = 2 < e ? t[2] : T;
  13648. for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e;) {
  13649. for (var u = t[r], i = Wu(u), o = -1, f = i.length; ++o < f;) {
  13650. var c = i[o],
  13651. a = n[c];
  13652. (a === T || au(a, ri[c]) && !ii.call(n, c)) && (n[c] = u[c]);
  13653. }
  13654. }
  13655. return n;
  13656. }),
  13657. wf = fr(function (t) {
  13658. return t.push(T, ae), n(Sf, T, t);
  13659. }),
  13660. mf = Yr(function (n, t, r) {
  13661. null != t && typeof t.toString != "function" && (t = ci.call(t)), n[t] = r;
  13662. }, Mu(Tu)),
  13663. Af = Yr(function (n, t, r) {
  13664. null != t && typeof t.toString != "function" && (t = ci.call(t)), ii.call(n, t) ? n[t].push(r) : n[t] = [r];
  13665. }, ye),
  13666. Ef = fr(Lt),
  13667. kf = $r(function (n, t, r) {
  13668. Yt(n, t, r);
  13669. }),
  13670. Sf = $r(function (n, t, r, e) {
  13671. Yt(n, t, r, e);
  13672. }),
  13673. Of = pe(function (n, t) {
  13674. var r = {};
  13675. if (null == n) return r;
  13676. var e = false;
  13677. t = c(t, function (t) {
  13678. return t = Sr(t, n), e || (e = 1 < t.length), t;
  13679. }), Cr(n, ve(n), r), e && (r = _t(r, 7, le));
  13680. for (var u = t.length; u--;) {
  13681. xr(r, t[u]);
  13682. }
  13683. return r;
  13684. }),
  13685. If = pe(function (n, t) {
  13686. return null == n ? {} : nr(n, t);
  13687. }),
  13688. Rf = oe(zu),
  13689. zf = oe(Wu),
  13690. Wf = qr(function (n, t, r) {
  13691. return t = t.toLowerCase(), n + (r ? Uu(t) : t);
  13692. }),
  13693. Bf = qr(function (n, t, r) {
  13694. return n + (r ? "-" : "") + t.toLowerCase();
  13695. }),
  13696. Lf = qr(function (n, t, r) {
  13697. return n + (r ? " " : "") + t.toLowerCase();
  13698. }),
  13699. Uf = Zr("toLowerCase"),
  13700. Cf = qr(function (n, t, r) {
  13701. return n + (r ? "_" : "") + t.toLowerCase();
  13702. }),
  13703. Df = qr(function (n, t, r) {
  13704. return n + (r ? " " : "") + Tf(t);
  13705. }),
  13706. Mf = qr(function (n, t, r) {
  13707. return n + (r ? " " : "") + t.toUpperCase();
  13708. }),
  13709. Tf = Zr("toUpperCase"),
  13710. $f = fr(function (t, r) {
  13711. try {
  13712. return n(t, T, r);
  13713. } catch (n) {
  13714. return hu(n) ? n : new Gu(n);
  13715. }
  13716. }),
  13717. Ff = pe(function (n, t) {
  13718. return r(t, function (t) {
  13719. t = De(t), st(n, t, Go(n[t], n));
  13720. }), n;
  13721. }),
  13722. Nf = Hr(),
  13723. Pf = Hr(true),
  13724. Zf = fr(function (n, t) {
  13725. return function (r) {
  13726. return Lt(r, n, t);
  13727. };
  13728. }),
  13729. qf = fr(function (n, t) {
  13730. return function (r) {
  13731. return Lt(n, r, t);
  13732. };
  13733. }),
  13734. Vf = Xr(c),
  13735. Kf = Xr(u),
  13736. Gf = Xr(h),
  13737. Hf = re(),
  13738. Jf = re(true),
  13739. Yf = Qr(function (n, t) {
  13740. return n + t;
  13741. }, 0),
  13742. Qf = ie("ceil"),
  13743. Xf = Qr(function (n, t) {
  13744. return n / t;
  13745. }, 1),
  13746. nc = ie("floor"),
  13747. tc = Qr(function (n, t) {
  13748. return n * t;
  13749. }, 1),
  13750. rc = ie("round"),
  13751. ec = Qr(function (n, t) {
  13752. return n - t;
  13753. }, 0);
  13754. return An.after = function (n, t) {
  13755. if (typeof t != "function") throw new ni("Expected a function");
  13756. return n = Au(n), function () {
  13757. if (1 > --n) return t.apply(this, arguments);
  13758. };
  13759. }, 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 () {
  13760. if (!arguments.length) return [];
  13761. var n = arguments[0];
  13762. return of(n) ? n : [n];
  13763. }, An.chain = Je, An.chunk = function (n, t, r) {
  13764. if (t = (r ? Oe(n, t, r) : t === T) ? 1 : Li(Au(t), 0), r = null == n ? 0 : n.length, !r || 1 > t) return [];
  13765. for (var e = 0, u = 0, i = Vu(Si(r / t)); e < r;) {
  13766. i[u++] = hr(n, e, e += t);
  13767. }
  13768. return i;
  13769. }, An.compact = function (n) {
  13770. for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r;) {
  13771. var i = n[t];
  13772. i && (u[e++] = i);
  13773. }
  13774. return u;
  13775. }, An.concat = function () {
  13776. var n = arguments.length;
  13777. if (!n) return [];
  13778. for (var t = Vu(n - 1), r = arguments[0]; n--;) {
  13779. t[n - 1] = arguments[n];
  13780. }
  13781. return a(of(r) ? Ur(r) : [r], wt(t, 1));
  13782. }, An.cond = function (t) {
  13783. var r = null == t ? 0 : t.length,
  13784. e = ye();
  13785. return t = r ? c(t, function (n) {
  13786. if ("function" != typeof n[1]) throw new ni("Expected a function");
  13787. return [e(n[0]), n[1]];
  13788. }) : [], fr(function (e) {
  13789. for (var u = -1; ++u < r;) {
  13790. var i = t[u];
  13791. if (n(i[0], this, e)) return n(i[1], this, e);
  13792. }
  13793. });
  13794. }, An.conforms = function (n) {
  13795. return vt(_t(n, 1));
  13796. }, An.constant = Mu, An.countBy = To, An.create = function (n, t) {
  13797. var r = ro(n);
  13798. return null == t ? r : at(r, t);
  13799. }, 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) {
  13800. var e = null == n ? 0 : n.length;
  13801. return e ? (t = r || t === T ? 1 : Au(t), hr(n, 0 > t ? 0 : t, e)) : [];
  13802. }, An.dropRight = function (n, t, r) {
  13803. var e = null == n ? 0 : n.length;
  13804. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0, 0 > t ? 0 : t)) : [];
  13805. }, An.dropRightWhile = function (n, t) {
  13806. return n && n.length ? jr(n, ye(t, 3), true, true) : [];
  13807. }, An.dropWhile = function (n, t) {
  13808. return n && n.length ? jr(n, ye(t, 3), true) : [];
  13809. }, An.fill = function (n, t, r, e) {
  13810. var u = null == n ? 0 : n.length;
  13811. if (!u) return [];
  13812. 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;) {
  13813. n[r++] = t;
  13814. }
  13815. return n;
  13816. }, An.filter = function (n, t) {
  13817. return (of(n) ? i : jt)(n, ye(t, 3));
  13818. }, An.flatMap = function (n, t) {
  13819. return wt(tu(n, t), 1);
  13820. }, An.flatMapDeep = function (n, t) {
  13821. return wt(tu(n, t), $);
  13822. }, An.flatMapDepth = function (n, t, r) {
  13823. return r = r === T ? 1 : Au(r), wt(tu(n, t), r);
  13824. }, An.flatten = Pe, An.flattenDeep = function (n) {
  13825. return (null == n ? 0 : n.length) ? wt(n, $) : [];
  13826. }, An.flattenDepth = function (n, t) {
  13827. return null != n && n.length ? (t = t === T ? 1 : Au(t), wt(n, t)) : [];
  13828. }, An.flip = function (n) {
  13829. return fe(n, 512);
  13830. }, An.flow = Nf, An.flowRight = Pf, An.fromPairs = function (n) {
  13831. for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r;) {
  13832. var u = n[t];
  13833. e[u[0]] = u[1];
  13834. }
  13835. return e;
  13836. }, An.functions = function (n) {
  13837. return null == n ? [] : Et(n, zu(n));
  13838. }, An.functionsIn = function (n) {
  13839. return null == n ? [] : Et(n, Wu(n));
  13840. }, An.groupBy = No, An.initial = function (n) {
  13841. return (null == n ? 0 : n.length) ? hr(n, 0, -1) : [];
  13842. }, 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) {
  13843. var r = {};
  13844. return t = ye(t, 3), mt(n, function (n, e, u) {
  13845. st(r, t(n, e, u), n);
  13846. }), r;
  13847. }, An.mapValues = function (n, t) {
  13848. var r = {};
  13849. return t = ye(t, 3), mt(n, function (n, e, u) {
  13850. st(r, e, t(n, e, u));
  13851. }), r;
  13852. }, An.matches = function (n) {
  13853. return Ht(_t(n, 1));
  13854. }, An.matchesProperty = function (n, t) {
  13855. return Jt(n, _t(t, 1));
  13856. }, 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) {
  13857. return n = Au(n), fr(function (t) {
  13858. return Qt(t, n);
  13859. });
  13860. }, An.omit = Of, An.omitBy = function (n, t) {
  13861. return Bu(n, cu(ye(t)));
  13862. }, An.once = function (n) {
  13863. return eu(2, n);
  13864. }, An.orderBy = function (n, t, r, e) {
  13865. return null == n ? [] : (of(t) || (t = null == t ? [] : [t]), r = e ? T : r, of(r) || (r = null == r ? [] : [r]), Xt(n, t, r));
  13866. }, 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) {
  13867. return function (t) {
  13868. return null == n ? T : kt(n, t);
  13869. };
  13870. }, An.pull = So, An.pullAll = Ve, An.pullAllBy = function (n, t, r) {
  13871. return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n;
  13872. }, An.pullAllWith = function (n, t, r) {
  13873. return n && n.length && t && t.length ? er(n, t, T, r) : n;
  13874. }, An.pullAt = Oo, An.range = Hf, An.rangeRight = Jf, An.rearg = tf, An.reject = function (n, t) {
  13875. return (of(n) ? i : jt)(n, cu(ye(t, 3)));
  13876. }, An.remove = function (n, t) {
  13877. var r = [];
  13878. if (!n || !n.length) return r;
  13879. var e = -1,
  13880. u = [],
  13881. i = n.length;
  13882. for (t = ye(t, 3); ++e < i;) {
  13883. var o = n[e];
  13884. t(o, e, n) && (r.push(o), u.push(e));
  13885. }
  13886. return ur(n, u), r;
  13887. }, An.rest = function (n, t) {
  13888. if (typeof n != "function") throw new ni("Expected a function");
  13889. return t = t === T ? t : Au(t), fr(n, t);
  13890. }, An.reverse = Ke, An.sampleSize = function (n, t, r) {
  13891. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), (of(n) ? et : ar)(n, t);
  13892. }, An.set = function (n, t, r) {
  13893. return null == n ? n : lr(n, t, r);
  13894. }, An.setWith = function (n, t, r, e) {
  13895. return e = typeof e == "function" ? e : T, null == n ? n : lr(n, t, r, e);
  13896. }, An.shuffle = function (n) {
  13897. return (of(n) ? ut : sr)(n);
  13898. }, An.slice = function (n, t, r) {
  13899. var e = null == n ? 0 : n.length;
  13900. 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)) : [];
  13901. }, An.sortBy = Vo, An.sortedUniq = function (n) {
  13902. return n && n.length ? gr(n) : [];
  13903. }, An.sortedUniqBy = function (n, t) {
  13904. return n && n.length ? gr(n, ye(t, 2)) : [];
  13905. }, An.split = function (n, t, r) {
  13906. 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) : [];
  13907. }, An.spread = function (t, r) {
  13908. if (typeof t != "function") throw new ni("Expected a function");
  13909. return r = null == r ? 0 : Li(Au(r), 0), fr(function (e) {
  13910. var u = e[r];
  13911. return e = Or(e, 0, r), u && a(e, u), n(t, this, e);
  13912. });
  13913. }, An.tail = function (n) {
  13914. var t = null == n ? 0 : n.length;
  13915. return t ? hr(n, 1, t) : [];
  13916. }, An.take = function (n, t, r) {
  13917. return n && n.length ? (t = r || t === T ? 1 : Au(t), hr(n, 0, 0 > t ? 0 : t)) : [];
  13918. }, An.takeRight = function (n, t, r) {
  13919. var e = null == n ? 0 : n.length;
  13920. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0 > t ? 0 : t, e)) : [];
  13921. }, An.takeRightWhile = function (n, t) {
  13922. return n && n.length ? jr(n, ye(t, 3), false, true) : [];
  13923. }, An.takeWhile = function (n, t) {
  13924. return n && n.length ? jr(n, ye(t, 3)) : [];
  13925. }, An.tap = function (n, t) {
  13926. return t(n), n;
  13927. }, An.throttle = function (n, t, r) {
  13928. var e = true,
  13929. u = true;
  13930. if (typeof n != "function") throw new ni("Expected a function");
  13931. return gu(r) && (e = "leading" in r ? !!r.leading : e, u = "trailing" in r ? !!r.trailing : u), ou(n, t, {
  13932. leading: e,
  13933. maxWait: t,
  13934. trailing: u
  13935. });
  13936. }, An.thru = Ye, An.toArray = wu, An.toPairs = Rf, An.toPairsIn = zf, An.toPath = function (n) {
  13937. return of(n) ? c(n, De) : ju(n) ? [n] : Ur(xo(Ou(n)));
  13938. }, An.toPlainObject = Su, An.transform = function (n, t, e) {
  13939. var u = of(n),
  13940. i = u || cf(n) || pf(n);
  13941. if (t = ye(t, 4), null == e) {
  13942. var o = n && n.constructor;
  13943. e = i ? u ? new o() : [] : gu(n) && pu(o) ? ro(gi(n)) : {};
  13944. }
  13945. return (i ? r : mt)(n, function (n, r, u) {
  13946. return t(e, n, r, u);
  13947. }), e;
  13948. }, An.unary = function (n) {
  13949. return ru(n, 1);
  13950. }, An.union = Io, An.unionBy = Ro, An.unionWith = zo, An.uniq = function (n) {
  13951. return n && n.length ? br(n) : [];
  13952. }, An.uniqBy = function (n, t) {
  13953. return n && n.length ? br(n, ye(t, 2)) : [];
  13954. }, An.uniqWith = function (n, t) {
  13955. return t = typeof t == "function" ? t : T, n && n.length ? br(n, T, t) : [];
  13956. }, An.unset = function (n, t) {
  13957. return null == n || xr(n, t);
  13958. }, An.unzip = Ge, An.unzipWith = He, An.update = function (n, t, r) {
  13959. return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0);
  13960. }, An.updateWith = function (n, t, r, e) {
  13961. return e = typeof e == "function" ? e : T, null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n;
  13962. }, An.values = Lu, An.valuesIn = function (n) {
  13963. return null == n ? [] : S(n, Wu(n));
  13964. }, An.without = Wo, An.words = Du, An.wrap = function (n, t) {
  13965. return Xo(kr(t), n);
  13966. }, An.xor = Bo, An.xorBy = Lo, An.xorWith = Uo, An.zip = Co, An.zipObject = function (n, t) {
  13967. return Ar(n || [], t || [], ot);
  13968. }, An.zipObjectDeep = function (n, t) {
  13969. return Ar(n || [], t || [], lr);
  13970. }, 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) {
  13971. 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);
  13972. }, An.clone = function (n) {
  13973. return _t(n, 4);
  13974. }, An.cloneDeep = function (n) {
  13975. return _t(n, 5);
  13976. }, An.cloneDeepWith = function (n, t) {
  13977. return t = typeof t == "function" ? t : T, _t(n, 5, t);
  13978. }, An.cloneWith = function (n, t) {
  13979. return t = typeof t == "function" ? t : T, _t(n, 4, t);
  13980. }, An.conformsTo = function (n, t) {
  13981. return null == t || gt(n, t, zu(t));
  13982. }, An.deburr = Cu, An.defaultTo = function (n, t) {
  13983. return null == n || n !== n ? t : n;
  13984. }, An.divide = Xf, An.endsWith = function (n, t, r) {
  13985. n = Ou(n), t = yr(t);
  13986. var e = n.length,
  13987. e = r = r === T ? e : pt(Au(r), 0, e);
  13988. return r -= t.length, 0 <= r && n.slice(r, e) == t;
  13989. }, An.eq = au, An.escape = function (n) {
  13990. return (n = Ou(n)) && H.test(n) ? n.replace(K, nt) : n;
  13991. }, An.escapeRegExp = function (n) {
  13992. return (n = Ou(n)) && en.test(n) ? n.replace(rn, "\\$&") : n;
  13993. }, An.every = function (n, t, r) {
  13994. var e = of(n) ? u : bt;
  13995. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  13996. }, An.find = $o, An.findIndex = Fe, An.findKey = function (n, t) {
  13997. return p(n, ye(t, 3), mt);
  13998. }, An.findLast = Fo, An.findLastIndex = Ne, An.findLastKey = function (n, t) {
  13999. return p(n, ye(t, 3), At);
  14000. }, An.floor = nc, An.forEach = Xe, An.forEachRight = nu, An.forIn = function (n, t) {
  14001. return null == n ? n : io(n, ye(t, 3), Wu);
  14002. }, An.forInRight = function (n, t) {
  14003. return null == n ? n : oo(n, ye(t, 3), Wu);
  14004. }, An.forOwn = function (n, t) {
  14005. return n && mt(n, ye(t, 3));
  14006. }, An.forOwnRight = function (n, t) {
  14007. return n && At(n, ye(t, 3));
  14008. }, An.get = Iu, An.gt = rf, An.gte = ef, An.has = function (n, t) {
  14009. return null != n && we(n, t, Rt);
  14010. }, An.hasIn = Ru, An.head = Ze, An.identity = Tu, An.includes = function (n, t, r, e) {
  14011. 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);
  14012. }, An.indexOf = function (n, t, r) {
  14013. var e = null == n ? 0 : n.length;
  14014. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), v(n, t, r)) : -1;
  14015. }, An.inRange = function (n, t, r) {
  14016. return t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), n = ku(n), n >= Ui(t, r) && n < Li(t, r);
  14017. }, An.invoke = Ef, An.isArguments = uf, An.isArray = of, An.isArrayBuffer = ff, An.isArrayLike = lu, An.isArrayLikeObject = su, An.isBoolean = function (n) {
  14018. return true === n || false === n || du(n) && "[object Boolean]" == Ot(n);
  14019. }, An.isBuffer = cf, An.isDate = af, An.isElement = function (n) {
  14020. return du(n) && 1 === n.nodeType && !bu(n);
  14021. }, An.isEmpty = function (n) {
  14022. if (null == n) return true;
  14023. if (lu(n) && (of(n) || typeof n == "string" || typeof n.splice == "function" || cf(n) || pf(n) || uf(n))) return !n.length;
  14024. var t = _o(n);
  14025. if ("[object Map]" == t || "[object Set]" == t) return !n.size;
  14026. if (ze(n)) return !Vt(n).length;
  14027. for (var r in n) {
  14028. if (ii.call(n, r)) return false;
  14029. }
  14030. return true;
  14031. }, An.isEqual = function (n, t) {
  14032. return Mt(n, t);
  14033. }, An.isEqualWith = function (n, t, r) {
  14034. var e = (r = typeof r == "function" ? r : T) ? r(n, t) : T;
  14035. return e === T ? Mt(n, t, T, r) : !!e;
  14036. }, An.isError = hu, An.isFinite = function (n) {
  14037. return typeof n == "number" && zi(n);
  14038. }, An.isFunction = pu, An.isInteger = _u, An.isLength = vu, An.isMap = lf, An.isMatch = function (n, t) {
  14039. return n === t || $t(n, t, xe(t));
  14040. }, An.isMatchWith = function (n, t, r) {
  14041. return r = typeof r == "function" ? r : T, $t(n, t, xe(t), r);
  14042. }, An.isNaN = function (n) {
  14043. return yu(n) && n != +n;
  14044. }, An.isNative = function (n) {
  14045. if (vo(n)) throw new Gu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
  14046. return Ft(n);
  14047. }, An.isNil = function (n) {
  14048. return null == n;
  14049. }, An.isNull = function (n) {
  14050. return null === n;
  14051. }, An.isNumber = yu, An.isObject = gu, An.isObjectLike = du, An.isPlainObject = bu, An.isRegExp = sf, An.isSafeInteger = function (n) {
  14052. return _u(n) && -9007199254740991 <= n && 9007199254740991 >= n;
  14053. }, An.isSet = hf, An.isString = xu, An.isSymbol = ju, An.isTypedArray = pf, An.isUndefined = function (n) {
  14054. return n === T;
  14055. }, An.isWeakMap = function (n) {
  14056. return du(n) && "[object WeakMap]" == _o(n);
  14057. }, An.isWeakSet = function (n) {
  14058. return du(n) && "[object WeakSet]" == Ot(n);
  14059. }, An.join = function (n, t) {
  14060. return null == n ? "" : Wi.call(n, t);
  14061. }, An.kebabCase = Bf, An.last = qe, An.lastIndexOf = function (n, t, r) {
  14062. var e = null == n ? 0 : n.length;
  14063. if (!e) return -1;
  14064. var u = e;
  14065. if (r !== T && (u = Au(r), u = 0 > u ? Li(e + u, 0) : Ui(u, e - 1)), t === t) {
  14066. for (r = u + 1; r-- && n[r] !== t;) {
  14067. ;
  14068. }
  14069. n = r;
  14070. } else n = _(n, d, u, true);
  14071. return n;
  14072. }, An.lowerCase = Lf, An.lowerFirst = Uf, An.lt = _f, An.lte = vf, An.max = function (n) {
  14073. return n && n.length ? xt(n, Tu, It) : T;
  14074. }, An.maxBy = function (n, t) {
  14075. return n && n.length ? xt(n, ye(t, 2), It) : T;
  14076. }, An.mean = function (n) {
  14077. return y(n, Tu);
  14078. }, An.meanBy = function (n, t) {
  14079. return y(n, ye(t, 2));
  14080. }, An.min = function (n) {
  14081. return n && n.length ? xt(n, Tu, Kt) : T;
  14082. }, An.minBy = function (n, t) {
  14083. return n && n.length ? xt(n, ye(t, 2), Kt) : T;
  14084. }, An.stubArray = Zu, An.stubFalse = qu, An.stubObject = function () {
  14085. return {};
  14086. }, An.stubString = function () {
  14087. return "";
  14088. }, An.stubTrue = function () {
  14089. return true;
  14090. }, An.multiply = tc, An.nth = function (n, t) {
  14091. return n && n.length ? Qt(n, Au(t)) : T;
  14092. }, An.noConflict = function () {
  14093. return $n._ === this && ($n._ = li), this;
  14094. }, An.noop = Nu, An.now = Ko, An.pad = function (n, t, r) {
  14095. n = Ou(n);
  14096. var e = (t = Au(t)) ? D(n) : 0;
  14097. return !t || e >= t ? n : (t = (t - e) / 2, ne(Oi(t), r) + n + ne(Si(t), r));
  14098. }, An.padEnd = function (n, t, r) {
  14099. n = Ou(n);
  14100. var e = (t = Au(t)) ? D(n) : 0;
  14101. return t && e < t ? n + ne(t - e, r) : n;
  14102. }, An.padStart = function (n, t, r) {
  14103. n = Ou(n);
  14104. var e = (t = Au(t)) ? D(n) : 0;
  14105. return t && e < t ? ne(t - e, r) + n : n;
  14106. }, An.parseInt = function (n, t, r) {
  14107. return r || null == t ? t = 0 : t && (t = +t), Di(Ou(n).replace(on, ""), t || 0);
  14108. }, An.random = function (n, t, r) {
  14109. 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) {
  14110. var e = n;
  14111. n = t, t = e;
  14112. }
  14113. return r || n % 1 || t % 1 ? (r = Mi(), Ui(n + r * (t - n + Cn("1e-" + ((r + "").length - 1))), t)) : ir(n, t);
  14114. }, An.reduce = function (n, t, r) {
  14115. var e = of(n) ? l : j,
  14116. u = 3 > arguments.length;
  14117. return e(n, ye(t, 4), r, u, eo);
  14118. }, An.reduceRight = function (n, t, r) {
  14119. var e = of(n) ? s : j,
  14120. u = 3 > arguments.length;
  14121. return e(n, ye(t, 4), r, u, uo);
  14122. }, An.repeat = function (n, t, r) {
  14123. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), or(Ou(n), t);
  14124. }, An.replace = function () {
  14125. var n = arguments,
  14126. t = Ou(n[0]);
  14127. return 3 > n.length ? t : t.replace(n[1], n[2]);
  14128. }, An.result = function (n, t, r) {
  14129. t = Sr(t, n);
  14130. var e = -1,
  14131. u = t.length;
  14132. for (u || (u = 1, n = T); ++e < u;) {
  14133. var i = null == n ? T : n[De(t[e])];
  14134. i === T && (e = u, i = r), n = pu(i) ? i.call(n) : i;
  14135. }
  14136. return n;
  14137. }, An.round = rc, An.runInContext = x, An.sample = function (n) {
  14138. return (of(n) ? Qn : cr)(n);
  14139. }, An.size = function (n) {
  14140. if (null == n) return 0;
  14141. if (lu(n)) return xu(n) ? D(n) : n.length;
  14142. var t = _o(n);
  14143. return "[object Map]" == t || "[object Set]" == t ? n.size : Vt(n).length;
  14144. }, An.snakeCase = Cf, An.some = function (n, t, r) {
  14145. var e = of(n) ? h : pr;
  14146. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  14147. }, An.sortedIndex = function (n, t) {
  14148. return _r(n, t);
  14149. }, An.sortedIndexBy = function (n, t, r) {
  14150. return vr(n, t, ye(r, 2));
  14151. }, An.sortedIndexOf = function (n, t) {
  14152. var r = null == n ? 0 : n.length;
  14153. if (r) {
  14154. var e = _r(n, t);
  14155. if (e < r && au(n[e], t)) return e;
  14156. }
  14157. return -1;
  14158. }, An.sortedLastIndex = function (n, t) {
  14159. return _r(n, t, true);
  14160. }, An.sortedLastIndexBy = function (n, t, r) {
  14161. return vr(n, t, ye(r, 2), true);
  14162. }, An.sortedLastIndexOf = function (n, t) {
  14163. if (null == n ? 0 : n.length) {
  14164. var r = _r(n, t, true) - 1;
  14165. if (au(n[r], t)) return r;
  14166. }
  14167. return -1;
  14168. }, An.startCase = Df, An.startsWith = function (n, t, r) {
  14169. return n = Ou(n), r = null == r ? 0 : pt(Au(r), 0, n.length), t = yr(t), n.slice(r, r + t.length) == t;
  14170. }, An.subtract = ec, An.sum = function (n) {
  14171. return n && n.length ? m(n, Tu) : 0;
  14172. }, An.sumBy = function (n, t) {
  14173. return n && n.length ? m(n, ye(t, 2)) : 0;
  14174. }, An.template = function (n, t, r) {
  14175. var e = An.templateSettings;
  14176. r && Oe(n, t, r) && (t = T), n = Ou(n), t = yf({}, t, e, ce), r = yf({}, t.imports, e.imports, ce);
  14177. var u,
  14178. i,
  14179. o = zu(r),
  14180. f = S(r, o),
  14181. c = 0;
  14182. r = t.interpolate || jn;
  14183. var a = "__p+='";
  14184. r = Qu((t.escape || jn).source + "|" + r.source + "|" + (r === Q ? pn : jn).source + "|" + (t.evaluate || jn).source + "|$", "g");
  14185. var l = "sourceURL" in t ? "//# sourceURL=" + t.sourceURL + "\n" : "";
  14186. if (n.replace(r, function (t, r, e, o, f, l) {
  14187. 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;
  14188. }), 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 () {
  14189. return Hu(o, l + "return " + a).apply(T, f);
  14190. }), t.source = a, hu(t)) throw t;
  14191. return t;
  14192. }, An.times = function (n, t) {
  14193. if (n = Au(n), 1 > n || 9007199254740991 < n) return [];
  14194. var r = 4294967295,
  14195. e = Ui(n, 4294967295);
  14196. for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n;) {
  14197. t(r);
  14198. }
  14199. return e;
  14200. }, An.toFinite = mu, An.toInteger = Au, An.toLength = Eu, An.toLower = function (n) {
  14201. return Ou(n).toLowerCase();
  14202. }, An.toNumber = ku, An.toSafeInteger = function (n) {
  14203. return n ? pt(Au(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0;
  14204. }, An.toString = Ou, An.toUpper = function (n) {
  14205. return Ou(n).toUpperCase();
  14206. }, An.trim = function (n, t, r) {
  14207. 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;
  14208. }, An.trimEnd = function (n, t, r) {
  14209. 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;
  14210. }, An.trimStart = function (n, t, r) {
  14211. 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;
  14212. }, An.truncate = function (n, t) {
  14213. var r = 30,
  14214. e = "...";
  14215. if (gu(t)) var u = "separator" in t ? t.separator : u,
  14216. r = "length" in t ? Au(t.length) : r,
  14217. e = "omission" in t ? yr(t.omission) : e;
  14218. n = Ou(n);
  14219. var i = n.length;
  14220. if (Rn.test(n)) var o = M(n),
  14221. i = o.length;
  14222. if (r >= i) return n;
  14223. if (i = r - D(e), 1 > i) return e;
  14224. if (r = o ? Or(o, 0, i).join("") : n.slice(0, i), u === T) return r + e;
  14225. if (o && (i += r.length - i), sf(u)) {
  14226. if (n.slice(i).search(u)) {
  14227. var f = r;
  14228. for (u.global || (u = Qu(u.source, Ou(_n.exec(u)) + "g")), u.lastIndex = 0; o = u.exec(f);) {
  14229. var c = o.index;
  14230. }
  14231. r = r.slice(0, c === T ? i : c);
  14232. }
  14233. } else n.indexOf(yr(u), i) != i && (u = r.lastIndexOf(u), -1 < u && (r = r.slice(0, u)));
  14234. return r + e;
  14235. }, An.unescape = function (n) {
  14236. return (n = Ou(n)) && G.test(n) ? n.replace(V, tt) : n;
  14237. }, An.uniqueId = function (n) {
  14238. var t = ++oi;
  14239. return Ou(n) + t;
  14240. }, An.upperCase = Mf, An.upperFirst = Tf, An.each = Xe, An.eachRight = nu, An.first = Ze, Fu(An, function () {
  14241. var n = {};
  14242. return mt(An, function (t, r) {
  14243. ii.call(An.prototype, r) || (n[r] = t);
  14244. }), n;
  14245. }(), {
  14246. chain: false
  14247. }), An.VERSION = "4.17.10", r("bind bindKey curry curryRight partial partialRight".split(" "), function (n) {
  14248. An[n].placeholder = An;
  14249. }), r(["drop", "take"], function (n, t) {
  14250. Un.prototype[n] = function (r) {
  14251. r = r === T ? 1 : Li(Au(r), 0);
  14252. var e = this.__filtered__ && !t ? new Un(this) : this.clone();
  14253. return e.__filtered__ ? e.__takeCount__ = Ui(r, e.__takeCount__) : e.__views__.push({
  14254. size: Ui(r, 4294967295),
  14255. type: n + (0 > e.__dir__ ? "Right" : "")
  14256. }), e;
  14257. }, Un.prototype[n + "Right"] = function (t) {
  14258. return this.reverse()[n](t).reverse();
  14259. };
  14260. }), r(["filter", "map", "takeWhile"], function (n, t) {
  14261. var r = t + 1,
  14262. e = 1 == r || 3 == r;
  14263. Un.prototype[n] = function (n) {
  14264. var t = this.clone();
  14265. return t.__iteratees__.push({
  14266. iteratee: ye(n, 3),
  14267. type: r
  14268. }), t.__filtered__ = t.__filtered__ || e, t;
  14269. };
  14270. }), r(["head", "last"], function (n, t) {
  14271. var r = "take" + (t ? "Right" : "");
  14272. Un.prototype[n] = function () {
  14273. return this[r](1).value()[0];
  14274. };
  14275. }), r(["initial", "tail"], function (n, t) {
  14276. var r = "drop" + (t ? "" : "Right");
  14277. Un.prototype[n] = function () {
  14278. return this.__filtered__ ? new Un(this) : this[r](1);
  14279. };
  14280. }), Un.prototype.compact = function () {
  14281. return this.filter(Tu);
  14282. }, Un.prototype.find = function (n) {
  14283. return this.filter(n).head();
  14284. }, Un.prototype.findLast = function (n) {
  14285. return this.reverse().find(n);
  14286. }, Un.prototype.invokeMap = fr(function (n, t) {
  14287. return typeof n == "function" ? new Un(this) : this.map(function (r) {
  14288. return Lt(r, n, t);
  14289. });
  14290. }), Un.prototype.reject = function (n) {
  14291. return this.filter(cu(ye(n)));
  14292. }, Un.prototype.slice = function (n, t) {
  14293. n = Au(n);
  14294. var r = this;
  14295. 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);
  14296. }, Un.prototype.takeRightWhile = function (n) {
  14297. return this.reverse().takeWhile(n).reverse();
  14298. }, Un.prototype.toArray = function () {
  14299. return this.take(4294967295);
  14300. }, mt(Un.prototype, function (n, t) {
  14301. var r = /^(?:filter|find|map|reject)|While$/.test(t),
  14302. e = /^(?:head|last)$/.test(t),
  14303. u = An[e ? "take" + ("last" == t ? "Right" : "") : t],
  14304. i = e || /^find/.test(t);
  14305. u && (An.prototype[t] = function () {
  14306. function t(n) {
  14307. return n = u.apply(An, a([n], f)), e && h ? n[0] : n;
  14308. }
  14309. var o = this.__wrapped__,
  14310. f = e ? [1] : arguments,
  14311. c = o instanceof Un,
  14312. l = f[0],
  14313. s = c || of(o);
  14314. s && r && typeof l == "function" && 1 != l.length && (c = s = false);
  14315. var h = this.__chain__,
  14316. p = !!this.__actions__.length,
  14317. l = i && !h,
  14318. c = c && !p;
  14319. return !i && s ? (o = c ? o : new Un(this), o = n.apply(o, f), o.__actions__.push({
  14320. func: Ye,
  14321. args: [t],
  14322. thisArg: T
  14323. }), new On(o, h)) : l && c ? n.apply(this, f) : (o = this.thru(t), l ? e ? o.value()[0] : o.value() : o);
  14324. });
  14325. }), r("pop push shift sort splice unshift".split(" "), function (n) {
  14326. var t = ti[n],
  14327. r = /^(?:push|sort|unshift)$/.test(n) ? "tap" : "thru",
  14328. e = /^(?:pop|shift)$/.test(n);
  14329. An.prototype[n] = function () {
  14330. var n = arguments;
  14331. if (e && !this.__chain__) {
  14332. var u = this.value();
  14333. return t.apply(of(u) ? u : [], n);
  14334. }
  14335. return this[r](function (r) {
  14336. return t.apply(of(r) ? r : [], n);
  14337. });
  14338. };
  14339. }), mt(Un.prototype, function (n, t) {
  14340. var r = An[t];
  14341. if (r) {
  14342. var e = r.name + "";
  14343. (Ki[e] || (Ki[e] = [])).push({
  14344. name: t,
  14345. func: r
  14346. });
  14347. }
  14348. }), Ki[Jr(T, 2).name] = [{
  14349. name: "wrapper",
  14350. func: T
  14351. }], Un.prototype.clone = function () {
  14352. var n = new Un(this.__wrapped__);
  14353. 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;
  14354. }, Un.prototype.reverse = function () {
  14355. if (this.__filtered__) {
  14356. var n = new Un(this);
  14357. n.__dir__ = -1, n.__filtered__ = true;
  14358. } else n = this.clone(), n.__dir__ *= -1;
  14359. return n;
  14360. }, Un.prototype.value = function () {
  14361. var n,
  14362. t = this.__wrapped__.value(),
  14363. r = this.__dir__,
  14364. e = of(t),
  14365. u = 0 > r,
  14366. i = e ? t.length : 0;
  14367. n = i;
  14368. for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a;) {
  14369. var l = o[c],
  14370. s = l.size;
  14371. switch (l.type) {
  14372. case "drop":
  14373. f += s;
  14374. break;
  14375. case "dropRight":
  14376. n -= s;
  14377. break;
  14378. case "take":
  14379. n = Ui(n, f + s);
  14380. break;
  14381. case "takeRight":
  14382. f = Li(f, n - s);
  14383. }
  14384. }
  14385. if (n = {
  14386. start: f,
  14387. end: n
  14388. }, 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__);
  14389. e = [];
  14390. n: for (; n-- && a < l;) {
  14391. for (o += r, u = -1, i = t[o]; ++u < c;) {
  14392. var h = f[u],
  14393. s = h.type,
  14394. h = (0, h.iteratee)(i);
  14395. if (2 == s) i = h;else if (!h) {
  14396. if (1 == s) continue n;
  14397. break n;
  14398. }
  14399. }
  14400. e[a++] = i;
  14401. }
  14402. return e;
  14403. }, An.prototype.at = Mo, An.prototype.chain = function () {
  14404. return Je(this);
  14405. }, An.prototype.commit = function () {
  14406. return new On(this.value(), this.__chain__);
  14407. }, An.prototype.next = function () {
  14408. this.__values__ === T && (this.__values__ = wu(this.value()));
  14409. var n = this.__index__ >= this.__values__.length;
  14410. return {
  14411. done: n,
  14412. value: n ? T : this.__values__[this.__index__++]
  14413. };
  14414. }, An.prototype.plant = function (n) {
  14415. for (var t, r = this; r instanceof En;) {
  14416. var e = $e(r);
  14417. e.__index__ = 0, e.__values__ = T, t ? u.__wrapped__ = e : t = e;
  14418. var u = e,
  14419. r = r.__wrapped__;
  14420. }
  14421. return u.__wrapped__ = n, t;
  14422. }, An.prototype.reverse = function () {
  14423. var n = this.__wrapped__;
  14424. return n instanceof Un ? (this.__actions__.length && (n = new Un(this)), n = n.reverse(), n.__actions__.push({
  14425. func: Ye,
  14426. args: [Ke],
  14427. thisArg: T
  14428. }), new On(n, this.__chain__)) : this.thru(Ke);
  14429. }, An.prototype.toJSON = An.prototype.valueOf = An.prototype.value = function () {
  14430. return wr(this.__wrapped__, this.__actions__);
  14431. }, An.prototype.first = An.prototype.head, ji && (An.prototype[ji] = Qe), An;
  14432. }();
  14433. true && _typeof(__webpack_require__(/*! !webpack amd options */ 41)) == "object" && __webpack_require__(/*! !webpack amd options */ 41) ? ($n._ = rt, !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  14434. return rt;
  14435. }).call(exports, __webpack_require__, exports, module),
  14436. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) : Nn ? ((Nn.exports = rt)._ = rt, Fn._ = rt) : $n._ = rt;
  14437. }).call(this);
  14438. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/global.js */ 3), __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  14439. /***/ }),
  14440. /***/ 4:
  14441. /*!**********************************************************************!*\
  14442. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  14443. \**********************************************************************/
  14444. /*! no static exports found */
  14445. /***/ (function(module, exports) {
  14446. function _interopRequireDefault(obj) {
  14447. return obj && obj.__esModule ? obj : {
  14448. "default": obj
  14449. };
  14450. }
  14451. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14452. /***/ }),
  14453. /***/ 40:
  14454. /*!***********************************!*\
  14455. !*** (webpack)/buildin/module.js ***!
  14456. \***********************************/
  14457. /*! no static exports found */
  14458. /***/ (function(module, exports) {
  14459. module.exports = function(module) {
  14460. if (!module.webpackPolyfill) {
  14461. module.deprecate = function() {};
  14462. module.paths = [];
  14463. // module.parent = undefined by default
  14464. if (!module.children) module.children = [];
  14465. Object.defineProperty(module, "loaded", {
  14466. enumerable: true,
  14467. get: function() {
  14468. return module.l;
  14469. }
  14470. });
  14471. Object.defineProperty(module, "id", {
  14472. enumerable: true,
  14473. get: function() {
  14474. return module.i;
  14475. }
  14476. });
  14477. module.webpackPolyfill = 1;
  14478. }
  14479. return module;
  14480. };
  14481. /***/ }),
  14482. /***/ 41:
  14483. /*!****************************************!*\
  14484. !*** (webpack)/buildin/amd-options.js ***!
  14485. \****************************************/
  14486. /*! no static exports found */
  14487. /***/ (function(module, exports) {
  14488. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  14489. module.exports = __webpack_amd_options__;
  14490. /* WEBPACK VAR INJECTION */}.call(this, {}))
  14491. /***/ }),
  14492. /***/ 42:
  14493. /*!****************************************************!*\
  14494. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/index.js ***!
  14495. \****************************************************/
  14496. /*! no static exports found */
  14497. /***/ (function(module, exports, __webpack_require__) {
  14498. "use strict";
  14499. /* WEBPACK VAR INJECTION */(function(uni) {
  14500. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14501. Object.defineProperty(exports, "__esModule", {
  14502. value: true
  14503. });
  14504. exports.default = void 0;
  14505. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 43));
  14506. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 44));
  14507. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 48));
  14508. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 49));
  14509. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 53));
  14510. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 54));
  14511. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 55));
  14512. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 56));
  14513. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 57));
  14514. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 58));
  14515. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 59));
  14516. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 46));
  14517. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 45));
  14518. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 60));
  14519. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 47));
  14520. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 61));
  14521. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 62));
  14522. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 63));
  14523. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 64));
  14524. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 65));
  14525. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 66);
  14526. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 67));
  14527. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 68));
  14528. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 69));
  14529. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 70));
  14530. // 引入全局mixin
  14531. // 引入关于是否mixin集成小程序分享的配置
  14532. // import wxshare from './libs/mixin/mpShare.js'
  14533. // 全局挂载引入http相关请求拦截插件
  14534. function wranning(str) {
  14535. // 开发环境进行信息输出,主要是一些报错信息
  14536. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  14537. // 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
  14538. if (true) {
  14539. console.warn(str);
  14540. }
  14541. }
  14542. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  14543. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  14544. // let vuexStore = {};
  14545. // try {
  14546. // vuexStore = require("@/store/$u.mixin.js");
  14547. // } catch (e) {
  14548. // //TODO handle the exception
  14549. // }
  14550. // post类型对象参数转为get类型url参数
  14551. var $u = {
  14552. queryParams: _queryParams.default,
  14553. route: _route.default,
  14554. timeFormat: _timeFormat.default,
  14555. date: _timeFormat.default,
  14556. // 另名date
  14557. timeFrom: _timeFrom.default,
  14558. colorGradient: _colorGradient.default.colorGradient,
  14559. colorToRgba: _colorGradient.default.colorToRgba,
  14560. guid: _guid.default,
  14561. color: _color.default,
  14562. sys: _sys.sys,
  14563. os: _sys.os,
  14564. type2icon: _type2icon.default,
  14565. randomArray: _randomArray.default,
  14566. wranning: wranning,
  14567. get: _request.default.get,
  14568. post: _request.default.post,
  14569. put: _request.default.put,
  14570. 'delete': _request.default.delete,
  14571. hexToRgb: _colorGradient.default.hexToRgb,
  14572. rgbToHex: _colorGradient.default.rgbToHex,
  14573. test: _test.default,
  14574. random: _random.default,
  14575. deepClone: _deepClone.default,
  14576. deepMerge: _deepMerge.default,
  14577. getParent: _getParent.default,
  14578. $parent: _$parent.default,
  14579. addUnit: _addUnit.default,
  14580. trim: _trim.default,
  14581. type: ['primary', 'success', 'error', 'warning', 'info'],
  14582. http: _request.default,
  14583. toast: _toast.default,
  14584. config: _config.default,
  14585. // uView配置信息相关,比如版本号
  14586. zIndex: _zIndex.default,
  14587. debounce: _debounce.default,
  14588. throttle: _throttle.default
  14589. };
  14590. // $u挂载到uni对象上
  14591. uni.$u = $u;
  14592. var install = function install(Vue) {
  14593. Vue.mixin(_mixin.default);
  14594. if (Vue.prototype.openShare) {
  14595. Vue.mixin(mpShare);
  14596. }
  14597. // Vue.mixin(vuexStore);
  14598. // 时间格式化,同时两个名称,date和timeFormat
  14599. Vue.filter('timeFormat', function (timestamp, format) {
  14600. return (0, _timeFormat.default)(timestamp, format);
  14601. });
  14602. Vue.filter('date', function (timestamp, format) {
  14603. return (0, _timeFormat.default)(timestamp, format);
  14604. });
  14605. // 将多久以前的方法,注入到全局过滤器
  14606. Vue.filter('timeFrom', function (timestamp, format) {
  14607. return (0, _timeFrom.default)(timestamp, format);
  14608. });
  14609. Vue.prototype.$u = $u;
  14610. };
  14611. var _default = {
  14612. install: install
  14613. };
  14614. exports.default = _default;
  14615. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14616. /***/ }),
  14617. /***/ 43:
  14618. /*!***************************************************************!*\
  14619. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/mixin/mixin.js ***!
  14620. \***************************************************************/
  14621. /*! no static exports found */
  14622. /***/ (function(module, exports, __webpack_require__) {
  14623. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  14624. data: function data() {
  14625. return {};
  14626. },
  14627. onLoad: function onLoad() {
  14628. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  14629. this.$u.getRect = this.$uGetRect;
  14630. },
  14631. methods: {
  14632. // 查询节点信息
  14633. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  14634. // 解决办法为在组件根部再套一个没有任何作用的view元素
  14635. $uGetRect: function $uGetRect(selector, all) {
  14636. var _this = this;
  14637. return new Promise(function (resolve) {
  14638. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  14639. if (all && Array.isArray(rect) && rect.length) {
  14640. resolve(rect);
  14641. }
  14642. if (!all && rect) {
  14643. resolve(rect);
  14644. }
  14645. }).exec();
  14646. });
  14647. },
  14648. getParentData: function getParentData() {
  14649. var _this2 = this;
  14650. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  14651. // 避免在created中去定义parent变量
  14652. if (!this.parent) this.parent = false;
  14653. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  14654. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  14655. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  14656. this.parent = this.$u.$parent.call(this, parentName);
  14657. if (this.parent) {
  14658. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  14659. Object.keys(this.parentData).map(function (key) {
  14660. _this2.parentData[key] = _this2.parent[key];
  14661. });
  14662. }
  14663. },
  14664. // 阻止事件冒泡
  14665. preventEvent: function preventEvent(e) {
  14666. e && e.stopPropagation && e.stopPropagation();
  14667. }
  14668. },
  14669. onReachBottom: function onReachBottom() {
  14670. uni.$emit('uOnReachBottom');
  14671. },
  14672. beforeDestroy: function beforeDestroy() {
  14673. var _this3 = this;
  14674. // 判断当前页面是否存在parent和children,一般在checkbox和checkbox-group父子联动的场景会有此情况
  14675. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  14676. if (this.parent && uni.$u.test.array(this.parent.children)) {
  14677. // 组件销毁时,移除父组件中的children数组中对应的实例
  14678. var childrenList = this.parent.children;
  14679. childrenList.map(function (child, index) {
  14680. // 如果相等,则移除
  14681. if (child === _this3) {
  14682. childrenList.splice(index, 1);
  14683. }
  14684. });
  14685. }
  14686. }
  14687. };
  14688. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14689. /***/ }),
  14690. /***/ 44:
  14691. /*!*****************************************************************!*\
  14692. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/request/index.js ***!
  14693. \*****************************************************************/
  14694. /*! no static exports found */
  14695. /***/ (function(module, exports, __webpack_require__) {
  14696. "use strict";
  14697. /* WEBPACK VAR INJECTION */(function(uni) {
  14698. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14699. Object.defineProperty(exports, "__esModule", {
  14700. value: true
  14701. });
  14702. exports.default = void 0;
  14703. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14704. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14705. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 45));
  14706. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 47));
  14707. var Request = /*#__PURE__*/function () {
  14708. function Request() {
  14709. var _this = this;
  14710. (0, _classCallCheck2.default)(this, Request);
  14711. this.config = {
  14712. baseUrl: '',
  14713. // 请求的根域名
  14714. // 默认的请求头
  14715. header: {},
  14716. method: 'POST',
  14717. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  14718. dataType: 'json',
  14719. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  14720. responseType: 'text',
  14721. showLoading: true,
  14722. // 是否显示请求中的loading
  14723. loadingText: '请求中...',
  14724. loadingTime: 800,
  14725. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  14726. timer: null,
  14727. // 定时器
  14728. originalData: false,
  14729. // 是否在拦截器中返回服务端的原始数据,见文档说明
  14730. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  14731. };
  14732. // 拦截器
  14733. this.interceptor = {
  14734. // 请求前的拦截
  14735. request: null,
  14736. // 请求后的拦截
  14737. response: null
  14738. };
  14739. // get请求
  14740. this.get = function (url) {
  14741. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14742. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14743. return _this.request({
  14744. method: 'GET',
  14745. url: url,
  14746. header: header,
  14747. data: data
  14748. });
  14749. };
  14750. // post请求
  14751. this.post = function (url) {
  14752. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14753. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14754. return _this.request({
  14755. url: url,
  14756. method: 'POST',
  14757. header: header,
  14758. data: data
  14759. });
  14760. };
  14761. // put请求,不支持支付宝小程序(HX2.6.15)
  14762. this.put = function (url) {
  14763. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14764. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14765. return _this.request({
  14766. url: url,
  14767. method: 'PUT',
  14768. header: header,
  14769. data: data
  14770. });
  14771. };
  14772. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  14773. this.delete = function (url) {
  14774. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14775. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14776. return _this.request({
  14777. url: url,
  14778. method: 'DELETE',
  14779. header: header,
  14780. data: data
  14781. });
  14782. };
  14783. }
  14784. (0, _createClass2.default)(Request, [{
  14785. key: "setConfig",
  14786. value:
  14787. // 设置全局默认配置
  14788. function setConfig(customConfig) {
  14789. // 深度合并对象,否则会造成对象深层属性丢失
  14790. this.config = (0, _deepMerge.default)(this.config, customConfig);
  14791. }
  14792. // 主要请求部分
  14793. }, {
  14794. key: "request",
  14795. value: function request() {
  14796. var _this2 = this;
  14797. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14798. // 检查请求拦截
  14799. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  14800. var tmpConfig = {};
  14801. var interceptorRequest = this.interceptor.request(options);
  14802. if (interceptorRequest === false) {
  14803. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  14804. return new Promise(function () {});
  14805. }
  14806. this.options = interceptorRequest;
  14807. }
  14808. options.dataType = options.dataType || this.config.dataType;
  14809. options.responseType = options.responseType || this.config.responseType;
  14810. options.url = options.url || '';
  14811. options.params = options.params || {};
  14812. options.header = Object.assign({}, this.config.header, options.header);
  14813. options.method = options.method || this.config.method;
  14814. return new Promise(function (resolve, reject) {
  14815. options.complete = function (response) {
  14816. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  14817. uni.hideLoading();
  14818. // 清除定时器,如果请求回来了,就无需loading
  14819. clearTimeout(_this2.config.timer);
  14820. _this2.config.timer = null;
  14821. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  14822. if (_this2.config.originalData) {
  14823. // 判断是否存在拦截器
  14824. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14825. var resInterceptors = _this2.interceptor.response(response);
  14826. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  14827. if (resInterceptors !== false) {
  14828. resolve(resInterceptors);
  14829. } else {
  14830. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  14831. reject(response);
  14832. }
  14833. } else {
  14834. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  14835. resolve(response);
  14836. }
  14837. } else {
  14838. if (response.statusCode == 200) {
  14839. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14840. var _resInterceptors = _this2.interceptor.response(response.data);
  14841. if (_resInterceptors !== false) {
  14842. resolve(_resInterceptors);
  14843. } else {
  14844. reject(response.data);
  14845. }
  14846. } else {
  14847. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  14848. resolve(response.data);
  14849. }
  14850. } else {
  14851. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  14852. // if(response.errMsg) {
  14853. // uni.showModal({
  14854. // title: response.errMsg
  14855. // });
  14856. // }
  14857. reject(response);
  14858. }
  14859. }
  14860. };
  14861. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  14862. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  14863. // 是否显示loading
  14864. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  14865. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  14866. if (_this2.config.showLoading && !_this2.config.timer) {
  14867. _this2.config.timer = setTimeout(function () {
  14868. uni.showLoading({
  14869. title: _this2.config.loadingText,
  14870. mask: _this2.config.loadingMask
  14871. });
  14872. _this2.config.timer = null;
  14873. }, _this2.config.loadingTime);
  14874. }
  14875. uni.request(options);
  14876. });
  14877. // .catch(res => {
  14878. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  14879. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  14880. // return new Promise(()=>{});
  14881. // })
  14882. }
  14883. }]);
  14884. return Request;
  14885. }();
  14886. var _default = new Request();
  14887. exports.default = _default;
  14888. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14889. /***/ }),
  14890. /***/ 45:
  14891. /*!**********************************************************************!*\
  14892. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepMerge.js ***!
  14893. \**********************************************************************/
  14894. /*! no static exports found */
  14895. /***/ (function(module, exports, __webpack_require__) {
  14896. "use strict";
  14897. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14898. Object.defineProperty(exports, "__esModule", {
  14899. value: true
  14900. });
  14901. exports.default = void 0;
  14902. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  14903. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 46));
  14904. // JS对象深度合并
  14905. function deepMerge() {
  14906. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14907. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14908. target = (0, _deepClone.default)(target);
  14909. if ((0, _typeof2.default)(target) !== 'object' || (0, _typeof2.default)(source) !== 'object') return false;
  14910. for (var prop in source) {
  14911. if (!source.hasOwnProperty(prop)) continue;
  14912. if (prop in target) {
  14913. if ((0, _typeof2.default)(target[prop]) !== 'object') {
  14914. target[prop] = source[prop];
  14915. } else {
  14916. if ((0, _typeof2.default)(source[prop]) !== 'object') {
  14917. target[prop] = source[prop];
  14918. } else {
  14919. if (target[prop].concat && source[prop].concat) {
  14920. target[prop] = target[prop].concat(source[prop]);
  14921. } else {
  14922. target[prop] = deepMerge(target[prop], source[prop]);
  14923. }
  14924. }
  14925. }
  14926. } else {
  14927. target[prop] = source[prop];
  14928. }
  14929. }
  14930. return target;
  14931. }
  14932. var _default = deepMerge;
  14933. exports.default = _default;
  14934. /***/ }),
  14935. /***/ 453:
  14936. /*!***********************************************************************************!*\
  14937. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/MpHtmlParser.js ***!
  14938. \***********************************************************************************/
  14939. /*! no static exports found */
  14940. /***/ (function(module, exports, __webpack_require__) {
  14941. /* WEBPACK VAR INJECTION */(function(uni) {/**
  14942. * html 解析器
  14943. * @tutorial https://github.com/jin-yufeng/Parser
  14944. * @version 20201029
  14945. * @author JinYufeng
  14946. * @listens MIT
  14947. */
  14948. var cfg = __webpack_require__(/*! ./config.js */ 454),
  14949. blankChar = cfg.blankChar,
  14950. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 455),
  14951. windowWidth = uni.getSystemInfoSync().windowWidth;
  14952. var emoji;
  14953. function MpHtmlParser(data) {
  14954. var _this = this;
  14955. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14956. this.attrs = {};
  14957. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  14958. this.data = data;
  14959. this.domain = options.domain;
  14960. this.DOM = [];
  14961. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  14962. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  14963. this.options = options;
  14964. this.state = this.Text;
  14965. this.STACK = [];
  14966. // 工具函数
  14967. this.bubble = function () {
  14968. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  14969. if (cfg.richOnlyTags[item.name]) return false;
  14970. item.c = 1;
  14971. }
  14972. return true;
  14973. };
  14974. this.decode = function (val, amp) {
  14975. var i = -1,
  14976. j,
  14977. en;
  14978. while (1) {
  14979. if ((i = val.indexOf('&', i + 1)) == -1) break;
  14980. if ((j = val.indexOf(';', i + 2)) == -1) break;
  14981. if (val[i + 1] == '#') {
  14982. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  14983. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  14984. } else {
  14985. en = val.substring(i + 1, j);
  14986. if (cfg.entities[en] || en == amp) val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  14987. }
  14988. }
  14989. return val;
  14990. };
  14991. this.getUrl = function (url) {
  14992. if (url[0] == '/') {
  14993. if (url[1] == '/') url = _this.options.prot + ':' + url;else if (_this.domain) url = _this.domain + url;
  14994. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://')) url = _this.domain + '/' + url;
  14995. return url;
  14996. };
  14997. this.isClose = function () {
  14998. return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';
  14999. };
  15000. this.section = function () {
  15001. return _this.data.substring(_this.start, _this.i);
  15002. };
  15003. this.parent = function () {
  15004. return _this.STACK[_this.STACK.length - 1];
  15005. };
  15006. this.siblings = function () {
  15007. return _this.STACK.length ? _this.parent().children : _this.DOM;
  15008. };
  15009. }
  15010. MpHtmlParser.prototype.parse = function () {
  15011. if (emoji) this.data = emoji.parseEmoji(this.data);
  15012. for (var c; c = this.data[this.i]; this.i++) {
  15013. this.state(c);
  15014. }
  15015. if (this.state == this.Text) this.setText();
  15016. while (this.STACK.length) {
  15017. this.popNode(this.STACK.pop());
  15018. }
  15019. return this.DOM;
  15020. };
  15021. // 设置属性
  15022. MpHtmlParser.prototype.setAttr = function () {
  15023. var name = this.attrName.toLowerCase(),
  15024. val = this.attrVal;
  15025. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else if (val) {
  15026. 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;
  15027. }
  15028. this.attrVal = '';
  15029. while (blankChar[this.data[this.i]]) {
  15030. this.i++;
  15031. }
  15032. if (this.isClose()) this.setNode();else {
  15033. this.start = this.i;
  15034. this.state = this.AttrName;
  15035. }
  15036. };
  15037. // 设置文本节点
  15038. MpHtmlParser.prototype.setText = function () {
  15039. var back,
  15040. text = this.section();
  15041. if (!text) return;
  15042. text = cfg.onText && cfg.onText(text, function () {
  15043. return back = true;
  15044. }) || text;
  15045. if (back) {
  15046. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  15047. var j = this.start + text.length;
  15048. for (this.i = this.start; this.i < j; this.i++) {
  15049. this.state(this.data[this.i]);
  15050. }
  15051. return;
  15052. }
  15053. if (!this.pre) {
  15054. // 合并空白符
  15055. var flag,
  15056. tmp = [];
  15057. for (var i = text.length, c; c = text[--i];) {
  15058. if (!blankChar[c]) {
  15059. tmp.unshift(c);
  15060. if (!flag) flag = 1;
  15061. } else {
  15062. if (tmp[0] != ' ') tmp.unshift(' ');
  15063. if (c == '\n' && flag == void 0) flag = 0;
  15064. }
  15065. }
  15066. if (flag == 0) return;
  15067. text = tmp.join('');
  15068. }
  15069. this.siblings().push({
  15070. type: 'text',
  15071. text: this.decode(text)
  15072. });
  15073. };
  15074. // 设置元素节点
  15075. MpHtmlParser.prototype.setNode = function () {
  15076. var node = {
  15077. name: this.tagName.toLowerCase(),
  15078. attrs: this.attrs
  15079. },
  15080. close = cfg.selfClosingTags[node.name];
  15081. if (this.options.nodes.length) node.type = 'node';
  15082. this.attrs = {};
  15083. if (!cfg.ignoreTags[node.name]) {
  15084. // 处理属性
  15085. var attrs = node.attrs,
  15086. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  15087. styleObj = {};
  15088. if (attrs.id) {
  15089. if (this.options.compress & 1) attrs.id = void 0;else if (this.options.useAnchor) this.bubble();
  15090. }
  15091. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  15092. switch (node.name) {
  15093. case 'a':
  15094. case 'ad':
  15095. this.bubble();
  15096. break;
  15097. case 'font':
  15098. if (attrs.color) {
  15099. styleObj['color'] = attrs.color;
  15100. attrs.color = void 0;
  15101. }
  15102. if (attrs.face) {
  15103. styleObj['font-family'] = attrs.face;
  15104. attrs.face = void 0;
  15105. }
  15106. if (attrs.size) {
  15107. var size = parseInt(attrs.size);
  15108. if (size < 1) size = 1;else if (size > 7) size = 7;
  15109. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  15110. styleObj['font-size'] = map[size - 1];
  15111. attrs.size = void 0;
  15112. }
  15113. break;
  15114. case 'embed':
  15115. var src = node.attrs.src || '',
  15116. type = node.attrs.type || '';
  15117. 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;
  15118. if (node.attrs.autostart) node.attrs.autoplay = 'T';
  15119. node.attrs.controls = 'T';
  15120. case 'video':
  15121. case 'audio':
  15122. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else this["".concat(node.name, "Num")]++;
  15123. if (node.name == 'video') {
  15124. if (this.videoNum > 3) node.lazyLoad = 1;
  15125. if (attrs.width) {
  15126. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  15127. attrs.width = void 0;
  15128. }
  15129. if (attrs.height) {
  15130. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  15131. attrs.height = void 0;
  15132. }
  15133. }
  15134. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  15135. attrs.source = [];
  15136. if (attrs.src) {
  15137. attrs.source.push(attrs.src);
  15138. attrs.src = void 0;
  15139. }
  15140. this.bubble();
  15141. break;
  15142. case 'td':
  15143. case 'th':
  15144. if (attrs.colspan || attrs.rowspan) for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  15145. if (item.name == 'table') {
  15146. item.flag = 1;
  15147. break;
  15148. }
  15149. }
  15150. }
  15151. if (attrs.align) {
  15152. if (node.name == 'table') {
  15153. if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';else styleObj['float'] = attrs.align;
  15154. } else styleObj['text-align'] = attrs.align;
  15155. attrs.align = void 0;
  15156. }
  15157. // 压缩 style
  15158. var styles = style.split(';');
  15159. style = '';
  15160. for (var i = 0, len = styles.length; i < len; i++) {
  15161. var info = styles[i].split(':');
  15162. if (info.length < 2) continue;
  15163. var _key = info[0].trim().toLowerCase(),
  15164. _value = info.slice(1).join(':').trim();
  15165. 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;
  15166. }
  15167. if (node.name == 'img') {
  15168. if (attrs.src && !attrs.ignore) {
  15169. if (this.bubble()) attrs.i = (this.imgNum++).toString();else attrs.ignore = 'T';
  15170. }
  15171. if (attrs.ignore) {
  15172. style += ';-webkit-touch-callout:none';
  15173. styleObj['max-width'] = '100%';
  15174. }
  15175. var width;
  15176. if (styleObj.width) width = styleObj.width;else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px';
  15177. if (width) {
  15178. styleObj.width = width;
  15179. attrs.width = '100%';
  15180. if (parseInt(width) > windowWidth) {
  15181. styleObj.height = '';
  15182. if (attrs.height) attrs.height = void 0;
  15183. }
  15184. }
  15185. if (styleObj.height) {
  15186. attrs.height = styleObj.height;
  15187. styleObj.height = '';
  15188. } else if (attrs.height && !attrs.height.includes('%')) attrs.height = parseFloat(attrs.height) + 'px';
  15189. }
  15190. for (var key in styleObj) {
  15191. var value = styleObj[key];
  15192. if (!value) continue;
  15193. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  15194. // 填充链接
  15195. if (value.includes('url')) {
  15196. var j = value.indexOf('(');
  15197. if (j++ != -1) {
  15198. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {
  15199. j++;
  15200. }
  15201. value = value.substr(0, j) + this.getUrl(value.substr(j));
  15202. }
  15203. }
  15204. // 转换 rpx
  15205. else if (value.includes('rpx')) value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  15206. return parseFloat($) * windowWidth / 750 + 'px';
  15207. });else if (key == 'white-space' && value.includes('pre') && !close) this.pre = node.pre = true;
  15208. style += ";".concat(key, ":").concat(value);
  15209. }
  15210. style = style.substr(1);
  15211. if (style) attrs.style = style;
  15212. if (!close) {
  15213. node.children = [];
  15214. if (node.name == 'pre' && cfg.highlight) {
  15215. this.remove(node);
  15216. this.pre = node.pre = true;
  15217. }
  15218. this.siblings().push(node);
  15219. this.STACK.push(node);
  15220. } else if (!cfg.filter || cfg.filter(node, this) != false) this.siblings().push(node);
  15221. } else {
  15222. if (!close) this.remove(node);else if (node.name == 'source') {
  15223. var parent = this.parent();
  15224. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) parent.attrs.source.push(node.attrs.src);
  15225. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  15226. }
  15227. if (this.data[this.i] == '/') this.i++;
  15228. this.start = this.i + 1;
  15229. this.state = this.Text;
  15230. };
  15231. // 移除标签
  15232. MpHtmlParser.prototype.remove = function (node) {
  15233. var _this2 = this;
  15234. var name = node.name,
  15235. j = this.i;
  15236. // 处理 svg
  15237. var handleSvg = function handleSvg() {
  15238. var src = _this2.data.substring(j, _this2.i + 1);
  15239. node.attrs.xmlns = 'http://www.w3.org/2000/svg';
  15240. for (var key in node.attrs) {
  15241. if (key == 'viewbox') src = " viewBox=\"".concat(node.attrs.viewbox, "\"") + src;else if (key != 'style') src = " ".concat(key, "=\"").concat(node.attrs[key], "\"") + src;
  15242. }
  15243. src = '<svg' + src;
  15244. var parent = _this2.parent();
  15245. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  15246. _this2.siblings().push({
  15247. name: 'img',
  15248. attrs: {
  15249. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  15250. style: node.attrs.style,
  15251. ignore: 'T'
  15252. }
  15253. });
  15254. };
  15255. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  15256. while (1) {
  15257. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  15258. if (name == 'pre' || name == 'svg') this.i = j;else this.i = this.data.length;
  15259. return;
  15260. }
  15261. this.start = this.i += 2;
  15262. while (!blankChar[this.data[this.i]] && !this.isClose()) {
  15263. this.i++;
  15264. }
  15265. if (this.section().toLowerCase() == name) {
  15266. // 代码块高亮
  15267. if (name == 'pre') {
  15268. 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);
  15269. return this.i = j;
  15270. } 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);
  15271. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  15272. if (name == 'svg') handleSvg();
  15273. return;
  15274. }
  15275. }
  15276. };
  15277. // 节点出栈处理
  15278. MpHtmlParser.prototype.popNode = function (node) {
  15279. // 空白符处理
  15280. if (node.pre) {
  15281. node.pre = this.pre = void 0;
  15282. for (var i = this.STACK.length; i--;) {
  15283. if (this.STACK[i].pre) this.pre = true;
  15284. }
  15285. }
  15286. var siblings = this.siblings(),
  15287. len = siblings.length,
  15288. childs = node.children;
  15289. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false) return siblings.pop();
  15290. var attrs = node.attrs;
  15291. // 替换一些标签名
  15292. if (cfg.blockTags[node.name]) node.name = 'div';else if (!cfg.trustTags[node.name]) node.name = 'span';
  15293. // 处理列表
  15294. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  15295. if ((node.attrs.style || '').includes('list-style:none')) {
  15296. for (var _i = 0, child; child = childs[_i++];) {
  15297. if (child.name == 'li') child.name = 'div';
  15298. }
  15299. } else if (node.name == 'ul') {
  15300. var floor = 1;
  15301. for (var _i2 = this.STACK.length; _i2--;) {
  15302. if (this.STACK[_i2].name == 'ul') floor++;
  15303. }
  15304. if (floor != 1) for (var _i3 = childs.length; _i3--;) {
  15305. childs[_i3].floor = floor;
  15306. }
  15307. } else {
  15308. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  15309. if (_child.name == 'li') {
  15310. _child.type = 'ol';
  15311. _child.num = function (num, type) {
  15312. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  15313. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  15314. if (type == 'i' || type == 'I') {
  15315. num = (num - 1) % 99 + 1;
  15316. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  15317. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  15318. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  15319. if (type == 'i') return res.toLowerCase();
  15320. return res;
  15321. }
  15322. return num;
  15323. }(num++, attrs.type) + '.';
  15324. }
  15325. }
  15326. }
  15327. }
  15328. // 处理表格
  15329. if (node.name == 'table') {
  15330. var padding = parseFloat(attrs.cellpadding),
  15331. spacing = parseFloat(attrs.cellspacing),
  15332. border = parseFloat(attrs.border);
  15333. if (node.c) {
  15334. if (isNaN(padding)) padding = 2;
  15335. if (isNaN(spacing)) spacing = 2;
  15336. }
  15337. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  15338. if (node.flag && node.c) {
  15339. // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现
  15340. attrs.style = "".concat(attrs.style || '', ";").concat(spacing ? ";grid-gap:".concat(spacing, "px") : ';border-left:0;border-top:0');
  15341. var row = 1,
  15342. col = 1,
  15343. colNum,
  15344. trs = [],
  15345. children = [],
  15346. map = {};
  15347. (function f(ns) {
  15348. for (var i = 0; i < ns.length; i++) {
  15349. if (ns[i].name == 'tr') trs.push(ns[i]);else f(ns[i].children || []);
  15350. }
  15351. })(node.children);
  15352. for (var _i5 = 0; _i5 < trs.length; _i5++) {
  15353. for (var j = 0, td; td = trs[_i5].children[j]; j++) {
  15354. if (td.name == 'td' || td.name == 'th') {
  15355. while (map[row + '.' + col]) {
  15356. col++;
  15357. }
  15358. var cell = {
  15359. name: 'div',
  15360. c: 1,
  15361. attrs: {
  15362. style: (td.attrs.style || '') + (border ? ";border:".concat(border, "px solid gray") + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : '')
  15363. },
  15364. children: td.children
  15365. };
  15366. if (td.attrs.colspan) {
  15367. cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan));
  15368. if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1);
  15369. col += parseInt(td.attrs.colspan) - 1;
  15370. }
  15371. if (td.attrs.rowspan) {
  15372. cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan));
  15373. if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1);
  15374. for (var k = 1; k < td.attrs.rowspan; k++) {
  15375. map[row + k + '.' + col] = 1;
  15376. }
  15377. }
  15378. children.push(cell);
  15379. col++;
  15380. }
  15381. }
  15382. if (!colNum) {
  15383. colNum = col - 1;
  15384. attrs.style += ";grid-template-columns:repeat(".concat(colNum, ",auto)");
  15385. }
  15386. col = 1;
  15387. row++;
  15388. }
  15389. node.children = children;
  15390. } else {
  15391. attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  15392. if (border || padding) (function f(ns) {
  15393. for (var i = 0, n; n = ns[i]; i++) {
  15394. if (n.name == 'th' || n.name == 'td') {
  15395. if (border) n.attrs.style = "border:".concat(border, "px solid gray;").concat(n.attrs.style || '');
  15396. if (padding) n.attrs.style = "padding:".concat(padding, "px;").concat(n.attrs.style || '');
  15397. } else f(n.children || []);
  15398. }
  15399. })(childs);
  15400. }
  15401. if (this.options.autoscroll) {
  15402. var table = Object.assign({}, node);
  15403. node.name = 'div';
  15404. node.attrs = {
  15405. style: 'overflow:scroll'
  15406. };
  15407. node.children = [table];
  15408. }
  15409. }
  15410. this.CssHandler.pop && this.CssHandler.pop(node);
  15411. // 自动压缩
  15412. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') siblings[len - 1] = childs[0];
  15413. };
  15414. // 状态机
  15415. MpHtmlParser.prototype.Text = function (c) {
  15416. if (c == '<') {
  15417. var next = this.data[this.i + 1],
  15418. isLetter = function isLetter(c) {
  15419. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15420. };
  15421. if (isLetter(next)) {
  15422. this.setText();
  15423. this.start = this.i + 1;
  15424. this.state = this.TagName;
  15425. } else if (next == '/') {
  15426. this.setText();
  15427. if (isLetter(this.data[++this.i + 1])) {
  15428. this.start = this.i + 1;
  15429. this.state = this.EndTag;
  15430. } else this.Comment();
  15431. } else if (next == '!' || next == '?') {
  15432. this.setText();
  15433. this.Comment();
  15434. }
  15435. }
  15436. };
  15437. MpHtmlParser.prototype.Comment = function () {
  15438. var key;
  15439. 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 = '>';
  15440. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else this.i += key.length - 1;
  15441. this.start = this.i + 1;
  15442. this.state = this.Text;
  15443. };
  15444. MpHtmlParser.prototype.TagName = function (c) {
  15445. if (blankChar[c]) {
  15446. this.tagName = this.section();
  15447. while (blankChar[this.data[this.i]]) {
  15448. this.i++;
  15449. }
  15450. if (this.isClose()) this.setNode();else {
  15451. this.start = this.i;
  15452. this.state = this.AttrName;
  15453. }
  15454. } else if (this.isClose()) {
  15455. this.tagName = this.section();
  15456. this.setNode();
  15457. }
  15458. };
  15459. MpHtmlParser.prototype.AttrName = function (c) {
  15460. if (c == '=' || blankChar[c] || this.isClose()) {
  15461. this.attrName = this.section();
  15462. if (blankChar[c]) while (blankChar[this.data[++this.i]]) {
  15463. ;
  15464. }
  15465. if (this.data[this.i] == '=') {
  15466. while (blankChar[this.data[++this.i]]) {
  15467. ;
  15468. }
  15469. this.start = this.i--;
  15470. this.state = this.AttrValue;
  15471. } else this.setAttr();
  15472. }
  15473. };
  15474. MpHtmlParser.prototype.AttrValue = function (c) {
  15475. if (c == '"' || c == "'") {
  15476. this.start++;
  15477. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  15478. this.attrVal = this.section();
  15479. this.i++;
  15480. } else {
  15481. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {
  15482. ;
  15483. }
  15484. this.attrVal = this.section();
  15485. }
  15486. this.setAttr();
  15487. };
  15488. MpHtmlParser.prototype.EndTag = function (c) {
  15489. if (blankChar[c] || c == '>' || c == '/') {
  15490. var name = this.section().toLowerCase();
  15491. for (var i = this.STACK.length; i--;) {
  15492. if (this.STACK[i].name == name) break;
  15493. }
  15494. if (i != -1) {
  15495. var node;
  15496. while ((node = this.STACK.pop()).name != name) {
  15497. this.popNode(node);
  15498. }
  15499. this.popNode(node);
  15500. } else if (name == 'p' || name == 'br') this.siblings().push({
  15501. name: name,
  15502. attrs: {}
  15503. });
  15504. this.i = this.data.indexOf('>', this.i);
  15505. this.start = this.i + 1;
  15506. if (this.i == -1) this.i = this.data.length;else this.state = this.Text;
  15507. }
  15508. };
  15509. module.exports = MpHtmlParser;
  15510. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  15511. /***/ }),
  15512. /***/ 454:
  15513. /*!*****************************************************************************!*\
  15514. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/config.js ***!
  15515. \*****************************************************************************/
  15516. /*! no static exports found */
  15517. /***/ (function(module, exports, __webpack_require__) {
  15518. /* WEBPACK VAR INJECTION */(function(wx) {/* 配置文件 */
  15519. var cfg = {
  15520. // 出错占位图
  15521. errorImg: null,
  15522. // 过滤器函数
  15523. filter: null,
  15524. // 代码高亮函数
  15525. highlight: null,
  15526. // 文本处理函数
  15527. onText: null,
  15528. // 实体编码列表
  15529. entities: {
  15530. quot: '"',
  15531. apos: "'",
  15532. semi: ';',
  15533. nbsp: '\xA0',
  15534. ensp: "\u2002",
  15535. emsp: "\u2003",
  15536. ndash: '–',
  15537. mdash: '—',
  15538. middot: '·',
  15539. lsquo: '‘',
  15540. rsquo: '’',
  15541. ldquo: '“',
  15542. rdquo: '”',
  15543. bull: '•',
  15544. hellip: '…'
  15545. },
  15546. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  15547. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  15548. // 块级标签,将被转为 div
  15549. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  15550. // 将被移除的标签
  15551. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  15552. // 只能被 rich-text 显示的标签
  15553. richOnlyTags: makeMap('a,colgroup,fieldset,legend'),
  15554. // 自闭合的标签
  15555. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  15556. // 信任的标签
  15557. 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'),
  15558. // 默认的标签样式
  15559. userAgentStyles: {
  15560. address: 'font-style:italic',
  15561. big: 'display:inline;font-size:1.2em',
  15562. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  15563. caption: 'display:table-caption;text-align:center',
  15564. center: 'text-align:center',
  15565. cite: 'font-style:italic',
  15566. dd: 'margin-left:40px',
  15567. mark: 'background-color:yellow',
  15568. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  15569. s: 'text-decoration:line-through',
  15570. small: 'display:inline;font-size:0.8em',
  15571. u: 'text-decoration:underline'
  15572. }
  15573. };
  15574. function makeMap(str) {
  15575. var map = Object.create(null),
  15576. list = str.split(',');
  15577. for (var i = list.length; i--;) {
  15578. map[list[i]] = true;
  15579. }
  15580. return map;
  15581. }
  15582. if (wx.canIUse('editor')) {
  15583. cfg.blockTags.pre = void 0;
  15584. cfg.ignoreTags.rp = true;
  15585. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  15586. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  15587. }
  15588. module.exports = cfg;
  15589. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  15590. /***/ }),
  15591. /***/ 455:
  15592. /*!*********************************************************************************!*\
  15593. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/CssHandler.js ***!
  15594. \*********************************************************************************/
  15595. /*! no static exports found */
  15596. /***/ (function(module, exports, __webpack_require__) {
  15597. var cfg = __webpack_require__(/*! ./config.js */ 454),
  15598. isLetter = function isLetter(c) {
  15599. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15600. };
  15601. function CssHandler(tagStyle) {
  15602. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  15603. for (var item in tagStyle) {
  15604. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
  15605. }
  15606. this.styles = styles;
  15607. }
  15608. CssHandler.prototype.getStyle = function (data) {
  15609. this.styles = new parser(data, this.styles).parse();
  15610. };
  15611. CssHandler.prototype.match = function (name, attrs) {
  15612. var tmp,
  15613. matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  15614. if (attrs.class) {
  15615. var items = attrs.class.split(' ');
  15616. for (var i = 0, item; item = items[i]; i++) {
  15617. if (tmp = this.styles['.' + item]) matched += tmp + ';';
  15618. }
  15619. }
  15620. if (tmp = this.styles['#' + attrs.id]) matched += tmp + ';';
  15621. return matched;
  15622. };
  15623. module.exports = CssHandler;
  15624. function parser(data, init) {
  15625. this.data = data;
  15626. this.floor = 0;
  15627. this.i = 0;
  15628. this.list = [];
  15629. this.res = init;
  15630. this.state = this.Space;
  15631. }
  15632. parser.prototype.parse = function () {
  15633. for (var c; c = this.data[this.i]; this.i++) {
  15634. this.state(c);
  15635. }
  15636. return this.res;
  15637. };
  15638. parser.prototype.section = function () {
  15639. return this.data.substring(this.start, this.i);
  15640. };
  15641. // 状态机
  15642. parser.prototype.Space = function (c) {
  15643. if (c == '.' || c == '#' || isLetter(c)) {
  15644. this.start = this.i;
  15645. this.state = this.Name;
  15646. } else if (c == '/' && this.data[this.i + 1] == '*') this.Comment();else if (!cfg.blankChar[c] && c != ';') this.state = this.Ignore;
  15647. };
  15648. parser.prototype.Comment = function () {
  15649. this.i = this.data.indexOf('*/', this.i) + 1;
  15650. if (!this.i) this.i = this.data.length;
  15651. this.state = this.Space;
  15652. };
  15653. parser.prototype.Ignore = function (c) {
  15654. if (c == '{') this.floor++;else if (c == '}' && ! --this.floor) {
  15655. this.list = [];
  15656. this.state = this.Space;
  15657. }
  15658. };
  15659. parser.prototype.Name = function (c) {
  15660. if (cfg.blankChar[c]) {
  15661. this.list.push(this.section());
  15662. this.state = this.NameSpace;
  15663. } else if (c == '{') {
  15664. this.list.push(this.section());
  15665. this.Content();
  15666. } else if (c == ',') {
  15667. this.list.push(this.section());
  15668. this.Comma();
  15669. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') this.state = this.Ignore;
  15670. };
  15671. parser.prototype.NameSpace = function (c) {
  15672. if (c == '{') this.Content();else if (c == ',') this.Comma();else if (!cfg.blankChar[c]) this.state = this.Ignore;
  15673. };
  15674. parser.prototype.Comma = function () {
  15675. while (cfg.blankChar[this.data[++this.i]]) {
  15676. ;
  15677. }
  15678. if (this.data[this.i] == '{') this.Content();else {
  15679. this.start = this.i--;
  15680. this.state = this.Name;
  15681. }
  15682. };
  15683. parser.prototype.Content = function () {
  15684. this.start = ++this.i;
  15685. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  15686. var content = this.section();
  15687. for (var i = 0, item; item = this.list[i++];) {
  15688. if (this.res[item]) this.res[item] += ';' + content;else this.res[item] = content;
  15689. }
  15690. this.list = [];
  15691. this.state = this.Space;
  15692. };
  15693. /***/ }),
  15694. /***/ 46:
  15695. /*!**********************************************************************!*\
  15696. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepClone.js ***!
  15697. \**********************************************************************/
  15698. /*! no static exports found */
  15699. /***/ (function(module, exports, __webpack_require__) {
  15700. "use strict";
  15701. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15702. Object.defineProperty(exports, "__esModule", {
  15703. value: true
  15704. });
  15705. exports.default = void 0;
  15706. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15707. // 判断arr是否为一个数组,返回一个bool值
  15708. function isArray(arr) {
  15709. return Object.prototype.toString.call(arr) === '[object Array]';
  15710. }
  15711. // 深度克隆
  15712. function deepClone(obj) {
  15713. // 对常见的“非”值,直接返回原来值
  15714. if ([null, undefined, NaN, false].includes(obj)) return obj;
  15715. if ((0, _typeof2.default)(obj) !== "object" && typeof obj !== 'function') {
  15716. //原始类型直接返回
  15717. return obj;
  15718. }
  15719. var o = isArray(obj) ? [] : {};
  15720. for (var i in obj) {
  15721. if (obj.hasOwnProperty(i)) {
  15722. o[i] = (0, _typeof2.default)(obj[i]) === "object" ? deepClone(obj[i]) : obj[i];
  15723. }
  15724. }
  15725. return o;
  15726. }
  15727. var _default = deepClone;
  15728. exports.default = _default;
  15729. /***/ }),
  15730. /***/ 47:
  15731. /*!*****************************************************************!*\
  15732. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/test.js ***!
  15733. \*****************************************************************/
  15734. /*! no static exports found */
  15735. /***/ (function(module, exports, __webpack_require__) {
  15736. "use strict";
  15737. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15738. Object.defineProperty(exports, "__esModule", {
  15739. value: true
  15740. });
  15741. exports.default = void 0;
  15742. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15743. /**
  15744. * 验证电子邮箱格式
  15745. */
  15746. function email(value) {
  15747. return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
  15748. }
  15749. /**
  15750. * 验证手机格式
  15751. */
  15752. function mobile(value) {
  15753. return /^1[3-9]\d{9}$/.test(value);
  15754. }
  15755. /**
  15756. * 验证URL格式
  15757. */
  15758. function url(value) {
  15759. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  15760. }
  15761. /**
  15762. * 验证日期格式
  15763. */
  15764. function date(value) {
  15765. return !/Invalid|NaN/.test(new Date(value).toString());
  15766. }
  15767. /**
  15768. * 验证ISO类型的日期格式
  15769. */
  15770. function dateISO(value) {
  15771. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  15772. }
  15773. /**
  15774. * 验证十进制数字
  15775. */
  15776. function number(value) {
  15777. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  15778. }
  15779. /**
  15780. * 验证整数
  15781. */
  15782. function digits(value) {
  15783. return /^\d+$/.test(value);
  15784. }
  15785. /**
  15786. * 验证身份证号码
  15787. */
  15788. function idCard(value) {
  15789. 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);
  15790. }
  15791. /**
  15792. * 是否车牌号
  15793. */
  15794. function carNo(value) {
  15795. // 新能源车牌
  15796. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  15797. // 旧车牌
  15798. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  15799. if (value.length === 7) {
  15800. return creg.test(value);
  15801. } else if (value.length === 8) {
  15802. return xreg.test(value);
  15803. } else {
  15804. return false;
  15805. }
  15806. }
  15807. /**
  15808. * 金额,只允许2位小数
  15809. */
  15810. function amount(value) {
  15811. //金额,只允许保留两位小数
  15812. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  15813. }
  15814. /**
  15815. * 中文
  15816. */
  15817. function chinese(value) {
  15818. var reg = /^[\u4e00-\u9fa5]+$/gi;
  15819. return reg.test(value);
  15820. }
  15821. /**
  15822. * 只能输入字母
  15823. */
  15824. function letter(value) {
  15825. return /^[a-zA-Z]*$/.test(value);
  15826. }
  15827. /**
  15828. * 只能是字母或者数字
  15829. */
  15830. function enOrNum(value) {
  15831. //英文或者数字
  15832. var reg = /^[0-9a-zA-Z]*$/g;
  15833. return reg.test(value);
  15834. }
  15835. /**
  15836. * 验证是否包含某个值
  15837. */
  15838. function contains(value, param) {
  15839. return value.indexOf(param) >= 0;
  15840. }
  15841. /**
  15842. * 验证一个值范围[min, max]
  15843. */
  15844. function range(value, param) {
  15845. return value >= param[0] && value <= param[1];
  15846. }
  15847. /**
  15848. * 验证一个长度范围[min, max]
  15849. */
  15850. function rangeLength(value, param) {
  15851. return value.length >= param[0] && value.length <= param[1];
  15852. }
  15853. /**
  15854. * 是否固定电话
  15855. */
  15856. function landline(value) {
  15857. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  15858. return reg.test(value);
  15859. }
  15860. /**
  15861. * 判断是否为空
  15862. */
  15863. function empty(value) {
  15864. switch ((0, _typeof2.default)(value)) {
  15865. case 'undefined':
  15866. return true;
  15867. case 'string':
  15868. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  15869. break;
  15870. case 'boolean':
  15871. if (!value) return true;
  15872. break;
  15873. case 'number':
  15874. if (0 === value || isNaN(value)) return true;
  15875. break;
  15876. case 'object':
  15877. if (null === value || value.length === 0) return true;
  15878. for (var i in value) {
  15879. return false;
  15880. }
  15881. return true;
  15882. }
  15883. return false;
  15884. }
  15885. /**
  15886. * 是否json字符串
  15887. */
  15888. function jsonString(value) {
  15889. if (typeof value == 'string') {
  15890. try {
  15891. var obj = JSON.parse(value);
  15892. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  15893. return true;
  15894. } else {
  15895. return false;
  15896. }
  15897. } catch (e) {
  15898. return false;
  15899. }
  15900. }
  15901. return false;
  15902. }
  15903. /**
  15904. * 是否数组
  15905. */
  15906. function array(value) {
  15907. if (typeof Array.isArray === "function") {
  15908. return Array.isArray(value);
  15909. } else {
  15910. return Object.prototype.toString.call(value) === "[object Array]";
  15911. }
  15912. }
  15913. /**
  15914. * 是否对象
  15915. */
  15916. function object(value) {
  15917. return Object.prototype.toString.call(value) === '[object Object]';
  15918. }
  15919. /**
  15920. * 是否短信验证码
  15921. */
  15922. function code(value) {
  15923. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  15924. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  15925. }
  15926. var _default = {
  15927. email: email,
  15928. mobile: mobile,
  15929. url: url,
  15930. date: date,
  15931. dateISO: dateISO,
  15932. number: number,
  15933. digits: digits,
  15934. idCard: idCard,
  15935. carNo: carNo,
  15936. amount: amount,
  15937. chinese: chinese,
  15938. letter: letter,
  15939. enOrNum: enOrNum,
  15940. contains: contains,
  15941. range: range,
  15942. rangeLength: rangeLength,
  15943. empty: empty,
  15944. isEmpty: empty,
  15945. jsonString: jsonString,
  15946. landline: landline,
  15947. object: object,
  15948. array: array,
  15949. code: code
  15950. };
  15951. exports.default = _default;
  15952. /***/ }),
  15953. /***/ 477:
  15954. /*!*****************************************************************!*\
  15955. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/province.js ***!
  15956. \*****************************************************************/
  15957. /*! no static exports found */
  15958. /***/ (function(module, exports, __webpack_require__) {
  15959. "use strict";
  15960. Object.defineProperty(exports, "__esModule", {
  15961. value: true
  15962. });
  15963. exports.default = void 0;
  15964. var provinceData = [{
  15965. "label": "北京市",
  15966. "value": "11"
  15967. }, {
  15968. "label": "天津市",
  15969. "value": "12"
  15970. }, {
  15971. "label": "河北省",
  15972. "value": "13"
  15973. }, {
  15974. "label": "山西省",
  15975. "value": "14"
  15976. }, {
  15977. "label": "内蒙古自治区",
  15978. "value": "15"
  15979. }, {
  15980. "label": "辽宁省",
  15981. "value": "21"
  15982. }, {
  15983. "label": "吉林省",
  15984. "value": "22"
  15985. }, {
  15986. "label": "黑龙江省",
  15987. "value": "23"
  15988. }, {
  15989. "label": "上海市",
  15990. "value": "31"
  15991. }, {
  15992. "label": "江苏省",
  15993. "value": "32"
  15994. }, {
  15995. "label": "浙江省",
  15996. "value": "33"
  15997. }, {
  15998. "label": "安徽省",
  15999. "value": "34"
  16000. }, {
  16001. "label": "福建省",
  16002. "value": "35"
  16003. }, {
  16004. "label": "江西省",
  16005. "value": "36"
  16006. }, {
  16007. "label": "山东省",
  16008. "value": "37"
  16009. }, {
  16010. "label": "河南省",
  16011. "value": "41"
  16012. }, {
  16013. "label": "湖北省",
  16014. "value": "42"
  16015. }, {
  16016. "label": "湖南省",
  16017. "value": "43"
  16018. }, {
  16019. "label": "广东省",
  16020. "value": "44"
  16021. }, {
  16022. "label": "广西壮族自治区",
  16023. "value": "45"
  16024. }, {
  16025. "label": "海南省",
  16026. "value": "46"
  16027. }, {
  16028. "label": "重庆市",
  16029. "value": "50"
  16030. }, {
  16031. "label": "四川省",
  16032. "value": "51"
  16033. }, {
  16034. "label": "贵州省",
  16035. "value": "52"
  16036. }, {
  16037. "label": "云南省",
  16038. "value": "53"
  16039. }, {
  16040. "label": "西藏自治区",
  16041. "value": "54"
  16042. }, {
  16043. "label": "陕西省",
  16044. "value": "61"
  16045. }, {
  16046. "label": "甘肃省",
  16047. "value": "62"
  16048. }, {
  16049. "label": "青海省",
  16050. "value": "63"
  16051. }, {
  16052. "label": "宁夏回族自治区",
  16053. "value": "64"
  16054. }, {
  16055. "label": "新疆维吾尔自治区",
  16056. "value": "65"
  16057. }, {
  16058. "label": "台湾",
  16059. "value": "66"
  16060. }, {
  16061. "label": "香港",
  16062. "value": "67"
  16063. }, {
  16064. "label": "澳门",
  16065. "value": "68"
  16066. }];
  16067. var _default = provinceData;
  16068. exports.default = _default;
  16069. /***/ }),
  16070. /***/ 478:
  16071. /*!*************************************************************!*\
  16072. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/city.js ***!
  16073. \*************************************************************/
  16074. /*! no static exports found */
  16075. /***/ (function(module, exports, __webpack_require__) {
  16076. "use strict";
  16077. Object.defineProperty(exports, "__esModule", {
  16078. value: true
  16079. });
  16080. exports.default = void 0;
  16081. var cityData = [[{
  16082. "label": "市辖区",
  16083. "value": "1101"
  16084. }], [{
  16085. "label": "市辖区",
  16086. "value": "1201"
  16087. }], [{
  16088. "label": "石家庄市",
  16089. "value": "1301"
  16090. }, {
  16091. "label": "唐山市",
  16092. "value": "1302"
  16093. }, {
  16094. "label": "秦皇岛市",
  16095. "value": "1303"
  16096. }, {
  16097. "label": "邯郸市",
  16098. "value": "1304"
  16099. }, {
  16100. "label": "邢台市",
  16101. "value": "1305"
  16102. }, {
  16103. "label": "保定市",
  16104. "value": "1306"
  16105. }, {
  16106. "label": "张家口市",
  16107. "value": "1307"
  16108. }, {
  16109. "label": "承德市",
  16110. "value": "1308"
  16111. }, {
  16112. "label": "沧州市",
  16113. "value": "1309"
  16114. }, {
  16115. "label": "廊坊市",
  16116. "value": "1310"
  16117. }, {
  16118. "label": "衡水市",
  16119. "value": "1311"
  16120. }], [{
  16121. "label": "太原市",
  16122. "value": "1401"
  16123. }, {
  16124. "label": "大同市",
  16125. "value": "1402"
  16126. }, {
  16127. "label": "阳泉市",
  16128. "value": "1403"
  16129. }, {
  16130. "label": "长治市",
  16131. "value": "1404"
  16132. }, {
  16133. "label": "晋城市",
  16134. "value": "1405"
  16135. }, {
  16136. "label": "朔州市",
  16137. "value": "1406"
  16138. }, {
  16139. "label": "晋中市",
  16140. "value": "1407"
  16141. }, {
  16142. "label": "运城市",
  16143. "value": "1408"
  16144. }, {
  16145. "label": "忻州市",
  16146. "value": "1409"
  16147. }, {
  16148. "label": "临汾市",
  16149. "value": "1410"
  16150. }, {
  16151. "label": "吕梁市",
  16152. "value": "1411"
  16153. }], [{
  16154. "label": "呼和浩特市",
  16155. "value": "1501"
  16156. }, {
  16157. "label": "包头市",
  16158. "value": "1502"
  16159. }, {
  16160. "label": "乌海市",
  16161. "value": "1503"
  16162. }, {
  16163. "label": "赤峰市",
  16164. "value": "1504"
  16165. }, {
  16166. "label": "通辽市",
  16167. "value": "1505"
  16168. }, {
  16169. "label": "鄂尔多斯市",
  16170. "value": "1506"
  16171. }, {
  16172. "label": "呼伦贝尔市",
  16173. "value": "1507"
  16174. }, {
  16175. "label": "巴彦淖尔市",
  16176. "value": "1508"
  16177. }, {
  16178. "label": "乌兰察布市",
  16179. "value": "1509"
  16180. }, {
  16181. "label": "兴安盟",
  16182. "value": "1522"
  16183. }, {
  16184. "label": "锡林郭勒盟",
  16185. "value": "1525"
  16186. }, {
  16187. "label": "阿拉善盟",
  16188. "value": "1529"
  16189. }], [{
  16190. "label": "沈阳市",
  16191. "value": "2101"
  16192. }, {
  16193. "label": "大连市",
  16194. "value": "2102"
  16195. }, {
  16196. "label": "鞍山市",
  16197. "value": "2103"
  16198. }, {
  16199. "label": "抚顺市",
  16200. "value": "2104"
  16201. }, {
  16202. "label": "本溪市",
  16203. "value": "2105"
  16204. }, {
  16205. "label": "丹东市",
  16206. "value": "2106"
  16207. }, {
  16208. "label": "锦州市",
  16209. "value": "2107"
  16210. }, {
  16211. "label": "营口市",
  16212. "value": "2108"
  16213. }, {
  16214. "label": "阜新市",
  16215. "value": "2109"
  16216. }, {
  16217. "label": "辽阳市",
  16218. "value": "2110"
  16219. }, {
  16220. "label": "盘锦市",
  16221. "value": "2111"
  16222. }, {
  16223. "label": "铁岭市",
  16224. "value": "2112"
  16225. }, {
  16226. "label": "朝阳市",
  16227. "value": "2113"
  16228. }, {
  16229. "label": "葫芦岛市",
  16230. "value": "2114"
  16231. }], [{
  16232. "label": "长春市",
  16233. "value": "2201"
  16234. }, {
  16235. "label": "吉林市",
  16236. "value": "2202"
  16237. }, {
  16238. "label": "四平市",
  16239. "value": "2203"
  16240. }, {
  16241. "label": "辽源市",
  16242. "value": "2204"
  16243. }, {
  16244. "label": "通化市",
  16245. "value": "2205"
  16246. }, {
  16247. "label": "白山市",
  16248. "value": "2206"
  16249. }, {
  16250. "label": "松原市",
  16251. "value": "2207"
  16252. }, {
  16253. "label": "白城市",
  16254. "value": "2208"
  16255. }, {
  16256. "label": "延边朝鲜族自治州",
  16257. "value": "2224"
  16258. }], [{
  16259. "label": "哈尔滨市",
  16260. "value": "2301"
  16261. }, {
  16262. "label": "齐齐哈尔市",
  16263. "value": "2302"
  16264. }, {
  16265. "label": "鸡西市",
  16266. "value": "2303"
  16267. }, {
  16268. "label": "鹤岗市",
  16269. "value": "2304"
  16270. }, {
  16271. "label": "双鸭山市",
  16272. "value": "2305"
  16273. }, {
  16274. "label": "大庆市",
  16275. "value": "2306"
  16276. }, {
  16277. "label": "伊春市",
  16278. "value": "2307"
  16279. }, {
  16280. "label": "佳木斯市",
  16281. "value": "2308"
  16282. }, {
  16283. "label": "七台河市",
  16284. "value": "2309"
  16285. }, {
  16286. "label": "牡丹江市",
  16287. "value": "2310"
  16288. }, {
  16289. "label": "黑河市",
  16290. "value": "2311"
  16291. }, {
  16292. "label": "绥化市",
  16293. "value": "2312"
  16294. }, {
  16295. "label": "大兴安岭地区",
  16296. "value": "2327"
  16297. }], [{
  16298. "label": "市辖区",
  16299. "value": "3101"
  16300. }], [{
  16301. "label": "南京市",
  16302. "value": "3201"
  16303. }, {
  16304. "label": "无锡市",
  16305. "value": "3202"
  16306. }, {
  16307. "label": "徐州市",
  16308. "value": "3203"
  16309. }, {
  16310. "label": "常州市",
  16311. "value": "3204"
  16312. }, {
  16313. "label": "苏州市",
  16314. "value": "3205"
  16315. }, {
  16316. "label": "南通市",
  16317. "value": "3206"
  16318. }, {
  16319. "label": "连云港市",
  16320. "value": "3207"
  16321. }, {
  16322. "label": "淮安市",
  16323. "value": "3208"
  16324. }, {
  16325. "label": "盐城市",
  16326. "value": "3209"
  16327. }, {
  16328. "label": "扬州市",
  16329. "value": "3210"
  16330. }, {
  16331. "label": "镇江市",
  16332. "value": "3211"
  16333. }, {
  16334. "label": "泰州市",
  16335. "value": "3212"
  16336. }, {
  16337. "label": "宿迁市",
  16338. "value": "3213"
  16339. }], [{
  16340. "label": "杭州市",
  16341. "value": "3301"
  16342. }, {
  16343. "label": "宁波市",
  16344. "value": "3302"
  16345. }, {
  16346. "label": "温州市",
  16347. "value": "3303"
  16348. }, {
  16349. "label": "嘉兴市",
  16350. "value": "3304"
  16351. }, {
  16352. "label": "湖州市",
  16353. "value": "3305"
  16354. }, {
  16355. "label": "绍兴市",
  16356. "value": "3306"
  16357. }, {
  16358. "label": "金华市",
  16359. "value": "3307"
  16360. }, {
  16361. "label": "衢州市",
  16362. "value": "3308"
  16363. }, {
  16364. "label": "舟山市",
  16365. "value": "3309"
  16366. }, {
  16367. "label": "台州市",
  16368. "value": "3310"
  16369. }, {
  16370. "label": "丽水市",
  16371. "value": "3311"
  16372. }], [{
  16373. "label": "合肥市",
  16374. "value": "3401"
  16375. }, {
  16376. "label": "芜湖市",
  16377. "value": "3402"
  16378. }, {
  16379. "label": "蚌埠市",
  16380. "value": "3403"
  16381. }, {
  16382. "label": "淮南市",
  16383. "value": "3404"
  16384. }, {
  16385. "label": "马鞍山市",
  16386. "value": "3405"
  16387. }, {
  16388. "label": "淮北市",
  16389. "value": "3406"
  16390. }, {
  16391. "label": "铜陵市",
  16392. "value": "3407"
  16393. }, {
  16394. "label": "安庆市",
  16395. "value": "3408"
  16396. }, {
  16397. "label": "黄山市",
  16398. "value": "3410"
  16399. }, {
  16400. "label": "滁州市",
  16401. "value": "3411"
  16402. }, {
  16403. "label": "阜阳市",
  16404. "value": "3412"
  16405. }, {
  16406. "label": "宿州市",
  16407. "value": "3413"
  16408. }, {
  16409. "label": "六安市",
  16410. "value": "3415"
  16411. }, {
  16412. "label": "亳州市",
  16413. "value": "3416"
  16414. }, {
  16415. "label": "池州市",
  16416. "value": "3417"
  16417. }, {
  16418. "label": "宣城市",
  16419. "value": "3418"
  16420. }], [{
  16421. "label": "福州市",
  16422. "value": "3501"
  16423. }, {
  16424. "label": "厦门市",
  16425. "value": "3502"
  16426. }, {
  16427. "label": "莆田市",
  16428. "value": "3503"
  16429. }, {
  16430. "label": "三明市",
  16431. "value": "3504"
  16432. }, {
  16433. "label": "泉州市",
  16434. "value": "3505"
  16435. }, {
  16436. "label": "漳州市",
  16437. "value": "3506"
  16438. }, {
  16439. "label": "南平市",
  16440. "value": "3507"
  16441. }, {
  16442. "label": "龙岩市",
  16443. "value": "3508"
  16444. }, {
  16445. "label": "宁德市",
  16446. "value": "3509"
  16447. }], [{
  16448. "label": "南昌市",
  16449. "value": "3601"
  16450. }, {
  16451. "label": "景德镇市",
  16452. "value": "3602"
  16453. }, {
  16454. "label": "萍乡市",
  16455. "value": "3603"
  16456. }, {
  16457. "label": "九江市",
  16458. "value": "3604"
  16459. }, {
  16460. "label": "新余市",
  16461. "value": "3605"
  16462. }, {
  16463. "label": "鹰潭市",
  16464. "value": "3606"
  16465. }, {
  16466. "label": "赣州市",
  16467. "value": "3607"
  16468. }, {
  16469. "label": "吉安市",
  16470. "value": "3608"
  16471. }, {
  16472. "label": "宜春市",
  16473. "value": "3609"
  16474. }, {
  16475. "label": "抚州市",
  16476. "value": "3610"
  16477. }, {
  16478. "label": "上饶市",
  16479. "value": "3611"
  16480. }], [{
  16481. "label": "济南市",
  16482. "value": "3701"
  16483. }, {
  16484. "label": "青岛市",
  16485. "value": "3702"
  16486. }, {
  16487. "label": "淄博市",
  16488. "value": "3703"
  16489. }, {
  16490. "label": "枣庄市",
  16491. "value": "3704"
  16492. }, {
  16493. "label": "东营市",
  16494. "value": "3705"
  16495. }, {
  16496. "label": "烟台市",
  16497. "value": "3706"
  16498. }, {
  16499. "label": "潍坊市",
  16500. "value": "3707"
  16501. }, {
  16502. "label": "济宁市",
  16503. "value": "3708"
  16504. }, {
  16505. "label": "泰安市",
  16506. "value": "3709"
  16507. }, {
  16508. "label": "威海市",
  16509. "value": "3710"
  16510. }, {
  16511. "label": "日照市",
  16512. "value": "3711"
  16513. }, {
  16514. "label": "莱芜市",
  16515. "value": "3712"
  16516. }, {
  16517. "label": "临沂市",
  16518. "value": "3713"
  16519. }, {
  16520. "label": "德州市",
  16521. "value": "3714"
  16522. }, {
  16523. "label": "聊城市",
  16524. "value": "3715"
  16525. }, {
  16526. "label": "滨州市",
  16527. "value": "3716"
  16528. }, {
  16529. "label": "菏泽市",
  16530. "value": "3717"
  16531. }], [{
  16532. "label": "郑州市",
  16533. "value": "4101"
  16534. }, {
  16535. "label": "开封市",
  16536. "value": "4102"
  16537. }, {
  16538. "label": "洛阳市",
  16539. "value": "4103"
  16540. }, {
  16541. "label": "平顶山市",
  16542. "value": "4104"
  16543. }, {
  16544. "label": "安阳市",
  16545. "value": "4105"
  16546. }, {
  16547. "label": "鹤壁市",
  16548. "value": "4106"
  16549. }, {
  16550. "label": "新乡市",
  16551. "value": "4107"
  16552. }, {
  16553. "label": "焦作市",
  16554. "value": "4108"
  16555. }, {
  16556. "label": "濮阳市",
  16557. "value": "4109"
  16558. }, {
  16559. "label": "许昌市",
  16560. "value": "4110"
  16561. }, {
  16562. "label": "漯河市",
  16563. "value": "4111"
  16564. }, {
  16565. "label": "三门峡市",
  16566. "value": "4112"
  16567. }, {
  16568. "label": "南阳市",
  16569. "value": "4113"
  16570. }, {
  16571. "label": "商丘市",
  16572. "value": "4114"
  16573. }, {
  16574. "label": "信阳市",
  16575. "value": "4115"
  16576. }, {
  16577. "label": "周口市",
  16578. "value": "4116"
  16579. }, {
  16580. "label": "驻马店市",
  16581. "value": "4117"
  16582. }, {
  16583. "label": "省直辖县级行政区划",
  16584. "value": "4190"
  16585. }], [{
  16586. "label": "武汉市",
  16587. "value": "4201"
  16588. }, {
  16589. "label": "黄石市",
  16590. "value": "4202"
  16591. }, {
  16592. "label": "十堰市",
  16593. "value": "4203"
  16594. }, {
  16595. "label": "宜昌市",
  16596. "value": "4205"
  16597. }, {
  16598. "label": "襄阳市",
  16599. "value": "4206"
  16600. }, {
  16601. "label": "鄂州市",
  16602. "value": "4207"
  16603. }, {
  16604. "label": "荆门市",
  16605. "value": "4208"
  16606. }, {
  16607. "label": "孝感市",
  16608. "value": "4209"
  16609. }, {
  16610. "label": "荆州市",
  16611. "value": "4210"
  16612. }, {
  16613. "label": "黄冈市",
  16614. "value": "4211"
  16615. }, {
  16616. "label": "咸宁市",
  16617. "value": "4212"
  16618. }, {
  16619. "label": "随州市",
  16620. "value": "4213"
  16621. }, {
  16622. "label": "恩施土家族苗族自治州",
  16623. "value": "4228"
  16624. }, {
  16625. "label": "省直辖县级行政区划",
  16626. "value": "4290"
  16627. }], [{
  16628. "label": "长沙市",
  16629. "value": "4301"
  16630. }, {
  16631. "label": "株洲市",
  16632. "value": "4302"
  16633. }, {
  16634. "label": "湘潭市",
  16635. "value": "4303"
  16636. }, {
  16637. "label": "衡阳市",
  16638. "value": "4304"
  16639. }, {
  16640. "label": "邵阳市",
  16641. "value": "4305"
  16642. }, {
  16643. "label": "岳阳市",
  16644. "value": "4306"
  16645. }, {
  16646. "label": "常德市",
  16647. "value": "4307"
  16648. }, {
  16649. "label": "张家界市",
  16650. "value": "4308"
  16651. }, {
  16652. "label": "益阳市",
  16653. "value": "4309"
  16654. }, {
  16655. "label": "郴州市",
  16656. "value": "4310"
  16657. }, {
  16658. "label": "永州市",
  16659. "value": "4311"
  16660. }, {
  16661. "label": "怀化市",
  16662. "value": "4312"
  16663. }, {
  16664. "label": "娄底市",
  16665. "value": "4313"
  16666. }, {
  16667. "label": "湘西土家族苗族自治州",
  16668. "value": "4331"
  16669. }], [{
  16670. "label": "广州市",
  16671. "value": "4401"
  16672. }, {
  16673. "label": "韶关市",
  16674. "value": "4402"
  16675. }, {
  16676. "label": "深圳市",
  16677. "value": "4403"
  16678. }, {
  16679. "label": "珠海市",
  16680. "value": "4404"
  16681. }, {
  16682. "label": "汕头市",
  16683. "value": "4405"
  16684. }, {
  16685. "label": "佛山市",
  16686. "value": "4406"
  16687. }, {
  16688. "label": "江门市",
  16689. "value": "4407"
  16690. }, {
  16691. "label": "湛江市",
  16692. "value": "4408"
  16693. }, {
  16694. "label": "茂名市",
  16695. "value": "4409"
  16696. }, {
  16697. "label": "肇庆市",
  16698. "value": "4412"
  16699. }, {
  16700. "label": "惠州市",
  16701. "value": "4413"
  16702. }, {
  16703. "label": "梅州市",
  16704. "value": "4414"
  16705. }, {
  16706. "label": "汕尾市",
  16707. "value": "4415"
  16708. }, {
  16709. "label": "河源市",
  16710. "value": "4416"
  16711. }, {
  16712. "label": "阳江市",
  16713. "value": "4417"
  16714. }, {
  16715. "label": "清远市",
  16716. "value": "4418"
  16717. }, {
  16718. "label": "东莞市",
  16719. "value": "4419"
  16720. }, {
  16721. "label": "中山市",
  16722. "value": "4420"
  16723. }, {
  16724. "label": "潮州市",
  16725. "value": "4451"
  16726. }, {
  16727. "label": "揭阳市",
  16728. "value": "4452"
  16729. }, {
  16730. "label": "云浮市",
  16731. "value": "4453"
  16732. }], [{
  16733. "label": "南宁市",
  16734. "value": "4501"
  16735. }, {
  16736. "label": "柳州市",
  16737. "value": "4502"
  16738. }, {
  16739. "label": "桂林市",
  16740. "value": "4503"
  16741. }, {
  16742. "label": "梧州市",
  16743. "value": "4504"
  16744. }, {
  16745. "label": "北海市",
  16746. "value": "4505"
  16747. }, {
  16748. "label": "防城港市",
  16749. "value": "4506"
  16750. }, {
  16751. "label": "钦州市",
  16752. "value": "4507"
  16753. }, {
  16754. "label": "贵港市",
  16755. "value": "4508"
  16756. }, {
  16757. "label": "玉林市",
  16758. "value": "4509"
  16759. }, {
  16760. "label": "百色市",
  16761. "value": "4510"
  16762. }, {
  16763. "label": "贺州市",
  16764. "value": "4511"
  16765. }, {
  16766. "label": "河池市",
  16767. "value": "4512"
  16768. }, {
  16769. "label": "来宾市",
  16770. "value": "4513"
  16771. }, {
  16772. "label": "崇左市",
  16773. "value": "4514"
  16774. }], [{
  16775. "label": "海口市",
  16776. "value": "4601"
  16777. }, {
  16778. "label": "三亚市",
  16779. "value": "4602"
  16780. }, {
  16781. "label": "三沙市",
  16782. "value": "4603"
  16783. }, {
  16784. "label": "儋州市",
  16785. "value": "4604"
  16786. }, {
  16787. "label": "省直辖县级行政区划",
  16788. "value": "4690"
  16789. }], [{
  16790. "label": "市辖区",
  16791. "value": "5001"
  16792. }, {
  16793. "label": "县",
  16794. "value": "5002"
  16795. }], [{
  16796. "label": "成都市",
  16797. "value": "5101"
  16798. }, {
  16799. "label": "自贡市",
  16800. "value": "5103"
  16801. }, {
  16802. "label": "攀枝花市",
  16803. "value": "5104"
  16804. }, {
  16805. "label": "泸州市",
  16806. "value": "5105"
  16807. }, {
  16808. "label": "德阳市",
  16809. "value": "5106"
  16810. }, {
  16811. "label": "绵阳市",
  16812. "value": "5107"
  16813. }, {
  16814. "label": "广元市",
  16815. "value": "5108"
  16816. }, {
  16817. "label": "遂宁市",
  16818. "value": "5109"
  16819. }, {
  16820. "label": "内江市",
  16821. "value": "5110"
  16822. }, {
  16823. "label": "乐山市",
  16824. "value": "5111"
  16825. }, {
  16826. "label": "南充市",
  16827. "value": "5113"
  16828. }, {
  16829. "label": "眉山市",
  16830. "value": "5114"
  16831. }, {
  16832. "label": "宜宾市",
  16833. "value": "5115"
  16834. }, {
  16835. "label": "广安市",
  16836. "value": "5116"
  16837. }, {
  16838. "label": "达州市",
  16839. "value": "5117"
  16840. }, {
  16841. "label": "雅安市",
  16842. "value": "5118"
  16843. }, {
  16844. "label": "巴中市",
  16845. "value": "5119"
  16846. }, {
  16847. "label": "资阳市",
  16848. "value": "5120"
  16849. }, {
  16850. "label": "阿坝藏族羌族自治州",
  16851. "value": "5132"
  16852. }, {
  16853. "label": "甘孜藏族自治州",
  16854. "value": "5133"
  16855. }, {
  16856. "label": "凉山彝族自治州",
  16857. "value": "5134"
  16858. }], [{
  16859. "label": "贵阳市",
  16860. "value": "5201"
  16861. }, {
  16862. "label": "六盘水市",
  16863. "value": "5202"
  16864. }, {
  16865. "label": "遵义市",
  16866. "value": "5203"
  16867. }, {
  16868. "label": "安顺市",
  16869. "value": "5204"
  16870. }, {
  16871. "label": "毕节市",
  16872. "value": "5205"
  16873. }, {
  16874. "label": "铜仁市",
  16875. "value": "5206"
  16876. }, {
  16877. "label": "黔西南布依族苗族自治州",
  16878. "value": "5223"
  16879. }, {
  16880. "label": "黔东南苗族侗族自治州",
  16881. "value": "5226"
  16882. }, {
  16883. "label": "黔南布依族苗族自治州",
  16884. "value": "5227"
  16885. }], [{
  16886. "label": "昆明市",
  16887. "value": "5301"
  16888. }, {
  16889. "label": "曲靖市",
  16890. "value": "5303"
  16891. }, {
  16892. "label": "玉溪市",
  16893. "value": "5304"
  16894. }, {
  16895. "label": "保山市",
  16896. "value": "5305"
  16897. }, {
  16898. "label": "昭通市",
  16899. "value": "5306"
  16900. }, {
  16901. "label": "丽江市",
  16902. "value": "5307"
  16903. }, {
  16904. "label": "普洱市",
  16905. "value": "5308"
  16906. }, {
  16907. "label": "临沧市",
  16908. "value": "5309"
  16909. }, {
  16910. "label": "楚雄彝族自治州",
  16911. "value": "5323"
  16912. }, {
  16913. "label": "红河哈尼族彝族自治州",
  16914. "value": "5325"
  16915. }, {
  16916. "label": "文山壮族苗族自治州",
  16917. "value": "5326"
  16918. }, {
  16919. "label": "西双版纳傣族自治州",
  16920. "value": "5328"
  16921. }, {
  16922. "label": "大理白族自治州",
  16923. "value": "5329"
  16924. }, {
  16925. "label": "德宏傣族景颇族自治州",
  16926. "value": "5331"
  16927. }, {
  16928. "label": "怒江傈僳族自治州",
  16929. "value": "5333"
  16930. }, {
  16931. "label": "迪庆藏族自治州",
  16932. "value": "5334"
  16933. }], [{
  16934. "label": "拉萨市",
  16935. "value": "5401"
  16936. }, {
  16937. "label": "日喀则市",
  16938. "value": "5402"
  16939. }, {
  16940. "label": "昌都市",
  16941. "value": "5403"
  16942. }, {
  16943. "label": "林芝市",
  16944. "value": "5404"
  16945. }, {
  16946. "label": "山南市",
  16947. "value": "5405"
  16948. }, {
  16949. "label": "那曲地区",
  16950. "value": "5424"
  16951. }, {
  16952. "label": "阿里地区",
  16953. "value": "5425"
  16954. }], [{
  16955. "label": "西安市",
  16956. "value": "6101"
  16957. }, {
  16958. "label": "铜川市",
  16959. "value": "6102"
  16960. }, {
  16961. "label": "宝鸡市",
  16962. "value": "6103"
  16963. }, {
  16964. "label": "咸阳市",
  16965. "value": "6104"
  16966. }, {
  16967. "label": "渭南市",
  16968. "value": "6105"
  16969. }, {
  16970. "label": "延安市",
  16971. "value": "6106"
  16972. }, {
  16973. "label": "汉中市",
  16974. "value": "6107"
  16975. }, {
  16976. "label": "榆林市",
  16977. "value": "6108"
  16978. }, {
  16979. "label": "安康市",
  16980. "value": "6109"
  16981. }, {
  16982. "label": "商洛市",
  16983. "value": "6110"
  16984. }], [{
  16985. "label": "兰州市",
  16986. "value": "6201"
  16987. }, {
  16988. "label": "嘉峪关市",
  16989. "value": "6202"
  16990. }, {
  16991. "label": "金昌市",
  16992. "value": "6203"
  16993. }, {
  16994. "label": "白银市",
  16995. "value": "6204"
  16996. }, {
  16997. "label": "天水市",
  16998. "value": "6205"
  16999. }, {
  17000. "label": "武威市",
  17001. "value": "6206"
  17002. }, {
  17003. "label": "张掖市",
  17004. "value": "6207"
  17005. }, {
  17006. "label": "平凉市",
  17007. "value": "6208"
  17008. }, {
  17009. "label": "酒泉市",
  17010. "value": "6209"
  17011. }, {
  17012. "label": "庆阳市",
  17013. "value": "6210"
  17014. }, {
  17015. "label": "定西市",
  17016. "value": "6211"
  17017. }, {
  17018. "label": "陇南市",
  17019. "value": "6212"
  17020. }, {
  17021. "label": "临夏回族自治州",
  17022. "value": "6229"
  17023. }, {
  17024. "label": "甘南藏族自治州",
  17025. "value": "6230"
  17026. }], [{
  17027. "label": "西宁市",
  17028. "value": "6301"
  17029. }, {
  17030. "label": "海东市",
  17031. "value": "6302"
  17032. }, {
  17033. "label": "海北藏族自治州",
  17034. "value": "6322"
  17035. }, {
  17036. "label": "黄南藏族自治州",
  17037. "value": "6323"
  17038. }, {
  17039. "label": "海南藏族自治州",
  17040. "value": "6325"
  17041. }, {
  17042. "label": "果洛藏族自治州",
  17043. "value": "6326"
  17044. }, {
  17045. "label": "玉树藏族自治州",
  17046. "value": "6327"
  17047. }, {
  17048. "label": "海西蒙古族藏族自治州",
  17049. "value": "6328"
  17050. }], [{
  17051. "label": "银川市",
  17052. "value": "6401"
  17053. }, {
  17054. "label": "石嘴山市",
  17055. "value": "6402"
  17056. }, {
  17057. "label": "吴忠市",
  17058. "value": "6403"
  17059. }, {
  17060. "label": "固原市",
  17061. "value": "6404"
  17062. }, {
  17063. "label": "中卫市",
  17064. "value": "6405"
  17065. }], [{
  17066. "label": "乌鲁木齐市",
  17067. "value": "6501"
  17068. }, {
  17069. "label": "克拉玛依市",
  17070. "value": "6502"
  17071. }, {
  17072. "label": "吐鲁番市",
  17073. "value": "6504"
  17074. }, {
  17075. "label": "哈密市",
  17076. "value": "6505"
  17077. }, {
  17078. "label": "昌吉回族自治州",
  17079. "value": "6523"
  17080. }, {
  17081. "label": "博尔塔拉蒙古自治州",
  17082. "value": "6527"
  17083. }, {
  17084. "label": "巴音郭楞蒙古自治州",
  17085. "value": "6528"
  17086. }, {
  17087. "label": "阿克苏地区",
  17088. "value": "6529"
  17089. }, {
  17090. "label": "克孜勒苏柯尔克孜自治州",
  17091. "value": "6530"
  17092. }, {
  17093. "label": "喀什地区",
  17094. "value": "6531"
  17095. }, {
  17096. "label": "和田地区",
  17097. "value": "6532"
  17098. }, {
  17099. "label": "伊犁哈萨克自治州",
  17100. "value": "6540"
  17101. }, {
  17102. "label": "塔城地区",
  17103. "value": "6542"
  17104. }, {
  17105. "label": "阿勒泰地区",
  17106. "value": "6543"
  17107. }, {
  17108. "label": "自治区直辖县级行政区划",
  17109. "value": "6590"
  17110. }], [{
  17111. "label": "台北",
  17112. "value": "6601"
  17113. }, {
  17114. "label": "高雄",
  17115. "value": "6602"
  17116. }, {
  17117. "label": "基隆",
  17118. "value": "6603"
  17119. }, {
  17120. "label": "台中",
  17121. "value": "6604"
  17122. }, {
  17123. "label": "台南",
  17124. "value": "6605"
  17125. }, {
  17126. "label": "新竹",
  17127. "value": "6606"
  17128. }, {
  17129. "label": "嘉义",
  17130. "value": "6607"
  17131. }, {
  17132. "label": "宜兰",
  17133. "value": "6608"
  17134. }, {
  17135. "label": "桃园",
  17136. "value": "6609"
  17137. }, {
  17138. "label": "苗栗",
  17139. "value": "6610"
  17140. }, {
  17141. "label": "彰化",
  17142. "value": "6611"
  17143. }, {
  17144. "label": "南投",
  17145. "value": "6612"
  17146. }, {
  17147. "label": "云林",
  17148. "value": "6613"
  17149. }, {
  17150. "label": "屏东",
  17151. "value": "6614"
  17152. }, {
  17153. "label": "台东",
  17154. "value": "6615"
  17155. }, {
  17156. "label": "花莲",
  17157. "value": "6616"
  17158. }, {
  17159. "label": "澎湖",
  17160. "value": "6617"
  17161. }], [{
  17162. "label": "香港岛",
  17163. "value": "6701"
  17164. }, {
  17165. "label": "九龙",
  17166. "value": "6702"
  17167. }, {
  17168. "label": "新界",
  17169. "value": "6703"
  17170. }], [{
  17171. "label": "澳门半岛",
  17172. "value": "6801"
  17173. }, {
  17174. "label": "氹仔岛",
  17175. "value": "6802"
  17176. }, {
  17177. "label": "路环岛",
  17178. "value": "6803"
  17179. }, {
  17180. "label": "路氹城",
  17181. "value": "6804"
  17182. }]];
  17183. var _default = cityData;
  17184. exports.default = _default;
  17185. /***/ }),
  17186. /***/ 479:
  17187. /*!*************************************************************!*\
  17188. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/area.js ***!
  17189. \*************************************************************/
  17190. /*! no static exports found */
  17191. /***/ (function(module, exports, __webpack_require__) {
  17192. "use strict";
  17193. Object.defineProperty(exports, "__esModule", {
  17194. value: true
  17195. });
  17196. exports.default = void 0;
  17197. var areaData = [[[{
  17198. "label": "东城区",
  17199. "value": "110101"
  17200. }, {
  17201. "label": "西城区",
  17202. "value": "110102"
  17203. }, {
  17204. "label": "朝阳区",
  17205. "value": "110105"
  17206. }, {
  17207. "label": "丰台区",
  17208. "value": "110106"
  17209. }, {
  17210. "label": "石景山区",
  17211. "value": "110107"
  17212. }, {
  17213. "label": "海淀区",
  17214. "value": "110108"
  17215. }, {
  17216. "label": "门头沟区",
  17217. "value": "110109"
  17218. }, {
  17219. "label": "房山区",
  17220. "value": "110111"
  17221. }, {
  17222. "label": "通州区",
  17223. "value": "110112"
  17224. }, {
  17225. "label": "顺义区",
  17226. "value": "110113"
  17227. }, {
  17228. "label": "昌平区",
  17229. "value": "110114"
  17230. }, {
  17231. "label": "大兴区",
  17232. "value": "110115"
  17233. }, {
  17234. "label": "怀柔区",
  17235. "value": "110116"
  17236. }, {
  17237. "label": "平谷区",
  17238. "value": "110117"
  17239. }, {
  17240. "label": "密云区",
  17241. "value": "110118"
  17242. }, {
  17243. "label": "延庆区",
  17244. "value": "110119"
  17245. }]], [[{
  17246. "label": "和平区",
  17247. "value": "120101"
  17248. }, {
  17249. "label": "河东区",
  17250. "value": "120102"
  17251. }, {
  17252. "label": "河西区",
  17253. "value": "120103"
  17254. }, {
  17255. "label": "南开区",
  17256. "value": "120104"
  17257. }, {
  17258. "label": "河北区",
  17259. "value": "120105"
  17260. }, {
  17261. "label": "红桥区",
  17262. "value": "120106"
  17263. }, {
  17264. "label": "东丽区",
  17265. "value": "120110"
  17266. }, {
  17267. "label": "西青区",
  17268. "value": "120111"
  17269. }, {
  17270. "label": "津南区",
  17271. "value": "120112"
  17272. }, {
  17273. "label": "北辰区",
  17274. "value": "120113"
  17275. }, {
  17276. "label": "武清区",
  17277. "value": "120114"
  17278. }, {
  17279. "label": "宝坻区",
  17280. "value": "120115"
  17281. }, {
  17282. "label": "滨海新区",
  17283. "value": "120116"
  17284. }, {
  17285. "label": "宁河区",
  17286. "value": "120117"
  17287. }, {
  17288. "label": "静海区",
  17289. "value": "120118"
  17290. }, {
  17291. "label": "蓟州区",
  17292. "value": "120119"
  17293. }]], [[{
  17294. "label": "长安区",
  17295. "value": "130102"
  17296. }, {
  17297. "label": "桥西区",
  17298. "value": "130104"
  17299. }, {
  17300. "label": "新华区",
  17301. "value": "130105"
  17302. }, {
  17303. "label": "井陉矿区",
  17304. "value": "130107"
  17305. }, {
  17306. "label": "裕华区",
  17307. "value": "130108"
  17308. }, {
  17309. "label": "藁城区",
  17310. "value": "130109"
  17311. }, {
  17312. "label": "鹿泉区",
  17313. "value": "130110"
  17314. }, {
  17315. "label": "栾城区",
  17316. "value": "130111"
  17317. }, {
  17318. "label": "井陉县",
  17319. "value": "130121"
  17320. }, {
  17321. "label": "正定县",
  17322. "value": "130123"
  17323. }, {
  17324. "label": "行唐县",
  17325. "value": "130125"
  17326. }, {
  17327. "label": "灵寿县",
  17328. "value": "130126"
  17329. }, {
  17330. "label": "高邑县",
  17331. "value": "130127"
  17332. }, {
  17333. "label": "深泽县",
  17334. "value": "130128"
  17335. }, {
  17336. "label": "赞皇县",
  17337. "value": "130129"
  17338. }, {
  17339. "label": "无极县",
  17340. "value": "130130"
  17341. }, {
  17342. "label": "平山县",
  17343. "value": "130131"
  17344. }, {
  17345. "label": "元氏县",
  17346. "value": "130132"
  17347. }, {
  17348. "label": "赵县",
  17349. "value": "130133"
  17350. }, {
  17351. "label": "石家庄高新技术产业开发区",
  17352. "value": "130171"
  17353. }, {
  17354. "label": "石家庄循环化工园区",
  17355. "value": "130172"
  17356. }, {
  17357. "label": "辛集市",
  17358. "value": "130181"
  17359. }, {
  17360. "label": "晋州市",
  17361. "value": "130183"
  17362. }, {
  17363. "label": "新乐市",
  17364. "value": "130184"
  17365. }], [{
  17366. "label": "路南区",
  17367. "value": "130202"
  17368. }, {
  17369. "label": "路北区",
  17370. "value": "130203"
  17371. }, {
  17372. "label": "古冶区",
  17373. "value": "130204"
  17374. }, {
  17375. "label": "开平区",
  17376. "value": "130205"
  17377. }, {
  17378. "label": "丰南区",
  17379. "value": "130207"
  17380. }, {
  17381. "label": "丰润区",
  17382. "value": "130208"
  17383. }, {
  17384. "label": "曹妃甸区",
  17385. "value": "130209"
  17386. }, {
  17387. "label": "滦县",
  17388. "value": "130223"
  17389. }, {
  17390. "label": "滦南县",
  17391. "value": "130224"
  17392. }, {
  17393. "label": "乐亭县",
  17394. "value": "130225"
  17395. }, {
  17396. "label": "迁西县",
  17397. "value": "130227"
  17398. }, {
  17399. "label": "玉田县",
  17400. "value": "130229"
  17401. }, {
  17402. "label": "唐山市芦台经济技术开发区",
  17403. "value": "130271"
  17404. }, {
  17405. "label": "唐山市汉沽管理区",
  17406. "value": "130272"
  17407. }, {
  17408. "label": "唐山高新技术产业开发区",
  17409. "value": "130273"
  17410. }, {
  17411. "label": "河北唐山海港经济开发区",
  17412. "value": "130274"
  17413. }, {
  17414. "label": "遵化市",
  17415. "value": "130281"
  17416. }, {
  17417. "label": "迁安市",
  17418. "value": "130283"
  17419. }], [{
  17420. "label": "海港区",
  17421. "value": "130302"
  17422. }, {
  17423. "label": "山海关区",
  17424. "value": "130303"
  17425. }, {
  17426. "label": "北戴河区",
  17427. "value": "130304"
  17428. }, {
  17429. "label": "抚宁区",
  17430. "value": "130306"
  17431. }, {
  17432. "label": "青龙满族自治县",
  17433. "value": "130321"
  17434. }, {
  17435. "label": "昌黎县",
  17436. "value": "130322"
  17437. }, {
  17438. "label": "卢龙县",
  17439. "value": "130324"
  17440. }, {
  17441. "label": "秦皇岛市经济技术开发区",
  17442. "value": "130371"
  17443. }, {
  17444. "label": "北戴河新区",
  17445. "value": "130372"
  17446. }], [{
  17447. "label": "邯山区",
  17448. "value": "130402"
  17449. }, {
  17450. "label": "丛台区",
  17451. "value": "130403"
  17452. }, {
  17453. "label": "复兴区",
  17454. "value": "130404"
  17455. }, {
  17456. "label": "峰峰矿区",
  17457. "value": "130406"
  17458. }, {
  17459. "label": "肥乡区",
  17460. "value": "130407"
  17461. }, {
  17462. "label": "永年区",
  17463. "value": "130408"
  17464. }, {
  17465. "label": "临漳县",
  17466. "value": "130423"
  17467. }, {
  17468. "label": "成安县",
  17469. "value": "130424"
  17470. }, {
  17471. "label": "大名县",
  17472. "value": "130425"
  17473. }, {
  17474. "label": "涉县",
  17475. "value": "130426"
  17476. }, {
  17477. "label": "磁县",
  17478. "value": "130427"
  17479. }, {
  17480. "label": "邱县",
  17481. "value": "130430"
  17482. }, {
  17483. "label": "鸡泽县",
  17484. "value": "130431"
  17485. }, {
  17486. "label": "广平县",
  17487. "value": "130432"
  17488. }, {
  17489. "label": "馆陶县",
  17490. "value": "130433"
  17491. }, {
  17492. "label": "魏县",
  17493. "value": "130434"
  17494. }, {
  17495. "label": "曲周县",
  17496. "value": "130435"
  17497. }, {
  17498. "label": "邯郸经济技术开发区",
  17499. "value": "130471"
  17500. }, {
  17501. "label": "邯郸冀南新区",
  17502. "value": "130473"
  17503. }, {
  17504. "label": "武安市",
  17505. "value": "130481"
  17506. }], [{
  17507. "label": "桥东区",
  17508. "value": "130502"
  17509. }, {
  17510. "label": "桥西区",
  17511. "value": "130503"
  17512. }, {
  17513. "label": "邢台县",
  17514. "value": "130521"
  17515. }, {
  17516. "label": "临城县",
  17517. "value": "130522"
  17518. }, {
  17519. "label": "内丘县",
  17520. "value": "130523"
  17521. }, {
  17522. "label": "柏乡县",
  17523. "value": "130524"
  17524. }, {
  17525. "label": "隆尧县",
  17526. "value": "130525"
  17527. }, {
  17528. "label": "任县",
  17529. "value": "130526"
  17530. }, {
  17531. "label": "南和县",
  17532. "value": "130527"
  17533. }, {
  17534. "label": "宁晋县",
  17535. "value": "130528"
  17536. }, {
  17537. "label": "巨鹿县",
  17538. "value": "130529"
  17539. }, {
  17540. "label": "新河县",
  17541. "value": "130530"
  17542. }, {
  17543. "label": "广宗县",
  17544. "value": "130531"
  17545. }, {
  17546. "label": "平乡县",
  17547. "value": "130532"
  17548. }, {
  17549. "label": "威县",
  17550. "value": "130533"
  17551. }, {
  17552. "label": "清河县",
  17553. "value": "130534"
  17554. }, {
  17555. "label": "临西县",
  17556. "value": "130535"
  17557. }, {
  17558. "label": "河北邢台经济开发区",
  17559. "value": "130571"
  17560. }, {
  17561. "label": "南宫市",
  17562. "value": "130581"
  17563. }, {
  17564. "label": "沙河市",
  17565. "value": "130582"
  17566. }], [{
  17567. "label": "竞秀区",
  17568. "value": "130602"
  17569. }, {
  17570. "label": "莲池区",
  17571. "value": "130606"
  17572. }, {
  17573. "label": "满城区",
  17574. "value": "130607"
  17575. }, {
  17576. "label": "清苑区",
  17577. "value": "130608"
  17578. }, {
  17579. "label": "徐水区",
  17580. "value": "130609"
  17581. }, {
  17582. "label": "涞水县",
  17583. "value": "130623"
  17584. }, {
  17585. "label": "阜平县",
  17586. "value": "130624"
  17587. }, {
  17588. "label": "定兴县",
  17589. "value": "130626"
  17590. }, {
  17591. "label": "唐县",
  17592. "value": "130627"
  17593. }, {
  17594. "label": "高阳县",
  17595. "value": "130628"
  17596. }, {
  17597. "label": "容城县",
  17598. "value": "130629"
  17599. }, {
  17600. "label": "涞源县",
  17601. "value": "130630"
  17602. }, {
  17603. "label": "望都县",
  17604. "value": "130631"
  17605. }, {
  17606. "label": "安新县",
  17607. "value": "130632"
  17608. }, {
  17609. "label": "易县",
  17610. "value": "130633"
  17611. }, {
  17612. "label": "曲阳县",
  17613. "value": "130634"
  17614. }, {
  17615. "label": "蠡县",
  17616. "value": "130635"
  17617. }, {
  17618. "label": "顺平县",
  17619. "value": "130636"
  17620. }, {
  17621. "label": "博野县",
  17622. "value": "130637"
  17623. }, {
  17624. "label": "雄县",
  17625. "value": "130638"
  17626. }, {
  17627. "label": "保定高新技术产业开发区",
  17628. "value": "130671"
  17629. }, {
  17630. "label": "保定白沟新城",
  17631. "value": "130672"
  17632. }, {
  17633. "label": "涿州市",
  17634. "value": "130681"
  17635. }, {
  17636. "label": "定州市",
  17637. "value": "130682"
  17638. }, {
  17639. "label": "安国市",
  17640. "value": "130683"
  17641. }, {
  17642. "label": "高碑店市",
  17643. "value": "130684"
  17644. }], [{
  17645. "label": "桥东区",
  17646. "value": "130702"
  17647. }, {
  17648. "label": "桥西区",
  17649. "value": "130703"
  17650. }, {
  17651. "label": "宣化区",
  17652. "value": "130705"
  17653. }, {
  17654. "label": "下花园区",
  17655. "value": "130706"
  17656. }, {
  17657. "label": "万全区",
  17658. "value": "130708"
  17659. }, {
  17660. "label": "崇礼区",
  17661. "value": "130709"
  17662. }, {
  17663. "label": "张北县",
  17664. "value": "130722"
  17665. }, {
  17666. "label": "康保县",
  17667. "value": "130723"
  17668. }, {
  17669. "label": "沽源县",
  17670. "value": "130724"
  17671. }, {
  17672. "label": "尚义县",
  17673. "value": "130725"
  17674. }, {
  17675. "label": "蔚县",
  17676. "value": "130726"
  17677. }, {
  17678. "label": "阳原县",
  17679. "value": "130727"
  17680. }, {
  17681. "label": "怀安县",
  17682. "value": "130728"
  17683. }, {
  17684. "label": "怀来县",
  17685. "value": "130730"
  17686. }, {
  17687. "label": "涿鹿县",
  17688. "value": "130731"
  17689. }, {
  17690. "label": "赤城县",
  17691. "value": "130732"
  17692. }, {
  17693. "label": "张家口市高新技术产业开发区",
  17694. "value": "130771"
  17695. }, {
  17696. "label": "张家口市察北管理区",
  17697. "value": "130772"
  17698. }, {
  17699. "label": "张家口市塞北管理区",
  17700. "value": "130773"
  17701. }], [{
  17702. "label": "双桥区",
  17703. "value": "130802"
  17704. }, {
  17705. "label": "双滦区",
  17706. "value": "130803"
  17707. }, {
  17708. "label": "鹰手营子矿区",
  17709. "value": "130804"
  17710. }, {
  17711. "label": "承德县",
  17712. "value": "130821"
  17713. }, {
  17714. "label": "兴隆县",
  17715. "value": "130822"
  17716. }, {
  17717. "label": "滦平县",
  17718. "value": "130824"
  17719. }, {
  17720. "label": "隆化县",
  17721. "value": "130825"
  17722. }, {
  17723. "label": "丰宁满族自治县",
  17724. "value": "130826"
  17725. }, {
  17726. "label": "宽城满族自治县",
  17727. "value": "130827"
  17728. }, {
  17729. "label": "围场满族蒙古族自治县",
  17730. "value": "130828"
  17731. }, {
  17732. "label": "承德高新技术产业开发区",
  17733. "value": "130871"
  17734. }, {
  17735. "label": "平泉市",
  17736. "value": "130881"
  17737. }], [{
  17738. "label": "新华区",
  17739. "value": "130902"
  17740. }, {
  17741. "label": "运河区",
  17742. "value": "130903"
  17743. }, {
  17744. "label": "沧县",
  17745. "value": "130921"
  17746. }, {
  17747. "label": "青县",
  17748. "value": "130922"
  17749. }, {
  17750. "label": "东光县",
  17751. "value": "130923"
  17752. }, {
  17753. "label": "海兴县",
  17754. "value": "130924"
  17755. }, {
  17756. "label": "盐山县",
  17757. "value": "130925"
  17758. }, {
  17759. "label": "肃宁县",
  17760. "value": "130926"
  17761. }, {
  17762. "label": "南皮县",
  17763. "value": "130927"
  17764. }, {
  17765. "label": "吴桥县",
  17766. "value": "130928"
  17767. }, {
  17768. "label": "献县",
  17769. "value": "130929"
  17770. }, {
  17771. "label": "孟村回族自治县",
  17772. "value": "130930"
  17773. }, {
  17774. "label": "河北沧州经济开发区",
  17775. "value": "130971"
  17776. }, {
  17777. "label": "沧州高新技术产业开发区",
  17778. "value": "130972"
  17779. }, {
  17780. "label": "沧州渤海新区",
  17781. "value": "130973"
  17782. }, {
  17783. "label": "泊头市",
  17784. "value": "130981"
  17785. }, {
  17786. "label": "任丘市",
  17787. "value": "130982"
  17788. }, {
  17789. "label": "黄骅市",
  17790. "value": "130983"
  17791. }, {
  17792. "label": "河间市",
  17793. "value": "130984"
  17794. }], [{
  17795. "label": "安次区",
  17796. "value": "131002"
  17797. }, {
  17798. "label": "广阳区",
  17799. "value": "131003"
  17800. }, {
  17801. "label": "固安县",
  17802. "value": "131022"
  17803. }, {
  17804. "label": "永清县",
  17805. "value": "131023"
  17806. }, {
  17807. "label": "香河县",
  17808. "value": "131024"
  17809. }, {
  17810. "label": "大城县",
  17811. "value": "131025"
  17812. }, {
  17813. "label": "文安县",
  17814. "value": "131026"
  17815. }, {
  17816. "label": "大厂回族自治县",
  17817. "value": "131028"
  17818. }, {
  17819. "label": "廊坊经济技术开发区",
  17820. "value": "131071"
  17821. }, {
  17822. "label": "霸州市",
  17823. "value": "131081"
  17824. }, {
  17825. "label": "三河市",
  17826. "value": "131082"
  17827. }], [{
  17828. "label": "桃城区",
  17829. "value": "131102"
  17830. }, {
  17831. "label": "冀州区",
  17832. "value": "131103"
  17833. }, {
  17834. "label": "枣强县",
  17835. "value": "131121"
  17836. }, {
  17837. "label": "武邑县",
  17838. "value": "131122"
  17839. }, {
  17840. "label": "武强县",
  17841. "value": "131123"
  17842. }, {
  17843. "label": "饶阳县",
  17844. "value": "131124"
  17845. }, {
  17846. "label": "安平县",
  17847. "value": "131125"
  17848. }, {
  17849. "label": "故城县",
  17850. "value": "131126"
  17851. }, {
  17852. "label": "景县",
  17853. "value": "131127"
  17854. }, {
  17855. "label": "阜城县",
  17856. "value": "131128"
  17857. }, {
  17858. "label": "河北衡水经济开发区",
  17859. "value": "131171"
  17860. }, {
  17861. "label": "衡水滨湖新区",
  17862. "value": "131172"
  17863. }, {
  17864. "label": "深州市",
  17865. "value": "131182"
  17866. }]], [[{
  17867. "label": "小店区",
  17868. "value": "140105"
  17869. }, {
  17870. "label": "迎泽区",
  17871. "value": "140106"
  17872. }, {
  17873. "label": "杏花岭区",
  17874. "value": "140107"
  17875. }, {
  17876. "label": "尖草坪区",
  17877. "value": "140108"
  17878. }, {
  17879. "label": "万柏林区",
  17880. "value": "140109"
  17881. }, {
  17882. "label": "晋源区",
  17883. "value": "140110"
  17884. }, {
  17885. "label": "清徐县",
  17886. "value": "140121"
  17887. }, {
  17888. "label": "阳曲县",
  17889. "value": "140122"
  17890. }, {
  17891. "label": "娄烦县",
  17892. "value": "140123"
  17893. }, {
  17894. "label": "山西转型综合改革示范区",
  17895. "value": "140171"
  17896. }, {
  17897. "label": "古交市",
  17898. "value": "140181"
  17899. }], [{
  17900. "label": "城区",
  17901. "value": "140202"
  17902. }, {
  17903. "label": "矿区",
  17904. "value": "140203"
  17905. }, {
  17906. "label": "南郊区",
  17907. "value": "140211"
  17908. }, {
  17909. "label": "新荣区",
  17910. "value": "140212"
  17911. }, {
  17912. "label": "阳高县",
  17913. "value": "140221"
  17914. }, {
  17915. "label": "天镇县",
  17916. "value": "140222"
  17917. }, {
  17918. "label": "广灵县",
  17919. "value": "140223"
  17920. }, {
  17921. "label": "灵丘县",
  17922. "value": "140224"
  17923. }, {
  17924. "label": "浑源县",
  17925. "value": "140225"
  17926. }, {
  17927. "label": "左云县",
  17928. "value": "140226"
  17929. }, {
  17930. "label": "大同县",
  17931. "value": "140227"
  17932. }, {
  17933. "label": "山西大同经济开发区",
  17934. "value": "140271"
  17935. }], [{
  17936. "label": "城区",
  17937. "value": "140302"
  17938. }, {
  17939. "label": "矿区",
  17940. "value": "140303"
  17941. }, {
  17942. "label": "郊区",
  17943. "value": "140311"
  17944. }, {
  17945. "label": "平定县",
  17946. "value": "140321"
  17947. }, {
  17948. "label": "盂县",
  17949. "value": "140322"
  17950. }, {
  17951. "label": "山西阳泉经济开发区",
  17952. "value": "140371"
  17953. }], [{
  17954. "label": "城区",
  17955. "value": "140402"
  17956. }, {
  17957. "label": "郊区",
  17958. "value": "140411"
  17959. }, {
  17960. "label": "长治县",
  17961. "value": "140421"
  17962. }, {
  17963. "label": "襄垣县",
  17964. "value": "140423"
  17965. }, {
  17966. "label": "屯留县",
  17967. "value": "140424"
  17968. }, {
  17969. "label": "平顺县",
  17970. "value": "140425"
  17971. }, {
  17972. "label": "黎城县",
  17973. "value": "140426"
  17974. }, {
  17975. "label": "壶关县",
  17976. "value": "140427"
  17977. }, {
  17978. "label": "长子县",
  17979. "value": "140428"
  17980. }, {
  17981. "label": "武乡县",
  17982. "value": "140429"
  17983. }, {
  17984. "label": "沁县",
  17985. "value": "140430"
  17986. }, {
  17987. "label": "沁源县",
  17988. "value": "140431"
  17989. }, {
  17990. "label": "山西长治高新技术产业园区",
  17991. "value": "140471"
  17992. }, {
  17993. "label": "潞城市",
  17994. "value": "140481"
  17995. }], [{
  17996. "label": "城区",
  17997. "value": "140502"
  17998. }, {
  17999. "label": "沁水县",
  18000. "value": "140521"
  18001. }, {
  18002. "label": "阳城县",
  18003. "value": "140522"
  18004. }, {
  18005. "label": "陵川县",
  18006. "value": "140524"
  18007. }, {
  18008. "label": "泽州县",
  18009. "value": "140525"
  18010. }, {
  18011. "label": "高平市",
  18012. "value": "140581"
  18013. }], [{
  18014. "label": "朔城区",
  18015. "value": "140602"
  18016. }, {
  18017. "label": "平鲁区",
  18018. "value": "140603"
  18019. }, {
  18020. "label": "山阴县",
  18021. "value": "140621"
  18022. }, {
  18023. "label": "应县",
  18024. "value": "140622"
  18025. }, {
  18026. "label": "右玉县",
  18027. "value": "140623"
  18028. }, {
  18029. "label": "怀仁县",
  18030. "value": "140624"
  18031. }, {
  18032. "label": "山西朔州经济开发区",
  18033. "value": "140671"
  18034. }], [{
  18035. "label": "榆次区",
  18036. "value": "140702"
  18037. }, {
  18038. "label": "榆社县",
  18039. "value": "140721"
  18040. }, {
  18041. "label": "左权县",
  18042. "value": "140722"
  18043. }, {
  18044. "label": "和顺县",
  18045. "value": "140723"
  18046. }, {
  18047. "label": "昔阳县",
  18048. "value": "140724"
  18049. }, {
  18050. "label": "寿阳县",
  18051. "value": "140725"
  18052. }, {
  18053. "label": "太谷县",
  18054. "value": "140726"
  18055. }, {
  18056. "label": "祁县",
  18057. "value": "140727"
  18058. }, {
  18059. "label": "平遥县",
  18060. "value": "140728"
  18061. }, {
  18062. "label": "灵石县",
  18063. "value": "140729"
  18064. }, {
  18065. "label": "介休市",
  18066. "value": "140781"
  18067. }], [{
  18068. "label": "盐湖区",
  18069. "value": "140802"
  18070. }, {
  18071. "label": "临猗县",
  18072. "value": "140821"
  18073. }, {
  18074. "label": "万荣县",
  18075. "value": "140822"
  18076. }, {
  18077. "label": "闻喜县",
  18078. "value": "140823"
  18079. }, {
  18080. "label": "稷山县",
  18081. "value": "140824"
  18082. }, {
  18083. "label": "新绛县",
  18084. "value": "140825"
  18085. }, {
  18086. "label": "绛县",
  18087. "value": "140826"
  18088. }, {
  18089. "label": "垣曲县",
  18090. "value": "140827"
  18091. }, {
  18092. "label": "夏县",
  18093. "value": "140828"
  18094. }, {
  18095. "label": "平陆县",
  18096. "value": "140829"
  18097. }, {
  18098. "label": "芮城县",
  18099. "value": "140830"
  18100. }, {
  18101. "label": "永济市",
  18102. "value": "140881"
  18103. }, {
  18104. "label": "河津市",
  18105. "value": "140882"
  18106. }], [{
  18107. "label": "忻府区",
  18108. "value": "140902"
  18109. }, {
  18110. "label": "定襄县",
  18111. "value": "140921"
  18112. }, {
  18113. "label": "五台县",
  18114. "value": "140922"
  18115. }, {
  18116. "label": "代县",
  18117. "value": "140923"
  18118. }, {
  18119. "label": "繁峙县",
  18120. "value": "140924"
  18121. }, {
  18122. "label": "宁武县",
  18123. "value": "140925"
  18124. }, {
  18125. "label": "静乐县",
  18126. "value": "140926"
  18127. }, {
  18128. "label": "神池县",
  18129. "value": "140927"
  18130. }, {
  18131. "label": "五寨县",
  18132. "value": "140928"
  18133. }, {
  18134. "label": "岢岚县",
  18135. "value": "140929"
  18136. }, {
  18137. "label": "河曲县",
  18138. "value": "140930"
  18139. }, {
  18140. "label": "保德县",
  18141. "value": "140931"
  18142. }, {
  18143. "label": "偏关县",
  18144. "value": "140932"
  18145. }, {
  18146. "label": "五台山风景名胜区",
  18147. "value": "140971"
  18148. }, {
  18149. "label": "原平市",
  18150. "value": "140981"
  18151. }], [{
  18152. "label": "尧都区",
  18153. "value": "141002"
  18154. }, {
  18155. "label": "曲沃县",
  18156. "value": "141021"
  18157. }, {
  18158. "label": "翼城县",
  18159. "value": "141022"
  18160. }, {
  18161. "label": "襄汾县",
  18162. "value": "141023"
  18163. }, {
  18164. "label": "洪洞县",
  18165. "value": "141024"
  18166. }, {
  18167. "label": "古县",
  18168. "value": "141025"
  18169. }, {
  18170. "label": "安泽县",
  18171. "value": "141026"
  18172. }, {
  18173. "label": "浮山县",
  18174. "value": "141027"
  18175. }, {
  18176. "label": "吉县",
  18177. "value": "141028"
  18178. }, {
  18179. "label": "乡宁县",
  18180. "value": "141029"
  18181. }, {
  18182. "label": "大宁县",
  18183. "value": "141030"
  18184. }, {
  18185. "label": "隰县",
  18186. "value": "141031"
  18187. }, {
  18188. "label": "永和县",
  18189. "value": "141032"
  18190. }, {
  18191. "label": "蒲县",
  18192. "value": "141033"
  18193. }, {
  18194. "label": "汾西县",
  18195. "value": "141034"
  18196. }, {
  18197. "label": "侯马市",
  18198. "value": "141081"
  18199. }, {
  18200. "label": "霍州市",
  18201. "value": "141082"
  18202. }], [{
  18203. "label": "离石区",
  18204. "value": "141102"
  18205. }, {
  18206. "label": "文水县",
  18207. "value": "141121"
  18208. }, {
  18209. "label": "交城县",
  18210. "value": "141122"
  18211. }, {
  18212. "label": "兴县",
  18213. "value": "141123"
  18214. }, {
  18215. "label": "临县",
  18216. "value": "141124"
  18217. }, {
  18218. "label": "柳林县",
  18219. "value": "141125"
  18220. }, {
  18221. "label": "石楼县",
  18222. "value": "141126"
  18223. }, {
  18224. "label": "岚县",
  18225. "value": "141127"
  18226. }, {
  18227. "label": "方山县",
  18228. "value": "141128"
  18229. }, {
  18230. "label": "中阳县",
  18231. "value": "141129"
  18232. }, {
  18233. "label": "交口县",
  18234. "value": "141130"
  18235. }, {
  18236. "label": "孝义市",
  18237. "value": "141181"
  18238. }, {
  18239. "label": "汾阳市",
  18240. "value": "141182"
  18241. }]], [[{
  18242. "label": "新城区",
  18243. "value": "150102"
  18244. }, {
  18245. "label": "回民区",
  18246. "value": "150103"
  18247. }, {
  18248. "label": "玉泉区",
  18249. "value": "150104"
  18250. }, {
  18251. "label": "赛罕区",
  18252. "value": "150105"
  18253. }, {
  18254. "label": "土默特左旗",
  18255. "value": "150121"
  18256. }, {
  18257. "label": "托克托县",
  18258. "value": "150122"
  18259. }, {
  18260. "label": "和林格尔县",
  18261. "value": "150123"
  18262. }, {
  18263. "label": "清水河县",
  18264. "value": "150124"
  18265. }, {
  18266. "label": "武川县",
  18267. "value": "150125"
  18268. }, {
  18269. "label": "呼和浩特金海工业园区",
  18270. "value": "150171"
  18271. }, {
  18272. "label": "呼和浩特经济技术开发区",
  18273. "value": "150172"
  18274. }], [{
  18275. "label": "东河区",
  18276. "value": "150202"
  18277. }, {
  18278. "label": "昆都仑区",
  18279. "value": "150203"
  18280. }, {
  18281. "label": "青山区",
  18282. "value": "150204"
  18283. }, {
  18284. "label": "石拐区",
  18285. "value": "150205"
  18286. }, {
  18287. "label": "白云鄂博矿区",
  18288. "value": "150206"
  18289. }, {
  18290. "label": "九原区",
  18291. "value": "150207"
  18292. }, {
  18293. "label": "土默特右旗",
  18294. "value": "150221"
  18295. }, {
  18296. "label": "固阳县",
  18297. "value": "150222"
  18298. }, {
  18299. "label": "达尔罕茂明安联合旗",
  18300. "value": "150223"
  18301. }, {
  18302. "label": "包头稀土高新技术产业开发区",
  18303. "value": "150271"
  18304. }], [{
  18305. "label": "海勃湾区",
  18306. "value": "150302"
  18307. }, {
  18308. "label": "海南区",
  18309. "value": "150303"
  18310. }, {
  18311. "label": "乌达区",
  18312. "value": "150304"
  18313. }], [{
  18314. "label": "红山区",
  18315. "value": "150402"
  18316. }, {
  18317. "label": "元宝山区",
  18318. "value": "150403"
  18319. }, {
  18320. "label": "松山区",
  18321. "value": "150404"
  18322. }, {
  18323. "label": "阿鲁科尔沁旗",
  18324. "value": "150421"
  18325. }, {
  18326. "label": "巴林左旗",
  18327. "value": "150422"
  18328. }, {
  18329. "label": "巴林右旗",
  18330. "value": "150423"
  18331. }, {
  18332. "label": "林西县",
  18333. "value": "150424"
  18334. }, {
  18335. "label": "克什克腾旗",
  18336. "value": "150425"
  18337. }, {
  18338. "label": "翁牛特旗",
  18339. "value": "150426"
  18340. }, {
  18341. "label": "喀喇沁旗",
  18342. "value": "150428"
  18343. }, {
  18344. "label": "宁城县",
  18345. "value": "150429"
  18346. }, {
  18347. "label": "敖汉旗",
  18348. "value": "150430"
  18349. }], [{
  18350. "label": "科尔沁区",
  18351. "value": "150502"
  18352. }, {
  18353. "label": "科尔沁左翼中旗",
  18354. "value": "150521"
  18355. }, {
  18356. "label": "科尔沁左翼后旗",
  18357. "value": "150522"
  18358. }, {
  18359. "label": "开鲁县",
  18360. "value": "150523"
  18361. }, {
  18362. "label": "库伦旗",
  18363. "value": "150524"
  18364. }, {
  18365. "label": "奈曼旗",
  18366. "value": "150525"
  18367. }, {
  18368. "label": "扎鲁特旗",
  18369. "value": "150526"
  18370. }, {
  18371. "label": "通辽经济技术开发区",
  18372. "value": "150571"
  18373. }, {
  18374. "label": "霍林郭勒市",
  18375. "value": "150581"
  18376. }], [{
  18377. "label": "东胜区",
  18378. "value": "150602"
  18379. }, {
  18380. "label": "康巴什区",
  18381. "value": "150603"
  18382. }, {
  18383. "label": "达拉特旗",
  18384. "value": "150621"
  18385. }, {
  18386. "label": "准格尔旗",
  18387. "value": "150622"
  18388. }, {
  18389. "label": "鄂托克前旗",
  18390. "value": "150623"
  18391. }, {
  18392. "label": "鄂托克旗",
  18393. "value": "150624"
  18394. }, {
  18395. "label": "杭锦旗",
  18396. "value": "150625"
  18397. }, {
  18398. "label": "乌审旗",
  18399. "value": "150626"
  18400. }, {
  18401. "label": "伊金霍洛旗",
  18402. "value": "150627"
  18403. }], [{
  18404. "label": "海拉尔区",
  18405. "value": "150702"
  18406. }, {
  18407. "label": "扎赉诺尔区",
  18408. "value": "150703"
  18409. }, {
  18410. "label": "阿荣旗",
  18411. "value": "150721"
  18412. }, {
  18413. "label": "莫力达瓦达斡尔族自治旗",
  18414. "value": "150722"
  18415. }, {
  18416. "label": "鄂伦春自治旗",
  18417. "value": "150723"
  18418. }, {
  18419. "label": "鄂温克族自治旗",
  18420. "value": "150724"
  18421. }, {
  18422. "label": "陈巴尔虎旗",
  18423. "value": "150725"
  18424. }, {
  18425. "label": "新巴尔虎左旗",
  18426. "value": "150726"
  18427. }, {
  18428. "label": "新巴尔虎右旗",
  18429. "value": "150727"
  18430. }, {
  18431. "label": "满洲里市",
  18432. "value": "150781"
  18433. }, {
  18434. "label": "牙克石市",
  18435. "value": "150782"
  18436. }, {
  18437. "label": "扎兰屯市",
  18438. "value": "150783"
  18439. }, {
  18440. "label": "额尔古纳市",
  18441. "value": "150784"
  18442. }, {
  18443. "label": "根河市",
  18444. "value": "150785"
  18445. }], [{
  18446. "label": "临河区",
  18447. "value": "150802"
  18448. }, {
  18449. "label": "五原县",
  18450. "value": "150821"
  18451. }, {
  18452. "label": "磴口县",
  18453. "value": "150822"
  18454. }, {
  18455. "label": "乌拉特前旗",
  18456. "value": "150823"
  18457. }, {
  18458. "label": "乌拉特中旗",
  18459. "value": "150824"
  18460. }, {
  18461. "label": "乌拉特后旗",
  18462. "value": "150825"
  18463. }, {
  18464. "label": "杭锦后旗",
  18465. "value": "150826"
  18466. }], [{
  18467. "label": "集宁区",
  18468. "value": "150902"
  18469. }, {
  18470. "label": "卓资县",
  18471. "value": "150921"
  18472. }, {
  18473. "label": "化德县",
  18474. "value": "150922"
  18475. }, {
  18476. "label": "商都县",
  18477. "value": "150923"
  18478. }, {
  18479. "label": "兴和县",
  18480. "value": "150924"
  18481. }, {
  18482. "label": "凉城县",
  18483. "value": "150925"
  18484. }, {
  18485. "label": "察哈尔右翼前旗",
  18486. "value": "150926"
  18487. }, {
  18488. "label": "察哈尔右翼中旗",
  18489. "value": "150927"
  18490. }, {
  18491. "label": "察哈尔右翼后旗",
  18492. "value": "150928"
  18493. }, {
  18494. "label": "四子王旗",
  18495. "value": "150929"
  18496. }, {
  18497. "label": "丰镇市",
  18498. "value": "150981"
  18499. }], [{
  18500. "label": "乌兰浩特市",
  18501. "value": "152201"
  18502. }, {
  18503. "label": "阿尔山市",
  18504. "value": "152202"
  18505. }, {
  18506. "label": "科尔沁右翼前旗",
  18507. "value": "152221"
  18508. }, {
  18509. "label": "科尔沁右翼中旗",
  18510. "value": "152222"
  18511. }, {
  18512. "label": "扎赉特旗",
  18513. "value": "152223"
  18514. }, {
  18515. "label": "突泉县",
  18516. "value": "152224"
  18517. }], [{
  18518. "label": "二连浩特市",
  18519. "value": "152501"
  18520. }, {
  18521. "label": "锡林浩特市",
  18522. "value": "152502"
  18523. }, {
  18524. "label": "阿巴嘎旗",
  18525. "value": "152522"
  18526. }, {
  18527. "label": "苏尼特左旗",
  18528. "value": "152523"
  18529. }, {
  18530. "label": "苏尼特右旗",
  18531. "value": "152524"
  18532. }, {
  18533. "label": "东乌珠穆沁旗",
  18534. "value": "152525"
  18535. }, {
  18536. "label": "西乌珠穆沁旗",
  18537. "value": "152526"
  18538. }, {
  18539. "label": "太仆寺旗",
  18540. "value": "152527"
  18541. }, {
  18542. "label": "镶黄旗",
  18543. "value": "152528"
  18544. }, {
  18545. "label": "正镶白旗",
  18546. "value": "152529"
  18547. }, {
  18548. "label": "正蓝旗",
  18549. "value": "152530"
  18550. }, {
  18551. "label": "多伦县",
  18552. "value": "152531"
  18553. }, {
  18554. "label": "乌拉盖管委会",
  18555. "value": "152571"
  18556. }], [{
  18557. "label": "阿拉善左旗",
  18558. "value": "152921"
  18559. }, {
  18560. "label": "阿拉善右旗",
  18561. "value": "152922"
  18562. }, {
  18563. "label": "额济纳旗",
  18564. "value": "152923"
  18565. }, {
  18566. "label": "内蒙古阿拉善经济开发区",
  18567. "value": "152971"
  18568. }]], [[{
  18569. "label": "和平区",
  18570. "value": "210102"
  18571. }, {
  18572. "label": "沈河区",
  18573. "value": "210103"
  18574. }, {
  18575. "label": "大东区",
  18576. "value": "210104"
  18577. }, {
  18578. "label": "皇姑区",
  18579. "value": "210105"
  18580. }, {
  18581. "label": "铁西区",
  18582. "value": "210106"
  18583. }, {
  18584. "label": "苏家屯区",
  18585. "value": "210111"
  18586. }, {
  18587. "label": "浑南区",
  18588. "value": "210112"
  18589. }, {
  18590. "label": "沈北新区",
  18591. "value": "210113"
  18592. }, {
  18593. "label": "于洪区",
  18594. "value": "210114"
  18595. }, {
  18596. "label": "辽中区",
  18597. "value": "210115"
  18598. }, {
  18599. "label": "康平县",
  18600. "value": "210123"
  18601. }, {
  18602. "label": "法库县",
  18603. "value": "210124"
  18604. }, {
  18605. "label": "新民市",
  18606. "value": "210181"
  18607. }], [{
  18608. "label": "中山区",
  18609. "value": "210202"
  18610. }, {
  18611. "label": "西岗区",
  18612. "value": "210203"
  18613. }, {
  18614. "label": "沙河口区",
  18615. "value": "210204"
  18616. }, {
  18617. "label": "甘井子区",
  18618. "value": "210211"
  18619. }, {
  18620. "label": "旅顺口区",
  18621. "value": "210212"
  18622. }, {
  18623. "label": "金州区",
  18624. "value": "210213"
  18625. }, {
  18626. "label": "普兰店区",
  18627. "value": "210214"
  18628. }, {
  18629. "label": "长海县",
  18630. "value": "210224"
  18631. }, {
  18632. "label": "瓦房店市",
  18633. "value": "210281"
  18634. }, {
  18635. "label": "庄河市",
  18636. "value": "210283"
  18637. }], [{
  18638. "label": "铁东区",
  18639. "value": "210302"
  18640. }, {
  18641. "label": "铁西区",
  18642. "value": "210303"
  18643. }, {
  18644. "label": "立山区",
  18645. "value": "210304"
  18646. }, {
  18647. "label": "千山区",
  18648. "value": "210311"
  18649. }, {
  18650. "label": "台安县",
  18651. "value": "210321"
  18652. }, {
  18653. "label": "岫岩满族自治县",
  18654. "value": "210323"
  18655. }, {
  18656. "label": "海城市",
  18657. "value": "210381"
  18658. }], [{
  18659. "label": "新抚区",
  18660. "value": "210402"
  18661. }, {
  18662. "label": "东洲区",
  18663. "value": "210403"
  18664. }, {
  18665. "label": "望花区",
  18666. "value": "210404"
  18667. }, {
  18668. "label": "顺城区",
  18669. "value": "210411"
  18670. }, {
  18671. "label": "抚顺县",
  18672. "value": "210421"
  18673. }, {
  18674. "label": "新宾满族自治县",
  18675. "value": "210422"
  18676. }, {
  18677. "label": "清原满族自治县",
  18678. "value": "210423"
  18679. }], [{
  18680. "label": "平山区",
  18681. "value": "210502"
  18682. }, {
  18683. "label": "溪湖区",
  18684. "value": "210503"
  18685. }, {
  18686. "label": "明山区",
  18687. "value": "210504"
  18688. }, {
  18689. "label": "南芬区",
  18690. "value": "210505"
  18691. }, {
  18692. "label": "本溪满族自治县",
  18693. "value": "210521"
  18694. }, {
  18695. "label": "桓仁满族自治县",
  18696. "value": "210522"
  18697. }], [{
  18698. "label": "元宝区",
  18699. "value": "210602"
  18700. }, {
  18701. "label": "振兴区",
  18702. "value": "210603"
  18703. }, {
  18704. "label": "振安区",
  18705. "value": "210604"
  18706. }, {
  18707. "label": "宽甸满族自治县",
  18708. "value": "210624"
  18709. }, {
  18710. "label": "东港市",
  18711. "value": "210681"
  18712. }, {
  18713. "label": "凤城市",
  18714. "value": "210682"
  18715. }], [{
  18716. "label": "古塔区",
  18717. "value": "210702"
  18718. }, {
  18719. "label": "凌河区",
  18720. "value": "210703"
  18721. }, {
  18722. "label": "太和区",
  18723. "value": "210711"
  18724. }, {
  18725. "label": "黑山县",
  18726. "value": "210726"
  18727. }, {
  18728. "label": "义县",
  18729. "value": "210727"
  18730. }, {
  18731. "label": "凌海市",
  18732. "value": "210781"
  18733. }, {
  18734. "label": "北镇市",
  18735. "value": "210782"
  18736. }], [{
  18737. "label": "站前区",
  18738. "value": "210802"
  18739. }, {
  18740. "label": "西市区",
  18741. "value": "210803"
  18742. }, {
  18743. "label": "鲅鱼圈区",
  18744. "value": "210804"
  18745. }, {
  18746. "label": "老边区",
  18747. "value": "210811"
  18748. }, {
  18749. "label": "盖州市",
  18750. "value": "210881"
  18751. }, {
  18752. "label": "大石桥市",
  18753. "value": "210882"
  18754. }], [{
  18755. "label": "海州区",
  18756. "value": "210902"
  18757. }, {
  18758. "label": "新邱区",
  18759. "value": "210903"
  18760. }, {
  18761. "label": "太平区",
  18762. "value": "210904"
  18763. }, {
  18764. "label": "清河门区",
  18765. "value": "210905"
  18766. }, {
  18767. "label": "细河区",
  18768. "value": "210911"
  18769. }, {
  18770. "label": "阜新蒙古族自治县",
  18771. "value": "210921"
  18772. }, {
  18773. "label": "彰武县",
  18774. "value": "210922"
  18775. }], [{
  18776. "label": "白塔区",
  18777. "value": "211002"
  18778. }, {
  18779. "label": "文圣区",
  18780. "value": "211003"
  18781. }, {
  18782. "label": "宏伟区",
  18783. "value": "211004"
  18784. }, {
  18785. "label": "弓长岭区",
  18786. "value": "211005"
  18787. }, {
  18788. "label": "太子河区",
  18789. "value": "211011"
  18790. }, {
  18791. "label": "辽阳县",
  18792. "value": "211021"
  18793. }, {
  18794. "label": "灯塔市",
  18795. "value": "211081"
  18796. }], [{
  18797. "label": "双台子区",
  18798. "value": "211102"
  18799. }, {
  18800. "label": "兴隆台区",
  18801. "value": "211103"
  18802. }, {
  18803. "label": "大洼区",
  18804. "value": "211104"
  18805. }, {
  18806. "label": "盘山县",
  18807. "value": "211122"
  18808. }], [{
  18809. "label": "银州区",
  18810. "value": "211202"
  18811. }, {
  18812. "label": "清河区",
  18813. "value": "211204"
  18814. }, {
  18815. "label": "铁岭县",
  18816. "value": "211221"
  18817. }, {
  18818. "label": "西丰县",
  18819. "value": "211223"
  18820. }, {
  18821. "label": "昌图县",
  18822. "value": "211224"
  18823. }, {
  18824. "label": "调兵山市",
  18825. "value": "211281"
  18826. }, {
  18827. "label": "开原市",
  18828. "value": "211282"
  18829. }], [{
  18830. "label": "双塔区",
  18831. "value": "211302"
  18832. }, {
  18833. "label": "龙城区",
  18834. "value": "211303"
  18835. }, {
  18836. "label": "朝阳县",
  18837. "value": "211321"
  18838. }, {
  18839. "label": "建平县",
  18840. "value": "211322"
  18841. }, {
  18842. "label": "喀喇沁左翼蒙古族自治县",
  18843. "value": "211324"
  18844. }, {
  18845. "label": "北票市",
  18846. "value": "211381"
  18847. }, {
  18848. "label": "凌源市",
  18849. "value": "211382"
  18850. }], [{
  18851. "label": "连山区",
  18852. "value": "211402"
  18853. }, {
  18854. "label": "龙港区",
  18855. "value": "211403"
  18856. }, {
  18857. "label": "南票区",
  18858. "value": "211404"
  18859. }, {
  18860. "label": "绥中县",
  18861. "value": "211421"
  18862. }, {
  18863. "label": "建昌县",
  18864. "value": "211422"
  18865. }, {
  18866. "label": "兴城市",
  18867. "value": "211481"
  18868. }]], [[{
  18869. "label": "南关区",
  18870. "value": "220102"
  18871. }, {
  18872. "label": "宽城区",
  18873. "value": "220103"
  18874. }, {
  18875. "label": "朝阳区",
  18876. "value": "220104"
  18877. }, {
  18878. "label": "二道区",
  18879. "value": "220105"
  18880. }, {
  18881. "label": "绿园区",
  18882. "value": "220106"
  18883. }, {
  18884. "label": "双阳区",
  18885. "value": "220112"
  18886. }, {
  18887. "label": "九台区",
  18888. "value": "220113"
  18889. }, {
  18890. "label": "农安县",
  18891. "value": "220122"
  18892. }, {
  18893. "label": "长春经济技术开发区",
  18894. "value": "220171"
  18895. }, {
  18896. "label": "长春净月高新技术产业开发区",
  18897. "value": "220172"
  18898. }, {
  18899. "label": "长春高新技术产业开发区",
  18900. "value": "220173"
  18901. }, {
  18902. "label": "长春汽车经济技术开发区",
  18903. "value": "220174"
  18904. }, {
  18905. "label": "榆树市",
  18906. "value": "220182"
  18907. }, {
  18908. "label": "德惠市",
  18909. "value": "220183"
  18910. }], [{
  18911. "label": "昌邑区",
  18912. "value": "220202"
  18913. }, {
  18914. "label": "龙潭区",
  18915. "value": "220203"
  18916. }, {
  18917. "label": "船营区",
  18918. "value": "220204"
  18919. }, {
  18920. "label": "丰满区",
  18921. "value": "220211"
  18922. }, {
  18923. "label": "永吉县",
  18924. "value": "220221"
  18925. }, {
  18926. "label": "吉林经济开发区",
  18927. "value": "220271"
  18928. }, {
  18929. "label": "吉林高新技术产业开发区",
  18930. "value": "220272"
  18931. }, {
  18932. "label": "吉林中国新加坡食品区",
  18933. "value": "220273"
  18934. }, {
  18935. "label": "蛟河市",
  18936. "value": "220281"
  18937. }, {
  18938. "label": "桦甸市",
  18939. "value": "220282"
  18940. }, {
  18941. "label": "舒兰市",
  18942. "value": "220283"
  18943. }, {
  18944. "label": "磐石市",
  18945. "value": "220284"
  18946. }], [{
  18947. "label": "铁西区",
  18948. "value": "220302"
  18949. }, {
  18950. "label": "铁东区",
  18951. "value": "220303"
  18952. }, {
  18953. "label": "梨树县",
  18954. "value": "220322"
  18955. }, {
  18956. "label": "伊通满族自治县",
  18957. "value": "220323"
  18958. }, {
  18959. "label": "公主岭市",
  18960. "value": "220381"
  18961. }, {
  18962. "label": "双辽市",
  18963. "value": "220382"
  18964. }], [{
  18965. "label": "龙山区",
  18966. "value": "220402"
  18967. }, {
  18968. "label": "西安区",
  18969. "value": "220403"
  18970. }, {
  18971. "label": "东丰县",
  18972. "value": "220421"
  18973. }, {
  18974. "label": "东辽县",
  18975. "value": "220422"
  18976. }], [{
  18977. "label": "东昌区",
  18978. "value": "220502"
  18979. }, {
  18980. "label": "二道江区",
  18981. "value": "220503"
  18982. }, {
  18983. "label": "通化县",
  18984. "value": "220521"
  18985. }, {
  18986. "label": "辉南县",
  18987. "value": "220523"
  18988. }, {
  18989. "label": "柳河县",
  18990. "value": "220524"
  18991. }, {
  18992. "label": "梅河口市",
  18993. "value": "220581"
  18994. }, {
  18995. "label": "集安市",
  18996. "value": "220582"
  18997. }], [{
  18998. "label": "浑江区",
  18999. "value": "220602"
  19000. }, {
  19001. "label": "江源区",
  19002. "value": "220605"
  19003. }, {
  19004. "label": "抚松县",
  19005. "value": "220621"
  19006. }, {
  19007. "label": "靖宇县",
  19008. "value": "220622"
  19009. }, {
  19010. "label": "长白朝鲜族自治县",
  19011. "value": "220623"
  19012. }, {
  19013. "label": "临江市",
  19014. "value": "220681"
  19015. }], [{
  19016. "label": "宁江区",
  19017. "value": "220702"
  19018. }, {
  19019. "label": "前郭尔罗斯蒙古族自治县",
  19020. "value": "220721"
  19021. }, {
  19022. "label": "长岭县",
  19023. "value": "220722"
  19024. }, {
  19025. "label": "乾安县",
  19026. "value": "220723"
  19027. }, {
  19028. "label": "吉林松原经济开发区",
  19029. "value": "220771"
  19030. }, {
  19031. "label": "扶余市",
  19032. "value": "220781"
  19033. }], [{
  19034. "label": "洮北区",
  19035. "value": "220802"
  19036. }, {
  19037. "label": "镇赉县",
  19038. "value": "220821"
  19039. }, {
  19040. "label": "通榆县",
  19041. "value": "220822"
  19042. }, {
  19043. "label": "吉林白城经济开发区",
  19044. "value": "220871"
  19045. }, {
  19046. "label": "洮南市",
  19047. "value": "220881"
  19048. }, {
  19049. "label": "大安市",
  19050. "value": "220882"
  19051. }], [{
  19052. "label": "延吉市",
  19053. "value": "222401"
  19054. }, {
  19055. "label": "图们市",
  19056. "value": "222402"
  19057. }, {
  19058. "label": "敦化市",
  19059. "value": "222403"
  19060. }, {
  19061. "label": "珲春市",
  19062. "value": "222404"
  19063. }, {
  19064. "label": "龙井市",
  19065. "value": "222405"
  19066. }, {
  19067. "label": "和龙市",
  19068. "value": "222406"
  19069. }, {
  19070. "label": "汪清县",
  19071. "value": "222424"
  19072. }, {
  19073. "label": "安图县",
  19074. "value": "222426"
  19075. }]], [[{
  19076. "label": "道里区",
  19077. "value": "230102"
  19078. }, {
  19079. "label": "南岗区",
  19080. "value": "230103"
  19081. }, {
  19082. "label": "道外区",
  19083. "value": "230104"
  19084. }, {
  19085. "label": "平房区",
  19086. "value": "230108"
  19087. }, {
  19088. "label": "松北区",
  19089. "value": "230109"
  19090. }, {
  19091. "label": "香坊区",
  19092. "value": "230110"
  19093. }, {
  19094. "label": "呼兰区",
  19095. "value": "230111"
  19096. }, {
  19097. "label": "阿城区",
  19098. "value": "230112"
  19099. }, {
  19100. "label": "双城区",
  19101. "value": "230113"
  19102. }, {
  19103. "label": "依兰县",
  19104. "value": "230123"
  19105. }, {
  19106. "label": "方正县",
  19107. "value": "230124"
  19108. }, {
  19109. "label": "宾县",
  19110. "value": "230125"
  19111. }, {
  19112. "label": "巴彦县",
  19113. "value": "230126"
  19114. }, {
  19115. "label": "木兰县",
  19116. "value": "230127"
  19117. }, {
  19118. "label": "通河县",
  19119. "value": "230128"
  19120. }, {
  19121. "label": "延寿县",
  19122. "value": "230129"
  19123. }, {
  19124. "label": "尚志市",
  19125. "value": "230183"
  19126. }, {
  19127. "label": "五常市",
  19128. "value": "230184"
  19129. }], [{
  19130. "label": "龙沙区",
  19131. "value": "230202"
  19132. }, {
  19133. "label": "建华区",
  19134. "value": "230203"
  19135. }, {
  19136. "label": "铁锋区",
  19137. "value": "230204"
  19138. }, {
  19139. "label": "昂昂溪区",
  19140. "value": "230205"
  19141. }, {
  19142. "label": "富拉尔基区",
  19143. "value": "230206"
  19144. }, {
  19145. "label": "碾子山区",
  19146. "value": "230207"
  19147. }, {
  19148. "label": "梅里斯达斡尔族区",
  19149. "value": "230208"
  19150. }, {
  19151. "label": "龙江县",
  19152. "value": "230221"
  19153. }, {
  19154. "label": "依安县",
  19155. "value": "230223"
  19156. }, {
  19157. "label": "泰来县",
  19158. "value": "230224"
  19159. }, {
  19160. "label": "甘南县",
  19161. "value": "230225"
  19162. }, {
  19163. "label": "富裕县",
  19164. "value": "230227"
  19165. }, {
  19166. "label": "克山县",
  19167. "value": "230229"
  19168. }, {
  19169. "label": "克东县",
  19170. "value": "230230"
  19171. }, {
  19172. "label": "拜泉县",
  19173. "value": "230231"
  19174. }, {
  19175. "label": "讷河市",
  19176. "value": "230281"
  19177. }], [{
  19178. "label": "鸡冠区",
  19179. "value": "230302"
  19180. }, {
  19181. "label": "恒山区",
  19182. "value": "230303"
  19183. }, {
  19184. "label": "滴道区",
  19185. "value": "230304"
  19186. }, {
  19187. "label": "梨树区",
  19188. "value": "230305"
  19189. }, {
  19190. "label": "城子河区",
  19191. "value": "230306"
  19192. }, {
  19193. "label": "麻山区",
  19194. "value": "230307"
  19195. }, {
  19196. "label": "鸡东县",
  19197. "value": "230321"
  19198. }, {
  19199. "label": "虎林市",
  19200. "value": "230381"
  19201. }, {
  19202. "label": "密山市",
  19203. "value": "230382"
  19204. }], [{
  19205. "label": "向阳区",
  19206. "value": "230402"
  19207. }, {
  19208. "label": "工农区",
  19209. "value": "230403"
  19210. }, {
  19211. "label": "南山区",
  19212. "value": "230404"
  19213. }, {
  19214. "label": "兴安区",
  19215. "value": "230405"
  19216. }, {
  19217. "label": "东山区",
  19218. "value": "230406"
  19219. }, {
  19220. "label": "兴山区",
  19221. "value": "230407"
  19222. }, {
  19223. "label": "萝北县",
  19224. "value": "230421"
  19225. }, {
  19226. "label": "绥滨县",
  19227. "value": "230422"
  19228. }], [{
  19229. "label": "尖山区",
  19230. "value": "230502"
  19231. }, {
  19232. "label": "岭东区",
  19233. "value": "230503"
  19234. }, {
  19235. "label": "四方台区",
  19236. "value": "230505"
  19237. }, {
  19238. "label": "宝山区",
  19239. "value": "230506"
  19240. }, {
  19241. "label": "集贤县",
  19242. "value": "230521"
  19243. }, {
  19244. "label": "友谊县",
  19245. "value": "230522"
  19246. }, {
  19247. "label": "宝清县",
  19248. "value": "230523"
  19249. }, {
  19250. "label": "饶河县",
  19251. "value": "230524"
  19252. }], [{
  19253. "label": "萨尔图区",
  19254. "value": "230602"
  19255. }, {
  19256. "label": "龙凤区",
  19257. "value": "230603"
  19258. }, {
  19259. "label": "让胡路区",
  19260. "value": "230604"
  19261. }, {
  19262. "label": "红岗区",
  19263. "value": "230605"
  19264. }, {
  19265. "label": "大同区",
  19266. "value": "230606"
  19267. }, {
  19268. "label": "肇州县",
  19269. "value": "230621"
  19270. }, {
  19271. "label": "肇源县",
  19272. "value": "230622"
  19273. }, {
  19274. "label": "林甸县",
  19275. "value": "230623"
  19276. }, {
  19277. "label": "杜尔伯特蒙古族自治县",
  19278. "value": "230624"
  19279. }, {
  19280. "label": "大庆高新技术产业开发区",
  19281. "value": "230671"
  19282. }], [{
  19283. "label": "伊春区",
  19284. "value": "230702"
  19285. }, {
  19286. "label": "南岔区",
  19287. "value": "230703"
  19288. }, {
  19289. "label": "友好区",
  19290. "value": "230704"
  19291. }, {
  19292. "label": "西林区",
  19293. "value": "230705"
  19294. }, {
  19295. "label": "翠峦区",
  19296. "value": "230706"
  19297. }, {
  19298. "label": "新青区",
  19299. "value": "230707"
  19300. }, {
  19301. "label": "美溪区",
  19302. "value": "230708"
  19303. }, {
  19304. "label": "金山屯区",
  19305. "value": "230709"
  19306. }, {
  19307. "label": "五营区",
  19308. "value": "230710"
  19309. }, {
  19310. "label": "乌马河区",
  19311. "value": "230711"
  19312. }, {
  19313. "label": "汤旺河区",
  19314. "value": "230712"
  19315. }, {
  19316. "label": "带岭区",
  19317. "value": "230713"
  19318. }, {
  19319. "label": "乌伊岭区",
  19320. "value": "230714"
  19321. }, {
  19322. "label": "红星区",
  19323. "value": "230715"
  19324. }, {
  19325. "label": "上甘岭区",
  19326. "value": "230716"
  19327. }, {
  19328. "label": "嘉荫县",
  19329. "value": "230722"
  19330. }, {
  19331. "label": "铁力市",
  19332. "value": "230781"
  19333. }], [{
  19334. "label": "向阳区",
  19335. "value": "230803"
  19336. }, {
  19337. "label": "前进区",
  19338. "value": "230804"
  19339. }, {
  19340. "label": "东风区",
  19341. "value": "230805"
  19342. }, {
  19343. "label": "郊区",
  19344. "value": "230811"
  19345. }, {
  19346. "label": "桦南县",
  19347. "value": "230822"
  19348. }, {
  19349. "label": "桦川县",
  19350. "value": "230826"
  19351. }, {
  19352. "label": "汤原县",
  19353. "value": "230828"
  19354. }, {
  19355. "label": "同江市",
  19356. "value": "230881"
  19357. }, {
  19358. "label": "富锦市",
  19359. "value": "230882"
  19360. }, {
  19361. "label": "抚远市",
  19362. "value": "230883"
  19363. }], [{
  19364. "label": "新兴区",
  19365. "value": "230902"
  19366. }, {
  19367. "label": "桃山区",
  19368. "value": "230903"
  19369. }, {
  19370. "label": "茄子河区",
  19371. "value": "230904"
  19372. }, {
  19373. "label": "勃利县",
  19374. "value": "230921"
  19375. }], [{
  19376. "label": "东安区",
  19377. "value": "231002"
  19378. }, {
  19379. "label": "阳明区",
  19380. "value": "231003"
  19381. }, {
  19382. "label": "爱民区",
  19383. "value": "231004"
  19384. }, {
  19385. "label": "西安区",
  19386. "value": "231005"
  19387. }, {
  19388. "label": "林口县",
  19389. "value": "231025"
  19390. }, {
  19391. "label": "牡丹江经济技术开发区",
  19392. "value": "231071"
  19393. }, {
  19394. "label": "绥芬河市",
  19395. "value": "231081"
  19396. }, {
  19397. "label": "海林市",
  19398. "value": "231083"
  19399. }, {
  19400. "label": "宁安市",
  19401. "value": "231084"
  19402. }, {
  19403. "label": "穆棱市",
  19404. "value": "231085"
  19405. }, {
  19406. "label": "东宁市",
  19407. "value": "231086"
  19408. }], [{
  19409. "label": "爱辉区",
  19410. "value": "231102"
  19411. }, {
  19412. "label": "嫩江县",
  19413. "value": "231121"
  19414. }, {
  19415. "label": "逊克县",
  19416. "value": "231123"
  19417. }, {
  19418. "label": "孙吴县",
  19419. "value": "231124"
  19420. }, {
  19421. "label": "北安市",
  19422. "value": "231181"
  19423. }, {
  19424. "label": "五大连池市",
  19425. "value": "231182"
  19426. }], [{
  19427. "label": "北林区",
  19428. "value": "231202"
  19429. }, {
  19430. "label": "望奎县",
  19431. "value": "231221"
  19432. }, {
  19433. "label": "兰西县",
  19434. "value": "231222"
  19435. }, {
  19436. "label": "青冈县",
  19437. "value": "231223"
  19438. }, {
  19439. "label": "庆安县",
  19440. "value": "231224"
  19441. }, {
  19442. "label": "明水县",
  19443. "value": "231225"
  19444. }, {
  19445. "label": "绥棱县",
  19446. "value": "231226"
  19447. }, {
  19448. "label": "安达市",
  19449. "value": "231281"
  19450. }, {
  19451. "label": "肇东市",
  19452. "value": "231282"
  19453. }, {
  19454. "label": "海伦市",
  19455. "value": "231283"
  19456. }], [{
  19457. "label": "加格达奇区",
  19458. "value": "232701"
  19459. }, {
  19460. "label": "松岭区",
  19461. "value": "232702"
  19462. }, {
  19463. "label": "新林区",
  19464. "value": "232703"
  19465. }, {
  19466. "label": "呼中区",
  19467. "value": "232704"
  19468. }, {
  19469. "label": "呼玛县",
  19470. "value": "232721"
  19471. }, {
  19472. "label": "塔河县",
  19473. "value": "232722"
  19474. }, {
  19475. "label": "漠河县",
  19476. "value": "232723"
  19477. }]], [[{
  19478. "label": "黄浦区",
  19479. "value": "310101"
  19480. }, {
  19481. "label": "徐汇区",
  19482. "value": "310104"
  19483. }, {
  19484. "label": "长宁区",
  19485. "value": "310105"
  19486. }, {
  19487. "label": "静安区",
  19488. "value": "310106"
  19489. }, {
  19490. "label": "普陀区",
  19491. "value": "310107"
  19492. }, {
  19493. "label": "虹口区",
  19494. "value": "310109"
  19495. }, {
  19496. "label": "杨浦区",
  19497. "value": "310110"
  19498. }, {
  19499. "label": "闵行区",
  19500. "value": "310112"
  19501. }, {
  19502. "label": "宝山区",
  19503. "value": "310113"
  19504. }, {
  19505. "label": "嘉定区",
  19506. "value": "310114"
  19507. }, {
  19508. "label": "浦东新区",
  19509. "value": "310115"
  19510. }, {
  19511. "label": "金山区",
  19512. "value": "310116"
  19513. }, {
  19514. "label": "松江区",
  19515. "value": "310117"
  19516. }, {
  19517. "label": "青浦区",
  19518. "value": "310118"
  19519. }, {
  19520. "label": "奉贤区",
  19521. "value": "310120"
  19522. }, {
  19523. "label": "崇明区",
  19524. "value": "310151"
  19525. }]], [[{
  19526. "label": "玄武区",
  19527. "value": "320102"
  19528. }, {
  19529. "label": "秦淮区",
  19530. "value": "320104"
  19531. }, {
  19532. "label": "建邺区",
  19533. "value": "320105"
  19534. }, {
  19535. "label": "鼓楼区",
  19536. "value": "320106"
  19537. }, {
  19538. "label": "浦口区",
  19539. "value": "320111"
  19540. }, {
  19541. "label": "栖霞区",
  19542. "value": "320113"
  19543. }, {
  19544. "label": "雨花台区",
  19545. "value": "320114"
  19546. }, {
  19547. "label": "江宁区",
  19548. "value": "320115"
  19549. }, {
  19550. "label": "六合区",
  19551. "value": "320116"
  19552. }, {
  19553. "label": "溧水区",
  19554. "value": "320117"
  19555. }, {
  19556. "label": "高淳区",
  19557. "value": "320118"
  19558. }], [{
  19559. "label": "锡山区",
  19560. "value": "320205"
  19561. }, {
  19562. "label": "惠山区",
  19563. "value": "320206"
  19564. }, {
  19565. "label": "滨湖区",
  19566. "value": "320211"
  19567. }, {
  19568. "label": "梁溪区",
  19569. "value": "320213"
  19570. }, {
  19571. "label": "新吴区",
  19572. "value": "320214"
  19573. }, {
  19574. "label": "江阴市",
  19575. "value": "320281"
  19576. }, {
  19577. "label": "宜兴市",
  19578. "value": "320282"
  19579. }], [{
  19580. "label": "鼓楼区",
  19581. "value": "320302"
  19582. }, {
  19583. "label": "云龙区",
  19584. "value": "320303"
  19585. }, {
  19586. "label": "贾汪区",
  19587. "value": "320305"
  19588. }, {
  19589. "label": "泉山区",
  19590. "value": "320311"
  19591. }, {
  19592. "label": "铜山区",
  19593. "value": "320312"
  19594. }, {
  19595. "label": "丰县",
  19596. "value": "320321"
  19597. }, {
  19598. "label": "沛县",
  19599. "value": "320322"
  19600. }, {
  19601. "label": "睢宁县",
  19602. "value": "320324"
  19603. }, {
  19604. "label": "徐州经济技术开发区",
  19605. "value": "320371"
  19606. }, {
  19607. "label": "新沂市",
  19608. "value": "320381"
  19609. }, {
  19610. "label": "邳州市",
  19611. "value": "320382"
  19612. }], [{
  19613. "label": "天宁区",
  19614. "value": "320402"
  19615. }, {
  19616. "label": "钟楼区",
  19617. "value": "320404"
  19618. }, {
  19619. "label": "新北区",
  19620. "value": "320411"
  19621. }, {
  19622. "label": "武进区",
  19623. "value": "320412"
  19624. }, {
  19625. "label": "金坛区",
  19626. "value": "320413"
  19627. }, {
  19628. "label": "溧阳市",
  19629. "value": "320481"
  19630. }], [{
  19631. "label": "虎丘区",
  19632. "value": "320505"
  19633. }, {
  19634. "label": "吴中区",
  19635. "value": "320506"
  19636. }, {
  19637. "label": "相城区",
  19638. "value": "320507"
  19639. }, {
  19640. "label": "姑苏区",
  19641. "value": "320508"
  19642. }, {
  19643. "label": "吴江区",
  19644. "value": "320509"
  19645. }, {
  19646. "label": "苏州工业园区",
  19647. "value": "320571"
  19648. }, {
  19649. "label": "常熟市",
  19650. "value": "320581"
  19651. }, {
  19652. "label": "张家港市",
  19653. "value": "320582"
  19654. }, {
  19655. "label": "昆山市",
  19656. "value": "320583"
  19657. }, {
  19658. "label": "太仓市",
  19659. "value": "320585"
  19660. }], [{
  19661. "label": "崇川区",
  19662. "value": "320602"
  19663. }, {
  19664. "label": "港闸区",
  19665. "value": "320611"
  19666. }, {
  19667. "label": "通州区",
  19668. "value": "320612"
  19669. }, {
  19670. "label": "海安县",
  19671. "value": "320621"
  19672. }, {
  19673. "label": "如东县",
  19674. "value": "320623"
  19675. }, {
  19676. "label": "南通经济技术开发区",
  19677. "value": "320671"
  19678. }, {
  19679. "label": "启东市",
  19680. "value": "320681"
  19681. }, {
  19682. "label": "如皋市",
  19683. "value": "320682"
  19684. }, {
  19685. "label": "海门市",
  19686. "value": "320684"
  19687. }], [{
  19688. "label": "连云区",
  19689. "value": "320703"
  19690. }, {
  19691. "label": "海州区",
  19692. "value": "320706"
  19693. }, {
  19694. "label": "赣榆区",
  19695. "value": "320707"
  19696. }, {
  19697. "label": "东海县",
  19698. "value": "320722"
  19699. }, {
  19700. "label": "灌云县",
  19701. "value": "320723"
  19702. }, {
  19703. "label": "灌南县",
  19704. "value": "320724"
  19705. }, {
  19706. "label": "连云港经济技术开发区",
  19707. "value": "320771"
  19708. }, {
  19709. "label": "连云港高新技术产业开发区",
  19710. "value": "320772"
  19711. }], [{
  19712. "label": "淮安区",
  19713. "value": "320803"
  19714. }, {
  19715. "label": "淮阴区",
  19716. "value": "320804"
  19717. }, {
  19718. "label": "清江浦区",
  19719. "value": "320812"
  19720. }, {
  19721. "label": "洪泽区",
  19722. "value": "320813"
  19723. }, {
  19724. "label": "涟水县",
  19725. "value": "320826"
  19726. }, {
  19727. "label": "盱眙县",
  19728. "value": "320830"
  19729. }, {
  19730. "label": "金湖县",
  19731. "value": "320831"
  19732. }, {
  19733. "label": "淮安经济技术开发区",
  19734. "value": "320871"
  19735. }], [{
  19736. "label": "亭湖区",
  19737. "value": "320902"
  19738. }, {
  19739. "label": "盐都区",
  19740. "value": "320903"
  19741. }, {
  19742. "label": "大丰区",
  19743. "value": "320904"
  19744. }, {
  19745. "label": "响水县",
  19746. "value": "320921"
  19747. }, {
  19748. "label": "滨海县",
  19749. "value": "320922"
  19750. }, {
  19751. "label": "阜宁县",
  19752. "value": "320923"
  19753. }, {
  19754. "label": "射阳县",
  19755. "value": "320924"
  19756. }, {
  19757. "label": "建湖县",
  19758. "value": "320925"
  19759. }, {
  19760. "label": "盐城经济技术开发区",
  19761. "value": "320971"
  19762. }, {
  19763. "label": "东台市",
  19764. "value": "320981"
  19765. }], [{
  19766. "label": "广陵区",
  19767. "value": "321002"
  19768. }, {
  19769. "label": "邗江区",
  19770. "value": "321003"
  19771. }, {
  19772. "label": "江都区",
  19773. "value": "321012"
  19774. }, {
  19775. "label": "宝应县",
  19776. "value": "321023"
  19777. }, {
  19778. "label": "扬州经济技术开发区",
  19779. "value": "321071"
  19780. }, {
  19781. "label": "仪征市",
  19782. "value": "321081"
  19783. }, {
  19784. "label": "高邮市",
  19785. "value": "321084"
  19786. }], [{
  19787. "label": "京口区",
  19788. "value": "321102"
  19789. }, {
  19790. "label": "润州区",
  19791. "value": "321111"
  19792. }, {
  19793. "label": "丹徒区",
  19794. "value": "321112"
  19795. }, {
  19796. "label": "镇江新区",
  19797. "value": "321171"
  19798. }, {
  19799. "label": "丹阳市",
  19800. "value": "321181"
  19801. }, {
  19802. "label": "扬中市",
  19803. "value": "321182"
  19804. }, {
  19805. "label": "句容市",
  19806. "value": "321183"
  19807. }], [{
  19808. "label": "海陵区",
  19809. "value": "321202"
  19810. }, {
  19811. "label": "高港区",
  19812. "value": "321203"
  19813. }, {
  19814. "label": "姜堰区",
  19815. "value": "321204"
  19816. }, {
  19817. "label": "泰州医药高新技术产业开发区",
  19818. "value": "321271"
  19819. }, {
  19820. "label": "兴化市",
  19821. "value": "321281"
  19822. }, {
  19823. "label": "靖江市",
  19824. "value": "321282"
  19825. }, {
  19826. "label": "泰兴市",
  19827. "value": "321283"
  19828. }], [{
  19829. "label": "宿城区",
  19830. "value": "321302"
  19831. }, {
  19832. "label": "宿豫区",
  19833. "value": "321311"
  19834. }, {
  19835. "label": "沭阳县",
  19836. "value": "321322"
  19837. }, {
  19838. "label": "泗阳县",
  19839. "value": "321323"
  19840. }, {
  19841. "label": "泗洪县",
  19842. "value": "321324"
  19843. }, {
  19844. "label": "宿迁经济技术开发区",
  19845. "value": "321371"
  19846. }]], [[{
  19847. "label": "上城区",
  19848. "value": "330102"
  19849. }, {
  19850. "label": "下城区",
  19851. "value": "330103"
  19852. }, {
  19853. "label": "江干区",
  19854. "value": "330104"
  19855. }, {
  19856. "label": "拱墅区",
  19857. "value": "330105"
  19858. }, {
  19859. "label": "西湖区",
  19860. "value": "330106"
  19861. }, {
  19862. "label": "滨江区",
  19863. "value": "330108"
  19864. }, {
  19865. "label": "萧山区",
  19866. "value": "330109"
  19867. }, {
  19868. "label": "余杭区",
  19869. "value": "330110"
  19870. }, {
  19871. "label": "富阳区",
  19872. "value": "330111"
  19873. }, {
  19874. "label": "临安区",
  19875. "value": "330112"
  19876. }, {
  19877. "label": "桐庐县",
  19878. "value": "330122"
  19879. }, {
  19880. "label": "淳安县",
  19881. "value": "330127"
  19882. }, {
  19883. "label": "建德市",
  19884. "value": "330182"
  19885. }], [{
  19886. "label": "海曙区",
  19887. "value": "330203"
  19888. }, {
  19889. "label": "江北区",
  19890. "value": "330205"
  19891. }, {
  19892. "label": "北仑区",
  19893. "value": "330206"
  19894. }, {
  19895. "label": "镇海区",
  19896. "value": "330211"
  19897. }, {
  19898. "label": "鄞州区",
  19899. "value": "330212"
  19900. }, {
  19901. "label": "奉化区",
  19902. "value": "330213"
  19903. }, {
  19904. "label": "象山县",
  19905. "value": "330225"
  19906. }, {
  19907. "label": "宁海县",
  19908. "value": "330226"
  19909. }, {
  19910. "label": "余姚市",
  19911. "value": "330281"
  19912. }, {
  19913. "label": "慈溪市",
  19914. "value": "330282"
  19915. }], [{
  19916. "label": "鹿城区",
  19917. "value": "330302"
  19918. }, {
  19919. "label": "龙湾区",
  19920. "value": "330303"
  19921. }, {
  19922. "label": "瓯海区",
  19923. "value": "330304"
  19924. }, {
  19925. "label": "洞头区",
  19926. "value": "330305"
  19927. }, {
  19928. "label": "永嘉县",
  19929. "value": "330324"
  19930. }, {
  19931. "label": "平阳县",
  19932. "value": "330326"
  19933. }, {
  19934. "label": "苍南县",
  19935. "value": "330327"
  19936. }, {
  19937. "label": "文成县",
  19938. "value": "330328"
  19939. }, {
  19940. "label": "泰顺县",
  19941. "value": "330329"
  19942. }, {
  19943. "label": "温州经济技术开发区",
  19944. "value": "330371"
  19945. }, {
  19946. "label": "瑞安市",
  19947. "value": "330381"
  19948. }, {
  19949. "label": "乐清市",
  19950. "value": "330382"
  19951. }], [{
  19952. "label": "南湖区",
  19953. "value": "330402"
  19954. }, {
  19955. "label": "秀洲区",
  19956. "value": "330411"
  19957. }, {
  19958. "label": "嘉善县",
  19959. "value": "330421"
  19960. }, {
  19961. "label": "海盐县",
  19962. "value": "330424"
  19963. }, {
  19964. "label": "海宁市",
  19965. "value": "330481"
  19966. }, {
  19967. "label": "平湖市",
  19968. "value": "330482"
  19969. }, {
  19970. "label": "桐乡市",
  19971. "value": "330483"
  19972. }], [{
  19973. "label": "吴兴区",
  19974. "value": "330502"
  19975. }, {
  19976. "label": "南浔区",
  19977. "value": "330503"
  19978. }, {
  19979. "label": "德清县",
  19980. "value": "330521"
  19981. }, {
  19982. "label": "长兴县",
  19983. "value": "330522"
  19984. }, {
  19985. "label": "安吉县",
  19986. "value": "330523"
  19987. }], [{
  19988. "label": "越城区",
  19989. "value": "330602"
  19990. }, {
  19991. "label": "柯桥区",
  19992. "value": "330603"
  19993. }, {
  19994. "label": "上虞区",
  19995. "value": "330604"
  19996. }, {
  19997. "label": "新昌县",
  19998. "value": "330624"
  19999. }, {
  20000. "label": "诸暨市",
  20001. "value": "330681"
  20002. }, {
  20003. "label": "嵊州市",
  20004. "value": "330683"
  20005. }], [{
  20006. "label": "婺城区",
  20007. "value": "330702"
  20008. }, {
  20009. "label": "金东区",
  20010. "value": "330703"
  20011. }, {
  20012. "label": "武义县",
  20013. "value": "330723"
  20014. }, {
  20015. "label": "浦江县",
  20016. "value": "330726"
  20017. }, {
  20018. "label": "磐安县",
  20019. "value": "330727"
  20020. }, {
  20021. "label": "兰溪市",
  20022. "value": "330781"
  20023. }, {
  20024. "label": "义乌市",
  20025. "value": "330782"
  20026. }, {
  20027. "label": "东阳市",
  20028. "value": "330783"
  20029. }, {
  20030. "label": "永康市",
  20031. "value": "330784"
  20032. }], [{
  20033. "label": "柯城区",
  20034. "value": "330802"
  20035. }, {
  20036. "label": "衢江区",
  20037. "value": "330803"
  20038. }, {
  20039. "label": "常山县",
  20040. "value": "330822"
  20041. }, {
  20042. "label": "开化县",
  20043. "value": "330824"
  20044. }, {
  20045. "label": "龙游县",
  20046. "value": "330825"
  20047. }, {
  20048. "label": "江山市",
  20049. "value": "330881"
  20050. }], [{
  20051. "label": "定海区",
  20052. "value": "330902"
  20053. }, {
  20054. "label": "普陀区",
  20055. "value": "330903"
  20056. }, {
  20057. "label": "岱山县",
  20058. "value": "330921"
  20059. }, {
  20060. "label": "嵊泗县",
  20061. "value": "330922"
  20062. }], [{
  20063. "label": "椒江区",
  20064. "value": "331002"
  20065. }, {
  20066. "label": "黄岩区",
  20067. "value": "331003"
  20068. }, {
  20069. "label": "路桥区",
  20070. "value": "331004"
  20071. }, {
  20072. "label": "三门县",
  20073. "value": "331022"
  20074. }, {
  20075. "label": "天台县",
  20076. "value": "331023"
  20077. }, {
  20078. "label": "仙居县",
  20079. "value": "331024"
  20080. }, {
  20081. "label": "温岭市",
  20082. "value": "331081"
  20083. }, {
  20084. "label": "临海市",
  20085. "value": "331082"
  20086. }, {
  20087. "label": "玉环市",
  20088. "value": "331083"
  20089. }], [{
  20090. "label": "莲都区",
  20091. "value": "331102"
  20092. }, {
  20093. "label": "青田县",
  20094. "value": "331121"
  20095. }, {
  20096. "label": "缙云县",
  20097. "value": "331122"
  20098. }, {
  20099. "label": "遂昌县",
  20100. "value": "331123"
  20101. }, {
  20102. "label": "松阳县",
  20103. "value": "331124"
  20104. }, {
  20105. "label": "云和县",
  20106. "value": "331125"
  20107. }, {
  20108. "label": "庆元县",
  20109. "value": "331126"
  20110. }, {
  20111. "label": "景宁畲族自治县",
  20112. "value": "331127"
  20113. }, {
  20114. "label": "龙泉市",
  20115. "value": "331181"
  20116. }]], [[{
  20117. "label": "瑶海区",
  20118. "value": "340102"
  20119. }, {
  20120. "label": "庐阳区",
  20121. "value": "340103"
  20122. }, {
  20123. "label": "蜀山区",
  20124. "value": "340104"
  20125. }, {
  20126. "label": "包河区",
  20127. "value": "340111"
  20128. }, {
  20129. "label": "长丰县",
  20130. "value": "340121"
  20131. }, {
  20132. "label": "肥东县",
  20133. "value": "340122"
  20134. }, {
  20135. "label": "肥西县",
  20136. "value": "340123"
  20137. }, {
  20138. "label": "庐江县",
  20139. "value": "340124"
  20140. }, {
  20141. "label": "合肥高新技术产业开发区",
  20142. "value": "340171"
  20143. }, {
  20144. "label": "合肥经济技术开发区",
  20145. "value": "340172"
  20146. }, {
  20147. "label": "合肥新站高新技术产业开发区",
  20148. "value": "340173"
  20149. }, {
  20150. "label": "巢湖市",
  20151. "value": "340181"
  20152. }], [{
  20153. "label": "镜湖区",
  20154. "value": "340202"
  20155. }, {
  20156. "label": "弋江区",
  20157. "value": "340203"
  20158. }, {
  20159. "label": "鸠江区",
  20160. "value": "340207"
  20161. }, {
  20162. "label": "三山区",
  20163. "value": "340208"
  20164. }, {
  20165. "label": "芜湖县",
  20166. "value": "340221"
  20167. }, {
  20168. "label": "繁昌县",
  20169. "value": "340222"
  20170. }, {
  20171. "label": "南陵县",
  20172. "value": "340223"
  20173. }, {
  20174. "label": "无为县",
  20175. "value": "340225"
  20176. }, {
  20177. "label": "芜湖经济技术开发区",
  20178. "value": "340271"
  20179. }, {
  20180. "label": "安徽芜湖长江大桥经济开发区",
  20181. "value": "340272"
  20182. }], [{
  20183. "label": "龙子湖区",
  20184. "value": "340302"
  20185. }, {
  20186. "label": "蚌山区",
  20187. "value": "340303"
  20188. }, {
  20189. "label": "禹会区",
  20190. "value": "340304"
  20191. }, {
  20192. "label": "淮上区",
  20193. "value": "340311"
  20194. }, {
  20195. "label": "怀远县",
  20196. "value": "340321"
  20197. }, {
  20198. "label": "五河县",
  20199. "value": "340322"
  20200. }, {
  20201. "label": "固镇县",
  20202. "value": "340323"
  20203. }, {
  20204. "label": "蚌埠市高新技术开发区",
  20205. "value": "340371"
  20206. }, {
  20207. "label": "蚌埠市经济开发区",
  20208. "value": "340372"
  20209. }], [{
  20210. "label": "大通区",
  20211. "value": "340402"
  20212. }, {
  20213. "label": "田家庵区",
  20214. "value": "340403"
  20215. }, {
  20216. "label": "谢家集区",
  20217. "value": "340404"
  20218. }, {
  20219. "label": "八公山区",
  20220. "value": "340405"
  20221. }, {
  20222. "label": "潘集区",
  20223. "value": "340406"
  20224. }, {
  20225. "label": "凤台县",
  20226. "value": "340421"
  20227. }, {
  20228. "label": "寿县",
  20229. "value": "340422"
  20230. }], [{
  20231. "label": "花山区",
  20232. "value": "340503"
  20233. }, {
  20234. "label": "雨山区",
  20235. "value": "340504"
  20236. }, {
  20237. "label": "博望区",
  20238. "value": "340506"
  20239. }, {
  20240. "label": "当涂县",
  20241. "value": "340521"
  20242. }, {
  20243. "label": "含山县",
  20244. "value": "340522"
  20245. }, {
  20246. "label": "和县",
  20247. "value": "340523"
  20248. }], [{
  20249. "label": "杜集区",
  20250. "value": "340602"
  20251. }, {
  20252. "label": "相山区",
  20253. "value": "340603"
  20254. }, {
  20255. "label": "烈山区",
  20256. "value": "340604"
  20257. }, {
  20258. "label": "濉溪县",
  20259. "value": "340621"
  20260. }], [{
  20261. "label": "铜官区",
  20262. "value": "340705"
  20263. }, {
  20264. "label": "义安区",
  20265. "value": "340706"
  20266. }, {
  20267. "label": "郊区",
  20268. "value": "340711"
  20269. }, {
  20270. "label": "枞阳县",
  20271. "value": "340722"
  20272. }], [{
  20273. "label": "迎江区",
  20274. "value": "340802"
  20275. }, {
  20276. "label": "大观区",
  20277. "value": "340803"
  20278. }, {
  20279. "label": "宜秀区",
  20280. "value": "340811"
  20281. }, {
  20282. "label": "怀宁县",
  20283. "value": "340822"
  20284. }, {
  20285. "label": "潜山县",
  20286. "value": "340824"
  20287. }, {
  20288. "label": "太湖县",
  20289. "value": "340825"
  20290. }, {
  20291. "label": "宿松县",
  20292. "value": "340826"
  20293. }, {
  20294. "label": "望江县",
  20295. "value": "340827"
  20296. }, {
  20297. "label": "岳西县",
  20298. "value": "340828"
  20299. }, {
  20300. "label": "安徽安庆经济开发区",
  20301. "value": "340871"
  20302. }, {
  20303. "label": "桐城市",
  20304. "value": "340881"
  20305. }], [{
  20306. "label": "屯溪区",
  20307. "value": "341002"
  20308. }, {
  20309. "label": "黄山区",
  20310. "value": "341003"
  20311. }, {
  20312. "label": "徽州区",
  20313. "value": "341004"
  20314. }, {
  20315. "label": "歙县",
  20316. "value": "341021"
  20317. }, {
  20318. "label": "休宁县",
  20319. "value": "341022"
  20320. }, {
  20321. "label": "黟县",
  20322. "value": "341023"
  20323. }, {
  20324. "label": "祁门县",
  20325. "value": "341024"
  20326. }], [{
  20327. "label": "琅琊区",
  20328. "value": "341102"
  20329. }, {
  20330. "label": "南谯区",
  20331. "value": "341103"
  20332. }, {
  20333. "label": "来安县",
  20334. "value": "341122"
  20335. }, {
  20336. "label": "全椒县",
  20337. "value": "341124"
  20338. }, {
  20339. "label": "定远县",
  20340. "value": "341125"
  20341. }, {
  20342. "label": "凤阳县",
  20343. "value": "341126"
  20344. }, {
  20345. "label": "苏滁现代产业园",
  20346. "value": "341171"
  20347. }, {
  20348. "label": "滁州经济技术开发区",
  20349. "value": "341172"
  20350. }, {
  20351. "label": "天长市",
  20352. "value": "341181"
  20353. }, {
  20354. "label": "明光市",
  20355. "value": "341182"
  20356. }], [{
  20357. "label": "颍州区",
  20358. "value": "341202"
  20359. }, {
  20360. "label": "颍东区",
  20361. "value": "341203"
  20362. }, {
  20363. "label": "颍泉区",
  20364. "value": "341204"
  20365. }, {
  20366. "label": "临泉县",
  20367. "value": "341221"
  20368. }, {
  20369. "label": "太和县",
  20370. "value": "341222"
  20371. }, {
  20372. "label": "阜南县",
  20373. "value": "341225"
  20374. }, {
  20375. "label": "颍上县",
  20376. "value": "341226"
  20377. }, {
  20378. "label": "阜阳合肥现代产业园区",
  20379. "value": "341271"
  20380. }, {
  20381. "label": "阜阳经济技术开发区",
  20382. "value": "341272"
  20383. }, {
  20384. "label": "界首市",
  20385. "value": "341282"
  20386. }], [{
  20387. "label": "埇桥区",
  20388. "value": "341302"
  20389. }, {
  20390. "label": "砀山县",
  20391. "value": "341321"
  20392. }, {
  20393. "label": "萧县",
  20394. "value": "341322"
  20395. }, {
  20396. "label": "灵璧县",
  20397. "value": "341323"
  20398. }, {
  20399. "label": "泗县",
  20400. "value": "341324"
  20401. }, {
  20402. "label": "宿州马鞍山现代产业园区",
  20403. "value": "341371"
  20404. }, {
  20405. "label": "宿州经济技术开发区",
  20406. "value": "341372"
  20407. }], [{
  20408. "label": "金安区",
  20409. "value": "341502"
  20410. }, {
  20411. "label": "裕安区",
  20412. "value": "341503"
  20413. }, {
  20414. "label": "叶集区",
  20415. "value": "341504"
  20416. }, {
  20417. "label": "霍邱县",
  20418. "value": "341522"
  20419. }, {
  20420. "label": "舒城县",
  20421. "value": "341523"
  20422. }, {
  20423. "label": "金寨县",
  20424. "value": "341524"
  20425. }, {
  20426. "label": "霍山县",
  20427. "value": "341525"
  20428. }], [{
  20429. "label": "谯城区",
  20430. "value": "341602"
  20431. }, {
  20432. "label": "涡阳县",
  20433. "value": "341621"
  20434. }, {
  20435. "label": "蒙城县",
  20436. "value": "341622"
  20437. }, {
  20438. "label": "利辛县",
  20439. "value": "341623"
  20440. }], [{
  20441. "label": "贵池区",
  20442. "value": "341702"
  20443. }, {
  20444. "label": "东至县",
  20445. "value": "341721"
  20446. }, {
  20447. "label": "石台县",
  20448. "value": "341722"
  20449. }, {
  20450. "label": "青阳县",
  20451. "value": "341723"
  20452. }], [{
  20453. "label": "宣州区",
  20454. "value": "341802"
  20455. }, {
  20456. "label": "郎溪县",
  20457. "value": "341821"
  20458. }, {
  20459. "label": "广德县",
  20460. "value": "341822"
  20461. }, {
  20462. "label": "泾县",
  20463. "value": "341823"
  20464. }, {
  20465. "label": "绩溪县",
  20466. "value": "341824"
  20467. }, {
  20468. "label": "旌德县",
  20469. "value": "341825"
  20470. }, {
  20471. "label": "宣城市经济开发区",
  20472. "value": "341871"
  20473. }, {
  20474. "label": "宁国市",
  20475. "value": "341881"
  20476. }]], [[{
  20477. "label": "鼓楼区",
  20478. "value": "350102"
  20479. }, {
  20480. "label": "台江区",
  20481. "value": "350103"
  20482. }, {
  20483. "label": "仓山区",
  20484. "value": "350104"
  20485. }, {
  20486. "label": "马尾区",
  20487. "value": "350105"
  20488. }, {
  20489. "label": "晋安区",
  20490. "value": "350111"
  20491. }, {
  20492. "label": "闽侯县",
  20493. "value": "350121"
  20494. }, {
  20495. "label": "连江县",
  20496. "value": "350122"
  20497. }, {
  20498. "label": "罗源县",
  20499. "value": "350123"
  20500. }, {
  20501. "label": "闽清县",
  20502. "value": "350124"
  20503. }, {
  20504. "label": "永泰县",
  20505. "value": "350125"
  20506. }, {
  20507. "label": "平潭县",
  20508. "value": "350128"
  20509. }, {
  20510. "label": "福清市",
  20511. "value": "350181"
  20512. }, {
  20513. "label": "长乐市",
  20514. "value": "350182"
  20515. }], [{
  20516. "label": "思明区",
  20517. "value": "350203"
  20518. }, {
  20519. "label": "海沧区",
  20520. "value": "350205"
  20521. }, {
  20522. "label": "湖里区",
  20523. "value": "350206"
  20524. }, {
  20525. "label": "集美区",
  20526. "value": "350211"
  20527. }, {
  20528. "label": "同安区",
  20529. "value": "350212"
  20530. }, {
  20531. "label": "翔安区",
  20532. "value": "350213"
  20533. }], [{
  20534. "label": "城厢区",
  20535. "value": "350302"
  20536. }, {
  20537. "label": "涵江区",
  20538. "value": "350303"
  20539. }, {
  20540. "label": "荔城区",
  20541. "value": "350304"
  20542. }, {
  20543. "label": "秀屿区",
  20544. "value": "350305"
  20545. }, {
  20546. "label": "仙游县",
  20547. "value": "350322"
  20548. }], [{
  20549. "label": "梅列区",
  20550. "value": "350402"
  20551. }, {
  20552. "label": "三元区",
  20553. "value": "350403"
  20554. }, {
  20555. "label": "明溪县",
  20556. "value": "350421"
  20557. }, {
  20558. "label": "清流县",
  20559. "value": "350423"
  20560. }, {
  20561. "label": "宁化县",
  20562. "value": "350424"
  20563. }, {
  20564. "label": "大田县",
  20565. "value": "350425"
  20566. }, {
  20567. "label": "尤溪县",
  20568. "value": "350426"
  20569. }, {
  20570. "label": "沙县",
  20571. "value": "350427"
  20572. }, {
  20573. "label": "将乐县",
  20574. "value": "350428"
  20575. }, {
  20576. "label": "泰宁县",
  20577. "value": "350429"
  20578. }, {
  20579. "label": "建宁县",
  20580. "value": "350430"
  20581. }, {
  20582. "label": "永安市",
  20583. "value": "350481"
  20584. }], [{
  20585. "label": "鲤城区",
  20586. "value": "350502"
  20587. }, {
  20588. "label": "丰泽区",
  20589. "value": "350503"
  20590. }, {
  20591. "label": "洛江区",
  20592. "value": "350504"
  20593. }, {
  20594. "label": "泉港区",
  20595. "value": "350505"
  20596. }, {
  20597. "label": "惠安县",
  20598. "value": "350521"
  20599. }, {
  20600. "label": "安溪县",
  20601. "value": "350524"
  20602. }, {
  20603. "label": "永春县",
  20604. "value": "350525"
  20605. }, {
  20606. "label": "德化县",
  20607. "value": "350526"
  20608. }, {
  20609. "label": "金门县",
  20610. "value": "350527"
  20611. }, {
  20612. "label": "石狮市",
  20613. "value": "350581"
  20614. }, {
  20615. "label": "晋江市",
  20616. "value": "350582"
  20617. }, {
  20618. "label": "南安市",
  20619. "value": "350583"
  20620. }], [{
  20621. "label": "芗城区",
  20622. "value": "350602"
  20623. }, {
  20624. "label": "龙文区",
  20625. "value": "350603"
  20626. }, {
  20627. "label": "云霄县",
  20628. "value": "350622"
  20629. }, {
  20630. "label": "漳浦县",
  20631. "value": "350623"
  20632. }, {
  20633. "label": "诏安县",
  20634. "value": "350624"
  20635. }, {
  20636. "label": "长泰县",
  20637. "value": "350625"
  20638. }, {
  20639. "label": "东山县",
  20640. "value": "350626"
  20641. }, {
  20642. "label": "南靖县",
  20643. "value": "350627"
  20644. }, {
  20645. "label": "平和县",
  20646. "value": "350628"
  20647. }, {
  20648. "label": "华安县",
  20649. "value": "350629"
  20650. }, {
  20651. "label": "龙海市",
  20652. "value": "350681"
  20653. }], [{
  20654. "label": "延平区",
  20655. "value": "350702"
  20656. }, {
  20657. "label": "建阳区",
  20658. "value": "350703"
  20659. }, {
  20660. "label": "顺昌县",
  20661. "value": "350721"
  20662. }, {
  20663. "label": "浦城县",
  20664. "value": "350722"
  20665. }, {
  20666. "label": "光泽县",
  20667. "value": "350723"
  20668. }, {
  20669. "label": "松溪县",
  20670. "value": "350724"
  20671. }, {
  20672. "label": "政和县",
  20673. "value": "350725"
  20674. }, {
  20675. "label": "邵武市",
  20676. "value": "350781"
  20677. }, {
  20678. "label": "武夷山市",
  20679. "value": "350782"
  20680. }, {
  20681. "label": "建瓯市",
  20682. "value": "350783"
  20683. }], [{
  20684. "label": "新罗区",
  20685. "value": "350802"
  20686. }, {
  20687. "label": "永定区",
  20688. "value": "350803"
  20689. }, {
  20690. "label": "长汀县",
  20691. "value": "350821"
  20692. }, {
  20693. "label": "上杭县",
  20694. "value": "350823"
  20695. }, {
  20696. "label": "武平县",
  20697. "value": "350824"
  20698. }, {
  20699. "label": "连城县",
  20700. "value": "350825"
  20701. }, {
  20702. "label": "漳平市",
  20703. "value": "350881"
  20704. }], [{
  20705. "label": "蕉城区",
  20706. "value": "350902"
  20707. }, {
  20708. "label": "霞浦县",
  20709. "value": "350921"
  20710. }, {
  20711. "label": "古田县",
  20712. "value": "350922"
  20713. }, {
  20714. "label": "屏南县",
  20715. "value": "350923"
  20716. }, {
  20717. "label": "寿宁县",
  20718. "value": "350924"
  20719. }, {
  20720. "label": "周宁县",
  20721. "value": "350925"
  20722. }, {
  20723. "label": "柘荣县",
  20724. "value": "350926"
  20725. }, {
  20726. "label": "福安市",
  20727. "value": "350981"
  20728. }, {
  20729. "label": "福鼎市",
  20730. "value": "350982"
  20731. }]], [[{
  20732. "label": "东湖区",
  20733. "value": "360102"
  20734. }, {
  20735. "label": "西湖区",
  20736. "value": "360103"
  20737. }, {
  20738. "label": "青云谱区",
  20739. "value": "360104"
  20740. }, {
  20741. "label": "湾里区",
  20742. "value": "360105"
  20743. }, {
  20744. "label": "青山湖区",
  20745. "value": "360111"
  20746. }, {
  20747. "label": "新建区",
  20748. "value": "360112"
  20749. }, {
  20750. "label": "南昌县",
  20751. "value": "360121"
  20752. }, {
  20753. "label": "安义县",
  20754. "value": "360123"
  20755. }, {
  20756. "label": "进贤县",
  20757. "value": "360124"
  20758. }], [{
  20759. "label": "昌江区",
  20760. "value": "360202"
  20761. }, {
  20762. "label": "珠山区",
  20763. "value": "360203"
  20764. }, {
  20765. "label": "浮梁县",
  20766. "value": "360222"
  20767. }, {
  20768. "label": "乐平市",
  20769. "value": "360281"
  20770. }], [{
  20771. "label": "安源区",
  20772. "value": "360302"
  20773. }, {
  20774. "label": "湘东区",
  20775. "value": "360313"
  20776. }, {
  20777. "label": "莲花县",
  20778. "value": "360321"
  20779. }, {
  20780. "label": "上栗县",
  20781. "value": "360322"
  20782. }, {
  20783. "label": "芦溪县",
  20784. "value": "360323"
  20785. }], [{
  20786. "label": "濂溪区",
  20787. "value": "360402"
  20788. }, {
  20789. "label": "浔阳区",
  20790. "value": "360403"
  20791. }, {
  20792. "label": "柴桑区",
  20793. "value": "360404"
  20794. }, {
  20795. "label": "武宁县",
  20796. "value": "360423"
  20797. }, {
  20798. "label": "修水县",
  20799. "value": "360424"
  20800. }, {
  20801. "label": "永修县",
  20802. "value": "360425"
  20803. }, {
  20804. "label": "德安县",
  20805. "value": "360426"
  20806. }, {
  20807. "label": "都昌县",
  20808. "value": "360428"
  20809. }, {
  20810. "label": "湖口县",
  20811. "value": "360429"
  20812. }, {
  20813. "label": "彭泽县",
  20814. "value": "360430"
  20815. }, {
  20816. "label": "瑞昌市",
  20817. "value": "360481"
  20818. }, {
  20819. "label": "共青城市",
  20820. "value": "360482"
  20821. }, {
  20822. "label": "庐山市",
  20823. "value": "360483"
  20824. }], [{
  20825. "label": "渝水区",
  20826. "value": "360502"
  20827. }, {
  20828. "label": "分宜县",
  20829. "value": "360521"
  20830. }], [{
  20831. "label": "月湖区",
  20832. "value": "360602"
  20833. }, {
  20834. "label": "余江县",
  20835. "value": "360622"
  20836. }, {
  20837. "label": "贵溪市",
  20838. "value": "360681"
  20839. }], [{
  20840. "label": "章贡区",
  20841. "value": "360702"
  20842. }, {
  20843. "label": "南康区",
  20844. "value": "360703"
  20845. }, {
  20846. "label": "赣县区",
  20847. "value": "360704"
  20848. }, {
  20849. "label": "信丰县",
  20850. "value": "360722"
  20851. }, {
  20852. "label": "大余县",
  20853. "value": "360723"
  20854. }, {
  20855. "label": "上犹县",
  20856. "value": "360724"
  20857. }, {
  20858. "label": "崇义县",
  20859. "value": "360725"
  20860. }, {
  20861. "label": "安远县",
  20862. "value": "360726"
  20863. }, {
  20864. "label": "龙南县",
  20865. "value": "360727"
  20866. }, {
  20867. "label": "定南县",
  20868. "value": "360728"
  20869. }, {
  20870. "label": "全南县",
  20871. "value": "360729"
  20872. }, {
  20873. "label": "宁都县",
  20874. "value": "360730"
  20875. }, {
  20876. "label": "于都县",
  20877. "value": "360731"
  20878. }, {
  20879. "label": "兴国县",
  20880. "value": "360732"
  20881. }, {
  20882. "label": "会昌县",
  20883. "value": "360733"
  20884. }, {
  20885. "label": "寻乌县",
  20886. "value": "360734"
  20887. }, {
  20888. "label": "石城县",
  20889. "value": "360735"
  20890. }, {
  20891. "label": "瑞金市",
  20892. "value": "360781"
  20893. }], [{
  20894. "label": "吉州区",
  20895. "value": "360802"
  20896. }, {
  20897. "label": "青原区",
  20898. "value": "360803"
  20899. }, {
  20900. "label": "吉安县",
  20901. "value": "360821"
  20902. }, {
  20903. "label": "吉水县",
  20904. "value": "360822"
  20905. }, {
  20906. "label": "峡江县",
  20907. "value": "360823"
  20908. }, {
  20909. "label": "新干县",
  20910. "value": "360824"
  20911. }, {
  20912. "label": "永丰县",
  20913. "value": "360825"
  20914. }, {
  20915. "label": "泰和县",
  20916. "value": "360826"
  20917. }, {
  20918. "label": "遂川县",
  20919. "value": "360827"
  20920. }, {
  20921. "label": "万安县",
  20922. "value": "360828"
  20923. }, {
  20924. "label": "安福县",
  20925. "value": "360829"
  20926. }, {
  20927. "label": "永新县",
  20928. "value": "360830"
  20929. }, {
  20930. "label": "井冈山市",
  20931. "value": "360881"
  20932. }], [{
  20933. "label": "袁州区",
  20934. "value": "360902"
  20935. }, {
  20936. "label": "奉新县",
  20937. "value": "360921"
  20938. }, {
  20939. "label": "万载县",
  20940. "value": "360922"
  20941. }, {
  20942. "label": "上高县",
  20943. "value": "360923"
  20944. }, {
  20945. "label": "宜丰县",
  20946. "value": "360924"
  20947. }, {
  20948. "label": "靖安县",
  20949. "value": "360925"
  20950. }, {
  20951. "label": "铜鼓县",
  20952. "value": "360926"
  20953. }, {
  20954. "label": "丰城市",
  20955. "value": "360981"
  20956. }, {
  20957. "label": "樟树市",
  20958. "value": "360982"
  20959. }, {
  20960. "label": "高安市",
  20961. "value": "360983"
  20962. }], [{
  20963. "label": "临川区",
  20964. "value": "361002"
  20965. }, {
  20966. "label": "东乡区",
  20967. "value": "361003"
  20968. }, {
  20969. "label": "南城县",
  20970. "value": "361021"
  20971. }, {
  20972. "label": "黎川县",
  20973. "value": "361022"
  20974. }, {
  20975. "label": "南丰县",
  20976. "value": "361023"
  20977. }, {
  20978. "label": "崇仁县",
  20979. "value": "361024"
  20980. }, {
  20981. "label": "乐安县",
  20982. "value": "361025"
  20983. }, {
  20984. "label": "宜黄县",
  20985. "value": "361026"
  20986. }, {
  20987. "label": "金溪县",
  20988. "value": "361027"
  20989. }, {
  20990. "label": "资溪县",
  20991. "value": "361028"
  20992. }, {
  20993. "label": "广昌县",
  20994. "value": "361030"
  20995. }], [{
  20996. "label": "信州区",
  20997. "value": "361102"
  20998. }, {
  20999. "label": "广丰区",
  21000. "value": "361103"
  21001. }, {
  21002. "label": "上饶县",
  21003. "value": "361121"
  21004. }, {
  21005. "label": "玉山县",
  21006. "value": "361123"
  21007. }, {
  21008. "label": "铅山县",
  21009. "value": "361124"
  21010. }, {
  21011. "label": "横峰县",
  21012. "value": "361125"
  21013. }, {
  21014. "label": "弋阳县",
  21015. "value": "361126"
  21016. }, {
  21017. "label": "余干县",
  21018. "value": "361127"
  21019. }, {
  21020. "label": "鄱阳县",
  21021. "value": "361128"
  21022. }, {
  21023. "label": "万年县",
  21024. "value": "361129"
  21025. }, {
  21026. "label": "婺源县",
  21027. "value": "361130"
  21028. }, {
  21029. "label": "德兴市",
  21030. "value": "361181"
  21031. }]], [[{
  21032. "label": "历下区",
  21033. "value": "370102"
  21034. }, {
  21035. "label": "市中区",
  21036. "value": "370103"
  21037. }, {
  21038. "label": "槐荫区",
  21039. "value": "370104"
  21040. }, {
  21041. "label": "天桥区",
  21042. "value": "370105"
  21043. }, {
  21044. "label": "历城区",
  21045. "value": "370112"
  21046. }, {
  21047. "label": "长清区",
  21048. "value": "370113"
  21049. }, {
  21050. "label": "章丘区",
  21051. "value": "370114"
  21052. }, {
  21053. "label": "平阴县",
  21054. "value": "370124"
  21055. }, {
  21056. "label": "济阳县",
  21057. "value": "370125"
  21058. }, {
  21059. "label": "商河县",
  21060. "value": "370126"
  21061. }, {
  21062. "label": "济南高新技术产业开发区",
  21063. "value": "370171"
  21064. }], [{
  21065. "label": "市南区",
  21066. "value": "370202"
  21067. }, {
  21068. "label": "市北区",
  21069. "value": "370203"
  21070. }, {
  21071. "label": "黄岛区",
  21072. "value": "370211"
  21073. }, {
  21074. "label": "崂山区",
  21075. "value": "370212"
  21076. }, {
  21077. "label": "李沧区",
  21078. "value": "370213"
  21079. }, {
  21080. "label": "城阳区",
  21081. "value": "370214"
  21082. }, {
  21083. "label": "即墨区",
  21084. "value": "370215"
  21085. }, {
  21086. "label": "青岛高新技术产业开发区",
  21087. "value": "370271"
  21088. }, {
  21089. "label": "胶州市",
  21090. "value": "370281"
  21091. }, {
  21092. "label": "平度市",
  21093. "value": "370283"
  21094. }, {
  21095. "label": "莱西市",
  21096. "value": "370285"
  21097. }], [{
  21098. "label": "淄川区",
  21099. "value": "370302"
  21100. }, {
  21101. "label": "张店区",
  21102. "value": "370303"
  21103. }, {
  21104. "label": "博山区",
  21105. "value": "370304"
  21106. }, {
  21107. "label": "临淄区",
  21108. "value": "370305"
  21109. }, {
  21110. "label": "周村区",
  21111. "value": "370306"
  21112. }, {
  21113. "label": "桓台县",
  21114. "value": "370321"
  21115. }, {
  21116. "label": "高青县",
  21117. "value": "370322"
  21118. }, {
  21119. "label": "沂源县",
  21120. "value": "370323"
  21121. }], [{
  21122. "label": "市中区",
  21123. "value": "370402"
  21124. }, {
  21125. "label": "薛城区",
  21126. "value": "370403"
  21127. }, {
  21128. "label": "峄城区",
  21129. "value": "370404"
  21130. }, {
  21131. "label": "台儿庄区",
  21132. "value": "370405"
  21133. }, {
  21134. "label": "山亭区",
  21135. "value": "370406"
  21136. }, {
  21137. "label": "滕州市",
  21138. "value": "370481"
  21139. }], [{
  21140. "label": "东营区",
  21141. "value": "370502"
  21142. }, {
  21143. "label": "河口区",
  21144. "value": "370503"
  21145. }, {
  21146. "label": "垦利区",
  21147. "value": "370505"
  21148. }, {
  21149. "label": "利津县",
  21150. "value": "370522"
  21151. }, {
  21152. "label": "广饶县",
  21153. "value": "370523"
  21154. }, {
  21155. "label": "东营经济技术开发区",
  21156. "value": "370571"
  21157. }, {
  21158. "label": "东营港经济开发区",
  21159. "value": "370572"
  21160. }], [{
  21161. "label": "芝罘区",
  21162. "value": "370602"
  21163. }, {
  21164. "label": "福山区",
  21165. "value": "370611"
  21166. }, {
  21167. "label": "牟平区",
  21168. "value": "370612"
  21169. }, {
  21170. "label": "莱山区",
  21171. "value": "370613"
  21172. }, {
  21173. "label": "长岛县",
  21174. "value": "370634"
  21175. }, {
  21176. "label": "烟台高新技术产业开发区",
  21177. "value": "370671"
  21178. }, {
  21179. "label": "烟台经济技术开发区",
  21180. "value": "370672"
  21181. }, {
  21182. "label": "龙口市",
  21183. "value": "370681"
  21184. }, {
  21185. "label": "莱阳市",
  21186. "value": "370682"
  21187. }, {
  21188. "label": "莱州市",
  21189. "value": "370683"
  21190. }, {
  21191. "label": "蓬莱市",
  21192. "value": "370684"
  21193. }, {
  21194. "label": "招远市",
  21195. "value": "370685"
  21196. }, {
  21197. "label": "栖霞市",
  21198. "value": "370686"
  21199. }, {
  21200. "label": "海阳市",
  21201. "value": "370687"
  21202. }], [{
  21203. "label": "潍城区",
  21204. "value": "370702"
  21205. }, {
  21206. "label": "寒亭区",
  21207. "value": "370703"
  21208. }, {
  21209. "label": "坊子区",
  21210. "value": "370704"
  21211. }, {
  21212. "label": "奎文区",
  21213. "value": "370705"
  21214. }, {
  21215. "label": "临朐县",
  21216. "value": "370724"
  21217. }, {
  21218. "label": "昌乐县",
  21219. "value": "370725"
  21220. }, {
  21221. "label": "潍坊滨海经济技术开发区",
  21222. "value": "370772"
  21223. }, {
  21224. "label": "青州市",
  21225. "value": "370781"
  21226. }, {
  21227. "label": "诸城市",
  21228. "value": "370782"
  21229. }, {
  21230. "label": "寿光市",
  21231. "value": "370783"
  21232. }, {
  21233. "label": "安丘市",
  21234. "value": "370784"
  21235. }, {
  21236. "label": "高密市",
  21237. "value": "370785"
  21238. }, {
  21239. "label": "昌邑市",
  21240. "value": "370786"
  21241. }], [{
  21242. "label": "任城区",
  21243. "value": "370811"
  21244. }, {
  21245. "label": "兖州区",
  21246. "value": "370812"
  21247. }, {
  21248. "label": "微山县",
  21249. "value": "370826"
  21250. }, {
  21251. "label": "鱼台县",
  21252. "value": "370827"
  21253. }, {
  21254. "label": "金乡县",
  21255. "value": "370828"
  21256. }, {
  21257. "label": "嘉祥县",
  21258. "value": "370829"
  21259. }, {
  21260. "label": "汶上县",
  21261. "value": "370830"
  21262. }, {
  21263. "label": "泗水县",
  21264. "value": "370831"
  21265. }, {
  21266. "label": "梁山县",
  21267. "value": "370832"
  21268. }, {
  21269. "label": "济宁高新技术产业开发区",
  21270. "value": "370871"
  21271. }, {
  21272. "label": "曲阜市",
  21273. "value": "370881"
  21274. }, {
  21275. "label": "邹城市",
  21276. "value": "370883"
  21277. }], [{
  21278. "label": "泰山区",
  21279. "value": "370902"
  21280. }, {
  21281. "label": "岱岳区",
  21282. "value": "370911"
  21283. }, {
  21284. "label": "宁阳县",
  21285. "value": "370921"
  21286. }, {
  21287. "label": "东平县",
  21288. "value": "370923"
  21289. }, {
  21290. "label": "新泰市",
  21291. "value": "370982"
  21292. }, {
  21293. "label": "肥城市",
  21294. "value": "370983"
  21295. }], [{
  21296. "label": "环翠区",
  21297. "value": "371002"
  21298. }, {
  21299. "label": "文登区",
  21300. "value": "371003"
  21301. }, {
  21302. "label": "威海火炬高技术产业开发区",
  21303. "value": "371071"
  21304. }, {
  21305. "label": "威海经济技术开发区",
  21306. "value": "371072"
  21307. }, {
  21308. "label": "威海临港经济技术开发区",
  21309. "value": "371073"
  21310. }, {
  21311. "label": "荣成市",
  21312. "value": "371082"
  21313. }, {
  21314. "label": "乳山市",
  21315. "value": "371083"
  21316. }], [{
  21317. "label": "东港区",
  21318. "value": "371102"
  21319. }, {
  21320. "label": "岚山区",
  21321. "value": "371103"
  21322. }, {
  21323. "label": "五莲县",
  21324. "value": "371121"
  21325. }, {
  21326. "label": "莒县",
  21327. "value": "371122"
  21328. }, {
  21329. "label": "日照经济技术开发区",
  21330. "value": "371171"
  21331. }, {
  21332. "label": "日照国际海洋城",
  21333. "value": "371172"
  21334. }], [{
  21335. "label": "莱城区",
  21336. "value": "371202"
  21337. }, {
  21338. "label": "钢城区",
  21339. "value": "371203"
  21340. }], [{
  21341. "label": "兰山区",
  21342. "value": "371302"
  21343. }, {
  21344. "label": "罗庄区",
  21345. "value": "371311"
  21346. }, {
  21347. "label": "河东区",
  21348. "value": "371312"
  21349. }, {
  21350. "label": "沂南县",
  21351. "value": "371321"
  21352. }, {
  21353. "label": "郯城县",
  21354. "value": "371322"
  21355. }, {
  21356. "label": "沂水县",
  21357. "value": "371323"
  21358. }, {
  21359. "label": "兰陵县",
  21360. "value": "371324"
  21361. }, {
  21362. "label": "费县",
  21363. "value": "371325"
  21364. }, {
  21365. "label": "平邑县",
  21366. "value": "371326"
  21367. }, {
  21368. "label": "莒南县",
  21369. "value": "371327"
  21370. }, {
  21371. "label": "蒙阴县",
  21372. "value": "371328"
  21373. }, {
  21374. "label": "临沭县",
  21375. "value": "371329"
  21376. }, {
  21377. "label": "临沂高新技术产业开发区",
  21378. "value": "371371"
  21379. }, {
  21380. "label": "临沂经济技术开发区",
  21381. "value": "371372"
  21382. }, {
  21383. "label": "临沂临港经济开发区",
  21384. "value": "371373"
  21385. }], [{
  21386. "label": "德城区",
  21387. "value": "371402"
  21388. }, {
  21389. "label": "陵城区",
  21390. "value": "371403"
  21391. }, {
  21392. "label": "宁津县",
  21393. "value": "371422"
  21394. }, {
  21395. "label": "庆云县",
  21396. "value": "371423"
  21397. }, {
  21398. "label": "临邑县",
  21399. "value": "371424"
  21400. }, {
  21401. "label": "齐河县",
  21402. "value": "371425"
  21403. }, {
  21404. "label": "平原县",
  21405. "value": "371426"
  21406. }, {
  21407. "label": "夏津县",
  21408. "value": "371427"
  21409. }, {
  21410. "label": "武城县",
  21411. "value": "371428"
  21412. }, {
  21413. "label": "德州经济技术开发区",
  21414. "value": "371471"
  21415. }, {
  21416. "label": "德州运河经济开发区",
  21417. "value": "371472"
  21418. }, {
  21419. "label": "乐陵市",
  21420. "value": "371481"
  21421. }, {
  21422. "label": "禹城市",
  21423. "value": "371482"
  21424. }], [{
  21425. "label": "东昌府区",
  21426. "value": "371502"
  21427. }, {
  21428. "label": "阳谷县",
  21429. "value": "371521"
  21430. }, {
  21431. "label": "莘县",
  21432. "value": "371522"
  21433. }, {
  21434. "label": "茌平县",
  21435. "value": "371523"
  21436. }, {
  21437. "label": "东阿县",
  21438. "value": "371524"
  21439. }, {
  21440. "label": "冠县",
  21441. "value": "371525"
  21442. }, {
  21443. "label": "高唐县",
  21444. "value": "371526"
  21445. }, {
  21446. "label": "临清市",
  21447. "value": "371581"
  21448. }], [{
  21449. "label": "滨城区",
  21450. "value": "371602"
  21451. }, {
  21452. "label": "沾化区",
  21453. "value": "371603"
  21454. }, {
  21455. "label": "惠民县",
  21456. "value": "371621"
  21457. }, {
  21458. "label": "阳信县",
  21459. "value": "371622"
  21460. }, {
  21461. "label": "无棣县",
  21462. "value": "371623"
  21463. }, {
  21464. "label": "博兴县",
  21465. "value": "371625"
  21466. }, {
  21467. "label": "邹平县",
  21468. "value": "371626"
  21469. }], [{
  21470. "label": "牡丹区",
  21471. "value": "371702"
  21472. }, {
  21473. "label": "定陶区",
  21474. "value": "371703"
  21475. }, {
  21476. "label": "曹县",
  21477. "value": "371721"
  21478. }, {
  21479. "label": "单县",
  21480. "value": "371722"
  21481. }, {
  21482. "label": "成武县",
  21483. "value": "371723"
  21484. }, {
  21485. "label": "巨野县",
  21486. "value": "371724"
  21487. }, {
  21488. "label": "郓城县",
  21489. "value": "371725"
  21490. }, {
  21491. "label": "鄄城县",
  21492. "value": "371726"
  21493. }, {
  21494. "label": "东明县",
  21495. "value": "371728"
  21496. }, {
  21497. "label": "菏泽经济技术开发区",
  21498. "value": "371771"
  21499. }, {
  21500. "label": "菏泽高新技术开发区",
  21501. "value": "371772"
  21502. }]], [[{
  21503. "label": "中原区",
  21504. "value": "410102"
  21505. }, {
  21506. "label": "二七区",
  21507. "value": "410103"
  21508. }, {
  21509. "label": "管城回族区",
  21510. "value": "410104"
  21511. }, {
  21512. "label": "金水区",
  21513. "value": "410105"
  21514. }, {
  21515. "label": "上街区",
  21516. "value": "410106"
  21517. }, {
  21518. "label": "惠济区",
  21519. "value": "410108"
  21520. }, {
  21521. "label": "中牟县",
  21522. "value": "410122"
  21523. }, {
  21524. "label": "郑州经济技术开发区",
  21525. "value": "410171"
  21526. }, {
  21527. "label": "郑州高新技术产业开发区",
  21528. "value": "410172"
  21529. }, {
  21530. "label": "郑州航空港经济综合实验区",
  21531. "value": "410173"
  21532. }, {
  21533. "label": "巩义市",
  21534. "value": "410181"
  21535. }, {
  21536. "label": "荥阳市",
  21537. "value": "410182"
  21538. }, {
  21539. "label": "新密市",
  21540. "value": "410183"
  21541. }, {
  21542. "label": "新郑市",
  21543. "value": "410184"
  21544. }, {
  21545. "label": "登封市",
  21546. "value": "410185"
  21547. }], [{
  21548. "label": "龙亭区",
  21549. "value": "410202"
  21550. }, {
  21551. "label": "顺河回族区",
  21552. "value": "410203"
  21553. }, {
  21554. "label": "鼓楼区",
  21555. "value": "410204"
  21556. }, {
  21557. "label": "禹王台区",
  21558. "value": "410205"
  21559. }, {
  21560. "label": "祥符区",
  21561. "value": "410212"
  21562. }, {
  21563. "label": "杞县",
  21564. "value": "410221"
  21565. }, {
  21566. "label": "通许县",
  21567. "value": "410222"
  21568. }, {
  21569. "label": "尉氏县",
  21570. "value": "410223"
  21571. }, {
  21572. "label": "兰考县",
  21573. "value": "410225"
  21574. }], [{
  21575. "label": "老城区",
  21576. "value": "410302"
  21577. }, {
  21578. "label": "西工区",
  21579. "value": "410303"
  21580. }, {
  21581. "label": "瀍河回族区",
  21582. "value": "410304"
  21583. }, {
  21584. "label": "涧西区",
  21585. "value": "410305"
  21586. }, {
  21587. "label": "吉利区",
  21588. "value": "410306"
  21589. }, {
  21590. "label": "洛龙区",
  21591. "value": "410311"
  21592. }, {
  21593. "label": "孟津县",
  21594. "value": "410322"
  21595. }, {
  21596. "label": "新安县",
  21597. "value": "410323"
  21598. }, {
  21599. "label": "栾川县",
  21600. "value": "410324"
  21601. }, {
  21602. "label": "嵩县",
  21603. "value": "410325"
  21604. }, {
  21605. "label": "汝阳县",
  21606. "value": "410326"
  21607. }, {
  21608. "label": "宜阳县",
  21609. "value": "410327"
  21610. }, {
  21611. "label": "洛宁县",
  21612. "value": "410328"
  21613. }, {
  21614. "label": "伊川县",
  21615. "value": "410329"
  21616. }, {
  21617. "label": "洛阳高新技术产业开发区",
  21618. "value": "410371"
  21619. }, {
  21620. "label": "偃师市",
  21621. "value": "410381"
  21622. }], [{
  21623. "label": "新华区",
  21624. "value": "410402"
  21625. }, {
  21626. "label": "卫东区",
  21627. "value": "410403"
  21628. }, {
  21629. "label": "石龙区",
  21630. "value": "410404"
  21631. }, {
  21632. "label": "湛河区",
  21633. "value": "410411"
  21634. }, {
  21635. "label": "宝丰县",
  21636. "value": "410421"
  21637. }, {
  21638. "label": "叶县",
  21639. "value": "410422"
  21640. }, {
  21641. "label": "鲁山县",
  21642. "value": "410423"
  21643. }, {
  21644. "label": "郏县",
  21645. "value": "410425"
  21646. }, {
  21647. "label": "平顶山高新技术产业开发区",
  21648. "value": "410471"
  21649. }, {
  21650. "label": "平顶山市新城区",
  21651. "value": "410472"
  21652. }, {
  21653. "label": "舞钢市",
  21654. "value": "410481"
  21655. }, {
  21656. "label": "汝州市",
  21657. "value": "410482"
  21658. }], [{
  21659. "label": "文峰区",
  21660. "value": "410502"
  21661. }, {
  21662. "label": "北关区",
  21663. "value": "410503"
  21664. }, {
  21665. "label": "殷都区",
  21666. "value": "410505"
  21667. }, {
  21668. "label": "龙安区",
  21669. "value": "410506"
  21670. }, {
  21671. "label": "安阳县",
  21672. "value": "410522"
  21673. }, {
  21674. "label": "汤阴县",
  21675. "value": "410523"
  21676. }, {
  21677. "label": "滑县",
  21678. "value": "410526"
  21679. }, {
  21680. "label": "内黄县",
  21681. "value": "410527"
  21682. }, {
  21683. "label": "安阳高新技术产业开发区",
  21684. "value": "410571"
  21685. }, {
  21686. "label": "林州市",
  21687. "value": "410581"
  21688. }], [{
  21689. "label": "鹤山区",
  21690. "value": "410602"
  21691. }, {
  21692. "label": "山城区",
  21693. "value": "410603"
  21694. }, {
  21695. "label": "淇滨区",
  21696. "value": "410611"
  21697. }, {
  21698. "label": "浚县",
  21699. "value": "410621"
  21700. }, {
  21701. "label": "淇县",
  21702. "value": "410622"
  21703. }, {
  21704. "label": "鹤壁经济技术开发区",
  21705. "value": "410671"
  21706. }], [{
  21707. "label": "红旗区",
  21708. "value": "410702"
  21709. }, {
  21710. "label": "卫滨区",
  21711. "value": "410703"
  21712. }, {
  21713. "label": "凤泉区",
  21714. "value": "410704"
  21715. }, {
  21716. "label": "牧野区",
  21717. "value": "410711"
  21718. }, {
  21719. "label": "新乡县",
  21720. "value": "410721"
  21721. }, {
  21722. "label": "获嘉县",
  21723. "value": "410724"
  21724. }, {
  21725. "label": "原阳县",
  21726. "value": "410725"
  21727. }, {
  21728. "label": "延津县",
  21729. "value": "410726"
  21730. }, {
  21731. "label": "封丘县",
  21732. "value": "410727"
  21733. }, {
  21734. "label": "长垣县",
  21735. "value": "410728"
  21736. }, {
  21737. "label": "新乡高新技术产业开发区",
  21738. "value": "410771"
  21739. }, {
  21740. "label": "新乡经济技术开发区",
  21741. "value": "410772"
  21742. }, {
  21743. "label": "新乡市平原城乡一体化示范区",
  21744. "value": "410773"
  21745. }, {
  21746. "label": "卫辉市",
  21747. "value": "410781"
  21748. }, {
  21749. "label": "辉县市",
  21750. "value": "410782"
  21751. }], [{
  21752. "label": "解放区",
  21753. "value": "410802"
  21754. }, {
  21755. "label": "中站区",
  21756. "value": "410803"
  21757. }, {
  21758. "label": "马村区",
  21759. "value": "410804"
  21760. }, {
  21761. "label": "山阳区",
  21762. "value": "410811"
  21763. }, {
  21764. "label": "修武县",
  21765. "value": "410821"
  21766. }, {
  21767. "label": "博爱县",
  21768. "value": "410822"
  21769. }, {
  21770. "label": "武陟县",
  21771. "value": "410823"
  21772. }, {
  21773. "label": "温县",
  21774. "value": "410825"
  21775. }, {
  21776. "label": "焦作城乡一体化示范区",
  21777. "value": "410871"
  21778. }, {
  21779. "label": "沁阳市",
  21780. "value": "410882"
  21781. }, {
  21782. "label": "孟州市",
  21783. "value": "410883"
  21784. }], [{
  21785. "label": "华龙区",
  21786. "value": "410902"
  21787. }, {
  21788. "label": "清丰县",
  21789. "value": "410922"
  21790. }, {
  21791. "label": "南乐县",
  21792. "value": "410923"
  21793. }, {
  21794. "label": "范县",
  21795. "value": "410926"
  21796. }, {
  21797. "label": "台前县",
  21798. "value": "410927"
  21799. }, {
  21800. "label": "濮阳县",
  21801. "value": "410928"
  21802. }, {
  21803. "label": "河南濮阳工业园区",
  21804. "value": "410971"
  21805. }, {
  21806. "label": "濮阳经济技术开发区",
  21807. "value": "410972"
  21808. }], [{
  21809. "label": "魏都区",
  21810. "value": "411002"
  21811. }, {
  21812. "label": "建安区",
  21813. "value": "411003"
  21814. }, {
  21815. "label": "鄢陵县",
  21816. "value": "411024"
  21817. }, {
  21818. "label": "襄城县",
  21819. "value": "411025"
  21820. }, {
  21821. "label": "许昌经济技术开发区",
  21822. "value": "411071"
  21823. }, {
  21824. "label": "禹州市",
  21825. "value": "411081"
  21826. }, {
  21827. "label": "长葛市",
  21828. "value": "411082"
  21829. }], [{
  21830. "label": "源汇区",
  21831. "value": "411102"
  21832. }, {
  21833. "label": "郾城区",
  21834. "value": "411103"
  21835. }, {
  21836. "label": "召陵区",
  21837. "value": "411104"
  21838. }, {
  21839. "label": "舞阳县",
  21840. "value": "411121"
  21841. }, {
  21842. "label": "临颍县",
  21843. "value": "411122"
  21844. }, {
  21845. "label": "漯河经济技术开发区",
  21846. "value": "411171"
  21847. }], [{
  21848. "label": "湖滨区",
  21849. "value": "411202"
  21850. }, {
  21851. "label": "陕州区",
  21852. "value": "411203"
  21853. }, {
  21854. "label": "渑池县",
  21855. "value": "411221"
  21856. }, {
  21857. "label": "卢氏县",
  21858. "value": "411224"
  21859. }, {
  21860. "label": "河南三门峡经济开发区",
  21861. "value": "411271"
  21862. }, {
  21863. "label": "义马市",
  21864. "value": "411281"
  21865. }, {
  21866. "label": "灵宝市",
  21867. "value": "411282"
  21868. }], [{
  21869. "label": "宛城区",
  21870. "value": "411302"
  21871. }, {
  21872. "label": "卧龙区",
  21873. "value": "411303"
  21874. }, {
  21875. "label": "南召县",
  21876. "value": "411321"
  21877. }, {
  21878. "label": "方城县",
  21879. "value": "411322"
  21880. }, {
  21881. "label": "西峡县",
  21882. "value": "411323"
  21883. }, {
  21884. "label": "镇平县",
  21885. "value": "411324"
  21886. }, {
  21887. "label": "内乡县",
  21888. "value": "411325"
  21889. }, {
  21890. "label": "淅川县",
  21891. "value": "411326"
  21892. }, {
  21893. "label": "社旗县",
  21894. "value": "411327"
  21895. }, {
  21896. "label": "唐河县",
  21897. "value": "411328"
  21898. }, {
  21899. "label": "新野县",
  21900. "value": "411329"
  21901. }, {
  21902. "label": "桐柏县",
  21903. "value": "411330"
  21904. }, {
  21905. "label": "南阳高新技术产业开发区",
  21906. "value": "411371"
  21907. }, {
  21908. "label": "南阳市城乡一体化示范区",
  21909. "value": "411372"
  21910. }, {
  21911. "label": "邓州市",
  21912. "value": "411381"
  21913. }], [{
  21914. "label": "梁园区",
  21915. "value": "411402"
  21916. }, {
  21917. "label": "睢阳区",
  21918. "value": "411403"
  21919. }, {
  21920. "label": "民权县",
  21921. "value": "411421"
  21922. }, {
  21923. "label": "睢县",
  21924. "value": "411422"
  21925. }, {
  21926. "label": "宁陵县",
  21927. "value": "411423"
  21928. }, {
  21929. "label": "柘城县",
  21930. "value": "411424"
  21931. }, {
  21932. "label": "虞城县",
  21933. "value": "411425"
  21934. }, {
  21935. "label": "夏邑县",
  21936. "value": "411426"
  21937. }, {
  21938. "label": "豫东综合物流产业聚集区",
  21939. "value": "411471"
  21940. }, {
  21941. "label": "河南商丘经济开发区",
  21942. "value": "411472"
  21943. }, {
  21944. "label": "永城市",
  21945. "value": "411481"
  21946. }], [{
  21947. "label": "浉河区",
  21948. "value": "411502"
  21949. }, {
  21950. "label": "平桥区",
  21951. "value": "411503"
  21952. }, {
  21953. "label": "罗山县",
  21954. "value": "411521"
  21955. }, {
  21956. "label": "光山县",
  21957. "value": "411522"
  21958. }, {
  21959. "label": "新县",
  21960. "value": "411523"
  21961. }, {
  21962. "label": "商城县",
  21963. "value": "411524"
  21964. }, {
  21965. "label": "固始县",
  21966. "value": "411525"
  21967. }, {
  21968. "label": "潢川县",
  21969. "value": "411526"
  21970. }, {
  21971. "label": "淮滨县",
  21972. "value": "411527"
  21973. }, {
  21974. "label": "息县",
  21975. "value": "411528"
  21976. }, {
  21977. "label": "信阳高新技术产业开发区",
  21978. "value": "411571"
  21979. }], [{
  21980. "label": "川汇区",
  21981. "value": "411602"
  21982. }, {
  21983. "label": "扶沟县",
  21984. "value": "411621"
  21985. }, {
  21986. "label": "西华县",
  21987. "value": "411622"
  21988. }, {
  21989. "label": "商水县",
  21990. "value": "411623"
  21991. }, {
  21992. "label": "沈丘县",
  21993. "value": "411624"
  21994. }, {
  21995. "label": "郸城县",
  21996. "value": "411625"
  21997. }, {
  21998. "label": "淮阳县",
  21999. "value": "411626"
  22000. }, {
  22001. "label": "太康县",
  22002. "value": "411627"
  22003. }, {
  22004. "label": "鹿邑县",
  22005. "value": "411628"
  22006. }, {
  22007. "label": "河南周口经济开发区",
  22008. "value": "411671"
  22009. }, {
  22010. "label": "项城市",
  22011. "value": "411681"
  22012. }], [{
  22013. "label": "驿城区",
  22014. "value": "411702"
  22015. }, {
  22016. "label": "西平县",
  22017. "value": "411721"
  22018. }, {
  22019. "label": "上蔡县",
  22020. "value": "411722"
  22021. }, {
  22022. "label": "平舆县",
  22023. "value": "411723"
  22024. }, {
  22025. "label": "正阳县",
  22026. "value": "411724"
  22027. }, {
  22028. "label": "确山县",
  22029. "value": "411725"
  22030. }, {
  22031. "label": "泌阳县",
  22032. "value": "411726"
  22033. }, {
  22034. "label": "汝南县",
  22035. "value": "411727"
  22036. }, {
  22037. "label": "遂平县",
  22038. "value": "411728"
  22039. }, {
  22040. "label": "新蔡县",
  22041. "value": "411729"
  22042. }, {
  22043. "label": "河南驻马店经济开发区",
  22044. "value": "411771"
  22045. }], [{
  22046. "label": "济源市",
  22047. "value": "419001"
  22048. }]], [[{
  22049. "label": "江岸区",
  22050. "value": "420102"
  22051. }, {
  22052. "label": "江汉区",
  22053. "value": "420103"
  22054. }, {
  22055. "label": "硚口区",
  22056. "value": "420104"
  22057. }, {
  22058. "label": "汉阳区",
  22059. "value": "420105"
  22060. }, {
  22061. "label": "武昌区",
  22062. "value": "420106"
  22063. }, {
  22064. "label": "青山区",
  22065. "value": "420107"
  22066. }, {
  22067. "label": "洪山区",
  22068. "value": "420111"
  22069. }, {
  22070. "label": "东西湖区",
  22071. "value": "420112"
  22072. }, {
  22073. "label": "汉南区",
  22074. "value": "420113"
  22075. }, {
  22076. "label": "蔡甸区",
  22077. "value": "420114"
  22078. }, {
  22079. "label": "江夏区",
  22080. "value": "420115"
  22081. }, {
  22082. "label": "黄陂区",
  22083. "value": "420116"
  22084. }, {
  22085. "label": "新洲区",
  22086. "value": "420117"
  22087. }], [{
  22088. "label": "黄石港区",
  22089. "value": "420202"
  22090. }, {
  22091. "label": "西塞山区",
  22092. "value": "420203"
  22093. }, {
  22094. "label": "下陆区",
  22095. "value": "420204"
  22096. }, {
  22097. "label": "铁山区",
  22098. "value": "420205"
  22099. }, {
  22100. "label": "阳新县",
  22101. "value": "420222"
  22102. }, {
  22103. "label": "大冶市",
  22104. "value": "420281"
  22105. }], [{
  22106. "label": "茅箭区",
  22107. "value": "420302"
  22108. }, {
  22109. "label": "张湾区",
  22110. "value": "420303"
  22111. }, {
  22112. "label": "郧阳区",
  22113. "value": "420304"
  22114. }, {
  22115. "label": "郧西县",
  22116. "value": "420322"
  22117. }, {
  22118. "label": "竹山县",
  22119. "value": "420323"
  22120. }, {
  22121. "label": "竹溪县",
  22122. "value": "420324"
  22123. }, {
  22124. "label": "房县",
  22125. "value": "420325"
  22126. }, {
  22127. "label": "丹江口市",
  22128. "value": "420381"
  22129. }], [{
  22130. "label": "西陵区",
  22131. "value": "420502"
  22132. }, {
  22133. "label": "伍家岗区",
  22134. "value": "420503"
  22135. }, {
  22136. "label": "点军区",
  22137. "value": "420504"
  22138. }, {
  22139. "label": "猇亭区",
  22140. "value": "420505"
  22141. }, {
  22142. "label": "夷陵区",
  22143. "value": "420506"
  22144. }, {
  22145. "label": "远安县",
  22146. "value": "420525"
  22147. }, {
  22148. "label": "兴山县",
  22149. "value": "420526"
  22150. }, {
  22151. "label": "秭归县",
  22152. "value": "420527"
  22153. }, {
  22154. "label": "长阳土家族自治县",
  22155. "value": "420528"
  22156. }, {
  22157. "label": "五峰土家族自治县",
  22158. "value": "420529"
  22159. }, {
  22160. "label": "宜都市",
  22161. "value": "420581"
  22162. }, {
  22163. "label": "当阳市",
  22164. "value": "420582"
  22165. }, {
  22166. "label": "枝江市",
  22167. "value": "420583"
  22168. }], [{
  22169. "label": "襄城区",
  22170. "value": "420602"
  22171. }, {
  22172. "label": "樊城区",
  22173. "value": "420606"
  22174. }, {
  22175. "label": "襄州区",
  22176. "value": "420607"
  22177. }, {
  22178. "label": "南漳县",
  22179. "value": "420624"
  22180. }, {
  22181. "label": "谷城县",
  22182. "value": "420625"
  22183. }, {
  22184. "label": "保康县",
  22185. "value": "420626"
  22186. }, {
  22187. "label": "老河口市",
  22188. "value": "420682"
  22189. }, {
  22190. "label": "枣阳市",
  22191. "value": "420683"
  22192. }, {
  22193. "label": "宜城市",
  22194. "value": "420684"
  22195. }], [{
  22196. "label": "梁子湖区",
  22197. "value": "420702"
  22198. }, {
  22199. "label": "华容区",
  22200. "value": "420703"
  22201. }, {
  22202. "label": "鄂城区",
  22203. "value": "420704"
  22204. }], [{
  22205. "label": "东宝区",
  22206. "value": "420802"
  22207. }, {
  22208. "label": "掇刀区",
  22209. "value": "420804"
  22210. }, {
  22211. "label": "京山县",
  22212. "value": "420821"
  22213. }, {
  22214. "label": "沙洋县",
  22215. "value": "420822"
  22216. }, {
  22217. "label": "钟祥市",
  22218. "value": "420881"
  22219. }], [{
  22220. "label": "孝南区",
  22221. "value": "420902"
  22222. }, {
  22223. "label": "孝昌县",
  22224. "value": "420921"
  22225. }, {
  22226. "label": "大悟县",
  22227. "value": "420922"
  22228. }, {
  22229. "label": "云梦县",
  22230. "value": "420923"
  22231. }, {
  22232. "label": "应城市",
  22233. "value": "420981"
  22234. }, {
  22235. "label": "安陆市",
  22236. "value": "420982"
  22237. }, {
  22238. "label": "汉川市",
  22239. "value": "420984"
  22240. }], [{
  22241. "label": "沙市区",
  22242. "value": "421002"
  22243. }, {
  22244. "label": "荆州区",
  22245. "value": "421003"
  22246. }, {
  22247. "label": "公安县",
  22248. "value": "421022"
  22249. }, {
  22250. "label": "监利县",
  22251. "value": "421023"
  22252. }, {
  22253. "label": "江陵县",
  22254. "value": "421024"
  22255. }, {
  22256. "label": "荆州经济技术开发区",
  22257. "value": "421071"
  22258. }, {
  22259. "label": "石首市",
  22260. "value": "421081"
  22261. }, {
  22262. "label": "洪湖市",
  22263. "value": "421083"
  22264. }, {
  22265. "label": "松滋市",
  22266. "value": "421087"
  22267. }], [{
  22268. "label": "黄州区",
  22269. "value": "421102"
  22270. }, {
  22271. "label": "团风县",
  22272. "value": "421121"
  22273. }, {
  22274. "label": "红安县",
  22275. "value": "421122"
  22276. }, {
  22277. "label": "罗田县",
  22278. "value": "421123"
  22279. }, {
  22280. "label": "英山县",
  22281. "value": "421124"
  22282. }, {
  22283. "label": "浠水县",
  22284. "value": "421125"
  22285. }, {
  22286. "label": "蕲春县",
  22287. "value": "421126"
  22288. }, {
  22289. "label": "黄梅县",
  22290. "value": "421127"
  22291. }, {
  22292. "label": "龙感湖管理区",
  22293. "value": "421171"
  22294. }, {
  22295. "label": "麻城市",
  22296. "value": "421181"
  22297. }, {
  22298. "label": "武穴市",
  22299. "value": "421182"
  22300. }], [{
  22301. "label": "咸安区",
  22302. "value": "421202"
  22303. }, {
  22304. "label": "嘉鱼县",
  22305. "value": "421221"
  22306. }, {
  22307. "label": "通城县",
  22308. "value": "421222"
  22309. }, {
  22310. "label": "崇阳县",
  22311. "value": "421223"
  22312. }, {
  22313. "label": "通山县",
  22314. "value": "421224"
  22315. }, {
  22316. "label": "赤壁市",
  22317. "value": "421281"
  22318. }], [{
  22319. "label": "曾都区",
  22320. "value": "421303"
  22321. }, {
  22322. "label": "随县",
  22323. "value": "421321"
  22324. }, {
  22325. "label": "广水市",
  22326. "value": "421381"
  22327. }], [{
  22328. "label": "恩施市",
  22329. "value": "422801"
  22330. }, {
  22331. "label": "利川市",
  22332. "value": "422802"
  22333. }, {
  22334. "label": "建始县",
  22335. "value": "422822"
  22336. }, {
  22337. "label": "巴东县",
  22338. "value": "422823"
  22339. }, {
  22340. "label": "宣恩县",
  22341. "value": "422825"
  22342. }, {
  22343. "label": "咸丰县",
  22344. "value": "422826"
  22345. }, {
  22346. "label": "来凤县",
  22347. "value": "422827"
  22348. }, {
  22349. "label": "鹤峰县",
  22350. "value": "422828"
  22351. }], [{
  22352. "label": "仙桃市",
  22353. "value": "429004"
  22354. }, {
  22355. "label": "潜江市",
  22356. "value": "429005"
  22357. }, {
  22358. "label": "天门市",
  22359. "value": "429006"
  22360. }, {
  22361. "label": "神农架林区",
  22362. "value": "429021"
  22363. }]], [[{
  22364. "label": "芙蓉区",
  22365. "value": "430102"
  22366. }, {
  22367. "label": "天心区",
  22368. "value": "430103"
  22369. }, {
  22370. "label": "岳麓区",
  22371. "value": "430104"
  22372. }, {
  22373. "label": "开福区",
  22374. "value": "430105"
  22375. }, {
  22376. "label": "雨花区",
  22377. "value": "430111"
  22378. }, {
  22379. "label": "望城区",
  22380. "value": "430112"
  22381. }, {
  22382. "label": "长沙县",
  22383. "value": "430121"
  22384. }, {
  22385. "label": "浏阳市",
  22386. "value": "430181"
  22387. }, {
  22388. "label": "宁乡市",
  22389. "value": "430182"
  22390. }], [{
  22391. "label": "荷塘区",
  22392. "value": "430202"
  22393. }, {
  22394. "label": "芦淞区",
  22395. "value": "430203"
  22396. }, {
  22397. "label": "石峰区",
  22398. "value": "430204"
  22399. }, {
  22400. "label": "天元区",
  22401. "value": "430211"
  22402. }, {
  22403. "label": "株洲县",
  22404. "value": "430221"
  22405. }, {
  22406. "label": "攸县",
  22407. "value": "430223"
  22408. }, {
  22409. "label": "茶陵县",
  22410. "value": "430224"
  22411. }, {
  22412. "label": "炎陵县",
  22413. "value": "430225"
  22414. }, {
  22415. "label": "云龙示范区",
  22416. "value": "430271"
  22417. }, {
  22418. "label": "醴陵市",
  22419. "value": "430281"
  22420. }], [{
  22421. "label": "雨湖区",
  22422. "value": "430302"
  22423. }, {
  22424. "label": "岳塘区",
  22425. "value": "430304"
  22426. }, {
  22427. "label": "湘潭县",
  22428. "value": "430321"
  22429. }, {
  22430. "label": "湖南湘潭高新技术产业园区",
  22431. "value": "430371"
  22432. }, {
  22433. "label": "湘潭昭山示范区",
  22434. "value": "430372"
  22435. }, {
  22436. "label": "湘潭九华示范区",
  22437. "value": "430373"
  22438. }, {
  22439. "label": "湘乡市",
  22440. "value": "430381"
  22441. }, {
  22442. "label": "韶山市",
  22443. "value": "430382"
  22444. }], [{
  22445. "label": "珠晖区",
  22446. "value": "430405"
  22447. }, {
  22448. "label": "雁峰区",
  22449. "value": "430406"
  22450. }, {
  22451. "label": "石鼓区",
  22452. "value": "430407"
  22453. }, {
  22454. "label": "蒸湘区",
  22455. "value": "430408"
  22456. }, {
  22457. "label": "南岳区",
  22458. "value": "430412"
  22459. }, {
  22460. "label": "衡阳县",
  22461. "value": "430421"
  22462. }, {
  22463. "label": "衡南县",
  22464. "value": "430422"
  22465. }, {
  22466. "label": "衡山县",
  22467. "value": "430423"
  22468. }, {
  22469. "label": "衡东县",
  22470. "value": "430424"
  22471. }, {
  22472. "label": "祁东县",
  22473. "value": "430426"
  22474. }, {
  22475. "label": "衡阳综合保税区",
  22476. "value": "430471"
  22477. }, {
  22478. "label": "湖南衡阳高新技术产业园区",
  22479. "value": "430472"
  22480. }, {
  22481. "label": "湖南衡阳松木经济开发区",
  22482. "value": "430473"
  22483. }, {
  22484. "label": "耒阳市",
  22485. "value": "430481"
  22486. }, {
  22487. "label": "常宁市",
  22488. "value": "430482"
  22489. }], [{
  22490. "label": "双清区",
  22491. "value": "430502"
  22492. }, {
  22493. "label": "大祥区",
  22494. "value": "430503"
  22495. }, {
  22496. "label": "北塔区",
  22497. "value": "430511"
  22498. }, {
  22499. "label": "邵东县",
  22500. "value": "430521"
  22501. }, {
  22502. "label": "新邵县",
  22503. "value": "430522"
  22504. }, {
  22505. "label": "邵阳县",
  22506. "value": "430523"
  22507. }, {
  22508. "label": "隆回县",
  22509. "value": "430524"
  22510. }, {
  22511. "label": "洞口县",
  22512. "value": "430525"
  22513. }, {
  22514. "label": "绥宁县",
  22515. "value": "430527"
  22516. }, {
  22517. "label": "新宁县",
  22518. "value": "430528"
  22519. }, {
  22520. "label": "城步苗族自治县",
  22521. "value": "430529"
  22522. }, {
  22523. "label": "武冈市",
  22524. "value": "430581"
  22525. }], [{
  22526. "label": "岳阳楼区",
  22527. "value": "430602"
  22528. }, {
  22529. "label": "云溪区",
  22530. "value": "430603"
  22531. }, {
  22532. "label": "君山区",
  22533. "value": "430611"
  22534. }, {
  22535. "label": "岳阳县",
  22536. "value": "430621"
  22537. }, {
  22538. "label": "华容县",
  22539. "value": "430623"
  22540. }, {
  22541. "label": "湘阴县",
  22542. "value": "430624"
  22543. }, {
  22544. "label": "平江县",
  22545. "value": "430626"
  22546. }, {
  22547. "label": "岳阳市屈原管理区",
  22548. "value": "430671"
  22549. }, {
  22550. "label": "汨罗市",
  22551. "value": "430681"
  22552. }, {
  22553. "label": "临湘市",
  22554. "value": "430682"
  22555. }], [{
  22556. "label": "武陵区",
  22557. "value": "430702"
  22558. }, {
  22559. "label": "鼎城区",
  22560. "value": "430703"
  22561. }, {
  22562. "label": "安乡县",
  22563. "value": "430721"
  22564. }, {
  22565. "label": "汉寿县",
  22566. "value": "430722"
  22567. }, {
  22568. "label": "澧县",
  22569. "value": "430723"
  22570. }, {
  22571. "label": "临澧县",
  22572. "value": "430724"
  22573. }, {
  22574. "label": "桃源县",
  22575. "value": "430725"
  22576. }, {
  22577. "label": "石门县",
  22578. "value": "430726"
  22579. }, {
  22580. "label": "常德市西洞庭管理区",
  22581. "value": "430771"
  22582. }, {
  22583. "label": "津市市",
  22584. "value": "430781"
  22585. }], [{
  22586. "label": "永定区",
  22587. "value": "430802"
  22588. }, {
  22589. "label": "武陵源区",
  22590. "value": "430811"
  22591. }, {
  22592. "label": "慈利县",
  22593. "value": "430821"
  22594. }, {
  22595. "label": "桑植县",
  22596. "value": "430822"
  22597. }], [{
  22598. "label": "资阳区",
  22599. "value": "430902"
  22600. }, {
  22601. "label": "赫山区",
  22602. "value": "430903"
  22603. }, {
  22604. "label": "南县",
  22605. "value": "430921"
  22606. }, {
  22607. "label": "桃江县",
  22608. "value": "430922"
  22609. }, {
  22610. "label": "安化县",
  22611. "value": "430923"
  22612. }, {
  22613. "label": "益阳市大通湖管理区",
  22614. "value": "430971"
  22615. }, {
  22616. "label": "湖南益阳高新技术产业园区",
  22617. "value": "430972"
  22618. }, {
  22619. "label": "沅江市",
  22620. "value": "430981"
  22621. }], [{
  22622. "label": "北湖区",
  22623. "value": "431002"
  22624. }, {
  22625. "label": "苏仙区",
  22626. "value": "431003"
  22627. }, {
  22628. "label": "桂阳县",
  22629. "value": "431021"
  22630. }, {
  22631. "label": "宜章县",
  22632. "value": "431022"
  22633. }, {
  22634. "label": "永兴县",
  22635. "value": "431023"
  22636. }, {
  22637. "label": "嘉禾县",
  22638. "value": "431024"
  22639. }, {
  22640. "label": "临武县",
  22641. "value": "431025"
  22642. }, {
  22643. "label": "汝城县",
  22644. "value": "431026"
  22645. }, {
  22646. "label": "桂东县",
  22647. "value": "431027"
  22648. }, {
  22649. "label": "安仁县",
  22650. "value": "431028"
  22651. }, {
  22652. "label": "资兴市",
  22653. "value": "431081"
  22654. }], [{
  22655. "label": "零陵区",
  22656. "value": "431102"
  22657. }, {
  22658. "label": "冷水滩区",
  22659. "value": "431103"
  22660. }, {
  22661. "label": "祁阳县",
  22662. "value": "431121"
  22663. }, {
  22664. "label": "东安县",
  22665. "value": "431122"
  22666. }, {
  22667. "label": "双牌县",
  22668. "value": "431123"
  22669. }, {
  22670. "label": "道县",
  22671. "value": "431124"
  22672. }, {
  22673. "label": "江永县",
  22674. "value": "431125"
  22675. }, {
  22676. "label": "宁远县",
  22677. "value": "431126"
  22678. }, {
  22679. "label": "蓝山县",
  22680. "value": "431127"
  22681. }, {
  22682. "label": "新田县",
  22683. "value": "431128"
  22684. }, {
  22685. "label": "江华瑶族自治县",
  22686. "value": "431129"
  22687. }, {
  22688. "label": "永州经济技术开发区",
  22689. "value": "431171"
  22690. }, {
  22691. "label": "永州市金洞管理区",
  22692. "value": "431172"
  22693. }, {
  22694. "label": "永州市回龙圩管理区",
  22695. "value": "431173"
  22696. }], [{
  22697. "label": "鹤城区",
  22698. "value": "431202"
  22699. }, {
  22700. "label": "中方县",
  22701. "value": "431221"
  22702. }, {
  22703. "label": "沅陵县",
  22704. "value": "431222"
  22705. }, {
  22706. "label": "辰溪县",
  22707. "value": "431223"
  22708. }, {
  22709. "label": "溆浦县",
  22710. "value": "431224"
  22711. }, {
  22712. "label": "会同县",
  22713. "value": "431225"
  22714. }, {
  22715. "label": "麻阳苗族自治县",
  22716. "value": "431226"
  22717. }, {
  22718. "label": "新晃侗族自治县",
  22719. "value": "431227"
  22720. }, {
  22721. "label": "芷江侗族自治县",
  22722. "value": "431228"
  22723. }, {
  22724. "label": "靖州苗族侗族自治县",
  22725. "value": "431229"
  22726. }, {
  22727. "label": "通道侗族自治县",
  22728. "value": "431230"
  22729. }, {
  22730. "label": "怀化市洪江管理区",
  22731. "value": "431271"
  22732. }, {
  22733. "label": "洪江市",
  22734. "value": "431281"
  22735. }], [{
  22736. "label": "娄星区",
  22737. "value": "431302"
  22738. }, {
  22739. "label": "双峰县",
  22740. "value": "431321"
  22741. }, {
  22742. "label": "新化县",
  22743. "value": "431322"
  22744. }, {
  22745. "label": "冷水江市",
  22746. "value": "431381"
  22747. }, {
  22748. "label": "涟源市",
  22749. "value": "431382"
  22750. }], [{
  22751. "label": "吉首市",
  22752. "value": "433101"
  22753. }, {
  22754. "label": "泸溪县",
  22755. "value": "433122"
  22756. }, {
  22757. "label": "凤凰县",
  22758. "value": "433123"
  22759. }, {
  22760. "label": "花垣县",
  22761. "value": "433124"
  22762. }, {
  22763. "label": "保靖县",
  22764. "value": "433125"
  22765. }, {
  22766. "label": "古丈县",
  22767. "value": "433126"
  22768. }, {
  22769. "label": "永顺县",
  22770. "value": "433127"
  22771. }, {
  22772. "label": "龙山县",
  22773. "value": "433130"
  22774. }, {
  22775. "label": "湖南吉首经济开发区",
  22776. "value": "433172"
  22777. }, {
  22778. "label": "湖南永顺经济开发区",
  22779. "value": "433173"
  22780. }]], [[{
  22781. "label": "荔湾区",
  22782. "value": "440103"
  22783. }, {
  22784. "label": "越秀区",
  22785. "value": "440104"
  22786. }, {
  22787. "label": "海珠区",
  22788. "value": "440105"
  22789. }, {
  22790. "label": "天河区",
  22791. "value": "440106"
  22792. }, {
  22793. "label": "白云区",
  22794. "value": "440111"
  22795. }, {
  22796. "label": "黄埔区",
  22797. "value": "440112"
  22798. }, {
  22799. "label": "番禺区",
  22800. "value": "440113"
  22801. }, {
  22802. "label": "花都区",
  22803. "value": "440114"
  22804. }, {
  22805. "label": "南沙区",
  22806. "value": "440115"
  22807. }, {
  22808. "label": "从化区",
  22809. "value": "440117"
  22810. }, {
  22811. "label": "增城区",
  22812. "value": "440118"
  22813. }], [{
  22814. "label": "武江区",
  22815. "value": "440203"
  22816. }, {
  22817. "label": "浈江区",
  22818. "value": "440204"
  22819. }, {
  22820. "label": "曲江区",
  22821. "value": "440205"
  22822. }, {
  22823. "label": "始兴县",
  22824. "value": "440222"
  22825. }, {
  22826. "label": "仁化县",
  22827. "value": "440224"
  22828. }, {
  22829. "label": "翁源县",
  22830. "value": "440229"
  22831. }, {
  22832. "label": "乳源瑶族自治县",
  22833. "value": "440232"
  22834. }, {
  22835. "label": "新丰县",
  22836. "value": "440233"
  22837. }, {
  22838. "label": "乐昌市",
  22839. "value": "440281"
  22840. }, {
  22841. "label": "南雄市",
  22842. "value": "440282"
  22843. }], [{
  22844. "label": "罗湖区",
  22845. "value": "440303"
  22846. }, {
  22847. "label": "福田区",
  22848. "value": "440304"
  22849. }, {
  22850. "label": "南山区",
  22851. "value": "440305"
  22852. }, {
  22853. "label": "宝安区",
  22854. "value": "440306"
  22855. }, {
  22856. "label": "龙岗区",
  22857. "value": "440307"
  22858. }, {
  22859. "label": "盐田区",
  22860. "value": "440308"
  22861. }, {
  22862. "label": "龙华区",
  22863. "value": "440309"
  22864. }, {
  22865. "label": "坪山区",
  22866. "value": "440310"
  22867. }], [{
  22868. "label": "香洲区",
  22869. "value": "440402"
  22870. }, {
  22871. "label": "斗门区",
  22872. "value": "440403"
  22873. }, {
  22874. "label": "金湾区",
  22875. "value": "440404"
  22876. }], [{
  22877. "label": "龙湖区",
  22878. "value": "440507"
  22879. }, {
  22880. "label": "金平区",
  22881. "value": "440511"
  22882. }, {
  22883. "label": "濠江区",
  22884. "value": "440512"
  22885. }, {
  22886. "label": "潮阳区",
  22887. "value": "440513"
  22888. }, {
  22889. "label": "潮南区",
  22890. "value": "440514"
  22891. }, {
  22892. "label": "澄海区",
  22893. "value": "440515"
  22894. }, {
  22895. "label": "南澳县",
  22896. "value": "440523"
  22897. }], [{
  22898. "label": "禅城区",
  22899. "value": "440604"
  22900. }, {
  22901. "label": "南海区",
  22902. "value": "440605"
  22903. }, {
  22904. "label": "顺德区",
  22905. "value": "440606"
  22906. }, {
  22907. "label": "三水区",
  22908. "value": "440607"
  22909. }, {
  22910. "label": "高明区",
  22911. "value": "440608"
  22912. }], [{
  22913. "label": "蓬江区",
  22914. "value": "440703"
  22915. }, {
  22916. "label": "江海区",
  22917. "value": "440704"
  22918. }, {
  22919. "label": "新会区",
  22920. "value": "440705"
  22921. }, {
  22922. "label": "台山市",
  22923. "value": "440781"
  22924. }, {
  22925. "label": "开平市",
  22926. "value": "440783"
  22927. }, {
  22928. "label": "鹤山市",
  22929. "value": "440784"
  22930. }, {
  22931. "label": "恩平市",
  22932. "value": "440785"
  22933. }], [{
  22934. "label": "赤坎区",
  22935. "value": "440802"
  22936. }, {
  22937. "label": "霞山区",
  22938. "value": "440803"
  22939. }, {
  22940. "label": "坡头区",
  22941. "value": "440804"
  22942. }, {
  22943. "label": "麻章区",
  22944. "value": "440811"
  22945. }, {
  22946. "label": "遂溪县",
  22947. "value": "440823"
  22948. }, {
  22949. "label": "徐闻县",
  22950. "value": "440825"
  22951. }, {
  22952. "label": "廉江市",
  22953. "value": "440881"
  22954. }, {
  22955. "label": "雷州市",
  22956. "value": "440882"
  22957. }, {
  22958. "label": "吴川市",
  22959. "value": "440883"
  22960. }], [{
  22961. "label": "茂南区",
  22962. "value": "440902"
  22963. }, {
  22964. "label": "电白区",
  22965. "value": "440904"
  22966. }, {
  22967. "label": "高州市",
  22968. "value": "440981"
  22969. }, {
  22970. "label": "化州市",
  22971. "value": "440982"
  22972. }, {
  22973. "label": "信宜市",
  22974. "value": "440983"
  22975. }], [{
  22976. "label": "端州区",
  22977. "value": "441202"
  22978. }, {
  22979. "label": "鼎湖区",
  22980. "value": "441203"
  22981. }, {
  22982. "label": "高要区",
  22983. "value": "441204"
  22984. }, {
  22985. "label": "广宁县",
  22986. "value": "441223"
  22987. }, {
  22988. "label": "怀集县",
  22989. "value": "441224"
  22990. }, {
  22991. "label": "封开县",
  22992. "value": "441225"
  22993. }, {
  22994. "label": "德庆县",
  22995. "value": "441226"
  22996. }, {
  22997. "label": "四会市",
  22998. "value": "441284"
  22999. }], [{
  23000. "label": "惠城区",
  23001. "value": "441302"
  23002. }, {
  23003. "label": "惠阳区",
  23004. "value": "441303"
  23005. }, {
  23006. "label": "博罗县",
  23007. "value": "441322"
  23008. }, {
  23009. "label": "惠东县",
  23010. "value": "441323"
  23011. }, {
  23012. "label": "龙门县",
  23013. "value": "441324"
  23014. }], [{
  23015. "label": "梅江区",
  23016. "value": "441402"
  23017. }, {
  23018. "label": "梅县区",
  23019. "value": "441403"
  23020. }, {
  23021. "label": "大埔县",
  23022. "value": "441422"
  23023. }, {
  23024. "label": "丰顺县",
  23025. "value": "441423"
  23026. }, {
  23027. "label": "五华县",
  23028. "value": "441424"
  23029. }, {
  23030. "label": "平远县",
  23031. "value": "441426"
  23032. }, {
  23033. "label": "蕉岭县",
  23034. "value": "441427"
  23035. }, {
  23036. "label": "兴宁市",
  23037. "value": "441481"
  23038. }], [{
  23039. "label": "城区",
  23040. "value": "441502"
  23041. }, {
  23042. "label": "海丰县",
  23043. "value": "441521"
  23044. }, {
  23045. "label": "陆河县",
  23046. "value": "441523"
  23047. }, {
  23048. "label": "陆丰市",
  23049. "value": "441581"
  23050. }], [{
  23051. "label": "源城区",
  23052. "value": "441602"
  23053. }, {
  23054. "label": "紫金县",
  23055. "value": "441621"
  23056. }, {
  23057. "label": "龙川县",
  23058. "value": "441622"
  23059. }, {
  23060. "label": "连平县",
  23061. "value": "441623"
  23062. }, {
  23063. "label": "和平县",
  23064. "value": "441624"
  23065. }, {
  23066. "label": "东源县",
  23067. "value": "441625"
  23068. }], [{
  23069. "label": "江城区",
  23070. "value": "441702"
  23071. }, {
  23072. "label": "阳东区",
  23073. "value": "441704"
  23074. }, {
  23075. "label": "阳西县",
  23076. "value": "441721"
  23077. }, {
  23078. "label": "阳春市",
  23079. "value": "441781"
  23080. }], [{
  23081. "label": "清城区",
  23082. "value": "441802"
  23083. }, {
  23084. "label": "清新区",
  23085. "value": "441803"
  23086. }, {
  23087. "label": "佛冈县",
  23088. "value": "441821"
  23089. }, {
  23090. "label": "阳山县",
  23091. "value": "441823"
  23092. }, {
  23093. "label": "连山壮族瑶族自治县",
  23094. "value": "441825"
  23095. }, {
  23096. "label": "连南瑶族自治县",
  23097. "value": "441826"
  23098. }, {
  23099. "label": "英德市",
  23100. "value": "441881"
  23101. }, {
  23102. "label": "连州市",
  23103. "value": "441882"
  23104. }], [{
  23105. "label": "东莞市",
  23106. "value": "441900"
  23107. }], [{
  23108. "label": "中山市",
  23109. "value": "442000"
  23110. }], [{
  23111. "label": "湘桥区",
  23112. "value": "445102"
  23113. }, {
  23114. "label": "潮安区",
  23115. "value": "445103"
  23116. }, {
  23117. "label": "饶平县",
  23118. "value": "445122"
  23119. }], [{
  23120. "label": "榕城区",
  23121. "value": "445202"
  23122. }, {
  23123. "label": "揭东区",
  23124. "value": "445203"
  23125. }, {
  23126. "label": "揭西县",
  23127. "value": "445222"
  23128. }, {
  23129. "label": "惠来县",
  23130. "value": "445224"
  23131. }, {
  23132. "label": "普宁市",
  23133. "value": "445281"
  23134. }], [{
  23135. "label": "云城区",
  23136. "value": "445302"
  23137. }, {
  23138. "label": "云安区",
  23139. "value": "445303"
  23140. }, {
  23141. "label": "新兴县",
  23142. "value": "445321"
  23143. }, {
  23144. "label": "郁南县",
  23145. "value": "445322"
  23146. }, {
  23147. "label": "罗定市",
  23148. "value": "445381"
  23149. }]], [[{
  23150. "label": "兴宁区",
  23151. "value": "450102"
  23152. }, {
  23153. "label": "青秀区",
  23154. "value": "450103"
  23155. }, {
  23156. "label": "江南区",
  23157. "value": "450105"
  23158. }, {
  23159. "label": "西乡塘区",
  23160. "value": "450107"
  23161. }, {
  23162. "label": "良庆区",
  23163. "value": "450108"
  23164. }, {
  23165. "label": "邕宁区",
  23166. "value": "450109"
  23167. }, {
  23168. "label": "武鸣区",
  23169. "value": "450110"
  23170. }, {
  23171. "label": "隆安县",
  23172. "value": "450123"
  23173. }, {
  23174. "label": "马山县",
  23175. "value": "450124"
  23176. }, {
  23177. "label": "上林县",
  23178. "value": "450125"
  23179. }, {
  23180. "label": "宾阳县",
  23181. "value": "450126"
  23182. }, {
  23183. "label": "横县",
  23184. "value": "450127"
  23185. }], [{
  23186. "label": "城中区",
  23187. "value": "450202"
  23188. }, {
  23189. "label": "鱼峰区",
  23190. "value": "450203"
  23191. }, {
  23192. "label": "柳南区",
  23193. "value": "450204"
  23194. }, {
  23195. "label": "柳北区",
  23196. "value": "450205"
  23197. }, {
  23198. "label": "柳江区",
  23199. "value": "450206"
  23200. }, {
  23201. "label": "柳城县",
  23202. "value": "450222"
  23203. }, {
  23204. "label": "鹿寨县",
  23205. "value": "450223"
  23206. }, {
  23207. "label": "融安县",
  23208. "value": "450224"
  23209. }, {
  23210. "label": "融水苗族自治县",
  23211. "value": "450225"
  23212. }, {
  23213. "label": "三江侗族自治县",
  23214. "value": "450226"
  23215. }], [{
  23216. "label": "秀峰区",
  23217. "value": "450302"
  23218. }, {
  23219. "label": "叠彩区",
  23220. "value": "450303"
  23221. }, {
  23222. "label": "象山区",
  23223. "value": "450304"
  23224. }, {
  23225. "label": "七星区",
  23226. "value": "450305"
  23227. }, {
  23228. "label": "雁山区",
  23229. "value": "450311"
  23230. }, {
  23231. "label": "临桂区",
  23232. "value": "450312"
  23233. }, {
  23234. "label": "阳朔县",
  23235. "value": "450321"
  23236. }, {
  23237. "label": "灵川县",
  23238. "value": "450323"
  23239. }, {
  23240. "label": "全州县",
  23241. "value": "450324"
  23242. }, {
  23243. "label": "兴安县",
  23244. "value": "450325"
  23245. }, {
  23246. "label": "永福县",
  23247. "value": "450326"
  23248. }, {
  23249. "label": "灌阳县",
  23250. "value": "450327"
  23251. }, {
  23252. "label": "龙胜各族自治县",
  23253. "value": "450328"
  23254. }, {
  23255. "label": "资源县",
  23256. "value": "450329"
  23257. }, {
  23258. "label": "平乐县",
  23259. "value": "450330"
  23260. }, {
  23261. "label": "荔浦县",
  23262. "value": "450331"
  23263. }, {
  23264. "label": "恭城瑶族自治县",
  23265. "value": "450332"
  23266. }], [{
  23267. "label": "万秀区",
  23268. "value": "450403"
  23269. }, {
  23270. "label": "长洲区",
  23271. "value": "450405"
  23272. }, {
  23273. "label": "龙圩区",
  23274. "value": "450406"
  23275. }, {
  23276. "label": "苍梧县",
  23277. "value": "450421"
  23278. }, {
  23279. "label": "藤县",
  23280. "value": "450422"
  23281. }, {
  23282. "label": "蒙山县",
  23283. "value": "450423"
  23284. }, {
  23285. "label": "岑溪市",
  23286. "value": "450481"
  23287. }], [{
  23288. "label": "海城区",
  23289. "value": "450502"
  23290. }, {
  23291. "label": "银海区",
  23292. "value": "450503"
  23293. }, {
  23294. "label": "铁山港区",
  23295. "value": "450512"
  23296. }, {
  23297. "label": "合浦县",
  23298. "value": "450521"
  23299. }], [{
  23300. "label": "港口区",
  23301. "value": "450602"
  23302. }, {
  23303. "label": "防城区",
  23304. "value": "450603"
  23305. }, {
  23306. "label": "上思县",
  23307. "value": "450621"
  23308. }, {
  23309. "label": "东兴市",
  23310. "value": "450681"
  23311. }], [{
  23312. "label": "钦南区",
  23313. "value": "450702"
  23314. }, {
  23315. "label": "钦北区",
  23316. "value": "450703"
  23317. }, {
  23318. "label": "灵山县",
  23319. "value": "450721"
  23320. }, {
  23321. "label": "浦北县",
  23322. "value": "450722"
  23323. }], [{
  23324. "label": "港北区",
  23325. "value": "450802"
  23326. }, {
  23327. "label": "港南区",
  23328. "value": "450803"
  23329. }, {
  23330. "label": "覃塘区",
  23331. "value": "450804"
  23332. }, {
  23333. "label": "平南县",
  23334. "value": "450821"
  23335. }, {
  23336. "label": "桂平市",
  23337. "value": "450881"
  23338. }], [{
  23339. "label": "玉州区",
  23340. "value": "450902"
  23341. }, {
  23342. "label": "福绵区",
  23343. "value": "450903"
  23344. }, {
  23345. "label": "容县",
  23346. "value": "450921"
  23347. }, {
  23348. "label": "陆川县",
  23349. "value": "450922"
  23350. }, {
  23351. "label": "博白县",
  23352. "value": "450923"
  23353. }, {
  23354. "label": "兴业县",
  23355. "value": "450924"
  23356. }, {
  23357. "label": "北流市",
  23358. "value": "450981"
  23359. }], [{
  23360. "label": "右江区",
  23361. "value": "451002"
  23362. }, {
  23363. "label": "田阳县",
  23364. "value": "451021"
  23365. }, {
  23366. "label": "田东县",
  23367. "value": "451022"
  23368. }, {
  23369. "label": "平果县",
  23370. "value": "451023"
  23371. }, {
  23372. "label": "德保县",
  23373. "value": "451024"
  23374. }, {
  23375. "label": "那坡县",
  23376. "value": "451026"
  23377. }, {
  23378. "label": "凌云县",
  23379. "value": "451027"
  23380. }, {
  23381. "label": "乐业县",
  23382. "value": "451028"
  23383. }, {
  23384. "label": "田林县",
  23385. "value": "451029"
  23386. }, {
  23387. "label": "西林县",
  23388. "value": "451030"
  23389. }, {
  23390. "label": "隆林各族自治县",
  23391. "value": "451031"
  23392. }, {
  23393. "label": "靖西市",
  23394. "value": "451081"
  23395. }], [{
  23396. "label": "八步区",
  23397. "value": "451102"
  23398. }, {
  23399. "label": "平桂区",
  23400. "value": "451103"
  23401. }, {
  23402. "label": "昭平县",
  23403. "value": "451121"
  23404. }, {
  23405. "label": "钟山县",
  23406. "value": "451122"
  23407. }, {
  23408. "label": "富川瑶族自治县",
  23409. "value": "451123"
  23410. }], [{
  23411. "label": "金城江区",
  23412. "value": "451202"
  23413. }, {
  23414. "label": "宜州区",
  23415. "value": "451203"
  23416. }, {
  23417. "label": "南丹县",
  23418. "value": "451221"
  23419. }, {
  23420. "label": "天峨县",
  23421. "value": "451222"
  23422. }, {
  23423. "label": "凤山县",
  23424. "value": "451223"
  23425. }, {
  23426. "label": "东兰县",
  23427. "value": "451224"
  23428. }, {
  23429. "label": "罗城仫佬族自治县",
  23430. "value": "451225"
  23431. }, {
  23432. "label": "环江毛南族自治县",
  23433. "value": "451226"
  23434. }, {
  23435. "label": "巴马瑶族自治县",
  23436. "value": "451227"
  23437. }, {
  23438. "label": "都安瑶族自治县",
  23439. "value": "451228"
  23440. }, {
  23441. "label": "大化瑶族自治县",
  23442. "value": "451229"
  23443. }], [{
  23444. "label": "兴宾区",
  23445. "value": "451302"
  23446. }, {
  23447. "label": "忻城县",
  23448. "value": "451321"
  23449. }, {
  23450. "label": "象州县",
  23451. "value": "451322"
  23452. }, {
  23453. "label": "武宣县",
  23454. "value": "451323"
  23455. }, {
  23456. "label": "金秀瑶族自治县",
  23457. "value": "451324"
  23458. }, {
  23459. "label": "合山市",
  23460. "value": "451381"
  23461. }], [{
  23462. "label": "江州区",
  23463. "value": "451402"
  23464. }, {
  23465. "label": "扶绥县",
  23466. "value": "451421"
  23467. }, {
  23468. "label": "宁明县",
  23469. "value": "451422"
  23470. }, {
  23471. "label": "龙州县",
  23472. "value": "451423"
  23473. }, {
  23474. "label": "大新县",
  23475. "value": "451424"
  23476. }, {
  23477. "label": "天等县",
  23478. "value": "451425"
  23479. }, {
  23480. "label": "凭祥市",
  23481. "value": "451481"
  23482. }]], [[{
  23483. "label": "秀英区",
  23484. "value": "460105"
  23485. }, {
  23486. "label": "龙华区",
  23487. "value": "460106"
  23488. }, {
  23489. "label": "琼山区",
  23490. "value": "460107"
  23491. }, {
  23492. "label": "美兰区",
  23493. "value": "460108"
  23494. }], [{
  23495. "label": "海棠区",
  23496. "value": "460202"
  23497. }, {
  23498. "label": "吉阳区",
  23499. "value": "460203"
  23500. }, {
  23501. "label": "天涯区",
  23502. "value": "460204"
  23503. }, {
  23504. "label": "崖州区",
  23505. "value": "460205"
  23506. }], [{
  23507. "label": "西沙群岛",
  23508. "value": "460321"
  23509. }, {
  23510. "label": "南沙群岛",
  23511. "value": "460322"
  23512. }, {
  23513. "label": "中沙群岛的岛礁及其海域",
  23514. "value": "460323"
  23515. }], [{
  23516. "label": "儋州市",
  23517. "value": "460400"
  23518. }], [{
  23519. "label": "五指山市",
  23520. "value": "469001"
  23521. }, {
  23522. "label": "琼海市",
  23523. "value": "469002"
  23524. }, {
  23525. "label": "文昌市",
  23526. "value": "469005"
  23527. }, {
  23528. "label": "万宁市",
  23529. "value": "469006"
  23530. }, {
  23531. "label": "东方市",
  23532. "value": "469007"
  23533. }, {
  23534. "label": "定安县",
  23535. "value": "469021"
  23536. }, {
  23537. "label": "屯昌县",
  23538. "value": "469022"
  23539. }, {
  23540. "label": "澄迈县",
  23541. "value": "469023"
  23542. }, {
  23543. "label": "临高县",
  23544. "value": "469024"
  23545. }, {
  23546. "label": "白沙黎族自治县",
  23547. "value": "469025"
  23548. }, {
  23549. "label": "昌江黎族自治县",
  23550. "value": "469026"
  23551. }, {
  23552. "label": "乐东黎族自治县",
  23553. "value": "469027"
  23554. }, {
  23555. "label": "陵水黎族自治县",
  23556. "value": "469028"
  23557. }, {
  23558. "label": "保亭黎族苗族自治县",
  23559. "value": "469029"
  23560. }, {
  23561. "label": "琼中黎族苗族自治县",
  23562. "value": "469030"
  23563. }]], [[{
  23564. "label": "万州区",
  23565. "value": "500101"
  23566. }, {
  23567. "label": "涪陵区",
  23568. "value": "500102"
  23569. }, {
  23570. "label": "渝中区",
  23571. "value": "500103"
  23572. }, {
  23573. "label": "大渡口区",
  23574. "value": "500104"
  23575. }, {
  23576. "label": "江北区",
  23577. "value": "500105"
  23578. }, {
  23579. "label": "沙坪坝区",
  23580. "value": "500106"
  23581. }, {
  23582. "label": "九龙坡区",
  23583. "value": "500107"
  23584. }, {
  23585. "label": "南岸区",
  23586. "value": "500108"
  23587. }, {
  23588. "label": "北碚区",
  23589. "value": "500109"
  23590. }, {
  23591. "label": "綦江区",
  23592. "value": "500110"
  23593. }, {
  23594. "label": "大足区",
  23595. "value": "500111"
  23596. }, {
  23597. "label": "渝北区",
  23598. "value": "500112"
  23599. }, {
  23600. "label": "巴南区",
  23601. "value": "500113"
  23602. }, {
  23603. "label": "黔江区",
  23604. "value": "500114"
  23605. }, {
  23606. "label": "长寿区",
  23607. "value": "500115"
  23608. }, {
  23609. "label": "江津区",
  23610. "value": "500116"
  23611. }, {
  23612. "label": "合川区",
  23613. "value": "500117"
  23614. }, {
  23615. "label": "永川区",
  23616. "value": "500118"
  23617. }, {
  23618. "label": "南川区",
  23619. "value": "500119"
  23620. }, {
  23621. "label": "璧山区",
  23622. "value": "500120"
  23623. }, {
  23624. "label": "铜梁区",
  23625. "value": "500151"
  23626. }, {
  23627. "label": "潼南区",
  23628. "value": "500152"
  23629. }, {
  23630. "label": "荣昌区",
  23631. "value": "500153"
  23632. }, {
  23633. "label": "开州区",
  23634. "value": "500154"
  23635. }, {
  23636. "label": "梁平区",
  23637. "value": "500155"
  23638. }, {
  23639. "label": "武隆区",
  23640. "value": "500156"
  23641. }], [{
  23642. "label": "城口县",
  23643. "value": "500229"
  23644. }, {
  23645. "label": "丰都县",
  23646. "value": "500230"
  23647. }, {
  23648. "label": "垫江县",
  23649. "value": "500231"
  23650. }, {
  23651. "label": "忠县",
  23652. "value": "500233"
  23653. }, {
  23654. "label": "云阳县",
  23655. "value": "500235"
  23656. }, {
  23657. "label": "奉节县",
  23658. "value": "500236"
  23659. }, {
  23660. "label": "巫山县",
  23661. "value": "500237"
  23662. }, {
  23663. "label": "巫溪县",
  23664. "value": "500238"
  23665. }, {
  23666. "label": "石柱土家族自治县",
  23667. "value": "500240"
  23668. }, {
  23669. "label": "秀山土家族苗族自治县",
  23670. "value": "500241"
  23671. }, {
  23672. "label": "酉阳土家族苗族自治县",
  23673. "value": "500242"
  23674. }, {
  23675. "label": "彭水苗族土家族自治县",
  23676. "value": "500243"
  23677. }]], [[{
  23678. "label": "锦江区",
  23679. "value": "510104"
  23680. }, {
  23681. "label": "青羊区",
  23682. "value": "510105"
  23683. }, {
  23684. "label": "金牛区",
  23685. "value": "510106"
  23686. }, {
  23687. "label": "武侯区",
  23688. "value": "510107"
  23689. }, {
  23690. "label": "成华区",
  23691. "value": "510108"
  23692. }, {
  23693. "label": "龙泉驿区",
  23694. "value": "510112"
  23695. }, {
  23696. "label": "青白江区",
  23697. "value": "510113"
  23698. }, {
  23699. "label": "新都区",
  23700. "value": "510114"
  23701. }, {
  23702. "label": "温江区",
  23703. "value": "510115"
  23704. }, {
  23705. "label": "双流区",
  23706. "value": "510116"
  23707. }, {
  23708. "label": "郫都区",
  23709. "value": "510117"
  23710. }, {
  23711. "label": "金堂县",
  23712. "value": "510121"
  23713. }, {
  23714. "label": "大邑县",
  23715. "value": "510129"
  23716. }, {
  23717. "label": "蒲江县",
  23718. "value": "510131"
  23719. }, {
  23720. "label": "新津县",
  23721. "value": "510132"
  23722. }, {
  23723. "label": "都江堰市",
  23724. "value": "510181"
  23725. }, {
  23726. "label": "彭州市",
  23727. "value": "510182"
  23728. }, {
  23729. "label": "邛崃市",
  23730. "value": "510183"
  23731. }, {
  23732. "label": "崇州市",
  23733. "value": "510184"
  23734. }, {
  23735. "label": "简阳市",
  23736. "value": "510185"
  23737. }], [{
  23738. "label": "自流井区",
  23739. "value": "510302"
  23740. }, {
  23741. "label": "贡井区",
  23742. "value": "510303"
  23743. }, {
  23744. "label": "大安区",
  23745. "value": "510304"
  23746. }, {
  23747. "label": "沿滩区",
  23748. "value": "510311"
  23749. }, {
  23750. "label": "荣县",
  23751. "value": "510321"
  23752. }, {
  23753. "label": "富顺县",
  23754. "value": "510322"
  23755. }], [{
  23756. "label": "东区",
  23757. "value": "510402"
  23758. }, {
  23759. "label": "西区",
  23760. "value": "510403"
  23761. }, {
  23762. "label": "仁和区",
  23763. "value": "510411"
  23764. }, {
  23765. "label": "米易县",
  23766. "value": "510421"
  23767. }, {
  23768. "label": "盐边县",
  23769. "value": "510422"
  23770. }], [{
  23771. "label": "江阳区",
  23772. "value": "510502"
  23773. }, {
  23774. "label": "纳溪区",
  23775. "value": "510503"
  23776. }, {
  23777. "label": "龙马潭区",
  23778. "value": "510504"
  23779. }, {
  23780. "label": "泸县",
  23781. "value": "510521"
  23782. }, {
  23783. "label": "合江县",
  23784. "value": "510522"
  23785. }, {
  23786. "label": "叙永县",
  23787. "value": "510524"
  23788. }, {
  23789. "label": "古蔺县",
  23790. "value": "510525"
  23791. }], [{
  23792. "label": "旌阳区",
  23793. "value": "510603"
  23794. }, {
  23795. "label": "罗江区",
  23796. "value": "510604"
  23797. }, {
  23798. "label": "中江县",
  23799. "value": "510623"
  23800. }, {
  23801. "label": "广汉市",
  23802. "value": "510681"
  23803. }, {
  23804. "label": "什邡市",
  23805. "value": "510682"
  23806. }, {
  23807. "label": "绵竹市",
  23808. "value": "510683"
  23809. }], [{
  23810. "label": "涪城区",
  23811. "value": "510703"
  23812. }, {
  23813. "label": "游仙区",
  23814. "value": "510704"
  23815. }, {
  23816. "label": "安州区",
  23817. "value": "510705"
  23818. }, {
  23819. "label": "三台县",
  23820. "value": "510722"
  23821. }, {
  23822. "label": "盐亭县",
  23823. "value": "510723"
  23824. }, {
  23825. "label": "梓潼县",
  23826. "value": "510725"
  23827. }, {
  23828. "label": "北川羌族自治县",
  23829. "value": "510726"
  23830. }, {
  23831. "label": "平武县",
  23832. "value": "510727"
  23833. }, {
  23834. "label": "江油市",
  23835. "value": "510781"
  23836. }], [{
  23837. "label": "利州区",
  23838. "value": "510802"
  23839. }, {
  23840. "label": "昭化区",
  23841. "value": "510811"
  23842. }, {
  23843. "label": "朝天区",
  23844. "value": "510812"
  23845. }, {
  23846. "label": "旺苍县",
  23847. "value": "510821"
  23848. }, {
  23849. "label": "青川县",
  23850. "value": "510822"
  23851. }, {
  23852. "label": "剑阁县",
  23853. "value": "510823"
  23854. }, {
  23855. "label": "苍溪县",
  23856. "value": "510824"
  23857. }], [{
  23858. "label": "船山区",
  23859. "value": "510903"
  23860. }, {
  23861. "label": "安居区",
  23862. "value": "510904"
  23863. }, {
  23864. "label": "蓬溪县",
  23865. "value": "510921"
  23866. }, {
  23867. "label": "射洪县",
  23868. "value": "510922"
  23869. }, {
  23870. "label": "大英县",
  23871. "value": "510923"
  23872. }], [{
  23873. "label": "市中区",
  23874. "value": "511002"
  23875. }, {
  23876. "label": "东兴区",
  23877. "value": "511011"
  23878. }, {
  23879. "label": "威远县",
  23880. "value": "511024"
  23881. }, {
  23882. "label": "资中县",
  23883. "value": "511025"
  23884. }, {
  23885. "label": "内江经济开发区",
  23886. "value": "511071"
  23887. }, {
  23888. "label": "隆昌市",
  23889. "value": "511083"
  23890. }], [{
  23891. "label": "市中区",
  23892. "value": "511102"
  23893. }, {
  23894. "label": "沙湾区",
  23895. "value": "511111"
  23896. }, {
  23897. "label": "五通桥区",
  23898. "value": "511112"
  23899. }, {
  23900. "label": "金口河区",
  23901. "value": "511113"
  23902. }, {
  23903. "label": "犍为县",
  23904. "value": "511123"
  23905. }, {
  23906. "label": "井研县",
  23907. "value": "511124"
  23908. }, {
  23909. "label": "夹江县",
  23910. "value": "511126"
  23911. }, {
  23912. "label": "沐川县",
  23913. "value": "511129"
  23914. }, {
  23915. "label": "峨边彝族自治县",
  23916. "value": "511132"
  23917. }, {
  23918. "label": "马边彝族自治县",
  23919. "value": "511133"
  23920. }, {
  23921. "label": "峨眉山市",
  23922. "value": "511181"
  23923. }], [{
  23924. "label": "顺庆区",
  23925. "value": "511302"
  23926. }, {
  23927. "label": "高坪区",
  23928. "value": "511303"
  23929. }, {
  23930. "label": "嘉陵区",
  23931. "value": "511304"
  23932. }, {
  23933. "label": "南部县",
  23934. "value": "511321"
  23935. }, {
  23936. "label": "营山县",
  23937. "value": "511322"
  23938. }, {
  23939. "label": "蓬安县",
  23940. "value": "511323"
  23941. }, {
  23942. "label": "仪陇县",
  23943. "value": "511324"
  23944. }, {
  23945. "label": "西充县",
  23946. "value": "511325"
  23947. }, {
  23948. "label": "阆中市",
  23949. "value": "511381"
  23950. }], [{
  23951. "label": "东坡区",
  23952. "value": "511402"
  23953. }, {
  23954. "label": "彭山区",
  23955. "value": "511403"
  23956. }, {
  23957. "label": "仁寿县",
  23958. "value": "511421"
  23959. }, {
  23960. "label": "洪雅县",
  23961. "value": "511423"
  23962. }, {
  23963. "label": "丹棱县",
  23964. "value": "511424"
  23965. }, {
  23966. "label": "青神县",
  23967. "value": "511425"
  23968. }], [{
  23969. "label": "翠屏区",
  23970. "value": "511502"
  23971. }, {
  23972. "label": "南溪区",
  23973. "value": "511503"
  23974. }, {
  23975. "label": "宜宾县",
  23976. "value": "511521"
  23977. }, {
  23978. "label": "江安县",
  23979. "value": "511523"
  23980. }, {
  23981. "label": "长宁县",
  23982. "value": "511524"
  23983. }, {
  23984. "label": "高县",
  23985. "value": "511525"
  23986. }, {
  23987. "label": "珙县",
  23988. "value": "511526"
  23989. }, {
  23990. "label": "筠连县",
  23991. "value": "511527"
  23992. }, {
  23993. "label": "兴文县",
  23994. "value": "511528"
  23995. }, {
  23996. "label": "屏山县",
  23997. "value": "511529"
  23998. }], [{
  23999. "label": "广安区",
  24000. "value": "511602"
  24001. }, {
  24002. "label": "前锋区",
  24003. "value": "511603"
  24004. }, {
  24005. "label": "岳池县",
  24006. "value": "511621"
  24007. }, {
  24008. "label": "武胜县",
  24009. "value": "511622"
  24010. }, {
  24011. "label": "邻水县",
  24012. "value": "511623"
  24013. }, {
  24014. "label": "华蓥市",
  24015. "value": "511681"
  24016. }], [{
  24017. "label": "通川区",
  24018. "value": "511702"
  24019. }, {
  24020. "label": "达川区",
  24021. "value": "511703"
  24022. }, {
  24023. "label": "宣汉县",
  24024. "value": "511722"
  24025. }, {
  24026. "label": "开江县",
  24027. "value": "511723"
  24028. }, {
  24029. "label": "大竹县",
  24030. "value": "511724"
  24031. }, {
  24032. "label": "渠县",
  24033. "value": "511725"
  24034. }, {
  24035. "label": "达州经济开发区",
  24036. "value": "511771"
  24037. }, {
  24038. "label": "万源市",
  24039. "value": "511781"
  24040. }], [{
  24041. "label": "雨城区",
  24042. "value": "511802"
  24043. }, {
  24044. "label": "名山区",
  24045. "value": "511803"
  24046. }, {
  24047. "label": "荥经县",
  24048. "value": "511822"
  24049. }, {
  24050. "label": "汉源县",
  24051. "value": "511823"
  24052. }, {
  24053. "label": "石棉县",
  24054. "value": "511824"
  24055. }, {
  24056. "label": "天全县",
  24057. "value": "511825"
  24058. }, {
  24059. "label": "芦山县",
  24060. "value": "511826"
  24061. }, {
  24062. "label": "宝兴县",
  24063. "value": "511827"
  24064. }], [{
  24065. "label": "巴州区",
  24066. "value": "511902"
  24067. }, {
  24068. "label": "恩阳区",
  24069. "value": "511903"
  24070. }, {
  24071. "label": "通江县",
  24072. "value": "511921"
  24073. }, {
  24074. "label": "南江县",
  24075. "value": "511922"
  24076. }, {
  24077. "label": "平昌县",
  24078. "value": "511923"
  24079. }, {
  24080. "label": "巴中经济开发区",
  24081. "value": "511971"
  24082. }], [{
  24083. "label": "雁江区",
  24084. "value": "512002"
  24085. }, {
  24086. "label": "安岳县",
  24087. "value": "512021"
  24088. }, {
  24089. "label": "乐至县",
  24090. "value": "512022"
  24091. }], [{
  24092. "label": "马尔康市",
  24093. "value": "513201"
  24094. }, {
  24095. "label": "汶川县",
  24096. "value": "513221"
  24097. }, {
  24098. "label": "理县",
  24099. "value": "513222"
  24100. }, {
  24101. "label": "茂县",
  24102. "value": "513223"
  24103. }, {
  24104. "label": "松潘县",
  24105. "value": "513224"
  24106. }, {
  24107. "label": "九寨沟县",
  24108. "value": "513225"
  24109. }, {
  24110. "label": "金川县",
  24111. "value": "513226"
  24112. }, {
  24113. "label": "小金县",
  24114. "value": "513227"
  24115. }, {
  24116. "label": "黑水县",
  24117. "value": "513228"
  24118. }, {
  24119. "label": "壤塘县",
  24120. "value": "513230"
  24121. }, {
  24122. "label": "阿坝县",
  24123. "value": "513231"
  24124. }, {
  24125. "label": "若尔盖县",
  24126. "value": "513232"
  24127. }, {
  24128. "label": "红原县",
  24129. "value": "513233"
  24130. }], [{
  24131. "label": "康定市",
  24132. "value": "513301"
  24133. }, {
  24134. "label": "泸定县",
  24135. "value": "513322"
  24136. }, {
  24137. "label": "丹巴县",
  24138. "value": "513323"
  24139. }, {
  24140. "label": "九龙县",
  24141. "value": "513324"
  24142. }, {
  24143. "label": "雅江县",
  24144. "value": "513325"
  24145. }, {
  24146. "label": "道孚县",
  24147. "value": "513326"
  24148. }, {
  24149. "label": "炉霍县",
  24150. "value": "513327"
  24151. }, {
  24152. "label": "甘孜县",
  24153. "value": "513328"
  24154. }, {
  24155. "label": "新龙县",
  24156. "value": "513329"
  24157. }, {
  24158. "label": "德格县",
  24159. "value": "513330"
  24160. }, {
  24161. "label": "白玉县",
  24162. "value": "513331"
  24163. }, {
  24164. "label": "石渠县",
  24165. "value": "513332"
  24166. }, {
  24167. "label": "色达县",
  24168. "value": "513333"
  24169. }, {
  24170. "label": "理塘县",
  24171. "value": "513334"
  24172. }, {
  24173. "label": "巴塘县",
  24174. "value": "513335"
  24175. }, {
  24176. "label": "乡城县",
  24177. "value": "513336"
  24178. }, {
  24179. "label": "稻城县",
  24180. "value": "513337"
  24181. }, {
  24182. "label": "得荣县",
  24183. "value": "513338"
  24184. }], [{
  24185. "label": "西昌市",
  24186. "value": "513401"
  24187. }, {
  24188. "label": "木里藏族自治县",
  24189. "value": "513422"
  24190. }, {
  24191. "label": "盐源县",
  24192. "value": "513423"
  24193. }, {
  24194. "label": "德昌县",
  24195. "value": "513424"
  24196. }, {
  24197. "label": "会理县",
  24198. "value": "513425"
  24199. }, {
  24200. "label": "会东县",
  24201. "value": "513426"
  24202. }, {
  24203. "label": "宁南县",
  24204. "value": "513427"
  24205. }, {
  24206. "label": "普格县",
  24207. "value": "513428"
  24208. }, {
  24209. "label": "布拖县",
  24210. "value": "513429"
  24211. }, {
  24212. "label": "金阳县",
  24213. "value": "513430"
  24214. }, {
  24215. "label": "昭觉县",
  24216. "value": "513431"
  24217. }, {
  24218. "label": "喜德县",
  24219. "value": "513432"
  24220. }, {
  24221. "label": "冕宁县",
  24222. "value": "513433"
  24223. }, {
  24224. "label": "越西县",
  24225. "value": "513434"
  24226. }, {
  24227. "label": "甘洛县",
  24228. "value": "513435"
  24229. }, {
  24230. "label": "美姑县",
  24231. "value": "513436"
  24232. }, {
  24233. "label": "雷波县",
  24234. "value": "513437"
  24235. }]], [[{
  24236. "label": "南明区",
  24237. "value": "520102"
  24238. }, {
  24239. "label": "云岩区",
  24240. "value": "520103"
  24241. }, {
  24242. "label": "花溪区",
  24243. "value": "520111"
  24244. }, {
  24245. "label": "乌当区",
  24246. "value": "520112"
  24247. }, {
  24248. "label": "白云区",
  24249. "value": "520113"
  24250. }, {
  24251. "label": "观山湖区",
  24252. "value": "520115"
  24253. }, {
  24254. "label": "开阳县",
  24255. "value": "520121"
  24256. }, {
  24257. "label": "息烽县",
  24258. "value": "520122"
  24259. }, {
  24260. "label": "修文县",
  24261. "value": "520123"
  24262. }, {
  24263. "label": "清镇市",
  24264. "value": "520181"
  24265. }], [{
  24266. "label": "钟山区",
  24267. "value": "520201"
  24268. }, {
  24269. "label": "六枝特区",
  24270. "value": "520203"
  24271. }, {
  24272. "label": "水城县",
  24273. "value": "520221"
  24274. }, {
  24275. "label": "盘州市",
  24276. "value": "520281"
  24277. }], [{
  24278. "label": "红花岗区",
  24279. "value": "520302"
  24280. }, {
  24281. "label": "汇川区",
  24282. "value": "520303"
  24283. }, {
  24284. "label": "播州区",
  24285. "value": "520304"
  24286. }, {
  24287. "label": "桐梓县",
  24288. "value": "520322"
  24289. }, {
  24290. "label": "绥阳县",
  24291. "value": "520323"
  24292. }, {
  24293. "label": "正安县",
  24294. "value": "520324"
  24295. }, {
  24296. "label": "道真仡佬族苗族自治县",
  24297. "value": "520325"
  24298. }, {
  24299. "label": "务川仡佬族苗族自治县",
  24300. "value": "520326"
  24301. }, {
  24302. "label": "凤冈县",
  24303. "value": "520327"
  24304. }, {
  24305. "label": "湄潭县",
  24306. "value": "520328"
  24307. }, {
  24308. "label": "余庆县",
  24309. "value": "520329"
  24310. }, {
  24311. "label": "习水县",
  24312. "value": "520330"
  24313. }, {
  24314. "label": "赤水市",
  24315. "value": "520381"
  24316. }, {
  24317. "label": "仁怀市",
  24318. "value": "520382"
  24319. }], [{
  24320. "label": "西秀区",
  24321. "value": "520402"
  24322. }, {
  24323. "label": "平坝区",
  24324. "value": "520403"
  24325. }, {
  24326. "label": "普定县",
  24327. "value": "520422"
  24328. }, {
  24329. "label": "镇宁布依族苗族自治县",
  24330. "value": "520423"
  24331. }, {
  24332. "label": "关岭布依族苗族自治县",
  24333. "value": "520424"
  24334. }, {
  24335. "label": "紫云苗族布依族自治县",
  24336. "value": "520425"
  24337. }], [{
  24338. "label": "七星关区",
  24339. "value": "520502"
  24340. }, {
  24341. "label": "大方县",
  24342. "value": "520521"
  24343. }, {
  24344. "label": "黔西县",
  24345. "value": "520522"
  24346. }, {
  24347. "label": "金沙县",
  24348. "value": "520523"
  24349. }, {
  24350. "label": "织金县",
  24351. "value": "520524"
  24352. }, {
  24353. "label": "纳雍县",
  24354. "value": "520525"
  24355. }, {
  24356. "label": "威宁彝族回族苗族自治县",
  24357. "value": "520526"
  24358. }, {
  24359. "label": "赫章县",
  24360. "value": "520527"
  24361. }], [{
  24362. "label": "碧江区",
  24363. "value": "520602"
  24364. }, {
  24365. "label": "万山区",
  24366. "value": "520603"
  24367. }, {
  24368. "label": "江口县",
  24369. "value": "520621"
  24370. }, {
  24371. "label": "玉屏侗族自治县",
  24372. "value": "520622"
  24373. }, {
  24374. "label": "石阡县",
  24375. "value": "520623"
  24376. }, {
  24377. "label": "思南县",
  24378. "value": "520624"
  24379. }, {
  24380. "label": "印江土家族苗族自治县",
  24381. "value": "520625"
  24382. }, {
  24383. "label": "德江县",
  24384. "value": "520626"
  24385. }, {
  24386. "label": "沿河土家族自治县",
  24387. "value": "520627"
  24388. }, {
  24389. "label": "松桃苗族自治县",
  24390. "value": "520628"
  24391. }], [{
  24392. "label": "兴义市",
  24393. "value": "522301"
  24394. }, {
  24395. "label": "兴仁县",
  24396. "value": "522322"
  24397. }, {
  24398. "label": "普安县",
  24399. "value": "522323"
  24400. }, {
  24401. "label": "晴隆县",
  24402. "value": "522324"
  24403. }, {
  24404. "label": "贞丰县",
  24405. "value": "522325"
  24406. }, {
  24407. "label": "望谟县",
  24408. "value": "522326"
  24409. }, {
  24410. "label": "册亨县",
  24411. "value": "522327"
  24412. }, {
  24413. "label": "安龙县",
  24414. "value": "522328"
  24415. }], [{
  24416. "label": "凯里市",
  24417. "value": "522601"
  24418. }, {
  24419. "label": "黄平县",
  24420. "value": "522622"
  24421. }, {
  24422. "label": "施秉县",
  24423. "value": "522623"
  24424. }, {
  24425. "label": "三穗县",
  24426. "value": "522624"
  24427. }, {
  24428. "label": "镇远县",
  24429. "value": "522625"
  24430. }, {
  24431. "label": "岑巩县",
  24432. "value": "522626"
  24433. }, {
  24434. "label": "天柱县",
  24435. "value": "522627"
  24436. }, {
  24437. "label": "锦屏县",
  24438. "value": "522628"
  24439. }, {
  24440. "label": "剑河县",
  24441. "value": "522629"
  24442. }, {
  24443. "label": "台江县",
  24444. "value": "522630"
  24445. }, {
  24446. "label": "黎平县",
  24447. "value": "522631"
  24448. }, {
  24449. "label": "榕江县",
  24450. "value": "522632"
  24451. }, {
  24452. "label": "从江县",
  24453. "value": "522633"
  24454. }, {
  24455. "label": "雷山县",
  24456. "value": "522634"
  24457. }, {
  24458. "label": "麻江县",
  24459. "value": "522635"
  24460. }, {
  24461. "label": "丹寨县",
  24462. "value": "522636"
  24463. }], [{
  24464. "label": "都匀市",
  24465. "value": "522701"
  24466. }, {
  24467. "label": "福泉市",
  24468. "value": "522702"
  24469. }, {
  24470. "label": "荔波县",
  24471. "value": "522722"
  24472. }, {
  24473. "label": "贵定县",
  24474. "value": "522723"
  24475. }, {
  24476. "label": "瓮安县",
  24477. "value": "522725"
  24478. }, {
  24479. "label": "独山县",
  24480. "value": "522726"
  24481. }, {
  24482. "label": "平塘县",
  24483. "value": "522727"
  24484. }, {
  24485. "label": "罗甸县",
  24486. "value": "522728"
  24487. }, {
  24488. "label": "长顺县",
  24489. "value": "522729"
  24490. }, {
  24491. "label": "龙里县",
  24492. "value": "522730"
  24493. }, {
  24494. "label": "惠水县",
  24495. "value": "522731"
  24496. }, {
  24497. "label": "三都水族自治县",
  24498. "value": "522732"
  24499. }]], [[{
  24500. "label": "五华区",
  24501. "value": "530102"
  24502. }, {
  24503. "label": "盘龙区",
  24504. "value": "530103"
  24505. }, {
  24506. "label": "官渡区",
  24507. "value": "530111"
  24508. }, {
  24509. "label": "西山区",
  24510. "value": "530112"
  24511. }, {
  24512. "label": "东川区",
  24513. "value": "530113"
  24514. }, {
  24515. "label": "呈贡区",
  24516. "value": "530114"
  24517. }, {
  24518. "label": "晋宁区",
  24519. "value": "530115"
  24520. }, {
  24521. "label": "富民县",
  24522. "value": "530124"
  24523. }, {
  24524. "label": "宜良县",
  24525. "value": "530125"
  24526. }, {
  24527. "label": "石林彝族自治县",
  24528. "value": "530126"
  24529. }, {
  24530. "label": "嵩明县",
  24531. "value": "530127"
  24532. }, {
  24533. "label": "禄劝彝族苗族自治县",
  24534. "value": "530128"
  24535. }, {
  24536. "label": "寻甸回族彝族自治县",
  24537. "value": "530129"
  24538. }, {
  24539. "label": "安宁市",
  24540. "value": "530181"
  24541. }], [{
  24542. "label": "麒麟区",
  24543. "value": "530302"
  24544. }, {
  24545. "label": "沾益区",
  24546. "value": "530303"
  24547. }, {
  24548. "label": "马龙县",
  24549. "value": "530321"
  24550. }, {
  24551. "label": "陆良县",
  24552. "value": "530322"
  24553. }, {
  24554. "label": "师宗县",
  24555. "value": "530323"
  24556. }, {
  24557. "label": "罗平县",
  24558. "value": "530324"
  24559. }, {
  24560. "label": "富源县",
  24561. "value": "530325"
  24562. }, {
  24563. "label": "会泽县",
  24564. "value": "530326"
  24565. }, {
  24566. "label": "宣威市",
  24567. "value": "530381"
  24568. }], [{
  24569. "label": "红塔区",
  24570. "value": "530402"
  24571. }, {
  24572. "label": "江川区",
  24573. "value": "530403"
  24574. }, {
  24575. "label": "澄江县",
  24576. "value": "530422"
  24577. }, {
  24578. "label": "通海县",
  24579. "value": "530423"
  24580. }, {
  24581. "label": "华宁县",
  24582. "value": "530424"
  24583. }, {
  24584. "label": "易门县",
  24585. "value": "530425"
  24586. }, {
  24587. "label": "峨山彝族自治县",
  24588. "value": "530426"
  24589. }, {
  24590. "label": "新平彝族傣族自治县",
  24591. "value": "530427"
  24592. }, {
  24593. "label": "元江哈尼族彝族傣族自治县",
  24594. "value": "530428"
  24595. }], [{
  24596. "label": "隆阳区",
  24597. "value": "530502"
  24598. }, {
  24599. "label": "施甸县",
  24600. "value": "530521"
  24601. }, {
  24602. "label": "龙陵县",
  24603. "value": "530523"
  24604. }, {
  24605. "label": "昌宁县",
  24606. "value": "530524"
  24607. }, {
  24608. "label": "腾冲市",
  24609. "value": "530581"
  24610. }], [{
  24611. "label": "昭阳区",
  24612. "value": "530602"
  24613. }, {
  24614. "label": "鲁甸县",
  24615. "value": "530621"
  24616. }, {
  24617. "label": "巧家县",
  24618. "value": "530622"
  24619. }, {
  24620. "label": "盐津县",
  24621. "value": "530623"
  24622. }, {
  24623. "label": "大关县",
  24624. "value": "530624"
  24625. }, {
  24626. "label": "永善县",
  24627. "value": "530625"
  24628. }, {
  24629. "label": "绥江县",
  24630. "value": "530626"
  24631. }, {
  24632. "label": "镇雄县",
  24633. "value": "530627"
  24634. }, {
  24635. "label": "彝良县",
  24636. "value": "530628"
  24637. }, {
  24638. "label": "威信县",
  24639. "value": "530629"
  24640. }, {
  24641. "label": "水富县",
  24642. "value": "530630"
  24643. }], [{
  24644. "label": "古城区",
  24645. "value": "530702"
  24646. }, {
  24647. "label": "玉龙纳西族自治县",
  24648. "value": "530721"
  24649. }, {
  24650. "label": "永胜县",
  24651. "value": "530722"
  24652. }, {
  24653. "label": "华坪县",
  24654. "value": "530723"
  24655. }, {
  24656. "label": "宁蒗彝族自治县",
  24657. "value": "530724"
  24658. }], [{
  24659. "label": "思茅区",
  24660. "value": "530802"
  24661. }, {
  24662. "label": "宁洱哈尼族彝族自治县",
  24663. "value": "530821"
  24664. }, {
  24665. "label": "墨江哈尼族自治县",
  24666. "value": "530822"
  24667. }, {
  24668. "label": "景东彝族自治县",
  24669. "value": "530823"
  24670. }, {
  24671. "label": "景谷傣族彝族自治县",
  24672. "value": "530824"
  24673. }, {
  24674. "label": "镇沅彝族哈尼族拉祜族自治县",
  24675. "value": "530825"
  24676. }, {
  24677. "label": "江城哈尼族彝族自治县",
  24678. "value": "530826"
  24679. }, {
  24680. "label": "孟连傣族拉祜族佤族自治县",
  24681. "value": "530827"
  24682. }, {
  24683. "label": "澜沧拉祜族自治县",
  24684. "value": "530828"
  24685. }, {
  24686. "label": "西盟佤族自治县",
  24687. "value": "530829"
  24688. }], [{
  24689. "label": "临翔区",
  24690. "value": "530902"
  24691. }, {
  24692. "label": "凤庆县",
  24693. "value": "530921"
  24694. }, {
  24695. "label": "云县",
  24696. "value": "530922"
  24697. }, {
  24698. "label": "永德县",
  24699. "value": "530923"
  24700. }, {
  24701. "label": "镇康县",
  24702. "value": "530924"
  24703. }, {
  24704. "label": "双江拉祜族佤族布朗族傣族自治县",
  24705. "value": "530925"
  24706. }, {
  24707. "label": "耿马傣族佤族自治县",
  24708. "value": "530926"
  24709. }, {
  24710. "label": "沧源佤族自治县",
  24711. "value": "530927"
  24712. }], [{
  24713. "label": "楚雄市",
  24714. "value": "532301"
  24715. }, {
  24716. "label": "双柏县",
  24717. "value": "532322"
  24718. }, {
  24719. "label": "牟定县",
  24720. "value": "532323"
  24721. }, {
  24722. "label": "南华县",
  24723. "value": "532324"
  24724. }, {
  24725. "label": "姚安县",
  24726. "value": "532325"
  24727. }, {
  24728. "label": "大姚县",
  24729. "value": "532326"
  24730. }, {
  24731. "label": "永仁县",
  24732. "value": "532327"
  24733. }, {
  24734. "label": "元谋县",
  24735. "value": "532328"
  24736. }, {
  24737. "label": "武定县",
  24738. "value": "532329"
  24739. }, {
  24740. "label": "禄丰县",
  24741. "value": "532331"
  24742. }], [{
  24743. "label": "个旧市",
  24744. "value": "532501"
  24745. }, {
  24746. "label": "开远市",
  24747. "value": "532502"
  24748. }, {
  24749. "label": "蒙自市",
  24750. "value": "532503"
  24751. }, {
  24752. "label": "弥勒市",
  24753. "value": "532504"
  24754. }, {
  24755. "label": "屏边苗族自治县",
  24756. "value": "532523"
  24757. }, {
  24758. "label": "建水县",
  24759. "value": "532524"
  24760. }, {
  24761. "label": "石屏县",
  24762. "value": "532525"
  24763. }, {
  24764. "label": "泸西县",
  24765. "value": "532527"
  24766. }, {
  24767. "label": "元阳县",
  24768. "value": "532528"
  24769. }, {
  24770. "label": "红河县",
  24771. "value": "532529"
  24772. }, {
  24773. "label": "金平苗族瑶族傣族自治县",
  24774. "value": "532530"
  24775. }, {
  24776. "label": "绿春县",
  24777. "value": "532531"
  24778. }, {
  24779. "label": "河口瑶族自治县",
  24780. "value": "532532"
  24781. }], [{
  24782. "label": "文山市",
  24783. "value": "532601"
  24784. }, {
  24785. "label": "砚山县",
  24786. "value": "532622"
  24787. }, {
  24788. "label": "西畴县",
  24789. "value": "532623"
  24790. }, {
  24791. "label": "麻栗坡县",
  24792. "value": "532624"
  24793. }, {
  24794. "label": "马关县",
  24795. "value": "532625"
  24796. }, {
  24797. "label": "丘北县",
  24798. "value": "532626"
  24799. }, {
  24800. "label": "广南县",
  24801. "value": "532627"
  24802. }, {
  24803. "label": "富宁县",
  24804. "value": "532628"
  24805. }], [{
  24806. "label": "景洪市",
  24807. "value": "532801"
  24808. }, {
  24809. "label": "勐海县",
  24810. "value": "532822"
  24811. }, {
  24812. "label": "勐腊县",
  24813. "value": "532823"
  24814. }], [{
  24815. "label": "大理市",
  24816. "value": "532901"
  24817. }, {
  24818. "label": "漾濞彝族自治县",
  24819. "value": "532922"
  24820. }, {
  24821. "label": "祥云县",
  24822. "value": "532923"
  24823. }, {
  24824. "label": "宾川县",
  24825. "value": "532924"
  24826. }, {
  24827. "label": "弥渡县",
  24828. "value": "532925"
  24829. }, {
  24830. "label": "南涧彝族自治县",
  24831. "value": "532926"
  24832. }, {
  24833. "label": "巍山彝族回族自治县",
  24834. "value": "532927"
  24835. }, {
  24836. "label": "永平县",
  24837. "value": "532928"
  24838. }, {
  24839. "label": "云龙县",
  24840. "value": "532929"
  24841. }, {
  24842. "label": "洱源县",
  24843. "value": "532930"
  24844. }, {
  24845. "label": "剑川县",
  24846. "value": "532931"
  24847. }, {
  24848. "label": "鹤庆县",
  24849. "value": "532932"
  24850. }], [{
  24851. "label": "瑞丽市",
  24852. "value": "533102"
  24853. }, {
  24854. "label": "芒市",
  24855. "value": "533103"
  24856. }, {
  24857. "label": "梁河县",
  24858. "value": "533122"
  24859. }, {
  24860. "label": "盈江县",
  24861. "value": "533123"
  24862. }, {
  24863. "label": "陇川县",
  24864. "value": "533124"
  24865. }], [{
  24866. "label": "泸水市",
  24867. "value": "533301"
  24868. }, {
  24869. "label": "福贡县",
  24870. "value": "533323"
  24871. }, {
  24872. "label": "贡山独龙族怒族自治县",
  24873. "value": "533324"
  24874. }, {
  24875. "label": "兰坪白族普米族自治县",
  24876. "value": "533325"
  24877. }], [{
  24878. "label": "香格里拉市",
  24879. "value": "533401"
  24880. }, {
  24881. "label": "德钦县",
  24882. "value": "533422"
  24883. }, {
  24884. "label": "维西傈僳族自治县",
  24885. "value": "533423"
  24886. }]], [[{
  24887. "label": "城关区",
  24888. "value": "540102"
  24889. }, {
  24890. "label": "堆龙德庆区",
  24891. "value": "540103"
  24892. }, {
  24893. "label": "林周县",
  24894. "value": "540121"
  24895. }, {
  24896. "label": "当雄县",
  24897. "value": "540122"
  24898. }, {
  24899. "label": "尼木县",
  24900. "value": "540123"
  24901. }, {
  24902. "label": "曲水县",
  24903. "value": "540124"
  24904. }, {
  24905. "label": "达孜县",
  24906. "value": "540126"
  24907. }, {
  24908. "label": "墨竹工卡县",
  24909. "value": "540127"
  24910. }, {
  24911. "label": "格尔木藏青工业园区",
  24912. "value": "540171"
  24913. }, {
  24914. "label": "拉萨经济技术开发区",
  24915. "value": "540172"
  24916. }, {
  24917. "label": "西藏文化旅游创意园区",
  24918. "value": "540173"
  24919. }, {
  24920. "label": "达孜工业园区",
  24921. "value": "540174"
  24922. }], [{
  24923. "label": "桑珠孜区",
  24924. "value": "540202"
  24925. }, {
  24926. "label": "南木林县",
  24927. "value": "540221"
  24928. }, {
  24929. "label": "江孜县",
  24930. "value": "540222"
  24931. }, {
  24932. "label": "定日县",
  24933. "value": "540223"
  24934. }, {
  24935. "label": "萨迦县",
  24936. "value": "540224"
  24937. }, {
  24938. "label": "拉孜县",
  24939. "value": "540225"
  24940. }, {
  24941. "label": "昂仁县",
  24942. "value": "540226"
  24943. }, {
  24944. "label": "谢通门县",
  24945. "value": "540227"
  24946. }, {
  24947. "label": "白朗县",
  24948. "value": "540228"
  24949. }, {
  24950. "label": "仁布县",
  24951. "value": "540229"
  24952. }, {
  24953. "label": "康马县",
  24954. "value": "540230"
  24955. }, {
  24956. "label": "定结县",
  24957. "value": "540231"
  24958. }, {
  24959. "label": "仲巴县",
  24960. "value": "540232"
  24961. }, {
  24962. "label": "亚东县",
  24963. "value": "540233"
  24964. }, {
  24965. "label": "吉隆县",
  24966. "value": "540234"
  24967. }, {
  24968. "label": "聂拉木县",
  24969. "value": "540235"
  24970. }, {
  24971. "label": "萨嘎县",
  24972. "value": "540236"
  24973. }, {
  24974. "label": "岗巴县",
  24975. "value": "540237"
  24976. }], [{
  24977. "label": "卡若区",
  24978. "value": "540302"
  24979. }, {
  24980. "label": "江达县",
  24981. "value": "540321"
  24982. }, {
  24983. "label": "贡觉县",
  24984. "value": "540322"
  24985. }, {
  24986. "label": "类乌齐县",
  24987. "value": "540323"
  24988. }, {
  24989. "label": "丁青县",
  24990. "value": "540324"
  24991. }, {
  24992. "label": "察雅县",
  24993. "value": "540325"
  24994. }, {
  24995. "label": "八宿县",
  24996. "value": "540326"
  24997. }, {
  24998. "label": "左贡县",
  24999. "value": "540327"
  25000. }, {
  25001. "label": "芒康县",
  25002. "value": "540328"
  25003. }, {
  25004. "label": "洛隆县",
  25005. "value": "540329"
  25006. }, {
  25007. "label": "边坝县",
  25008. "value": "540330"
  25009. }], [{
  25010. "label": "巴宜区",
  25011. "value": "540402"
  25012. }, {
  25013. "label": "工布江达县",
  25014. "value": "540421"
  25015. }, {
  25016. "label": "米林县",
  25017. "value": "540422"
  25018. }, {
  25019. "label": "墨脱县",
  25020. "value": "540423"
  25021. }, {
  25022. "label": "波密县",
  25023. "value": "540424"
  25024. }, {
  25025. "label": "察隅县",
  25026. "value": "540425"
  25027. }, {
  25028. "label": "朗县",
  25029. "value": "540426"
  25030. }], [{
  25031. "label": "乃东区",
  25032. "value": "540502"
  25033. }, {
  25034. "label": "扎囊县",
  25035. "value": "540521"
  25036. }, {
  25037. "label": "贡嘎县",
  25038. "value": "540522"
  25039. }, {
  25040. "label": "桑日县",
  25041. "value": "540523"
  25042. }, {
  25043. "label": "琼结县",
  25044. "value": "540524"
  25045. }, {
  25046. "label": "曲松县",
  25047. "value": "540525"
  25048. }, {
  25049. "label": "措美县",
  25050. "value": "540526"
  25051. }, {
  25052. "label": "洛扎县",
  25053. "value": "540527"
  25054. }, {
  25055. "label": "加查县",
  25056. "value": "540528"
  25057. }, {
  25058. "label": "隆子县",
  25059. "value": "540529"
  25060. }, {
  25061. "label": "错那县",
  25062. "value": "540530"
  25063. }, {
  25064. "label": "浪卡子县",
  25065. "value": "540531"
  25066. }], [{
  25067. "label": "那曲县",
  25068. "value": "542421"
  25069. }, {
  25070. "label": "嘉黎县",
  25071. "value": "542422"
  25072. }, {
  25073. "label": "比如县",
  25074. "value": "542423"
  25075. }, {
  25076. "label": "聂荣县",
  25077. "value": "542424"
  25078. }, {
  25079. "label": "安多县",
  25080. "value": "542425"
  25081. }, {
  25082. "label": "申扎县",
  25083. "value": "542426"
  25084. }, {
  25085. "label": "索县",
  25086. "value": "542427"
  25087. }, {
  25088. "label": "班戈县",
  25089. "value": "542428"
  25090. }, {
  25091. "label": "巴青县",
  25092. "value": "542429"
  25093. }, {
  25094. "label": "尼玛县",
  25095. "value": "542430"
  25096. }, {
  25097. "label": "双湖县",
  25098. "value": "542431"
  25099. }], [{
  25100. "label": "普兰县",
  25101. "value": "542521"
  25102. }, {
  25103. "label": "札达县",
  25104. "value": "542522"
  25105. }, {
  25106. "label": "噶尔县",
  25107. "value": "542523"
  25108. }, {
  25109. "label": "日土县",
  25110. "value": "542524"
  25111. }, {
  25112. "label": "革吉县",
  25113. "value": "542525"
  25114. }, {
  25115. "label": "改则县",
  25116. "value": "542526"
  25117. }, {
  25118. "label": "措勤县",
  25119. "value": "542527"
  25120. }]], [[{
  25121. "label": "新城区",
  25122. "value": "610102"
  25123. }, {
  25124. "label": "碑林区",
  25125. "value": "610103"
  25126. }, {
  25127. "label": "莲湖区",
  25128. "value": "610104"
  25129. }, {
  25130. "label": "灞桥区",
  25131. "value": "610111"
  25132. }, {
  25133. "label": "未央区",
  25134. "value": "610112"
  25135. }, {
  25136. "label": "雁塔区",
  25137. "value": "610113"
  25138. }, {
  25139. "label": "阎良区",
  25140. "value": "610114"
  25141. }, {
  25142. "label": "临潼区",
  25143. "value": "610115"
  25144. }, {
  25145. "label": "长安区",
  25146. "value": "610116"
  25147. }, {
  25148. "label": "高陵区",
  25149. "value": "610117"
  25150. }, {
  25151. "label": "鄠邑区",
  25152. "value": "610118"
  25153. }, {
  25154. "label": "蓝田县",
  25155. "value": "610122"
  25156. }, {
  25157. "label": "周至县",
  25158. "value": "610124"
  25159. }], [{
  25160. "label": "王益区",
  25161. "value": "610202"
  25162. }, {
  25163. "label": "印台区",
  25164. "value": "610203"
  25165. }, {
  25166. "label": "耀州区",
  25167. "value": "610204"
  25168. }, {
  25169. "label": "宜君县",
  25170. "value": "610222"
  25171. }], [{
  25172. "label": "渭滨区",
  25173. "value": "610302"
  25174. }, {
  25175. "label": "金台区",
  25176. "value": "610303"
  25177. }, {
  25178. "label": "陈仓区",
  25179. "value": "610304"
  25180. }, {
  25181. "label": "凤翔县",
  25182. "value": "610322"
  25183. }, {
  25184. "label": "岐山县",
  25185. "value": "610323"
  25186. }, {
  25187. "label": "扶风县",
  25188. "value": "610324"
  25189. }, {
  25190. "label": "眉县",
  25191. "value": "610326"
  25192. }, {
  25193. "label": "陇县",
  25194. "value": "610327"
  25195. }, {
  25196. "label": "千阳县",
  25197. "value": "610328"
  25198. }, {
  25199. "label": "麟游县",
  25200. "value": "610329"
  25201. }, {
  25202. "label": "凤县",
  25203. "value": "610330"
  25204. }, {
  25205. "label": "太白县",
  25206. "value": "610331"
  25207. }], [{
  25208. "label": "秦都区",
  25209. "value": "610402"
  25210. }, {
  25211. "label": "杨陵区",
  25212. "value": "610403"
  25213. }, {
  25214. "label": "渭城区",
  25215. "value": "610404"
  25216. }, {
  25217. "label": "三原县",
  25218. "value": "610422"
  25219. }, {
  25220. "label": "泾阳县",
  25221. "value": "610423"
  25222. }, {
  25223. "label": "乾县",
  25224. "value": "610424"
  25225. }, {
  25226. "label": "礼泉县",
  25227. "value": "610425"
  25228. }, {
  25229. "label": "永寿县",
  25230. "value": "610426"
  25231. }, {
  25232. "label": "彬县",
  25233. "value": "610427"
  25234. }, {
  25235. "label": "长武县",
  25236. "value": "610428"
  25237. }, {
  25238. "label": "旬邑县",
  25239. "value": "610429"
  25240. }, {
  25241. "label": "淳化县",
  25242. "value": "610430"
  25243. }, {
  25244. "label": "武功县",
  25245. "value": "610431"
  25246. }, {
  25247. "label": "兴平市",
  25248. "value": "610481"
  25249. }], [{
  25250. "label": "临渭区",
  25251. "value": "610502"
  25252. }, {
  25253. "label": "华州区",
  25254. "value": "610503"
  25255. }, {
  25256. "label": "潼关县",
  25257. "value": "610522"
  25258. }, {
  25259. "label": "大荔县",
  25260. "value": "610523"
  25261. }, {
  25262. "label": "合阳县",
  25263. "value": "610524"
  25264. }, {
  25265. "label": "澄城县",
  25266. "value": "610525"
  25267. }, {
  25268. "label": "蒲城县",
  25269. "value": "610526"
  25270. }, {
  25271. "label": "白水县",
  25272. "value": "610527"
  25273. }, {
  25274. "label": "富平县",
  25275. "value": "610528"
  25276. }, {
  25277. "label": "韩城市",
  25278. "value": "610581"
  25279. }, {
  25280. "label": "华阴市",
  25281. "value": "610582"
  25282. }], [{
  25283. "label": "宝塔区",
  25284. "value": "610602"
  25285. }, {
  25286. "label": "安塞区",
  25287. "value": "610603"
  25288. }, {
  25289. "label": "延长县",
  25290. "value": "610621"
  25291. }, {
  25292. "label": "延川县",
  25293. "value": "610622"
  25294. }, {
  25295. "label": "子长县",
  25296. "value": "610623"
  25297. }, {
  25298. "label": "志丹县",
  25299. "value": "610625"
  25300. }, {
  25301. "label": "吴起县",
  25302. "value": "610626"
  25303. }, {
  25304. "label": "甘泉县",
  25305. "value": "610627"
  25306. }, {
  25307. "label": "富县",
  25308. "value": "610628"
  25309. }, {
  25310. "label": "洛川县",
  25311. "value": "610629"
  25312. }, {
  25313. "label": "宜川县",
  25314. "value": "610630"
  25315. }, {
  25316. "label": "黄龙县",
  25317. "value": "610631"
  25318. }, {
  25319. "label": "黄陵县",
  25320. "value": "610632"
  25321. }], [{
  25322. "label": "汉台区",
  25323. "value": "610702"
  25324. }, {
  25325. "label": "南郑区",
  25326. "value": "610703"
  25327. }, {
  25328. "label": "城固县",
  25329. "value": "610722"
  25330. }, {
  25331. "label": "洋县",
  25332. "value": "610723"
  25333. }, {
  25334. "label": "西乡县",
  25335. "value": "610724"
  25336. }, {
  25337. "label": "勉县",
  25338. "value": "610725"
  25339. }, {
  25340. "label": "宁强县",
  25341. "value": "610726"
  25342. }, {
  25343. "label": "略阳县",
  25344. "value": "610727"
  25345. }, {
  25346. "label": "镇巴县",
  25347. "value": "610728"
  25348. }, {
  25349. "label": "留坝县",
  25350. "value": "610729"
  25351. }, {
  25352. "label": "佛坪县",
  25353. "value": "610730"
  25354. }], [{
  25355. "label": "榆阳区",
  25356. "value": "610802"
  25357. }, {
  25358. "label": "横山区",
  25359. "value": "610803"
  25360. }, {
  25361. "label": "府谷县",
  25362. "value": "610822"
  25363. }, {
  25364. "label": "靖边县",
  25365. "value": "610824"
  25366. }, {
  25367. "label": "定边县",
  25368. "value": "610825"
  25369. }, {
  25370. "label": "绥德县",
  25371. "value": "610826"
  25372. }, {
  25373. "label": "米脂县",
  25374. "value": "610827"
  25375. }, {
  25376. "label": "佳县",
  25377. "value": "610828"
  25378. }, {
  25379. "label": "吴堡县",
  25380. "value": "610829"
  25381. }, {
  25382. "label": "清涧县",
  25383. "value": "610830"
  25384. }, {
  25385. "label": "子洲县",
  25386. "value": "610831"
  25387. }, {
  25388. "label": "神木市",
  25389. "value": "610881"
  25390. }], [{
  25391. "label": "汉滨区",
  25392. "value": "610902"
  25393. }, {
  25394. "label": "汉阴县",
  25395. "value": "610921"
  25396. }, {
  25397. "label": "石泉县",
  25398. "value": "610922"
  25399. }, {
  25400. "label": "宁陕县",
  25401. "value": "610923"
  25402. }, {
  25403. "label": "紫阳县",
  25404. "value": "610924"
  25405. }, {
  25406. "label": "岚皋县",
  25407. "value": "610925"
  25408. }, {
  25409. "label": "平利县",
  25410. "value": "610926"
  25411. }, {
  25412. "label": "镇坪县",
  25413. "value": "610927"
  25414. }, {
  25415. "label": "旬阳县",
  25416. "value": "610928"
  25417. }, {
  25418. "label": "白河县",
  25419. "value": "610929"
  25420. }], [{
  25421. "label": "商州区",
  25422. "value": "611002"
  25423. }, {
  25424. "label": "洛南县",
  25425. "value": "611021"
  25426. }, {
  25427. "label": "丹凤县",
  25428. "value": "611022"
  25429. }, {
  25430. "label": "商南县",
  25431. "value": "611023"
  25432. }, {
  25433. "label": "山阳县",
  25434. "value": "611024"
  25435. }, {
  25436. "label": "镇安县",
  25437. "value": "611025"
  25438. }, {
  25439. "label": "柞水县",
  25440. "value": "611026"
  25441. }]], [[{
  25442. "label": "城关区",
  25443. "value": "620102"
  25444. }, {
  25445. "label": "七里河区",
  25446. "value": "620103"
  25447. }, {
  25448. "label": "西固区",
  25449. "value": "620104"
  25450. }, {
  25451. "label": "安宁区",
  25452. "value": "620105"
  25453. }, {
  25454. "label": "红古区",
  25455. "value": "620111"
  25456. }, {
  25457. "label": "永登县",
  25458. "value": "620121"
  25459. }, {
  25460. "label": "皋兰县",
  25461. "value": "620122"
  25462. }, {
  25463. "label": "榆中县",
  25464. "value": "620123"
  25465. }, {
  25466. "label": "兰州新区",
  25467. "value": "620171"
  25468. }], [{
  25469. "label": "嘉峪关市",
  25470. "value": "620201"
  25471. }], [{
  25472. "label": "金川区",
  25473. "value": "620302"
  25474. }, {
  25475. "label": "永昌县",
  25476. "value": "620321"
  25477. }], [{
  25478. "label": "白银区",
  25479. "value": "620402"
  25480. }, {
  25481. "label": "平川区",
  25482. "value": "620403"
  25483. }, {
  25484. "label": "靖远县",
  25485. "value": "620421"
  25486. }, {
  25487. "label": "会宁县",
  25488. "value": "620422"
  25489. }, {
  25490. "label": "景泰县",
  25491. "value": "620423"
  25492. }], [{
  25493. "label": "秦州区",
  25494. "value": "620502"
  25495. }, {
  25496. "label": "麦积区",
  25497. "value": "620503"
  25498. }, {
  25499. "label": "清水县",
  25500. "value": "620521"
  25501. }, {
  25502. "label": "秦安县",
  25503. "value": "620522"
  25504. }, {
  25505. "label": "甘谷县",
  25506. "value": "620523"
  25507. }, {
  25508. "label": "武山县",
  25509. "value": "620524"
  25510. }, {
  25511. "label": "张家川回族自治县",
  25512. "value": "620525"
  25513. }], [{
  25514. "label": "凉州区",
  25515. "value": "620602"
  25516. }, {
  25517. "label": "民勤县",
  25518. "value": "620621"
  25519. }, {
  25520. "label": "古浪县",
  25521. "value": "620622"
  25522. }, {
  25523. "label": "天祝藏族自治县",
  25524. "value": "620623"
  25525. }], [{
  25526. "label": "甘州区",
  25527. "value": "620702"
  25528. }, {
  25529. "label": "肃南裕固族自治县",
  25530. "value": "620721"
  25531. }, {
  25532. "label": "民乐县",
  25533. "value": "620722"
  25534. }, {
  25535. "label": "临泽县",
  25536. "value": "620723"
  25537. }, {
  25538. "label": "高台县",
  25539. "value": "620724"
  25540. }, {
  25541. "label": "山丹县",
  25542. "value": "620725"
  25543. }], [{
  25544. "label": "崆峒区",
  25545. "value": "620802"
  25546. }, {
  25547. "label": "泾川县",
  25548. "value": "620821"
  25549. }, {
  25550. "label": "灵台县",
  25551. "value": "620822"
  25552. }, {
  25553. "label": "崇信县",
  25554. "value": "620823"
  25555. }, {
  25556. "label": "华亭县",
  25557. "value": "620824"
  25558. }, {
  25559. "label": "庄浪县",
  25560. "value": "620825"
  25561. }, {
  25562. "label": "静宁县",
  25563. "value": "620826"
  25564. }, {
  25565. "label": "平凉工业园区",
  25566. "value": "620871"
  25567. }], [{
  25568. "label": "肃州区",
  25569. "value": "620902"
  25570. }, {
  25571. "label": "金塔县",
  25572. "value": "620921"
  25573. }, {
  25574. "label": "瓜州县",
  25575. "value": "620922"
  25576. }, {
  25577. "label": "肃北蒙古族自治县",
  25578. "value": "620923"
  25579. }, {
  25580. "label": "阿克塞哈萨克族自治县",
  25581. "value": "620924"
  25582. }, {
  25583. "label": "玉门市",
  25584. "value": "620981"
  25585. }, {
  25586. "label": "敦煌市",
  25587. "value": "620982"
  25588. }], [{
  25589. "label": "西峰区",
  25590. "value": "621002"
  25591. }, {
  25592. "label": "庆城县",
  25593. "value": "621021"
  25594. }, {
  25595. "label": "环县",
  25596. "value": "621022"
  25597. }, {
  25598. "label": "华池县",
  25599. "value": "621023"
  25600. }, {
  25601. "label": "合水县",
  25602. "value": "621024"
  25603. }, {
  25604. "label": "正宁县",
  25605. "value": "621025"
  25606. }, {
  25607. "label": "宁县",
  25608. "value": "621026"
  25609. }, {
  25610. "label": "镇原县",
  25611. "value": "621027"
  25612. }], [{
  25613. "label": "安定区",
  25614. "value": "621102"
  25615. }, {
  25616. "label": "通渭县",
  25617. "value": "621121"
  25618. }, {
  25619. "label": "陇西县",
  25620. "value": "621122"
  25621. }, {
  25622. "label": "渭源县",
  25623. "value": "621123"
  25624. }, {
  25625. "label": "临洮县",
  25626. "value": "621124"
  25627. }, {
  25628. "label": "漳县",
  25629. "value": "621125"
  25630. }, {
  25631. "label": "岷县",
  25632. "value": "621126"
  25633. }], [{
  25634. "label": "武都区",
  25635. "value": "621202"
  25636. }, {
  25637. "label": "成县",
  25638. "value": "621221"
  25639. }, {
  25640. "label": "文县",
  25641. "value": "621222"
  25642. }, {
  25643. "label": "宕昌县",
  25644. "value": "621223"
  25645. }, {
  25646. "label": "康县",
  25647. "value": "621224"
  25648. }, {
  25649. "label": "西和县",
  25650. "value": "621225"
  25651. }, {
  25652. "label": "礼县",
  25653. "value": "621226"
  25654. }, {
  25655. "label": "徽县",
  25656. "value": "621227"
  25657. }, {
  25658. "label": "两当县",
  25659. "value": "621228"
  25660. }], [{
  25661. "label": "临夏市",
  25662. "value": "622901"
  25663. }, {
  25664. "label": "临夏县",
  25665. "value": "622921"
  25666. }, {
  25667. "label": "康乐县",
  25668. "value": "622922"
  25669. }, {
  25670. "label": "永靖县",
  25671. "value": "622923"
  25672. }, {
  25673. "label": "广河县",
  25674. "value": "622924"
  25675. }, {
  25676. "label": "和政县",
  25677. "value": "622925"
  25678. }, {
  25679. "label": "东乡族自治县",
  25680. "value": "622926"
  25681. }, {
  25682. "label": "积石山保安族东乡族撒拉族自治县",
  25683. "value": "622927"
  25684. }], [{
  25685. "label": "合作市",
  25686. "value": "623001"
  25687. }, {
  25688. "label": "临潭县",
  25689. "value": "623021"
  25690. }, {
  25691. "label": "卓尼县",
  25692. "value": "623022"
  25693. }, {
  25694. "label": "舟曲县",
  25695. "value": "623023"
  25696. }, {
  25697. "label": "迭部县",
  25698. "value": "623024"
  25699. }, {
  25700. "label": "玛曲县",
  25701. "value": "623025"
  25702. }, {
  25703. "label": "碌曲县",
  25704. "value": "623026"
  25705. }, {
  25706. "label": "夏河县",
  25707. "value": "623027"
  25708. }]], [[{
  25709. "label": "城东区",
  25710. "value": "630102"
  25711. }, {
  25712. "label": "城中区",
  25713. "value": "630103"
  25714. }, {
  25715. "label": "城西区",
  25716. "value": "630104"
  25717. }, {
  25718. "label": "城北区",
  25719. "value": "630105"
  25720. }, {
  25721. "label": "大通回族土族自治县",
  25722. "value": "630121"
  25723. }, {
  25724. "label": "湟中县",
  25725. "value": "630122"
  25726. }, {
  25727. "label": "湟源县",
  25728. "value": "630123"
  25729. }], [{
  25730. "label": "乐都区",
  25731. "value": "630202"
  25732. }, {
  25733. "label": "平安区",
  25734. "value": "630203"
  25735. }, {
  25736. "label": "民和回族土族自治县",
  25737. "value": "630222"
  25738. }, {
  25739. "label": "互助土族自治县",
  25740. "value": "630223"
  25741. }, {
  25742. "label": "化隆回族自治县",
  25743. "value": "630224"
  25744. }, {
  25745. "label": "循化撒拉族自治县",
  25746. "value": "630225"
  25747. }], [{
  25748. "label": "门源回族自治县",
  25749. "value": "632221"
  25750. }, {
  25751. "label": "祁连县",
  25752. "value": "632222"
  25753. }, {
  25754. "label": "海晏县",
  25755. "value": "632223"
  25756. }, {
  25757. "label": "刚察县",
  25758. "value": "632224"
  25759. }], [{
  25760. "label": "同仁县",
  25761. "value": "632321"
  25762. }, {
  25763. "label": "尖扎县",
  25764. "value": "632322"
  25765. }, {
  25766. "label": "泽库县",
  25767. "value": "632323"
  25768. }, {
  25769. "label": "河南蒙古族自治县",
  25770. "value": "632324"
  25771. }], [{
  25772. "label": "共和县",
  25773. "value": "632521"
  25774. }, {
  25775. "label": "同德县",
  25776. "value": "632522"
  25777. }, {
  25778. "label": "贵德县",
  25779. "value": "632523"
  25780. }, {
  25781. "label": "兴海县",
  25782. "value": "632524"
  25783. }, {
  25784. "label": "贵南县",
  25785. "value": "632525"
  25786. }], [{
  25787. "label": "玛沁县",
  25788. "value": "632621"
  25789. }, {
  25790. "label": "班玛县",
  25791. "value": "632622"
  25792. }, {
  25793. "label": "甘德县",
  25794. "value": "632623"
  25795. }, {
  25796. "label": "达日县",
  25797. "value": "632624"
  25798. }, {
  25799. "label": "久治县",
  25800. "value": "632625"
  25801. }, {
  25802. "label": "玛多县",
  25803. "value": "632626"
  25804. }], [{
  25805. "label": "玉树市",
  25806. "value": "632701"
  25807. }, {
  25808. "label": "杂多县",
  25809. "value": "632722"
  25810. }, {
  25811. "label": "称多县",
  25812. "value": "632723"
  25813. }, {
  25814. "label": "治多县",
  25815. "value": "632724"
  25816. }, {
  25817. "label": "囊谦县",
  25818. "value": "632725"
  25819. }, {
  25820. "label": "曲麻莱县",
  25821. "value": "632726"
  25822. }], [{
  25823. "label": "格尔木市",
  25824. "value": "632801"
  25825. }, {
  25826. "label": "德令哈市",
  25827. "value": "632802"
  25828. }, {
  25829. "label": "乌兰县",
  25830. "value": "632821"
  25831. }, {
  25832. "label": "都兰县",
  25833. "value": "632822"
  25834. }, {
  25835. "label": "天峻县",
  25836. "value": "632823"
  25837. }, {
  25838. "label": "大柴旦行政委员会",
  25839. "value": "632857"
  25840. }, {
  25841. "label": "冷湖行政委员会",
  25842. "value": "632858"
  25843. }, {
  25844. "label": "茫崖行政委员会",
  25845. "value": "632859"
  25846. }]], [[{
  25847. "label": "兴庆区",
  25848. "value": "640104"
  25849. }, {
  25850. "label": "西夏区",
  25851. "value": "640105"
  25852. }, {
  25853. "label": "金凤区",
  25854. "value": "640106"
  25855. }, {
  25856. "label": "永宁县",
  25857. "value": "640121"
  25858. }, {
  25859. "label": "贺兰县",
  25860. "value": "640122"
  25861. }, {
  25862. "label": "灵武市",
  25863. "value": "640181"
  25864. }], [{
  25865. "label": "大武口区",
  25866. "value": "640202"
  25867. }, {
  25868. "label": "惠农区",
  25869. "value": "640205"
  25870. }, {
  25871. "label": "平罗县",
  25872. "value": "640221"
  25873. }], [{
  25874. "label": "利通区",
  25875. "value": "640302"
  25876. }, {
  25877. "label": "红寺堡区",
  25878. "value": "640303"
  25879. }, {
  25880. "label": "盐池县",
  25881. "value": "640323"
  25882. }, {
  25883. "label": "同心县",
  25884. "value": "640324"
  25885. }, {
  25886. "label": "青铜峡市",
  25887. "value": "640381"
  25888. }], [{
  25889. "label": "原州区",
  25890. "value": "640402"
  25891. }, {
  25892. "label": "西吉县",
  25893. "value": "640422"
  25894. }, {
  25895. "label": "隆德县",
  25896. "value": "640423"
  25897. }, {
  25898. "label": "泾源县",
  25899. "value": "640424"
  25900. }, {
  25901. "label": "彭阳县",
  25902. "value": "640425"
  25903. }], [{
  25904. "label": "沙坡头区",
  25905. "value": "640502"
  25906. }, {
  25907. "label": "中宁县",
  25908. "value": "640521"
  25909. }, {
  25910. "label": "海原县",
  25911. "value": "640522"
  25912. }]], [[{
  25913. "label": "天山区",
  25914. "value": "650102"
  25915. }, {
  25916. "label": "沙依巴克区",
  25917. "value": "650103"
  25918. }, {
  25919. "label": "新市区",
  25920. "value": "650104"
  25921. }, {
  25922. "label": "水磨沟区",
  25923. "value": "650105"
  25924. }, {
  25925. "label": "头屯河区",
  25926. "value": "650106"
  25927. }, {
  25928. "label": "达坂城区",
  25929. "value": "650107"
  25930. }, {
  25931. "label": "米东区",
  25932. "value": "650109"
  25933. }, {
  25934. "label": "乌鲁木齐县",
  25935. "value": "650121"
  25936. }, {
  25937. "label": "乌鲁木齐经济技术开发区",
  25938. "value": "650171"
  25939. }, {
  25940. "label": "乌鲁木齐高新技术产业开发区",
  25941. "value": "650172"
  25942. }], [{
  25943. "label": "独山子区",
  25944. "value": "650202"
  25945. }, {
  25946. "label": "克拉玛依区",
  25947. "value": "650203"
  25948. }, {
  25949. "label": "白碱滩区",
  25950. "value": "650204"
  25951. }, {
  25952. "label": "乌尔禾区",
  25953. "value": "650205"
  25954. }], [{
  25955. "label": "高昌区",
  25956. "value": "650402"
  25957. }, {
  25958. "label": "鄯善县",
  25959. "value": "650421"
  25960. }, {
  25961. "label": "托克逊县",
  25962. "value": "650422"
  25963. }], [{
  25964. "label": "伊州区",
  25965. "value": "650502"
  25966. }, {
  25967. "label": "巴里坤哈萨克自治县",
  25968. "value": "650521"
  25969. }, {
  25970. "label": "伊吾县",
  25971. "value": "650522"
  25972. }], [{
  25973. "label": "昌吉市",
  25974. "value": "652301"
  25975. }, {
  25976. "label": "阜康市",
  25977. "value": "652302"
  25978. }, {
  25979. "label": "呼图壁县",
  25980. "value": "652323"
  25981. }, {
  25982. "label": "玛纳斯县",
  25983. "value": "652324"
  25984. }, {
  25985. "label": "奇台县",
  25986. "value": "652325"
  25987. }, {
  25988. "label": "吉木萨尔县",
  25989. "value": "652327"
  25990. }, {
  25991. "label": "木垒哈萨克自治县",
  25992. "value": "652328"
  25993. }], [{
  25994. "label": "博乐市",
  25995. "value": "652701"
  25996. }, {
  25997. "label": "阿拉山口市",
  25998. "value": "652702"
  25999. }, {
  26000. "label": "精河县",
  26001. "value": "652722"
  26002. }, {
  26003. "label": "温泉县",
  26004. "value": "652723"
  26005. }], [{
  26006. "label": "库尔勒市",
  26007. "value": "652801"
  26008. }, {
  26009. "label": "轮台县",
  26010. "value": "652822"
  26011. }, {
  26012. "label": "尉犁县",
  26013. "value": "652823"
  26014. }, {
  26015. "label": "若羌县",
  26016. "value": "652824"
  26017. }, {
  26018. "label": "且末县",
  26019. "value": "652825"
  26020. }, {
  26021. "label": "焉耆回族自治县",
  26022. "value": "652826"
  26023. }, {
  26024. "label": "和静县",
  26025. "value": "652827"
  26026. }, {
  26027. "label": "和硕县",
  26028. "value": "652828"
  26029. }, {
  26030. "label": "博湖县",
  26031. "value": "652829"
  26032. }, {
  26033. "label": "库尔勒经济技术开发区",
  26034. "value": "652871"
  26035. }], [{
  26036. "label": "阿克苏市",
  26037. "value": "652901"
  26038. }, {
  26039. "label": "温宿县",
  26040. "value": "652922"
  26041. }, {
  26042. "label": "库车县",
  26043. "value": "652923"
  26044. }, {
  26045. "label": "沙雅县",
  26046. "value": "652924"
  26047. }, {
  26048. "label": "新和县",
  26049. "value": "652925"
  26050. }, {
  26051. "label": "拜城县",
  26052. "value": "652926"
  26053. }, {
  26054. "label": "乌什县",
  26055. "value": "652927"
  26056. }, {
  26057. "label": "阿瓦提县",
  26058. "value": "652928"
  26059. }, {
  26060. "label": "柯坪县",
  26061. "value": "652929"
  26062. }], [{
  26063. "label": "阿图什市",
  26064. "value": "653001"
  26065. }, {
  26066. "label": "阿克陶县",
  26067. "value": "653022"
  26068. }, {
  26069. "label": "阿合奇县",
  26070. "value": "653023"
  26071. }, {
  26072. "label": "乌恰县",
  26073. "value": "653024"
  26074. }], [{
  26075. "label": "喀什市",
  26076. "value": "653101"
  26077. }, {
  26078. "label": "疏附县",
  26079. "value": "653121"
  26080. }, {
  26081. "label": "疏勒县",
  26082. "value": "653122"
  26083. }, {
  26084. "label": "英吉沙县",
  26085. "value": "653123"
  26086. }, {
  26087. "label": "泽普县",
  26088. "value": "653124"
  26089. }, {
  26090. "label": "莎车县",
  26091. "value": "653125"
  26092. }, {
  26093. "label": "叶城县",
  26094. "value": "653126"
  26095. }, {
  26096. "label": "麦盖提县",
  26097. "value": "653127"
  26098. }, {
  26099. "label": "岳普湖县",
  26100. "value": "653128"
  26101. }, {
  26102. "label": "伽师县",
  26103. "value": "653129"
  26104. }, {
  26105. "label": "巴楚县",
  26106. "value": "653130"
  26107. }, {
  26108. "label": "塔什库尔干塔吉克自治县",
  26109. "value": "653131"
  26110. }], [{
  26111. "label": "和田市",
  26112. "value": "653201"
  26113. }, {
  26114. "label": "和田县",
  26115. "value": "653221"
  26116. }, {
  26117. "label": "墨玉县",
  26118. "value": "653222"
  26119. }, {
  26120. "label": "皮山县",
  26121. "value": "653223"
  26122. }, {
  26123. "label": "洛浦县",
  26124. "value": "653224"
  26125. }, {
  26126. "label": "策勒县",
  26127. "value": "653225"
  26128. }, {
  26129. "label": "于田县",
  26130. "value": "653226"
  26131. }, {
  26132. "label": "民丰县",
  26133. "value": "653227"
  26134. }], [{
  26135. "label": "伊宁市",
  26136. "value": "654002"
  26137. }, {
  26138. "label": "奎屯市",
  26139. "value": "654003"
  26140. }, {
  26141. "label": "霍尔果斯市",
  26142. "value": "654004"
  26143. }, {
  26144. "label": "伊宁县",
  26145. "value": "654021"
  26146. }, {
  26147. "label": "察布查尔锡伯自治县",
  26148. "value": "654022"
  26149. }, {
  26150. "label": "霍城县",
  26151. "value": "654023"
  26152. }, {
  26153. "label": "巩留县",
  26154. "value": "654024"
  26155. }, {
  26156. "label": "新源县",
  26157. "value": "654025"
  26158. }, {
  26159. "label": "昭苏县",
  26160. "value": "654026"
  26161. }, {
  26162. "label": "特克斯县",
  26163. "value": "654027"
  26164. }, {
  26165. "label": "尼勒克县",
  26166. "value": "654028"
  26167. }], [{
  26168. "label": "塔城市",
  26169. "value": "654201"
  26170. }, {
  26171. "label": "乌苏市",
  26172. "value": "654202"
  26173. }, {
  26174. "label": "额敏县",
  26175. "value": "654221"
  26176. }, {
  26177. "label": "沙湾县",
  26178. "value": "654223"
  26179. }, {
  26180. "label": "托里县",
  26181. "value": "654224"
  26182. }, {
  26183. "label": "裕民县",
  26184. "value": "654225"
  26185. }, {
  26186. "label": "和布克赛尔蒙古自治县",
  26187. "value": "654226"
  26188. }], [{
  26189. "label": "阿勒泰市",
  26190. "value": "654301"
  26191. }, {
  26192. "label": "布尔津县",
  26193. "value": "654321"
  26194. }, {
  26195. "label": "富蕴县",
  26196. "value": "654322"
  26197. }, {
  26198. "label": "福海县",
  26199. "value": "654323"
  26200. }, {
  26201. "label": "哈巴河县",
  26202. "value": "654324"
  26203. }, {
  26204. "label": "青河县",
  26205. "value": "654325"
  26206. }, {
  26207. "label": "吉木乃县",
  26208. "value": "654326"
  26209. }], [{
  26210. "label": "石河子市",
  26211. "value": "659001"
  26212. }, {
  26213. "label": "阿拉尔市",
  26214. "value": "659002"
  26215. }, {
  26216. "label": "图木舒克市",
  26217. "value": "659003"
  26218. }, {
  26219. "label": "五家渠市",
  26220. "value": "659004"
  26221. }, {
  26222. "label": "铁门关市",
  26223. "value": "659006"
  26224. }]], [[{
  26225. "label": "台北",
  26226. "value": "660101"
  26227. }], [{
  26228. "label": "高雄",
  26229. "value": "660201"
  26230. }], [{
  26231. "label": "基隆",
  26232. "value": "660301"
  26233. }], [{
  26234. "label": "台中",
  26235. "value": "660401"
  26236. }], [{
  26237. "label": "台南",
  26238. "value": "660501"
  26239. }], [{
  26240. "label": "新竹",
  26241. "value": "660601"
  26242. }], [{
  26243. "label": "嘉义",
  26244. "value": "660701"
  26245. }], [{
  26246. "label": "宜兰",
  26247. "value": "660801"
  26248. }], [{
  26249. "label": "桃园",
  26250. "value": "660901"
  26251. }], [{
  26252. "label": "苗栗",
  26253. "value": "661001"
  26254. }], [{
  26255. "label": "彰化",
  26256. "value": "661101"
  26257. }], [{
  26258. "label": "南投",
  26259. "value": "661201"
  26260. }], [{
  26261. "label": "云林",
  26262. "value": "661301"
  26263. }], [{
  26264. "label": "屏东",
  26265. "value": "661401"
  26266. }], [{
  26267. "label": "台东",
  26268. "value": "661501"
  26269. }], [{
  26270. "label": "花莲",
  26271. "value": "661601"
  26272. }], [{
  26273. "label": "澎湖",
  26274. "value": "661701"
  26275. }]], [[{
  26276. "label": "香港岛",
  26277. "value": "670101"
  26278. }], [{
  26279. "label": "九龙",
  26280. "value": "670201"
  26281. }], [{
  26282. "label": "新界",
  26283. "value": "670301"
  26284. }]], [[{
  26285. "label": "澳门半岛",
  26286. "value": "680101"
  26287. }], [{
  26288. "label": "氹仔岛",
  26289. "value": "680201"
  26290. }], [{
  26291. "label": "路环岛",
  26292. "value": "680301"
  26293. }], [{
  26294. "label": "路氹城",
  26295. "value": "680401"
  26296. }]]];
  26297. var _default = areaData;
  26298. exports.default = _default;
  26299. /***/ }),
  26300. /***/ 48:
  26301. /*!************************************************************************!*\
  26302. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/queryParams.js ***!
  26303. \************************************************************************/
  26304. /*! no static exports found */
  26305. /***/ (function(module, exports, __webpack_require__) {
  26306. "use strict";
  26307. Object.defineProperty(exports, "__esModule", {
  26308. value: true
  26309. });
  26310. exports.default = void 0;
  26311. /**
  26312. * 对象转url参数
  26313. * @param {*} data,对象
  26314. * @param {*} isPrefix,是否自动加上"?"
  26315. */
  26316. function queryParams() {
  26317. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  26318. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  26319. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  26320. var prefix = isPrefix ? '?' : '';
  26321. var _result = [];
  26322. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  26323. var _loop = function _loop(key) {
  26324. var value = data[key];
  26325. // 去掉为空的参数
  26326. if (['', undefined, null].indexOf(value) >= 0) {
  26327. return "continue";
  26328. }
  26329. // 如果值为数组,另行处理
  26330. if (value.constructor === Array) {
  26331. // e.g. {ids: [1, 2, 3]}
  26332. switch (arrayFormat) {
  26333. case 'indices':
  26334. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  26335. for (var i = 0; i < value.length; i++) {
  26336. _result.push(key + '[' + i + ']=' + value[i]);
  26337. }
  26338. break;
  26339. case 'brackets':
  26340. // 结果: ids[]=1&ids[]=2&ids[]=3
  26341. value.forEach(function (_value) {
  26342. _result.push(key + '[]=' + _value);
  26343. });
  26344. break;
  26345. case 'repeat':
  26346. // 结果: ids=1&ids=2&ids=3
  26347. value.forEach(function (_value) {
  26348. _result.push(key + '=' + _value);
  26349. });
  26350. break;
  26351. case 'comma':
  26352. // 结果: ids=1,2,3
  26353. var commaStr = "";
  26354. value.forEach(function (_value) {
  26355. commaStr += (commaStr ? "," : "") + _value;
  26356. });
  26357. _result.push(key + '=' + commaStr);
  26358. break;
  26359. default:
  26360. value.forEach(function (_value) {
  26361. _result.push(key + '[]=' + _value);
  26362. });
  26363. }
  26364. } else {
  26365. _result.push(key + '=' + value);
  26366. }
  26367. };
  26368. for (var key in data) {
  26369. var _ret = _loop(key);
  26370. if (_ret === "continue") continue;
  26371. }
  26372. return _result.length ? prefix + _result.join('&') : '';
  26373. }
  26374. var _default = queryParams;
  26375. exports.default = _default;
  26376. /***/ }),
  26377. /***/ 49:
  26378. /*!******************************************************************!*\
  26379. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/route.js ***!
  26380. \******************************************************************/
  26381. /*! no static exports found */
  26382. /***/ (function(module, exports, __webpack_require__) {
  26383. "use strict";
  26384. /* WEBPACK VAR INJECTION */(function(uni) {
  26385. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  26386. Object.defineProperty(exports, "__esModule", {
  26387. value: true
  26388. });
  26389. exports.default = void 0;
  26390. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  26391. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  26392. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  26393. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  26394. /**
  26395. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  26396. * 并且带有路由拦截功能
  26397. */
  26398. var Router = /*#__PURE__*/function () {
  26399. function Router() {
  26400. (0, _classCallCheck2.default)(this, Router);
  26401. // 原始属性定义
  26402. this.config = {
  26403. type: 'navigateTo',
  26404. url: '',
  26405. delta: 1,
  26406. // navigateBack页面后退时,回退的层数
  26407. params: {},
  26408. // 传递的参数
  26409. animationType: 'pop-in',
  26410. // 窗口动画,只在APP有效
  26411. animationDuration: 300,
  26412. // 窗口动画持续时间,单位毫秒,只在APP有效
  26413. intercept: false // 是否需要拦截
  26414. };
  26415. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  26416. // 这里在构造函数中进行this绑定
  26417. this.route = this.route.bind(this);
  26418. }
  26419. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  26420. (0, _createClass2.default)(Router, [{
  26421. key: "addRootPath",
  26422. value: function addRootPath(url) {
  26423. return url[0] === '/' ? url : "/".concat(url);
  26424. }
  26425. // 整合路由参数
  26426. }, {
  26427. key: "mixinParam",
  26428. value: function mixinParam(url, params) {
  26429. url = url && this.addRootPath(url);
  26430. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  26431. // 如果有url中有get参数,转换后无需带上"?"
  26432. var query = '';
  26433. if (/.*\/.*\?.*=.*/.test(url)) {
  26434. // object对象转为get类型的参数
  26435. query = uni.$u.queryParams(params, false);
  26436. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  26437. return url += "&" + query;
  26438. } else {
  26439. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  26440. query = uni.$u.queryParams(params);
  26441. return url += query;
  26442. }
  26443. }
  26444. // 对外的方法名称
  26445. }, {
  26446. key: "route",
  26447. value: function () {
  26448. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  26449. var options,
  26450. params,
  26451. mergeConfig,
  26452. isNext,
  26453. _args = arguments;
  26454. return _regenerator.default.wrap(function _callee$(_context) {
  26455. while (1) {
  26456. switch (_context.prev = _context.next) {
  26457. case 0:
  26458. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  26459. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  26460. // 合并用户的配置和内部的默认配置
  26461. mergeConfig = {};
  26462. if (typeof options === 'string') {
  26463. // 如果options为字符串,则为route(url, params)的形式
  26464. mergeConfig.url = this.mixinParam(options, params);
  26465. mergeConfig.type = 'navigateTo';
  26466. } else {
  26467. mergeConfig = uni.$u.deepClone(options, this.config);
  26468. // 否则正常使用mergeConfig中的url和params进行拼接
  26469. mergeConfig.url = this.mixinParam(options.url, options.params);
  26470. }
  26471. if (params.intercept) {
  26472. this.config.intercept = params.intercept;
  26473. }
  26474. // params参数也带给拦截器
  26475. mergeConfig.params = params;
  26476. // 合并内外部参数
  26477. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  26478. // 判断用户是否定义了拦截器
  26479. if (!(typeof uni.$u.routeIntercept === 'function')) {
  26480. _context.next = 14;
  26481. break;
  26482. }
  26483. _context.next = 10;
  26484. return new Promise(function (resolve, reject) {
  26485. uni.$u.routeIntercept(mergeConfig, resolve);
  26486. });
  26487. case 10:
  26488. isNext = _context.sent;
  26489. // 如果isNext为true,则执行路由跳转
  26490. isNext && this.openPage(mergeConfig);
  26491. _context.next = 15;
  26492. break;
  26493. case 14:
  26494. this.openPage(mergeConfig);
  26495. case 15:
  26496. case "end":
  26497. return _context.stop();
  26498. }
  26499. }
  26500. }, _callee, this);
  26501. }));
  26502. function route() {
  26503. return _route.apply(this, arguments);
  26504. }
  26505. return route;
  26506. }() // 执行路由跳转
  26507. }, {
  26508. key: "openPage",
  26509. value: function openPage(config) {
  26510. // 解构参数
  26511. var url = config.url,
  26512. type = config.type,
  26513. delta = config.delta,
  26514. animationType = config.animationType,
  26515. animationDuration = config.animationDuration;
  26516. if (config.type == 'navigateTo' || config.type == 'to') {
  26517. uni.navigateTo({
  26518. url: url,
  26519. animationType: animationType,
  26520. animationDuration: animationDuration
  26521. });
  26522. }
  26523. if (config.type == 'redirectTo' || config.type == 'redirect') {
  26524. uni.redirectTo({
  26525. url: url
  26526. });
  26527. }
  26528. if (config.type == 'switchTab' || config.type == 'tab') {
  26529. uni.switchTab({
  26530. url: url
  26531. });
  26532. }
  26533. if (config.type == 'reLaunch' || config.type == 'launch') {
  26534. uni.reLaunch({
  26535. url: url
  26536. });
  26537. }
  26538. if (config.type == 'navigateBack' || config.type == 'back') {
  26539. uni.navigateBack({
  26540. delta: delta
  26541. });
  26542. }
  26543. }
  26544. }]);
  26545. return Router;
  26546. }();
  26547. var _default = new Router().route;
  26548. exports.default = _default;
  26549. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  26550. /***/ }),
  26551. /***/ 494:
  26552. /*!************************************************************************************!*\
  26553. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  26554. \************************************************************************************/
  26555. /*! no static exports found */
  26556. /***/ (function(module, exports, __webpack_require__) {
  26557. "use strict";
  26558. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  26559. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  26560. Object.defineProperty(exports, "__esModule", {
  26561. value: true
  26562. });
  26563. exports.default = void 0;
  26564. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  26565. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 495));
  26566. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  26567. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  26568. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  26569. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  26570. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  26571. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 496));
  26572. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 497));
  26573. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 498));
  26574. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 499));
  26575. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  26576. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  26577. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  26578. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 501));
  26579. 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; } } }; }
  26580. 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); }
  26581. 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; }
  26582. 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; }
  26583. 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; }
  26584. 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); }; }
  26585. 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; } }
  26586. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  26587. function n(e) {
  26588. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  26589. }
  26590. function s(e, t, n) {
  26591. return e(n = {
  26592. path: t,
  26593. exports: {},
  26594. require: function require(e, t) {
  26595. return function () {
  26596. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  26597. }(null == t && n.path);
  26598. }
  26599. }, n.exports), n.exports;
  26600. }
  26601. var r = s(function (e, t) {
  26602. var n;
  26603. e.exports = (n = n || function (e, t) {
  26604. var n = Object.create || function () {
  26605. function e() {}
  26606. return function (t) {
  26607. var n;
  26608. return e.prototype = t, n = new e(), e.prototype = null, n;
  26609. };
  26610. }(),
  26611. s = {},
  26612. r = s.lib = {},
  26613. i = r.Base = {
  26614. extend: function extend(e) {
  26615. var t = n(this);
  26616. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  26617. t.$super.init.apply(this, arguments);
  26618. }), t.init.prototype = t, t.$super = this, t;
  26619. },
  26620. create: function create() {
  26621. var e = this.extend();
  26622. return e.init.apply(e, arguments), e;
  26623. },
  26624. init: function init() {},
  26625. mixIn: function mixIn(e) {
  26626. for (var t in e) {
  26627. e.hasOwnProperty(t) && (this[t] = e[t]);
  26628. }
  26629. e.hasOwnProperty("toString") && (this.toString = e.toString);
  26630. },
  26631. clone: function clone() {
  26632. return this.init.prototype.extend(this);
  26633. }
  26634. },
  26635. o = r.WordArray = i.extend({
  26636. init: function init(e, n) {
  26637. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  26638. },
  26639. toString: function toString(e) {
  26640. return (e || c).stringify(this);
  26641. },
  26642. concat: function concat(e) {
  26643. var t = this.words,
  26644. n = e.words,
  26645. s = this.sigBytes,
  26646. r = e.sigBytes;
  26647. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  26648. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  26649. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  26650. } else for (i = 0; i < r; i += 4) {
  26651. t[s + i >>> 2] = n[i >>> 2];
  26652. }
  26653. return this.sigBytes += r, this;
  26654. },
  26655. clamp: function clamp() {
  26656. var t = this.words,
  26657. n = this.sigBytes;
  26658. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  26659. },
  26660. clone: function clone() {
  26661. var e = i.clone.call(this);
  26662. return e.words = this.words.slice(0), e;
  26663. },
  26664. random: function random(t) {
  26665. for (var n, s = [], r = function r(t) {
  26666. t = t;
  26667. var n = 987654321,
  26668. s = 4294967295;
  26669. return function () {
  26670. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  26671. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  26672. };
  26673. }, i = 0; i < t; i += 4) {
  26674. var a = r(4294967296 * (n || e.random()));
  26675. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  26676. }
  26677. return new o.init(s, t);
  26678. }
  26679. }),
  26680. a = s.enc = {},
  26681. c = a.Hex = {
  26682. stringify: function stringify(e) {
  26683. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  26684. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  26685. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  26686. }
  26687. return s.join("");
  26688. },
  26689. parse: function parse(e) {
  26690. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  26691. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  26692. }
  26693. return new o.init(n, t / 2);
  26694. }
  26695. },
  26696. u = a.Latin1 = {
  26697. stringify: function stringify(e) {
  26698. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  26699. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  26700. s.push(String.fromCharCode(i));
  26701. }
  26702. return s.join("");
  26703. },
  26704. parse: function parse(e) {
  26705. for (var t = e.length, n = [], s = 0; s < t; s++) {
  26706. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  26707. }
  26708. return new o.init(n, t);
  26709. }
  26710. },
  26711. h = a.Utf8 = {
  26712. stringify: function stringify(e) {
  26713. try {
  26714. return decodeURIComponent(escape(u.stringify(e)));
  26715. } catch (e) {
  26716. throw new Error("Malformed UTF-8 data");
  26717. }
  26718. },
  26719. parse: function parse(e) {
  26720. return u.parse(unescape(encodeURIComponent(e)));
  26721. }
  26722. },
  26723. l = r.BufferedBlockAlgorithm = i.extend({
  26724. reset: function reset() {
  26725. this._data = new o.init(), this._nDataBytes = 0;
  26726. },
  26727. _append: function _append(e) {
  26728. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  26729. },
  26730. _process: function _process(t) {
  26731. var n = this._data,
  26732. s = n.words,
  26733. r = n.sigBytes,
  26734. i = this.blockSize,
  26735. a = r / (4 * i),
  26736. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  26737. u = e.min(4 * c, r);
  26738. if (c) {
  26739. for (var h = 0; h < c; h += i) {
  26740. this._doProcessBlock(s, h);
  26741. }
  26742. var l = s.splice(0, c);
  26743. n.sigBytes -= u;
  26744. }
  26745. return new o.init(l, u);
  26746. },
  26747. clone: function clone() {
  26748. var e = i.clone.call(this);
  26749. return e._data = this._data.clone(), e;
  26750. },
  26751. _minBufferSize: 0
  26752. });
  26753. r.Hasher = l.extend({
  26754. cfg: i.extend(),
  26755. init: function init(e) {
  26756. this.cfg = this.cfg.extend(e), this.reset();
  26757. },
  26758. reset: function reset() {
  26759. l.reset.call(this), this._doReset();
  26760. },
  26761. update: function update(e) {
  26762. return this._append(e), this._process(), this;
  26763. },
  26764. finalize: function finalize(e) {
  26765. return e && this._append(e), this._doFinalize();
  26766. },
  26767. blockSize: 16,
  26768. _createHelper: function _createHelper(e) {
  26769. return function (t, n) {
  26770. return new e.init(n).finalize(t);
  26771. };
  26772. },
  26773. _createHmacHelper: function _createHmacHelper(e) {
  26774. return function (t, n) {
  26775. return new d.HMAC.init(e, n).finalize(t);
  26776. };
  26777. }
  26778. });
  26779. var d = s.algo = {};
  26780. return s;
  26781. }(Math), n);
  26782. }),
  26783. i = r,
  26784. o = (s(function (e, t) {
  26785. var n;
  26786. e.exports = (n = i, function (e) {
  26787. var t = n,
  26788. s = t.lib,
  26789. r = s.WordArray,
  26790. i = s.Hasher,
  26791. o = t.algo,
  26792. a = [];
  26793. !function () {
  26794. for (var t = 0; t < 64; t++) {
  26795. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  26796. }
  26797. }();
  26798. var c = o.MD5 = i.extend({
  26799. _doReset: function _doReset() {
  26800. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  26801. },
  26802. _doProcessBlock: function _doProcessBlock(e, t) {
  26803. for (var n = 0; n < 16; n++) {
  26804. var s = t + n,
  26805. r = e[s];
  26806. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  26807. }
  26808. var i = this._hash.words,
  26809. o = e[t + 0],
  26810. c = e[t + 1],
  26811. p = e[t + 2],
  26812. f = e[t + 3],
  26813. g = e[t + 4],
  26814. m = e[t + 5],
  26815. y = e[t + 6],
  26816. _ = e[t + 7],
  26817. w = e[t + 8],
  26818. v = e[t + 9],
  26819. I = e[t + 10],
  26820. S = e[t + 11],
  26821. b = e[t + 12],
  26822. k = e[t + 13],
  26823. C = e[t + 14],
  26824. T = e[t + 15],
  26825. P = i[0],
  26826. A = i[1],
  26827. E = i[2],
  26828. O = i[3];
  26829. 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;
  26830. },
  26831. _doFinalize: function _doFinalize() {
  26832. var t = this._data,
  26833. n = t.words,
  26834. s = 8 * this._nDataBytes,
  26835. r = 8 * t.sigBytes;
  26836. n[r >>> 5] |= 128 << 24 - r % 32;
  26837. var i = e.floor(s / 4294967296),
  26838. o = s;
  26839. 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();
  26840. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  26841. var h = c[u];
  26842. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  26843. }
  26844. return a;
  26845. },
  26846. clone: function clone() {
  26847. var e = i.clone.call(this);
  26848. return e._hash = this._hash.clone(), e;
  26849. }
  26850. });
  26851. function u(e, t, n, s, r, i, o) {
  26852. var a = e + (t & n | ~t & s) + r + o;
  26853. return (a << i | a >>> 32 - i) + t;
  26854. }
  26855. function h(e, t, n, s, r, i, o) {
  26856. var a = e + (t & s | n & ~s) + r + o;
  26857. return (a << i | a >>> 32 - i) + t;
  26858. }
  26859. function l(e, t, n, s, r, i, o) {
  26860. var a = e + (t ^ n ^ s) + r + o;
  26861. return (a << i | a >>> 32 - i) + t;
  26862. }
  26863. function d(e, t, n, s, r, i, o) {
  26864. var a = e + (n ^ (t | ~s)) + r + o;
  26865. return (a << i | a >>> 32 - i) + t;
  26866. }
  26867. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  26868. }(Math), n.MD5);
  26869. }), s(function (e, t) {
  26870. var n;
  26871. e.exports = (n = i, void function () {
  26872. var e = n,
  26873. t = e.lib.Base,
  26874. s = e.enc.Utf8;
  26875. e.algo.HMAC = t.extend({
  26876. init: function init(e, t) {
  26877. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  26878. var n = e.blockSize,
  26879. r = 4 * n;
  26880. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  26881. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  26882. a[u] ^= 1549556828, c[u] ^= 909522486;
  26883. }
  26884. i.sigBytes = o.sigBytes = r, this.reset();
  26885. },
  26886. reset: function reset() {
  26887. var e = this._hasher;
  26888. e.reset(), e.update(this._iKey);
  26889. },
  26890. update: function update(e) {
  26891. return this._hasher.update(e), this;
  26892. },
  26893. finalize: function finalize(e) {
  26894. var t = this._hasher,
  26895. n = t.finalize(e);
  26896. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  26897. }
  26898. });
  26899. }());
  26900. }), s(function (e, t) {
  26901. e.exports = i.HmacMD5;
  26902. })),
  26903. a = s(function (e, t) {
  26904. e.exports = i.enc.Utf8;
  26905. }),
  26906. c = s(function (e, t) {
  26907. var n;
  26908. e.exports = (n = i, function () {
  26909. var e = n,
  26910. t = e.lib.WordArray;
  26911. function s(e, n, s) {
  26912. for (var r = [], i = 0, o = 0; o < n; o++) {
  26913. if (o % 4) {
  26914. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  26915. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  26916. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  26917. }
  26918. }
  26919. return t.create(r, i);
  26920. }
  26921. e.enc.Base64 = {
  26922. stringify: function stringify(e) {
  26923. var t = e.words,
  26924. n = e.sigBytes,
  26925. s = this._map;
  26926. e.clamp();
  26927. for (var r = [], i = 0; i < n; i += 3) {
  26928. 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++) {
  26929. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  26930. }
  26931. }
  26932. var c = s.charAt(64);
  26933. if (c) for (; r.length % 4;) {
  26934. r.push(c);
  26935. }
  26936. return r.join("");
  26937. },
  26938. parse: function parse(e) {
  26939. var t = e.length,
  26940. n = this._map,
  26941. r = this._reverseMap;
  26942. if (!r) {
  26943. r = this._reverseMap = [];
  26944. for (var i = 0; i < n.length; i++) {
  26945. r[n.charCodeAt(i)] = i;
  26946. }
  26947. }
  26948. var o = n.charAt(64);
  26949. if (o) {
  26950. var a = e.indexOf(o);
  26951. -1 !== a && (t = a);
  26952. }
  26953. return s(e, t, r);
  26954. },
  26955. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  26956. };
  26957. }(), n.enc.Base64);
  26958. });
  26959. var u = "FUNCTION",
  26960. h = "OBJECT",
  26961. l = "CLIENT_DB",
  26962. d = "pending",
  26963. p = "fullfilled",
  26964. f = "rejected";
  26965. function g(e) {
  26966. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  26967. }
  26968. function m(e) {
  26969. return "object" === g(e);
  26970. }
  26971. function y(e) {
  26972. return "function" == typeof e;
  26973. }
  26974. function _(e) {
  26975. return function () {
  26976. try {
  26977. return e.apply(e, arguments);
  26978. } catch (e) {
  26979. console.error(e);
  26980. }
  26981. };
  26982. }
  26983. var w = "REJECTED",
  26984. v = "NOT_PENDING";
  26985. var I = /*#__PURE__*/function () {
  26986. function I() {
  26987. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26988. e = _ref.createPromise,
  26989. _ref$retryRule = _ref.retryRule,
  26990. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  26991. (0, _classCallCheck2.default)(this, I);
  26992. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  26993. }
  26994. (0, _createClass2.default)(I, [{
  26995. key: "needRetry",
  26996. get: function get() {
  26997. if (!this.status) return !0;
  26998. switch (this.retryRule) {
  26999. case w:
  27000. return this.status === f;
  27001. case v:
  27002. return this.status !== d;
  27003. }
  27004. }
  27005. }, {
  27006. key: "exec",
  27007. value: function exec() {
  27008. var _this = this;
  27009. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  27010. return _this.status = p, Promise.resolve(e);
  27011. }, function (e) {
  27012. return _this.status = f, Promise.reject(e);
  27013. }), this.promise) : this.promise;
  27014. }
  27015. }]);
  27016. return I;
  27017. }();
  27018. function S(e) {
  27019. return e && "string" == typeof e ? JSON.parse(e) : e;
  27020. }
  27021. var b = "development" === "development",
  27022. k = "mp-weixin",
  27023. C = "true" === undefined || !0 === undefined,
  27024. T = S([]),
  27025. P = "h5" === k ? "web" : "app-plus" === k ? "app" : k,
  27026. A = S(undefined),
  27027. E = S(undefined) || [],
  27028. O = true;
  27029. var x = "";
  27030. try {
  27031. x = (__webpack_require__(/*! uni-stat-config */ 502).default || __webpack_require__(/*! uni-stat-config */ 502)).appid;
  27032. } catch (e) {}
  27033. var R = {};
  27034. function U(e) {
  27035. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27036. var n, s;
  27037. return n = R, s = e, Object.prototype.hasOwnProperty.call(n, s) || (R[e] = t), R[e];
  27038. }
  27039. "app" === P && (R = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  27040. var L = ["invoke", "success", "fail", "complete"],
  27041. N = U("_globalUniCloudInterceptor");
  27042. function D(e, t) {
  27043. N[e] || (N[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  27044. L.indexOf(n) > -1 && function (e, t, n) {
  27045. var s = N[e][t];
  27046. s || (s = N[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  27047. }(e, n, t[n]);
  27048. });
  27049. }
  27050. function F(e, t) {
  27051. N[e] || (N[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  27052. L.indexOf(n) > -1 && function (e, t, n) {
  27053. var s = N[e][t];
  27054. if (!s) return;
  27055. var r = s.indexOf(n);
  27056. r > -1 && s.splice(r, 1);
  27057. }(e, n, t[n]);
  27058. }) : delete N[e];
  27059. }
  27060. function q(e, t) {
  27061. return e && 0 !== e.length ? e.reduce(function (e, n) {
  27062. return e.then(function () {
  27063. return n(t);
  27064. });
  27065. }, Promise.resolve()) : Promise.resolve();
  27066. }
  27067. function M(e, t) {
  27068. return N[e] && N[e][t] || [];
  27069. }
  27070. function K(e) {
  27071. D("callObject", e);
  27072. }
  27073. var j = U("_globalUniCloudListener"),
  27074. B = "response",
  27075. $ = "needLogin",
  27076. W = "refreshToken",
  27077. z = "clientdb",
  27078. J = "cloudfunction",
  27079. H = "cloudobject";
  27080. function G(e) {
  27081. return j[e] || (j[e] = []), j[e];
  27082. }
  27083. function V(e, t) {
  27084. var n = G(e);
  27085. n.includes(t) || n.push(t);
  27086. }
  27087. function Y(e, t) {
  27088. var n = G(e),
  27089. s = n.indexOf(t);
  27090. -1 !== s && n.splice(s, 1);
  27091. }
  27092. function Q(e, t) {
  27093. var n = G(e);
  27094. for (var _e2 = 0; _e2 < n.length; _e2++) {
  27095. (0, n[_e2])(t);
  27096. }
  27097. }
  27098. var X,
  27099. Z = !1;
  27100. function ee() {
  27101. return X || (X = new Promise(function (e) {
  27102. Z && e(), function t() {
  27103. if ("function" == typeof getCurrentPages) {
  27104. var _t2 = getCurrentPages();
  27105. _t2 && _t2[0] && (Z = !0, e());
  27106. }
  27107. Z || setTimeout(function () {
  27108. t();
  27109. }, 30);
  27110. }();
  27111. }), X);
  27112. }
  27113. function te(e) {
  27114. var t = {};
  27115. for (var _n2 in e) {
  27116. var _s2 = e[_n2];
  27117. y(_s2) && (t[_n2] = _(_s2));
  27118. }
  27119. return t;
  27120. }
  27121. var ne = /*#__PURE__*/function (_Error) {
  27122. (0, _inherits2.default)(ne, _Error);
  27123. var _super = _createSuper(ne);
  27124. function ne(e) {
  27125. var _this2;
  27126. (0, _classCallCheck2.default)(this, ne);
  27127. _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;
  27128. return _this2;
  27129. }
  27130. (0, _createClass2.default)(ne, [{
  27131. key: "toJson",
  27132. value: function toJson() {
  27133. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  27134. if (!(e >= 10)) return e++, {
  27135. errCode: this.errCode,
  27136. errMsg: this.errMsg,
  27137. errSubject: this.errSubject,
  27138. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  27139. };
  27140. }
  27141. }]);
  27142. return ne;
  27143. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  27144. var se = {
  27145. request: function request(e) {
  27146. return uni.request(e);
  27147. },
  27148. uploadFile: function uploadFile(e) {
  27149. return uni.uploadFile(e);
  27150. },
  27151. setStorageSync: function setStorageSync(e, t) {
  27152. return uni.setStorageSync(e, t);
  27153. },
  27154. getStorageSync: function getStorageSync(e) {
  27155. return uni.getStorageSync(e);
  27156. },
  27157. removeStorageSync: function removeStorageSync(e) {
  27158. return uni.removeStorageSync(e);
  27159. },
  27160. clearStorageSync: function clearStorageSync() {
  27161. return uni.clearStorageSync();
  27162. }
  27163. };
  27164. function re() {
  27165. return {
  27166. token: se.getStorageSync("uni_id_token") || se.getStorageSync("uniIdToken"),
  27167. tokenExpired: se.getStorageSync("uni_id_token_expired")
  27168. };
  27169. }
  27170. function ie() {
  27171. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27172. e = _ref2.token,
  27173. t = _ref2.tokenExpired;
  27174. e && se.setStorageSync("uni_id_token", e), t && se.setStorageSync("uni_id_token_expired", t);
  27175. }
  27176. var oe, ae;
  27177. function ce() {
  27178. return oe || (oe = uni.getSystemInfoSync()), oe;
  27179. }
  27180. function ue() {
  27181. var e, t;
  27182. try {
  27183. if (uni.getLaunchOptionsSync) {
  27184. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  27185. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  27186. _n3 = _uni$getLaunchOptions.scene,
  27187. _s3 = _uni$getLaunchOptions.channel;
  27188. e = _s3, t = _n3;
  27189. }
  27190. } catch (e) {}
  27191. return {
  27192. channel: e,
  27193. scene: t
  27194. };
  27195. }
  27196. function he() {
  27197. var e = uni.getLocale && uni.getLocale() || "en";
  27198. if (ae) return _objectSpread(_objectSpread({}, ae), {}, {
  27199. locale: e,
  27200. LOCALE: e
  27201. });
  27202. var t = ce(),
  27203. n = t.deviceId,
  27204. s = t.osName,
  27205. r = t.uniPlatform,
  27206. i = t.appId,
  27207. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  27208. for (var _e3 = 0; _e3 < o.length; _e3++) {
  27209. delete t[o[_e3]];
  27210. }
  27211. return ae = _objectSpread(_objectSpread({
  27212. PLATFORM: r,
  27213. OS: s,
  27214. APPID: i,
  27215. DEVICEID: n
  27216. }, ue()), t), _objectSpread(_objectSpread({}, ae), {}, {
  27217. locale: e,
  27218. LOCALE: e
  27219. });
  27220. }
  27221. var le = {
  27222. sign: function sign(e, t) {
  27223. var n = "";
  27224. return Object.keys(e).sort().forEach(function (t) {
  27225. e[t] && (n = n + "&" + t + "=" + e[t]);
  27226. }), n = n.slice(1), o(n, t).toString();
  27227. },
  27228. wrappedRequest: function wrappedRequest(e, t) {
  27229. return new Promise(function (n, s) {
  27230. t(Object.assign(e, {
  27231. complete: function complete(e) {
  27232. 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");
  27233. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  27234. if (!e.statusCode || e.statusCode >= 400) return s(new ne({
  27235. code: "SYS_ERR",
  27236. message: e.errMsg || "request:fail",
  27237. requestId: t
  27238. }));
  27239. var r = e.data;
  27240. if (r.error) return s(new ne({
  27241. code: r.error.code,
  27242. message: r.error.message,
  27243. requestId: t
  27244. }));
  27245. r.result = r.data, r.requestId = t, delete r.data, n(r);
  27246. }
  27247. }));
  27248. });
  27249. },
  27250. toBase64: function toBase64(e) {
  27251. return c.stringify(a.parse(e));
  27252. }
  27253. },
  27254. de = {
  27255. "uniCloud.init.paramRequired": "{param} required",
  27256. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27257. };
  27258. var _e4 = (0, _uniI18n.initVueI18n)({
  27259. "zh-Hans": {
  27260. "uniCloud.init.paramRequired": "缺少参数:{param}",
  27261. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  27262. },
  27263. "zh-Hant": {
  27264. "uniCloud.init.paramRequired": "缺少参数:{param}",
  27265. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  27266. },
  27267. en: de,
  27268. fr: {
  27269. "uniCloud.init.paramRequired": "{param} required",
  27270. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27271. },
  27272. es: {
  27273. "uniCloud.init.paramRequired": "{param} required",
  27274. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27275. },
  27276. ja: de
  27277. }, "zh-Hans"),
  27278. pe = _e4.t;
  27279. var fe = /*#__PURE__*/function () {
  27280. function fe(e) {
  27281. var _this3 = this;
  27282. (0, _classCallCheck2.default)(this, fe);
  27283. ["spaceId", "clientSecret"].forEach(function (t) {
  27284. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(pe("uniCloud.init.paramRequired", {
  27285. param: t
  27286. }));
  27287. }), this.config = Object.assign({}, {
  27288. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  27289. }, 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({
  27290. createPromise: function createPromise() {
  27291. return _this3.requestAuth(_this3.setupRequest({
  27292. method: "serverless.auth.user.anonymousAuthorize",
  27293. params: "{}"
  27294. }, "auth")).then(function (e) {
  27295. if (!e.result || !e.result.accessToken) throw new ne({
  27296. code: "AUTH_FAILED",
  27297. message: "获取accessToken失败"
  27298. });
  27299. _this3.setAccessToken(e.result.accessToken);
  27300. });
  27301. },
  27302. retryRule: v
  27303. });
  27304. }
  27305. (0, _createClass2.default)(fe, [{
  27306. key: "hasAccessToken",
  27307. get: function get() {
  27308. return !!this.accessToken;
  27309. }
  27310. }, {
  27311. key: "setAccessToken",
  27312. value: function setAccessToken(e) {
  27313. this.accessToken = e;
  27314. }
  27315. }, {
  27316. key: "requestWrapped",
  27317. value: function requestWrapped(e) {
  27318. return le.wrappedRequest(e, this.adapter.request);
  27319. }
  27320. }, {
  27321. key: "requestAuth",
  27322. value: function requestAuth(e) {
  27323. return this.requestWrapped(e);
  27324. }
  27325. }, {
  27326. key: "request",
  27327. value: function request(e, t) {
  27328. var _this4 = this;
  27329. return Promise.resolve().then(function () {
  27330. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  27331. return new Promise(function (e, n) {
  27332. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  27333. }).then(function () {
  27334. return _this4.getAccessToken();
  27335. }).then(function () {
  27336. var t = _this4.rebuildRequest(e);
  27337. return _this4.request(t, !0);
  27338. });
  27339. }) : _this4.getAccessToken().then(function () {
  27340. var t = _this4.rebuildRequest(e);
  27341. return _this4.request(t, !0);
  27342. });
  27343. });
  27344. }
  27345. }, {
  27346. key: "rebuildRequest",
  27347. value: function rebuildRequest(e) {
  27348. var t = Object.assign({}, e);
  27349. 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;
  27350. }
  27351. }, {
  27352. key: "setupRequest",
  27353. value: function setupRequest(e, t) {
  27354. var n = Object.assign({}, e, {
  27355. spaceId: this.config.spaceId,
  27356. timestamp: Date.now()
  27357. }),
  27358. s = {
  27359. "Content-Type": "application/json"
  27360. };
  27361. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret), {
  27362. url: this.config.requestUrl,
  27363. method: "POST",
  27364. data: n,
  27365. dataType: "json",
  27366. header: s
  27367. };
  27368. }
  27369. }, {
  27370. key: "getAccessToken",
  27371. value: function getAccessToken() {
  27372. return this._getAccessTokenPromiseHub.exec();
  27373. }
  27374. }, {
  27375. key: "authorize",
  27376. value: function () {
  27377. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  27378. return _regenerator.default.wrap(function _callee$(_context) {
  27379. while (1) {
  27380. switch (_context.prev = _context.next) {
  27381. case 0:
  27382. _context.next = 2;
  27383. return this.getAccessToken();
  27384. case 2:
  27385. case "end":
  27386. return _context.stop();
  27387. }
  27388. }
  27389. }, _callee, this);
  27390. }));
  27391. function authorize() {
  27392. return _authorize.apply(this, arguments);
  27393. }
  27394. return authorize;
  27395. }()
  27396. }, {
  27397. key: "callFunction",
  27398. value: function callFunction(e) {
  27399. var t = {
  27400. method: "serverless.function.runtime.invoke",
  27401. params: JSON.stringify({
  27402. functionTarget: e.name,
  27403. functionArgs: e.data || {}
  27404. })
  27405. };
  27406. return this.request(this.setupRequest(t));
  27407. }
  27408. }, {
  27409. key: "getOSSUploadOptionsFromPath",
  27410. value: function getOSSUploadOptionsFromPath(e) {
  27411. var t = {
  27412. method: "serverless.file.resource.generateProximalSign",
  27413. params: JSON.stringify(e)
  27414. };
  27415. return this.request(this.setupRequest(t));
  27416. }
  27417. }, {
  27418. key: "uploadFileToOSS",
  27419. value: function uploadFileToOSS(_ref3) {
  27420. var _this5 = this;
  27421. var e = _ref3.url,
  27422. t = _ref3.formData,
  27423. n = _ref3.name,
  27424. s = _ref3.filePath,
  27425. r = _ref3.fileType,
  27426. i = _ref3.onUploadProgress;
  27427. return new Promise(function (o, a) {
  27428. var c = _this5.adapter.uploadFile({
  27429. url: e,
  27430. formData: t,
  27431. name: n,
  27432. filePath: s,
  27433. fileType: r,
  27434. header: {
  27435. "X-OSS-server-side-encrpytion": "AES256"
  27436. },
  27437. success: function success(e) {
  27438. e && e.statusCode < 400 ? o(e) : a(new ne({
  27439. code: "UPLOAD_FAILED",
  27440. message: "文件上传失败"
  27441. }));
  27442. },
  27443. fail: function fail(e) {
  27444. a(new ne({
  27445. code: e.code || "UPLOAD_FAILED",
  27446. message: e.message || e.errMsg || "文件上传失败"
  27447. }));
  27448. }
  27449. });
  27450. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  27451. i({
  27452. loaded: e.totalBytesSent,
  27453. total: e.totalBytesExpectedToSend
  27454. });
  27455. });
  27456. });
  27457. }
  27458. }, {
  27459. key: "reportOSSUpload",
  27460. value: function reportOSSUpload(e) {
  27461. var t = {
  27462. method: "serverless.file.resource.report",
  27463. params: JSON.stringify(e)
  27464. };
  27465. return this.request(this.setupRequest(t));
  27466. }
  27467. }, {
  27468. key: "uploadFile",
  27469. value: function () {
  27470. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  27471. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _, _e5, w;
  27472. return _regenerator.default.wrap(function _callee2$(_context2) {
  27473. while (1) {
  27474. switch (_context2.prev = _context2.next) {
  27475. case 0:
  27476. 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;
  27477. if (!("string" !== g(t))) {
  27478. _context2.next = 3;
  27479. break;
  27480. }
  27481. throw new ne({
  27482. code: "INVALID_PARAM",
  27483. message: "cloudPath必须为字符串类型"
  27484. });
  27485. case 3:
  27486. if (t = t.trim()) {
  27487. _context2.next = 5;
  27488. break;
  27489. }
  27490. throw new ne({
  27491. code: "INVALID_PARAM",
  27492. message: "cloudPath不可为空"
  27493. });
  27494. case 5:
  27495. if (!/:\/\//.test(t)) {
  27496. _context2.next = 7;
  27497. break;
  27498. }
  27499. throw new ne({
  27500. code: "INVALID_PARAM",
  27501. message: "cloudPath不合法"
  27502. });
  27503. case 7:
  27504. o = i && i.envType || this.config.envType;
  27505. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  27506. _context2.next = 10;
  27507. break;
  27508. }
  27509. throw new ne({
  27510. code: "INVALID_PARAM",
  27511. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  27512. });
  27513. case 10:
  27514. _context2.next = 12;
  27515. return this.getOSSUploadOptionsFromPath({
  27516. env: o,
  27517. filename: s ? t.split("/").pop() : t,
  27518. fileId: s ? t : void 0
  27519. });
  27520. case 12:
  27521. a = _context2.sent.result;
  27522. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  27523. u = a.securityToken;
  27524. h = a.accessKeyId;
  27525. l = a.signature;
  27526. d = a.host;
  27527. p = a.ossPath;
  27528. f = a.id;
  27529. m = a.policy;
  27530. y = a.ossCallbackUrl;
  27531. _ = {
  27532. "Cache-Control": "max-age=2592000",
  27533. "Content-Disposition": "attachment",
  27534. OSSAccessKeyId: h,
  27535. Signature: l,
  27536. host: d,
  27537. id: f,
  27538. key: p,
  27539. policy: m,
  27540. success_action_status: 200
  27541. };
  27542. if (u && (_["x-oss-security-token"] = u), y) {
  27543. _e5 = JSON.stringify({
  27544. callbackUrl: y,
  27545. callbackBody: JSON.stringify({
  27546. fileId: f,
  27547. spaceId: this.config.spaceId
  27548. }),
  27549. callbackBodyType: "application/json"
  27550. });
  27551. _.callback = le.toBase64(_e5);
  27552. }
  27553. w = {
  27554. url: "https://" + a.host,
  27555. formData: _,
  27556. fileName: "file",
  27557. name: "file",
  27558. filePath: e,
  27559. fileType: n
  27560. };
  27561. _context2.next = 27;
  27562. return this.uploadFileToOSS(Object.assign({}, w, {
  27563. onUploadProgress: r
  27564. }));
  27565. case 27:
  27566. if (!y) {
  27567. _context2.next = 29;
  27568. break;
  27569. }
  27570. return _context2.abrupt("return", {
  27571. success: !0,
  27572. filePath: e,
  27573. fileID: c
  27574. });
  27575. case 29:
  27576. _context2.next = 31;
  27577. return this.reportOSSUpload({
  27578. id: f
  27579. });
  27580. case 31:
  27581. if (!_context2.sent.success) {
  27582. _context2.next = 33;
  27583. break;
  27584. }
  27585. return _context2.abrupt("return", {
  27586. success: !0,
  27587. filePath: e,
  27588. fileID: c
  27589. });
  27590. case 33:
  27591. throw new ne({
  27592. code: "UPLOAD_FAILED",
  27593. message: "文件上传失败"
  27594. });
  27595. case 34:
  27596. case "end":
  27597. return _context2.stop();
  27598. }
  27599. }
  27600. }, _callee2, this);
  27601. }));
  27602. function uploadFile(_x) {
  27603. return _uploadFile.apply(this, arguments);
  27604. }
  27605. return uploadFile;
  27606. }()
  27607. }, {
  27608. key: "getTempFileURL",
  27609. value: function getTempFileURL() {
  27610. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27611. e = _ref5.fileList;
  27612. return new Promise(function (t, n) {
  27613. Array.isArray(e) && 0 !== e.length || n(new ne({
  27614. code: "INVALID_PARAM",
  27615. message: "fileList的元素必须是非空的字符串"
  27616. })), t({
  27617. fileList: e.map(function (e) {
  27618. return {
  27619. fileID: e,
  27620. tempFileURL: e
  27621. };
  27622. })
  27623. });
  27624. });
  27625. }
  27626. }, {
  27627. key: "getFileInfo",
  27628. value: function () {
  27629. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  27630. var _ref6,
  27631. e,
  27632. t,
  27633. _args3 = arguments;
  27634. return _regenerator.default.wrap(function _callee3$(_context3) {
  27635. while (1) {
  27636. switch (_context3.prev = _context3.next) {
  27637. case 0:
  27638. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  27639. if (!(!Array.isArray(e) || 0 === e.length)) {
  27640. _context3.next = 3;
  27641. break;
  27642. }
  27643. throw new ne({
  27644. code: "INVALID_PARAM",
  27645. message: "fileList的元素必须是非空的字符串"
  27646. });
  27647. case 3:
  27648. t = {
  27649. method: "serverless.file.resource.info",
  27650. params: JSON.stringify({
  27651. id: e.map(function (e) {
  27652. return e.split("?")[0];
  27653. }).join(",")
  27654. })
  27655. };
  27656. _context3.next = 6;
  27657. return this.request(this.setupRequest(t));
  27658. case 6:
  27659. _context3.t0 = _context3.sent.result;
  27660. return _context3.abrupt("return", {
  27661. fileList: _context3.t0
  27662. });
  27663. case 8:
  27664. case "end":
  27665. return _context3.stop();
  27666. }
  27667. }
  27668. }, _callee3, this);
  27669. }));
  27670. function getFileInfo() {
  27671. return _getFileInfo.apply(this, arguments);
  27672. }
  27673. return getFileInfo;
  27674. }()
  27675. }]);
  27676. return fe;
  27677. }();
  27678. var ge = {
  27679. init: function init(e) {
  27680. var t = new fe(e),
  27681. n = {
  27682. signInAnonymously: function signInAnonymously() {
  27683. return t.authorize();
  27684. },
  27685. getLoginState: function getLoginState() {
  27686. return Promise.resolve(!1);
  27687. }
  27688. };
  27689. return t.auth = function () {
  27690. return n;
  27691. }, t.customAuth = t.auth, t;
  27692. }
  27693. };
  27694. var me = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  27695. var ye;
  27696. !function (e) {
  27697. e.local = "local", e.none = "none", e.session = "session";
  27698. }(ye || (ye = {}));
  27699. var _e = function _e() {};
  27700. var we = function we() {
  27701. var e;
  27702. if (!Promise) {
  27703. e = function e() {}, e.promise = {};
  27704. var _t3 = function _t3() {
  27705. throw new ne({
  27706. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  27707. });
  27708. };
  27709. return Object.defineProperty(e.promise, "then", {
  27710. get: _t3
  27711. }), Object.defineProperty(e.promise, "catch", {
  27712. get: _t3
  27713. }), e;
  27714. }
  27715. var t = new Promise(function (t, n) {
  27716. e = function e(_e6, s) {
  27717. return _e6 ? n(_e6) : t(s);
  27718. };
  27719. });
  27720. return e.promise = t, e;
  27721. };
  27722. function ve(e) {
  27723. return void 0 === e;
  27724. }
  27725. function Ie(e) {
  27726. return "[object Null]" === Object.prototype.toString.call(e);
  27727. }
  27728. var Se;
  27729. function be(e) {
  27730. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  27731. var n;
  27732. var _iterator = _createForOfIteratorHelper(t),
  27733. _step;
  27734. try {
  27735. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  27736. var _e7 = _step.value;
  27737. var _t4 = _e7.isMatch,
  27738. _n4 = _e7.genAdapter,
  27739. _s4 = _e7.runtime;
  27740. if (_t4()) return {
  27741. adapter: _n4(),
  27742. runtime: _s4
  27743. };
  27744. }
  27745. } catch (err) {
  27746. _iterator.e(err);
  27747. } finally {
  27748. _iterator.f();
  27749. }
  27750. }
  27751. !function (e) {
  27752. e.WEB = "web", e.WX_MP = "wx_mp";
  27753. }(Se || (Se = {}));
  27754. var ke = {
  27755. adapter: null,
  27756. runtime: void 0
  27757. },
  27758. Ce = ["anonymousUuidKey"];
  27759. var Te = /*#__PURE__*/function (_e8) {
  27760. (0, _inherits2.default)(Te, _e8);
  27761. var _super2 = _createSuper(Te);
  27762. function Te() {
  27763. var _this6;
  27764. (0, _classCallCheck2.default)(this, Te);
  27765. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  27766. return _this6;
  27767. }
  27768. (0, _createClass2.default)(Te, [{
  27769. key: "setItem",
  27770. value: function setItem(e, t) {
  27771. ke.adapter.root.tcbObject[e] = t;
  27772. }
  27773. }, {
  27774. key: "getItem",
  27775. value: function getItem(e) {
  27776. return ke.adapter.root.tcbObject[e];
  27777. }
  27778. }, {
  27779. key: "removeItem",
  27780. value: function removeItem(e) {
  27781. delete ke.adapter.root.tcbObject[e];
  27782. }
  27783. }, {
  27784. key: "clear",
  27785. value: function clear() {
  27786. delete ke.adapter.root.tcbObject;
  27787. }
  27788. }]);
  27789. return Te;
  27790. }(_e);
  27791. function Pe(e, t) {
  27792. switch (e) {
  27793. case "local":
  27794. return t.localStorage || new Te();
  27795. case "none":
  27796. return new Te();
  27797. default:
  27798. return t.sessionStorage || new Te();
  27799. }
  27800. }
  27801. var Ae = /*#__PURE__*/function () {
  27802. function Ae(e) {
  27803. (0, _classCallCheck2.default)(this, Ae);
  27804. if (!this._storage) {
  27805. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Pe(this._persistence, ke.adapter);
  27806. var _t5 = "access_token_".concat(e.env),
  27807. _n5 = "access_token_expire_".concat(e.env),
  27808. _s5 = "refresh_token_".concat(e.env),
  27809. _r = "anonymous_uuid_".concat(e.env),
  27810. _i = "login_type_".concat(e.env),
  27811. _o = "user_info_".concat(e.env);
  27812. this.keys = {
  27813. accessTokenKey: _t5,
  27814. accessTokenExpireKey: _n5,
  27815. refreshTokenKey: _s5,
  27816. anonymousUuidKey: _r,
  27817. loginTypeKey: _i,
  27818. userInfoKey: _o
  27819. };
  27820. }
  27821. }
  27822. (0, _createClass2.default)(Ae, [{
  27823. key: "updatePersistence",
  27824. value: function updatePersistence(e) {
  27825. if (e === this._persistence) return;
  27826. var t = "local" === this._persistence;
  27827. this._persistence = e;
  27828. var n = Pe(e, ke.adapter);
  27829. for (var _e9 in this.keys) {
  27830. var _s6 = this.keys[_e9];
  27831. if (t && Ce.includes(_e9)) continue;
  27832. var _r2 = this._storage.getItem(_s6);
  27833. ve(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  27834. }
  27835. this._storage = n;
  27836. }
  27837. }, {
  27838. key: "setStore",
  27839. value: function setStore(e, t, n) {
  27840. if (!this._storage) return;
  27841. var s = {
  27842. version: n || "localCachev1",
  27843. content: t
  27844. },
  27845. r = JSON.stringify(s);
  27846. try {
  27847. this._storage.setItem(e, r);
  27848. } catch (e) {
  27849. throw e;
  27850. }
  27851. }
  27852. }, {
  27853. key: "getStore",
  27854. value: function getStore(e, t) {
  27855. try {
  27856. if (!this._storage) return;
  27857. } catch (e) {
  27858. return "";
  27859. }
  27860. t = t || "localCachev1";
  27861. var n = this._storage.getItem(e);
  27862. if (!n) return "";
  27863. if (n.indexOf(t) >= 0) {
  27864. return JSON.parse(n).content;
  27865. }
  27866. return "";
  27867. }
  27868. }, {
  27869. key: "removeStore",
  27870. value: function removeStore(e) {
  27871. this._storage.removeItem(e);
  27872. }
  27873. }]);
  27874. return Ae;
  27875. }();
  27876. var Ee = {},
  27877. Oe = {};
  27878. function xe(e) {
  27879. return Ee[e];
  27880. }
  27881. var Re = /*#__PURE__*/(0, _createClass2.default)(function Re(e, t) {
  27882. (0, _classCallCheck2.default)(this, Re);
  27883. this.data = t || null, this.name = e;
  27884. });
  27885. var Ue = /*#__PURE__*/function (_Re) {
  27886. (0, _inherits2.default)(Ue, _Re);
  27887. var _super3 = _createSuper(Ue);
  27888. function Ue(e, t) {
  27889. var _this7;
  27890. (0, _classCallCheck2.default)(this, Ue);
  27891. _this7 = _super3.call(this, "error", {
  27892. error: e,
  27893. data: t
  27894. }), _this7.error = e;
  27895. return _this7;
  27896. }
  27897. return (0, _createClass2.default)(Ue);
  27898. }(Re);
  27899. var Le = new ( /*#__PURE__*/function () {
  27900. function _class() {
  27901. (0, _classCallCheck2.default)(this, _class);
  27902. this._listeners = {};
  27903. }
  27904. (0, _createClass2.default)(_class, [{
  27905. key: "on",
  27906. value: function on(e, t) {
  27907. return function (e, t, n) {
  27908. n[e] = n[e] || [], n[e].push(t);
  27909. }(e, t, this._listeners), this;
  27910. }
  27911. }, {
  27912. key: "off",
  27913. value: function off(e, t) {
  27914. return function (e, t, n) {
  27915. if (n && n[e]) {
  27916. var _s7 = n[e].indexOf(t);
  27917. -1 !== _s7 && n[e].splice(_s7, 1);
  27918. }
  27919. }(e, t, this._listeners), this;
  27920. }
  27921. }, {
  27922. key: "fire",
  27923. value: function fire(e, t) {
  27924. if (e instanceof Ue) return console.error(e.error), this;
  27925. var n = "string" == typeof e ? new Re(e, t || {}) : e;
  27926. var s = n.name;
  27927. if (this._listens(s)) {
  27928. n.target = this;
  27929. var _e10 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  27930. var _iterator2 = _createForOfIteratorHelper(_e10),
  27931. _step2;
  27932. try {
  27933. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  27934. var _t6 = _step2.value;
  27935. _t6.call(this, n);
  27936. }
  27937. } catch (err) {
  27938. _iterator2.e(err);
  27939. } finally {
  27940. _iterator2.f();
  27941. }
  27942. }
  27943. return this;
  27944. }
  27945. }, {
  27946. key: "_listens",
  27947. value: function _listens(e) {
  27948. return this._listeners[e] && this._listeners[e].length > 0;
  27949. }
  27950. }]);
  27951. return _class;
  27952. }())();
  27953. function Ne(e, t) {
  27954. Le.on(e, t);
  27955. }
  27956. function De(e) {
  27957. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27958. Le.fire(e, t);
  27959. }
  27960. function Fe(e, t) {
  27961. Le.off(e, t);
  27962. }
  27963. var qe = "loginStateChanged",
  27964. Me = "loginStateExpire",
  27965. Ke = "loginTypeChanged",
  27966. je = "anonymousConverted",
  27967. Be = "refreshAccessToken";
  27968. var $e;
  27969. !function (e) {
  27970. 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";
  27971. }($e || ($e = {}));
  27972. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  27973. ze = {
  27974. "X-SDK-Version": "1.3.5"
  27975. };
  27976. function Je(e, t, n) {
  27977. var s = e[t];
  27978. e[t] = function (t) {
  27979. var r = {},
  27980. i = {};
  27981. n.forEach(function (n) {
  27982. var _n$call = n.call(e, t),
  27983. s = _n$call.data,
  27984. o = _n$call.headers;
  27985. Object.assign(r, s), Object.assign(i, o);
  27986. });
  27987. var o = t.data;
  27988. return o && function () {
  27989. var e;
  27990. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e11 in r) {
  27991. o.append(_e11, r[_e11]);
  27992. }
  27993. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  27994. };
  27995. }
  27996. function He() {
  27997. var e = Math.random().toString(16).slice(2);
  27998. return {
  27999. data: {
  28000. seqId: e
  28001. },
  28002. headers: _objectSpread(_objectSpread({}, ze), {}, {
  28003. "x-seqid": e
  28004. })
  28005. };
  28006. }
  28007. var Ge = /*#__PURE__*/function () {
  28008. function Ge() {
  28009. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  28010. (0, _classCallCheck2.default)(this, Ge);
  28011. var t;
  28012. this.config = e, this._reqClass = new ke.adapter.reqClass({
  28013. timeout: this.config.timeout,
  28014. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  28015. restrictedMethods: ["post"]
  28016. }), 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]);
  28017. }
  28018. (0, _createClass2.default)(Ge, [{
  28019. key: "post",
  28020. value: function () {
  28021. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  28022. return _regenerator.default.wrap(function _callee4$(_context4) {
  28023. while (1) {
  28024. switch (_context4.prev = _context4.next) {
  28025. case 0:
  28026. _context4.next = 2;
  28027. return this._reqClass.post(e);
  28028. case 2:
  28029. return _context4.abrupt("return", _context4.sent);
  28030. case 3:
  28031. case "end":
  28032. return _context4.stop();
  28033. }
  28034. }
  28035. }, _callee4, this);
  28036. }));
  28037. function post(_x2) {
  28038. return _post.apply(this, arguments);
  28039. }
  28040. return post;
  28041. }()
  28042. }, {
  28043. key: "upload",
  28044. value: function () {
  28045. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  28046. return _regenerator.default.wrap(function _callee5$(_context5) {
  28047. while (1) {
  28048. switch (_context5.prev = _context5.next) {
  28049. case 0:
  28050. _context5.next = 2;
  28051. return this._reqClass.upload(e);
  28052. case 2:
  28053. return _context5.abrupt("return", _context5.sent);
  28054. case 3:
  28055. case "end":
  28056. return _context5.stop();
  28057. }
  28058. }
  28059. }, _callee5, this);
  28060. }));
  28061. function upload(_x3) {
  28062. return _upload.apply(this, arguments);
  28063. }
  28064. return upload;
  28065. }()
  28066. }, {
  28067. key: "download",
  28068. value: function () {
  28069. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  28070. return _regenerator.default.wrap(function _callee6$(_context6) {
  28071. while (1) {
  28072. switch (_context6.prev = _context6.next) {
  28073. case 0:
  28074. _context6.next = 2;
  28075. return this._reqClass.download(e);
  28076. case 2:
  28077. return _context6.abrupt("return", _context6.sent);
  28078. case 3:
  28079. case "end":
  28080. return _context6.stop();
  28081. }
  28082. }
  28083. }, _callee6, this);
  28084. }));
  28085. function download(_x4) {
  28086. return _download.apply(this, arguments);
  28087. }
  28088. return download;
  28089. }()
  28090. }, {
  28091. key: "refreshAccessToken",
  28092. value: function () {
  28093. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  28094. var e, t;
  28095. return _regenerator.default.wrap(function _callee7$(_context7) {
  28096. while (1) {
  28097. switch (_context7.prev = _context7.next) {
  28098. case 0:
  28099. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  28100. _context7.prev = 1;
  28101. _context7.next = 4;
  28102. return this._refreshAccessTokenPromise;
  28103. case 4:
  28104. e = _context7.sent;
  28105. _context7.next = 10;
  28106. break;
  28107. case 7:
  28108. _context7.prev = 7;
  28109. _context7.t0 = _context7["catch"](1);
  28110. t = _context7.t0;
  28111. case 10:
  28112. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  28113. _context7.next = 12;
  28114. break;
  28115. }
  28116. throw t;
  28117. case 12:
  28118. return _context7.abrupt("return", e);
  28119. case 13:
  28120. case "end":
  28121. return _context7.stop();
  28122. }
  28123. }
  28124. }, _callee7, this, [[1, 7]]);
  28125. }));
  28126. function refreshAccessToken() {
  28127. return _refreshAccessToken2.apply(this, arguments);
  28128. }
  28129. return refreshAccessToken;
  28130. }()
  28131. }, {
  28132. key: "_refreshAccessToken",
  28133. value: function () {
  28134. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  28135. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e12, _e13, _t7, _s8;
  28136. return _regenerator.default.wrap(function _callee8$(_context8) {
  28137. while (1) {
  28138. switch (_context8.prev = _context8.next) {
  28139. case 0:
  28140. _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;
  28141. this._cache.removeStore(e), this._cache.removeStore(t);
  28142. i = this._cache.getStore(n);
  28143. if (i) {
  28144. _context8.next = 5;
  28145. break;
  28146. }
  28147. throw new ne({
  28148. message: "未登录CloudBase"
  28149. });
  28150. case 5:
  28151. o = {
  28152. refresh_token: i
  28153. };
  28154. _context8.next = 8;
  28155. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  28156. case 8:
  28157. a = _context8.sent;
  28158. if (!a.data.code) {
  28159. _context8.next = 21;
  28160. break;
  28161. }
  28162. _e12 = a.data.code;
  28163. if (!("SIGN_PARAM_INVALID" === _e12 || "REFRESH_TOKEN_EXPIRED" === _e12 || "INVALID_REFRESH_TOKEN" === _e12)) {
  28164. _context8.next = 20;
  28165. break;
  28166. }
  28167. if (!(this._cache.getStore(s) === $e.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e12)) {
  28168. _context8.next = 19;
  28169. break;
  28170. }
  28171. _e13 = this._cache.getStore(r);
  28172. _t7 = this._cache.getStore(n);
  28173. _context8.next = 17;
  28174. return this.send("auth.signInAnonymously", {
  28175. anonymous_uuid: _e13,
  28176. refresh_token: _t7
  28177. });
  28178. case 17:
  28179. _s8 = _context8.sent;
  28180. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  28181. case 19:
  28182. De(Me), this._cache.removeStore(n);
  28183. case 20:
  28184. throw new ne({
  28185. code: a.data.code,
  28186. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  28187. });
  28188. case 21:
  28189. if (!a.data.access_token) {
  28190. _context8.next = 23;
  28191. break;
  28192. }
  28193. 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()), {
  28194. accessToken: a.data.access_token,
  28195. accessTokenExpire: a.data.access_token_expire
  28196. }));
  28197. case 23:
  28198. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  28199. case 24:
  28200. case "end":
  28201. return _context8.stop();
  28202. }
  28203. }
  28204. }, _callee8, this);
  28205. }));
  28206. function _refreshAccessToken() {
  28207. return _refreshAccessToken3.apply(this, arguments);
  28208. }
  28209. return _refreshAccessToken;
  28210. }()
  28211. }, {
  28212. key: "getAccessToken",
  28213. value: function () {
  28214. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  28215. var _this$_cache$keys2, e, t, n, s, r, i;
  28216. return _regenerator.default.wrap(function _callee9$(_context9) {
  28217. while (1) {
  28218. switch (_context9.prev = _context9.next) {
  28219. case 0:
  28220. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  28221. if (this._cache.getStore(n)) {
  28222. _context9.next = 3;
  28223. break;
  28224. }
  28225. throw new ne({
  28226. message: "refresh token不存在,登录状态异常"
  28227. });
  28228. case 3:
  28229. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  28230. _context9.t0 = this._shouldRefreshAccessTokenHook;
  28231. if (!_context9.t0) {
  28232. _context9.next = 9;
  28233. break;
  28234. }
  28235. _context9.next = 8;
  28236. return this._shouldRefreshAccessTokenHook(s, r);
  28237. case 8:
  28238. _context9.t0 = !_context9.sent;
  28239. case 9:
  28240. _context9.t1 = _context9.t0;
  28241. if (!_context9.t1) {
  28242. _context9.next = 12;
  28243. break;
  28244. }
  28245. i = !1;
  28246. case 12:
  28247. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  28248. accessToken: s,
  28249. accessTokenExpire: r
  28250. });
  28251. case 13:
  28252. case "end":
  28253. return _context9.stop();
  28254. }
  28255. }
  28256. }, _callee9, this);
  28257. }));
  28258. function getAccessToken() {
  28259. return _getAccessToken.apply(this, arguments);
  28260. }
  28261. return getAccessToken;
  28262. }()
  28263. }, {
  28264. key: "request",
  28265. value: function () {
  28266. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  28267. var s, r, i, _e14, o, _e15, _e16, a, c, u, h, l, d, p, f, g;
  28268. return _regenerator.default.wrap(function _callee10$(_context10) {
  28269. while (1) {
  28270. switch (_context10.prev = _context10.next) {
  28271. case 0:
  28272. s = "x-tcb-trace_".concat(this.config.env);
  28273. r = "application/x-www-form-urlencoded";
  28274. i = _objectSpread({
  28275. action: e,
  28276. env: this.config.env,
  28277. dataVersion: "2019-08-16"
  28278. }, t);
  28279. if (!(-1 === We.indexOf(e))) {
  28280. _context10.next = 10;
  28281. break;
  28282. }
  28283. _e14 = this._cache.keys.refreshTokenKey;
  28284. _context10.t0 = this._cache.getStore(_e14);
  28285. if (!_context10.t0) {
  28286. _context10.next = 10;
  28287. break;
  28288. }
  28289. _context10.next = 9;
  28290. return this.getAccessToken();
  28291. case 9:
  28292. i.access_token = _context10.sent.accessToken;
  28293. case 10:
  28294. if ("storage.uploadFile" === e) {
  28295. o = new FormData();
  28296. for (_e15 in o) {
  28297. o.hasOwnProperty(_e15) && void 0 !== o[_e15] && o.append(_e15, i[_e15]);
  28298. }
  28299. r = "multipart/form-data";
  28300. } else {
  28301. r = "application/json", o = {};
  28302. for (_e16 in i) {
  28303. void 0 !== i[_e16] && (o[_e16] = i[_e16]);
  28304. }
  28305. }
  28306. a = {
  28307. headers: {
  28308. "content-type": r
  28309. }
  28310. };
  28311. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  28312. c = this._localCache.getStore(s);
  28313. c && (a.headers["X-TCB-Trace"] = c);
  28314. u = t.parse, h = t.inQuery, l = t.search;
  28315. d = {
  28316. env: this.config.env
  28317. };
  28318. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  28319. p = function (e, t) {
  28320. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  28321. var s = /\?/.test(t);
  28322. var r = "";
  28323. for (var _e17 in n) {
  28324. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e17, "=").concat(encodeURIComponent(n[_e17]));
  28325. }
  28326. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  28327. }(me, "//tcb-api.tencentcloudapi.com/web", d);
  28328. l && (p += l);
  28329. _context10.next = 22;
  28330. return this.post(_objectSpread({
  28331. url: p,
  28332. data: o
  28333. }, a));
  28334. case 22:
  28335. f = _context10.sent;
  28336. g = f.header && f.header["x-tcb-trace"];
  28337. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  28338. _context10.next = 26;
  28339. break;
  28340. }
  28341. throw new ne({
  28342. code: "NETWORK_ERROR",
  28343. message: "network request error"
  28344. });
  28345. case 26:
  28346. return _context10.abrupt("return", f);
  28347. case 27:
  28348. case "end":
  28349. return _context10.stop();
  28350. }
  28351. }
  28352. }, _callee10, this);
  28353. }));
  28354. function request(_x5, _x6, _x7) {
  28355. return _request.apply(this, arguments);
  28356. }
  28357. return request;
  28358. }()
  28359. }, {
  28360. key: "send",
  28361. value: function () {
  28362. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  28363. var t,
  28364. n,
  28365. _n6,
  28366. _args11 = arguments;
  28367. return _regenerator.default.wrap(function _callee11$(_context11) {
  28368. while (1) {
  28369. switch (_context11.prev = _context11.next) {
  28370. case 0:
  28371. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  28372. _context11.next = 3;
  28373. return this.request(e, t, {
  28374. onUploadProgress: t.onUploadProgress
  28375. });
  28376. case 3:
  28377. n = _context11.sent;
  28378. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  28379. _context11.next = 13;
  28380. break;
  28381. }
  28382. _context11.next = 7;
  28383. return this.refreshAccessToken();
  28384. case 7:
  28385. _context11.next = 9;
  28386. return this.request(e, t, {
  28387. onUploadProgress: t.onUploadProgress
  28388. });
  28389. case 9:
  28390. _n6 = _context11.sent;
  28391. if (!_n6.data.code) {
  28392. _context11.next = 12;
  28393. break;
  28394. }
  28395. throw new ne({
  28396. code: _n6.data.code,
  28397. message: _n6.data.message
  28398. });
  28399. case 12:
  28400. return _context11.abrupt("return", _n6.data);
  28401. case 13:
  28402. if (!n.data.code) {
  28403. _context11.next = 15;
  28404. break;
  28405. }
  28406. throw new ne({
  28407. code: n.data.code,
  28408. message: n.data.message
  28409. });
  28410. case 15:
  28411. return _context11.abrupt("return", n.data);
  28412. case 16:
  28413. case "end":
  28414. return _context11.stop();
  28415. }
  28416. }
  28417. }, _callee11, this);
  28418. }));
  28419. function send(_x8) {
  28420. return _send.apply(this, arguments);
  28421. }
  28422. return send;
  28423. }()
  28424. }, {
  28425. key: "setRefreshToken",
  28426. value: function setRefreshToken(e) {
  28427. var _this$_cache$keys3 = this._cache.keys,
  28428. t = _this$_cache$keys3.accessTokenKey,
  28429. n = _this$_cache$keys3.accessTokenExpireKey,
  28430. s = _this$_cache$keys3.refreshTokenKey;
  28431. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  28432. }
  28433. }]);
  28434. return Ge;
  28435. }();
  28436. var Ve = {};
  28437. function Ye(e) {
  28438. return Ve[e];
  28439. }
  28440. var Qe = /*#__PURE__*/function () {
  28441. function Qe(e) {
  28442. (0, _classCallCheck2.default)(this, Qe);
  28443. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env);
  28444. }
  28445. (0, _createClass2.default)(Qe, [{
  28446. key: "setRefreshToken",
  28447. value: function setRefreshToken(e) {
  28448. var _this$_cache$keys4 = this._cache.keys,
  28449. t = _this$_cache$keys4.accessTokenKey,
  28450. n = _this$_cache$keys4.accessTokenExpireKey,
  28451. s = _this$_cache$keys4.refreshTokenKey;
  28452. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  28453. }
  28454. }, {
  28455. key: "setAccessToken",
  28456. value: function setAccessToken(e, t) {
  28457. var _this$_cache$keys5 = this._cache.keys,
  28458. n = _this$_cache$keys5.accessTokenKey,
  28459. s = _this$_cache$keys5.accessTokenExpireKey;
  28460. this._cache.setStore(n, e), this._cache.setStore(s, t);
  28461. }
  28462. }, {
  28463. key: "refreshUserInfo",
  28464. value: function () {
  28465. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  28466. var _yield$this$_request$, e;
  28467. return _regenerator.default.wrap(function _callee12$(_context12) {
  28468. while (1) {
  28469. switch (_context12.prev = _context12.next) {
  28470. case 0:
  28471. _context12.next = 2;
  28472. return this._request.send("auth.getUserInfo", {});
  28473. case 2:
  28474. _yield$this$_request$ = _context12.sent;
  28475. e = _yield$this$_request$.data;
  28476. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  28477. case 5:
  28478. case "end":
  28479. return _context12.stop();
  28480. }
  28481. }
  28482. }, _callee12, this);
  28483. }));
  28484. function refreshUserInfo() {
  28485. return _refreshUserInfo.apply(this, arguments);
  28486. }
  28487. return refreshUserInfo;
  28488. }()
  28489. }, {
  28490. key: "setLocalUserInfo",
  28491. value: function setLocalUserInfo(e) {
  28492. var t = this._cache.keys.userInfoKey;
  28493. this._cache.setStore(t, e);
  28494. }
  28495. }]);
  28496. return Qe;
  28497. }();
  28498. var Xe = /*#__PURE__*/function () {
  28499. function Xe(e) {
  28500. (0, _classCallCheck2.default)(this, Xe);
  28501. if (!e) throw new ne({
  28502. code: "PARAM_ERROR",
  28503. message: "envId is not defined"
  28504. });
  28505. this._envId = e, this._cache = xe(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  28506. }
  28507. (0, _createClass2.default)(Xe, [{
  28508. key: "linkWithTicket",
  28509. value: function linkWithTicket(e) {
  28510. if ("string" != typeof e) throw new ne({
  28511. code: "PARAM_ERROR",
  28512. message: "ticket must be string"
  28513. });
  28514. return this._request.send("auth.linkWithTicket", {
  28515. ticket: e
  28516. });
  28517. }
  28518. }, {
  28519. key: "linkWithRedirect",
  28520. value: function linkWithRedirect(e) {
  28521. e.signInWithRedirect();
  28522. }
  28523. }, {
  28524. key: "updatePassword",
  28525. value: function updatePassword(e, t) {
  28526. return this._request.send("auth.updatePassword", {
  28527. oldPassword: t,
  28528. newPassword: e
  28529. });
  28530. }
  28531. }, {
  28532. key: "updateEmail",
  28533. value: function updateEmail(e) {
  28534. return this._request.send("auth.updateEmail", {
  28535. newEmail: e
  28536. });
  28537. }
  28538. }, {
  28539. key: "updateUsername",
  28540. value: function updateUsername(e) {
  28541. if ("string" != typeof e) throw new ne({
  28542. code: "PARAM_ERROR",
  28543. message: "username must be a string"
  28544. });
  28545. return this._request.send("auth.updateUsername", {
  28546. username: e
  28547. });
  28548. }
  28549. }, {
  28550. key: "getLinkedUidList",
  28551. value: function () {
  28552. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  28553. var _yield$this$_request$2, e, t, n;
  28554. return _regenerator.default.wrap(function _callee13$(_context13) {
  28555. while (1) {
  28556. switch (_context13.prev = _context13.next) {
  28557. case 0:
  28558. _context13.next = 2;
  28559. return this._request.send("auth.getLinkedUidList", {});
  28560. case 2:
  28561. _yield$this$_request$2 = _context13.sent;
  28562. e = _yield$this$_request$2.data;
  28563. t = !1;
  28564. n = e.users;
  28565. return _context13.abrupt("return", (n.forEach(function (e) {
  28566. e.wxOpenId && e.wxPublicId && (t = !0);
  28567. }), {
  28568. users: n,
  28569. hasPrimaryUid: t
  28570. }));
  28571. case 7:
  28572. case "end":
  28573. return _context13.stop();
  28574. }
  28575. }
  28576. }, _callee13, this);
  28577. }));
  28578. function getLinkedUidList() {
  28579. return _getLinkedUidList.apply(this, arguments);
  28580. }
  28581. return getLinkedUidList;
  28582. }()
  28583. }, {
  28584. key: "setPrimaryUid",
  28585. value: function setPrimaryUid(e) {
  28586. return this._request.send("auth.setPrimaryUid", {
  28587. uid: e
  28588. });
  28589. }
  28590. }, {
  28591. key: "unlink",
  28592. value: function unlink(e) {
  28593. return this._request.send("auth.unlink", {
  28594. platform: e
  28595. });
  28596. }
  28597. }, {
  28598. key: "update",
  28599. value: function () {
  28600. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  28601. var t, n, s, r, i, o, _yield$this$_request$3, a;
  28602. return _regenerator.default.wrap(function _callee14$(_context14) {
  28603. while (1) {
  28604. switch (_context14.prev = _context14.next) {
  28605. case 0:
  28606. t = e.nickName;
  28607. n = e.gender;
  28608. s = e.avatarUrl;
  28609. r = e.province;
  28610. i = e.country;
  28611. o = e.city;
  28612. _context14.next = 8;
  28613. return this._request.send("auth.updateUserInfo", {
  28614. nickName: t,
  28615. gender: n,
  28616. avatarUrl: s,
  28617. province: r,
  28618. country: i,
  28619. city: o
  28620. });
  28621. case 8:
  28622. _yield$this$_request$3 = _context14.sent;
  28623. a = _yield$this$_request$3.data;
  28624. this.setLocalUserInfo(a);
  28625. case 11:
  28626. case "end":
  28627. return _context14.stop();
  28628. }
  28629. }
  28630. }, _callee14, this);
  28631. }));
  28632. function update(_x9) {
  28633. return _update.apply(this, arguments);
  28634. }
  28635. return update;
  28636. }()
  28637. }, {
  28638. key: "refresh",
  28639. value: function () {
  28640. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  28641. var _yield$this$_request$4, e;
  28642. return _regenerator.default.wrap(function _callee15$(_context15) {
  28643. while (1) {
  28644. switch (_context15.prev = _context15.next) {
  28645. case 0:
  28646. _context15.next = 2;
  28647. return this._request.send("auth.getUserInfo", {});
  28648. case 2:
  28649. _yield$this$_request$4 = _context15.sent;
  28650. e = _yield$this$_request$4.data;
  28651. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  28652. case 5:
  28653. case "end":
  28654. return _context15.stop();
  28655. }
  28656. }
  28657. }, _callee15, this);
  28658. }));
  28659. function refresh() {
  28660. return _refresh.apply(this, arguments);
  28661. }
  28662. return refresh;
  28663. }()
  28664. }, {
  28665. key: "setUserInfo",
  28666. value: function setUserInfo() {
  28667. var _this8 = this;
  28668. var e = this._cache.keys.userInfoKey,
  28669. t = this._cache.getStore(e);
  28670. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  28671. _this8[e] = t[e];
  28672. }), this.location = {
  28673. country: t.country,
  28674. province: t.province,
  28675. city: t.city
  28676. };
  28677. }
  28678. }, {
  28679. key: "setLocalUserInfo",
  28680. value: function setLocalUserInfo(e) {
  28681. var t = this._cache.keys.userInfoKey;
  28682. this._cache.setStore(t, e), this.setUserInfo();
  28683. }
  28684. }]);
  28685. return Xe;
  28686. }();
  28687. var Ze = /*#__PURE__*/function () {
  28688. function Ze(e) {
  28689. (0, _classCallCheck2.default)(this, Ze);
  28690. if (!e) throw new ne({
  28691. code: "PARAM_ERROR",
  28692. message: "envId is not defined"
  28693. });
  28694. this._cache = xe(e);
  28695. var _this$_cache$keys6 = this._cache.keys,
  28696. t = _this$_cache$keys6.refreshTokenKey,
  28697. n = _this$_cache$keys6.accessTokenKey,
  28698. s = _this$_cache$keys6.accessTokenExpireKey,
  28699. r = this._cache.getStore(t),
  28700. i = this._cache.getStore(n),
  28701. o = this._cache.getStore(s);
  28702. this.credential = {
  28703. refreshToken: r,
  28704. accessToken: i,
  28705. accessTokenExpire: o
  28706. }, this.user = new Xe(e);
  28707. }
  28708. (0, _createClass2.default)(Ze, [{
  28709. key: "isAnonymousAuth",
  28710. get: function get() {
  28711. return this.loginType === $e.ANONYMOUS;
  28712. }
  28713. }, {
  28714. key: "isCustomAuth",
  28715. get: function get() {
  28716. return this.loginType === $e.CUSTOM;
  28717. }
  28718. }, {
  28719. key: "isWeixinAuth",
  28720. get: function get() {
  28721. return this.loginType === $e.WECHAT || this.loginType === $e.WECHAT_OPEN || this.loginType === $e.WECHAT_PUBLIC;
  28722. }
  28723. }, {
  28724. key: "loginType",
  28725. get: function get() {
  28726. return this._cache.getStore(this._cache.keys.loginTypeKey);
  28727. }
  28728. }]);
  28729. return Ze;
  28730. }();
  28731. var et = /*#__PURE__*/function (_Qe) {
  28732. (0, _inherits2.default)(et, _Qe);
  28733. var _super4 = _createSuper(et);
  28734. function et() {
  28735. (0, _classCallCheck2.default)(this, et);
  28736. return _super4.apply(this, arguments);
  28737. }
  28738. (0, _createClass2.default)(et, [{
  28739. key: "signIn",
  28740. value: function () {
  28741. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  28742. var _this$_cache$keys7, e, t, n, s, r, _e18;
  28743. return _regenerator.default.wrap(function _callee16$(_context16) {
  28744. while (1) {
  28745. switch (_context16.prev = _context16.next) {
  28746. case 0:
  28747. this._cache.updatePersistence("local");
  28748. _this$_cache$keys7 = this._cache.keys;
  28749. e = _this$_cache$keys7.anonymousUuidKey;
  28750. t = _this$_cache$keys7.refreshTokenKey;
  28751. n = this._cache.getStore(e) || void 0;
  28752. s = this._cache.getStore(t) || void 0;
  28753. _context16.next = 8;
  28754. return this._request.send("auth.signInAnonymously", {
  28755. anonymous_uuid: n,
  28756. refresh_token: s
  28757. });
  28758. case 8:
  28759. r = _context16.sent;
  28760. if (!(r.uuid && r.refresh_token)) {
  28761. _context16.next = 20;
  28762. break;
  28763. }
  28764. this._setAnonymousUUID(r.uuid);
  28765. this.setRefreshToken(r.refresh_token);
  28766. _context16.next = 14;
  28767. return this._request.refreshAccessToken();
  28768. case 14:
  28769. De(qe);
  28770. De(Ke, {
  28771. env: this.config.env,
  28772. loginType: $e.ANONYMOUS,
  28773. persistence: "local"
  28774. });
  28775. _e18 = new Ze(this.config.env);
  28776. _context16.next = 19;
  28777. return _e18.user.refresh();
  28778. case 19:
  28779. return _context16.abrupt("return", _e18);
  28780. case 20:
  28781. throw new ne({
  28782. message: "匿名登录失败"
  28783. });
  28784. case 21:
  28785. case "end":
  28786. return _context16.stop();
  28787. }
  28788. }
  28789. }, _callee16, this);
  28790. }));
  28791. function signIn() {
  28792. return _signIn.apply(this, arguments);
  28793. }
  28794. return signIn;
  28795. }()
  28796. }, {
  28797. key: "linkAndRetrieveDataWithTicket",
  28798. value: function () {
  28799. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  28800. var _this$_cache$keys8, t, n, s, r, i;
  28801. return _regenerator.default.wrap(function _callee17$(_context17) {
  28802. while (1) {
  28803. switch (_context17.prev = _context17.next) {
  28804. case 0:
  28805. _this$_cache$keys8 = this._cache.keys;
  28806. t = _this$_cache$keys8.anonymousUuidKey;
  28807. n = _this$_cache$keys8.refreshTokenKey;
  28808. s = this._cache.getStore(t);
  28809. r = this._cache.getStore(n);
  28810. _context17.next = 7;
  28811. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  28812. anonymous_uuid: s,
  28813. refresh_token: r,
  28814. ticket: e
  28815. });
  28816. case 7:
  28817. i = _context17.sent;
  28818. if (!i.refresh_token) {
  28819. _context17.next = 16;
  28820. break;
  28821. }
  28822. this._clearAnonymousUUID();
  28823. this.setRefreshToken(i.refresh_token);
  28824. _context17.next = 13;
  28825. return this._request.refreshAccessToken();
  28826. case 13:
  28827. De(je, {
  28828. env: this.config.env
  28829. });
  28830. De(Ke, {
  28831. loginType: $e.CUSTOM,
  28832. persistence: "local"
  28833. });
  28834. return _context17.abrupt("return", {
  28835. credential: {
  28836. refreshToken: i.refresh_token
  28837. }
  28838. });
  28839. case 16:
  28840. throw new ne({
  28841. message: "匿名转化失败"
  28842. });
  28843. case 17:
  28844. case "end":
  28845. return _context17.stop();
  28846. }
  28847. }
  28848. }, _callee17, this);
  28849. }));
  28850. function linkAndRetrieveDataWithTicket(_x10) {
  28851. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  28852. }
  28853. return linkAndRetrieveDataWithTicket;
  28854. }()
  28855. }, {
  28856. key: "_setAnonymousUUID",
  28857. value: function _setAnonymousUUID(e) {
  28858. var _this$_cache$keys9 = this._cache.keys,
  28859. t = _this$_cache$keys9.anonymousUuidKey,
  28860. n = _this$_cache$keys9.loginTypeKey;
  28861. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, $e.ANONYMOUS);
  28862. }
  28863. }, {
  28864. key: "_clearAnonymousUUID",
  28865. value: function _clearAnonymousUUID() {
  28866. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  28867. }
  28868. }]);
  28869. return et;
  28870. }(Qe);
  28871. var tt = /*#__PURE__*/function (_Qe2) {
  28872. (0, _inherits2.default)(tt, _Qe2);
  28873. var _super5 = _createSuper(tt);
  28874. function tt() {
  28875. (0, _classCallCheck2.default)(this, tt);
  28876. return _super5.apply(this, arguments);
  28877. }
  28878. (0, _createClass2.default)(tt, [{
  28879. key: "signIn",
  28880. value: function () {
  28881. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  28882. var t, n;
  28883. return _regenerator.default.wrap(function _callee18$(_context18) {
  28884. while (1) {
  28885. switch (_context18.prev = _context18.next) {
  28886. case 0:
  28887. if (!("string" != typeof e)) {
  28888. _context18.next = 2;
  28889. break;
  28890. }
  28891. throw new ne({
  28892. code: "PARAM_ERROR",
  28893. message: "ticket must be a string"
  28894. });
  28895. case 2:
  28896. t = this._cache.keys.refreshTokenKey;
  28897. _context18.next = 5;
  28898. return this._request.send("auth.signInWithTicket", {
  28899. ticket: e,
  28900. refresh_token: this._cache.getStore(t) || ""
  28901. });
  28902. case 5:
  28903. n = _context18.sent;
  28904. if (!n.refresh_token) {
  28905. _context18.next = 15;
  28906. break;
  28907. }
  28908. this.setRefreshToken(n.refresh_token);
  28909. _context18.next = 10;
  28910. return this._request.refreshAccessToken();
  28911. case 10:
  28912. De(qe);
  28913. De(Ke, {
  28914. env: this.config.env,
  28915. loginType: $e.CUSTOM,
  28916. persistence: this.config.persistence
  28917. });
  28918. _context18.next = 14;
  28919. return this.refreshUserInfo();
  28920. case 14:
  28921. return _context18.abrupt("return", new Ze(this.config.env));
  28922. case 15:
  28923. throw new ne({
  28924. message: "自定义登录失败"
  28925. });
  28926. case 16:
  28927. case "end":
  28928. return _context18.stop();
  28929. }
  28930. }
  28931. }, _callee18, this);
  28932. }));
  28933. function signIn(_x11) {
  28934. return _signIn2.apply(this, arguments);
  28935. }
  28936. return signIn;
  28937. }()
  28938. }]);
  28939. return tt;
  28940. }(Qe);
  28941. var nt = /*#__PURE__*/function (_Qe3) {
  28942. (0, _inherits2.default)(nt, _Qe3);
  28943. var _super6 = _createSuper(nt);
  28944. function nt() {
  28945. (0, _classCallCheck2.default)(this, nt);
  28946. return _super6.apply(this, arguments);
  28947. }
  28948. (0, _createClass2.default)(nt, [{
  28949. key: "signIn",
  28950. value: function () {
  28951. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  28952. var n, s, r, i, o;
  28953. return _regenerator.default.wrap(function _callee19$(_context19) {
  28954. while (1) {
  28955. switch (_context19.prev = _context19.next) {
  28956. case 0:
  28957. if (!("string" != typeof e)) {
  28958. _context19.next = 2;
  28959. break;
  28960. }
  28961. throw new ne({
  28962. code: "PARAM_ERROR",
  28963. message: "email must be a string"
  28964. });
  28965. case 2:
  28966. n = this._cache.keys.refreshTokenKey;
  28967. _context19.next = 5;
  28968. return this._request.send("auth.signIn", {
  28969. loginType: "EMAIL",
  28970. email: e,
  28971. password: t,
  28972. refresh_token: this._cache.getStore(n) || ""
  28973. });
  28974. case 5:
  28975. s = _context19.sent;
  28976. r = s.refresh_token;
  28977. i = s.access_token;
  28978. o = s.access_token_expire;
  28979. if (!r) {
  28980. _context19.next = 22;
  28981. break;
  28982. }
  28983. this.setRefreshToken(r);
  28984. if (!(i && o)) {
  28985. _context19.next = 15;
  28986. break;
  28987. }
  28988. this.setAccessToken(i, o);
  28989. _context19.next = 17;
  28990. break;
  28991. case 15:
  28992. _context19.next = 17;
  28993. return this._request.refreshAccessToken();
  28994. case 17:
  28995. _context19.next = 19;
  28996. return this.refreshUserInfo();
  28997. case 19:
  28998. De(qe);
  28999. De(Ke, {
  29000. env: this.config.env,
  29001. loginType: $e.EMAIL,
  29002. persistence: this.config.persistence
  29003. });
  29004. return _context19.abrupt("return", new Ze(this.config.env));
  29005. case 22:
  29006. throw s.code ? new ne({
  29007. code: s.code,
  29008. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  29009. }) : new ne({
  29010. message: "邮箱登录失败"
  29011. });
  29012. case 23:
  29013. case "end":
  29014. return _context19.stop();
  29015. }
  29016. }
  29017. }, _callee19, this);
  29018. }));
  29019. function signIn(_x12, _x13) {
  29020. return _signIn3.apply(this, arguments);
  29021. }
  29022. return signIn;
  29023. }()
  29024. }, {
  29025. key: "activate",
  29026. value: function () {
  29027. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  29028. return _regenerator.default.wrap(function _callee20$(_context20) {
  29029. while (1) {
  29030. switch (_context20.prev = _context20.next) {
  29031. case 0:
  29032. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  29033. token: e
  29034. }));
  29035. case 1:
  29036. case "end":
  29037. return _context20.stop();
  29038. }
  29039. }
  29040. }, _callee20, this);
  29041. }));
  29042. function activate(_x14) {
  29043. return _activate.apply(this, arguments);
  29044. }
  29045. return activate;
  29046. }()
  29047. }, {
  29048. key: "resetPasswordWithToken",
  29049. value: function () {
  29050. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  29051. return _regenerator.default.wrap(function _callee21$(_context21) {
  29052. while (1) {
  29053. switch (_context21.prev = _context21.next) {
  29054. case 0:
  29055. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  29056. token: e,
  29057. newPassword: t
  29058. }));
  29059. case 1:
  29060. case "end":
  29061. return _context21.stop();
  29062. }
  29063. }
  29064. }, _callee21, this);
  29065. }));
  29066. function resetPasswordWithToken(_x15, _x16) {
  29067. return _resetPasswordWithToken.apply(this, arguments);
  29068. }
  29069. return resetPasswordWithToken;
  29070. }()
  29071. }]);
  29072. return nt;
  29073. }(Qe);
  29074. var st = /*#__PURE__*/function (_Qe4) {
  29075. (0, _inherits2.default)(st, _Qe4);
  29076. var _super7 = _createSuper(st);
  29077. function st() {
  29078. (0, _classCallCheck2.default)(this, st);
  29079. return _super7.apply(this, arguments);
  29080. }
  29081. (0, _createClass2.default)(st, [{
  29082. key: "signIn",
  29083. value: function () {
  29084. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  29085. var n, s, r, i, o;
  29086. return _regenerator.default.wrap(function _callee22$(_context22) {
  29087. while (1) {
  29088. switch (_context22.prev = _context22.next) {
  29089. case 0:
  29090. if (!("string" != typeof e)) {
  29091. _context22.next = 2;
  29092. break;
  29093. }
  29094. throw new ne({
  29095. code: "PARAM_ERROR",
  29096. message: "username must be a string"
  29097. });
  29098. case 2:
  29099. "string" != typeof t && (t = "", console.warn("password is empty"));
  29100. n = this._cache.keys.refreshTokenKey;
  29101. _context22.next = 6;
  29102. return this._request.send("auth.signIn", {
  29103. loginType: $e.USERNAME,
  29104. username: e,
  29105. password: t,
  29106. refresh_token: this._cache.getStore(n) || ""
  29107. });
  29108. case 6:
  29109. s = _context22.sent;
  29110. r = s.refresh_token;
  29111. i = s.access_token_expire;
  29112. o = s.access_token;
  29113. if (!r) {
  29114. _context22.next = 23;
  29115. break;
  29116. }
  29117. this.setRefreshToken(r);
  29118. if (!(o && i)) {
  29119. _context22.next = 16;
  29120. break;
  29121. }
  29122. this.setAccessToken(o, i);
  29123. _context22.next = 18;
  29124. break;
  29125. case 16:
  29126. _context22.next = 18;
  29127. return this._request.refreshAccessToken();
  29128. case 18:
  29129. _context22.next = 20;
  29130. return this.refreshUserInfo();
  29131. case 20:
  29132. De(qe);
  29133. De(Ke, {
  29134. env: this.config.env,
  29135. loginType: $e.USERNAME,
  29136. persistence: this.config.persistence
  29137. });
  29138. return _context22.abrupt("return", new Ze(this.config.env));
  29139. case 23:
  29140. throw s.code ? new ne({
  29141. code: s.code,
  29142. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  29143. }) : new ne({
  29144. message: "用户名密码登录失败"
  29145. });
  29146. case 24:
  29147. case "end":
  29148. return _context22.stop();
  29149. }
  29150. }
  29151. }, _callee22, this);
  29152. }));
  29153. function signIn(_x17, _x18) {
  29154. return _signIn4.apply(this, arguments);
  29155. }
  29156. return signIn;
  29157. }()
  29158. }]);
  29159. return st;
  29160. }(Qe);
  29161. var rt = /*#__PURE__*/function () {
  29162. function rt(e) {
  29163. (0, _classCallCheck2.default)(this, rt);
  29164. 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);
  29165. }
  29166. (0, _createClass2.default)(rt, [{
  29167. key: "currentUser",
  29168. get: function get() {
  29169. var e = this.hasLoginState();
  29170. return e && e.user || null;
  29171. }
  29172. }, {
  29173. key: "loginType",
  29174. get: function get() {
  29175. return this._cache.getStore(this._cache.keys.loginTypeKey);
  29176. }
  29177. }, {
  29178. key: "anonymousAuthProvider",
  29179. value: function anonymousAuthProvider() {
  29180. return new et(this.config);
  29181. }
  29182. }, {
  29183. key: "customAuthProvider",
  29184. value: function customAuthProvider() {
  29185. return new tt(this.config);
  29186. }
  29187. }, {
  29188. key: "emailAuthProvider",
  29189. value: function emailAuthProvider() {
  29190. return new nt(this.config);
  29191. }
  29192. }, {
  29193. key: "usernameAuthProvider",
  29194. value: function usernameAuthProvider() {
  29195. return new st(this.config);
  29196. }
  29197. }, {
  29198. key: "signInAnonymously",
  29199. value: function () {
  29200. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  29201. return _regenerator.default.wrap(function _callee23$(_context23) {
  29202. while (1) {
  29203. switch (_context23.prev = _context23.next) {
  29204. case 0:
  29205. return _context23.abrupt("return", new et(this.config).signIn());
  29206. case 1:
  29207. case "end":
  29208. return _context23.stop();
  29209. }
  29210. }
  29211. }, _callee23, this);
  29212. }));
  29213. function signInAnonymously() {
  29214. return _signInAnonymously.apply(this, arguments);
  29215. }
  29216. return signInAnonymously;
  29217. }()
  29218. }, {
  29219. key: "signInWithEmailAndPassword",
  29220. value: function () {
  29221. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  29222. return _regenerator.default.wrap(function _callee24$(_context24) {
  29223. while (1) {
  29224. switch (_context24.prev = _context24.next) {
  29225. case 0:
  29226. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  29227. case 1:
  29228. case "end":
  29229. return _context24.stop();
  29230. }
  29231. }
  29232. }, _callee24, this);
  29233. }));
  29234. function signInWithEmailAndPassword(_x19, _x20) {
  29235. return _signInWithEmailAndPassword.apply(this, arguments);
  29236. }
  29237. return signInWithEmailAndPassword;
  29238. }()
  29239. }, {
  29240. key: "signInWithUsernameAndPassword",
  29241. value: function signInWithUsernameAndPassword(e, t) {
  29242. return new st(this.config).signIn(e, t);
  29243. }
  29244. }, {
  29245. key: "linkAndRetrieveDataWithTicket",
  29246. value: function () {
  29247. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  29248. return _regenerator.default.wrap(function _callee25$(_context25) {
  29249. while (1) {
  29250. switch (_context25.prev = _context25.next) {
  29251. case 0:
  29252. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  29253. _context25.next = 3;
  29254. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  29255. case 3:
  29256. return _context25.abrupt("return", _context25.sent);
  29257. case 4:
  29258. case "end":
  29259. return _context25.stop();
  29260. }
  29261. }
  29262. }, _callee25, this);
  29263. }));
  29264. function linkAndRetrieveDataWithTicket(_x21) {
  29265. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  29266. }
  29267. return linkAndRetrieveDataWithTicket;
  29268. }()
  29269. }, {
  29270. key: "signOut",
  29271. value: function () {
  29272. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  29273. var _this$_cache$keys10, e, t, n, s, r;
  29274. return _regenerator.default.wrap(function _callee26$(_context26) {
  29275. while (1) {
  29276. switch (_context26.prev = _context26.next) {
  29277. case 0:
  29278. if (!(this.loginType === $e.ANONYMOUS)) {
  29279. _context26.next = 2;
  29280. break;
  29281. }
  29282. throw new ne({
  29283. message: "匿名用户不支持登出操作"
  29284. });
  29285. case 2:
  29286. _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);
  29287. if (s) {
  29288. _context26.next = 5;
  29289. break;
  29290. }
  29291. return _context26.abrupt("return");
  29292. case 5:
  29293. _context26.next = 7;
  29294. return this._request.send("auth.logout", {
  29295. refresh_token: s
  29296. });
  29297. case 7:
  29298. r = _context26.sent;
  29299. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  29300. env: this.config.env,
  29301. loginType: $e.NULL,
  29302. persistence: this.config.persistence
  29303. }), r));
  29304. case 9:
  29305. case "end":
  29306. return _context26.stop();
  29307. }
  29308. }
  29309. }, _callee26, this);
  29310. }));
  29311. function signOut() {
  29312. return _signOut.apply(this, arguments);
  29313. }
  29314. return signOut;
  29315. }()
  29316. }, {
  29317. key: "signUpWithEmailAndPassword",
  29318. value: function () {
  29319. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  29320. return _regenerator.default.wrap(function _callee27$(_context27) {
  29321. while (1) {
  29322. switch (_context27.prev = _context27.next) {
  29323. case 0:
  29324. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  29325. email: e,
  29326. password: t
  29327. }));
  29328. case 1:
  29329. case "end":
  29330. return _context27.stop();
  29331. }
  29332. }
  29333. }, _callee27, this);
  29334. }));
  29335. function signUpWithEmailAndPassword(_x22, _x23) {
  29336. return _signUpWithEmailAndPassword.apply(this, arguments);
  29337. }
  29338. return signUpWithEmailAndPassword;
  29339. }()
  29340. }, {
  29341. key: "sendPasswordResetEmail",
  29342. value: function () {
  29343. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  29344. return _regenerator.default.wrap(function _callee28$(_context28) {
  29345. while (1) {
  29346. switch (_context28.prev = _context28.next) {
  29347. case 0:
  29348. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  29349. email: e
  29350. }));
  29351. case 1:
  29352. case "end":
  29353. return _context28.stop();
  29354. }
  29355. }
  29356. }, _callee28, this);
  29357. }));
  29358. function sendPasswordResetEmail(_x24) {
  29359. return _sendPasswordResetEmail.apply(this, arguments);
  29360. }
  29361. return sendPasswordResetEmail;
  29362. }()
  29363. }, {
  29364. key: "onLoginStateChanged",
  29365. value: function onLoginStateChanged(e) {
  29366. var _this9 = this;
  29367. Ne(qe, function () {
  29368. var t = _this9.hasLoginState();
  29369. e.call(_this9, t);
  29370. });
  29371. var t = this.hasLoginState();
  29372. e.call(this, t);
  29373. }
  29374. }, {
  29375. key: "onLoginStateExpired",
  29376. value: function onLoginStateExpired(e) {
  29377. Ne(Me, e.bind(this));
  29378. }
  29379. }, {
  29380. key: "onAccessTokenRefreshed",
  29381. value: function onAccessTokenRefreshed(e) {
  29382. Ne(Be, e.bind(this));
  29383. }
  29384. }, {
  29385. key: "onAnonymousConverted",
  29386. value: function onAnonymousConverted(e) {
  29387. Ne(je, e.bind(this));
  29388. }
  29389. }, {
  29390. key: "onLoginTypeChanged",
  29391. value: function onLoginTypeChanged(e) {
  29392. var _this10 = this;
  29393. Ne(Ke, function () {
  29394. var t = _this10.hasLoginState();
  29395. e.call(_this10, t);
  29396. });
  29397. }
  29398. }, {
  29399. key: "getAccessToken",
  29400. value: function () {
  29401. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  29402. return _regenerator.default.wrap(function _callee29$(_context29) {
  29403. while (1) {
  29404. switch (_context29.prev = _context29.next) {
  29405. case 0:
  29406. _context29.next = 2;
  29407. return this._request.getAccessToken();
  29408. case 2:
  29409. _context29.t0 = _context29.sent.accessToken;
  29410. _context29.t1 = this.config.env;
  29411. return _context29.abrupt("return", {
  29412. accessToken: _context29.t0,
  29413. env: _context29.t1
  29414. });
  29415. case 5:
  29416. case "end":
  29417. return _context29.stop();
  29418. }
  29419. }
  29420. }, _callee29, this);
  29421. }));
  29422. function getAccessToken() {
  29423. return _getAccessToken2.apply(this, arguments);
  29424. }
  29425. return getAccessToken;
  29426. }()
  29427. }, {
  29428. key: "hasLoginState",
  29429. value: function hasLoginState() {
  29430. var e = this._cache.keys.refreshTokenKey;
  29431. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  29432. }
  29433. }, {
  29434. key: "isUsernameRegistered",
  29435. value: function () {
  29436. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  29437. var _yield$this$_request$5, t;
  29438. return _regenerator.default.wrap(function _callee30$(_context30) {
  29439. while (1) {
  29440. switch (_context30.prev = _context30.next) {
  29441. case 0:
  29442. if (!("string" != typeof e)) {
  29443. _context30.next = 2;
  29444. break;
  29445. }
  29446. throw new ne({
  29447. code: "PARAM_ERROR",
  29448. message: "username must be a string"
  29449. });
  29450. case 2:
  29451. _context30.next = 4;
  29452. return this._request.send("auth.isUsernameRegistered", {
  29453. username: e
  29454. });
  29455. case 4:
  29456. _yield$this$_request$5 = _context30.sent;
  29457. t = _yield$this$_request$5.data;
  29458. return _context30.abrupt("return", t && t.isRegistered);
  29459. case 7:
  29460. case "end":
  29461. return _context30.stop();
  29462. }
  29463. }
  29464. }, _callee30, this);
  29465. }));
  29466. function isUsernameRegistered(_x25) {
  29467. return _isUsernameRegistered.apply(this, arguments);
  29468. }
  29469. return isUsernameRegistered;
  29470. }()
  29471. }, {
  29472. key: "getLoginState",
  29473. value: function getLoginState() {
  29474. return Promise.resolve(this.hasLoginState());
  29475. }
  29476. }, {
  29477. key: "signInWithTicket",
  29478. value: function () {
  29479. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  29480. return _regenerator.default.wrap(function _callee31$(_context31) {
  29481. while (1) {
  29482. switch (_context31.prev = _context31.next) {
  29483. case 0:
  29484. return _context31.abrupt("return", new tt(this.config).signIn(e));
  29485. case 1:
  29486. case "end":
  29487. return _context31.stop();
  29488. }
  29489. }
  29490. }, _callee31, this);
  29491. }));
  29492. function signInWithTicket(_x26) {
  29493. return _signInWithTicket.apply(this, arguments);
  29494. }
  29495. return signInWithTicket;
  29496. }()
  29497. }, {
  29498. key: "shouldRefreshAccessToken",
  29499. value: function shouldRefreshAccessToken(e) {
  29500. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  29501. }
  29502. }, {
  29503. key: "getUserInfo",
  29504. value: function getUserInfo() {
  29505. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  29506. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  29507. requestId: e.seqId
  29508. });
  29509. });
  29510. }
  29511. }, {
  29512. key: "getAuthHeader",
  29513. value: function getAuthHeader() {
  29514. var _this$_cache$keys11 = this._cache.keys,
  29515. e = _this$_cache$keys11.refreshTokenKey,
  29516. t = _this$_cache$keys11.accessTokenKey,
  29517. n = this._cache.getStore(e);
  29518. return {
  29519. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  29520. };
  29521. }
  29522. }, {
  29523. key: "_onAnonymousConverted",
  29524. value: function _onAnonymousConverted(e) {
  29525. var t = e.data.env;
  29526. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  29527. }
  29528. }, {
  29529. key: "_onLoginTypeChanged",
  29530. value: function _onLoginTypeChanged(e) {
  29531. var _e$data = e.data,
  29532. t = _e$data.loginType,
  29533. n = _e$data.persistence,
  29534. s = _e$data.env;
  29535. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  29536. }
  29537. }]);
  29538. return rt;
  29539. }();
  29540. var it = function it(e, t) {
  29541. t = t || we();
  29542. var n = Ye(this.config.env),
  29543. s = e.cloudPath,
  29544. r = e.filePath,
  29545. i = e.onUploadProgress,
  29546. _e$fileType = e.fileType,
  29547. o = _e$fileType === void 0 ? "image" : _e$fileType;
  29548. return n.send("storage.getUploadMetadata", {
  29549. path: s
  29550. }).then(function (e) {
  29551. var _e$data2 = e.data,
  29552. a = _e$data2.url,
  29553. c = _e$data2.authorization,
  29554. u = _e$data2.token,
  29555. h = _e$data2.fileId,
  29556. l = _e$data2.cosFileId,
  29557. d = e.requestId,
  29558. p = {
  29559. key: s,
  29560. signature: c,
  29561. "x-cos-meta-fileid": l,
  29562. success_action_status: "201",
  29563. "x-cos-security-token": u
  29564. };
  29565. n.upload({
  29566. url: a,
  29567. data: p,
  29568. file: r,
  29569. name: s,
  29570. fileType: o,
  29571. onUploadProgress: i
  29572. }).then(function (e) {
  29573. 201 === e.statusCode ? t(null, {
  29574. fileID: h,
  29575. requestId: d
  29576. }) : t(new ne({
  29577. code: "STORAGE_REQUEST_FAIL",
  29578. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  29579. }));
  29580. }).catch(function (e) {
  29581. t(e);
  29582. });
  29583. }).catch(function (e) {
  29584. t(e);
  29585. }), t.promise;
  29586. },
  29587. ot = function ot(e, t) {
  29588. t = t || we();
  29589. var n = Ye(this.config.env),
  29590. s = e.cloudPath;
  29591. return n.send("storage.getUploadMetadata", {
  29592. path: s
  29593. }).then(function (e) {
  29594. t(null, e);
  29595. }).catch(function (e) {
  29596. t(e);
  29597. }), t.promise;
  29598. },
  29599. at = function at(_ref7, t) {
  29600. var e = _ref7.fileList;
  29601. if (t = t || we(), !e || !Array.isArray(e)) return {
  29602. code: "INVALID_PARAM",
  29603. message: "fileList必须是非空的数组"
  29604. };
  29605. var _iterator3 = _createForOfIteratorHelper(e),
  29606. _step3;
  29607. try {
  29608. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  29609. var _t8 = _step3.value;
  29610. if (!_t8 || "string" != typeof _t8) return {
  29611. code: "INVALID_PARAM",
  29612. message: "fileList的元素必须是非空的字符串"
  29613. };
  29614. }
  29615. } catch (err) {
  29616. _iterator3.e(err);
  29617. } finally {
  29618. _iterator3.f();
  29619. }
  29620. var n = {
  29621. fileid_list: e
  29622. };
  29623. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  29624. e.code ? t(null, e) : t(null, {
  29625. fileList: e.data.delete_list,
  29626. requestId: e.requestId
  29627. });
  29628. }).catch(function (e) {
  29629. t(e);
  29630. }), t.promise;
  29631. },
  29632. ct = function ct(_ref8, t) {
  29633. var e = _ref8.fileList;
  29634. t = t || we(), e && Array.isArray(e) || t(null, {
  29635. code: "INVALID_PARAM",
  29636. message: "fileList必须是非空的数组"
  29637. });
  29638. var n = [];
  29639. var _iterator4 = _createForOfIteratorHelper(e),
  29640. _step4;
  29641. try {
  29642. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  29643. var _s9 = _step4.value;
  29644. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  29645. code: "INVALID_PARAM",
  29646. message: "fileList的元素必须是包含fileID和maxAge的对象"
  29647. }), n.push({
  29648. fileid: _s9.fileID,
  29649. max_age: _s9.maxAge
  29650. })) : "string" == typeof _s9 ? n.push({
  29651. fileid: _s9
  29652. }) : t(null, {
  29653. code: "INVALID_PARAM",
  29654. message: "fileList的元素必须是字符串"
  29655. });
  29656. }
  29657. } catch (err) {
  29658. _iterator4.e(err);
  29659. } finally {
  29660. _iterator4.f();
  29661. }
  29662. var s = {
  29663. file_list: n
  29664. };
  29665. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  29666. e.code ? t(null, e) : t(null, {
  29667. fileList: e.data.download_list,
  29668. requestId: e.requestId
  29669. });
  29670. }).catch(function (e) {
  29671. t(e);
  29672. }), t.promise;
  29673. },
  29674. ut = /*#__PURE__*/function () {
  29675. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  29676. var e, n, s, r;
  29677. return _regenerator.default.wrap(function _callee32$(_context32) {
  29678. while (1) {
  29679. switch (_context32.prev = _context32.next) {
  29680. case 0:
  29681. e = _ref9.fileID;
  29682. _context32.next = 3;
  29683. return ct.call(this, {
  29684. fileList: [{
  29685. fileID: e,
  29686. maxAge: 600
  29687. }]
  29688. });
  29689. case 3:
  29690. n = _context32.sent.fileList[0];
  29691. if (!("SUCCESS" !== n.code)) {
  29692. _context32.next = 6;
  29693. break;
  29694. }
  29695. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  29696. e(n);
  29697. }));
  29698. case 6:
  29699. s = Ye(this.config.env);
  29700. r = n.download_url;
  29701. if (!(r = encodeURI(r), !t)) {
  29702. _context32.next = 10;
  29703. break;
  29704. }
  29705. return _context32.abrupt("return", s.download({
  29706. url: r
  29707. }));
  29708. case 10:
  29709. _context32.t0 = t;
  29710. _context32.next = 13;
  29711. return s.download({
  29712. url: r
  29713. });
  29714. case 13:
  29715. _context32.t1 = _context32.sent;
  29716. (0, _context32.t0)(_context32.t1);
  29717. case 15:
  29718. case "end":
  29719. return _context32.stop();
  29720. }
  29721. }
  29722. }, _callee32, this);
  29723. }));
  29724. return function ut(_x27, _x28) {
  29725. return _ref10.apply(this, arguments);
  29726. };
  29727. }(),
  29728. ht = function ht(_ref11, i) {
  29729. var e = _ref11.name,
  29730. t = _ref11.data,
  29731. n = _ref11.query,
  29732. s = _ref11.parse,
  29733. r = _ref11.search;
  29734. var o = i || we();
  29735. var a;
  29736. try {
  29737. a = t ? JSON.stringify(t) : "";
  29738. } catch (e) {
  29739. return Promise.reject(e);
  29740. }
  29741. if (!e) return Promise.reject(new ne({
  29742. code: "PARAM_ERROR",
  29743. message: "函数名不能为空"
  29744. }));
  29745. var c = {
  29746. inQuery: n,
  29747. parse: s,
  29748. search: r,
  29749. function_name: e,
  29750. request_data: a
  29751. };
  29752. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  29753. if (e.code) o(null, e);else {
  29754. var _t9 = e.data.response_data;
  29755. if (s) o(null, {
  29756. result: _t9,
  29757. requestId: e.requestId
  29758. });else try {
  29759. _t9 = JSON.parse(e.data.response_data), o(null, {
  29760. result: _t9,
  29761. requestId: e.requestId
  29762. });
  29763. } catch (e) {
  29764. o(new ne({
  29765. message: "response data must be json"
  29766. }));
  29767. }
  29768. }
  29769. return o.promise;
  29770. }).catch(function (e) {
  29771. o(e);
  29772. }), o.promise;
  29773. },
  29774. lt = {
  29775. timeout: 15e3,
  29776. persistence: "session"
  29777. },
  29778. dt = {};
  29779. var pt = /*#__PURE__*/function () {
  29780. function pt(e) {
  29781. (0, _classCallCheck2.default)(this, pt);
  29782. this.config = e || this.config, this.authObj = void 0;
  29783. }
  29784. (0, _createClass2.default)(pt, [{
  29785. key: "init",
  29786. value: function init(e) {
  29787. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  29788. timeout: e.timeout || 5e3,
  29789. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  29790. })), this.config = _objectSpread(_objectSpread({}, lt), e), !0) {
  29791. case this.config.timeout > 6e5:
  29792. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  29793. break;
  29794. case this.config.timeout < 100:
  29795. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  29796. }
  29797. return new pt(this.config);
  29798. }
  29799. }, {
  29800. key: "auth",
  29801. value: function auth() {
  29802. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  29803. e = _ref12.persistence;
  29804. if (this.authObj) return this.authObj;
  29805. var t = e || ke.adapter.primaryStorage || lt.persistence;
  29806. var n;
  29807. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  29808. var t = e.env;
  29809. Ee[t] = new Ae(e), Oe[t] = new Ae(_objectSpread(_objectSpread({}, e), {}, {
  29810. persistence: "local"
  29811. }));
  29812. }(this.config), n = this.config, Ve[n.env] = new Ge(n), this.authObj = new rt(this.config), this.authObj;
  29813. }
  29814. }, {
  29815. key: "on",
  29816. value: function on(e, t) {
  29817. return Ne.apply(this, [e, t]);
  29818. }
  29819. }, {
  29820. key: "off",
  29821. value: function off(e, t) {
  29822. return Fe.apply(this, [e, t]);
  29823. }
  29824. }, {
  29825. key: "callFunction",
  29826. value: function callFunction(e, t) {
  29827. return ht.apply(this, [e, t]);
  29828. }
  29829. }, {
  29830. key: "deleteFile",
  29831. value: function deleteFile(e, t) {
  29832. return at.apply(this, [e, t]);
  29833. }
  29834. }, {
  29835. key: "getTempFileURL",
  29836. value: function getTempFileURL(e, t) {
  29837. return ct.apply(this, [e, t]);
  29838. }
  29839. }, {
  29840. key: "downloadFile",
  29841. value: function downloadFile(e, t) {
  29842. return ut.apply(this, [e, t]);
  29843. }
  29844. }, {
  29845. key: "uploadFile",
  29846. value: function uploadFile(e, t) {
  29847. return it.apply(this, [e, t]);
  29848. }
  29849. }, {
  29850. key: "getUploadMetadata",
  29851. value: function getUploadMetadata(e, t) {
  29852. return ot.apply(this, [e, t]);
  29853. }
  29854. }, {
  29855. key: "registerExtension",
  29856. value: function registerExtension(e) {
  29857. dt[e.name] = e;
  29858. }
  29859. }, {
  29860. key: "invokeExtension",
  29861. value: function () {
  29862. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  29863. var n;
  29864. return _regenerator.default.wrap(function _callee33$(_context33) {
  29865. while (1) {
  29866. switch (_context33.prev = _context33.next) {
  29867. case 0:
  29868. n = dt[e];
  29869. if (n) {
  29870. _context33.next = 3;
  29871. break;
  29872. }
  29873. throw new ne({
  29874. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  29875. });
  29876. case 3:
  29877. _context33.next = 5;
  29878. return n.invoke(t, this);
  29879. case 5:
  29880. return _context33.abrupt("return", _context33.sent);
  29881. case 6:
  29882. case "end":
  29883. return _context33.stop();
  29884. }
  29885. }
  29886. }, _callee33, this);
  29887. }));
  29888. function invokeExtension(_x29, _x30) {
  29889. return _invokeExtension.apply(this, arguments);
  29890. }
  29891. return invokeExtension;
  29892. }()
  29893. }, {
  29894. key: "useAdapters",
  29895. value: function useAdapters(e) {
  29896. var _ref13 = be(e) || {},
  29897. t = _ref13.adapter,
  29898. n = _ref13.runtime;
  29899. t && (ke.adapter = t), n && (ke.runtime = n);
  29900. }
  29901. }]);
  29902. return pt;
  29903. }();
  29904. var ft = new pt();
  29905. function gt(e, t, n) {
  29906. void 0 === n && (n = {});
  29907. var s = /\?/.test(t),
  29908. r = "";
  29909. for (var i in n) {
  29910. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  29911. }
  29912. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  29913. }
  29914. var mt = /*#__PURE__*/function () {
  29915. function mt() {
  29916. (0, _classCallCheck2.default)(this, mt);
  29917. }
  29918. (0, _createClass2.default)(mt, [{
  29919. key: "post",
  29920. value: function post(e) {
  29921. var t = e.url,
  29922. n = e.data,
  29923. s = e.headers;
  29924. return new Promise(function (e, r) {
  29925. se.request({
  29926. url: gt("https:", t),
  29927. data: n,
  29928. method: "POST",
  29929. header: s,
  29930. success: function success(t) {
  29931. e(t);
  29932. },
  29933. fail: function fail(e) {
  29934. r(e);
  29935. }
  29936. });
  29937. });
  29938. }
  29939. }, {
  29940. key: "upload",
  29941. value: function upload(e) {
  29942. return new Promise(function (t, n) {
  29943. var s = e.url,
  29944. r = e.file,
  29945. i = e.data,
  29946. o = e.headers,
  29947. a = e.fileType,
  29948. c = se.uploadFile({
  29949. url: gt("https:", s),
  29950. name: "file",
  29951. formData: Object.assign({}, i),
  29952. filePath: r,
  29953. fileType: a,
  29954. header: o,
  29955. success: function success(e) {
  29956. var n = {
  29957. statusCode: e.statusCode,
  29958. data: e.data || {}
  29959. };
  29960. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  29961. },
  29962. fail: function fail(e) {
  29963. n(new Error(e.errMsg || "uploadFile:fail"));
  29964. }
  29965. });
  29966. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  29967. e.onUploadProgress({
  29968. loaded: t.totalBytesSent,
  29969. total: t.totalBytesExpectedToSend
  29970. });
  29971. });
  29972. });
  29973. }
  29974. }]);
  29975. return mt;
  29976. }();
  29977. var yt = {
  29978. setItem: function setItem(e, t) {
  29979. se.setStorageSync(e, t);
  29980. },
  29981. getItem: function getItem(e) {
  29982. return se.getStorageSync(e);
  29983. },
  29984. removeItem: function removeItem(e) {
  29985. se.removeStorageSync(e);
  29986. },
  29987. clear: function clear() {
  29988. se.clearStorageSync();
  29989. }
  29990. };
  29991. var _t = {
  29992. genAdapter: function genAdapter() {
  29993. return {
  29994. root: {},
  29995. reqClass: mt,
  29996. localStorage: yt,
  29997. primaryStorage: "local"
  29998. };
  29999. },
  30000. isMatch: function isMatch() {
  30001. return !0;
  30002. },
  30003. runtime: "uni_app"
  30004. };
  30005. ft.useAdapters(_t);
  30006. var wt = ft,
  30007. vt = wt.init;
  30008. wt.init = function (e) {
  30009. e.env = e.spaceId;
  30010. var t = vt.call(this, e);
  30011. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  30012. var n = t.auth;
  30013. return t.auth = function (e) {
  30014. var t = n.call(this, e);
  30015. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  30016. var n;
  30017. t[e] = (n = t[e], function (e) {
  30018. e = e || {};
  30019. var _te = te(e),
  30020. t = _te.success,
  30021. s = _te.fail,
  30022. r = _te.complete;
  30023. if (!(t || s || r)) return n.call(this, e);
  30024. n.call(this, e).then(function (e) {
  30025. t && t(e), r && r(e);
  30026. }, function (e) {
  30027. s && s(e), r && r(e);
  30028. });
  30029. }).bind(t);
  30030. }), t;
  30031. }, t.customAuth = t.auth, t;
  30032. };
  30033. var It = wt;
  30034. var St = /*#__PURE__*/function (_fe) {
  30035. (0, _inherits2.default)(St, _fe);
  30036. var _super8 = _createSuper(St);
  30037. function St() {
  30038. (0, _classCallCheck2.default)(this, St);
  30039. return _super8.apply(this, arguments);
  30040. }
  30041. (0, _createClass2.default)(St, [{
  30042. key: "getAccessToken",
  30043. value: function getAccessToken() {
  30044. var _this11 = this;
  30045. return new Promise(function (e, t) {
  30046. var n = "Anonymous_Access_token";
  30047. _this11.setAccessToken(n), e(n);
  30048. });
  30049. }
  30050. }, {
  30051. key: "setupRequest",
  30052. value: function setupRequest(e, t) {
  30053. var n = Object.assign({}, e, {
  30054. spaceId: this.config.spaceId,
  30055. timestamp: Date.now()
  30056. }),
  30057. s = {
  30058. "Content-Type": "application/json"
  30059. };
  30060. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret);
  30061. var r = he();
  30062. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  30063. var _re = re(),
  30064. i = _re.token;
  30065. return s["x-client-token"] = i, {
  30066. url: this.config.requestUrl,
  30067. method: "POST",
  30068. data: n,
  30069. dataType: "json",
  30070. header: JSON.parse(JSON.stringify(s))
  30071. };
  30072. }
  30073. }, {
  30074. key: "uploadFileToOSS",
  30075. value: function uploadFileToOSS(_ref14) {
  30076. var _this12 = this;
  30077. var e = _ref14.url,
  30078. t = _ref14.formData,
  30079. n = _ref14.name,
  30080. s = _ref14.filePath,
  30081. r = _ref14.fileType,
  30082. i = _ref14.onUploadProgress;
  30083. return new Promise(function (o, a) {
  30084. var c = _this12.adapter.uploadFile({
  30085. url: e,
  30086. formData: t,
  30087. name: n,
  30088. filePath: s,
  30089. fileType: r,
  30090. success: function success(e) {
  30091. e && e.statusCode < 400 ? o(e) : a(new ne({
  30092. code: "UPLOAD_FAILED",
  30093. message: "文件上传失败"
  30094. }));
  30095. },
  30096. fail: function fail(e) {
  30097. a(new ne({
  30098. code: e.code || "UPLOAD_FAILED",
  30099. message: e.message || e.errMsg || "文件上传失败"
  30100. }));
  30101. }
  30102. });
  30103. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  30104. i({
  30105. loaded: e.totalBytesSent,
  30106. total: e.totalBytesExpectedToSend
  30107. });
  30108. });
  30109. });
  30110. }
  30111. }, {
  30112. key: "uploadFile",
  30113. value: function uploadFile(_ref15) {
  30114. var _this13 = this;
  30115. var e = _ref15.filePath,
  30116. t = _ref15.cloudPath,
  30117. _ref15$fileType = _ref15.fileType,
  30118. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  30119. s = _ref15.onUploadProgress;
  30120. if (!t) throw new ne({
  30121. code: "CLOUDPATH_REQUIRED",
  30122. message: "cloudPath不可为空"
  30123. });
  30124. var r;
  30125. return this.getOSSUploadOptionsFromPath({
  30126. cloudPath: t
  30127. }).then(function (t) {
  30128. var _t$result = t.result,
  30129. i = _t$result.url,
  30130. o = _t$result.formData,
  30131. a = _t$result.name;
  30132. r = t.result.fileUrl;
  30133. var c = {
  30134. url: i,
  30135. formData: o,
  30136. name: a,
  30137. filePath: e,
  30138. fileType: n
  30139. };
  30140. return _this13.uploadFileToOSS(Object.assign({}, c, {
  30141. onUploadProgress: s
  30142. }));
  30143. }).then(function () {
  30144. return _this13.reportOSSUpload({
  30145. cloudPath: t
  30146. });
  30147. }).then(function (t) {
  30148. return new Promise(function (n, s) {
  30149. t.success ? n({
  30150. success: !0,
  30151. filePath: e,
  30152. fileID: r
  30153. }) : s(new ne({
  30154. code: "UPLOAD_FAILED",
  30155. message: "文件上传失败"
  30156. }));
  30157. });
  30158. });
  30159. }
  30160. }, {
  30161. key: "deleteFile",
  30162. value: function deleteFile(_ref16) {
  30163. var e = _ref16.fileList;
  30164. var t = {
  30165. method: "serverless.file.resource.delete",
  30166. params: JSON.stringify({
  30167. fileList: e
  30168. })
  30169. };
  30170. return this.request(this.setupRequest(t)).then(function (e) {
  30171. if (e.success) return e.result;
  30172. throw new ne({
  30173. code: "DELETE_FILE_FAILED",
  30174. message: "删除文件失败"
  30175. });
  30176. });
  30177. }
  30178. }, {
  30179. key: "getTempFileURL",
  30180. value: function getTempFileURL() {
  30181. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30182. e = _ref17.fileList;
  30183. if (!Array.isArray(e) || 0 === e.length) throw new ne({
  30184. code: "INVALID_PARAM",
  30185. message: "fileList的元素必须是非空的字符串"
  30186. });
  30187. var t = {
  30188. method: "serverless.file.resource.getTempFileURL",
  30189. params: JSON.stringify({
  30190. fileList: e
  30191. })
  30192. };
  30193. return this.request(this.setupRequest(t)).then(function (e) {
  30194. if (e.success) return {
  30195. fileList: e.result.fileList.map(function (e) {
  30196. return {
  30197. fileID: e.fileID,
  30198. tempFileURL: e.tempFileURL
  30199. };
  30200. })
  30201. };
  30202. throw new ne({
  30203. code: "GET_TEMP_FILE_URL_FAILED",
  30204. message: "获取临时文件链接失败"
  30205. });
  30206. });
  30207. }
  30208. }]);
  30209. return St;
  30210. }(fe);
  30211. var bt = {
  30212. init: function init(e) {
  30213. var t = new St(e),
  30214. n = {
  30215. signInAnonymously: function signInAnonymously() {
  30216. return t.authorize();
  30217. },
  30218. getLoginState: function getLoginState() {
  30219. return Promise.resolve(!1);
  30220. }
  30221. };
  30222. return t.auth = function () {
  30223. return n;
  30224. }, t.customAuth = t.auth, t;
  30225. }
  30226. };
  30227. function kt(_ref18) {
  30228. var e = _ref18.data;
  30229. var t;
  30230. t = he();
  30231. var n = JSON.parse(JSON.stringify(e || {}));
  30232. if (Object.assign(n, {
  30233. clientInfo: t
  30234. }), !n.uniIdToken) {
  30235. var _re2 = re(),
  30236. _e19 = _re2.token;
  30237. _e19 && (n.uniIdToken = _e19);
  30238. }
  30239. return n;
  30240. }
  30241. function Ct() {
  30242. return _Ct.apply(this, arguments);
  30243. }
  30244. function _Ct() {
  30245. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  30246. var _this26 = this;
  30247. var _ref60,
  30248. e,
  30249. t,
  30250. _this$__dev__,
  30251. n,
  30252. s,
  30253. r,
  30254. i,
  30255. o,
  30256. a,
  30257. _args6 = arguments;
  30258. return _regenerator.default.wrap(function _callee54$(_context54) {
  30259. while (1) {
  30260. switch (_context54.prev = _context54.next) {
  30261. case 0:
  30262. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  30263. _context54.next = 3;
  30264. return this.__dev__.initLocalNetwork();
  30265. case 3:
  30266. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  30267. aliyun: "aliyun",
  30268. tencent: "tcb"
  30269. }[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);
  30270. return _context54.abrupt("return", new Promise(function (t, n) {
  30271. se.request({
  30272. method: "POST",
  30273. url: o,
  30274. data: {
  30275. name: e,
  30276. platform: P,
  30277. provider: r,
  30278. spaceId: i
  30279. },
  30280. timeout: 3e3,
  30281. success: function success(e) {
  30282. t(e);
  30283. },
  30284. fail: function fail() {
  30285. t({
  30286. data: {
  30287. code: "NETWORK_ERROR",
  30288. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  30289. }
  30290. });
  30291. }
  30292. });
  30293. }).then(function () {
  30294. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30295. e = _ref61.data;
  30296. var _ref62 = e || {},
  30297. t = _ref62.code,
  30298. n = _ref62.message;
  30299. return {
  30300. code: 0 === t ? 0 : t || "SYS_ERR",
  30301. message: n || "SYS_ERR"
  30302. };
  30303. }).then(function (_ref63) {
  30304. var n = _ref63.code,
  30305. s = _ref63.message;
  30306. if (0 !== n) {
  30307. switch (n) {
  30308. case "MODULE_ENCRYPTED":
  30309. 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"));
  30310. break;
  30311. case "FUNCTION_ENCRYPTED":
  30312. 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"));
  30313. break;
  30314. case "ACTION_ENCRYPTED":
  30315. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  30316. break;
  30317. case "NETWORK_ERROR":
  30318. {
  30319. var _e31 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  30320. throw console.error(_e31), new Error(_e31);
  30321. }
  30322. case "SWITCH_TO_CLOUD":
  30323. break;
  30324. default:
  30325. {
  30326. 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");
  30327. throw console.error(_e32), new Error(_e32);
  30328. }
  30329. }
  30330. return _this26._callCloudFunction({
  30331. name: e,
  30332. data: t
  30333. });
  30334. }
  30335. return new Promise(function (e, n) {
  30336. var s = kt.call(_this26, {
  30337. data: t
  30338. });
  30339. se.request({
  30340. method: "POST",
  30341. url: a,
  30342. data: {
  30343. provider: r,
  30344. platform: P,
  30345. param: s
  30346. },
  30347. success: function success() {
  30348. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30349. t = _ref64.statusCode,
  30350. s = _ref64.data;
  30351. return !t || t >= 400 ? n(new ne({
  30352. code: s.code || "SYS_ERR",
  30353. message: s.message || "request:fail"
  30354. })) : e({
  30355. result: s
  30356. });
  30357. },
  30358. fail: function fail(e) {
  30359. n(new ne({
  30360. code: e.code || e.errCode || "SYS_ERR",
  30361. message: e.message || e.errMsg || "request:fail"
  30362. }));
  30363. }
  30364. });
  30365. });
  30366. }));
  30367. case 5:
  30368. case "end":
  30369. return _context54.stop();
  30370. }
  30371. }
  30372. }, _callee54, this);
  30373. }));
  30374. return _Ct.apply(this, arguments);
  30375. }
  30376. var Tt = [{
  30377. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  30378. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  30379. mode: "append"
  30380. }];
  30381. var Pt = /[\\^$.*+?()[\]{}|]/g,
  30382. At = RegExp(Pt.source);
  30383. function Et(e, t, n) {
  30384. return e.replace(new RegExp((s = t) && At.test(s) ? s.replace(Pt, "\\$&") : s, "g"), n);
  30385. var s;
  30386. }
  30387. var Ot = "none",
  30388. xt = "request",
  30389. Rt = "response",
  30390. Ut = "both";
  30391. var Lt = /*#__PURE__*/function () {
  30392. function Lt() {
  30393. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30394. e = _ref19.secretType,
  30395. t = _ref19.uniCloudIns;
  30396. (0, _classCallCheck2.default)(this, Lt);
  30397. this.clientType = "", this.secretType = e || Ot, this.uniCloudIns = t;
  30398. var _this$uniCloudIns$con = this.uniCloudIns.config,
  30399. n = _this$uniCloudIns$con.provider,
  30400. s = _this$uniCloudIns$con.spaceId;
  30401. var r;
  30402. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  30403. }
  30404. (0, _createClass2.default)(Lt, [{
  30405. key: "getSystemInfo",
  30406. value: function getSystemInfo() {
  30407. return this._systemInfo || (this._systemInfo = ce()), this._systemInfo;
  30408. }
  30409. }, {
  30410. key: "appId",
  30411. get: function get() {
  30412. return this.getSystemInfo().appId;
  30413. }
  30414. }, {
  30415. key: "deviceId",
  30416. get: function get() {
  30417. return this.getSystemInfo().deviceId;
  30418. }
  30419. }, {
  30420. key: "encryptData",
  30421. value: function () {
  30422. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  30423. return _regenerator.default.wrap(function _callee34$(_context34) {
  30424. while (1) {
  30425. switch (_context34.prev = _context34.next) {
  30426. case 0:
  30427. return _context34.abrupt("return", this.secretType === Ot ? e : this.platformEncryptData(e));
  30428. case 1:
  30429. case "end":
  30430. return _context34.stop();
  30431. }
  30432. }
  30433. }, _callee34, this);
  30434. }));
  30435. function encryptData(_x31) {
  30436. return _encryptData.apply(this, arguments);
  30437. }
  30438. return encryptData;
  30439. }()
  30440. }, {
  30441. key: "decryptResult",
  30442. value: function () {
  30443. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  30444. var _ref20, t, n;
  30445. return _regenerator.default.wrap(function _callee35$(_context35) {
  30446. while (1) {
  30447. switch (_context35.prev = _context35.next) {
  30448. case 0:
  30449. if (!(this.secretType === Ot)) {
  30450. _context35.next = 2;
  30451. break;
  30452. }
  30453. return _context35.abrupt("return", e);
  30454. case 2:
  30455. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  30456. return _context35.abrupt("return", t || !n ? e : this.secretType === xt ? n : this.platformDecryptResult(e));
  30457. case 4:
  30458. case "end":
  30459. return _context35.stop();
  30460. }
  30461. }
  30462. }, _callee35, this);
  30463. }));
  30464. function decryptResult(_x32) {
  30465. return _decryptResult.apply(this, arguments);
  30466. }
  30467. return decryptResult;
  30468. }()
  30469. }, {
  30470. key: "wrapVerifyClientCallFunction",
  30471. value: function wrapVerifyClientCallFunction(e) {
  30472. var t = this;
  30473. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  30474. var _ref22,
  30475. n,
  30476. _ref22$data,
  30477. s,
  30478. r,
  30479. _args36 = arguments;
  30480. return _regenerator.default.wrap(function _callee36$(_context36) {
  30481. while (1) {
  30482. switch (_context36.prev = _context36.next) {
  30483. case 0:
  30484. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  30485. _context36.next = 3;
  30486. return t.prepare();
  30487. case 3:
  30488. _context36.next = 5;
  30489. return t.platformGetSignOption();
  30490. case 5:
  30491. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  30492. _context36.next = 8;
  30493. return e({
  30494. name: n,
  30495. data: s
  30496. });
  30497. case 8:
  30498. r = _context36.sent;
  30499. _context36.t0 = t.isClientKeyNotFound(r);
  30500. if (!_context36.t0) {
  30501. _context36.next = 19;
  30502. break;
  30503. }
  30504. _context36.next = 13;
  30505. return t.prepare({
  30506. forceUpdate: !0
  30507. });
  30508. case 13:
  30509. _context36.next = 15;
  30510. return t.platformGetSignOption();
  30511. case 15:
  30512. s._uniCloudOptions = _context36.sent;
  30513. _context36.next = 18;
  30514. return e({
  30515. name: n,
  30516. data: s
  30517. });
  30518. case 18:
  30519. r = _context36.sent;
  30520. case 19:
  30521. return _context36.abrupt("return", r);
  30522. case 20:
  30523. case "end":
  30524. return _context36.stop();
  30525. }
  30526. }
  30527. }, _callee36);
  30528. }));
  30529. }
  30530. }, {
  30531. key: "wrapEncryptDataCallFunction",
  30532. value: function wrapEncryptDataCallFunction(e) {
  30533. var t = this;
  30534. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  30535. var _ref24,
  30536. n,
  30537. _ref24$data,
  30538. s,
  30539. r,
  30540. i,
  30541. _r3,
  30542. _args37 = arguments;
  30543. return _regenerator.default.wrap(function _callee37$(_context37) {
  30544. while (1) {
  30545. switch (_context37.prev = _context37.next) {
  30546. case 0:
  30547. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  30548. _context37.next = 3;
  30549. return t.prepare();
  30550. case 3:
  30551. _context37.next = 5;
  30552. return t.encryptData(s);
  30553. case 5:
  30554. r = _context37.sent;
  30555. _context37.next = 8;
  30556. return e({
  30557. name: n,
  30558. data: r
  30559. });
  30560. case 8:
  30561. i = _context37.sent;
  30562. if (!t.isClientKeyNotFound(i)) {
  30563. _context37.next = 21;
  30564. break;
  30565. }
  30566. _context37.next = 12;
  30567. return t.prepare({
  30568. forceUpdate: !0
  30569. });
  30570. case 12:
  30571. _context37.next = 14;
  30572. return t.encryptData(s);
  30573. case 14:
  30574. _r3 = _context37.sent;
  30575. _context37.next = 17;
  30576. return t.platformGetSignOption();
  30577. case 17:
  30578. s._uniCloudOptions = _context37.sent;
  30579. _context37.next = 20;
  30580. return e({
  30581. name: n,
  30582. data: _r3
  30583. });
  30584. case 20:
  30585. i = _context37.sent;
  30586. case 21:
  30587. _context37.next = 23;
  30588. return t.decryptResult(i.result);
  30589. case 23:
  30590. i.result = _context37.sent;
  30591. return _context37.abrupt("return", i);
  30592. case 25:
  30593. case "end":
  30594. return _context37.stop();
  30595. }
  30596. }
  30597. }, _callee37);
  30598. }));
  30599. }
  30600. }]);
  30601. return Lt;
  30602. }();
  30603. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  30604. function Nt(e) {
  30605. return parseInt(e) === e;
  30606. }
  30607. function Dt(e) {
  30608. if (!Nt(e.length)) return !1;
  30609. for (var t = 0; t < e.length; t++) {
  30610. if (!Nt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  30611. }
  30612. return !0;
  30613. }
  30614. function Ft(e, t) {
  30615. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  30616. if (Array.isArray(e)) {
  30617. if (!Dt(e)) throw new Error("Array contains invalid value: " + e);
  30618. return new Uint8Array(e);
  30619. }
  30620. if (Nt(e.length) && Dt(e)) return new Uint8Array(e);
  30621. throw new Error("unsupported array-like object");
  30622. }
  30623. function qt(e) {
  30624. return new Uint8Array(e);
  30625. }
  30626. function Mt(e, t, n, s, r) {
  30627. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  30628. }
  30629. var Kt,
  30630. jt = {
  30631. toBytes: function toBytes(e) {
  30632. var t = [],
  30633. n = 0;
  30634. for (e = encodeURI(e); n < e.length;) {
  30635. var s = e.charCodeAt(n++);
  30636. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  30637. }
  30638. return Ft(t);
  30639. },
  30640. fromBytes: function fromBytes(e) {
  30641. for (var t = [], n = 0; n < e.length;) {
  30642. var s = e[n];
  30643. 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);
  30644. }
  30645. return t.join("");
  30646. }
  30647. },
  30648. Bt = (Kt = "0123456789abcdef", {
  30649. toBytes: function toBytes(e) {
  30650. for (var t = [], n = 0; n < e.length; n += 2) {
  30651. t.push(parseInt(e.substr(n, 2), 16));
  30652. }
  30653. return t;
  30654. },
  30655. fromBytes: function fromBytes(e) {
  30656. for (var t = [], n = 0; n < e.length; n++) {
  30657. var s = e[n];
  30658. t.push(Kt[(240 & s) >> 4] + Kt[15 & s]);
  30659. }
  30660. return t.join("");
  30661. }
  30662. }),
  30663. $t = {
  30664. 16: 10,
  30665. 24: 12,
  30666. 32: 14
  30667. },
  30668. 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],
  30669. 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],
  30670. 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],
  30671. 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],
  30672. 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],
  30673. 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],
  30674. 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],
  30675. 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],
  30676. 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],
  30677. 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],
  30678. 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],
  30679. 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],
  30680. 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],
  30681. 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],
  30682. 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];
  30683. function on(e) {
  30684. for (var t = [], n = 0; n < e.length; n += 4) {
  30685. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  30686. }
  30687. return t;
  30688. }
  30689. var an = /*#__PURE__*/function () {
  30690. function an(e) {
  30691. (0, _classCallCheck2.default)(this, an);
  30692. if (!(this instanceof an)) throw Error("AES must be instanitated with `new`");
  30693. Object.defineProperty(this, "key", {
  30694. value: Ft(e, !0)
  30695. }), this._prepare();
  30696. }
  30697. (0, _createClass2.default)(an, [{
  30698. key: "_prepare",
  30699. value: function _prepare() {
  30700. var e = $t[this.key.length];
  30701. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  30702. this._Ke = [], this._Kd = [];
  30703. for (var t = 0; t <= e; t++) {
  30704. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  30705. }
  30706. var n,
  30707. s = 4 * (e + 1),
  30708. r = this.key.length / 4,
  30709. i = on(this.key);
  30710. for (t = 0; t < r; t++) {
  30711. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  30712. }
  30713. for (var o, a = 0, c = r; c < s;) {
  30714. 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++) {
  30715. i[t] ^= i[t - 1];
  30716. } else {
  30717. for (t = 1; t < r / 2; t++) {
  30718. i[t] ^= i[t - 1];
  30719. }
  30720. 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;
  30721. for (t = r / 2 + 1; t < r; t++) {
  30722. i[t] ^= i[t - 1];
  30723. }
  30724. }
  30725. for (t = 0; t < r && c < s;) {
  30726. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  30727. }
  30728. }
  30729. for (var u = 1; u < e; u++) {
  30730. for (var h = 0; h < 4; h++) {
  30731. o = this._Kd[u][h], this._Kd[u][h] = tn[o >> 24 & 255] ^ nn[o >> 16 & 255] ^ sn[o >> 8 & 255] ^ rn[255 & o];
  30732. }
  30733. }
  30734. }
  30735. }, {
  30736. key: "encrypt",
  30737. value: function encrypt(e) {
  30738. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  30739. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  30740. s[r] ^= this._Ke[0][r];
  30741. }
  30742. for (var i = 1; i < t; i++) {
  30743. for (r = 0; r < 4; r++) {
  30744. 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];
  30745. }
  30746. s = n.slice();
  30747. }
  30748. var o,
  30749. a = qt(16);
  30750. for (r = 0; r < 4; r++) {
  30751. 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);
  30752. }
  30753. return a;
  30754. }
  30755. }, {
  30756. key: "decrypt",
  30757. value: function decrypt(e) {
  30758. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  30759. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  30760. s[r] ^= this._Kd[0][r];
  30761. }
  30762. for (var i = 1; i < t; i++) {
  30763. for (r = 0; r < 4; r++) {
  30764. 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];
  30765. }
  30766. s = n.slice();
  30767. }
  30768. var o,
  30769. a = qt(16);
  30770. for (r = 0; r < 4; r++) {
  30771. 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);
  30772. }
  30773. return a;
  30774. }
  30775. }]);
  30776. return an;
  30777. }();
  30778. var cn = /*#__PURE__*/function () {
  30779. function cn(e) {
  30780. (0, _classCallCheck2.default)(this, cn);
  30781. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  30782. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new an(e);
  30783. }
  30784. (0, _createClass2.default)(cn, [{
  30785. key: "encrypt",
  30786. value: function encrypt(e) {
  30787. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  30788. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30789. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.encrypt(n), t, s);
  30790. }
  30791. return t;
  30792. }
  30793. }, {
  30794. key: "decrypt",
  30795. value: function decrypt(e) {
  30796. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext 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.decrypt(n), t, s);
  30799. }
  30800. return t;
  30801. }
  30802. }]);
  30803. return cn;
  30804. }();
  30805. var un = /*#__PURE__*/function () {
  30806. function un(e, t) {
  30807. (0, _classCallCheck2.default)(this, un);
  30808. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  30809. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  30810. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  30811. } else t = qt(16);
  30812. this._lastCipherblock = Ft(t, !0), this._aes = new an(e);
  30813. }
  30814. (0, _createClass2.default)(un, [{
  30815. key: "encrypt",
  30816. value: function encrypt(e) {
  30817. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  30818. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30819. Mt(e, n, 0, s, s + 16);
  30820. for (var r = 0; r < 16; r++) {
  30821. n[r] ^= this._lastCipherblock[r];
  30822. }
  30823. this._lastCipherblock = this._aes.encrypt(n), Mt(this._lastCipherblock, t, s);
  30824. }
  30825. return t;
  30826. }
  30827. }, {
  30828. key: "decrypt",
  30829. value: function decrypt(e) {
  30830. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  30831. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30832. Mt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  30833. for (var r = 0; r < 16; r++) {
  30834. t[s + r] = n[r] ^ this._lastCipherblock[r];
  30835. }
  30836. Mt(e, this._lastCipherblock, 0, s, s + 16);
  30837. }
  30838. return t;
  30839. }
  30840. }]);
  30841. return un;
  30842. }();
  30843. var hn = /*#__PURE__*/function () {
  30844. function hn(e, t, n) {
  30845. (0, _classCallCheck2.default)(this, hn);
  30846. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  30847. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  30848. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  30849. } else t = qt(16);
  30850. n || (n = 1), this.segmentSize = n, this._shiftRegister = Ft(t, !0), this._aes = new an(e);
  30851. }
  30852. (0, _createClass2.default)(hn, [{
  30853. key: "encrypt",
  30854. value: function encrypt(e) {
  30855. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  30856. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  30857. t = this._aes.encrypt(this._shiftRegister);
  30858. for (var r = 0; r < this.segmentSize; r++) {
  30859. n[s + r] ^= t[r];
  30860. }
  30861. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  30862. }
  30863. return n;
  30864. }
  30865. }, {
  30866. key: "decrypt",
  30867. value: function decrypt(e) {
  30868. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  30869. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  30870. t = this._aes.encrypt(this._shiftRegister);
  30871. for (var r = 0; r < this.segmentSize; r++) {
  30872. n[s + r] ^= t[r];
  30873. }
  30874. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  30875. }
  30876. return n;
  30877. }
  30878. }]);
  30879. return hn;
  30880. }();
  30881. var ln = /*#__PURE__*/function () {
  30882. function ln(e, t) {
  30883. (0, _classCallCheck2.default)(this, ln);
  30884. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  30885. if (this.description = "Output Feedback", this.name = "ofb", t) {
  30886. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  30887. } else t = qt(16);
  30888. this._lastPrecipher = Ft(t, !0), this._lastPrecipherIndex = 16, this._aes = new an(e);
  30889. }
  30890. (0, _createClass2.default)(ln, [{
  30891. key: "encrypt",
  30892. value: function encrypt(e) {
  30893. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  30894. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  30895. }
  30896. return t;
  30897. }
  30898. }, {
  30899. key: "decrypt",
  30900. value: function decrypt(e) {
  30901. return this.encrypt(e);
  30902. }
  30903. }]);
  30904. return ln;
  30905. }();
  30906. var dn = /*#__PURE__*/function () {
  30907. function dn(e) {
  30908. (0, _classCallCheck2.default)(this, dn);
  30909. if (!(this instanceof dn)) throw Error("Counter must be instanitated with `new`");
  30910. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = qt(16), this.setValue(e)) : this.setBytes(e);
  30911. }
  30912. (0, _createClass2.default)(dn, [{
  30913. key: "setValue",
  30914. value: function setValue(e) {
  30915. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  30916. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  30917. for (var t = 15; t >= 0; --t) {
  30918. this._counter[t] = e % 256, e = parseInt(e / 256);
  30919. }
  30920. }
  30921. }, {
  30922. key: "setBytes",
  30923. value: function setBytes(e) {
  30924. if (16 != (e = Ft(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  30925. this._counter = e;
  30926. }
  30927. }, {
  30928. key: "increment",
  30929. value: function increment() {
  30930. for (var e = 15; e >= 0; e--) {
  30931. if (255 !== this._counter[e]) {
  30932. this._counter[e]++;
  30933. break;
  30934. }
  30935. this._counter[e] = 0;
  30936. }
  30937. }
  30938. }]);
  30939. return dn;
  30940. }();
  30941. var pn = /*#__PURE__*/function () {
  30942. function pn(e, t) {
  30943. (0, _classCallCheck2.default)(this, pn);
  30944. if (!(this instanceof pn)) throw Error("AES must be instanitated with `new`");
  30945. 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);
  30946. }
  30947. (0, _createClass2.default)(pn, [{
  30948. key: "encrypt",
  30949. value: function encrypt(e) {
  30950. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  30951. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  30952. }
  30953. return t;
  30954. }
  30955. }, {
  30956. key: "decrypt",
  30957. value: function decrypt(e) {
  30958. return this.encrypt(e);
  30959. }
  30960. }]);
  30961. return pn;
  30962. }();
  30963. var fn = {
  30964. AES: an,
  30965. Counter: dn,
  30966. ModeOfOperation: {
  30967. ecb: cn,
  30968. cbc: un,
  30969. cfb: hn,
  30970. ofb: ln,
  30971. ctr: pn
  30972. },
  30973. utils: {
  30974. hex: Bt,
  30975. utf8: jt
  30976. },
  30977. padding: {
  30978. pkcs7: {
  30979. pad: function pad(e) {
  30980. var t = 16 - (e = Ft(e, !0)).length % 16,
  30981. n = qt(e.length + t);
  30982. Mt(e, n);
  30983. for (var s = e.length; s < n.length; s++) {
  30984. n[s] = t;
  30985. }
  30986. return n;
  30987. },
  30988. strip: function strip(e) {
  30989. if ((e = Ft(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  30990. var t = e[e.length - 1];
  30991. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  30992. for (var n = e.length - t, s = 0; s < t; s++) {
  30993. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  30994. }
  30995. var r = qt(n);
  30996. return Mt(e, r, 0, 0, n), r;
  30997. }
  30998. }
  30999. },
  31000. _arrayTest: {
  31001. coerceArray: Ft,
  31002. createArray: qt,
  31003. copyArray: Mt
  31004. }
  31005. };
  31006. function gn(e, t, n) {
  31007. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  31008. r = fn.utils.utf8.toBytes(n),
  31009. i = fn.utils.utf8.toBytes(e),
  31010. o = new fn.ModeOfOperation.cbc(s, r),
  31011. a = fn.padding.pkcs7.pad(i),
  31012. c = o.encrypt(a);
  31013. return uni.arrayBufferToBase64(c);
  31014. }
  31015. var mn = {
  31016. code: 2e4,
  31017. message: "System error"
  31018. },
  31019. yn = {
  31020. code: 20101,
  31021. message: "Invalid client"
  31022. },
  31023. _n = {
  31024. code: 20102,
  31025. message: "Get encrypt key failed"
  31026. },
  31027. wn = {
  31028. 10001: "Secure network is not supported on current playground or unimpsdk",
  31029. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  31030. 10009: "Encrypt payload failed",
  31031. 10010: "Decrypt response failed"
  31032. };
  31033. function vn(e) {
  31034. var _ref25 = e || {},
  31035. t = _ref25.errSubject,
  31036. n = _ref25.subject,
  31037. s = _ref25.errCode,
  31038. r = _ref25.errMsg,
  31039. i = _ref25.code,
  31040. o = _ref25.message,
  31041. a = _ref25.cause;
  31042. return new ne({
  31043. subject: t || n || "uni-secure-network",
  31044. code: s || i || mn.code,
  31045. message: r || o,
  31046. cause: a
  31047. });
  31048. }
  31049. var In,
  31050. Sn,
  31051. bn = null;
  31052. var kn = /*#__PURE__*/function (_Lt) {
  31053. (0, _inherits2.default)(kn, _Lt);
  31054. var _super9 = _createSuper(kn);
  31055. function kn(e) {
  31056. var _this14;
  31057. (0, _classCallCheck2.default)(this, kn);
  31058. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  31059. return _this14;
  31060. }
  31061. (0, _createClass2.default)(kn, [{
  31062. key: "isLogin",
  31063. value: function isLogin() {
  31064. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  31065. }
  31066. }, {
  31067. key: "prepare",
  31068. value: function () {
  31069. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  31070. return _regenerator.default.wrap(function _callee38$(_context38) {
  31071. while (1) {
  31072. switch (_context38.prev = _context38.next) {
  31073. case 0:
  31074. if (this.isLogin()) {
  31075. _context38.next = 7;
  31076. break;
  31077. }
  31078. if (this.scopedGlobalCache.initPromise) {
  31079. _context38.next = 3;
  31080. break;
  31081. }
  31082. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  31083. case 3:
  31084. _context38.next = 5;
  31085. return this.scopedGlobalCache.initPromise;
  31086. case 5:
  31087. if (this.isLogin()) {
  31088. _context38.next = 7;
  31089. break;
  31090. }
  31091. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  31092. case 7:
  31093. case "end":
  31094. return _context38.stop();
  31095. }
  31096. }
  31097. }, _callee38, this);
  31098. }));
  31099. function prepare() {
  31100. return _prepare2.apply(this, arguments);
  31101. }
  31102. return prepare;
  31103. }()
  31104. }, {
  31105. key: "getUserEncryptKey",
  31106. value: function () {
  31107. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  31108. var _this15 = this;
  31109. var e;
  31110. return _regenerator.default.wrap(function _callee39$(_context39) {
  31111. while (1) {
  31112. switch (_context39.prev = _context39.next) {
  31113. case 0:
  31114. if (!this.userEncryptKey) {
  31115. _context39.next = 2;
  31116. break;
  31117. }
  31118. return _context39.abrupt("return", this.userEncryptKey);
  31119. case 2:
  31120. if (!(bn && bn.expireTime)) {
  31121. _context39.next = 6;
  31122. break;
  31123. }
  31124. e = Date.now();
  31125. if (!(bn.expireTime - e > 0)) {
  31126. _context39.next = 6;
  31127. break;
  31128. }
  31129. return _context39.abrupt("return", (this.userEncryptKey = bn, this.userEncryptKey));
  31130. case 6:
  31131. return _context39.abrupt("return", new Promise(function (e, t) {
  31132. uni.getUserCryptoManager().getLatestUserKey({
  31133. success: function success(t) {
  31134. bn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  31135. },
  31136. fail: function fail(e) {
  31137. t(vn(_objectSpread(_objectSpread({}, _n), {}, {
  31138. cause: e
  31139. })));
  31140. }
  31141. });
  31142. }));
  31143. case 7:
  31144. case "end":
  31145. return _context39.stop();
  31146. }
  31147. }
  31148. }, _callee39, this);
  31149. }));
  31150. function getUserEncryptKey() {
  31151. return _getUserEncryptKey.apply(this, arguments);
  31152. }
  31153. return getUserEncryptKey;
  31154. }()
  31155. }, {
  31156. key: "getWxAppId",
  31157. value: function getWxAppId() {
  31158. return wx.getAccountInfoSync().miniProgram.appId;
  31159. }
  31160. }, {
  31161. key: "platformGetSignOption",
  31162. value: function () {
  31163. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  31164. var _yield$this$getUserEn, e, t, n;
  31165. return _regenerator.default.wrap(function _callee40$(_context40) {
  31166. while (1) {
  31167. switch (_context40.prev = _context40.next) {
  31168. case 0:
  31169. _context40.next = 2;
  31170. return this.getUserEncryptKey();
  31171. case 2:
  31172. _yield$this$getUserEn = _context40.sent;
  31173. e = _yield$this$getUserEn.encryptKey;
  31174. t = _yield$this$getUserEn.iv;
  31175. n = _yield$this$getUserEn.version;
  31176. return _context40.abrupt("return", {
  31177. verifyClientSign: gn(JSON.stringify({
  31178. data: JSON.stringify({}),
  31179. appId: this.appId,
  31180. deviceId: this.deviceId,
  31181. wxAppId: this.getWxAppId(),
  31182. simulator: "devtools" === ce().platform,
  31183. timestamp: Date.now()
  31184. }), e, t),
  31185. encryptKeyId: n,
  31186. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  31187. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  31188. });
  31189. case 7:
  31190. case "end":
  31191. return _context40.stop();
  31192. }
  31193. }
  31194. }, _callee40, this);
  31195. }));
  31196. function platformGetSignOption() {
  31197. return _platformGetSignOption.apply(this, arguments);
  31198. }
  31199. return platformGetSignOption;
  31200. }()
  31201. }, {
  31202. key: "platformEncryptData",
  31203. value: function () {
  31204. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  31205. var _yield$this$getUserEn2, t, n, s, r;
  31206. return _regenerator.default.wrap(function _callee41$(_context41) {
  31207. while (1) {
  31208. switch (_context41.prev = _context41.next) {
  31209. case 0:
  31210. _context41.next = 2;
  31211. return this.getUserEncryptKey();
  31212. case 2:
  31213. _yield$this$getUserEn2 = _context41.sent;
  31214. t = _yield$this$getUserEn2.encryptKey;
  31215. n = _yield$this$getUserEn2.iv;
  31216. s = _yield$this$getUserEn2.version;
  31217. r = {
  31218. secretType: this.secretType,
  31219. encryptKeyId: s,
  31220. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  31221. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  31222. };
  31223. return _context41.abrupt("return", this.secretType === Rt ? {
  31224. content: e,
  31225. _uniCloudOptions: r
  31226. } : {
  31227. content: gn(JSON.stringify({
  31228. data: JSON.stringify(e),
  31229. appId: this.appId,
  31230. deviceId: this.deviceId,
  31231. wxAppId: this.getWxAppId(),
  31232. simulator: "devtools" === ce().platform,
  31233. timestamp: Date.now()
  31234. }), t, n),
  31235. _uniCloudOptions: r
  31236. });
  31237. case 8:
  31238. case "end":
  31239. return _context41.stop();
  31240. }
  31241. }
  31242. }, _callee41, this);
  31243. }));
  31244. function platformEncryptData(_x33) {
  31245. return _platformEncryptData.apply(this, arguments);
  31246. }
  31247. return platformEncryptData;
  31248. }()
  31249. }, {
  31250. key: "platformDecryptResult",
  31251. value: function () {
  31252. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  31253. var t, _yield$this$getUserEn3, n, s;
  31254. return _regenerator.default.wrap(function _callee42$(_context42) {
  31255. while (1) {
  31256. switch (_context42.prev = _context42.next) {
  31257. case 0:
  31258. t = e.content;
  31259. _context42.next = 3;
  31260. return this.getUserEncryptKey();
  31261. case 3:
  31262. _yield$this$getUserEn3 = _context42.sent;
  31263. n = _yield$this$getUserEn3.encryptKey;
  31264. s = _yield$this$getUserEn3.iv;
  31265. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  31266. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  31267. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  31268. i = fn.utils.utf8.toBytes(n),
  31269. o = new fn.ModeOfOperation.cbc(r, i),
  31270. a = fn.padding.pkcs7.strip(o.decrypt(s));
  31271. return fn.utils.utf8.fromBytes(a);
  31272. }(t, n, s)));
  31273. case 7:
  31274. case "end":
  31275. return _context42.stop();
  31276. }
  31277. }
  31278. }, _callee42, this);
  31279. }));
  31280. function platformDecryptResult(_x34) {
  31281. return _platformDecryptResult.apply(this, arguments);
  31282. }
  31283. return platformDecryptResult;
  31284. }()
  31285. }, {
  31286. key: "isClientKeyNotFound",
  31287. value: function isClientKeyNotFound() {
  31288. return !1;
  31289. }
  31290. }]);
  31291. return kn;
  31292. }(Lt);
  31293. function Cn(e) {
  31294. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  31295. n = {};
  31296. var _loop = function _loop(_s10) {
  31297. var r = t[_s10];
  31298. n[r] = function () {
  31299. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  31300. t[_key] = arguments[_key];
  31301. }
  31302. return new Promise(function (n, s) {
  31303. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  31304. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31305. e = _ref26.type,
  31306. t = _ref26.data,
  31307. r = _ref26.errCode,
  31308. i = _ref26.errMsg,
  31309. o = _ref26.errSubject,
  31310. a = _ref26.message;
  31311. "success" === e ? n(t) : s(vn({
  31312. errCode: r,
  31313. errMsg: wn[r] || i || a,
  31314. errSubject: o
  31315. }));
  31316. }])) : s(vn({
  31317. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  31318. }));
  31319. });
  31320. };
  31321. };
  31322. for (var _s10 = 0; _s10 < t.length; _s10++) {
  31323. _loop(_s10);
  31324. }
  31325. return n;
  31326. }
  31327. var Tn = /*#__PURE__*/function (_Lt2) {
  31328. (0, _inherits2.default)(Tn, _Lt2);
  31329. var _super10 = _createSuper(Tn);
  31330. function Tn(e) {
  31331. var _this16;
  31332. (0, _classCallCheck2.default)(this, Tn);
  31333. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ce());
  31334. return _this16;
  31335. }
  31336. (0, _createClass2.default)(Tn, [{
  31337. key: "hasClientKey",
  31338. value: function () {
  31339. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  31340. return _regenerator.default.wrap(function _callee43$(_context43) {
  31341. while (1) {
  31342. switch (_context43.prev = _context43.next) {
  31343. case 0:
  31344. _context43.next = 2;
  31345. return this.appUtils.hasClientKey({
  31346. provider: this.provider,
  31347. spaceId: this.spaceId
  31348. });
  31349. case 2:
  31350. this._hasClientKey = _context43.sent;
  31351. return _context43.abrupt("return", this._hasClientKey);
  31352. case 4:
  31353. case "end":
  31354. return _context43.stop();
  31355. }
  31356. }
  31357. }, _callee43, this);
  31358. }));
  31359. function hasClientKey() {
  31360. return _hasClientKey.apply(this, arguments);
  31361. }
  31362. return hasClientKey;
  31363. }()
  31364. }, {
  31365. key: "getAppClientKey",
  31366. value: function () {
  31367. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  31368. var _yield$this$appUtils$, e, t, n, s, r;
  31369. return _regenerator.default.wrap(function _callee44$(_context44) {
  31370. while (1) {
  31371. switch (_context44.prev = _context44.next) {
  31372. case 0:
  31373. _context44.next = 2;
  31374. return this.appUtils.encryptGetClientKeyPayload({
  31375. data: JSON.stringify({})
  31376. });
  31377. case 2:
  31378. _yield$this$appUtils$ = _context44.sent;
  31379. e = _yield$this$appUtils$.data;
  31380. t = _yield$this$appUtils$.key;
  31381. _context44.next = 7;
  31382. return this.uniCloudIns.callFunction({
  31383. name: "DCloud-clientDB",
  31384. data: {
  31385. redirectTo: "encryption",
  31386. action: "getAppClientKey",
  31387. data: e,
  31388. key: t
  31389. }
  31390. });
  31391. case 7:
  31392. _context44.t0 = _context44.sent.result;
  31393. if (_context44.t0) {
  31394. _context44.next = 10;
  31395. break;
  31396. }
  31397. _context44.t0 = {};
  31398. case 10:
  31399. n = _context44.t0;
  31400. if (!(0 !== n.errCode)) {
  31401. _context44.next = 13;
  31402. break;
  31403. }
  31404. throw function (e) {
  31405. return new ne({
  31406. subject: e.errSubject || "uni-secure-network",
  31407. code: e.errCode || e.code || mn.code,
  31408. message: e.errMsg || e.message
  31409. });
  31410. }(n);
  31411. case 13:
  31412. s = n.clientKey, r = n.key;
  31413. _context44.next = 16;
  31414. return this.appUtils.setClientKey({
  31415. provider: this.provider,
  31416. spaceId: this.spaceId,
  31417. clientKey: s,
  31418. key: r
  31419. });
  31420. case 16:
  31421. case "end":
  31422. return _context44.stop();
  31423. }
  31424. }
  31425. }, _callee44, this);
  31426. }));
  31427. function getAppClientKey() {
  31428. return _getAppClientKey.apply(this, arguments);
  31429. }
  31430. return getAppClientKey;
  31431. }()
  31432. }, {
  31433. key: "ensureClientKey",
  31434. value: function () {
  31435. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  31436. var _this17 = this;
  31437. var _ref27,
  31438. _ref27$forceUpdate,
  31439. e,
  31440. _args45 = arguments;
  31441. return _regenerator.default.wrap(function _callee45$(_context45) {
  31442. while (1) {
  31443. switch (_context45.prev = _context45.next) {
  31444. case 0:
  31445. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  31446. _context45.t1 = !0;
  31447. _context45.next = 4;
  31448. return this.hasClientKey();
  31449. case 4:
  31450. _context45.t2 = _context45.sent;
  31451. _context45.t0 = _context45.t1 !== _context45.t2;
  31452. if (_context45.t0) {
  31453. _context45.next = 8;
  31454. break;
  31455. }
  31456. _context45.t0 = e;
  31457. case 8:
  31458. if (!_context45.t0) {
  31459. _context45.next = 10;
  31460. break;
  31461. }
  31462. 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) {
  31463. _this17.scopedGlobalCache.initStatus = p;
  31464. }).catch(function (e) {
  31465. throw _this17.scopedGlobalCache.initStatus = f, e;
  31466. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  31467. case 10:
  31468. case "end":
  31469. return _context45.stop();
  31470. }
  31471. }
  31472. }, _callee45, this);
  31473. }));
  31474. function ensureClientKey() {
  31475. return _ensureClientKey.apply(this, arguments);
  31476. }
  31477. return ensureClientKey;
  31478. }()
  31479. }, {
  31480. key: "prepare",
  31481. value: function () {
  31482. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  31483. var _ref28,
  31484. _ref28$forceUpdate,
  31485. e,
  31486. _args46 = arguments;
  31487. return _regenerator.default.wrap(function _callee46$(_context46) {
  31488. while (1) {
  31489. switch (_context46.prev = _context46.next) {
  31490. case 0:
  31491. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  31492. _context46.next = 3;
  31493. return this.ensureClientKey({
  31494. forceUpdate: e
  31495. });
  31496. case 3:
  31497. case "end":
  31498. return _context46.stop();
  31499. }
  31500. }
  31501. }, _callee46, this);
  31502. }));
  31503. function prepare() {
  31504. return _prepare3.apply(this, arguments);
  31505. }
  31506. return prepare;
  31507. }()
  31508. }, {
  31509. key: "platformGetSignOption",
  31510. value: function () {
  31511. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  31512. var _yield$this$appUtils$2, e, t;
  31513. return _regenerator.default.wrap(function _callee47$(_context47) {
  31514. while (1) {
  31515. switch (_context47.prev = _context47.next) {
  31516. case 0:
  31517. _context47.next = 2;
  31518. return this.appUtils.encrypt({
  31519. provider: this.provider,
  31520. spaceId: this.spaceId,
  31521. data: JSON.stringify({})
  31522. });
  31523. case 2:
  31524. _yield$this$appUtils$2 = _context47.sent;
  31525. e = _yield$this$appUtils$2.data;
  31526. t = _yield$this$appUtils$2.key;
  31527. return _context47.abrupt("return", {
  31528. verifyClientSign: e,
  31529. encryptKeyId: t
  31530. });
  31531. case 6:
  31532. case "end":
  31533. return _context47.stop();
  31534. }
  31535. }
  31536. }, _callee47, this);
  31537. }));
  31538. function platformGetSignOption() {
  31539. return _platformGetSignOption2.apply(this, arguments);
  31540. }
  31541. return platformGetSignOption;
  31542. }()
  31543. }, {
  31544. key: "platformEncryptData",
  31545. value: function () {
  31546. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  31547. var _yield$this$appUtils$3, t, n, s;
  31548. return _regenerator.default.wrap(function _callee48$(_context48) {
  31549. while (1) {
  31550. switch (_context48.prev = _context48.next) {
  31551. case 0:
  31552. _context48.next = 2;
  31553. return this.appUtils.encrypt({
  31554. provider: this.provider,
  31555. spaceId: this.spaceId,
  31556. data: JSON.stringify(e)
  31557. });
  31558. case 2:
  31559. _yield$this$appUtils$3 = _context48.sent;
  31560. t = _yield$this$appUtils$3.data;
  31561. n = _yield$this$appUtils$3.key;
  31562. s = {
  31563. secretType: this.secretType,
  31564. encryptKeyId: n
  31565. };
  31566. return _context48.abrupt("return", this.secretType === Rt ? {
  31567. content: e,
  31568. _uniCloudOptions: s
  31569. } : {
  31570. content: t,
  31571. _uniCloudOptions: s
  31572. });
  31573. case 7:
  31574. case "end":
  31575. return _context48.stop();
  31576. }
  31577. }
  31578. }, _callee48, this);
  31579. }));
  31580. function platformEncryptData(_x35) {
  31581. return _platformEncryptData2.apply(this, arguments);
  31582. }
  31583. return platformEncryptData;
  31584. }()
  31585. }, {
  31586. key: "platformDecryptResult",
  31587. value: function () {
  31588. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  31589. var t, _e$_uniCloudOptions, n, s, r;
  31590. return _regenerator.default.wrap(function _callee49$(_context49) {
  31591. while (1) {
  31592. switch (_context49.prev = _context49.next) {
  31593. case 0:
  31594. t = e.content;
  31595. _e$_uniCloudOptions = e._uniCloudOptions;
  31596. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  31597. s = n.encryptKeyId;
  31598. _context49.next = 6;
  31599. return this.appUtils.decrypt({
  31600. provider: this.provider,
  31601. spaceId: this.spaceId,
  31602. data: t,
  31603. key: s
  31604. });
  31605. case 6:
  31606. r = _context49.sent;
  31607. return _context49.abrupt("return", JSON.parse(r.data));
  31608. case 8:
  31609. case "end":
  31610. return _context49.stop();
  31611. }
  31612. }
  31613. }, _callee49, this);
  31614. }));
  31615. function platformDecryptResult(_x36) {
  31616. return _platformDecryptResult2.apply(this, arguments);
  31617. }
  31618. return platformDecryptResult;
  31619. }()
  31620. }, {
  31621. key: "isClientKeyNotFound",
  31622. value: function isClientKeyNotFound() {
  31623. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31624. var t = e.result || {};
  31625. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  31626. }
  31627. }]);
  31628. return Tn;
  31629. }(Lt);
  31630. function Pn() {
  31631. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31632. e = _ref29.secretType;
  31633. return e === xt || e === Rt || e === Ut;
  31634. }
  31635. function An() {
  31636. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31637. e = _ref30.name,
  31638. _ref30$data = _ref30.data,
  31639. t = _ref30$data === void 0 ? {} : _ref30$data;
  31640. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  31641. }
  31642. function En() {
  31643. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31644. e = _ref31.provider,
  31645. t = _ref31.spaceId,
  31646. n = _ref31.functionName;
  31647. var _ce = ce(),
  31648. s = _ce.appId,
  31649. r = _ce.uniPlatform,
  31650. i = _ce.osName;
  31651. var o = r;
  31652. "app" === r && (o = i);
  31653. var a = function () {
  31654. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31655. e = _ref32.provider,
  31656. t = _ref32.spaceId;
  31657. var n = T;
  31658. if (!n) return {};
  31659. e = function (e) {
  31660. return "tencent" === e ? "tcb" : e;
  31661. }(e);
  31662. var s = n.find(function (n) {
  31663. return n.provider === e && n.spaceId === t;
  31664. });
  31665. return s && s.config;
  31666. }({
  31667. provider: e,
  31668. spaceId: t
  31669. });
  31670. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  31671. var c = a.accessControl.function || {},
  31672. u = Object.keys(c);
  31673. if (0 === u.length) return !0;
  31674. var h = function (e, t) {
  31675. var n, s, r;
  31676. for (var _i2 = 0; _i2 < e.length; _i2++) {
  31677. var _o2 = e[_i2];
  31678. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  31679. return e.trim();
  31680. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  31681. }
  31682. return n || s || r;
  31683. }(u, n);
  31684. if (!h) return !1;
  31685. if ((c[h] || []).find(function () {
  31686. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31687. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  31688. })) return !0;
  31689. 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);
  31690. }
  31691. function On(_ref33) {
  31692. var e = _ref33.functionName,
  31693. t = _ref33.result,
  31694. n = _ref33.logPvd;
  31695. if (b && this.__dev__.debugLog && t && t.requestId) {
  31696. var _s11 = JSON.stringify({
  31697. spaceId: this.config.spaceId,
  31698. functionName: e,
  31699. requestId: t.requestId
  31700. });
  31701. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  31702. }
  31703. }
  31704. function xn(e) {
  31705. var t = e.callFunction,
  31706. n = function n(_n7) {
  31707. var _this18 = this;
  31708. var s = _n7.name;
  31709. _n7.data = kt.call(e, {
  31710. data: _n7.data
  31711. });
  31712. var r = {
  31713. aliyun: "aliyun",
  31714. tencent: "tcb",
  31715. tcb: "tcb"
  31716. }[this.config.provider],
  31717. i = Pn(_n7),
  31718. o = An(_n7),
  31719. a = i || o;
  31720. return t.call(this, _n7).then(function (e) {
  31721. return e.errCode = 0, !a && On.call(_this18, {
  31722. functionName: s,
  31723. result: e,
  31724. logPvd: r
  31725. }), Promise.resolve(e);
  31726. }, function (e) {
  31727. return !a && On.call(_this18, {
  31728. functionName: s,
  31729. result: e,
  31730. logPvd: r
  31731. }), e && e.message && (e.message = function () {
  31732. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31733. _ref34$message = _ref34.message,
  31734. e = _ref34$message === void 0 ? "" : _ref34$message,
  31735. _ref34$extraInfo = _ref34.extraInfo,
  31736. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  31737. _ref34$formatter = _ref34.formatter,
  31738. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  31739. for (var _s12 = 0; _s12 < n.length; _s12++) {
  31740. var _n$_s = n[_s12],
  31741. _r4 = _n$_s.rule,
  31742. _i3 = _n$_s.content,
  31743. _o3 = _n$_s.mode,
  31744. _a = e.match(_r4);
  31745. if (!_a) continue;
  31746. var _c = _i3;
  31747. for (var _e20 = 1; _e20 < _a.length; _e20++) {
  31748. _c = Et(_c, "{$".concat(_e20, "}"), _a[_e20]);
  31749. }
  31750. for (var _e21 in t) {
  31751. _c = Et(_c, "{".concat(_e21, "}"), t[_e21]);
  31752. }
  31753. return "replace" === _o3 ? _c : e + _c;
  31754. }
  31755. return e;
  31756. }({
  31757. message: "[".concat(_n7.name, "]: ").concat(e.message),
  31758. formatter: Tt,
  31759. extraInfo: {
  31760. functionName: s
  31761. }
  31762. })), Promise.reject(e);
  31763. });
  31764. };
  31765. e.callFunction = function (t) {
  31766. var _e$config = e.config,
  31767. s = _e$config.provider,
  31768. r = _e$config.spaceId,
  31769. i = t.name;
  31770. var o, a;
  31771. 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) {
  31772. var e = _ref35.name,
  31773. _ref35$data = _ref35.data,
  31774. t = _ref35$data === void 0 ? {} : _ref35$data;
  31775. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  31776. }(t)) a = o.call(e, t);else if (Pn(t)) {
  31777. a = new Sn({
  31778. secretType: t.secretType,
  31779. uniCloudIns: e
  31780. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  31781. } else if (En({
  31782. provider: s,
  31783. spaceId: r,
  31784. functionName: i
  31785. })) {
  31786. a = new Sn({
  31787. secretType: t.secretType,
  31788. uniCloudIns: e
  31789. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  31790. } else a = o(t);
  31791. return Object.defineProperty(a, "result", {
  31792. get: function get() {
  31793. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  31794. }
  31795. }), a;
  31796. };
  31797. }
  31798. Sn = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  31799. function _class2() {
  31800. (0, _classCallCheck2.default)(this, _class2);
  31801. throw vn({
  31802. message: "Platform ".concat(P, " is not supported by secure network")
  31803. });
  31804. }
  31805. return (0, _createClass2.default)(_class2);
  31806. }() : C ? "mp-weixin" === P ? kn : Tn : /*#__PURE__*/function () {
  31807. function _class3() {
  31808. (0, _classCallCheck2.default)(this, _class3);
  31809. throw vn({
  31810. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  31811. });
  31812. }
  31813. return (0, _createClass2.default)(_class3);
  31814. }();
  31815. var Rn = Symbol("CLIENT_DB_INTERNAL");
  31816. function Un(e, t) {
  31817. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Rn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  31818. get: function get(e, n, s) {
  31819. if ("_uniClient" === n) return null;
  31820. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  31821. if (n in e || "string" != typeof n) {
  31822. var _t10 = e[n];
  31823. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  31824. }
  31825. return t.get(e, n, s);
  31826. }
  31827. });
  31828. }
  31829. function Ln(e) {
  31830. return {
  31831. on: function on(t, n) {
  31832. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  31833. },
  31834. off: function off(t, n) {
  31835. e[t] = e[t] || [];
  31836. var s = e[t].indexOf(n);
  31837. -1 !== s && e[t].splice(s, 1);
  31838. }
  31839. };
  31840. }
  31841. var Nn = ["db.Geo", "db.command", "command.aggregate"];
  31842. function Dn(e, t) {
  31843. return Nn.indexOf("".concat(e, ".").concat(t)) > -1;
  31844. }
  31845. function Fn(e) {
  31846. switch (g(e)) {
  31847. case "array":
  31848. return e.map(function (e) {
  31849. return Fn(e);
  31850. });
  31851. case "object":
  31852. return e._internalType === Rn || Object.keys(e).forEach(function (t) {
  31853. e[t] = Fn(e[t]);
  31854. }), e;
  31855. case "regexp":
  31856. return {
  31857. $regexp: {
  31858. source: e.source,
  31859. flags: e.flags
  31860. }
  31861. };
  31862. case "date":
  31863. return {
  31864. $date: e.toISOString()
  31865. };
  31866. default:
  31867. return e;
  31868. }
  31869. }
  31870. function qn(e) {
  31871. return e && e.content && e.content.$method;
  31872. }
  31873. var Mn = /*#__PURE__*/function () {
  31874. function Mn(e, t, n) {
  31875. (0, _classCallCheck2.default)(this, Mn);
  31876. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  31877. }
  31878. (0, _createClass2.default)(Mn, [{
  31879. key: "toJSON",
  31880. value: function toJSON() {
  31881. var e = this;
  31882. var t = [e.content];
  31883. for (; e.prevStage;) {
  31884. e = e.prevStage, t.push(e.content);
  31885. }
  31886. return {
  31887. $db: t.reverse().map(function (e) {
  31888. return {
  31889. $method: e.$method,
  31890. $param: Fn(e.$param)
  31891. };
  31892. })
  31893. };
  31894. }
  31895. }, {
  31896. key: "toString",
  31897. value: function toString() {
  31898. return JSON.stringify(this.toJSON());
  31899. }
  31900. }, {
  31901. key: "getAction",
  31902. value: function getAction() {
  31903. var e = this.toJSON().$db.find(function (e) {
  31904. return "action" === e.$method;
  31905. });
  31906. return e && e.$param && e.$param[0];
  31907. }
  31908. }, {
  31909. key: "getCommand",
  31910. value: function getCommand() {
  31911. return {
  31912. $db: this.toJSON().$db.filter(function (e) {
  31913. return "action" !== e.$method;
  31914. })
  31915. };
  31916. }
  31917. }, {
  31918. key: "isAggregate",
  31919. get: function get() {
  31920. var e = this;
  31921. for (; e;) {
  31922. var t = qn(e),
  31923. _n8 = qn(e.prevStage);
  31924. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  31925. e = e.prevStage;
  31926. }
  31927. return !1;
  31928. }
  31929. }, {
  31930. key: "isCommand",
  31931. get: function get() {
  31932. var e = this;
  31933. for (; e;) {
  31934. if ("command" === qn(e)) return !0;
  31935. e = e.prevStage;
  31936. }
  31937. return !1;
  31938. }
  31939. }, {
  31940. key: "isAggregateCommand",
  31941. get: function get() {
  31942. var e = this;
  31943. for (; e;) {
  31944. var t = qn(e),
  31945. _n9 = qn(e.prevStage);
  31946. if ("aggregate" === t && "command" === _n9) return !0;
  31947. e = e.prevStage;
  31948. }
  31949. return !1;
  31950. }
  31951. }, {
  31952. key: "getNextStageFn",
  31953. value: function getNextStageFn(e) {
  31954. var t = this;
  31955. return function () {
  31956. return Kn({
  31957. $method: e,
  31958. $param: Fn(Array.from(arguments))
  31959. }, t, t._database);
  31960. };
  31961. }
  31962. }, {
  31963. key: "count",
  31964. get: function get() {
  31965. return this.isAggregate ? this.getNextStageFn("count") : function () {
  31966. return this._send("count", Array.from(arguments));
  31967. };
  31968. }
  31969. }, {
  31970. key: "remove",
  31971. get: function get() {
  31972. return this.isCommand ? this.getNextStageFn("remove") : function () {
  31973. return this._send("remove", Array.from(arguments));
  31974. };
  31975. }
  31976. }, {
  31977. key: "get",
  31978. value: function get() {
  31979. return this._send("get", Array.from(arguments));
  31980. }
  31981. }, {
  31982. key: "add",
  31983. get: function get() {
  31984. return this.isCommand ? this.getNextStageFn("add") : function () {
  31985. return this._send("add", Array.from(arguments));
  31986. };
  31987. }
  31988. }, {
  31989. key: "update",
  31990. value: function update() {
  31991. return this._send("update", Array.from(arguments));
  31992. }
  31993. }, {
  31994. key: "end",
  31995. value: function end() {
  31996. return this._send("end", Array.from(arguments));
  31997. }
  31998. }, {
  31999. key: "set",
  32000. get: function get() {
  32001. return this.isCommand ? this.getNextStageFn("set") : function () {
  32002. throw new Error("JQL禁止使用set方法");
  32003. };
  32004. }
  32005. }, {
  32006. key: "_send",
  32007. value: function _send(e, t) {
  32008. var n = this.getAction(),
  32009. s = this.getCommand();
  32010. if (s.$db.push({
  32011. $method: e,
  32012. $param: Fn(t)
  32013. }), b) {
  32014. var _e22 = s.$db.find(function (e) {
  32015. return "collection" === e.$method;
  32016. }),
  32017. _t11 = _e22 && _e22.$param;
  32018. _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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  32019. }
  32020. return this._database._callCloudFunction({
  32021. action: n,
  32022. command: s
  32023. });
  32024. }
  32025. }]);
  32026. return Mn;
  32027. }();
  32028. function Kn(e, t, n) {
  32029. return Un(new Mn(e, t, n), {
  32030. get: function get(e, t) {
  32031. var s = "db";
  32032. return e && e.content && (s = e.content.$method), Dn(s, t) ? Kn({
  32033. $method: t
  32034. }, e, n) : function () {
  32035. return Kn({
  32036. $method: t,
  32037. $param: Fn(Array.from(arguments))
  32038. }, e, n);
  32039. };
  32040. }
  32041. });
  32042. }
  32043. function jn(_ref36) {
  32044. var e = _ref36.path,
  32045. t = _ref36.method;
  32046. return /*#__PURE__*/function () {
  32047. function _class4() {
  32048. (0, _classCallCheck2.default)(this, _class4);
  32049. this.param = Array.from(arguments);
  32050. }
  32051. (0, _createClass2.default)(_class4, [{
  32052. key: "toJSON",
  32053. value: function toJSON() {
  32054. return {
  32055. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  32056. return {
  32057. $method: e
  32058. };
  32059. })), [{
  32060. $method: t,
  32061. $param: this.param
  32062. }])
  32063. };
  32064. }
  32065. }, {
  32066. key: "toString",
  32067. value: function toString() {
  32068. return JSON.stringify(this.toJSON());
  32069. }
  32070. }]);
  32071. return _class4;
  32072. }();
  32073. }
  32074. function Bn(e) {
  32075. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32076. return Un(new e(t), {
  32077. get: function get(e, t) {
  32078. return Dn("db", t) ? Kn({
  32079. $method: t
  32080. }, null, e) : function () {
  32081. return Kn({
  32082. $method: t,
  32083. $param: Fn(Array.from(arguments))
  32084. }, null, e);
  32085. };
  32086. }
  32087. });
  32088. }
  32089. var $n = /*#__PURE__*/function (_ref37) {
  32090. (0, _inherits2.default)($n, _ref37);
  32091. var _super11 = _createSuper($n);
  32092. function $n() {
  32093. (0, _classCallCheck2.default)(this, $n);
  32094. return _super11.apply(this, arguments);
  32095. }
  32096. (0, _createClass2.default)($n, [{
  32097. key: "_parseResult",
  32098. value: function _parseResult(e) {
  32099. return this._isJQL ? e.result : e;
  32100. }
  32101. }, {
  32102. key: "_callCloudFunction",
  32103. value: function _callCloudFunction(_ref38) {
  32104. var _this19 = this;
  32105. var e = _ref38.action,
  32106. t = _ref38.command,
  32107. n = _ref38.multiCommand,
  32108. s = _ref38.queryList;
  32109. function r(e, t) {
  32110. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  32111. var _r5 = s[_n10];
  32112. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  32113. }
  32114. }
  32115. var i = this,
  32116. o = this._isJQL ? "databaseForJQL" : "database";
  32117. function a(e) {
  32118. return i._callback("error", [e]), q(M(o, "fail"), e).then(function () {
  32119. return q(M(o, "complete"), e);
  32120. }).then(function () {
  32121. return r(null, e), Q(B, {
  32122. type: z,
  32123. content: e
  32124. }), Promise.reject(e);
  32125. });
  32126. }
  32127. var c = q(M(o, "invoke")),
  32128. u = this._uniClient;
  32129. return c.then(function () {
  32130. return u.callFunction({
  32131. name: "DCloud-clientDB",
  32132. type: l,
  32133. data: {
  32134. action: e,
  32135. command: t,
  32136. multiCommand: n
  32137. }
  32138. });
  32139. }).then(function (e) {
  32140. var _e$result = e.result,
  32141. t = _e$result.code,
  32142. n = _e$result.message,
  32143. s = _e$result.token,
  32144. c = _e$result.tokenExpired,
  32145. _e$result$systemInfo = _e$result.systemInfo,
  32146. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  32147. if (u) for (var _e23 = 0; _e23 < u.length; _e23++) {
  32148. var _u$_e = u[_e23],
  32149. _t12 = _u$_e.level,
  32150. _n11 = _u$_e.message,
  32151. _s13 = _u$_e.detail,
  32152. _r6 = console["app" === P && "warn" === _t12 ? "error" : _t12] || console.log;
  32153. var _i4 = "[System Info]" + _n11;
  32154. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  32155. }
  32156. if (t) {
  32157. return a(new ne({
  32158. code: t,
  32159. message: n,
  32160. requestId: e.requestId
  32161. }));
  32162. }
  32163. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (ie({
  32164. token: s,
  32165. tokenExpired: c
  32166. }), _this19._callbackAuth("refreshToken", [{
  32167. token: s,
  32168. tokenExpired: c
  32169. }]), _this19._callback("refreshToken", [{
  32170. token: s,
  32171. tokenExpired: c
  32172. }]), Q(W, {
  32173. token: s,
  32174. tokenExpired: c
  32175. }));
  32176. var h = [{
  32177. prop: "affectedDocs",
  32178. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  32179. }, {
  32180. prop: "code",
  32181. tips: "code不再推荐使用,请使用errCode替代"
  32182. }, {
  32183. prop: "message",
  32184. tips: "message不再推荐使用,请使用errMsg替代"
  32185. }];
  32186. var _loop2 = function _loop2(_t13) {
  32187. var _h$_t = h[_t13],
  32188. n = _h$_t.prop,
  32189. s = _h$_t.tips;
  32190. if (n in e.result) {
  32191. var _t14 = e.result[n];
  32192. Object.defineProperty(e.result, n, {
  32193. get: function get() {
  32194. return console.warn(s), _t14;
  32195. }
  32196. });
  32197. }
  32198. };
  32199. for (var _t13 = 0; _t13 < h.length; _t13++) {
  32200. _loop2(_t13);
  32201. }
  32202. return function (e) {
  32203. return q(M(o, "success"), e).then(function () {
  32204. return q(M(o, "complete"), e);
  32205. }).then(function () {
  32206. r(e, null);
  32207. var t = i._parseResult(e);
  32208. return Q(B, {
  32209. type: z,
  32210. content: t
  32211. }), Promise.resolve(t);
  32212. });
  32213. }(e);
  32214. }, function (e) {
  32215. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  32216. return a(new ne({
  32217. code: e.code || "SYSTEM_ERROR",
  32218. message: e.message,
  32219. requestId: e.requestId
  32220. }));
  32221. });
  32222. }
  32223. }]);
  32224. return $n;
  32225. }( /*#__PURE__*/function () {
  32226. function _class5() {
  32227. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32228. _ref39$uniClient = _ref39.uniClient,
  32229. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  32230. _ref39$isJQL = _ref39.isJQL,
  32231. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  32232. (0, _classCallCheck2.default)(this, _class5);
  32233. 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({}, {
  32234. get: function get(e, t) {
  32235. return {
  32236. $env: t
  32237. };
  32238. }
  32239. }), this.Geo = Un({}, {
  32240. get: function get(e, t) {
  32241. return jn({
  32242. path: ["Geo"],
  32243. method: t
  32244. });
  32245. }
  32246. }), this.serverDate = jn({
  32247. path: [],
  32248. method: "serverDate"
  32249. }), this.RegExp = jn({
  32250. path: [],
  32251. method: "RegExp"
  32252. });
  32253. }
  32254. (0, _createClass2.default)(_class5, [{
  32255. key: "getCloudEnv",
  32256. value: function getCloudEnv(e) {
  32257. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  32258. return {
  32259. $env: e.replace("$cloudEnv_", "")
  32260. };
  32261. }
  32262. }, {
  32263. key: "_callback",
  32264. value: function _callback(e, t) {
  32265. var n = this._dbCallBacks;
  32266. n[e] && n[e].forEach(function (e) {
  32267. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  32268. });
  32269. }
  32270. }, {
  32271. key: "_callbackAuth",
  32272. value: function _callbackAuth(e, t) {
  32273. var n = this._authCallBacks;
  32274. n[e] && n[e].forEach(function (e) {
  32275. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  32276. });
  32277. }
  32278. }, {
  32279. key: "multiSend",
  32280. value: function multiSend() {
  32281. var e = Array.from(arguments),
  32282. t = e.map(function (e) {
  32283. var t = e.getAction(),
  32284. n = e.getCommand();
  32285. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  32286. return {
  32287. action: t,
  32288. command: n
  32289. };
  32290. });
  32291. return this._callCloudFunction({
  32292. multiCommand: t,
  32293. queryList: e
  32294. });
  32295. }
  32296. }]);
  32297. return _class5;
  32298. }());
  32299. var Wn = "token无效,跳转登录页面",
  32300. zn = "token过期,跳转登录页面",
  32301. Jn = {
  32302. TOKEN_INVALID_TOKEN_EXPIRED: zn,
  32303. TOKEN_INVALID_INVALID_CLIENTID: Wn,
  32304. TOKEN_INVALID: Wn,
  32305. TOKEN_INVALID_WRONG_TOKEN: Wn,
  32306. TOKEN_INVALID_ANONYMOUS_USER: Wn
  32307. },
  32308. Hn = {
  32309. "uni-id-token-expired": zn,
  32310. "uni-id-check-token-failed": Wn,
  32311. "uni-id-token-not-exist": Wn,
  32312. "uni-id-check-device-feature-failed": Wn
  32313. };
  32314. function Gn(e, t) {
  32315. var n = "";
  32316. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  32317. }
  32318. function Vn() {
  32319. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  32320. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  32321. var n = [],
  32322. s = [];
  32323. return e.forEach(function (e) {
  32324. !0 === e.needLogin ? n.push(Gn(t, e.path)) : !1 === e.needLogin && s.push(Gn(t, e.path));
  32325. }), {
  32326. needLoginPage: n,
  32327. notNeedLoginPage: s
  32328. };
  32329. }
  32330. function Yn(e) {
  32331. return e.split("?")[0].replace(/^\//, "");
  32332. }
  32333. function Qn() {
  32334. return function (e) {
  32335. var t = e && e.$page && e.$page.fullPath || "";
  32336. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  32337. }(function () {
  32338. var e = getCurrentPages();
  32339. return e[e.length - 1];
  32340. }());
  32341. }
  32342. function Xn() {
  32343. return Yn(Qn());
  32344. }
  32345. function Zn() {
  32346. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  32347. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32348. if (!e) return !1;
  32349. if (!(t && t.list && t.list.length)) return !1;
  32350. var n = t.list,
  32351. s = Yn(e);
  32352. return n.some(function (e) {
  32353. return e.pagePath === s;
  32354. });
  32355. }
  32356. var es = !!_pages.default.uniIdRouter;
  32357. var _ref40 = function () {
  32358. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  32359. _ref21$pages = _ref21.pages,
  32360. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  32361. _ref21$subPackages = _ref21.subPackages,
  32362. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  32363. _ref21$uniIdRouter = _ref21.uniIdRouter,
  32364. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  32365. _ref21$tabBar = _ref21.tabBar,
  32366. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  32367. var i = s.loginPage,
  32368. _s$needLogin = s.needLogin,
  32369. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  32370. _s$resToLogin = s.resToLogin,
  32371. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  32372. _Vn = Vn(e),
  32373. c = _Vn.needLoginPage,
  32374. u = _Vn.notNeedLoginPage,
  32375. _ref23 = function () {
  32376. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  32377. var t = [],
  32378. n = [];
  32379. return e.forEach(function (e) {
  32380. var s = e.root,
  32381. _e$pages = e.pages,
  32382. r = _e$pages === void 0 ? [] : _e$pages,
  32383. _Vn2 = Vn(r, s),
  32384. i = _Vn2.needLoginPage,
  32385. o = _Vn2.notNeedLoginPage;
  32386. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  32387. }), {
  32388. needLoginPage: t,
  32389. notNeedLoginPage: n
  32390. };
  32391. }(n),
  32392. h = _ref23.needLoginPage,
  32393. l = _ref23.notNeedLoginPage;
  32394. return {
  32395. loginPage: i,
  32396. routerNeedLogin: o,
  32397. resToLogin: a,
  32398. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  32399. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  32400. loginPageInTabBar: Zn(i, r)
  32401. };
  32402. }(),
  32403. ts = _ref40.loginPage,
  32404. ns = _ref40.routerNeedLogin,
  32405. ss = _ref40.resToLogin,
  32406. rs = _ref40.needLoginPage,
  32407. is = _ref40.notNeedLoginPage,
  32408. os = _ref40.loginPageInTabBar;
  32409. if (rs.indexOf(ts) > -1) throw new Error("Login page [".concat(ts, "] should not be \"needLogin\", please check your pages.json"));
  32410. function as(e) {
  32411. var t = Xn();
  32412. if ("/" === e.charAt(0)) return e;
  32413. var _e$split = e.split("?"),
  32414. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  32415. n = _e$split2[0],
  32416. s = _e$split2[1],
  32417. r = n.replace(/^\//, "").split("/"),
  32418. i = t.split("/");
  32419. i.pop();
  32420. for (var _e24 = 0; _e24 < r.length; _e24++) {
  32421. var _t15 = r[_e24];
  32422. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  32423. }
  32424. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  32425. }
  32426. function cs(e) {
  32427. var t = Yn(as(e));
  32428. return !(is.indexOf(t) > -1) && (rs.indexOf(t) > -1 || ns.some(function (t) {
  32429. return function (e, t) {
  32430. return new RegExp(t).test(e);
  32431. }(e, t);
  32432. }));
  32433. }
  32434. function us(_ref41) {
  32435. var e = _ref41.redirect;
  32436. var t = Yn(e),
  32437. n = Yn(ts);
  32438. return Xn() !== n && t !== n;
  32439. }
  32440. function hs() {
  32441. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32442. e = _ref42.api,
  32443. t = _ref42.redirect;
  32444. if (!t || !us({
  32445. redirect: t
  32446. })) return;
  32447. var n = function (e, t) {
  32448. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  32449. }(ts, t);
  32450. os ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  32451. var s = {
  32452. navigateTo: uni.navigateTo,
  32453. redirectTo: uni.redirectTo,
  32454. switchTab: uni.switchTab,
  32455. reLaunch: uni.reLaunch
  32456. };
  32457. setTimeout(function () {
  32458. s[e]({
  32459. url: n
  32460. });
  32461. });
  32462. }
  32463. function ls() {
  32464. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32465. e = _ref43.url;
  32466. var t = {
  32467. abortLoginPageJump: !1,
  32468. autoToLoginPage: !1
  32469. },
  32470. n = function () {
  32471. var _re3 = re(),
  32472. e = _re3.token,
  32473. t = _re3.tokenExpired;
  32474. var n;
  32475. if (e) {
  32476. if (t < Date.now()) {
  32477. var _e25 = "uni-id-token-expired";
  32478. n = {
  32479. errCode: _e25,
  32480. errMsg: Hn[_e25]
  32481. };
  32482. }
  32483. } else {
  32484. var _e26 = "uni-id-check-token-failed";
  32485. n = {
  32486. errCode: _e26,
  32487. errMsg: Hn[_e26]
  32488. };
  32489. }
  32490. return n;
  32491. }();
  32492. if (cs(e) && n) {
  32493. n.uniIdRedirectUrl = e;
  32494. if (G($).length > 0) return setTimeout(function () {
  32495. Q($, n);
  32496. }, 0), t.abortLoginPageJump = !0, t;
  32497. t.autoToLoginPage = !0;
  32498. }
  32499. return t;
  32500. }
  32501. function ds() {
  32502. !function () {
  32503. var e = Qn(),
  32504. _ls = ls({
  32505. url: e
  32506. }),
  32507. t = _ls.abortLoginPageJump,
  32508. n = _ls.autoToLoginPage;
  32509. t || n && hs({
  32510. api: "redirectTo",
  32511. redirect: e
  32512. });
  32513. }();
  32514. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  32515. var _loop3 = function _loop3(_t16) {
  32516. var n = e[_t16];
  32517. uni.addInterceptor(n, {
  32518. invoke: function invoke(e) {
  32519. var _ls2 = ls({
  32520. url: e.url
  32521. }),
  32522. t = _ls2.abortLoginPageJump,
  32523. s = _ls2.autoToLoginPage;
  32524. return t ? e : s ? (hs({
  32525. api: n,
  32526. redirect: as(e.url)
  32527. }), !1) : e;
  32528. }
  32529. });
  32530. };
  32531. for (var _t16 = 0; _t16 < e.length; _t16++) {
  32532. _loop3(_t16);
  32533. }
  32534. }
  32535. function ps() {
  32536. this.onResponse(function (e) {
  32537. var t = e.type,
  32538. n = e.content;
  32539. var s = !1;
  32540. switch (t) {
  32541. case "cloudobject":
  32542. s = function (e) {
  32543. if ("object" != (0, _typeof2.default)(e)) return !1;
  32544. var _ref44 = e || {},
  32545. t = _ref44.errCode;
  32546. return t in Hn;
  32547. }(n);
  32548. break;
  32549. case "clientdb":
  32550. s = function (e) {
  32551. if ("object" != (0, _typeof2.default)(e)) return !1;
  32552. var _ref45 = e || {},
  32553. t = _ref45.errCode;
  32554. return t in Jn;
  32555. }(n);
  32556. }
  32557. s && function () {
  32558. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32559. var t = G($);
  32560. ee().then(function () {
  32561. var n = Qn();
  32562. if (n && us({
  32563. redirect: n
  32564. })) return t.length > 0 ? Q($, Object.assign({
  32565. uniIdRedirectUrl: n
  32566. }, e)) : void (ts && hs({
  32567. api: "navigateTo",
  32568. redirect: n
  32569. }));
  32570. });
  32571. }(n);
  32572. });
  32573. }
  32574. function fs(e) {
  32575. !function (e) {
  32576. e.onResponse = function (e) {
  32577. V(B, e);
  32578. }, e.offResponse = function (e) {
  32579. Y(B, e);
  32580. };
  32581. }(e), function (e) {
  32582. e.onNeedLogin = function (e) {
  32583. V($, e);
  32584. }, e.offNeedLogin = function (e) {
  32585. Y($, e);
  32586. }, es && (U("_globalUniCloudStatus").needLoginInit || (U("_globalUniCloudStatus").needLoginInit = !0, ee().then(function () {
  32587. ds.call(e);
  32588. }), ss && ps.call(e)));
  32589. }(e), function (e) {
  32590. e.onRefreshToken = function (e) {
  32591. V(W, e);
  32592. }, e.offRefreshToken = function (e) {
  32593. Y(W, e);
  32594. };
  32595. }(e);
  32596. }
  32597. var gs;
  32598. var ms = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  32599. ys = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  32600. function _s() {
  32601. var e = re().token || "",
  32602. t = e.split(".");
  32603. if (!e || 3 !== t.length) return {
  32604. uid: null,
  32605. role: [],
  32606. permission: [],
  32607. tokenExpired: 0
  32608. };
  32609. var n;
  32610. try {
  32611. n = JSON.parse((s = t[1], decodeURIComponent(gs(s).split("").map(function (e) {
  32612. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  32613. }).join(""))));
  32614. } catch (e) {
  32615. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  32616. }
  32617. var s;
  32618. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  32619. }
  32620. gs = "function" != typeof atob ? function (e) {
  32621. 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.");
  32622. var t;
  32623. e += "==".slice(2 - (3 & e.length));
  32624. for (var n, s, r = "", i = 0; i < e.length;) {
  32625. 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);
  32626. }
  32627. return r;
  32628. } : atob;
  32629. var ws = s(function (e, t) {
  32630. Object.defineProperty(t, "__esModule", {
  32631. value: !0
  32632. });
  32633. var n = "chooseAndUploadFile:ok",
  32634. s = "chooseAndUploadFile:fail";
  32635. function r(e, t) {
  32636. return e.tempFiles.forEach(function (e, n) {
  32637. 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("."));
  32638. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  32639. return e.path;
  32640. })), e;
  32641. }
  32642. function i(e, t, _ref46) {
  32643. var s = _ref46.onChooseFile,
  32644. r = _ref46.onUploadProgress;
  32645. return t.then(function (e) {
  32646. if (s) {
  32647. var _t17 = s(e);
  32648. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  32649. return void 0 === t ? e : t;
  32650. });
  32651. }
  32652. return e;
  32653. }).then(function (t) {
  32654. return !1 === t ? {
  32655. errMsg: n,
  32656. tempFilePaths: [],
  32657. tempFiles: []
  32658. } : function (e, t) {
  32659. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  32660. var r = arguments.length > 3 ? arguments[3] : undefined;
  32661. (t = Object.assign({}, t)).errMsg = n;
  32662. var i = t.tempFiles,
  32663. o = i.length;
  32664. var a = 0;
  32665. return new Promise(function (n) {
  32666. for (; a < s;) {
  32667. c();
  32668. }
  32669. function c() {
  32670. var s = a++;
  32671. if (s >= o) return void (!i.find(function (e) {
  32672. return !e.url && !e.errMsg;
  32673. }) && n(t));
  32674. var u = i[s];
  32675. e.uploadFile({
  32676. filePath: u.path,
  32677. cloudPath: u.cloudPath,
  32678. fileType: u.fileType,
  32679. onUploadProgress: function onUploadProgress(e) {
  32680. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  32681. }
  32682. }).then(function (e) {
  32683. u.url = e.fileID, s < o && c();
  32684. }).catch(function (e) {
  32685. u.errMsg = e.errMsg || e.message, s < o && c();
  32686. });
  32687. }
  32688. });
  32689. }(e, t, 5, r);
  32690. });
  32691. }
  32692. t.initChooseAndUploadFile = function (e) {
  32693. return function () {
  32694. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  32695. type: "all"
  32696. };
  32697. return "image" === t.type ? i(e, function (e) {
  32698. var t = e.count,
  32699. n = e.sizeType,
  32700. _e$sourceType = e.sourceType,
  32701. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  32702. o = e.extension;
  32703. return new Promise(function (e, a) {
  32704. uni.chooseImage({
  32705. count: t,
  32706. sizeType: n,
  32707. sourceType: i,
  32708. extension: o,
  32709. success: function success(t) {
  32710. e(r(t, "image"));
  32711. },
  32712. fail: function fail(e) {
  32713. a({
  32714. errMsg: e.errMsg.replace("chooseImage:fail", s)
  32715. });
  32716. }
  32717. });
  32718. });
  32719. }(t), t) : "video" === t.type ? i(e, function (e) {
  32720. var t = e.camera,
  32721. n = e.compressed,
  32722. i = e.maxDuration,
  32723. _e$sourceType2 = e.sourceType,
  32724. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  32725. a = e.extension;
  32726. return new Promise(function (e, c) {
  32727. uni.chooseVideo({
  32728. camera: t,
  32729. compressed: n,
  32730. maxDuration: i,
  32731. sourceType: o,
  32732. extension: a,
  32733. success: function success(t) {
  32734. var n = t.tempFilePath,
  32735. s = t.duration,
  32736. i = t.size,
  32737. o = t.height,
  32738. a = t.width;
  32739. e(r({
  32740. errMsg: "chooseVideo:ok",
  32741. tempFilePaths: [n],
  32742. tempFiles: [{
  32743. name: t.tempFile && t.tempFile.name || "",
  32744. path: n,
  32745. size: i,
  32746. type: t.tempFile && t.tempFile.type || "",
  32747. width: a,
  32748. height: o,
  32749. duration: s,
  32750. fileType: "video",
  32751. cloudPath: ""
  32752. }]
  32753. }, "video"));
  32754. },
  32755. fail: function fail(e) {
  32756. c({
  32757. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  32758. });
  32759. }
  32760. });
  32761. });
  32762. }(t), t) : i(e, function (e) {
  32763. var t = e.count,
  32764. n = e.extension;
  32765. return new Promise(function (e, i) {
  32766. var o = uni.chooseFile;
  32767. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  32768. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  32769. });
  32770. o({
  32771. type: "all",
  32772. count: t,
  32773. extension: n,
  32774. success: function success(t) {
  32775. e(r(t));
  32776. },
  32777. fail: function fail(e) {
  32778. i({
  32779. errMsg: e.errMsg.replace("chooseFile:fail", s)
  32780. });
  32781. }
  32782. });
  32783. });
  32784. }(t), t);
  32785. };
  32786. };
  32787. }),
  32788. vs = n(ws);
  32789. var Is = "manual";
  32790. function Ss(e) {
  32791. return {
  32792. props: {
  32793. localdata: {
  32794. type: Array,
  32795. default: function _default() {
  32796. return [];
  32797. }
  32798. },
  32799. options: {
  32800. type: [Object, Array],
  32801. default: function _default() {
  32802. return {};
  32803. }
  32804. },
  32805. spaceInfo: {
  32806. type: Object,
  32807. default: function _default() {
  32808. return {};
  32809. }
  32810. },
  32811. collection: {
  32812. type: [String, Array],
  32813. default: ""
  32814. },
  32815. action: {
  32816. type: String,
  32817. default: ""
  32818. },
  32819. field: {
  32820. type: String,
  32821. default: ""
  32822. },
  32823. orderby: {
  32824. type: String,
  32825. default: ""
  32826. },
  32827. where: {
  32828. type: [String, Object],
  32829. default: ""
  32830. },
  32831. pageData: {
  32832. type: String,
  32833. default: "add"
  32834. },
  32835. pageCurrent: {
  32836. type: Number,
  32837. default: 1
  32838. },
  32839. pageSize: {
  32840. type: Number,
  32841. default: 20
  32842. },
  32843. getcount: {
  32844. type: [Boolean, String],
  32845. default: !1
  32846. },
  32847. gettree: {
  32848. type: [Boolean, String],
  32849. default: !1
  32850. },
  32851. gettreepath: {
  32852. type: [Boolean, String],
  32853. default: !1
  32854. },
  32855. startwith: {
  32856. type: String,
  32857. default: ""
  32858. },
  32859. limitlevel: {
  32860. type: Number,
  32861. default: 10
  32862. },
  32863. groupby: {
  32864. type: String,
  32865. default: ""
  32866. },
  32867. groupField: {
  32868. type: String,
  32869. default: ""
  32870. },
  32871. distinct: {
  32872. type: [Boolean, String],
  32873. default: !1
  32874. },
  32875. foreignKey: {
  32876. type: String,
  32877. default: ""
  32878. },
  32879. loadtime: {
  32880. type: String,
  32881. default: "auto"
  32882. },
  32883. manual: {
  32884. type: Boolean,
  32885. default: !1
  32886. }
  32887. },
  32888. data: function data() {
  32889. return {
  32890. mixinDatacomLoading: !1,
  32891. mixinDatacomHasMore: !1,
  32892. mixinDatacomResData: [],
  32893. mixinDatacomErrorMessage: "",
  32894. mixinDatacomPage: {}
  32895. };
  32896. },
  32897. created: function created() {
  32898. var _this20 = this;
  32899. this.mixinDatacomPage = {
  32900. current: this.pageCurrent,
  32901. size: this.pageSize,
  32902. count: 0
  32903. }, this.$watch(function () {
  32904. var e = [];
  32905. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  32906. e.push(_this20[t]);
  32907. }), e;
  32908. }, function (e, t) {
  32909. if (_this20.loadtime === Is) return;
  32910. var n = !1;
  32911. var s = [];
  32912. for (var _r7 = 2; _r7 < e.length; _r7++) {
  32913. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  32914. }
  32915. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  32916. });
  32917. },
  32918. methods: {
  32919. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  32920. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  32921. var _this21 = this;
  32922. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32923. _ref47$getone = _ref47.getone,
  32924. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  32925. t = _ref47.success,
  32926. n = _ref47.fail;
  32927. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  32928. _this21.mixinDatacomLoading = !1;
  32929. var _n$result = n.result,
  32930. s = _n$result.data,
  32931. r = _n$result.count;
  32932. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  32933. var i = e ? s.length ? s[0] : void 0 : s;
  32934. _this21.mixinDatacomResData = i, t && t(i);
  32935. }).catch(function (e) {
  32936. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  32937. }));
  32938. },
  32939. mixinDatacomGet: function mixinDatacomGet() {
  32940. var _n12;
  32941. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32942. var n = e.database(this.spaceInfo);
  32943. var s = t.action || this.action;
  32944. s && (n = n.action(s));
  32945. var r = t.collection || this.collection;
  32946. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  32947. var i = t.where || this.where;
  32948. i && Object.keys(i).length && (n = n.where(i));
  32949. var o = t.field || this.field;
  32950. o && (n = n.field(o));
  32951. var a = t.foreignKey || this.foreignKey;
  32952. a && (n = n.foreignKey(a));
  32953. var c = t.groupby || this.groupby;
  32954. c && (n = n.groupBy(c));
  32955. var u = t.groupField || this.groupField;
  32956. u && (n = n.groupField(u));
  32957. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  32958. var h = t.orderby || this.orderby;
  32959. h && (n = n.orderBy(h));
  32960. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  32961. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  32962. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  32963. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  32964. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  32965. m = {
  32966. getCount: p
  32967. },
  32968. y = {
  32969. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  32970. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  32971. };
  32972. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  32973. }
  32974. }
  32975. };
  32976. }
  32977. function bs(e) {
  32978. return function (t) {
  32979. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32980. n = function (e) {
  32981. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32982. 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;
  32983. }({
  32984. customUI: !1,
  32985. loadingOptions: {
  32986. title: "加载中...",
  32987. mask: !0
  32988. },
  32989. errorOptions: {
  32990. type: "modal",
  32991. retry: !1
  32992. }
  32993. }, n);
  32994. var _n13 = n,
  32995. s = _n13.customUI,
  32996. r = _n13.loadingOptions,
  32997. i = _n13.errorOptions,
  32998. o = _n13.parseSystemError,
  32999. a = !s;
  33000. return new Proxy({}, {
  33001. get: function get(s, c) {
  33002. return function () {
  33003. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33004. e = _ref48.fn,
  33005. t = _ref48.interceptorName,
  33006. n = _ref48.getCallbackArgs;
  33007. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  33008. var _len2,
  33009. s,
  33010. _key2,
  33011. r,
  33012. i,
  33013. o,
  33014. _args = arguments;
  33015. return _regenerator.default.wrap(function _callee50$(_context50) {
  33016. while (1) {
  33017. switch (_context50.prev = _context50.next) {
  33018. case 0:
  33019. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  33020. s[_key2] = _args[_key2];
  33021. }
  33022. r = n ? n({
  33023. params: s
  33024. }) : {};
  33025. _context50.prev = 2;
  33026. _context50.next = 5;
  33027. return q(M(t, "invoke"), _objectSpread({}, r));
  33028. case 5:
  33029. _context50.next = 7;
  33030. return e.apply(void 0, s);
  33031. case 7:
  33032. i = _context50.sent;
  33033. _context50.next = 10;
  33034. return q(M(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  33035. result: i
  33036. }));
  33037. case 10:
  33038. return _context50.abrupt("return", i);
  33039. case 13:
  33040. _context50.prev = 13;
  33041. _context50.t0 = _context50["catch"](2);
  33042. o = _context50.t0;
  33043. _context50.next = 18;
  33044. return q(M(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  33045. error: o
  33046. }));
  33047. case 18:
  33048. throw o;
  33049. case 19:
  33050. _context50.prev = 19;
  33051. _context50.next = 22;
  33052. return q(M(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  33053. error: o
  33054. }) : _objectSpread(_objectSpread({}, r), {}, {
  33055. result: i
  33056. }));
  33057. case 22:
  33058. return _context50.finish(19);
  33059. case 23:
  33060. case "end":
  33061. return _context50.stop();
  33062. }
  33063. }
  33064. }, _callee50, null, [[2, 13, 19, 23]]);
  33065. }));
  33066. }({
  33067. fn: function () {
  33068. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  33069. var l,
  33070. _len3,
  33071. u,
  33072. _key3,
  33073. d,
  33074. p,
  33075. _ref50,
  33076. f,
  33077. g,
  33078. m,
  33079. y,
  33080. _e27,
  33081. _yield,
  33082. _t18,
  33083. _n14,
  33084. _args4 = arguments;
  33085. return _regenerator.default.wrap(function _callee52$(_context52) {
  33086. while (1) {
  33087. switch (_context52.prev = _context52.next) {
  33088. case 0:
  33089. a && uni.showLoading({
  33090. title: r.title,
  33091. mask: r.mask
  33092. });
  33093. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  33094. u[_key3] = _args4[_key3];
  33095. }
  33096. d = {
  33097. name: t,
  33098. type: h,
  33099. data: {
  33100. method: c,
  33101. params: u
  33102. }
  33103. };
  33104. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  33105. var n = t.data.method,
  33106. s = e.secretMethods || {},
  33107. r = s[n] || s["*"];
  33108. r && (t.secretType = r);
  33109. }(n, d);
  33110. p = !1;
  33111. _context52.prev = 5;
  33112. _context52.next = 8;
  33113. return e.callFunction(d);
  33114. case 8:
  33115. l = _context52.sent;
  33116. _context52.next = 14;
  33117. break;
  33118. case 11:
  33119. _context52.prev = 11;
  33120. _context52.t0 = _context52["catch"](5);
  33121. p = !0, l = {
  33122. result: new ne(_context52.t0)
  33123. };
  33124. case 14:
  33125. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  33126. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (ie(y), Q(W, _objectSpread({}, y))), g)) {
  33127. _context52.next = 39;
  33128. break;
  33129. }
  33130. _e27 = m;
  33131. if (!(p && o)) {
  33132. _context52.next = 24;
  33133. break;
  33134. }
  33135. _context52.next = 20;
  33136. return o({
  33137. objectName: t,
  33138. methodName: c,
  33139. params: u,
  33140. errSubject: f,
  33141. errCode: g,
  33142. errMsg: m
  33143. });
  33144. case 20:
  33145. _context52.t1 = _context52.sent.errMsg;
  33146. if (_context52.t1) {
  33147. _context52.next = 23;
  33148. break;
  33149. }
  33150. _context52.t1 = m;
  33151. case 23:
  33152. _e27 = _context52.t1;
  33153. case 24:
  33154. if (!a) {
  33155. _context52.next = 37;
  33156. break;
  33157. }
  33158. if (!("toast" === i.type)) {
  33159. _context52.next = 29;
  33160. break;
  33161. }
  33162. uni.showToast({
  33163. title: _e27,
  33164. icon: "none"
  33165. });
  33166. _context52.next = 37;
  33167. break;
  33168. case 29:
  33169. if (!("modal" !== i.type)) {
  33170. _context52.next = 31;
  33171. break;
  33172. }
  33173. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  33174. case 31:
  33175. _context52.next = 33;
  33176. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  33177. var _ref52,
  33178. e,
  33179. t,
  33180. n,
  33181. s,
  33182. r,
  33183. _args2 = arguments;
  33184. return _regenerator.default.wrap(function _callee51$(_context51) {
  33185. while (1) {
  33186. switch (_context51.prev = _context51.next) {
  33187. case 0:
  33188. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  33189. return _context51.abrupt("return", new Promise(function (i, o) {
  33190. uni.showModal({
  33191. title: e,
  33192. content: t,
  33193. showCancel: n,
  33194. cancelText: s,
  33195. confirmText: r,
  33196. success: function success(e) {
  33197. i(e);
  33198. },
  33199. fail: function fail() {
  33200. i({
  33201. confirm: !1,
  33202. cancel: !0
  33203. });
  33204. }
  33205. });
  33206. }));
  33207. case 2:
  33208. case "end":
  33209. return _context51.stop();
  33210. }
  33211. }
  33212. }, _callee51);
  33213. }))({
  33214. title: "提示",
  33215. content: _e27,
  33216. showCancel: i.retry,
  33217. cancelText: "取消",
  33218. confirmText: i.retry ? "重试" : "确定"
  33219. });
  33220. case 33:
  33221. _yield = _context52.sent;
  33222. _t18 = _yield.confirm;
  33223. if (!(i.retry && _t18)) {
  33224. _context52.next = 37;
  33225. break;
  33226. }
  33227. return _context52.abrupt("return", s.apply(void 0, u));
  33228. case 37:
  33229. _n14 = new ne({
  33230. subject: f,
  33231. code: g,
  33232. message: m,
  33233. requestId: l.requestId
  33234. });
  33235. throw _n14.detail = l.result, Q(B, {
  33236. type: H,
  33237. content: _n14
  33238. }), _n14;
  33239. case 39:
  33240. return _context52.abrupt("return", (Q(B, {
  33241. type: H,
  33242. content: l.result
  33243. }), l.result));
  33244. case 40:
  33245. case "end":
  33246. return _context52.stop();
  33247. }
  33248. }
  33249. }, _callee52, null, [[5, 11]]);
  33250. }));
  33251. function s() {
  33252. return _s14.apply(this, arguments);
  33253. }
  33254. return s;
  33255. }(),
  33256. interceptorName: "callObject",
  33257. getCallbackArgs: function getCallbackArgs() {
  33258. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33259. e = _ref53.params;
  33260. return {
  33261. objectName: t,
  33262. methodName: c,
  33263. params: e
  33264. };
  33265. }
  33266. });
  33267. }
  33268. });
  33269. };
  33270. }
  33271. function ks(e) {
  33272. return U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  33273. }
  33274. function Cs() {
  33275. return _Cs.apply(this, arguments);
  33276. }
  33277. function _Cs() {
  33278. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  33279. var _ref65,
  33280. e,
  33281. _ref65$callLoginByWei,
  33282. t,
  33283. n,
  33284. s,
  33285. r,
  33286. _args7 = arguments;
  33287. return _regenerator.default.wrap(function _callee55$(_context55) {
  33288. while (1) {
  33289. switch (_context55.prev = _context55.next) {
  33290. case 0:
  33291. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  33292. n = ks(this);
  33293. if (!("mp-weixin" !== P)) {
  33294. _context55.next = 4;
  33295. break;
  33296. }
  33297. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  33298. case 4:
  33299. if (!(e && t)) {
  33300. _context55.next = 6;
  33301. break;
  33302. }
  33303. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  33304. case 6:
  33305. if (!e) {
  33306. _context55.next = 8;
  33307. break;
  33308. }
  33309. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  33310. case 8:
  33311. _context55.next = 10;
  33312. return new Promise(function (e, t) {
  33313. uni.login({
  33314. success: function success(t) {
  33315. e(t.code);
  33316. },
  33317. fail: function fail(e) {
  33318. t(new Error(e.errMsg));
  33319. }
  33320. });
  33321. });
  33322. case 10:
  33323. s = _context55.sent;
  33324. r = this.importObject("uni-id-co", {
  33325. customUI: !0
  33326. });
  33327. _context55.next = 14;
  33328. return r.secureNetworkHandshakeByWeixin({
  33329. code: s,
  33330. callLoginByWeixin: t
  33331. });
  33332. case 14:
  33333. n.mpWeixinCode = s;
  33334. return _context55.abrupt("return", {
  33335. code: s
  33336. });
  33337. case 16:
  33338. case "end":
  33339. return _context55.stop();
  33340. }
  33341. }
  33342. }, _callee55, this);
  33343. }));
  33344. return _Cs.apply(this, arguments);
  33345. }
  33346. function Ts(_x37) {
  33347. return _Ts.apply(this, arguments);
  33348. }
  33349. function _Ts() {
  33350. _Ts = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  33351. var t;
  33352. return _regenerator.default.wrap(function _callee56$(_context56) {
  33353. while (1) {
  33354. switch (_context56.prev = _context56.next) {
  33355. case 0:
  33356. t = ks(this);
  33357. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  33358. case 2:
  33359. case "end":
  33360. return _context56.stop();
  33361. }
  33362. }
  33363. }, _callee56, this);
  33364. }));
  33365. return _Ts.apply(this, arguments);
  33366. }
  33367. function Ps(e) {
  33368. return function () {
  33369. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33370. t = _ref54.openid,
  33371. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  33372. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  33373. return Ts.call(e, {
  33374. openid: t,
  33375. callLoginByWeixin: n
  33376. });
  33377. };
  33378. }
  33379. function As(e) {
  33380. var t = {
  33381. getSystemInfo: uni.getSystemInfo,
  33382. getPushClientId: uni.getPushClientId
  33383. };
  33384. return function (n) {
  33385. return new Promise(function (s, r) {
  33386. t[e](_objectSpread(_objectSpread({}, n), {}, {
  33387. success: function success(e) {
  33388. s(e);
  33389. },
  33390. fail: function fail(e) {
  33391. r(e);
  33392. }
  33393. }));
  33394. });
  33395. };
  33396. }
  33397. var Es = /*#__PURE__*/function (_ref55) {
  33398. (0, _inherits2.default)(Es, _ref55);
  33399. var _super12 = _createSuper(Es);
  33400. function Es() {
  33401. var _this22;
  33402. (0, _classCallCheck2.default)(this, Es);
  33403. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  33404. return _this22;
  33405. }
  33406. (0, _createClass2.default)(Es, [{
  33407. key: "init",
  33408. value: function init() {
  33409. var _this23 = this;
  33410. return Promise.all([As("getSystemInfo")(), As("getPushClientId")()]).then(function () {
  33411. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  33412. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  33413. _ref57$ = _ref57[0];
  33414. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  33415. var e = _ref57$.appId,
  33416. _ref57$2 = _ref57[1];
  33417. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  33418. var t = _ref57$2.cid;
  33419. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  33420. if (!t) throw new Error("Invalid push client id");
  33421. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  33422. }, function (e) {
  33423. throw _this23.emit("error", e), _this23.close(), e;
  33424. });
  33425. }
  33426. }, {
  33427. key: "open",
  33428. value: function () {
  33429. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  33430. return _regenerator.default.wrap(function _callee53$(_context53) {
  33431. while (1) {
  33432. switch (_context53.prev = _context53.next) {
  33433. case 0:
  33434. return _context53.abrupt("return", this.init());
  33435. case 1:
  33436. case "end":
  33437. return _context53.stop();
  33438. }
  33439. }
  33440. }, _callee53, this);
  33441. }));
  33442. function open() {
  33443. return _open.apply(this, arguments);
  33444. }
  33445. return open;
  33446. }()
  33447. }, {
  33448. key: "_isUniCloudSSE",
  33449. value: function _isUniCloudSSE(e) {
  33450. if ("receive" !== e.type) return !1;
  33451. var t = e && e.data && e.data.payload;
  33452. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  33453. }
  33454. }, {
  33455. key: "_receivePushMessage",
  33456. value: function _receivePushMessage(e) {
  33457. if (!this._isUniCloudSSE(e)) return;
  33458. var t = e && e.data && e.data.payload,
  33459. n = t.action,
  33460. s = t.messageId,
  33461. r = t.message;
  33462. this._payloadQueue.push({
  33463. action: n,
  33464. messageId: s,
  33465. message: r
  33466. }), this._consumMessage();
  33467. }
  33468. }, {
  33469. key: "_consumMessage",
  33470. value: function _consumMessage() {
  33471. var _this24 = this;
  33472. for (;;) {
  33473. var _e28 = this._payloadQueue.find(function (e) {
  33474. return e.messageId === _this24._currentMessageId + 1;
  33475. });
  33476. if (!_e28) break;
  33477. this._currentMessageId++, this._parseMessagePayload(_e28);
  33478. }
  33479. }
  33480. }, {
  33481. key: "_parseMessagePayload",
  33482. value: function _parseMessagePayload(e) {
  33483. var t = e.action,
  33484. n = e.messageId,
  33485. s = e.message;
  33486. "end" === t ? this._end({
  33487. messageId: n,
  33488. message: s
  33489. }) : "message" === t && this._appendMessage({
  33490. messageId: n,
  33491. message: s
  33492. });
  33493. }
  33494. }, {
  33495. key: "_appendMessage",
  33496. value: function _appendMessage() {
  33497. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33498. e = _ref58.messageId,
  33499. t = _ref58.message;
  33500. this.emit("message", t);
  33501. }
  33502. }, {
  33503. key: "_end",
  33504. value: function _end() {
  33505. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33506. e = _ref59.messageId,
  33507. t = _ref59.message;
  33508. this.emit("end", t), this.close();
  33509. }
  33510. }, {
  33511. key: "_initMessageListener",
  33512. value: function _initMessageListener() {
  33513. uni.onPushMessage(this._uniPushMessageCallback);
  33514. }
  33515. }, {
  33516. key: "_destroy",
  33517. value: function _destroy() {
  33518. uni.offPushMessage(this._uniPushMessageCallback);
  33519. }
  33520. }, {
  33521. key: "toJSON",
  33522. value: function toJSON() {
  33523. return {
  33524. appId: this._appId,
  33525. pushClientId: this._pushClientId,
  33526. seqId: this._seqId
  33527. };
  33528. }
  33529. }, {
  33530. key: "close",
  33531. value: function close() {
  33532. this._destroy(), this.emit("close");
  33533. }
  33534. }]);
  33535. return Es;
  33536. }( /*#__PURE__*/function () {
  33537. function _class6() {
  33538. (0, _classCallCheck2.default)(this, _class6);
  33539. this._callback = {};
  33540. }
  33541. (0, _createClass2.default)(_class6, [{
  33542. key: "addListener",
  33543. value: function addListener(e, t) {
  33544. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  33545. }
  33546. }, {
  33547. key: "on",
  33548. value: function on(e, t) {
  33549. return this.addListener(e, t);
  33550. }
  33551. }, {
  33552. key: "removeListener",
  33553. value: function removeListener(e, t) {
  33554. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  33555. var n = this._callback[e];
  33556. if (!n) return;
  33557. var s = function (e, t) {
  33558. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  33559. if (e[_n15] === t) return _n15;
  33560. }
  33561. return -1;
  33562. }(n, t);
  33563. n.splice(s, 1);
  33564. }
  33565. }, {
  33566. key: "off",
  33567. value: function off(e, t) {
  33568. return this.removeListener(e, t);
  33569. }
  33570. }, {
  33571. key: "removeAllListener",
  33572. value: function removeAllListener(e) {
  33573. delete this._callback[e];
  33574. }
  33575. }, {
  33576. key: "emit",
  33577. value: function emit(e) {
  33578. var n = this._callback[e];
  33579. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  33580. t[_key4 - 1] = arguments[_key4];
  33581. }
  33582. if (n) for (var _e29 = 0; _e29 < n.length; _e29++) {
  33583. n[_e29].apply(n, t);
  33584. }
  33585. }
  33586. }]);
  33587. return _class6;
  33588. }());
  33589. function Os(_x38, _x39) {
  33590. return _Os.apply(this, arguments);
  33591. }
  33592. function _Os() {
  33593. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  33594. var n, _e33, s;
  33595. return _regenerator.default.wrap(function _callee57$(_context57) {
  33596. while (1) {
  33597. switch (_context57.prev = _context57.next) {
  33598. case 0:
  33599. n = "http://".concat(e, ":").concat(t, "/system/ping");
  33600. _context57.prev = 1;
  33601. _context57.next = 4;
  33602. return s = {
  33603. url: n,
  33604. timeout: 500
  33605. }, new Promise(function (e, t) {
  33606. se.request(_objectSpread(_objectSpread({}, s), {}, {
  33607. success: function success(t) {
  33608. e(t);
  33609. },
  33610. fail: function fail(e) {
  33611. t(e);
  33612. }
  33613. }));
  33614. });
  33615. case 4:
  33616. _e33 = _context57.sent;
  33617. return _context57.abrupt("return", !(!_e33.data || 0 !== _e33.data.code));
  33618. case 8:
  33619. _context57.prev = 8;
  33620. _context57.t0 = _context57["catch"](1);
  33621. return _context57.abrupt("return", !1);
  33622. case 11:
  33623. case "end":
  33624. return _context57.stop();
  33625. }
  33626. }
  33627. }, _callee57, null, [[1, 8]]);
  33628. }));
  33629. return _Os.apply(this, arguments);
  33630. }
  33631. function xs(_x40) {
  33632. return _xs.apply(this, arguments);
  33633. }
  33634. function _xs() {
  33635. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  33636. var _ce2, _e34, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  33637. return _regenerator.default.wrap(function _callee59$(_context59) {
  33638. while (1) {
  33639. switch (_context59.prev = _context59.next) {
  33640. case 0:
  33641. if (b) {
  33642. _context59.next = 2;
  33643. break;
  33644. }
  33645. return _context59.abrupt("return", Promise.resolve());
  33646. case 2:
  33647. if ("app" === P) {
  33648. _ce2 = ce(), _e34 = _ce2.osName, _t20 = _ce2.osVersion;
  33649. "ios" === _e34 && function (e) {
  33650. if (!e || "string" != typeof e) return 0;
  33651. var t = e.match(/^(\d+)./);
  33652. return t && t[1] ? parseInt(t[1]) : 0;
  33653. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  33654. }
  33655. t = e.__dev__;
  33656. if (t.debugInfo) {
  33657. _context59.next = 6;
  33658. break;
  33659. }
  33660. return _context59.abrupt("return");
  33661. case 6:
  33662. _t$debugInfo = t.debugInfo;
  33663. n = _t$debugInfo.address;
  33664. s = _t$debugInfo.servePort;
  33665. _context59.next = 11;
  33666. return function () {
  33667. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  33668. var n, _s15, _r8;
  33669. return _regenerator.default.wrap(function _callee58$(_context58) {
  33670. while (1) {
  33671. switch (_context58.prev = _context58.next) {
  33672. case 0:
  33673. _s15 = 0;
  33674. case 1:
  33675. if (!(_s15 < e.length)) {
  33676. _context58.next = 11;
  33677. break;
  33678. }
  33679. _r8 = e[_s15];
  33680. _context58.next = 5;
  33681. return Os(_r8, t);
  33682. case 5:
  33683. if (!_context58.sent) {
  33684. _context58.next = 8;
  33685. break;
  33686. }
  33687. n = _r8;
  33688. return _context58.abrupt("break", 11);
  33689. case 8:
  33690. _s15++;
  33691. _context58.next = 1;
  33692. break;
  33693. case 11:
  33694. return _context58.abrupt("return", {
  33695. address: n,
  33696. port: t
  33697. });
  33698. case 12:
  33699. case "end":
  33700. return _context58.stop();
  33701. }
  33702. }
  33703. }, _callee58);
  33704. }));
  33705. return function (_x41, _x42) {
  33706. return _ref66.apply(this, arguments);
  33707. };
  33708. }()(n, s);
  33709. case 11:
  33710. _yield2 = _context59.sent;
  33711. r = _yield2.address;
  33712. if (!r) {
  33713. _context59.next = 15;
  33714. break;
  33715. }
  33716. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  33717. case 15:
  33718. i = console["app" === P ? "error" : "warn"];
  33719. o = "";
  33720. 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)) {
  33721. _context59.next = 19;
  33722. break;
  33723. }
  33724. throw new Error(o);
  33725. case 19:
  33726. i(o);
  33727. case 20:
  33728. case "end":
  33729. return _context59.stop();
  33730. }
  33731. }
  33732. }, _callee59);
  33733. }));
  33734. return _xs.apply(this, arguments);
  33735. }
  33736. function Rs(e) {
  33737. e._initPromiseHub || (e._initPromiseHub = new I({
  33738. createPromise: function createPromise() {
  33739. var t = Promise.resolve();
  33740. var n;
  33741. n = 1, t = new Promise(function (e) {
  33742. setTimeout(function () {
  33743. e();
  33744. }, n);
  33745. });
  33746. var s = e.auth();
  33747. return t.then(function () {
  33748. return s.getLoginState();
  33749. }).then(function (e) {
  33750. return e ? Promise.resolve() : s.signInAnonymously();
  33751. });
  33752. }
  33753. }));
  33754. }
  33755. var Us = {
  33756. tcb: It,
  33757. tencent: It,
  33758. aliyun: ge,
  33759. private: bt
  33760. };
  33761. var Ls = new ( /*#__PURE__*/function () {
  33762. function _class7() {
  33763. (0, _classCallCheck2.default)(this, _class7);
  33764. }
  33765. (0, _createClass2.default)(_class7, [{
  33766. key: "init",
  33767. value: function init(e) {
  33768. var t = {};
  33769. var n = Us[e.provider];
  33770. if (!n) throw new Error("未提供正确的provider参数");
  33771. t = n.init(e), b && function (e) {
  33772. if (!b) return;
  33773. var t = {};
  33774. e.__dev__ = t, t.debugLog = b && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  33775. var n = A;
  33776. n && !n.code && (t.debugInfo = n);
  33777. var s = new I({
  33778. createPromise: function createPromise() {
  33779. return xs(e);
  33780. }
  33781. });
  33782. t.initLocalNetwork = function () {
  33783. return s.exec();
  33784. };
  33785. }(t), Rs(t), xn(t), function (e) {
  33786. var t = e.uploadFile;
  33787. e.uploadFile = function (e) {
  33788. return t.call(this, e);
  33789. };
  33790. }(t), function (e) {
  33791. e.database = function (t) {
  33792. if (t && Object.keys(t).length > 0) return e.init(t).database();
  33793. if (this._database) return this._database;
  33794. var n = Bn($n, {
  33795. uniClient: e
  33796. });
  33797. return this._database = n, n;
  33798. }, e.databaseForJQL = function (t) {
  33799. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  33800. if (this._databaseForJQL) return this._databaseForJQL;
  33801. var n = Bn($n, {
  33802. uniClient: e,
  33803. isJQL: !0
  33804. });
  33805. return this._databaseForJQL = n, n;
  33806. };
  33807. }(t), function (e) {
  33808. e.getCurrentUserInfo = _s, e.chooseAndUploadFile = vs.initChooseAndUploadFile(e), Object.assign(e, {
  33809. get mixinDatacom() {
  33810. return Ss(e);
  33811. }
  33812. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = Ps(e), e.importObject = bs(e);
  33813. }(t);
  33814. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  33815. if (!t[e]) return;
  33816. var n = t[e];
  33817. t[e] = function () {
  33818. return n.apply(t, Array.from(arguments));
  33819. }, t[e] = function (e, t) {
  33820. return function (n) {
  33821. var _this25 = this;
  33822. var s = !1;
  33823. if ("callFunction" === t) {
  33824. var _e30 = n && n.type || u;
  33825. s = _e30 !== u;
  33826. }
  33827. var r = "callFunction" === t && !s,
  33828. i = this._initPromiseHub.exec();
  33829. n = n || {};
  33830. var _te2 = te(n),
  33831. o = _te2.success,
  33832. a = _te2.fail,
  33833. c = _te2.complete,
  33834. h = i.then(function () {
  33835. return s ? Promise.resolve() : q(M(t, "invoke"), n);
  33836. }).then(function () {
  33837. return e.call(_this25, n);
  33838. }).then(function (e) {
  33839. return s ? Promise.resolve(e) : q(M(t, "success"), e).then(function () {
  33840. return q(M(t, "complete"), e);
  33841. }).then(function () {
  33842. return r && Q(B, {
  33843. type: J,
  33844. content: e
  33845. }), Promise.resolve(e);
  33846. });
  33847. }, function (e) {
  33848. return s ? Promise.reject(e) : q(M(t, "fail"), e).then(function () {
  33849. return q(M(t, "complete"), e);
  33850. }).then(function () {
  33851. return Q(B, {
  33852. type: J,
  33853. content: e
  33854. }), Promise.reject(e);
  33855. });
  33856. });
  33857. if (!(o || a || c)) return h;
  33858. h.then(function (e) {
  33859. o && o(e), c && c(e), r && Q(B, {
  33860. type: J,
  33861. content: e
  33862. });
  33863. }, function (e) {
  33864. a && a(e), c && c(e), r && Q(B, {
  33865. type: J,
  33866. content: e
  33867. });
  33868. });
  33869. };
  33870. }(t[e], e).bind(t);
  33871. }), t.init = this.init, t;
  33872. }
  33873. }]);
  33874. return _class7;
  33875. }())();
  33876. (function () {
  33877. var e = E;
  33878. var t = {};
  33879. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  33880. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  33881. var _n16;
  33882. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : O ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  33883. Ls[e] = function () {
  33884. return console.error(_n16), Promise.reject(new ne({
  33885. code: "SYS_ERR",
  33886. message: _n16
  33887. }));
  33888. };
  33889. });
  33890. }
  33891. Object.assign(Ls, {
  33892. get mixinDatacom() {
  33893. return Ss(Ls);
  33894. }
  33895. }), fs(Ls), Ls.addInterceptor = D, Ls.removeInterceptor = F, Ls.interceptObject = K, b && "web" === P && (window.uniCloud = Ls);
  33896. })();
  33897. var Ns = Ls;
  33898. exports.default = Ns;
  33899. /* 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"]))
  33900. /***/ }),
  33901. /***/ 495:
  33902. /*!**********************************************************************!*\
  33903. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  33904. \**********************************************************************/
  33905. /*! no static exports found */
  33906. /***/ (function(module, exports) {
  33907. function _assertThisInitialized(self) {
  33908. if (self === void 0) {
  33909. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  33910. }
  33911. return self;
  33912. }
  33913. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33914. /***/ }),
  33915. /***/ 496:
  33916. /*!*********************************************************!*\
  33917. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  33918. \*********************************************************/
  33919. /*! no static exports found */
  33920. /***/ (function(module, exports, __webpack_require__) {
  33921. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  33922. function _inherits(subClass, superClass) {
  33923. if (typeof superClass !== "function" && superClass !== null) {
  33924. throw new TypeError("Super expression must either be null or a function");
  33925. }
  33926. subClass.prototype = Object.create(superClass && superClass.prototype, {
  33927. constructor: {
  33928. value: subClass,
  33929. writable: true,
  33930. configurable: true
  33931. }
  33932. });
  33933. Object.defineProperty(subClass, "prototype", {
  33934. writable: false
  33935. });
  33936. if (superClass) setPrototypeOf(subClass, superClass);
  33937. }
  33938. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33939. /***/ }),
  33940. /***/ 497:
  33941. /*!**************************************************************************!*\
  33942. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  33943. \**************************************************************************/
  33944. /*! no static exports found */
  33945. /***/ (function(module, exports, __webpack_require__) {
  33946. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  33947. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 495);
  33948. function _possibleConstructorReturn(self, call) {
  33949. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  33950. return call;
  33951. } else if (call !== void 0) {
  33952. throw new TypeError("Derived constructors may only return object or undefined");
  33953. }
  33954. return assertThisInitialized(self);
  33955. }
  33956. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33957. /***/ }),
  33958. /***/ 498:
  33959. /*!***************************************************************!*\
  33960. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  33961. \***************************************************************/
  33962. /*! no static exports found */
  33963. /***/ (function(module, exports) {
  33964. function _getPrototypeOf(o) {
  33965. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  33966. return o.__proto__ || Object.getPrototypeOf(o);
  33967. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33968. return _getPrototypeOf(o);
  33969. }
  33970. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33971. /***/ }),
  33972. /***/ 499:
  33973. /*!****************************************************************!*\
  33974. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  33975. \****************************************************************/
  33976. /*! no static exports found */
  33977. /***/ (function(module, exports, __webpack_require__) {
  33978. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 498);
  33979. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  33980. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 500);
  33981. var construct = __webpack_require__(/*! ./construct.js */ 15);
  33982. function _wrapNativeSuper(Class) {
  33983. var _cache = typeof Map === "function" ? new Map() : undefined;
  33984. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  33985. if (Class === null || !isNativeFunction(Class)) return Class;
  33986. if (typeof Class !== "function") {
  33987. throw new TypeError("Super expression must either be null or a function");
  33988. }
  33989. if (typeof _cache !== "undefined") {
  33990. if (_cache.has(Class)) return _cache.get(Class);
  33991. _cache.set(Class, Wrapper);
  33992. }
  33993. function Wrapper() {
  33994. return construct(Class, arguments, getPrototypeOf(this).constructor);
  33995. }
  33996. Wrapper.prototype = Object.create(Class.prototype, {
  33997. constructor: {
  33998. value: Wrapper,
  33999. enumerable: false,
  34000. writable: true,
  34001. configurable: true
  34002. }
  34003. });
  34004. return setPrototypeOf(Wrapper, Class);
  34005. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34006. return _wrapNativeSuper(Class);
  34007. }
  34008. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34009. /***/ }),
  34010. /***/ 5:
  34011. /*!**************************************************************!*\
  34012. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  34013. \**************************************************************/
  34014. /*! no static exports found */
  34015. /***/ (function(module, exports, __webpack_require__) {
  34016. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  34017. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  34018. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  34019. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  34020. function _slicedToArray(arr, i) {
  34021. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  34022. }
  34023. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34024. /***/ }),
  34025. /***/ 50:
  34026. /*!************************************************************************************************!*\
  34027. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  34028. \************************************************************************************************/
  34029. /*! no static exports found */
  34030. /***/ (function(module, exports, __webpack_require__) {
  34031. // TODO(Babel 8): Remove this file.
  34032. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 51)();
  34033. module.exports = runtime;
  34034. /***/ }),
  34035. /***/ 500:
  34036. /*!*****************************************************************!*\
  34037. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  34038. \*****************************************************************/
  34039. /*! no static exports found */
  34040. /***/ (function(module, exports) {
  34041. function _isNativeFunction(fn) {
  34042. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  34043. }
  34044. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34045. /***/ }),
  34046. /***/ 501:
  34047. /*!**************************************************************************!*\
  34048. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"origin-pages-json"} ***!
  34049. \**************************************************************************/
  34050. /*! no static exports found */
  34051. /***/ (function(module, exports, __webpack_require__) {
  34052. "use strict";
  34053. Object.defineProperty(exports, "__esModule", {
  34054. value: true
  34055. });
  34056. exports.default = void 0;
  34057. var _default = {
  34058. "easycom": {
  34059. "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
  34060. },
  34061. "pages": [{
  34062. "path": "pages/login/login",
  34063. "style": {
  34064. "navigationStyle": "custom"
  34065. }
  34066. }, {
  34067. "path": "pages/noLogin/PressureRegulatingBox/PressureRegulatingBox",
  34068. "style": {
  34069. "navigationBarTitleText": "",
  34070. "enablePullDownRefresh": false
  34071. }
  34072. }, {
  34073. "path": "pages/index/index",
  34074. "style": {
  34075. "navigationStyle": "custom"
  34076. }
  34077. }, {
  34078. "path": "pages/noLogin/uploadProject",
  34079. "style": {
  34080. "navigationStyle": "custom"
  34081. }
  34082. }, {
  34083. "path": "pages/noLogin/typeList",
  34084. "style": {
  34085. "navigationStyle": "custom"
  34086. }
  34087. }, {
  34088. "path": "pages/noLogin/communitylist",
  34089. "style": {
  34090. "navigationBarTitleText": "",
  34091. "enablePullDownRefresh": false
  34092. }
  34093. }, {
  34094. "path": "pages/noLogin/buildinglist",
  34095. "style": {
  34096. "navigationStyle": "custom"
  34097. }
  34098. }, {
  34099. "path": "pages/noLogin/unitlist",
  34100. "style": {
  34101. "navigationStyle": "custom"
  34102. }
  34103. }, {
  34104. "path": "pages/historyConstruction/historyDetail",
  34105. "style": {
  34106. "navigationStyle": "custom"
  34107. }
  34108. }, {
  34109. "path": "pages/noLogin/listProject",
  34110. "style": {
  34111. "navigationStyle": "custom"
  34112. }
  34113. }, {
  34114. "path": "pages/historyConstruction/updateInfo",
  34115. "style": {
  34116. "navigationBarTitleText": "修改"
  34117. }
  34118. }, {
  34119. "path": "pages/noLogin/cityProject",
  34120. "style": {
  34121. "navigationStyle": "custom"
  34122. }
  34123. }, {
  34124. "path": "pages/noLogin/data",
  34125. "style": {
  34126. "navigationStyle": "custom"
  34127. }
  34128. }, {
  34129. "path": "pages/noLogin/list",
  34130. "style": {
  34131. "navigationBarTitleText": "列表",
  34132. "enablePullDownRefresh": true
  34133. }
  34134. }, {
  34135. "path": "pages/notice/noticeDetail",
  34136. "style": {
  34137. "navigationStyle": "custom"
  34138. }
  34139. }, {
  34140. "path": "pages/notice/noticeList",
  34141. "style": {
  34142. "navigationStyle": "custom"
  34143. }
  34144. }, {
  34145. "path": "pages/cityConstrution/cityConstrution",
  34146. "style": {
  34147. "navigationStyle": "custom"
  34148. }
  34149. }, {
  34150. "path": "pages/historyConstruction/historyConstruction",
  34151. "style": {
  34152. "navigationStyle": "custom"
  34153. }
  34154. }, {
  34155. "path": "pages/service/service",
  34156. "style": {
  34157. "navigationStyle": "custom"
  34158. }
  34159. }, {
  34160. "path": "pages/aboutme/aboutme",
  34161. "style": {
  34162. "navigationStyle": "custom"
  34163. }
  34164. }, {
  34165. "path": "pages/chart/chart",
  34166. "style": {
  34167. "navigationStyle": "custom"
  34168. }
  34169. }, {
  34170. "path": "pages/chart/chartAll",
  34171. "style": {
  34172. "navigationStyle": "custom"
  34173. }
  34174. }, {
  34175. "path": "pages/chart/chartDetail",
  34176. "style": {
  34177. "navigationStyle": "custom"
  34178. }
  34179. }, {
  34180. "path": "pages/chart/newchartDetail",
  34181. "style": {
  34182. "navigationStyle": "custom"
  34183. }
  34184. }, {
  34185. "path": "pages/chart/chartList",
  34186. "style": {
  34187. "navigationBarTitleText": "工程管理"
  34188. }
  34189. }, {
  34190. "path": "pages/chart/details",
  34191. "style": {
  34192. "navigationBarTitleText": "详情"
  34193. }
  34194. }, {
  34195. "path": "pages/noLogin/repair",
  34196. "style": {
  34197. "navigationStyle": "custom"
  34198. }
  34199. }, {
  34200. "path": "pages/noLogin/My",
  34201. "style": {
  34202. "navigationStyle": "custom"
  34203. }
  34204. }, {
  34205. "path": "pages/noLogin/Myphoto",
  34206. "style": {
  34207. "navigationStyle": "custom"
  34208. }
  34209. }, {
  34210. "path": "pages/noLogin/home/home",
  34211. "style": {
  34212. "navigationBarTitleText": "",
  34213. "enablePullDownRefresh": false
  34214. }
  34215. }, {
  34216. "path": "pages/noLogin/emergencyRepairOrder/emergencyRepairOrder",
  34217. "style": {
  34218. "navigationBarTitleText": "",
  34219. "enablePullDownRefresh": false
  34220. }
  34221. }, {
  34222. "path": "pages/noLogin/WarningPileForm/WarningPileForm",
  34223. "style": {
  34224. "navigationBarTitleText": "",
  34225. "enablePullDownRefresh": false
  34226. }
  34227. }, {
  34228. "path": "pages/noLogin/WarningPileList",
  34229. "style": {
  34230. "navigationBarTitleText": "",
  34231. "enablePullDownRefresh": false
  34232. }
  34233. }, {
  34234. "path": "pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement",
  34235. "style": {
  34236. "navigationBarTitleText": "",
  34237. "enablePullDownRefresh": false
  34238. }
  34239. }],
  34240. "globalStyle": {
  34241. "navigationBarTextStyle": "black",
  34242. "navigationBarTitleText": "长春贞达市政施工管理平台",
  34243. "navigationBarBackgroundColor": "#F8F8F8",
  34244. "backgroundColor": "#F8F8F8"
  34245. },
  34246. "tabBar": {
  34247. "list": [{
  34248. "pagePath": "pages/index/index",
  34249. "text": "首页",
  34250. "iconPath": "static/icon/home.png",
  34251. "selectedIconPath": "static/icon/home-on.png"
  34252. }, {
  34253. "pagePath": "pages/noLogin/typeList",
  34254. "text": "工作",
  34255. "iconPath": "static/icon/work.png",
  34256. "selectedIconPath": "static/icon/work-on.png"
  34257. }]
  34258. },
  34259. "condition": {
  34260. "current": 0,
  34261. "list": [{
  34262. "name": "",
  34263. "path": "",
  34264. "query": ""
  34265. }]
  34266. }
  34267. };
  34268. exports.default = _default;
  34269. /***/ }),
  34270. /***/ 502:
  34271. /*!*************************************************************!*\
  34272. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"stat"} ***!
  34273. \*************************************************************/
  34274. /*! no static exports found */
  34275. /***/ (function(module, exports, __webpack_require__) {
  34276. "use strict";
  34277. Object.defineProperty(exports, "__esModule", {
  34278. value: true
  34279. });
  34280. exports.default = void 0;
  34281. var _default = {
  34282. "appid": "__UNI__5FB7046"
  34283. };
  34284. exports.default = _default;
  34285. /***/ }),
  34286. /***/ 503:
  34287. /*!*******************************************************************************************!*\
  34288. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js ***!
  34289. \*******************************************************************************************/
  34290. /*! no static exports found */
  34291. /***/ (function(module, exports, __webpack_require__) {
  34292. "use strict";
  34293. /* WEBPACK VAR INJECTION */(function(module) {/*
  34294. * uCharts®
  34295. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  34296. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  34297. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  34298. * 复制使用请保留本段注释,感谢支持开源!
  34299. *
  34300. * uCharts®官方网站
  34301. * https://www.uCharts.cn
  34302. *
  34303. * 开源地址:
  34304. * https://gitee.com/uCharts/uCharts
  34305. *
  34306. * uni-app插件市场地址:
  34307. * http://ext.dcloud.net.cn/plugin?id=271
  34308. *
  34309. */
  34310. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  34311. Object.defineProperty(exports, "__esModule", {
  34312. value: true
  34313. });
  34314. exports.default = void 0;
  34315. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  34316. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  34317. var config = {
  34318. version: 'v2.3.6-20211201',
  34319. yAxisWidth: 15,
  34320. yAxisSplit: 5,
  34321. xAxisHeight: 22,
  34322. xAxisLineHeight: 22,
  34323. legendHeight: 15,
  34324. yAxisTitleWidth: 15,
  34325. padding: [10, 10, 10, 10],
  34326. pixelRatio: 1,
  34327. rotate: false,
  34328. columePadding: 3,
  34329. fontSize: 13,
  34330. fontColor: '#666666',
  34331. dataPointShape: ['circle', 'circle', 'circle', 'circle'],
  34332. color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
  34333. linearColor: ['#0EE2F8', '#2BDCA8', '#FA7D8D', '#EB88E2', '#2AE3A0', '#0EE2F8', '#EB88E2', '#6773E3', '#F78A85'],
  34334. pieChartLinePadding: 15,
  34335. pieChartTextPadding: 5,
  34336. xAxisTextPadding: 3,
  34337. titleColor: '#333333',
  34338. titleFontSize: 20,
  34339. subtitleColor: '#999999',
  34340. subtitleFontSize: 15,
  34341. toolTipPadding: 3,
  34342. toolTipBackground: '#000000',
  34343. toolTipOpacity: 0.7,
  34344. toolTipLineHeight: 20,
  34345. radarLabelTextMargin: 13,
  34346. gaugeLabelTextMargin: 13
  34347. };
  34348. var assign = function assign(target) {
  34349. for (var _len2 = arguments.length, varArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  34350. varArgs[_key2 - 1] = arguments[_key2];
  34351. }
  34352. if (target == null) {
  34353. throw new TypeError('[uCharts] Cannot convert undefined or null to object');
  34354. }
  34355. if (!varArgs || varArgs.length <= 0) {
  34356. return target;
  34357. }
  34358. // 深度合并对象
  34359. function deepAssign(obj1, obj2) {
  34360. for (var key in obj2) {
  34361. obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
  34362. }
  34363. return obj1;
  34364. }
  34365. varArgs.forEach(function (val) {
  34366. target = deepAssign(target, val);
  34367. });
  34368. return target;
  34369. };
  34370. var util = {
  34371. toFixed: function toFixed(num, limit) {
  34372. limit = limit || 2;
  34373. if (this.isFloat(num)) {
  34374. num = num.toFixed(limit);
  34375. }
  34376. return num;
  34377. },
  34378. isFloat: function isFloat(num) {
  34379. return num % 1 !== 0;
  34380. },
  34381. approximatelyEqual: function approximatelyEqual(num1, num2) {
  34382. return Math.abs(num1 - num2) < 1e-10;
  34383. },
  34384. isSameSign: function isSameSign(num1, num2) {
  34385. return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
  34386. },
  34387. isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
  34388. return this.isSameSign(p1.x, p2.x);
  34389. },
  34390. isCollision: function isCollision(obj1, obj2) {
  34391. obj1.end = {};
  34392. obj1.end.x = obj1.start.x + obj1.width;
  34393. obj1.end.y = obj1.start.y - obj1.height;
  34394. obj2.end = {};
  34395. obj2.end.x = obj2.start.x + obj2.width;
  34396. obj2.end.y = obj2.start.y - obj2.height;
  34397. 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;
  34398. return !flag;
  34399. }
  34400. };
  34401. //兼容H5点击事件
  34402. function getH5Offset(e) {
  34403. e.mp = {
  34404. changedTouches: []
  34405. };
  34406. e.mp.changedTouches.push({
  34407. x: e.offsetX,
  34408. y: e.offsetY
  34409. });
  34410. return e;
  34411. }
  34412. // 经纬度转墨卡托
  34413. function lonlat2mercator(longitude, latitude) {
  34414. var mercator = Array(2);
  34415. var x = longitude * 20037508.34 / 180;
  34416. var y = Math.log(Math.tan((90 + latitude) * Math.PI / 360)) / (Math.PI / 180);
  34417. y = y * 20037508.34 / 180;
  34418. mercator[0] = x;
  34419. mercator[1] = y;
  34420. return mercator;
  34421. }
  34422. // 墨卡托转经纬度
  34423. function mercator2lonlat(longitude, latitude) {
  34424. var lonlat = Array(2);
  34425. var x = longitude / 20037508.34 * 180;
  34426. var y = latitude / 20037508.34 * 180;
  34427. y = 180 / Math.PI * (2 * Math.atan(Math.exp(y * Math.PI / 180)) - Math.PI / 2);
  34428. lonlat[0] = x;
  34429. lonlat[1] = y;
  34430. return lonlat;
  34431. }
  34432. // hex 转 rgba
  34433. function hexToRgb(hexValue, opc) {
  34434. var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  34435. var hex = hexValue.replace(rgx, function (m, r, g, b) {
  34436. return r + r + g + g + b + b;
  34437. });
  34438. var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  34439. var r = parseInt(rgb[1], 16);
  34440. var g = parseInt(rgb[2], 16);
  34441. var b = parseInt(rgb[3], 16);
  34442. return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
  34443. }
  34444. function findRange(num, type, limit) {
  34445. if (isNaN(num)) {
  34446. throw new Error('[uCharts] series数据需为Number格式');
  34447. }
  34448. limit = limit || 10;
  34449. type = type ? type : 'upper';
  34450. var multiple = 1;
  34451. while (limit < 1) {
  34452. limit *= 10;
  34453. multiple *= 10;
  34454. }
  34455. if (type === 'upper') {
  34456. num = Math.ceil(num * multiple);
  34457. } else {
  34458. num = Math.floor(num * multiple);
  34459. }
  34460. while (num % limit !== 0) {
  34461. if (type === 'upper') {
  34462. num++;
  34463. } else {
  34464. num--;
  34465. }
  34466. }
  34467. return num / multiple;
  34468. }
  34469. function calCandleMA(dayArr, nameArr, colorArr, kdata) {
  34470. var seriesTemp = [];
  34471. for (var k = 0; k < dayArr.length; k++) {
  34472. var seriesItem = {
  34473. data: [],
  34474. name: nameArr[k],
  34475. color: colorArr[k]
  34476. };
  34477. for (var i = 0, len = kdata.length; i < len; i++) {
  34478. if (i < dayArr[k]) {
  34479. seriesItem.data.push(null);
  34480. continue;
  34481. }
  34482. var sum = 0;
  34483. for (var j = 0; j < dayArr[k]; j++) {
  34484. sum += kdata[i - j][1];
  34485. }
  34486. seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
  34487. }
  34488. seriesTemp.push(seriesItem);
  34489. }
  34490. return seriesTemp;
  34491. }
  34492. function calValidDistance(self, distance, chartData, config, opts) {
  34493. var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
  34494. var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
  34495. var validDistance = distance;
  34496. if (distance >= 0) {
  34497. validDistance = 0;
  34498. self.uevent.trigger('scrollLeft');
  34499. self.scrollOption.position = 'left';
  34500. opts.xAxis.scrollPosition = 'left';
  34501. } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
  34502. validDistance = dataChartAreaWidth - dataChartWidth;
  34503. self.uevent.trigger('scrollRight');
  34504. self.scrollOption.position = 'right';
  34505. opts.xAxis.scrollPosition = 'right';
  34506. } else {
  34507. self.scrollOption.position = distance;
  34508. opts.xAxis.scrollPosition = distance;
  34509. }
  34510. return validDistance;
  34511. }
  34512. function isInAngleRange(angle, startAngle, endAngle) {
  34513. function adjust(angle) {
  34514. while (angle < 0) {
  34515. angle += 2 * Math.PI;
  34516. }
  34517. while (angle > 2 * Math.PI) {
  34518. angle -= 2 * Math.PI;
  34519. }
  34520. return angle;
  34521. }
  34522. angle = adjust(angle);
  34523. startAngle = adjust(startAngle);
  34524. endAngle = adjust(endAngle);
  34525. if (startAngle > endAngle) {
  34526. endAngle += 2 * Math.PI;
  34527. if (angle < startAngle) {
  34528. angle += 2 * Math.PI;
  34529. }
  34530. }
  34531. return angle >= startAngle && angle <= endAngle;
  34532. }
  34533. function calRotateTranslate(x, y, h) {
  34534. var xv = x;
  34535. var yv = h - y;
  34536. var transX = xv + (h - yv - xv) / Math.sqrt(2);
  34537. transX *= -1;
  34538. var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
  34539. return {
  34540. transX: transX,
  34541. transY: transY
  34542. };
  34543. }
  34544. function createCurveControlPoints(points, i) {
  34545. function isNotMiddlePoint(points, i) {
  34546. if (points[i - 1] && points[i + 1]) {
  34547. 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);
  34548. } else {
  34549. return false;
  34550. }
  34551. }
  34552. function isNotMiddlePointX(points, i) {
  34553. if (points[i - 1] && points[i + 1]) {
  34554. 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);
  34555. } else {
  34556. return false;
  34557. }
  34558. }
  34559. var a = 0.2;
  34560. var b = 0.2;
  34561. var pAx = null;
  34562. var pAy = null;
  34563. var pBx = null;
  34564. var pBy = null;
  34565. if (i < 1) {
  34566. pAx = points[0].x + (points[1].x - points[0].x) * a;
  34567. pAy = points[0].y + (points[1].y - points[0].y) * a;
  34568. } else {
  34569. pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
  34570. pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
  34571. }
  34572. if (i > points.length - 3) {
  34573. var last = points.length - 1;
  34574. pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
  34575. pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
  34576. } else {
  34577. pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
  34578. pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
  34579. }
  34580. if (isNotMiddlePoint(points, i + 1)) {
  34581. pBy = points[i + 1].y;
  34582. }
  34583. if (isNotMiddlePoint(points, i)) {
  34584. pAy = points[i].y;
  34585. }
  34586. if (isNotMiddlePointX(points, i + 1)) {
  34587. pBx = points[i + 1].x;
  34588. }
  34589. if (isNotMiddlePointX(points, i)) {
  34590. pAx = points[i].x;
  34591. }
  34592. if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
  34593. pAy = points[i].y;
  34594. }
  34595. if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
  34596. pBy = points[i + 1].y;
  34597. }
  34598. if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
  34599. pAx = points[i].x;
  34600. }
  34601. if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
  34602. pBx = points[i + 1].x;
  34603. }
  34604. return {
  34605. ctrA: {
  34606. x: pAx,
  34607. y: pAy
  34608. },
  34609. ctrB: {
  34610. x: pBx,
  34611. y: pBy
  34612. }
  34613. };
  34614. }
  34615. function convertCoordinateOrigin(x, y, center) {
  34616. return {
  34617. x: center.x + x,
  34618. y: center.y - y
  34619. };
  34620. }
  34621. function avoidCollision(obj, target) {
  34622. if (target) {
  34623. // is collision test
  34624. while (util.isCollision(obj, target)) {
  34625. if (obj.start.x > 0) {
  34626. obj.start.y--;
  34627. } else if (obj.start.x < 0) {
  34628. obj.start.y++;
  34629. } else {
  34630. if (obj.start.y > 0) {
  34631. obj.start.y++;
  34632. } else {
  34633. obj.start.y--;
  34634. }
  34635. }
  34636. }
  34637. }
  34638. return obj;
  34639. }
  34640. function fixPieSeries(series, opts, config) {
  34641. var pieSeriesArr = [];
  34642. if (series.length > 0 && series[0].data.constructor.toString().indexOf('Array') > -1) {
  34643. opts._pieSeries_ = series;
  34644. var oldseries = series[0].data;
  34645. for (var i = 0; i < oldseries.length; i++) {
  34646. oldseries[i].formatter = series[0].formatter;
  34647. oldseries[i].data = oldseries[i].value;
  34648. pieSeriesArr.push(oldseries[i]);
  34649. }
  34650. opts.series = pieSeriesArr;
  34651. } else {
  34652. pieSeriesArr = series;
  34653. }
  34654. return pieSeriesArr;
  34655. }
  34656. function fillSeries(series, opts, config) {
  34657. var index = 0;
  34658. for (var i = 0; i < series.length; i++) {
  34659. var item = series[i];
  34660. if (!item.color) {
  34661. item.color = config.color[index];
  34662. index = (index + 1) % config.color.length;
  34663. }
  34664. if (!item.linearIndex) {
  34665. item.linearIndex = i;
  34666. }
  34667. if (!item.index) {
  34668. item.index = 0;
  34669. }
  34670. if (!item.type) {
  34671. item.type = opts.type;
  34672. }
  34673. if (typeof item.show == "undefined") {
  34674. item.show = true;
  34675. }
  34676. if (!item.type) {
  34677. item.type = opts.type;
  34678. }
  34679. if (!item.pointShape) {
  34680. item.pointShape = "circle";
  34681. }
  34682. if (!item.legendShape) {
  34683. switch (item.type) {
  34684. case 'line':
  34685. item.legendShape = "line";
  34686. break;
  34687. case 'column':
  34688. item.legendShape = "rect";
  34689. break;
  34690. case 'area':
  34691. item.legendShape = "triangle";
  34692. break;
  34693. case 'bar':
  34694. item.legendShape = "rect";
  34695. break;
  34696. default:
  34697. item.legendShape = "circle";
  34698. }
  34699. }
  34700. }
  34701. return series;
  34702. }
  34703. function fillCustomColor(linearType, customColor, series, config) {
  34704. var newcolor = customColor || [];
  34705. if (linearType == 'custom' && newcolor.length == 0) {
  34706. newcolor = config.linearColor;
  34707. }
  34708. if (linearType == 'custom' && newcolor.length < series.length) {
  34709. var chazhi = series.length - newcolor.length;
  34710. for (var i = 0; i < chazhi; i++) {
  34711. newcolor.push(config.linearColor[(i + 1) % config.linearColor.length]);
  34712. }
  34713. }
  34714. return newcolor;
  34715. }
  34716. function getDataRange(minData, maxData) {
  34717. var limit = 0;
  34718. var range = maxData - minData;
  34719. if (range >= 10000) {
  34720. limit = 1000;
  34721. } else if (range >= 1000) {
  34722. limit = 100;
  34723. } else if (range >= 100) {
  34724. limit = 10;
  34725. } else if (range >= 10) {
  34726. limit = 5;
  34727. } else if (range >= 1) {
  34728. limit = 1;
  34729. } else if (range >= 0.1) {
  34730. limit = 0.1;
  34731. } else if (range >= 0.01) {
  34732. limit = 0.01;
  34733. } else if (range >= 0.001) {
  34734. limit = 0.001;
  34735. } else if (range >= 0.0001) {
  34736. limit = 0.0001;
  34737. } else if (range >= 0.00001) {
  34738. limit = 0.00001;
  34739. } else {
  34740. limit = 0.000001;
  34741. }
  34742. return {
  34743. minRange: findRange(minData, 'lower', limit),
  34744. maxRange: findRange(maxData, 'upper', limit)
  34745. };
  34746. }
  34747. function measureText(text, fontSize, context) {
  34748. var width = 0;
  34749. text = String(text);
  34750. if (context !== false && context !== undefined && context.setFontSize && context.measureText) {
  34751. context.setFontSize(fontSize);
  34752. return context.measureText(text).width;
  34753. } else {
  34754. var text = text.split('');
  34755. for (var i = 0; i < text.length; i++) {
  34756. var item = text[i];
  34757. if (/[a-zA-Z]/.test(item)) {
  34758. width += 7;
  34759. } else if (/[0-9]/.test(item)) {
  34760. width += 5.5;
  34761. } else if (/\./.test(item)) {
  34762. width += 2.7;
  34763. } else if (/-/.test(item)) {
  34764. width += 3.25;
  34765. } else if (/:/.test(item)) {
  34766. width += 2.5;
  34767. } else if (/[\u4e00-\u9fa5]/.test(item)) {
  34768. width += 10;
  34769. } else if (/\(|\)/.test(item)) {
  34770. width += 3.73;
  34771. } else if (/\s/.test(item)) {
  34772. width += 2.5;
  34773. } else if (/%/.test(item)) {
  34774. width += 8;
  34775. } else {
  34776. width += 10;
  34777. }
  34778. }
  34779. return width * fontSize / 10;
  34780. }
  34781. }
  34782. function dataCombine(series) {
  34783. return series.reduce(function (a, b) {
  34784. return (a.data ? a.data : a).concat(b.data);
  34785. }, []);
  34786. }
  34787. function dataCombineStack(series, len) {
  34788. var sum = new Array(len);
  34789. for (var j = 0; j < sum.length; j++) {
  34790. sum[j] = 0;
  34791. }
  34792. for (var i = 0; i < series.length; i++) {
  34793. for (var j = 0; j < sum.length; j++) {
  34794. sum[j] += series[i].data[j];
  34795. }
  34796. }
  34797. return series.reduce(function (a, b) {
  34798. return (a.data ? a.data : a).concat(b.data).concat(sum);
  34799. }, []);
  34800. }
  34801. function getTouches(touches, opts, e) {
  34802. var x, y;
  34803. if (touches.clientX) {
  34804. if (opts.rotate) {
  34805. y = opts.height - touches.clientX * opts.pix;
  34806. x = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34807. } else {
  34808. x = touches.clientX * opts.pix;
  34809. y = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34810. }
  34811. } else {
  34812. if (opts.rotate) {
  34813. y = opts.height - touches.x * opts.pix;
  34814. x = touches.y * opts.pix;
  34815. } else {
  34816. x = touches.x * opts.pix;
  34817. y = touches.y * opts.pix;
  34818. }
  34819. }
  34820. return {
  34821. x: x,
  34822. y: y
  34823. };
  34824. }
  34825. function getSeriesDataItem(series, index, group) {
  34826. var data = [];
  34827. var newSeries = [];
  34828. var indexIsArr = index.constructor.toString().indexOf('Array') > -1;
  34829. if (indexIsArr) {
  34830. var tempSeries = filterSeries(series);
  34831. for (var i = 0; i < group.length; i++) {
  34832. newSeries.push(tempSeries[group[i]]);
  34833. }
  34834. } else {
  34835. newSeries = series;
  34836. }
  34837. ;
  34838. for (var _i = 0; _i < newSeries.length; _i++) {
  34839. var item = newSeries[_i];
  34840. var tmpindex = -1;
  34841. if (indexIsArr) {
  34842. tmpindex = index[_i];
  34843. } else {
  34844. tmpindex = index;
  34845. }
  34846. if (item.data[tmpindex] !== null && typeof item.data[tmpindex] !== 'undefined' && item.show) {
  34847. var seriesItem = {};
  34848. seriesItem.color = item.color;
  34849. seriesItem.type = item.type;
  34850. seriesItem.style = item.style;
  34851. seriesItem.pointShape = item.pointShape;
  34852. seriesItem.disableLegend = item.disableLegend;
  34853. seriesItem.name = item.name;
  34854. seriesItem.show = item.show;
  34855. seriesItem.data = item.formatter ? item.formatter(item.data[tmpindex]) : item.data[tmpindex];
  34856. data.push(seriesItem);
  34857. }
  34858. }
  34859. return data;
  34860. }
  34861. function getMaxTextListLength(list, fontSize, context) {
  34862. var lengthList = list.map(function (item) {
  34863. return measureText(item, fontSize, context);
  34864. });
  34865. return Math.max.apply(null, lengthList);
  34866. }
  34867. function getRadarCoordinateSeries(length) {
  34868. var eachAngle = 2 * Math.PI / length;
  34869. var CoordinateSeries = [];
  34870. for (var i = 0; i < length; i++) {
  34871. CoordinateSeries.push(eachAngle * i);
  34872. }
  34873. return CoordinateSeries.map(function (item) {
  34874. return -1 * item + Math.PI / 2;
  34875. });
  34876. }
  34877. function getToolTipData(seriesData, opts, index, group, categories) {
  34878. var option = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  34879. var calPoints = opts.chartData.calPoints ? opts.chartData.calPoints : [];
  34880. var points = {};
  34881. if (group.length > 0) {
  34882. var filterPoints = [];
  34883. for (var i = 0; i < group.length; i++) {
  34884. filterPoints.push(calPoints[group[i]]);
  34885. }
  34886. points = filterPoints[0][index[0]];
  34887. } else {
  34888. points = calPoints[0][index];
  34889. }
  34890. ;
  34891. var textList = seriesData.map(function (item) {
  34892. var titleText = null;
  34893. if (opts.categories && opts.categories.length > 0) {
  34894. titleText = categories[index];
  34895. }
  34896. ;
  34897. return {
  34898. text: option.formatter ? option.formatter(item, titleText, index, opts) : item.name + ': ' + item.data,
  34899. color: item.color
  34900. };
  34901. });
  34902. var offset = {
  34903. x: Math.round(points.x),
  34904. y: Math.round(points.y)
  34905. };
  34906. return {
  34907. textList: textList,
  34908. offset: offset
  34909. };
  34910. }
  34911. function getMixToolTipData(seriesData, opts, index, categories) {
  34912. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  34913. var points = opts.chartData.xAxisPoints[index] + opts.chartData.eachSpacing / 2;
  34914. var textList = seriesData.map(function (item) {
  34915. return {
  34916. text: option.formatter ? option.formatter(item, categories[index], index, opts) : item.name + ': ' + item.data,
  34917. color: item.color,
  34918. disableLegend: item.disableLegend ? true : false
  34919. };
  34920. });
  34921. textList = textList.filter(function (item) {
  34922. if (item.disableLegend !== true) {
  34923. return item;
  34924. }
  34925. });
  34926. var offset = {
  34927. x: Math.round(points),
  34928. y: 0
  34929. };
  34930. return {
  34931. textList: textList,
  34932. offset: offset
  34933. };
  34934. }
  34935. function getCandleToolTipData(series, seriesData, opts, index, categories, extra) {
  34936. var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  34937. var calPoints = opts.chartData.calPoints;
  34938. var upColor = extra.color.upFill;
  34939. var downColor = extra.color.downFill;
  34940. //颜色顺序为开盘,收盘,最低,最高
  34941. var color = [upColor, upColor, downColor, upColor];
  34942. var textList = [];
  34943. seriesData.map(function (item) {
  34944. if (index == 0) {
  34945. if (item.data[1] - item.data[0] < 0) {
  34946. color[1] = downColor;
  34947. } else {
  34948. color[1] = upColor;
  34949. }
  34950. } else {
  34951. if (item.data[0] < series[index - 1][1]) {
  34952. color[0] = downColor;
  34953. }
  34954. if (item.data[1] < item.data[0]) {
  34955. color[1] = downColor;
  34956. }
  34957. if (item.data[2] > series[index - 1][1]) {
  34958. color[2] = upColor;
  34959. }
  34960. if (item.data[3] < series[index - 1][1]) {
  34961. color[3] = downColor;
  34962. }
  34963. }
  34964. var text1 = {
  34965. text: '开盘:' + item.data[0],
  34966. color: color[0]
  34967. };
  34968. var text2 = {
  34969. text: '收盘:' + item.data[1],
  34970. color: color[1]
  34971. };
  34972. var text3 = {
  34973. text: '最低:' + item.data[2],
  34974. color: color[2]
  34975. };
  34976. var text4 = {
  34977. text: '最高:' + item.data[3],
  34978. color: color[3]
  34979. };
  34980. textList.push(text1, text2, text3, text4);
  34981. });
  34982. var validCalPoints = [];
  34983. var offset = {
  34984. x: 0,
  34985. y: 0
  34986. };
  34987. for (var i = 0; i < calPoints.length; i++) {
  34988. var points = calPoints[i];
  34989. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  34990. validCalPoints.push(points[index]);
  34991. }
  34992. }
  34993. offset.x = Math.round(validCalPoints[0][0].x);
  34994. return {
  34995. textList: textList,
  34996. offset: offset
  34997. };
  34998. }
  34999. function filterSeries(series) {
  35000. var tempSeries = [];
  35001. for (var i = 0; i < series.length; i++) {
  35002. if (series[i].show == true) {
  35003. tempSeries.push(series[i]);
  35004. }
  35005. }
  35006. return tempSeries;
  35007. }
  35008. function findCurrentIndex(currentPoints, calPoints, opts, config) {
  35009. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  35010. var current = {
  35011. index: -1,
  35012. group: []
  35013. };
  35014. var spacing = opts.chartData.eachSpacing / 2;
  35015. var xAxisPoints = [];
  35016. if (calPoints && calPoints.length > 0) {
  35017. if (!opts.categories) {
  35018. spacing = 0;
  35019. } else {
  35020. for (var i = 1; i < opts.chartData.xAxisPoints.length; i++) {
  35021. xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
  35022. }
  35023. if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
  35024. xAxisPoints = opts.chartData.xAxisPoints;
  35025. }
  35026. }
  35027. if (isInExactChartArea(currentPoints, opts, config)) {
  35028. if (!opts.categories) {
  35029. var timePoints = Array(calPoints.length);
  35030. for (var _i2 = 0; _i2 < calPoints.length; _i2++) {
  35031. timePoints[_i2] = Array(calPoints[_i2].length);
  35032. for (var j = 0; j < calPoints[_i2].length; j++) {
  35033. timePoints[_i2][j] = Math.abs(calPoints[_i2][j].x - currentPoints.x);
  35034. }
  35035. }
  35036. ;
  35037. var pointValue = Array(timePoints.length);
  35038. var pointIndex = Array(timePoints.length);
  35039. for (var _i3 = 0; _i3 < timePoints.length; _i3++) {
  35040. pointValue[_i3] = Math.min.apply(null, timePoints[_i3]);
  35041. pointIndex[_i3] = timePoints[_i3].indexOf(pointValue[_i3]);
  35042. }
  35043. var minValue = Math.min.apply(null, pointValue);
  35044. current.index = [];
  35045. for (var _i4 = 0; _i4 < pointValue.length; _i4++) {
  35046. if (pointValue[_i4] == minValue) {
  35047. current.group.push(_i4);
  35048. current.index.push(pointIndex[_i4]);
  35049. }
  35050. }
  35051. ;
  35052. } else {
  35053. xAxisPoints.forEach(function (item, index) {
  35054. if (currentPoints.x + offset + spacing > item) {
  35055. current.index = index;
  35056. }
  35057. });
  35058. }
  35059. }
  35060. }
  35061. return current;
  35062. }
  35063. function findBarChartCurrentIndex(currentPoints, calPoints, opts, config) {
  35064. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  35065. var current = {
  35066. index: -1,
  35067. group: []
  35068. };
  35069. var spacing = opts.chartData.eachSpacing / 2;
  35070. var yAxisPoints = opts.chartData.yAxisPoints;
  35071. if (calPoints && calPoints.length > 0) {
  35072. if (isInExactChartArea(currentPoints, opts, config)) {
  35073. yAxisPoints.forEach(function (item, index) {
  35074. if (currentPoints.y + offset + spacing > item) {
  35075. current.index = index;
  35076. }
  35077. });
  35078. }
  35079. }
  35080. return current;
  35081. }
  35082. function findLegendIndex(currentPoints, legendData, opts) {
  35083. var currentIndex = -1;
  35084. var gap = 0;
  35085. if (isInExactLegendArea(currentPoints, legendData.area)) {
  35086. var points = legendData.points;
  35087. var index = -1;
  35088. for (var i = 0, len = points.length; i < len; i++) {
  35089. var item = points[i];
  35090. for (var j = 0; j < item.length; j++) {
  35091. index += 1;
  35092. var area = item[j]['area'];
  35093. if (area && currentPoints.x > area[0] - gap && currentPoints.x < area[2] + gap && currentPoints.y > area[1] - gap && currentPoints.y < area[3] + gap) {
  35094. currentIndex = index;
  35095. break;
  35096. }
  35097. }
  35098. }
  35099. return currentIndex;
  35100. }
  35101. return currentIndex;
  35102. }
  35103. function isInExactLegendArea(currentPoints, area) {
  35104. return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
  35105. }
  35106. function isInExactChartArea(currentPoints, opts, config) {
  35107. 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];
  35108. }
  35109. function findRadarChartCurrentIndex(currentPoints, radarData, count) {
  35110. var eachAngleArea = 2 * Math.PI / count;
  35111. var currentIndex = -1;
  35112. if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
  35113. var fixAngle = function fixAngle(angle) {
  35114. if (angle < 0) {
  35115. angle += 2 * Math.PI;
  35116. }
  35117. if (angle > 2 * Math.PI) {
  35118. angle -= 2 * Math.PI;
  35119. }
  35120. return angle;
  35121. };
  35122. var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
  35123. angle = -1 * angle;
  35124. if (angle < 0) {
  35125. angle += 2 * Math.PI;
  35126. }
  35127. var angleList = radarData.angleList.map(function (item) {
  35128. item = fixAngle(-1 * item);
  35129. return item;
  35130. });
  35131. angleList.forEach(function (item, index) {
  35132. var rangeStart = fixAngle(item - eachAngleArea / 2);
  35133. var rangeEnd = fixAngle(item + eachAngleArea / 2);
  35134. if (rangeEnd < rangeStart) {
  35135. rangeEnd += 2 * Math.PI;
  35136. }
  35137. if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
  35138. currentIndex = index;
  35139. }
  35140. });
  35141. }
  35142. return currentIndex;
  35143. }
  35144. function findFunnelChartCurrentIndex(currentPoints, funnelData) {
  35145. var currentIndex = -1;
  35146. for (var i = 0, len = funnelData.series.length; i < len; i++) {
  35147. var item = funnelData.series[i];
  35148. if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
  35149. currentIndex = i;
  35150. break;
  35151. }
  35152. }
  35153. return currentIndex;
  35154. }
  35155. function findWordChartCurrentIndex(currentPoints, wordData) {
  35156. var currentIndex = -1;
  35157. for (var i = 0, len = wordData.length; i < len; i++) {
  35158. var item = wordData[i];
  35159. if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
  35160. currentIndex = i;
  35161. break;
  35162. }
  35163. }
  35164. return currentIndex;
  35165. }
  35166. function findMapChartCurrentIndex(currentPoints, opts) {
  35167. var currentIndex = -1;
  35168. var cData = opts.chartData.mapData;
  35169. var data = opts.series;
  35170. var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
  35171. var poi = [tmp.x, tmp.y];
  35172. for (var i = 0, len = data.length; i < len; i++) {
  35173. var item = data[i].geometry.coordinates;
  35174. if (isPoiWithinPoly(poi, item, opts.chartData.mapData.mercator)) {
  35175. currentIndex = i;
  35176. break;
  35177. }
  35178. }
  35179. return currentIndex;
  35180. }
  35181. function findRoseChartCurrentIndex(currentPoints, pieData, opts) {
  35182. var currentIndex = -1;
  35183. var series = getRoseDataPoints(opts._series_, opts.extra.rose.type, pieData.radius, pieData.radius);
  35184. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  35185. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  35186. angle = -angle;
  35187. if (opts.extra.rose && opts.extra.rose.offsetAngle) {
  35188. angle = angle - opts.extra.rose.offsetAngle * Math.PI / 180;
  35189. }
  35190. for (var i = 0, len = series.length; i < len; i++) {
  35191. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._rose_proportion_ * 2 * Math.PI)) {
  35192. currentIndex = i;
  35193. break;
  35194. }
  35195. }
  35196. }
  35197. return currentIndex;
  35198. }
  35199. function findPieChartCurrentIndex(currentPoints, pieData, opts) {
  35200. var currentIndex = -1;
  35201. var series = getPieDataPoints(pieData.series);
  35202. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  35203. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  35204. angle = -angle;
  35205. if (opts.extra.pie && opts.extra.pie.offsetAngle) {
  35206. angle = angle - opts.extra.pie.offsetAngle * Math.PI / 180;
  35207. }
  35208. if (opts.extra.ring && opts.extra.ring.offsetAngle) {
  35209. angle = angle - opts.extra.ring.offsetAngle * Math.PI / 180;
  35210. }
  35211. for (var i = 0, len = series.length; i < len; i++) {
  35212. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._proportion_ * 2 * Math.PI)) {
  35213. currentIndex = i;
  35214. break;
  35215. }
  35216. }
  35217. }
  35218. return currentIndex;
  35219. }
  35220. function isInExactPieChartArea(currentPoints, center, radius) {
  35221. return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
  35222. }
  35223. function splitPoints(points, eachSeries) {
  35224. var newPoints = [];
  35225. var items = [];
  35226. points.forEach(function (item, index) {
  35227. if (eachSeries.connectNulls) {
  35228. if (item !== null) {
  35229. items.push(item);
  35230. }
  35231. } else {
  35232. if (item !== null) {
  35233. items.push(item);
  35234. } else {
  35235. if (items.length) {
  35236. newPoints.push(items);
  35237. }
  35238. items = [];
  35239. }
  35240. }
  35241. });
  35242. if (items.length) {
  35243. newPoints.push(items);
  35244. }
  35245. return newPoints;
  35246. }
  35247. function calLegendData(series, opts, config, chartData, context) {
  35248. var legendData = {
  35249. area: {
  35250. start: {
  35251. x: 0,
  35252. y: 0
  35253. },
  35254. end: {
  35255. x: 0,
  35256. y: 0
  35257. },
  35258. width: 0,
  35259. height: 0,
  35260. wholeWidth: 0,
  35261. wholeHeight: 0
  35262. },
  35263. points: [],
  35264. widthArr: [],
  35265. heightArr: []
  35266. };
  35267. if (opts.legend.show === false) {
  35268. chartData.legendData = legendData;
  35269. return legendData;
  35270. }
  35271. var padding = opts.legend.padding * opts.pix;
  35272. var margin = opts.legend.margin * opts.pix;
  35273. var fontSize = opts.legend.fontSize ? opts.legend.fontSize * opts.pix : config.fontSize;
  35274. var shapeWidth = 15 * opts.pix;
  35275. var shapeRight = 5 * opts.pix;
  35276. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  35277. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  35278. var legendList = [];
  35279. var widthCount = 0;
  35280. var widthCountArr = [];
  35281. var currentRow = [];
  35282. for (var i = 0; i < series.length; i++) {
  35283. var item = series[i];
  35284. var itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  35285. if (widthCount + itemWidth > opts.width - opts.area[1] - opts.area[3]) {
  35286. legendList.push(currentRow);
  35287. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  35288. widthCount = itemWidth;
  35289. currentRow = [item];
  35290. } else {
  35291. widthCount += itemWidth;
  35292. currentRow.push(item);
  35293. }
  35294. }
  35295. if (currentRow.length) {
  35296. legendList.push(currentRow);
  35297. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  35298. legendData.widthArr = widthCountArr;
  35299. var legendWidth = Math.max.apply(null, widthCountArr);
  35300. switch (opts.legend.float) {
  35301. case 'left':
  35302. legendData.area.start.x = opts.area[3];
  35303. legendData.area.end.x = opts.area[3] + legendWidth + 2 * padding;
  35304. break;
  35305. case 'right':
  35306. legendData.area.start.x = opts.width - opts.area[1] - legendWidth - 2 * padding;
  35307. legendData.area.end.x = opts.width - opts.area[1];
  35308. break;
  35309. default:
  35310. legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
  35311. legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
  35312. }
  35313. legendData.area.width = legendWidth + 2 * padding;
  35314. legendData.area.wholeWidth = legendWidth + 2 * padding;
  35315. legendData.area.height = legendList.length * lineHeight + 2 * padding;
  35316. legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
  35317. legendData.points = legendList;
  35318. }
  35319. } else {
  35320. var len = series.length;
  35321. var maxHeight = opts.height - opts.area[0] - opts.area[2] - 2 * margin - 2 * padding;
  35322. var maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
  35323. legendData.area.height = maxLength * lineHeight + padding * 2;
  35324. legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
  35325. switch (opts.legend.float) {
  35326. case 'top':
  35327. legendData.area.start.y = opts.area[0] + margin;
  35328. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  35329. break;
  35330. case 'bottom':
  35331. legendData.area.start.y = opts.height - opts.area[2] - margin - legendData.area.height;
  35332. legendData.area.end.y = opts.height - opts.area[2] - margin;
  35333. break;
  35334. default:
  35335. legendData.area.start.y = (opts.height - legendData.area.height) / 2;
  35336. legendData.area.end.y = (opts.height + legendData.area.height) / 2;
  35337. }
  35338. var lineNum = len % maxLength === 0 ? len / maxLength : Math.floor(len / maxLength + 1);
  35339. var _currentRow = [];
  35340. for (var _i5 = 0; _i5 < lineNum; _i5++) {
  35341. var temp = series.slice(_i5 * maxLength, _i5 * maxLength + maxLength);
  35342. _currentRow.push(temp);
  35343. }
  35344. legendData.points = _currentRow;
  35345. if (_currentRow.length) {
  35346. for (var _i6 = 0; _i6 < _currentRow.length; _i6++) {
  35347. var _item = _currentRow[_i6];
  35348. var maxWidth = 0;
  35349. for (var j = 0; j < _item.length; j++) {
  35350. var _itemWidth = shapeWidth + shapeRight + measureText(_item[j].name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  35351. if (_itemWidth > maxWidth) {
  35352. maxWidth = _itemWidth;
  35353. }
  35354. }
  35355. legendData.widthArr.push(maxWidth);
  35356. legendData.heightArr.push(_item.length * lineHeight + padding * 2);
  35357. }
  35358. var _legendWidth = 0;
  35359. for (var _i7 = 0; _i7 < legendData.widthArr.length; _i7++) {
  35360. _legendWidth += legendData.widthArr[_i7];
  35361. }
  35362. legendData.area.width = _legendWidth - opts.legend.itemGap * opts.pix + 2 * padding;
  35363. legendData.area.wholeWidth = legendData.area.width + padding;
  35364. }
  35365. }
  35366. switch (opts.legend.position) {
  35367. case 'top':
  35368. legendData.area.start.y = opts.area[0] + margin;
  35369. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  35370. break;
  35371. case 'bottom':
  35372. legendData.area.start.y = opts.height - opts.area[2] - legendData.area.height - margin;
  35373. legendData.area.end.y = opts.height - opts.area[2] - margin;
  35374. break;
  35375. case 'left':
  35376. legendData.area.start.x = opts.area[3];
  35377. legendData.area.end.x = opts.area[3] + legendData.area.width;
  35378. break;
  35379. case 'right':
  35380. legendData.area.start.x = opts.width - opts.area[1] - legendData.area.width;
  35381. legendData.area.end.x = opts.width - opts.area[1];
  35382. break;
  35383. }
  35384. chartData.legendData = legendData;
  35385. return legendData;
  35386. }
  35387. function calCategoriesData(categories, opts, config, eachSpacing, context) {
  35388. var result = {
  35389. angle: 0,
  35390. xAxisHeight: config.xAxisHeight
  35391. };
  35392. var categoriesTextLenth = categories.map(function (item) {
  35393. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  35394. });
  35395. var maxTextLength = Math.max.apply(this, categoriesTextLenth);
  35396. if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  35397. result.angle = 45 * Math.PI / 180;
  35398. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  35399. }
  35400. return result;
  35401. }
  35402. function getXAxisTextList(series, opts, config, stack) {
  35403. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  35404. var data;
  35405. if (stack == 'stack') {
  35406. data = dataCombineStack(series, opts.categories.length);
  35407. } else {
  35408. data = dataCombine(series);
  35409. }
  35410. var sorted = [];
  35411. // remove null from data
  35412. data = data.filter(function (item) {
  35413. //return item !== null;
  35414. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35415. if (item.constructor.toString().indexOf('Array') > -1) {
  35416. return item !== null;
  35417. } else {
  35418. return item.value !== null;
  35419. }
  35420. } else {
  35421. return item !== null;
  35422. }
  35423. });
  35424. data.map(function (item) {
  35425. if ((0, _typeof2.default)(item) === 'object') {
  35426. if (item.constructor.toString().indexOf('Array') > -1) {
  35427. if (opts.type == 'candle') {
  35428. item.map(function (subitem) {
  35429. sorted.push(subitem);
  35430. });
  35431. } else {
  35432. sorted.push(item[0]);
  35433. }
  35434. } else {
  35435. sorted.push(item.value);
  35436. }
  35437. } else {
  35438. sorted.push(item);
  35439. }
  35440. });
  35441. var minData = 0;
  35442. var maxData = 0;
  35443. if (sorted.length > 0) {
  35444. minData = Math.min.apply(this, sorted);
  35445. maxData = Math.max.apply(this, sorted);
  35446. }
  35447. //为了兼容v1.9.0之前的项目
  35448. if (index > -1) {
  35449. if (typeof opts.xAxis.data[index].min === 'number') {
  35450. minData = Math.min(opts.xAxis.data[index].min, minData);
  35451. }
  35452. if (typeof opts.xAxis.data[index].max === 'number') {
  35453. maxData = Math.max(opts.xAxis.data[index].max, maxData);
  35454. }
  35455. } else {
  35456. if (typeof opts.xAxis.min === 'number') {
  35457. minData = Math.min(opts.xAxis.min, minData);
  35458. }
  35459. if (typeof opts.xAxis.max === 'number') {
  35460. maxData = Math.max(opts.xAxis.max, maxData);
  35461. }
  35462. }
  35463. if (minData === maxData) {
  35464. var rangeSpan = maxData || 10;
  35465. maxData += rangeSpan;
  35466. }
  35467. //var dataRange = getDataRange(minData, maxData);
  35468. var minRange = minData;
  35469. var maxRange = maxData;
  35470. var range = [];
  35471. var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
  35472. for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
  35473. range.push(minRange + eachRange * i);
  35474. }
  35475. return range;
  35476. }
  35477. function calXAxisData(series, opts, config, context) {
  35478. //堆叠图重算Y轴
  35479. var columnstyle = assign({}, {
  35480. type: ""
  35481. }, opts.extra.bar);
  35482. var result = {
  35483. angle: 0,
  35484. xAxisHeight: config.xAxisHeight
  35485. };
  35486. result.ranges = getXAxisTextList(series, opts, config, columnstyle.type);
  35487. result.rangesFormat = result.ranges.map(function (item) {
  35488. //item = opts.xAxis.formatter ? opts.xAxis.formatter(item) : util.toFixed(item, 2);
  35489. item = util.toFixed(item, 2);
  35490. return item;
  35491. });
  35492. var xAxisScaleValues = result.ranges.map(function (item) {
  35493. // 如果刻度值是浮点数,则保留两位小数
  35494. item = util.toFixed(item, 2);
  35495. // 若有自定义格式则调用自定义的格式化函数
  35496. //item = opts.xAxis.formatter ? opts.xAxis.formatter(Number(item)) : item;
  35497. return item;
  35498. });
  35499. result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
  35500. // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
  35501. var eachSpacing = result.eachSpacing;
  35502. var textLength = xAxisScaleValues.map(function (item) {
  35503. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  35504. });
  35505. // get max length of categories text
  35506. var maxTextLength = Math.max.apply(this, textLength);
  35507. // 如果刻度值文本内容过长,则将其逆时针旋转45°
  35508. if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  35509. result.angle = 45 * Math.PI / 180;
  35510. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  35511. }
  35512. if (opts.xAxis.disabled === true) {
  35513. result.xAxisHeight = 0;
  35514. }
  35515. return result;
  35516. }
  35517. function getRadarDataPoints(angleList, center, radius, series, opts) {
  35518. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  35519. var radarOption = opts.extra.radar || {};
  35520. radarOption.max = radarOption.max || 0;
  35521. var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
  35522. var data = [];
  35523. var _loop2 = function _loop2(i) {
  35524. var each = series[i];
  35525. var listItem = {};
  35526. listItem.color = each.color;
  35527. listItem.legendShape = each.legendShape;
  35528. listItem.pointShape = each.pointShape;
  35529. listItem.data = [];
  35530. each.data.forEach(function (item, index) {
  35531. var tmp = {};
  35532. tmp.angle = angleList[index];
  35533. tmp.proportion = item / maxData;
  35534. tmp.value = item;
  35535. tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
  35536. listItem.data.push(tmp);
  35537. });
  35538. data.push(listItem);
  35539. };
  35540. for (var i = 0; i < series.length; i++) {
  35541. _loop2(i);
  35542. }
  35543. return data;
  35544. }
  35545. function getPieDataPoints(series, radius) {
  35546. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  35547. var count = 0;
  35548. var _start_ = 0;
  35549. for (var i = 0; i < series.length; i++) {
  35550. var item = series[i];
  35551. item.data = item.data === null ? 0 : item.data;
  35552. count += item.data;
  35553. }
  35554. for (var _i8 = 0; _i8 < series.length; _i8++) {
  35555. var _item2 = series[_i8];
  35556. _item2.data = _item2.data === null ? 0 : _item2.data;
  35557. if (count === 0) {
  35558. _item2._proportion_ = 1 / series.length * process;
  35559. } else {
  35560. _item2._proportion_ = _item2.data / count * process;
  35561. }
  35562. _item2._radius_ = radius;
  35563. }
  35564. for (var _i9 = 0; _i9 < series.length; _i9++) {
  35565. var _item3 = series[_i9];
  35566. _item3._start_ = _start_;
  35567. _start_ += 2 * _item3._proportion_ * Math.PI;
  35568. }
  35569. return series;
  35570. }
  35571. function getFunnelDataPoints(series, radius, type, eachSpacing) {
  35572. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  35573. series = series.sort(function (a, b) {
  35574. return parseInt(b.data) - parseInt(a.data);
  35575. });
  35576. for (var i = 0; i < series.length; i++) {
  35577. if (type == 'funnel') {
  35578. series[i].radius = series[i].data / series[0].data * radius * process;
  35579. } else {
  35580. series[i].radius = eachSpacing * (series.length - i) / (eachSpacing * series.length) * radius * process;
  35581. }
  35582. series[i]._proportion_ = series[i].data / series[0].data;
  35583. }
  35584. if (type !== 'pyramid') {
  35585. series.reverse();
  35586. }
  35587. return series;
  35588. }
  35589. function getRoseDataPoints(series, type, minRadius, radius) {
  35590. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  35591. var count = 0;
  35592. var _start_ = 0;
  35593. var dataArr = [];
  35594. for (var i = 0; i < series.length; i++) {
  35595. var item = series[i];
  35596. item.data = item.data === null ? 0 : item.data;
  35597. count += item.data;
  35598. dataArr.push(item.data);
  35599. }
  35600. var minData = Math.min.apply(null, dataArr);
  35601. var maxData = Math.max.apply(null, dataArr);
  35602. var radiusLength = radius - minRadius;
  35603. for (var _i10 = 0; _i10 < series.length; _i10++) {
  35604. var _item4 = series[_i10];
  35605. _item4.data = _item4.data === null ? 0 : _item4.data;
  35606. if (count === 0) {
  35607. _item4._proportion_ = 1 / series.length * process;
  35608. _item4._rose_proportion_ = 1 / series.length * process;
  35609. } else {
  35610. _item4._proportion_ = _item4.data / count * process;
  35611. if (type == 'area') {
  35612. _item4._rose_proportion_ = 1 / series.length * process;
  35613. } else {
  35614. _item4._rose_proportion_ = _item4.data / count * process;
  35615. }
  35616. }
  35617. _item4._radius_ = minRadius + radiusLength * ((_item4.data - minData) / (maxData - minData)) || radius;
  35618. }
  35619. for (var _i11 = 0; _i11 < series.length; _i11++) {
  35620. var _item5 = series[_i11];
  35621. _item5._start_ = _start_;
  35622. _start_ += 2 * _item5._rose_proportion_ * Math.PI;
  35623. }
  35624. return series;
  35625. }
  35626. function getArcbarDataPoints(series, arcbarOption) {
  35627. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  35628. if (process == 1) {
  35629. process = 0.999999;
  35630. }
  35631. for (var i = 0; i < series.length; i++) {
  35632. var item = series[i];
  35633. item.data = item.data === null ? 0 : item.data;
  35634. var totalAngle = void 0;
  35635. if (arcbarOption.type == 'circle') {
  35636. totalAngle = 2;
  35637. } else {
  35638. if (arcbarOption.endAngle < arcbarOption.startAngle) {
  35639. totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
  35640. } else {
  35641. totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
  35642. }
  35643. }
  35644. item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
  35645. if (item._proportion_ >= 2) {
  35646. item._proportion_ = item._proportion_ % 2;
  35647. }
  35648. }
  35649. return series;
  35650. }
  35651. function getGaugeAxisPoints(categories, startAngle, endAngle) {
  35652. var totalAngle = startAngle - endAngle + 1;
  35653. var tempStartAngle = startAngle;
  35654. for (var i = 0; i < categories.length; i++) {
  35655. categories[i].value = categories[i].value === null ? 0 : categories[i].value;
  35656. categories[i]._startAngle_ = tempStartAngle;
  35657. categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
  35658. if (categories[i]._endAngle_ >= 2) {
  35659. categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
  35660. }
  35661. tempStartAngle = categories[i]._endAngle_;
  35662. }
  35663. return categories;
  35664. }
  35665. function getGaugeDataPoints(series, categories, gaugeOption) {
  35666. var process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  35667. for (var i = 0; i < series.length; i++) {
  35668. var item = series[i];
  35669. item.data = item.data === null ? 0 : item.data;
  35670. if (gaugeOption.pointer.color == 'auto') {
  35671. for (var _i12 = 0; _i12 < categories.length; _i12++) {
  35672. if (item.data <= categories[_i12].value) {
  35673. item.color = categories[_i12].color;
  35674. break;
  35675. }
  35676. }
  35677. } else {
  35678. item.color = gaugeOption.pointer.color;
  35679. }
  35680. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  35681. item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
  35682. item._oldAngle_ = gaugeOption.oldAngle;
  35683. if (gaugeOption.oldAngle < gaugeOption.endAngle) {
  35684. item._oldAngle_ += 2;
  35685. }
  35686. if (item.data >= gaugeOption.oldData) {
  35687. item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
  35688. } else {
  35689. item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
  35690. }
  35691. if (item._proportion_ >= 2) {
  35692. item._proportion_ = item._proportion_ % 2;
  35693. }
  35694. }
  35695. return series;
  35696. }
  35697. function getPieTextMaxLength(series, config, context, opts) {
  35698. series = getPieDataPoints(series);
  35699. var maxLength = 0;
  35700. for (var i = 0; i < series.length; i++) {
  35701. var item = series[i];
  35702. var text = item.formatter ? item.formatter(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  35703. maxLength = Math.max(maxLength, measureText(text, item.textSize * opts.pix || config.fontSize, context));
  35704. }
  35705. return maxLength;
  35706. }
  35707. function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
  35708. return points.map(function (item) {
  35709. if (item === null) {
  35710. return null;
  35711. }
  35712. var seriesGap = 0;
  35713. var categoryGap = 0;
  35714. if (opts.type == 'mix') {
  35715. seriesGap = opts.extra.mix.column.seriesGap * opts.pix || 0;
  35716. categoryGap = opts.extra.mix.column.categoryGap * opts.pix || 0;
  35717. } else {
  35718. seriesGap = opts.extra.column.seriesGap * opts.pix || 0;
  35719. categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35720. }
  35721. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  35722. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  35723. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  35724. if (opts.extra.mix && opts.extra.mix.column.width && +opts.extra.mix.column.width > 0) {
  35725. item.width = Math.min(item.width, +opts.extra.mix.column.width * opts.pix);
  35726. }
  35727. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35728. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35729. }
  35730. if (item.width <= 0) {
  35731. item.width = 1;
  35732. }
  35733. item.x += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  35734. return item;
  35735. });
  35736. }
  35737. function fixBarData(points, eachSpacing, columnLen, index, config, opts) {
  35738. return points.map(function (item) {
  35739. if (item === null) {
  35740. return null;
  35741. }
  35742. var seriesGap = 0;
  35743. var categoryGap = 0;
  35744. seriesGap = opts.extra.bar.seriesGap * opts.pix || 0;
  35745. categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  35746. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  35747. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  35748. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  35749. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  35750. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  35751. }
  35752. if (item.width <= 0) {
  35753. item.width = 1;
  35754. }
  35755. item.y += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  35756. return item;
  35757. });
  35758. }
  35759. function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
  35760. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35761. return points.map(function (item) {
  35762. if (item === null) {
  35763. return null;
  35764. }
  35765. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35766. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35767. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35768. }
  35769. if (index > 0) {
  35770. item.width -= 2 * border;
  35771. }
  35772. return item;
  35773. });
  35774. }
  35775. function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  35776. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35777. return points.map(function (item, indexn) {
  35778. if (item === null) {
  35779. return null;
  35780. }
  35781. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35782. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35783. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35784. }
  35785. if (item.width <= 0) {
  35786. item.width = 1;
  35787. }
  35788. return item;
  35789. });
  35790. }
  35791. function fixBarStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  35792. var categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  35793. return points.map(function (item, indexn) {
  35794. if (item === null) {
  35795. return null;
  35796. }
  35797. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35798. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  35799. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  35800. }
  35801. if (item.width <= 0) {
  35802. item.width = 1;
  35803. }
  35804. return item;
  35805. });
  35806. }
  35807. function getXAxisPoints(categories, opts, config) {
  35808. var spacingValid = opts.width - opts.area[1] - opts.area[3];
  35809. var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
  35810. if ((opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble' || opts.type == 'bar') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
  35811. dataCount -= 1;
  35812. }
  35813. var eachSpacing = spacingValid / dataCount;
  35814. var xAxisPoints = [];
  35815. var startX = opts.area[3];
  35816. var endX = opts.width - opts.area[1];
  35817. categories.forEach(function (item, index) {
  35818. xAxisPoints.push(startX + index * eachSpacing);
  35819. });
  35820. if (opts.xAxis.boundaryGap !== 'justify') {
  35821. if (opts.enableScroll === true) {
  35822. xAxisPoints.push(startX + categories.length * eachSpacing);
  35823. } else {
  35824. xAxisPoints.push(endX);
  35825. }
  35826. }
  35827. return {
  35828. xAxisPoints: xAxisPoints,
  35829. startX: startX,
  35830. endX: endX,
  35831. eachSpacing: eachSpacing
  35832. };
  35833. }
  35834. function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35835. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35836. var points = [];
  35837. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35838. data.forEach(function (item, index) {
  35839. if (item === null) {
  35840. points.push(null);
  35841. } else {
  35842. var cPoints = [];
  35843. item.forEach(function (items, indexs) {
  35844. var point = {};
  35845. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35846. var value = items.value || items;
  35847. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35848. height *= process;
  35849. point.y = opts.height - Math.round(height) - opts.area[2];
  35850. cPoints.push(point);
  35851. });
  35852. points.push(cPoints);
  35853. }
  35854. });
  35855. return points;
  35856. }
  35857. function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35858. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35859. var boundaryGap = 'center';
  35860. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  35861. boundaryGap = opts.xAxis.boundaryGap;
  35862. }
  35863. var points = [];
  35864. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35865. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35866. data.forEach(function (item, index) {
  35867. if (item === null) {
  35868. points.push(null);
  35869. } else {
  35870. var point = {};
  35871. point.color = item.color;
  35872. point.x = xAxisPoints[index];
  35873. var value = item;
  35874. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35875. if (item.constructor.toString().indexOf('Array') > -1) {
  35876. var xranges, xminRange, xmaxRange;
  35877. xranges = [].concat(opts.chartData.xAxisData.ranges);
  35878. xminRange = xranges.shift();
  35879. xmaxRange = xranges.pop();
  35880. value = item[1];
  35881. point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
  35882. if (opts.type == 'bubble') {
  35883. point.r = item[2];
  35884. point.t = item[3];
  35885. }
  35886. } else {
  35887. value = item.value;
  35888. }
  35889. }
  35890. if (boundaryGap == 'center') {
  35891. point.x += eachSpacing / 2;
  35892. }
  35893. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35894. height *= process;
  35895. point.y = opts.height - height - opts.area[2];
  35896. points.push(point);
  35897. }
  35898. });
  35899. return points;
  35900. }
  35901. function getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config) {
  35902. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35903. var points = [];
  35904. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35905. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35906. data.forEach(function (item, index) {
  35907. if (item === null) {
  35908. points.push(null);
  35909. } else {
  35910. var point = {};
  35911. point.color = item.color;
  35912. point.y = yAxisPoints[index];
  35913. var value = item;
  35914. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35915. value = item.value;
  35916. }
  35917. var height = validWidth * (value - minRange) / (maxRange - minRange);
  35918. height *= process;
  35919. point.height = height;
  35920. point.value = value;
  35921. point.x = height + opts.area[3];
  35922. points.push(point);
  35923. }
  35924. });
  35925. return points;
  35926. }
  35927. function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35928. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35929. var points = [];
  35930. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35931. data.forEach(function (item, index) {
  35932. if (item === null) {
  35933. points.push(null);
  35934. } else {
  35935. var point = {};
  35936. point.color = item.color;
  35937. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35938. if (seriesIndex > 0) {
  35939. var value = 0;
  35940. for (var i = 0; i <= seriesIndex; i++) {
  35941. value += stackSeries[i].data[index];
  35942. }
  35943. var value0 = value - item;
  35944. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35945. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35946. } else {
  35947. var value = item;
  35948. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35949. var height0 = 0;
  35950. }
  35951. var heightc = height0;
  35952. height *= process;
  35953. heightc *= process;
  35954. point.y = opts.height - Math.round(height) - opts.area[2];
  35955. point.y0 = opts.height - Math.round(heightc) - opts.area[2];
  35956. points.push(point);
  35957. }
  35958. });
  35959. return points;
  35960. }
  35961. function getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35962. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35963. var points = [];
  35964. var validHeight = opts.width - opts.area[1] - opts.area[3];
  35965. data.forEach(function (item, index) {
  35966. if (item === null) {
  35967. points.push(null);
  35968. } else {
  35969. var point = {};
  35970. point.color = item.color;
  35971. point.y = yAxisPoints[index];
  35972. if (seriesIndex > 0) {
  35973. var value = 0;
  35974. for (var i = 0; i <= seriesIndex; i++) {
  35975. value += stackSeries[i].data[index];
  35976. }
  35977. var value0 = value - item;
  35978. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35979. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35980. } else {
  35981. var value = item;
  35982. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35983. var height0 = 0;
  35984. }
  35985. var heightc = height0;
  35986. height *= process;
  35987. heightc *= process;
  35988. point.height = height - heightc;
  35989. point.x = opts.area[3] + height;
  35990. point.x0 = opts.area[3] + heightc;
  35991. points.push(point);
  35992. }
  35993. });
  35994. return points;
  35995. }
  35996. function getYAxisTextList(series, opts, config, stack, yData) {
  35997. var index = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : -1;
  35998. var data;
  35999. if (stack == 'stack') {
  36000. data = dataCombineStack(series, opts.categories.length);
  36001. } else {
  36002. data = dataCombine(series);
  36003. }
  36004. var sorted = [];
  36005. // remove null from data
  36006. data = data.filter(function (item) {
  36007. //return item !== null;
  36008. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  36009. if (item.constructor.toString().indexOf('Array') > -1) {
  36010. return item !== null;
  36011. } else {
  36012. return item.value !== null;
  36013. }
  36014. } else {
  36015. return item !== null;
  36016. }
  36017. });
  36018. data.map(function (item) {
  36019. if ((0, _typeof2.default)(item) === 'object') {
  36020. if (item.constructor.toString().indexOf('Array') > -1) {
  36021. if (opts.type == 'candle') {
  36022. item.map(function (subitem) {
  36023. sorted.push(subitem);
  36024. });
  36025. } else {
  36026. sorted.push(item[1]);
  36027. }
  36028. } else {
  36029. sorted.push(item.value);
  36030. }
  36031. } else {
  36032. sorted.push(item);
  36033. }
  36034. });
  36035. var minData = yData.min || 0;
  36036. var maxData = yData.max || 0;
  36037. if (sorted.length > 0) {
  36038. minData = Math.min.apply(this, sorted);
  36039. maxData = Math.max.apply(this, sorted);
  36040. }
  36041. //为了兼容v1.9.0之前的项目
  36042. // if (index > -1) {
  36043. // if (typeof opts.yAxis.data[index].min === 'number') {
  36044. // minData = Math.min(opts.yAxis.data[index].min, minData);
  36045. // }
  36046. // if (typeof opts.yAxis.data[index].max === 'number') {
  36047. // maxData = Math.max(opts.yAxis.data[index].max, maxData);
  36048. // }
  36049. // } else {
  36050. // if (typeof opts.yAxis.min === 'number') {
  36051. // minData = Math.min(opts.yAxis.min, minData);
  36052. // }
  36053. // if (typeof opts.yAxis.max === 'number') {
  36054. // maxData = Math.max(opts.yAxis.max, maxData);
  36055. // }
  36056. // }
  36057. if (minData === maxData) {
  36058. var rangeSpan = maxData || 10;
  36059. maxData += rangeSpan;
  36060. }
  36061. var dataRange = getDataRange(minData, maxData);
  36062. var minRange = yData.min === undefined || yData.min === null ? dataRange.minRange : yData.min;
  36063. var maxRange = yData.max === undefined || yData.min === null ? dataRange.maxRange : yData.max;
  36064. var range = [];
  36065. var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
  36066. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  36067. range.push(minRange + eachRange * i);
  36068. }
  36069. return range.reverse();
  36070. }
  36071. function calYAxisData(series, opts, config, context) {
  36072. //堆叠图重算Y轴
  36073. var columnstyle = assign({}, {
  36074. type: ""
  36075. }, opts.extra.column);
  36076. //如果是多Y轴,重新计算
  36077. var YLength = opts.yAxis.data.length;
  36078. var newSeries = new Array(YLength);
  36079. if (YLength > 0) {
  36080. for (var i = 0; i < YLength; i++) {
  36081. newSeries[i] = [];
  36082. for (var j = 0; j < series.length; j++) {
  36083. if (series[j].index == i) {
  36084. newSeries[i].push(series[j]);
  36085. }
  36086. }
  36087. }
  36088. var rangesArr = new Array(YLength);
  36089. var rangesFormatArr = new Array(YLength);
  36090. var yAxisWidthArr = new Array(YLength);
  36091. var _loop3 = function _loop3(_i13) {
  36092. var yData = opts.yAxis.data[_i13];
  36093. //如果总开关不显示,强制每个Y轴为不显示
  36094. if (opts.yAxis.disabled == true) {
  36095. yData.disabled = true;
  36096. }
  36097. if (yData.type === 'categories') {
  36098. if (!yData.formatter) {
  36099. yData.formatter = function (val) {
  36100. return val + (yData.unit || '');
  36101. };
  36102. }
  36103. yData.categories = yData.categories || opts.categories;
  36104. rangesArr[_i13] = yData.categories;
  36105. } else {
  36106. if (!yData.formatter) {
  36107. yData.formatter = function (val) {
  36108. return val.toFixed(yData.tofix) + (yData.unit || '');
  36109. };
  36110. }
  36111. rangesArr[_i13] = getYAxisTextList(newSeries[_i13], opts, config, columnstyle.type, yData, _i13);
  36112. }
  36113. var yAxisFontSizes = yData.fontSize * opts.pix || config.fontSize;
  36114. yAxisWidthArr[_i13] = {
  36115. position: yData.position ? yData.position : 'left',
  36116. width: 0
  36117. };
  36118. rangesFormatArr[_i13] = rangesArr[_i13].map(function (items) {
  36119. items = yData.formatter(items);
  36120. yAxisWidthArr[_i13].width = Math.max(yAxisWidthArr[_i13].width, measureText(items, yAxisFontSizes, context) + 5);
  36121. return items;
  36122. });
  36123. var calibration = yData.calibration ? 4 * opts.pix : 0;
  36124. yAxisWidthArr[_i13].width += calibration + 3 * opts.pix;
  36125. if (yData.disabled === true) {
  36126. yAxisWidthArr[_i13].width = 0;
  36127. }
  36128. };
  36129. for (var _i13 = 0; _i13 < YLength; _i13++) {
  36130. _loop3(_i13);
  36131. }
  36132. } else {
  36133. var rangesArr = new Array(1);
  36134. var rangesFormatArr = new Array(1);
  36135. var yAxisWidthArr = new Array(1);
  36136. if (opts.type === 'bar') {
  36137. rangesArr[0] = opts.categories;
  36138. if (!opts.yAxis.formatter) {
  36139. opts.yAxis.formatter = function (val) {
  36140. return val + (opts.yAxis.unit || '');
  36141. };
  36142. }
  36143. } else {
  36144. if (!opts.yAxis.formatter) {
  36145. opts.yAxis.formatter = function (val) {
  36146. return val.toFixed(opts.yAxis.tofix) + (opts.yAxis.unit || '');
  36147. };
  36148. }
  36149. rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type, {});
  36150. }
  36151. yAxisWidthArr[0] = {
  36152. position: 'left',
  36153. width: 0
  36154. };
  36155. var yAxisFontSize = opts.yAxis.fontSize * opts.pix || config.fontSize;
  36156. rangesFormatArr[0] = rangesArr[0].map(function (item) {
  36157. item = opts.yAxis.formatter(item);
  36158. yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize, context) + 5);
  36159. return item;
  36160. });
  36161. yAxisWidthArr[0].width += 3 * opts.pix;
  36162. if (opts.yAxis.disabled === true) {
  36163. yAxisWidthArr[0] = {
  36164. position: 'left',
  36165. width: 0
  36166. };
  36167. opts.yAxis.data[0] = {
  36168. disabled: true
  36169. };
  36170. } else {
  36171. opts.yAxis.data[0] = {
  36172. disabled: false,
  36173. position: 'left',
  36174. max: opts.yAxis.max,
  36175. min: opts.yAxis.min,
  36176. formatter: opts.yAxis.formatter
  36177. };
  36178. if (opts.type === 'bar') {
  36179. opts.yAxis.data[0].categories = opts.categories;
  36180. opts.yAxis.data[0].type = 'categories';
  36181. }
  36182. }
  36183. }
  36184. return {
  36185. rangesFormat: rangesFormatArr,
  36186. ranges: rangesArr,
  36187. yAxisWidth: yAxisWidthArr
  36188. };
  36189. }
  36190. function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
  36191. var ranges = [].concat(opts.chartData.yAxisData.ranges);
  36192. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  36193. var minAxis = opts.area[0];
  36194. var items = [];
  36195. for (var i = 0; i < ranges.length; i++) {
  36196. var maxVal = ranges[i].shift();
  36197. var minVal = ranges[i].pop();
  36198. var item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
  36199. item = opts.yAxis.data[i].formatter ? opts.yAxis.data[i].formatter(item) : item.toFixed(0);
  36200. items.push(String(item));
  36201. }
  36202. return items;
  36203. }
  36204. function calMarkLineData(points, opts) {
  36205. var minRange, maxRange;
  36206. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  36207. for (var i = 0; i < points.length; i++) {
  36208. points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
  36209. var range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
  36210. minRange = range.pop();
  36211. maxRange = range.shift();
  36212. var height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
  36213. points[i].y = opts.height - Math.round(height) - opts.area[2];
  36214. }
  36215. return points;
  36216. }
  36217. function contextRotate(context, opts) {
  36218. if (opts.rotateLock !== true) {
  36219. context.translate(opts.height, 0);
  36220. context.rotate(90 * Math.PI / 180);
  36221. } else if (opts._rotate_ !== true) {
  36222. context.translate(opts.height, 0);
  36223. context.rotate(90 * Math.PI / 180);
  36224. opts._rotate_ = true;
  36225. }
  36226. }
  36227. function drawPointShape(points, color, shape, context, opts) {
  36228. context.beginPath();
  36229. if (opts.dataPointShapeType == 'hollow') {
  36230. context.setStrokeStyle(color);
  36231. context.setFillStyle(opts.background);
  36232. context.setLineWidth(2 * opts.pix);
  36233. } else {
  36234. context.setStrokeStyle("#ffffff");
  36235. context.setFillStyle(color);
  36236. context.setLineWidth(1 * opts.pix);
  36237. }
  36238. if (shape === 'diamond') {
  36239. points.forEach(function (item, index) {
  36240. if (item !== null) {
  36241. context.moveTo(item.x, item.y - 4.5);
  36242. context.lineTo(item.x - 4.5, item.y);
  36243. context.lineTo(item.x, item.y + 4.5);
  36244. context.lineTo(item.x + 4.5, item.y);
  36245. context.lineTo(item.x, item.y - 4.5);
  36246. }
  36247. });
  36248. } else if (shape === 'circle') {
  36249. points.forEach(function (item, index) {
  36250. if (item !== null) {
  36251. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  36252. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  36253. }
  36254. });
  36255. } else if (shape === 'square') {
  36256. points.forEach(function (item, index) {
  36257. if (item !== null) {
  36258. context.moveTo(item.x - 3.5, item.y - 3.5);
  36259. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  36260. }
  36261. });
  36262. } else if (shape === 'triangle') {
  36263. points.forEach(function (item, index) {
  36264. if (item !== null) {
  36265. context.moveTo(item.x, item.y - 4.5);
  36266. context.lineTo(item.x - 4.5, item.y + 4.5);
  36267. context.lineTo(item.x + 4.5, item.y + 4.5);
  36268. context.lineTo(item.x, item.y - 4.5);
  36269. }
  36270. });
  36271. } else if (shape === 'triangle') {
  36272. return;
  36273. }
  36274. context.closePath();
  36275. context.fill();
  36276. context.stroke();
  36277. }
  36278. function drawRingTitle(opts, config, context, center) {
  36279. var titlefontSize = opts.title.fontSize || config.titleFontSize;
  36280. var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
  36281. var title = opts.title.name || '';
  36282. var subtitle = opts.subtitle.name || '';
  36283. var titleFontColor = opts.title.color || opts.fontColor;
  36284. var subtitleFontColor = opts.subtitle.color || opts.fontColor;
  36285. var titleHeight = title ? titlefontSize : 0;
  36286. var subtitleHeight = subtitle ? subtitlefontSize : 0;
  36287. var margin = 5;
  36288. if (subtitle) {
  36289. var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
  36290. var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix;
  36291. var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
  36292. if (title) {
  36293. startY += (titleHeight * opts.pix + margin) / 2;
  36294. }
  36295. context.beginPath();
  36296. context.setFontSize(subtitlefontSize * opts.pix);
  36297. context.setFillStyle(subtitleFontColor);
  36298. context.fillText(subtitle, startX, startY);
  36299. context.closePath();
  36300. context.stroke();
  36301. }
  36302. if (title) {
  36303. var _textWidth = measureText(title, titlefontSize * opts.pix, context);
  36304. var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
  36305. var _startY = center.y + titlefontSize * opts.pix / 2 + (opts.title.offsetY || 0) * opts.pix;
  36306. if (subtitle) {
  36307. _startY -= (subtitleHeight * opts.pix + margin) / 2;
  36308. }
  36309. context.beginPath();
  36310. context.setFontSize(titlefontSize * opts.pix);
  36311. context.setFillStyle(titleFontColor);
  36312. context.fillText(title, _startX, _startY);
  36313. context.closePath();
  36314. context.stroke();
  36315. }
  36316. }
  36317. function drawPointText(points, series, config, context, opts) {
  36318. // 绘制数据文案
  36319. var data = series.data;
  36320. var textOffset = series.textOffset ? series.textOffset : 0;
  36321. points.forEach(function (item, index) {
  36322. if (item !== null) {
  36323. context.beginPath();
  36324. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  36325. context.setFontSize(fontSize);
  36326. context.setFillStyle(series.textColor || opts.fontColor);
  36327. var value = data[index];
  36328. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  36329. if (data[index].constructor.toString().indexOf('Array') > -1) {
  36330. value = data[index][1];
  36331. } else {
  36332. value = data[index].value;
  36333. }
  36334. }
  36335. var formatVal = series.formatter ? series.formatter(value, index) : value;
  36336. context.setTextAlign('center');
  36337. context.fillText(String(formatVal), item.x, item.y - 4 + textOffset * opts.pix);
  36338. context.closePath();
  36339. context.stroke();
  36340. context.setTextAlign('left');
  36341. }
  36342. });
  36343. }
  36344. function drawBarPointText(points, series, config, context, opts) {
  36345. // 绘制数据文案
  36346. var data = series.data;
  36347. var textOffset = series.textOffset ? series.textOffset : 0;
  36348. points.forEach(function (item, index) {
  36349. if (item !== null) {
  36350. context.beginPath();
  36351. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  36352. context.setFontSize(fontSize);
  36353. context.setFillStyle(series.textColor || opts.fontColor);
  36354. var value = data[index];
  36355. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  36356. value = data[index].value;
  36357. }
  36358. var formatVal = series.formatter ? series.formatter(value, index) : value;
  36359. context.setTextAlign('left');
  36360. context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
  36361. context.closePath();
  36362. context.stroke();
  36363. }
  36364. });
  36365. }
  36366. function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
  36367. radius -= gaugeOption.width / 2 + gaugeOption.labelOffset * opts.pix;
  36368. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  36369. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  36370. var totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
  36371. var splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
  36372. var nowAngle = gaugeOption.startAngle;
  36373. var nowNumber = gaugeOption.startNumber;
  36374. for (var i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
  36375. var pos = {
  36376. x: radius * Math.cos(nowAngle * Math.PI),
  36377. y: radius * Math.sin(nowAngle * Math.PI)
  36378. };
  36379. var labelText = gaugeOption.formatter ? gaugeOption.formatter(nowNumber) : nowNumber;
  36380. pos.x += centerPosition.x - measureText(labelText, config.fontSize, context) / 2;
  36381. pos.y += centerPosition.y;
  36382. var startX = pos.x;
  36383. var startY = pos.y;
  36384. context.beginPath();
  36385. context.setFontSize(config.fontSize);
  36386. context.setFillStyle(gaugeOption.labelColor || opts.fontColor);
  36387. context.fillText(labelText, startX, startY + config.fontSize / 2);
  36388. context.closePath();
  36389. context.stroke();
  36390. nowAngle += splitAngle;
  36391. if (nowAngle >= 2) {
  36392. nowAngle = nowAngle % 2;
  36393. }
  36394. nowNumber += splitNumber;
  36395. }
  36396. }
  36397. function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
  36398. var radarOption = opts.extra.radar || {};
  36399. radius += config.radarLabelTextMargin * opts.pix;
  36400. angleList.forEach(function (angle, index) {
  36401. var pos = {
  36402. x: radius * Math.cos(angle),
  36403. y: radius * Math.sin(angle)
  36404. };
  36405. var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
  36406. var startX = posRelativeCanvas.x;
  36407. var startY = posRelativeCanvas.y;
  36408. if (util.approximatelyEqual(pos.x, 0)) {
  36409. startX -= measureText(opts.categories[index] || '', config.fontSize, context) / 2;
  36410. } else if (pos.x < 0) {
  36411. startX -= measureText(opts.categories[index] || '', config.fontSize, context);
  36412. }
  36413. context.beginPath();
  36414. context.setFontSize(config.fontSize);
  36415. context.setFillStyle(radarOption.labelColor || opts.fontColor);
  36416. context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
  36417. context.closePath();
  36418. context.stroke();
  36419. });
  36420. }
  36421. function drawPieText(series, opts, config, context, radius, center) {
  36422. var lineRadius = config.pieChartLinePadding;
  36423. var textObjectCollection = [];
  36424. var lastTextObject = null;
  36425. var seriesConvert = series.map(function (item, index, series) {
  36426. var text = item.formatter ? item.formatter(item, index, series) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
  36427. var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
  36428. if (item._rose_proportion_) {
  36429. arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._rose_proportion_ / 2);
  36430. }
  36431. var color = item.color;
  36432. var radius = item._radius_;
  36433. return {
  36434. arc: arc,
  36435. text: text,
  36436. color: color,
  36437. radius: radius,
  36438. textColor: item.textColor,
  36439. textSize: item.textSize
  36440. };
  36441. });
  36442. for (var i = 0; i < seriesConvert.length; i++) {
  36443. var item = seriesConvert[i];
  36444. // line end
  36445. var orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
  36446. var orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
  36447. // line start
  36448. var orginX2 = Math.cos(item.arc) * item.radius;
  36449. var orginY2 = Math.sin(item.arc) * item.radius;
  36450. // text start
  36451. var orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
  36452. var orginY3 = orginY1;
  36453. var textWidth = measureText(item.text, item.textSize * opts.pix || config.fontSize, context);
  36454. var startY = orginY3;
  36455. if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
  36456. x: orginX3
  36457. })) {
  36458. if (orginX3 > 0) {
  36459. startY = Math.min(orginY3, lastTextObject.start.y);
  36460. } else if (orginX1 < 0) {
  36461. startY = Math.max(orginY3, lastTextObject.start.y);
  36462. } else {
  36463. if (orginY3 > 0) {
  36464. startY = Math.max(orginY3, lastTextObject.start.y);
  36465. } else {
  36466. startY = Math.min(orginY3, lastTextObject.start.y);
  36467. }
  36468. }
  36469. }
  36470. if (orginX3 < 0) {
  36471. orginX3 -= textWidth;
  36472. }
  36473. var textObject = {
  36474. lineStart: {
  36475. x: orginX2,
  36476. y: orginY2
  36477. },
  36478. lineEnd: {
  36479. x: orginX1,
  36480. y: orginY1
  36481. },
  36482. start: {
  36483. x: orginX3,
  36484. y: startY
  36485. },
  36486. width: textWidth,
  36487. height: config.fontSize,
  36488. text: item.text,
  36489. color: item.color,
  36490. textColor: item.textColor,
  36491. textSize: item.textSize
  36492. };
  36493. lastTextObject = avoidCollision(textObject, lastTextObject);
  36494. textObjectCollection.push(lastTextObject);
  36495. }
  36496. for (var _i14 = 0; _i14 < textObjectCollection.length; _i14++) {
  36497. var _item6 = textObjectCollection[_i14];
  36498. var lineStartPoistion = convertCoordinateOrigin(_item6.lineStart.x, _item6.lineStart.y, center);
  36499. var lineEndPoistion = convertCoordinateOrigin(_item6.lineEnd.x, _item6.lineEnd.y, center);
  36500. var textPosition = convertCoordinateOrigin(_item6.start.x, _item6.start.y, center);
  36501. context.setLineWidth(1 * opts.pix);
  36502. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  36503. context.beginPath();
  36504. context.setStrokeStyle(_item6.color);
  36505. context.setFillStyle(_item6.color);
  36506. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  36507. var curveStartX = _item6.start.x < 0 ? textPosition.x + _item6.width : textPosition.x;
  36508. var textStartX = _item6.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
  36509. context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
  36510. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  36511. context.stroke();
  36512. context.closePath();
  36513. context.beginPath();
  36514. context.moveTo(textPosition.x + _item6.width, textPosition.y);
  36515. context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
  36516. context.closePath();
  36517. context.fill();
  36518. context.beginPath();
  36519. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  36520. context.setFillStyle(_item6.textColor || opts.fontColor);
  36521. context.fillText(_item6.text, textStartX, textPosition.y + 3);
  36522. context.closePath();
  36523. context.stroke();
  36524. context.closePath();
  36525. }
  36526. }
  36527. function drawToolTipSplitLine(offsetX, opts, config, context) {
  36528. var toolTipOption = opts.extra.tooltip || {};
  36529. toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
  36530. toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
  36531. var startY = opts.area[0];
  36532. var endY = opts.height - opts.area[2];
  36533. if (toolTipOption.gridType == 'dash') {
  36534. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  36535. }
  36536. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  36537. context.setLineWidth(1 * opts.pix);
  36538. context.beginPath();
  36539. context.moveTo(offsetX, startY);
  36540. context.lineTo(offsetX, endY);
  36541. context.stroke();
  36542. context.setLineDash([]);
  36543. if (toolTipOption.xAxisLabel) {
  36544. var labelText = opts.categories[opts.tooltip.index];
  36545. context.setFontSize(config.fontSize);
  36546. var textWidth = measureText(labelText, config.fontSize, context);
  36547. var textX = offsetX - 0.5 * textWidth;
  36548. var textY = endY;
  36549. context.beginPath();
  36550. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  36551. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  36552. context.setLineWidth(1 * opts.pix);
  36553. context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
  36554. context.closePath();
  36555. context.stroke();
  36556. context.fill();
  36557. context.beginPath();
  36558. context.setFontSize(config.fontSize);
  36559. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  36560. context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
  36561. context.closePath();
  36562. context.stroke();
  36563. }
  36564. }
  36565. function drawMarkLine(opts, config, context) {
  36566. var markLineOption = assign({}, {
  36567. type: 'solid',
  36568. dashLength: 4,
  36569. data: []
  36570. }, opts.extra.markLine);
  36571. var startX = opts.area[3];
  36572. var endX = opts.width - opts.area[1];
  36573. var points = calMarkLineData(markLineOption.data, opts);
  36574. for (var i = 0; i < points.length; i++) {
  36575. var item = assign({}, {
  36576. lineColor: '#DE4A42',
  36577. showLabel: false,
  36578. labelFontColor: '#666666',
  36579. labelBgColor: '#DFE8FF',
  36580. labelBgOpacity: 0.8,
  36581. yAxisIndex: 0
  36582. }, points[i]);
  36583. if (markLineOption.type == 'dash') {
  36584. context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
  36585. }
  36586. context.setStrokeStyle(item.lineColor);
  36587. context.setLineWidth(1 * opts.pix);
  36588. context.beginPath();
  36589. context.moveTo(startX, item.y);
  36590. context.lineTo(endX, item.y);
  36591. context.stroke();
  36592. context.setLineDash([]);
  36593. if (item.showLabel) {
  36594. var labelText = opts.yAxis.formatter ? opts.yAxis.formatter(item.value) : item.value;
  36595. context.setFontSize(config.fontSize);
  36596. var textWidth = measureText(labelText, config.fontSize, context);
  36597. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[0].width;
  36598. var bgStartX = opts.area[3] - textWidth - config.toolTipPadding * 2;
  36599. var bgEndX = opts.area[3];
  36600. var bgWidth = bgEndX - bgStartX;
  36601. var textX = bgEndX - config.toolTipPadding;
  36602. var textY = item.y;
  36603. context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
  36604. context.setStrokeStyle(item.labelBgColor);
  36605. context.setLineWidth(1 * opts.pix);
  36606. context.beginPath();
  36607. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  36608. context.closePath();
  36609. context.stroke();
  36610. context.fill();
  36611. context.setFontSize(config.fontSize);
  36612. context.setTextAlign('right');
  36613. context.setFillStyle(item.labelFontColor);
  36614. context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
  36615. context.stroke();
  36616. context.setTextAlign('left');
  36617. }
  36618. }
  36619. }
  36620. function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
  36621. var toolTipOption = assign({}, {
  36622. gridType: 'solid',
  36623. dashLength: 4
  36624. }, opts.extra.tooltip);
  36625. var startX = opts.area[3];
  36626. var endX = opts.width - opts.area[1];
  36627. if (toolTipOption.gridType == 'dash') {
  36628. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  36629. }
  36630. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  36631. context.setLineWidth(1 * opts.pix);
  36632. context.beginPath();
  36633. context.moveTo(startX, opts.tooltip.offset.y);
  36634. context.lineTo(endX, opts.tooltip.offset.y);
  36635. context.stroke();
  36636. context.setLineDash([]);
  36637. if (toolTipOption.yAxisLabel) {
  36638. var labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
  36639. var widthArr = opts.chartData.yAxisData.yAxisWidth;
  36640. var tStartLeft = opts.area[3];
  36641. var tStartRight = opts.width - opts.area[1];
  36642. for (var i = 0; i < labelText.length; i++) {
  36643. context.setFontSize(config.fontSize);
  36644. var textWidth = measureText(labelText[i], config.fontSize, context);
  36645. var bgStartX = void 0,
  36646. bgEndX = void 0,
  36647. bgWidth = void 0;
  36648. if (widthArr[i].position == 'left') {
  36649. bgStartX = tStartLeft - widthArr[i].width;
  36650. bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
  36651. } else {
  36652. bgStartX = tStartRight;
  36653. bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
  36654. }
  36655. bgWidth = bgEndX - bgStartX;
  36656. var textX = bgStartX + (bgWidth - textWidth) / 2;
  36657. var textY = opts.tooltip.offset.y;
  36658. context.beginPath();
  36659. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  36660. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  36661. context.setLineWidth(1 * opts.pix);
  36662. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  36663. context.closePath();
  36664. context.stroke();
  36665. context.fill();
  36666. context.beginPath();
  36667. context.setFontSize(config.fontSize);
  36668. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  36669. context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
  36670. context.closePath();
  36671. context.stroke();
  36672. if (widthArr[i].position == 'left') {
  36673. tStartLeft -= widthArr[i].width + opts.yAxis.padding * opts.pix;
  36674. } else {
  36675. tStartRight += widthArr[i].width + opts.yAxis.padding * opts.pix;
  36676. }
  36677. }
  36678. }
  36679. }
  36680. function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  36681. var toolTipOption = assign({}, {
  36682. activeBgColor: '#000000',
  36683. activeBgOpacity: 0.08
  36684. }, opts.extra.column);
  36685. var startY = opts.area[0];
  36686. var endY = opts.height - opts.area[2];
  36687. context.beginPath();
  36688. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  36689. context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
  36690. context.closePath();
  36691. context.fill();
  36692. context.setFillStyle("#FFFFFF");
  36693. }
  36694. function drawBarToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  36695. var toolTipOption = assign({}, {
  36696. activeBgColor: '#000000',
  36697. activeBgOpacity: 0.08
  36698. }, opts.extra.bar);
  36699. var startX = opts.area[3];
  36700. var endX = opts.width - opts.area[1];
  36701. context.beginPath();
  36702. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  36703. context.rect(startX, offsetX - eachSpacing / 2, endX - startX, eachSpacing);
  36704. context.closePath();
  36705. context.fill();
  36706. context.setFillStyle("#FFFFFF");
  36707. }
  36708. function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
  36709. var toolTipOption = assign({}, {
  36710. showBox: true,
  36711. showArrow: true,
  36712. showCategory: false,
  36713. bgColor: '#000000',
  36714. bgOpacity: 0.7,
  36715. borderColor: '#000000',
  36716. borderWidth: 0,
  36717. borderRadius: 0,
  36718. borderOpacity: 0.7,
  36719. fontColor: '#FFFFFF',
  36720. splitLine: true
  36721. }, opts.extra.tooltip);
  36722. if (toolTipOption.showCategory == true && opts.categories) {
  36723. textList.unshift({
  36724. text: opts.categories[opts.tooltip.index],
  36725. color: null
  36726. });
  36727. }
  36728. var legendWidth = 4 * opts.pix;
  36729. var legendMarginRight = 5 * opts.pix;
  36730. var arrowWidth = toolTipOption.showArrow ? 8 * opts.pix : 0;
  36731. var isOverRightBorder = false;
  36732. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
  36733. if (toolTipOption.splitLine == true) {
  36734. drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
  36735. }
  36736. }
  36737. offset = assign({
  36738. x: 0,
  36739. y: 0
  36740. }, offset);
  36741. offset.y -= 8 * opts.pix;
  36742. var textWidth = textList.map(function (item) {
  36743. return measureText(item.text, config.fontSize, context);
  36744. });
  36745. var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
  36746. var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
  36747. if (toolTipOption.showBox == false) {
  36748. return;
  36749. }
  36750. // if beyond the right border
  36751. if (offset.x - Math.abs(opts._scrollDistance_ || 0) + arrowWidth + toolTipWidth > opts.width) {
  36752. isOverRightBorder = true;
  36753. }
  36754. if (toolTipHeight + offset.y > opts.height) {
  36755. offset.y = opts.height - toolTipHeight;
  36756. }
  36757. // draw background rect
  36758. context.beginPath();
  36759. context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
  36760. context.setLineWidth(toolTipOption.borderWidth * opts.pix);
  36761. context.setStrokeStyle(hexToRgb(toolTipOption.borderColor, toolTipOption.borderOpacity));
  36762. var radius = toolTipOption.borderRadius;
  36763. if (isOverRightBorder) {
  36764. if (toolTipOption.showArrow) {
  36765. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  36766. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  36767. }
  36768. context.arc(offset.x - arrowWidth - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  36769. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  36770. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  36771. context.arc(offset.x - arrowWidth - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  36772. if (toolTipOption.showArrow) {
  36773. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  36774. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  36775. }
  36776. } else {
  36777. if (toolTipOption.showArrow) {
  36778. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  36779. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  36780. }
  36781. context.arc(offset.x + arrowWidth + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  36782. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  36783. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  36784. context.arc(offset.x + arrowWidth + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  36785. if (toolTipOption.showArrow) {
  36786. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  36787. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  36788. }
  36789. }
  36790. context.closePath();
  36791. context.fill();
  36792. if (toolTipOption.borderWidth > 0) {
  36793. context.stroke();
  36794. }
  36795. // draw legend
  36796. textList.forEach(function (item, index) {
  36797. if (item.color !== null) {
  36798. context.beginPath();
  36799. context.setFillStyle(item.color);
  36800. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
  36801. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1;
  36802. if (isOverRightBorder) {
  36803. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
  36804. }
  36805. context.fillRect(startX, startY, legendWidth, config.fontSize);
  36806. context.closePath();
  36807. }
  36808. });
  36809. // draw text list
  36810. textList.forEach(function (item, index) {
  36811. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
  36812. if (isOverRightBorder) {
  36813. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
  36814. }
  36815. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding;
  36816. context.beginPath();
  36817. context.setFontSize(config.fontSize);
  36818. context.setFillStyle(toolTipOption.fontColor);
  36819. context.fillText(item.text, startX, startY + config.fontSize);
  36820. context.closePath();
  36821. context.stroke();
  36822. });
  36823. }
  36824. function drawColumnDataPoints(series, opts, config, context) {
  36825. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36826. var xAxisData = opts.chartData.xAxisData,
  36827. xAxisPoints = xAxisData.xAxisPoints,
  36828. eachSpacing = xAxisData.eachSpacing;
  36829. var columnOption = assign({}, {
  36830. type: 'group',
  36831. width: eachSpacing / 2,
  36832. meterBorder: 4,
  36833. meterFillColor: '#FFFFFF',
  36834. barBorderCircle: false,
  36835. barBorderRadius: [],
  36836. seriesGap: 2,
  36837. linearType: 'none',
  36838. linearOpacity: 1,
  36839. customColor: [],
  36840. colorStop: 0
  36841. }, opts.extra.column);
  36842. var calPoints = [];
  36843. context.save();
  36844. var leftNum = -2;
  36845. var rightNum = xAxisPoints.length + 2;
  36846. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36847. context.translate(opts._scrollDistance_, 0);
  36848. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  36849. rightNum = leftNum + opts.xAxis.itemCount + 4;
  36850. }
  36851. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  36852. drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
  36853. }
  36854. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  36855. series.forEach(function (eachSeries, seriesIndex) {
  36856. var ranges, minRange, maxRange;
  36857. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36858. minRange = ranges.pop();
  36859. maxRange = ranges.shift();
  36860. var data = eachSeries.data;
  36861. switch (columnOption.type) {
  36862. case 'group':
  36863. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36864. var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36865. calPoints.push(tooltipPoints);
  36866. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  36867. for (var i = 0; i < points.length; i++) {
  36868. var item = points[i];
  36869. //fix issues/I27B1N yyoinge & Joeshu
  36870. if (item !== null && i > leftNum && i < rightNum) {
  36871. var startX = item.x - item.width / 2;
  36872. var height = opts.height - item.y - opts.area[2];
  36873. context.beginPath();
  36874. var fillColor = item.color || eachSeries.color;
  36875. var strokeColor = item.color || eachSeries.color;
  36876. if (columnOption.linearType !== 'none') {
  36877. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  36878. //透明渐变
  36879. if (columnOption.linearType == 'opacity') {
  36880. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  36881. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36882. } else {
  36883. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36884. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36885. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36886. }
  36887. fillColor = grd;
  36888. }
  36889. // 圆角边框
  36890. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  36891. var left = startX;
  36892. var top = item.y;
  36893. var width = item.width;
  36894. var _height = opts.height - opts.area[2] - item.y;
  36895. if (columnOption.barBorderCircle) {
  36896. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  36897. }
  36898. var _columnOption$barBord = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  36899. r0 = _columnOption$barBord[0],
  36900. r1 = _columnOption$barBord[1],
  36901. r2 = _columnOption$barBord[2],
  36902. r3 = _columnOption$barBord[3];
  36903. var minRadius = Math.min(width / 2, _height / 2);
  36904. r0 = r0 > minRadius ? minRadius : r0;
  36905. r1 = r1 > minRadius ? minRadius : r1;
  36906. r2 = r2 > minRadius ? minRadius : r2;
  36907. r3 = r3 > minRadius ? minRadius : r3;
  36908. r0 = r0 < 0 ? 0 : r0;
  36909. r1 = r1 < 0 ? 0 : r1;
  36910. r2 = r2 < 0 ? 0 : r2;
  36911. r3 = r3 < 0 ? 0 : r3;
  36912. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  36913. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  36914. context.arc(left + width - r2, top + _height - r2, r2, 0, Math.PI / 2);
  36915. context.arc(left + r3, top + _height - r3, r3, Math.PI / 2, Math.PI);
  36916. } else {
  36917. context.moveTo(startX, item.y);
  36918. context.lineTo(startX + item.width - 2, item.y);
  36919. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  36920. context.lineTo(startX, opts.height - opts.area[2]);
  36921. context.lineTo(startX, item.y);
  36922. context.setLineWidth(1);
  36923. context.setStrokeStyle(strokeColor);
  36924. }
  36925. context.setFillStyle(fillColor);
  36926. context.closePath();
  36927. //context.stroke();
  36928. context.fill();
  36929. }
  36930. }
  36931. ;
  36932. break;
  36933. case 'stack':
  36934. // 绘制堆叠数据图
  36935. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36936. calPoints.push(points);
  36937. points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  36938. for (var _i15 = 0; _i15 < points.length; _i15++) {
  36939. var _item7 = points[_i15];
  36940. if (_item7 !== null && _i15 > leftNum && _i15 < rightNum) {
  36941. context.beginPath();
  36942. var fillColor = _item7.color || eachSeries.color;
  36943. var startX = _item7.x - _item7.width / 2 + 1;
  36944. var height = opts.height - _item7.y - opts.area[2];
  36945. var height0 = opts.height - _item7.y0 - opts.area[2];
  36946. if (seriesIndex > 0) {
  36947. height -= height0;
  36948. }
  36949. context.setFillStyle(fillColor);
  36950. context.moveTo(startX, _item7.y);
  36951. context.fillRect(startX, _item7.y, _item7.width - 2, height);
  36952. context.closePath();
  36953. context.fill();
  36954. }
  36955. }
  36956. ;
  36957. break;
  36958. case 'meter':
  36959. // 绘制温度计数据图
  36960. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36961. calPoints.push(points);
  36962. points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meterBorder);
  36963. if (seriesIndex == 0) {
  36964. for (var _i16 = 0; _i16 < points.length; _i16++) {
  36965. var _item8 = points[_i16];
  36966. if (_item8 !== null && _i16 > leftNum && _i16 < rightNum) {
  36967. //画背景颜色
  36968. context.beginPath();
  36969. context.setFillStyle(columnOption.meterFillColor);
  36970. var startX = _item8.x - _item8.width / 2;
  36971. var height = opts.height - _item8.y - opts.area[2];
  36972. if (columnOption.barBorderCircle) {
  36973. var barBorderRadius = (_item8.width - columnOption.meterBorder * 2) / 2;
  36974. if (barBorderRadius > height) {
  36975. barBorderRadius = height;
  36976. }
  36977. context.moveTo(startX + columnOption.meterBorder, opts.height - opts.area[2]);
  36978. context.lineTo(startX + columnOption.meterBorder, _item8.y + barBorderRadius);
  36979. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius, barBorderRadius, -Math.PI, 0);
  36980. context.lineTo(startX + _item8.width - columnOption.meterBorder, opts.height - opts.area[2]);
  36981. context.lineTo(startX, opts.height - opts.area[2]);
  36982. context.fill();
  36983. } else {
  36984. context.moveTo(startX, _item8.y);
  36985. context.fillRect(startX, _item8.y, _item8.width, height);
  36986. context.closePath();
  36987. context.fill();
  36988. }
  36989. //画边框线
  36990. if (columnOption.meterBorder > 0) {
  36991. context.beginPath();
  36992. context.setStrokeStyle(eachSeries.color);
  36993. context.setLineWidth(columnOption.meterBorder * opts.pix);
  36994. if (columnOption.barBorderCircle) {
  36995. var barBorderRadius = (_item8.width - columnOption.meterBorder) / 2;
  36996. if (barBorderRadius > height) {
  36997. barBorderRadius = height;
  36998. }
  36999. context.moveTo(startX + columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  37000. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + barBorderRadius);
  37001. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius - columnOption.meterBorder * 0.5, barBorderRadius, -Math.PI, 0);
  37002. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  37003. } else {
  37004. context.moveTo(startX + columnOption.meterBorder * 0.5, _item8.y + height);
  37005. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  37006. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  37007. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + height);
  37008. }
  37009. context.stroke();
  37010. }
  37011. }
  37012. }
  37013. ;
  37014. } else {
  37015. for (var _i17 = 0; _i17 < points.length; _i17++) {
  37016. var _item9 = points[_i17];
  37017. if (_item9 !== null && _i17 > leftNum && _i17 < rightNum) {
  37018. context.beginPath();
  37019. context.setFillStyle(_item9.color || eachSeries.color);
  37020. var startX = _item9.x - _item9.width / 2;
  37021. var height = opts.height - _item9.y - opts.area[2];
  37022. if (columnOption.barBorderCircle) {
  37023. var barBorderRadius = _item9.width / 2;
  37024. if (barBorderRadius > height) {
  37025. barBorderRadius = height;
  37026. }
  37027. context.moveTo(startX, opts.height - opts.area[2]);
  37028. context.arc(startX + barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI, -Math.PI / 2);
  37029. context.arc(startX + _item9.width - barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI / 2, 0);
  37030. context.lineTo(startX + _item9.width, opts.height - opts.area[2]);
  37031. context.lineTo(startX, opts.height - opts.area[2]);
  37032. context.fill();
  37033. } else {
  37034. context.moveTo(startX, _item9.y);
  37035. context.fillRect(startX, _item9.y, _item9.width, height);
  37036. context.closePath();
  37037. context.fill();
  37038. }
  37039. }
  37040. }
  37041. ;
  37042. }
  37043. break;
  37044. }
  37045. });
  37046. if (opts.dataLabel !== false && process === 1) {
  37047. series.forEach(function (eachSeries, seriesIndex) {
  37048. var ranges, minRange, maxRange;
  37049. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37050. minRange = ranges.pop();
  37051. maxRange = ranges.shift();
  37052. var data = eachSeries.data;
  37053. switch (columnOption.type) {
  37054. case 'group':
  37055. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37056. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37057. drawPointText(points, eachSeries, config, context, opts);
  37058. break;
  37059. case 'stack':
  37060. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37061. drawPointText(points, eachSeries, config, context, opts);
  37062. break;
  37063. case 'meter':
  37064. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37065. drawPointText(points, eachSeries, config, context, opts);
  37066. break;
  37067. }
  37068. });
  37069. }
  37070. context.restore();
  37071. return {
  37072. xAxisPoints: xAxisPoints,
  37073. calPoints: calPoints,
  37074. eachSpacing: eachSpacing
  37075. };
  37076. }
  37077. function drawBarDataPoints(series, opts, config, context) {
  37078. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37079. var yAxisPoints = [];
  37080. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / opts.categories.length;
  37081. for (var i = 0; i < opts.categories.length; i++) {
  37082. yAxisPoints.push(opts.area[0] + eachSpacing / 2 + eachSpacing * i);
  37083. }
  37084. var columnOption = assign({}, {
  37085. type: 'group',
  37086. width: eachSpacing / 2,
  37087. meterBorder: 4,
  37088. meterFillColor: '#FFFFFF',
  37089. barBorderCircle: false,
  37090. barBorderRadius: [],
  37091. seriesGap: 2,
  37092. linearType: 'none',
  37093. linearOpacity: 1,
  37094. customColor: [],
  37095. colorStop: 0
  37096. }, opts.extra.bar);
  37097. var calPoints = [];
  37098. context.save();
  37099. var leftNum = -2;
  37100. var rightNum = yAxisPoints.length + 2;
  37101. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  37102. drawBarToolTipSplitArea(opts.tooltip.offset.y, opts, config, context, eachSpacing);
  37103. }
  37104. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  37105. series.forEach(function (eachSeries, seriesIndex) {
  37106. var ranges, minRange, maxRange;
  37107. ranges = [].concat(opts.chartData.xAxisData.ranges);
  37108. maxRange = ranges.pop();
  37109. minRange = ranges.shift();
  37110. var data = eachSeries.data;
  37111. switch (columnOption.type) {
  37112. case 'group':
  37113. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  37114. var tooltipPoints = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37115. calPoints.push(tooltipPoints);
  37116. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37117. for (var _i18 = 0; _i18 < points.length; _i18++) {
  37118. var item = points[_i18];
  37119. //fix issues/I27B1N yyoinge & Joeshu
  37120. if (item !== null && _i18 > leftNum && _i18 < rightNum) {
  37121. //var startX = item.x - item.width / 2;
  37122. var startX = opts.area[3];
  37123. var startY = item.y - item.width / 2;
  37124. var height = item.height;
  37125. context.beginPath();
  37126. var fillColor = item.color || eachSeries.color;
  37127. var strokeColor = item.color || eachSeries.color;
  37128. if (columnOption.linearType !== 'none') {
  37129. var grd = context.createLinearGradient(startX, item.y, item.x, item.y);
  37130. //透明渐变
  37131. if (columnOption.linearType == 'opacity') {
  37132. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  37133. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37134. } else {
  37135. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37136. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37137. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37138. }
  37139. fillColor = grd;
  37140. }
  37141. // 圆角边框
  37142. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  37143. var left = startX;
  37144. var width = item.width;
  37145. var top = item.y - item.width / 2;
  37146. var _height2 = item.heigh;
  37147. if (columnOption.barBorderCircle) {
  37148. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  37149. }
  37150. var _columnOption$barBord2 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  37151. r0 = _columnOption$barBord2[0],
  37152. r1 = _columnOption$barBord2[1],
  37153. r2 = _columnOption$barBord2[2],
  37154. r3 = _columnOption$barBord2[3];
  37155. var minRadius = Math.min(width / 2, _height2 / 2);
  37156. r0 = r0 > minRadius ? minRadius : r0;
  37157. r1 = r1 > minRadius ? minRadius : r1;
  37158. r2 = r2 > minRadius ? minRadius : r2;
  37159. r3 = r3 > minRadius ? minRadius : r3;
  37160. r0 = r0 < 0 ? 0 : r0;
  37161. r1 = r1 < 0 ? 0 : r1;
  37162. r2 = r2 < 0 ? 0 : r2;
  37163. r3 = r3 < 0 ? 0 : r3;
  37164. context.arc(left + r3, top + r3, r3, -Math.PI, -Math.PI / 2);
  37165. context.arc(item.x - r0, top + r0, r0, -Math.PI / 2, 0);
  37166. context.arc(item.x - r1, top + width - r1, r1, 0, Math.PI / 2);
  37167. context.arc(left + r2, top + width - r2, r2, Math.PI / 2, Math.PI);
  37168. } else {
  37169. context.moveTo(startX, startY);
  37170. context.lineTo(item.x, startY);
  37171. context.lineTo(item.x, startY + item.width - 2);
  37172. context.lineTo(startX, startY + item.width - 2);
  37173. context.lineTo(startX, startY);
  37174. context.setLineWidth(1);
  37175. context.setStrokeStyle(strokeColor);
  37176. }
  37177. context.setFillStyle(fillColor);
  37178. context.closePath();
  37179. //context.stroke();
  37180. context.fill();
  37181. }
  37182. }
  37183. ;
  37184. break;
  37185. case 'stack':
  37186. // 绘制堆叠数据图
  37187. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37188. calPoints.push(points);
  37189. points = fixBarStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  37190. for (var _i19 = 0; _i19 < points.length; _i19++) {
  37191. var _item10 = points[_i19];
  37192. if (_item10 !== null && _i19 > leftNum && _i19 < rightNum) {
  37193. context.beginPath();
  37194. var fillColor = _item10.color || eachSeries.color;
  37195. var startX = _item10.x0;
  37196. context.setFillStyle(fillColor);
  37197. context.moveTo(startX, _item10.y - _item10.width / 2);
  37198. context.fillRect(startX, _item10.y - _item10.width / 2, _item10.height, _item10.width - 2);
  37199. context.closePath();
  37200. context.fill();
  37201. }
  37202. }
  37203. ;
  37204. break;
  37205. }
  37206. });
  37207. if (opts.dataLabel !== false && process === 1) {
  37208. series.forEach(function (eachSeries, seriesIndex) {
  37209. var ranges, minRange, maxRange;
  37210. ranges = [].concat(opts.chartData.xAxisData.ranges);
  37211. maxRange = ranges.pop();
  37212. minRange = ranges.shift();
  37213. var data = eachSeries.data;
  37214. switch (columnOption.type) {
  37215. case 'group':
  37216. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  37217. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37218. drawBarPointText(points, eachSeries, config, context, opts);
  37219. break;
  37220. case 'stack':
  37221. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37222. drawBarPointText(points, eachSeries, config, context, opts);
  37223. break;
  37224. }
  37225. });
  37226. }
  37227. return {
  37228. yAxisPoints: yAxisPoints,
  37229. calPoints: calPoints,
  37230. eachSpacing: eachSpacing
  37231. };
  37232. }
  37233. function drawCandleDataPoints(series, seriesMA, opts, config, context) {
  37234. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  37235. var candleOption = assign({}, {
  37236. color: {},
  37237. average: {}
  37238. }, opts.extra.candle);
  37239. candleOption.color = assign({}, {
  37240. upLine: '#f04864',
  37241. upFill: '#f04864',
  37242. downLine: '#2fc25b',
  37243. downFill: '#2fc25b'
  37244. }, candleOption.color);
  37245. candleOption.average = assign({}, {
  37246. show: false,
  37247. name: [],
  37248. day: [],
  37249. color: config.color
  37250. }, candleOption.average);
  37251. opts.extra.candle = candleOption;
  37252. var xAxisData = opts.chartData.xAxisData,
  37253. xAxisPoints = xAxisData.xAxisPoints,
  37254. eachSpacing = xAxisData.eachSpacing;
  37255. var calPoints = [];
  37256. context.save();
  37257. var leftNum = -2;
  37258. var rightNum = xAxisPoints.length + 2;
  37259. var leftSpace = 0;
  37260. var rightSpace = opts.width + eachSpacing;
  37261. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37262. context.translate(opts._scrollDistance_, 0);
  37263. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  37264. rightNum = leftNum + opts.xAxis.itemCount + 4;
  37265. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37266. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37267. }
  37268. //画均线
  37269. if (candleOption.average.show || seriesMA) {
  37270. //Merge pull request !12 from 邱贵翔
  37271. seriesMA.forEach(function (eachSeries, seriesIndex) {
  37272. var ranges, minRange, maxRange;
  37273. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37274. minRange = ranges.pop();
  37275. maxRange = ranges.shift();
  37276. var data = eachSeries.data;
  37277. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37278. var splitPointList = splitPoints(points, eachSeries);
  37279. for (var i = 0; i < splitPointList.length; i++) {
  37280. var _points = splitPointList[i];
  37281. context.beginPath();
  37282. context.setStrokeStyle(eachSeries.color);
  37283. context.setLineWidth(1);
  37284. if (_points.length === 1) {
  37285. context.moveTo(_points[0].x, _points[0].y);
  37286. context.arc(_points[0].x, _points[0].y, 1, 0, 2 * Math.PI);
  37287. } else {
  37288. context.moveTo(_points[0].x, _points[0].y);
  37289. var startPoint = 0;
  37290. for (var j = 0; j < _points.length; j++) {
  37291. var item = _points[j];
  37292. if (startPoint == 0 && item.x > leftSpace) {
  37293. context.moveTo(item.x, item.y);
  37294. startPoint = 1;
  37295. }
  37296. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37297. var ctrlPoint = createCurveControlPoints(_points, j - 1);
  37298. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37299. }
  37300. }
  37301. context.moveTo(_points[0].x, _points[0].y);
  37302. }
  37303. context.closePath();
  37304. context.stroke();
  37305. }
  37306. });
  37307. }
  37308. //画K线
  37309. series.forEach(function (eachSeries, seriesIndex) {
  37310. var ranges, minRange, maxRange;
  37311. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37312. minRange = ranges.pop();
  37313. maxRange = ranges.shift();
  37314. var data = eachSeries.data;
  37315. var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37316. calPoints.push(points);
  37317. var splitPointList = splitPoints(points, eachSeries);
  37318. for (var i = 0; i < splitPointList[0].length; i++) {
  37319. if (i > leftNum && i < rightNum) {
  37320. var item = splitPointList[0][i];
  37321. context.beginPath();
  37322. //如果上涨
  37323. if (data[i][1] - data[i][0] > 0) {
  37324. context.setStrokeStyle(candleOption.color.upLine);
  37325. context.setFillStyle(candleOption.color.upFill);
  37326. context.setLineWidth(1 * opts.pix);
  37327. context.moveTo(item[3].x, item[3].y); //顶点
  37328. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37329. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  37330. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  37331. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37332. context.lineTo(item[2].x, item[2].y); //底点
  37333. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37334. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  37335. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  37336. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37337. context.moveTo(item[3].x, item[3].y); //顶点
  37338. } else {
  37339. context.setStrokeStyle(candleOption.color.downLine);
  37340. context.setFillStyle(candleOption.color.downFill);
  37341. context.setLineWidth(1 * opts.pix);
  37342. context.moveTo(item[3].x, item[3].y); //顶点
  37343. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37344. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  37345. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  37346. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37347. context.lineTo(item[2].x, item[2].y); //底点
  37348. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37349. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  37350. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  37351. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37352. context.moveTo(item[3].x, item[3].y); //顶点
  37353. }
  37354. context.closePath();
  37355. context.fill();
  37356. context.stroke();
  37357. }
  37358. }
  37359. });
  37360. context.restore();
  37361. return {
  37362. xAxisPoints: xAxisPoints,
  37363. calPoints: calPoints,
  37364. eachSpacing: eachSpacing
  37365. };
  37366. }
  37367. function drawAreaDataPoints(series, opts, config, context) {
  37368. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37369. var areaOption = assign({}, {
  37370. type: 'straight',
  37371. opacity: 0.2,
  37372. addLine: false,
  37373. width: 2,
  37374. gradient: false
  37375. }, opts.extra.area);
  37376. var xAxisData = opts.chartData.xAxisData,
  37377. xAxisPoints = xAxisData.xAxisPoints,
  37378. eachSpacing = xAxisData.eachSpacing;
  37379. var endY = opts.height - opts.area[2];
  37380. var calPoints = [];
  37381. context.save();
  37382. var leftSpace = 0;
  37383. var rightSpace = opts.width + eachSpacing;
  37384. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37385. context.translate(opts._scrollDistance_, 0);
  37386. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37387. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37388. }
  37389. series.forEach(function (eachSeries, seriesIndex) {
  37390. var ranges, minRange, maxRange;
  37391. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37392. minRange = ranges.pop();
  37393. maxRange = ranges.shift();
  37394. var data = eachSeries.data;
  37395. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37396. calPoints.push(points);
  37397. var splitPointList = splitPoints(points, eachSeries);
  37398. for (var i = 0; i < splitPointList.length; i++) {
  37399. var _points2 = splitPointList[i];
  37400. // 绘制区域数
  37401. context.beginPath();
  37402. context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  37403. if (areaOption.gradient) {
  37404. var gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
  37405. gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
  37406. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  37407. context.setFillStyle(gradient);
  37408. } else {
  37409. context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  37410. }
  37411. context.setLineWidth(areaOption.width * opts.pix);
  37412. if (_points2.length > 1) {
  37413. var firstPoint = _points2[0];
  37414. var lastPoint = _points2[_points2.length - 1];
  37415. context.moveTo(firstPoint.x, firstPoint.y);
  37416. var startPoint = 0;
  37417. if (areaOption.type === 'curve') {
  37418. for (var j = 0; j < _points2.length; j++) {
  37419. var item = _points2[j];
  37420. if (startPoint == 0 && item.x > leftSpace) {
  37421. context.moveTo(item.x, item.y);
  37422. startPoint = 1;
  37423. }
  37424. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37425. var ctrlPoint = createCurveControlPoints(_points2, j - 1);
  37426. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37427. }
  37428. }
  37429. ;
  37430. }
  37431. if (areaOption.type === 'straight') {
  37432. for (var _j = 0; _j < _points2.length; _j++) {
  37433. var _item11 = _points2[_j];
  37434. if (startPoint == 0 && _item11.x > leftSpace) {
  37435. context.moveTo(_item11.x, _item11.y);
  37436. startPoint = 1;
  37437. }
  37438. if (_j > 0 && _item11.x > leftSpace && _item11.x < rightSpace) {
  37439. context.lineTo(_item11.x, _item11.y);
  37440. }
  37441. }
  37442. ;
  37443. }
  37444. if (areaOption.type === 'step') {
  37445. for (var _j2 = 0; _j2 < _points2.length; _j2++) {
  37446. var _item12 = _points2[_j2];
  37447. if (startPoint == 0 && _item12.x > leftSpace) {
  37448. context.moveTo(_item12.x, _item12.y);
  37449. startPoint = 1;
  37450. }
  37451. if (_j2 > 0 && _item12.x > leftSpace && _item12.x < rightSpace) {
  37452. context.lineTo(_item12.x, _points2[_j2 - 1].y);
  37453. context.lineTo(_item12.x, _item12.y);
  37454. }
  37455. }
  37456. ;
  37457. }
  37458. context.lineTo(lastPoint.x, endY);
  37459. context.lineTo(firstPoint.x, endY);
  37460. context.lineTo(firstPoint.x, firstPoint.y);
  37461. } else {
  37462. var _item13 = _points2[0];
  37463. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  37464. context.lineTo(_item13.x + eachSpacing / 2, _item13.y);
  37465. context.lineTo(_item13.x + eachSpacing / 2, endY);
  37466. context.lineTo(_item13.x - eachSpacing / 2, endY);
  37467. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  37468. }
  37469. context.closePath();
  37470. context.fill();
  37471. //画连线
  37472. if (areaOption.addLine) {
  37473. if (eachSeries.lineType == 'dash') {
  37474. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37475. dashLength *= opts.pix;
  37476. context.setLineDash([dashLength, dashLength]);
  37477. }
  37478. context.beginPath();
  37479. context.setStrokeStyle(eachSeries.color);
  37480. context.setLineWidth(areaOption.width * opts.pix);
  37481. if (_points2.length === 1) {
  37482. context.moveTo(_points2[0].x, _points2[0].y);
  37483. context.arc(_points2[0].x, _points2[0].y, 1, 0, 2 * Math.PI);
  37484. } else {
  37485. context.moveTo(_points2[0].x, _points2[0].y);
  37486. var _startPoint = 0;
  37487. if (areaOption.type === 'curve') {
  37488. for (var _j3 = 0; _j3 < _points2.length; _j3++) {
  37489. var _item14 = _points2[_j3];
  37490. if (_startPoint == 0 && _item14.x > leftSpace) {
  37491. context.moveTo(_item14.x, _item14.y);
  37492. _startPoint = 1;
  37493. }
  37494. if (_j3 > 0 && _item14.x > leftSpace && _item14.x < rightSpace) {
  37495. var _ctrlPoint = createCurveControlPoints(_points2, _j3 - 1);
  37496. context.bezierCurveTo(_ctrlPoint.ctrA.x, _ctrlPoint.ctrA.y, _ctrlPoint.ctrB.x, _ctrlPoint.ctrB.y, _item14.x, _item14.y);
  37497. }
  37498. }
  37499. ;
  37500. }
  37501. if (areaOption.type === 'straight') {
  37502. for (var _j4 = 0; _j4 < _points2.length; _j4++) {
  37503. var _item15 = _points2[_j4];
  37504. if (_startPoint == 0 && _item15.x > leftSpace) {
  37505. context.moveTo(_item15.x, _item15.y);
  37506. _startPoint = 1;
  37507. }
  37508. if (_j4 > 0 && _item15.x > leftSpace && _item15.x < rightSpace) {
  37509. context.lineTo(_item15.x, _item15.y);
  37510. }
  37511. }
  37512. ;
  37513. }
  37514. if (areaOption.type === 'step') {
  37515. for (var _j5 = 0; _j5 < _points2.length; _j5++) {
  37516. var _item16 = _points2[_j5];
  37517. if (_startPoint == 0 && _item16.x > leftSpace) {
  37518. context.moveTo(_item16.x, _item16.y);
  37519. _startPoint = 1;
  37520. }
  37521. if (_j5 > 0 && _item16.x > leftSpace && _item16.x < rightSpace) {
  37522. context.lineTo(_item16.x, _points2[_j5 - 1].y);
  37523. context.lineTo(_item16.x, _item16.y);
  37524. }
  37525. }
  37526. ;
  37527. }
  37528. context.moveTo(_points2[0].x, _points2[0].y);
  37529. }
  37530. context.stroke();
  37531. context.setLineDash([]);
  37532. }
  37533. }
  37534. //画点
  37535. if (opts.dataPointShape !== false) {
  37536. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  37537. }
  37538. });
  37539. if (opts.dataLabel !== false && process === 1) {
  37540. series.forEach(function (eachSeries, seriesIndex) {
  37541. var ranges, minRange, maxRange;
  37542. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37543. minRange = ranges.pop();
  37544. maxRange = ranges.shift();
  37545. var data = eachSeries.data;
  37546. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37547. drawPointText(points, eachSeries, config, context, opts);
  37548. });
  37549. }
  37550. context.restore();
  37551. return {
  37552. xAxisPoints: xAxisPoints,
  37553. calPoints: calPoints,
  37554. eachSpacing: eachSpacing
  37555. };
  37556. }
  37557. function drawScatterDataPoints(series, opts, config, context) {
  37558. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37559. var scatterOption = assign({}, {
  37560. type: 'circle'
  37561. }, opts.extra.scatter);
  37562. var xAxisData = opts.chartData.xAxisData,
  37563. xAxisPoints = xAxisData.xAxisPoints,
  37564. eachSpacing = xAxisData.eachSpacing;
  37565. var calPoints = [];
  37566. context.save();
  37567. var leftSpace = 0;
  37568. var rightSpace = opts.width + eachSpacing;
  37569. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37570. context.translate(opts._scrollDistance_, 0);
  37571. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37572. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37573. }
  37574. series.forEach(function (eachSeries, seriesIndex) {
  37575. var ranges, minRange, maxRange;
  37576. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37577. minRange = ranges.pop();
  37578. maxRange = ranges.shift();
  37579. var data = eachSeries.data;
  37580. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37581. context.beginPath();
  37582. context.setStrokeStyle(eachSeries.color);
  37583. context.setFillStyle(eachSeries.color);
  37584. context.setLineWidth(1 * opts.pix);
  37585. var shape = eachSeries.pointShape;
  37586. if (shape === 'diamond') {
  37587. points.forEach(function (item, index) {
  37588. if (item !== null) {
  37589. context.moveTo(item.x, item.y - 4.5);
  37590. context.lineTo(item.x - 4.5, item.y);
  37591. context.lineTo(item.x, item.y + 4.5);
  37592. context.lineTo(item.x + 4.5, item.y);
  37593. context.lineTo(item.x, item.y - 4.5);
  37594. }
  37595. });
  37596. } else if (shape === 'circle') {
  37597. points.forEach(function (item, index) {
  37598. if (item !== null) {
  37599. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  37600. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  37601. }
  37602. });
  37603. } else if (shape === 'square') {
  37604. points.forEach(function (item, index) {
  37605. if (item !== null) {
  37606. context.moveTo(item.x - 3.5, item.y - 3.5);
  37607. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  37608. }
  37609. });
  37610. } else if (shape === 'triangle') {
  37611. points.forEach(function (item, index) {
  37612. if (item !== null) {
  37613. context.moveTo(item.x, item.y - 4.5);
  37614. context.lineTo(item.x - 4.5, item.y + 4.5);
  37615. context.lineTo(item.x + 4.5, item.y + 4.5);
  37616. context.lineTo(item.x, item.y - 4.5);
  37617. }
  37618. });
  37619. } else if (shape === 'triangle') {
  37620. return;
  37621. }
  37622. context.closePath();
  37623. context.fill();
  37624. context.stroke();
  37625. });
  37626. if (opts.dataLabel !== false && process === 1) {
  37627. series.forEach(function (eachSeries, seriesIndex) {
  37628. var ranges, minRange, maxRange;
  37629. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37630. minRange = ranges.pop();
  37631. maxRange = ranges.shift();
  37632. var data = eachSeries.data;
  37633. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37634. drawPointText(points, eachSeries, config, context, opts);
  37635. });
  37636. }
  37637. context.restore();
  37638. return {
  37639. xAxisPoints: xAxisPoints,
  37640. calPoints: calPoints,
  37641. eachSpacing: eachSpacing
  37642. };
  37643. }
  37644. function drawBubbleDataPoints(series, opts, config, context) {
  37645. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37646. var bubbleOption = assign({}, {
  37647. opacity: 1,
  37648. border: 2
  37649. }, opts.extra.bubble);
  37650. var xAxisData = opts.chartData.xAxisData,
  37651. xAxisPoints = xAxisData.xAxisPoints,
  37652. eachSpacing = xAxisData.eachSpacing;
  37653. var calPoints = [];
  37654. context.save();
  37655. var leftSpace = 0;
  37656. var rightSpace = opts.width + eachSpacing;
  37657. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37658. context.translate(opts._scrollDistance_, 0);
  37659. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37660. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37661. }
  37662. series.forEach(function (eachSeries, seriesIndex) {
  37663. var ranges, minRange, maxRange;
  37664. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37665. minRange = ranges.pop();
  37666. maxRange = ranges.shift();
  37667. var data = eachSeries.data;
  37668. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37669. context.beginPath();
  37670. context.setStrokeStyle(eachSeries.color);
  37671. context.setLineWidth(bubbleOption.border * opts.pix);
  37672. context.setFillStyle(hexToRgb(eachSeries.color, bubbleOption.opacity));
  37673. points.forEach(function (item, index) {
  37674. context.moveTo(item.x + item.r, item.y);
  37675. context.arc(item.x, item.y, item.r * opts.pix, 0, 2 * Math.PI, false);
  37676. });
  37677. context.closePath();
  37678. context.fill();
  37679. context.stroke();
  37680. if (opts.dataLabel !== false && process === 1) {
  37681. points.forEach(function (item, index) {
  37682. context.beginPath();
  37683. var fontSize = series.textSize * opts.pix || config.fontSize;
  37684. context.setFontSize(fontSize);
  37685. context.setFillStyle(series.textColor || "#FFFFFF");
  37686. context.setTextAlign('center');
  37687. context.fillText(String(item.t), item.x, item.y + fontSize / 2);
  37688. context.closePath();
  37689. context.stroke();
  37690. context.setTextAlign('left');
  37691. });
  37692. }
  37693. });
  37694. context.restore();
  37695. return {
  37696. xAxisPoints: xAxisPoints,
  37697. calPoints: calPoints,
  37698. eachSpacing: eachSpacing
  37699. };
  37700. }
  37701. function drawLineDataPoints(series, opts, config, context) {
  37702. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37703. var lineOption = assign({}, {
  37704. type: 'straight',
  37705. width: 2
  37706. }, opts.extra.line);
  37707. lineOption.width *= opts.pix;
  37708. var xAxisData = opts.chartData.xAxisData,
  37709. xAxisPoints = xAxisData.xAxisPoints,
  37710. eachSpacing = xAxisData.eachSpacing;
  37711. var calPoints = [];
  37712. context.save();
  37713. var leftSpace = 0;
  37714. var rightSpace = opts.width + eachSpacing;
  37715. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37716. context.translate(opts._scrollDistance_, 0);
  37717. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37718. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37719. }
  37720. series.forEach(function (eachSeries, seriesIndex) {
  37721. var ranges, minRange, maxRange;
  37722. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37723. minRange = ranges.pop();
  37724. maxRange = ranges.shift();
  37725. var data = eachSeries.data;
  37726. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37727. calPoints.push(points);
  37728. var splitPointList = splitPoints(points, eachSeries);
  37729. if (eachSeries.lineType == 'dash') {
  37730. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37731. dashLength *= opts.pix;
  37732. context.setLineDash([dashLength, dashLength]);
  37733. }
  37734. context.beginPath();
  37735. context.setStrokeStyle(eachSeries.color);
  37736. context.setLineWidth(lineOption.width);
  37737. splitPointList.forEach(function (points, index) {
  37738. if (points.length === 1) {
  37739. context.moveTo(points[0].x, points[0].y);
  37740. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  37741. } else {
  37742. context.moveTo(points[0].x, points[0].y);
  37743. var startPoint = 0;
  37744. if (lineOption.type === 'curve') {
  37745. for (var j = 0; j < points.length; j++) {
  37746. var item = points[j];
  37747. if (startPoint == 0 && item.x > leftSpace) {
  37748. context.moveTo(item.x, item.y);
  37749. startPoint = 1;
  37750. }
  37751. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37752. var ctrlPoint = createCurveControlPoints(points, j - 1);
  37753. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37754. }
  37755. }
  37756. ;
  37757. }
  37758. if (lineOption.type === 'straight') {
  37759. for (var _j6 = 0; _j6 < points.length; _j6++) {
  37760. var _item17 = points[_j6];
  37761. if (startPoint == 0 && _item17.x > leftSpace) {
  37762. context.moveTo(_item17.x, _item17.y);
  37763. startPoint = 1;
  37764. }
  37765. if (_j6 > 0 && _item17.x > leftSpace && _item17.x < rightSpace) {
  37766. context.lineTo(_item17.x, _item17.y);
  37767. }
  37768. }
  37769. ;
  37770. }
  37771. if (lineOption.type === 'step') {
  37772. for (var _j7 = 0; _j7 < points.length; _j7++) {
  37773. var _item18 = points[_j7];
  37774. if (startPoint == 0 && _item18.x > leftSpace) {
  37775. context.moveTo(_item18.x, _item18.y);
  37776. startPoint = 1;
  37777. }
  37778. if (_j7 > 0 && _item18.x > leftSpace && _item18.x < rightSpace) {
  37779. context.lineTo(_item18.x, points[_j7 - 1].y);
  37780. context.lineTo(_item18.x, _item18.y);
  37781. }
  37782. }
  37783. ;
  37784. }
  37785. context.moveTo(points[0].x, points[0].y);
  37786. }
  37787. });
  37788. context.stroke();
  37789. context.setLineDash([]);
  37790. if (opts.dataPointShape !== false) {
  37791. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  37792. }
  37793. });
  37794. if (opts.dataLabel !== false && process === 1) {
  37795. series.forEach(function (eachSeries, seriesIndex) {
  37796. var ranges, minRange, maxRange;
  37797. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37798. minRange = ranges.pop();
  37799. maxRange = ranges.shift();
  37800. var data = eachSeries.data;
  37801. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37802. drawPointText(points, eachSeries, config, context, opts);
  37803. });
  37804. }
  37805. context.restore();
  37806. return {
  37807. xAxisPoints: xAxisPoints,
  37808. calPoints: calPoints,
  37809. eachSpacing: eachSpacing
  37810. };
  37811. }
  37812. function drawMixDataPoints(series, opts, config, context) {
  37813. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37814. var columnOption = assign({}, {
  37815. width: eachSpacing / 2,
  37816. barBorderCircle: false,
  37817. barBorderRadius: [],
  37818. seriesGap: 2,
  37819. linearType: 'none',
  37820. linearOpacity: 1,
  37821. customColor: [],
  37822. colorStop: 0
  37823. }, opts.extra.mix.column);
  37824. var xAxisData = opts.chartData.xAxisData,
  37825. xAxisPoints = xAxisData.xAxisPoints,
  37826. eachSpacing = xAxisData.eachSpacing;
  37827. var endY = opts.height - opts.area[2];
  37828. var calPoints = [];
  37829. var columnIndex = 0;
  37830. var columnLength = 0;
  37831. series.forEach(function (eachSeries, seriesIndex) {
  37832. if (eachSeries.type == 'column') {
  37833. columnLength += 1;
  37834. }
  37835. });
  37836. context.save();
  37837. var leftNum = -2;
  37838. var rightNum = xAxisPoints.length + 2;
  37839. var leftSpace = 0;
  37840. var rightSpace = opts.width + eachSpacing;
  37841. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37842. context.translate(opts._scrollDistance_, 0);
  37843. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  37844. rightNum = leftNum + opts.xAxis.itemCount + 4;
  37845. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37846. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37847. }
  37848. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  37849. series.forEach(function (eachSeries, seriesIndex) {
  37850. var ranges, minRange, maxRange;
  37851. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37852. minRange = ranges.pop();
  37853. maxRange = ranges.shift();
  37854. var data = eachSeries.data;
  37855. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37856. calPoints.push(points);
  37857. // 绘制柱状数据图
  37858. if (eachSeries.type == 'column') {
  37859. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  37860. for (var i = 0; i < points.length; i++) {
  37861. var item = points[i];
  37862. if (item !== null && i > leftNum && i < rightNum) {
  37863. var startX = item.x - item.width / 2;
  37864. var height = opts.height - item.y - opts.area[2];
  37865. context.beginPath();
  37866. var fillColor = item.color || eachSeries.color;
  37867. var strokeColor = item.color || eachSeries.color;
  37868. if (columnOption.linearType !== 'none') {
  37869. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  37870. //透明渐变
  37871. if (columnOption.linearType == 'opacity') {
  37872. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  37873. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37874. } else {
  37875. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37876. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37877. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37878. }
  37879. fillColor = grd;
  37880. }
  37881. // 圆角边框
  37882. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle) {
  37883. var left = startX;
  37884. var top = item.y;
  37885. var width = item.width;
  37886. var _height3 = opts.height - opts.area[2] - item.y;
  37887. if (columnOption.barBorderCircle) {
  37888. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  37889. }
  37890. var _columnOption$barBord3 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  37891. r0 = _columnOption$barBord3[0],
  37892. r1 = _columnOption$barBord3[1],
  37893. r2 = _columnOption$barBord3[2],
  37894. r3 = _columnOption$barBord3[3];
  37895. var minRadius = Math.min(width / 2, _height3 / 2);
  37896. r0 = r0 > minRadius ? minRadius : r0;
  37897. r1 = r1 > minRadius ? minRadius : r1;
  37898. r2 = r2 > minRadius ? minRadius : r2;
  37899. r3 = r3 > minRadius ? minRadius : r3;
  37900. r0 = r0 < 0 ? 0 : r0;
  37901. r1 = r1 < 0 ? 0 : r1;
  37902. r2 = r2 < 0 ? 0 : r2;
  37903. r3 = r3 < 0 ? 0 : r3;
  37904. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  37905. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  37906. context.arc(left + width - r2, top + _height3 - r2, r2, 0, Math.PI / 2);
  37907. context.arc(left + r3, top + _height3 - r3, r3, Math.PI / 2, Math.PI);
  37908. } else {
  37909. context.moveTo(startX, item.y);
  37910. context.lineTo(startX + item.width - 2, item.y);
  37911. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  37912. context.lineTo(startX, opts.height - opts.area[2]);
  37913. context.lineTo(startX, item.y);
  37914. context.setLineWidth(1);
  37915. context.setStrokeStyle(strokeColor);
  37916. }
  37917. context.setFillStyle(fillColor);
  37918. context.closePath();
  37919. context.fill();
  37920. }
  37921. }
  37922. columnIndex += 1;
  37923. }
  37924. //绘制区域图数据
  37925. if (eachSeries.type == 'area') {
  37926. var _splitPointList = splitPoints(points, eachSeries);
  37927. for (var _i20 = 0; _i20 < _splitPointList.length; _i20++) {
  37928. var _points3 = _splitPointList[_i20];
  37929. // 绘制区域数据
  37930. context.beginPath();
  37931. context.setStrokeStyle(eachSeries.color);
  37932. context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
  37933. context.setLineWidth(2 * opts.pix);
  37934. if (_points3.length > 1) {
  37935. var firstPoint = _points3[0];
  37936. var lastPoint = _points3[_points3.length - 1];
  37937. context.moveTo(firstPoint.x, firstPoint.y);
  37938. var startPoint = 0;
  37939. if (eachSeries.style === 'curve') {
  37940. for (var j = 0; j < _points3.length; j++) {
  37941. var _item19 = _points3[j];
  37942. if (startPoint == 0 && _item19.x > leftSpace) {
  37943. context.moveTo(_item19.x, _item19.y);
  37944. startPoint = 1;
  37945. }
  37946. if (j > 0 && _item19.x > leftSpace && _item19.x < rightSpace) {
  37947. var ctrlPoint = createCurveControlPoints(_points3, j - 1);
  37948. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item19.x, _item19.y);
  37949. }
  37950. }
  37951. ;
  37952. } else {
  37953. for (var _j8 = 0; _j8 < _points3.length; _j8++) {
  37954. var _item20 = _points3[_j8];
  37955. if (startPoint == 0 && _item20.x > leftSpace) {
  37956. context.moveTo(_item20.x, _item20.y);
  37957. startPoint = 1;
  37958. }
  37959. if (_j8 > 0 && _item20.x > leftSpace && _item20.x < rightSpace) {
  37960. context.lineTo(_item20.x, _item20.y);
  37961. }
  37962. }
  37963. ;
  37964. }
  37965. context.lineTo(lastPoint.x, endY);
  37966. context.lineTo(firstPoint.x, endY);
  37967. context.lineTo(firstPoint.x, firstPoint.y);
  37968. } else {
  37969. var _item21 = _points3[0];
  37970. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37971. context.lineTo(_item21.x + eachSpacing / 2, _item21.y);
  37972. context.lineTo(_item21.x + eachSpacing / 2, endY);
  37973. context.lineTo(_item21.x - eachSpacing / 2, endY);
  37974. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37975. }
  37976. context.closePath();
  37977. context.fill();
  37978. }
  37979. }
  37980. // 绘制折线数据图
  37981. if (eachSeries.type == 'line') {
  37982. var splitPointList = splitPoints(points, eachSeries);
  37983. splitPointList.forEach(function (points, index) {
  37984. if (eachSeries.lineType == 'dash') {
  37985. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37986. dashLength *= opts.pix;
  37987. context.setLineDash([dashLength, dashLength]);
  37988. }
  37989. context.beginPath();
  37990. context.setStrokeStyle(eachSeries.color);
  37991. context.setLineWidth(2 * opts.pix);
  37992. if (points.length === 1) {
  37993. context.moveTo(points[0].x, points[0].y);
  37994. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  37995. } else {
  37996. context.moveTo(points[0].x, points[0].y);
  37997. var _startPoint2 = 0;
  37998. if (eachSeries.style == 'curve') {
  37999. for (var _j9 = 0; _j9 < points.length; _j9++) {
  38000. var _item22 = points[_j9];
  38001. if (_startPoint2 == 0 && _item22.x > leftSpace) {
  38002. context.moveTo(_item22.x, _item22.y);
  38003. _startPoint2 = 1;
  38004. }
  38005. if (_j9 > 0 && _item22.x > leftSpace && _item22.x < rightSpace) {
  38006. var ctrlPoint = createCurveControlPoints(points, _j9 - 1);
  38007. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item22.x, _item22.y);
  38008. }
  38009. }
  38010. } else {
  38011. for (var _j10 = 0; _j10 < points.length; _j10++) {
  38012. var _item23 = points[_j10];
  38013. if (_startPoint2 == 0 && _item23.x > leftSpace) {
  38014. context.moveTo(_item23.x, _item23.y);
  38015. _startPoint2 = 1;
  38016. }
  38017. if (_j10 > 0 && _item23.x > leftSpace && _item23.x < rightSpace) {
  38018. context.lineTo(_item23.x, _item23.y);
  38019. }
  38020. }
  38021. }
  38022. context.moveTo(points[0].x, points[0].y);
  38023. }
  38024. context.stroke();
  38025. context.setLineDash([]);
  38026. });
  38027. }
  38028. // 绘制点数据图
  38029. if (eachSeries.type == 'point') {
  38030. eachSeries.addPoint = true;
  38031. }
  38032. if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
  38033. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  38034. }
  38035. });
  38036. if (opts.dataLabel !== false && process === 1) {
  38037. var columnIndex = 0;
  38038. series.forEach(function (eachSeries, seriesIndex) {
  38039. var ranges, minRange, maxRange;
  38040. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38041. minRange = ranges.pop();
  38042. maxRange = ranges.shift();
  38043. var data = eachSeries.data;
  38044. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38045. if (eachSeries.type !== 'column') {
  38046. drawPointText(points, eachSeries, config, context, opts);
  38047. } else {
  38048. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  38049. drawPointText(points, eachSeries, config, context, opts);
  38050. columnIndex += 1;
  38051. }
  38052. });
  38053. }
  38054. context.restore();
  38055. return {
  38056. xAxisPoints: xAxisPoints,
  38057. calPoints: calPoints,
  38058. eachSpacing: eachSpacing
  38059. };
  38060. }
  38061. function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
  38062. var toolTipOption = opts.extra.tooltip || {};
  38063. if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
  38064. drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints);
  38065. }
  38066. context.save();
  38067. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38068. context.translate(opts._scrollDistance_, 0);
  38069. }
  38070. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  38071. drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
  38072. }
  38073. context.restore();
  38074. }
  38075. function drawXAxis(categories, opts, config, context) {
  38076. var xAxisData = opts.chartData.xAxisData,
  38077. xAxisPoints = xAxisData.xAxisPoints,
  38078. startX = xAxisData.startX,
  38079. endX = xAxisData.endX,
  38080. eachSpacing = xAxisData.eachSpacing;
  38081. var boundaryGap = 'center';
  38082. if (opts.type == 'bar' || opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  38083. boundaryGap = opts.xAxis.boundaryGap;
  38084. }
  38085. var startY = opts.height - opts.area[2];
  38086. var endY = opts.area[0];
  38087. //绘制滚动条
  38088. if (opts.enableScroll && opts.xAxis.scrollShow) {
  38089. var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
  38090. var scrollScreenWidth = endX - startX;
  38091. var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
  38092. var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
  38093. var scrollLeft = 0;
  38094. if (opts._scrollDistance_) {
  38095. scrollLeft = -opts._scrollDistance_ * scrollScreenWidth / scrollTotalWidth;
  38096. }
  38097. context.beginPath();
  38098. context.setLineCap('round');
  38099. context.setLineWidth(6 * opts.pix);
  38100. context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
  38101. context.moveTo(startX, scrollY);
  38102. context.lineTo(endX, scrollY);
  38103. context.stroke();
  38104. context.closePath();
  38105. context.beginPath();
  38106. context.setLineCap('round');
  38107. context.setLineWidth(6 * opts.pix);
  38108. context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
  38109. context.moveTo(startX + scrollLeft, scrollY);
  38110. context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
  38111. context.stroke();
  38112. context.closePath();
  38113. context.setLineCap('butt');
  38114. }
  38115. context.save();
  38116. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  38117. context.translate(opts._scrollDistance_, 0);
  38118. }
  38119. //绘制X轴刻度线
  38120. if (opts.xAxis.calibration === true) {
  38121. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  38122. context.setLineCap('butt');
  38123. context.setLineWidth(1 * opts.pix);
  38124. xAxisPoints.forEach(function (item, index) {
  38125. if (index > 0) {
  38126. context.beginPath();
  38127. context.moveTo(item - eachSpacing / 2, startY);
  38128. context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pix);
  38129. context.closePath();
  38130. context.stroke();
  38131. }
  38132. });
  38133. }
  38134. //绘制X轴网格
  38135. if (opts.xAxis.disableGrid !== true) {
  38136. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  38137. context.setLineCap('butt');
  38138. context.setLineWidth(1 * opts.pix);
  38139. if (opts.xAxis.gridType == 'dash') {
  38140. context.setLineDash([opts.xAxis.dashLength * opts.pix, opts.xAxis.dashLength * opts.pix]);
  38141. }
  38142. opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
  38143. xAxisPoints.forEach(function (item, index) {
  38144. if (index % opts.xAxis.gridEval == 0) {
  38145. context.beginPath();
  38146. context.moveTo(item, startY);
  38147. context.lineTo(item, endY);
  38148. context.stroke();
  38149. }
  38150. });
  38151. context.setLineDash([]);
  38152. }
  38153. //绘制X轴文案
  38154. if (opts.xAxis.disabled !== true) {
  38155. // 对X轴列表做抽稀处理
  38156. //默认全部显示X轴标签
  38157. var maxXAxisListLength = categories.length;
  38158. //如果设置了X轴单屏数量
  38159. if (opts.xAxis.labelCount) {
  38160. //如果设置X轴密度
  38161. if (opts.xAxis.itemCount) {
  38162. maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
  38163. } else {
  38164. maxXAxisListLength = opts.xAxis.labelCount;
  38165. }
  38166. maxXAxisListLength -= 1;
  38167. }
  38168. var ratio = Math.ceil(categories.length / maxXAxisListLength);
  38169. var newCategories = [];
  38170. var cgLength = categories.length;
  38171. for (var i = 0; i < cgLength; i++) {
  38172. if (i % ratio !== 0) {
  38173. newCategories.push("");
  38174. } else {
  38175. newCategories.push(categories[i]);
  38176. }
  38177. }
  38178. newCategories[cgLength - 1] = categories[cgLength - 1];
  38179. var xAxisFontSize = opts.xAxis.fontSize * opts.pix || config.fontSize;
  38180. if (config._xAxisTextAngle_ === 0) {
  38181. newCategories.forEach(function (item, index) {
  38182. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  38183. var offset = -measureText(String(xitem), xAxisFontSize, context) / 2;
  38184. if (boundaryGap == 'center') {
  38185. offset += eachSpacing / 2;
  38186. }
  38187. var scrollHeight = 0;
  38188. if (opts.xAxis.scrollShow) {
  38189. scrollHeight = 6 * opts.pix;
  38190. }
  38191. context.beginPath();
  38192. context.setFontSize(xAxisFontSize);
  38193. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  38194. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
  38195. context.closePath();
  38196. context.stroke();
  38197. });
  38198. } else {
  38199. newCategories.forEach(function (item, index) {
  38200. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  38201. context.save();
  38202. context.beginPath();
  38203. context.setFontSize(xAxisFontSize);
  38204. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  38205. var textWidth = measureText(String(xitem), xAxisFontSize, context);
  38206. var offset = -textWidth;
  38207. if (boundaryGap == 'center') {
  38208. offset += eachSpacing / 2;
  38209. }
  38210. var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
  38211. transX = _calRotateTranslate.transX,
  38212. transY = _calRotateTranslate.transY;
  38213. context.rotate(-1 * config._xAxisTextAngle_);
  38214. context.translate(transX, transY);
  38215. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
  38216. context.closePath();
  38217. context.stroke();
  38218. context.restore();
  38219. });
  38220. }
  38221. }
  38222. context.restore();
  38223. //绘制X轴轴线
  38224. if (opts.xAxis.axisLine) {
  38225. context.beginPath();
  38226. context.setStrokeStyle(opts.xAxis.axisLineColor);
  38227. context.setLineWidth(1 * opts.pix);
  38228. context.moveTo(startX, opts.height - opts.area[2]);
  38229. context.lineTo(endX, opts.height - opts.area[2]);
  38230. context.stroke();
  38231. }
  38232. }
  38233. function drawYAxisGrid(categories, opts, config, context) {
  38234. if (opts.yAxis.disableGrid === true) {
  38235. return;
  38236. }
  38237. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  38238. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  38239. var startX = opts.area[3];
  38240. var xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  38241. xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
  38242. var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
  38243. var endX = startX + TotalWidth;
  38244. var points = [];
  38245. var startY = 1;
  38246. if (opts.xAxis.axisLine === false) {
  38247. startY = 0;
  38248. }
  38249. for (var i = startY; i < opts.yAxis.splitNumber + 1; i++) {
  38250. points.push(opts.height - opts.area[2] - eachSpacing * i);
  38251. }
  38252. context.save();
  38253. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  38254. context.translate(opts._scrollDistance_, 0);
  38255. }
  38256. if (opts.yAxis.gridType == 'dash') {
  38257. context.setLineDash([opts.yAxis.dashLength * opts.pix, opts.yAxis.dashLength * opts.pix]);
  38258. }
  38259. context.setStrokeStyle(opts.yAxis.gridColor);
  38260. context.setLineWidth(1 * opts.pix);
  38261. points.forEach(function (item, index) {
  38262. context.beginPath();
  38263. context.moveTo(startX, item);
  38264. context.lineTo(endX, item);
  38265. context.stroke();
  38266. });
  38267. context.setLineDash([]);
  38268. context.restore();
  38269. }
  38270. function drawYAxis(series, opts, config, context) {
  38271. if (opts.yAxis.disabled === true) {
  38272. return;
  38273. }
  38274. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  38275. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  38276. var startX = opts.area[3];
  38277. var endX = opts.width - opts.area[1];
  38278. var endY = opts.height - opts.area[2];
  38279. var fillEndY = endY + config.xAxisHeight;
  38280. if (opts.xAxis.scrollShow) {
  38281. fillEndY -= 3 * opts.pix;
  38282. }
  38283. if (opts.xAxis.rotateLabel) {
  38284. fillEndY = opts.height - opts.area[2] + opts.fontSize * opts.pix / 2;
  38285. }
  38286. // set YAxis background
  38287. context.beginPath();
  38288. context.setFillStyle(opts.background);
  38289. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'left') {
  38290. context.fillRect(0, 0, startX, fillEndY);
  38291. }
  38292. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'right') {
  38293. context.fillRect(endX, 0, opts.width, fillEndY);
  38294. }
  38295. context.closePath();
  38296. context.stroke();
  38297. var tStartLeft = opts.area[3];
  38298. var tStartRight = opts.width - opts.area[1];
  38299. var tStartCenter = opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2;
  38300. if (opts.yAxis.data) {
  38301. var _loop4 = function _loop4(i) {
  38302. var yData = opts.yAxis.data[i];
  38303. points = [];
  38304. if (yData.type === 'categories') {
  38305. for (var _i21 = 0; _i21 <= yData.categories.length; _i21++) {
  38306. points.push(opts.area[0] + spacingValid / yData.categories.length / 2 + spacingValid / yData.categories.length * _i21);
  38307. }
  38308. } else {
  38309. for (var _i22 = 0; _i22 <= opts.yAxis.splitNumber; _i22++) {
  38310. points.push(opts.area[0] + eachSpacing * _i22);
  38311. }
  38312. }
  38313. if (yData.disabled !== true) {
  38314. var rangesFormat = opts.chartData.yAxisData.rangesFormat[i];
  38315. var yAxisFontSize = yData.fontSize ? yData.fontSize * opts.pix : config.fontSize;
  38316. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];
  38317. var textAlign = yData.textAlign || "right";
  38318. //画Y轴刻度及文案
  38319. rangesFormat.forEach(function (item, index) {
  38320. var pos = points[index] ? points[index] : endY;
  38321. context.beginPath();
  38322. context.setFontSize(yAxisFontSize);
  38323. context.setLineWidth(1 * opts.pix);
  38324. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  38325. context.setFillStyle(yData.fontColor || opts.fontColor);
  38326. var tmpstrat = 0;
  38327. var gapwidth = 4 * opts.pix;
  38328. if (yAxisWidth.position == 'left') {
  38329. //画刻度线
  38330. if (yData.calibration == true) {
  38331. context.moveTo(tStartLeft, pos);
  38332. context.lineTo(tStartLeft - 3 * opts.pix, pos);
  38333. gapwidth += 3 * opts.pix;
  38334. }
  38335. //画文字
  38336. switch (textAlign) {
  38337. case "left":
  38338. context.setTextAlign('left');
  38339. tmpstrat = tStartLeft - yAxisWidth.width;
  38340. break;
  38341. case "right":
  38342. context.setTextAlign('right');
  38343. tmpstrat = tStartLeft - gapwidth;
  38344. break;
  38345. default:
  38346. context.setTextAlign('center');
  38347. tmpstrat = tStartLeft - yAxisWidth.width / 2;
  38348. }
  38349. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38350. } else if (yAxisWidth.position == 'right') {
  38351. //画刻度线
  38352. if (yData.calibration == true) {
  38353. context.moveTo(tStartRight, pos);
  38354. context.lineTo(tStartRight + 3 * opts.pix, pos);
  38355. gapwidth += 3 * opts.pix;
  38356. }
  38357. switch (textAlign) {
  38358. case "left":
  38359. context.setTextAlign('left');
  38360. tmpstrat = tStartRight + gapwidth;
  38361. break;
  38362. case "right":
  38363. context.setTextAlign('right');
  38364. tmpstrat = tStartRight + yAxisWidth.width;
  38365. break;
  38366. default:
  38367. context.setTextAlign('center');
  38368. tmpstrat = tStartRight + yAxisWidth.width / 2;
  38369. }
  38370. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38371. } else if (yAxisWidth.position == 'center') {
  38372. //画刻度线
  38373. if (yData.calibration == true) {
  38374. context.moveTo(tStartCenter, pos);
  38375. context.lineTo(tStartCenter - 3 * opts.pix, pos);
  38376. gapwidth += 3 * opts.pix;
  38377. }
  38378. //画文字
  38379. switch (textAlign) {
  38380. case "left":
  38381. context.setTextAlign('left');
  38382. tmpstrat = tStartCenter - yAxisWidth.width;
  38383. break;
  38384. case "right":
  38385. context.setTextAlign('right');
  38386. tmpstrat = tStartCenter - gapwidth;
  38387. break;
  38388. default:
  38389. context.setTextAlign('center');
  38390. tmpstrat = tStartCenter - yAxisWidth.width / 2;
  38391. }
  38392. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38393. }
  38394. context.closePath();
  38395. context.stroke();
  38396. context.setTextAlign('left');
  38397. });
  38398. //画Y轴轴线
  38399. if (yData.axisLine !== false) {
  38400. context.beginPath();
  38401. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  38402. context.setLineWidth(1 * opts.pix);
  38403. if (yAxisWidth.position == 'left') {
  38404. context.moveTo(tStartLeft, opts.height - opts.area[2]);
  38405. context.lineTo(tStartLeft, opts.area[0]);
  38406. } else if (yAxisWidth.position == 'right') {
  38407. context.moveTo(tStartRight, opts.height - opts.area[2]);
  38408. context.lineTo(tStartRight, opts.area[0]);
  38409. } else if (yAxisWidth.position == 'center') {
  38410. context.moveTo(tStartCenter, opts.height - opts.area[2]);
  38411. context.lineTo(tStartCenter, opts.area[0]);
  38412. }
  38413. context.stroke();
  38414. }
  38415. //画Y轴标题
  38416. if (opts.yAxis.showTitle) {
  38417. var titleFontSize = yData.titleFontSize * opts.pix || config.fontSize;
  38418. var title = yData.title;
  38419. context.beginPath();
  38420. context.setFontSize(titleFontSize);
  38421. context.setFillStyle(yData.titleFontColor || opts.fontColor);
  38422. if (yAxisWidth.position == 'left') {
  38423. context.fillText(title, tStartLeft - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38424. } else if (yAxisWidth.position == 'right') {
  38425. context.fillText(title, tStartRight - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38426. } else if (yAxisWidth.position == 'center') {
  38427. context.fillText(title, tStartCenter - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38428. }
  38429. context.closePath();
  38430. context.stroke();
  38431. }
  38432. if (yAxisWidth.position == 'left') {
  38433. tStartLeft -= yAxisWidth.width + opts.yAxis.padding * opts.pix;
  38434. } else {
  38435. tStartRight += yAxisWidth.width + opts.yAxis.padding * opts.pix;
  38436. }
  38437. }
  38438. };
  38439. for (var i = 0; i < opts.yAxis.data.length; i++) {
  38440. var points;
  38441. _loop4(i);
  38442. }
  38443. }
  38444. }
  38445. function drawLegend(series, opts, config, context, chartData) {
  38446. if (opts.legend.show === false) {
  38447. return;
  38448. }
  38449. var legendData = chartData.legendData;
  38450. var legendList = legendData.points;
  38451. var legendArea = legendData.area;
  38452. var padding = opts.legend.padding * opts.pix;
  38453. var fontSize = opts.legend.fontSize * opts.pix;
  38454. var shapeWidth = 15 * opts.pix;
  38455. var shapeRight = 5 * opts.pix;
  38456. var itemGap = opts.legend.itemGap * opts.pix;
  38457. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  38458. //画背景及边框
  38459. context.beginPath();
  38460. context.setLineWidth(opts.legend.borderWidth * opts.pix);
  38461. context.setStrokeStyle(opts.legend.borderColor);
  38462. context.setFillStyle(opts.legend.backgroundColor);
  38463. context.moveTo(legendArea.start.x, legendArea.start.y);
  38464. context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
  38465. context.closePath();
  38466. context.fill();
  38467. context.stroke();
  38468. legendList.forEach(function (itemList, listIndex) {
  38469. var width = 0;
  38470. var height = 0;
  38471. width = legendData.widthArr[listIndex];
  38472. height = legendData.heightArr[listIndex];
  38473. var startX = 0;
  38474. var startY = 0;
  38475. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  38476. switch (opts.legend.float) {
  38477. case 'left':
  38478. startX = legendArea.start.x + padding;
  38479. break;
  38480. case 'right':
  38481. startX = legendArea.start.x + legendArea.width - width;
  38482. break;
  38483. default:
  38484. startX = legendArea.start.x + (legendArea.width - width) / 2;
  38485. }
  38486. startY = legendArea.start.y + padding + listIndex * lineHeight;
  38487. } else {
  38488. if (listIndex == 0) {
  38489. width = 0;
  38490. } else {
  38491. width = legendData.widthArr[listIndex - 1];
  38492. }
  38493. startX = legendArea.start.x + padding + width;
  38494. startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
  38495. }
  38496. context.setFontSize(config.fontSize);
  38497. for (var i = 0; i < itemList.length; i++) {
  38498. var item = itemList[i];
  38499. item.area = [0, 0, 0, 0];
  38500. item.area[0] = startX;
  38501. item.area[1] = startY;
  38502. item.area[3] = startY + lineHeight;
  38503. context.beginPath();
  38504. context.setLineWidth(1 * opts.pix);
  38505. context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
  38506. context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
  38507. switch (item.legendShape) {
  38508. case 'line':
  38509. context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pix);
  38510. context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pix, 15 * opts.pix, 4 * opts.pix);
  38511. break;
  38512. case 'triangle':
  38513. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38514. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38515. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38516. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38517. break;
  38518. case 'diamond':
  38519. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38520. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight);
  38521. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38522. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight);
  38523. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38524. break;
  38525. case 'circle':
  38526. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight);
  38527. context.arc(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight, 5 * opts.pix, 0, 2 * Math.PI);
  38528. break;
  38529. case 'rect':
  38530. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  38531. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  38532. break;
  38533. case 'square':
  38534. context.moveTo(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38535. context.fillRect(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix, 10 * opts.pix, 10 * opts.pix);
  38536. break;
  38537. case 'none':
  38538. break;
  38539. default:
  38540. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  38541. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  38542. }
  38543. context.closePath();
  38544. context.fill();
  38545. context.stroke();
  38546. startX += shapeWidth + shapeRight;
  38547. var fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
  38548. context.beginPath();
  38549. context.setFontSize(fontSize);
  38550. context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
  38551. context.fillText(item.name, startX, startY + fontTrans);
  38552. context.closePath();
  38553. context.stroke();
  38554. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  38555. startX += measureText(item.name, fontSize, context) + itemGap;
  38556. item.area[2] = startX;
  38557. } else {
  38558. item.area[2] = startX + measureText(item.name, fontSize, context) + itemGap;
  38559. ;
  38560. startX -= shapeWidth + shapeRight;
  38561. startY += lineHeight;
  38562. }
  38563. }
  38564. });
  38565. }
  38566. function drawPieDataPoints(series, opts, config, context) {
  38567. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38568. var pieOption = assign({}, {
  38569. activeOpacity: 0.5,
  38570. activeRadius: 10,
  38571. offsetAngle: 0,
  38572. labelWidth: 15,
  38573. ringWidth: 30,
  38574. customRadius: 0,
  38575. border: false,
  38576. borderWidth: 2,
  38577. borderColor: '#FFFFFF',
  38578. centerColor: '#FFFFFF',
  38579. linearType: 'none',
  38580. customColor: []
  38581. }, opts.type == "pie" ? opts.extra.pie : opts.extra.ring);
  38582. var centerPosition = {
  38583. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38584. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  38585. };
  38586. if (config.pieChartLinePadding == 0) {
  38587. config.pieChartLinePadding = pieOption.activeRadius * opts.pix;
  38588. }
  38589. 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);
  38590. if (pieOption.customRadius > 0) {
  38591. radius = pieOption.customRadius * opts.pix;
  38592. }
  38593. series = getPieDataPoints(series, radius, process);
  38594. var activeRadius = pieOption.activeRadius * opts.pix;
  38595. pieOption.customColor = fillCustomColor(pieOption.linearType, pieOption.customColor, series, config);
  38596. series = series.map(function (eachSeries) {
  38597. eachSeries._start_ += pieOption.offsetAngle * Math.PI / 180;
  38598. return eachSeries;
  38599. });
  38600. series.forEach(function (eachSeries, seriesIndex) {
  38601. if (opts.tooltip) {
  38602. if (opts.tooltip.index == seriesIndex) {
  38603. context.beginPath();
  38604. context.setFillStyle(hexToRgb(eachSeries.color, pieOption.activeOpacity || 0.5));
  38605. context.moveTo(centerPosition.x, centerPosition.y);
  38606. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  38607. context.closePath();
  38608. context.fill();
  38609. }
  38610. }
  38611. context.beginPath();
  38612. context.setLineWidth(pieOption.borderWidth * opts.pix);
  38613. context.lineJoin = "round";
  38614. context.setStrokeStyle(pieOption.borderColor);
  38615. var fillcolor = eachSeries.color;
  38616. if (pieOption.linearType == 'custom') {
  38617. var grd;
  38618. if (context.createCircularGradient) {
  38619. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  38620. } else {
  38621. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  38622. }
  38623. grd.addColorStop(0, hexToRgb(pieOption.customColor[eachSeries.linearIndex], 1));
  38624. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  38625. fillcolor = grd;
  38626. }
  38627. context.setFillStyle(fillcolor);
  38628. context.moveTo(centerPosition.x, centerPosition.y);
  38629. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  38630. context.closePath();
  38631. context.fill();
  38632. if (pieOption.border == true) {
  38633. context.stroke();
  38634. }
  38635. });
  38636. if (opts.type === 'ring') {
  38637. var innerPieWidth = radius * 0.6;
  38638. if (typeof pieOption.ringWidth === 'number' && pieOption.ringWidth > 0) {
  38639. innerPieWidth = Math.max(0, radius - pieOption.ringWidth * opts.pix);
  38640. }
  38641. context.beginPath();
  38642. context.setFillStyle(pieOption.centerColor);
  38643. context.moveTo(centerPosition.x, centerPosition.y);
  38644. context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
  38645. context.closePath();
  38646. context.fill();
  38647. }
  38648. if (opts.dataLabel !== false && process === 1) {
  38649. var valid = false;
  38650. for (var i = 0, len = series.length; i < len; i++) {
  38651. if (series[i].data > 0) {
  38652. valid = true;
  38653. break;
  38654. }
  38655. }
  38656. if (valid) {
  38657. drawPieText(series, opts, config, context, radius, centerPosition);
  38658. }
  38659. }
  38660. if (process === 1 && opts.type === 'ring') {
  38661. drawRingTitle(opts, config, context, centerPosition);
  38662. }
  38663. return {
  38664. center: centerPosition,
  38665. radius: radius,
  38666. series: series
  38667. };
  38668. }
  38669. function drawRoseDataPoints(series, opts, config, context) {
  38670. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38671. var roseOption = assign({}, {
  38672. type: 'area',
  38673. activeOpacity: 0.5,
  38674. activeRadius: 10,
  38675. offsetAngle: 0,
  38676. labelWidth: 15,
  38677. border: false,
  38678. borderWidth: 2,
  38679. borderColor: '#FFFFFF',
  38680. linearType: 'none',
  38681. customColor: []
  38682. }, opts.extra.rose);
  38683. if (config.pieChartLinePadding == 0) {
  38684. config.pieChartLinePadding = roseOption.activeRadius * opts.pix;
  38685. }
  38686. var centerPosition = {
  38687. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38688. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  38689. };
  38690. 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);
  38691. var minRadius = roseOption.minRadius || radius * 0.5;
  38692. series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
  38693. var activeRadius = roseOption.activeRadius * opts.pix;
  38694. roseOption.customColor = fillCustomColor(roseOption.linearType, roseOption.customColor, series, config);
  38695. series = series.map(function (eachSeries) {
  38696. eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
  38697. return eachSeries;
  38698. });
  38699. series.forEach(function (eachSeries, seriesIndex) {
  38700. if (opts.tooltip) {
  38701. if (opts.tooltip.index == seriesIndex) {
  38702. context.beginPath();
  38703. context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
  38704. context.moveTo(centerPosition.x, centerPosition.y);
  38705. context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  38706. context.closePath();
  38707. context.fill();
  38708. }
  38709. }
  38710. context.beginPath();
  38711. context.setLineWidth(roseOption.borderWidth * opts.pix);
  38712. context.lineJoin = "round";
  38713. context.setStrokeStyle(roseOption.borderColor);
  38714. var fillcolor = eachSeries.color;
  38715. if (roseOption.linearType == 'custom') {
  38716. var grd;
  38717. if (context.createCircularGradient) {
  38718. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  38719. } else {
  38720. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  38721. }
  38722. grd.addColorStop(0, hexToRgb(roseOption.customColor[eachSeries.linearIndex], 1));
  38723. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  38724. fillcolor = grd;
  38725. }
  38726. context.setFillStyle(fillcolor);
  38727. context.moveTo(centerPosition.x, centerPosition.y);
  38728. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  38729. context.closePath();
  38730. context.fill();
  38731. if (roseOption.border == true) {
  38732. context.stroke();
  38733. }
  38734. });
  38735. if (opts.dataLabel !== false && process === 1) {
  38736. var valid = false;
  38737. for (var i = 0, len = series.length; i < len; i++) {
  38738. if (series[i].data > 0) {
  38739. valid = true;
  38740. break;
  38741. }
  38742. }
  38743. if (valid) {
  38744. drawPieText(series, opts, config, context, radius, centerPosition);
  38745. }
  38746. }
  38747. return {
  38748. center: centerPosition,
  38749. radius: radius,
  38750. series: series
  38751. };
  38752. }
  38753. function drawArcbarDataPoints(series, opts, config, context) {
  38754. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38755. var arcbarOption = assign({}, {
  38756. startAngle: 0.75,
  38757. endAngle: 0.25,
  38758. type: 'default',
  38759. width: 12,
  38760. gap: 2,
  38761. linearType: 'none',
  38762. customColor: []
  38763. }, opts.extra.arcbar);
  38764. series = getArcbarDataPoints(series, arcbarOption, process);
  38765. var centerPosition;
  38766. if (arcbarOption.centerX || arcbarOption.centerY) {
  38767. centerPosition = {
  38768. x: arcbarOption.centerX ? arcbarOption.centerX : opts.width / 2,
  38769. y: arcbarOption.centerY ? arcbarOption.centerY : opts.height / 2
  38770. };
  38771. } else {
  38772. centerPosition = {
  38773. x: opts.width / 2,
  38774. y: opts.height / 2
  38775. };
  38776. }
  38777. var radius;
  38778. if (arcbarOption.radius) {
  38779. radius = arcbarOption.radius;
  38780. } else {
  38781. radius = Math.min(centerPosition.x, centerPosition.y);
  38782. radius -= 5 * opts.pix;
  38783. radius -= arcbarOption.width / 2;
  38784. }
  38785. arcbarOption.customColor = fillCustomColor(arcbarOption.linearType, arcbarOption.customColor, series, config);
  38786. for (var i = 0; i < series.length; i++) {
  38787. var eachSeries = series[i];
  38788. //背景颜色
  38789. context.setLineWidth(arcbarOption.width * opts.pix);
  38790. context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
  38791. context.setLineCap('round');
  38792. context.beginPath();
  38793. if (arcbarOption.type == 'default') {
  38794. 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);
  38795. } else {
  38796. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, 0, 2 * Math.PI, false);
  38797. }
  38798. context.stroke();
  38799. //进度条
  38800. var fillColor = eachSeries.color;
  38801. if (arcbarOption.linearType == 'custom') {
  38802. var grd = context.createLinearGradient(centerPosition.x - radius, centerPosition.y, centerPosition.x + radius, centerPosition.y);
  38803. grd.addColorStop(1, hexToRgb(arcbarOption.customColor[eachSeries.linearIndex], 1));
  38804. grd.addColorStop(0, hexToRgb(eachSeries.color, 1));
  38805. fillColor = grd;
  38806. }
  38807. context.setLineWidth(arcbarOption.width * opts.pix);
  38808. context.setStrokeStyle(fillColor);
  38809. context.setLineCap('round');
  38810. context.beginPath();
  38811. 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);
  38812. context.stroke();
  38813. }
  38814. drawRingTitle(opts, config, context, centerPosition);
  38815. return {
  38816. center: centerPosition,
  38817. radius: radius,
  38818. series: series
  38819. };
  38820. }
  38821. function drawGaugeDataPoints(categories, series, opts, config, context) {
  38822. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  38823. var gaugeOption = assign({}, {
  38824. type: 'default',
  38825. startAngle: 0.75,
  38826. endAngle: 0.25,
  38827. width: 15,
  38828. labelOffset: 13,
  38829. splitLine: {
  38830. fixRadius: 0,
  38831. splitNumber: 10,
  38832. width: 15,
  38833. color: '#FFFFFF',
  38834. childNumber: 5,
  38835. childWidth: 5
  38836. },
  38837. pointer: {
  38838. width: 15,
  38839. color: 'auto'
  38840. }
  38841. }, opts.extra.gauge);
  38842. if (gaugeOption.oldAngle == undefined) {
  38843. gaugeOption.oldAngle = gaugeOption.startAngle;
  38844. }
  38845. if (gaugeOption.oldData == undefined) {
  38846. gaugeOption.oldData = 0;
  38847. }
  38848. categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
  38849. var centerPosition = {
  38850. x: opts.width / 2,
  38851. y: opts.height / 2
  38852. };
  38853. var radius = Math.min(centerPosition.x, centerPosition.y);
  38854. radius -= 5 * opts.pix;
  38855. radius -= gaugeOption.width / 2;
  38856. var innerRadius = radius - gaugeOption.width;
  38857. var totalAngle = 0;
  38858. //判断仪表盘的样式:default百度样式,progress新样式
  38859. if (gaugeOption.type == 'progress') {
  38860. //## 第一步画中心圆形背景和进度条背景
  38861. //中心圆形背景
  38862. var pieRadius = radius - gaugeOption.width * 3;
  38863. context.beginPath();
  38864. var gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
  38865. //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
  38866. gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
  38867. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  38868. context.setFillStyle(gradient);
  38869. context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
  38870. context.fill();
  38871. //画进度条背景
  38872. context.setLineWidth(gaugeOption.width);
  38873. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38874. context.setLineCap('round');
  38875. context.beginPath();
  38876. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
  38877. context.stroke();
  38878. //## 第二步画刻度线
  38879. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38880. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38881. var childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38882. var startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38883. var endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38884. context.save();
  38885. context.translate(centerPosition.x, centerPosition.y);
  38886. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38887. var len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
  38888. var proc = series[0].data * process;
  38889. for (var i = 0; i < len; i++) {
  38890. context.beginPath();
  38891. //刻度线随进度变色
  38892. if (proc > i / len) {
  38893. context.setStrokeStyle(hexToRgb(series[0].color, 1));
  38894. } else {
  38895. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38896. }
  38897. context.setLineWidth(3 * opts.pix);
  38898. context.moveTo(startX, 0);
  38899. context.lineTo(endX, 0);
  38900. context.stroke();
  38901. context.rotate(childAngle * Math.PI);
  38902. }
  38903. context.restore();
  38904. //## 第三步画进度条
  38905. series = getArcbarDataPoints(series, gaugeOption, process);
  38906. context.setLineWidth(gaugeOption.width);
  38907. context.setStrokeStyle(series[0].color);
  38908. context.setLineCap('round');
  38909. context.beginPath();
  38910. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
  38911. context.stroke();
  38912. //## 第四步画指针
  38913. var pointerRadius = radius - gaugeOption.width * 2.5;
  38914. context.save();
  38915. context.translate(centerPosition.x, centerPosition.y);
  38916. context.rotate((series[0]._proportion_ - 1) * Math.PI);
  38917. context.beginPath();
  38918. context.setLineWidth(gaugeOption.width / 3);
  38919. var gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
  38920. gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
  38921. gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
  38922. gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
  38923. context.setStrokeStyle(gradient3);
  38924. context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
  38925. context.stroke();
  38926. context.beginPath();
  38927. context.setLineWidth(1);
  38928. context.setStrokeStyle(series[0].color);
  38929. context.setFillStyle(series[0].color);
  38930. context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38931. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
  38932. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
  38933. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38934. context.stroke();
  38935. context.fill();
  38936. context.restore();
  38937. //default百度样式
  38938. } else {
  38939. //画背景
  38940. context.setLineWidth(gaugeOption.width);
  38941. context.setLineCap('butt');
  38942. for (var _i23 = 0; _i23 < categories.length; _i23++) {
  38943. var eachCategories = categories[_i23];
  38944. context.beginPath();
  38945. context.setStrokeStyle(eachCategories.color);
  38946. context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
  38947. context.stroke();
  38948. }
  38949. context.save();
  38950. //画刻度线
  38951. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38952. var _splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38953. var _childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38954. var _startX2 = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38955. var _endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38956. var childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
  38957. context.translate(centerPosition.x, centerPosition.y);
  38958. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38959. for (var _i24 = 0; _i24 < gaugeOption.splitLine.splitNumber + 1; _i24++) {
  38960. context.beginPath();
  38961. context.setStrokeStyle(gaugeOption.splitLine.color);
  38962. context.setLineWidth(2 * opts.pix);
  38963. context.moveTo(_startX2, 0);
  38964. context.lineTo(_endX, 0);
  38965. context.stroke();
  38966. context.rotate(_splitAngle * Math.PI);
  38967. }
  38968. context.restore();
  38969. context.save();
  38970. context.translate(centerPosition.x, centerPosition.y);
  38971. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38972. for (var _i25 = 0; _i25 < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; _i25++) {
  38973. context.beginPath();
  38974. context.setStrokeStyle(gaugeOption.splitLine.color);
  38975. context.setLineWidth(1 * opts.pix);
  38976. context.moveTo(_startX2, 0);
  38977. context.lineTo(childendX, 0);
  38978. context.stroke();
  38979. context.rotate(_childAngle * Math.PI);
  38980. }
  38981. context.restore();
  38982. //画指针
  38983. series = getGaugeDataPoints(series, categories, gaugeOption, process);
  38984. for (var _i26 = 0; _i26 < series.length; _i26++) {
  38985. var eachSeries = series[_i26];
  38986. context.save();
  38987. context.translate(centerPosition.x, centerPosition.y);
  38988. context.rotate((eachSeries._proportion_ - 1) * Math.PI);
  38989. context.beginPath();
  38990. context.setFillStyle(eachSeries.color);
  38991. context.moveTo(gaugeOption.pointer.width, 0);
  38992. context.lineTo(0, -gaugeOption.pointer.width / 2);
  38993. context.lineTo(-innerRadius, 0);
  38994. context.lineTo(0, gaugeOption.pointer.width / 2);
  38995. context.lineTo(gaugeOption.pointer.width, 0);
  38996. context.closePath();
  38997. context.fill();
  38998. context.beginPath();
  38999. context.setFillStyle('#FFFFFF');
  39000. context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
  39001. context.fill();
  39002. context.restore();
  39003. }
  39004. if (opts.dataLabel !== false) {
  39005. drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
  39006. }
  39007. }
  39008. //画仪表盘标题,副标题
  39009. drawRingTitle(opts, config, context, centerPosition);
  39010. if (process === 1 && opts.type === 'gauge') {
  39011. opts.extra.gauge.oldAngle = series[0]._proportion_;
  39012. opts.extra.gauge.oldData = series[0].data;
  39013. }
  39014. return {
  39015. center: centerPosition,
  39016. radius: radius,
  39017. innerRadius: innerRadius,
  39018. categories: categories,
  39019. totalAngle: totalAngle
  39020. };
  39021. }
  39022. function drawRadarDataPoints(series, opts, config, context) {
  39023. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39024. var radarOption = assign({}, {
  39025. gridColor: '#cccccc',
  39026. gridType: 'radar',
  39027. opacity: 0.2,
  39028. gridCount: 3,
  39029. border: false,
  39030. borderWidth: 2
  39031. }, opts.extra.radar);
  39032. var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
  39033. var centerPosition = {
  39034. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39035. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  39036. };
  39037. var xr = (opts.width - opts.area[1] - opts.area[3]) / 2;
  39038. var yr = (opts.height - opts.area[0] - opts.area[2]) / 2;
  39039. var radius = Math.min(xr - (getMaxTextListLength(opts.categories, config.fontSize, context) + config.radarLabelTextMargin), yr - config.radarLabelTextMargin);
  39040. radius -= config.radarLabelTextMargin * opts.pix;
  39041. // 画分割线
  39042. context.beginPath();
  39043. context.setLineWidth(1 * opts.pix);
  39044. context.setStrokeStyle(radarOption.gridColor);
  39045. coordinateAngle.forEach(function (angle) {
  39046. var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
  39047. context.moveTo(centerPosition.x, centerPosition.y);
  39048. context.lineTo(pos.x, pos.y);
  39049. });
  39050. context.stroke();
  39051. context.closePath();
  39052. // 画背景网格
  39053. var _loop = function _loop(i) {
  39054. var startPos = {};
  39055. context.beginPath();
  39056. context.setLineWidth(1 * opts.pix);
  39057. context.setStrokeStyle(radarOption.gridColor);
  39058. if (radarOption.gridType == 'radar') {
  39059. coordinateAngle.forEach(function (angle, index) {
  39060. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
  39061. if (index === 0) {
  39062. startPos = pos;
  39063. context.moveTo(pos.x, pos.y);
  39064. } else {
  39065. context.lineTo(pos.x, pos.y);
  39066. }
  39067. });
  39068. context.lineTo(startPos.x, startPos.y);
  39069. } else {
  39070. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
  39071. context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
  39072. }
  39073. context.stroke();
  39074. context.closePath();
  39075. };
  39076. for (var i = 1; i <= radarOption.gridCount; i++) {
  39077. _loop(i);
  39078. }
  39079. var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
  39080. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  39081. // 绘制区域数据
  39082. context.beginPath();
  39083. context.setLineWidth(radarOption.borderWidth * opts.pix);
  39084. context.setStrokeStyle(eachSeries.color);
  39085. context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
  39086. eachSeries.data.forEach(function (item, index) {
  39087. if (index === 0) {
  39088. context.moveTo(item.position.x, item.position.y);
  39089. } else {
  39090. context.lineTo(item.position.x, item.position.y);
  39091. }
  39092. });
  39093. context.closePath();
  39094. context.fill();
  39095. if (radarOption.border === true) {
  39096. context.stroke();
  39097. }
  39098. context.closePath();
  39099. if (opts.dataPointShape !== false) {
  39100. var points = eachSeries.data.map(function (item) {
  39101. return item.position;
  39102. });
  39103. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39104. }
  39105. });
  39106. // draw label text
  39107. drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
  39108. // draw dataLabel
  39109. if (opts.dataLabel !== false && process === 1) {
  39110. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  39111. context.beginPath();
  39112. var fontSize = eachSeries.textSize * opts.pix || config.fontSize;
  39113. context.setFontSize(fontSize);
  39114. context.setFillStyle(eachSeries.textColor || opts.fontColor);
  39115. eachSeries.data.forEach(function (item, index) {
  39116. //如果是中心点垂直的上下点位
  39117. if (Math.abs(item.position.x - centerPosition.x) < 2) {
  39118. //如果在上面
  39119. if (item.position.y < centerPosition.y) {
  39120. context.setTextAlign('center');
  39121. context.fillText(item.value, item.position.x, item.position.y - 4);
  39122. } else {
  39123. context.setTextAlign('center');
  39124. context.fillText(item.value, item.position.x, item.position.y + fontSize + 2);
  39125. }
  39126. } else {
  39127. //如果在左侧
  39128. if (item.position.x < centerPosition.x) {
  39129. context.setTextAlign('right');
  39130. context.fillText(item.value, item.position.x - 4, item.position.y + fontSize / 2 - 2);
  39131. } else {
  39132. context.setTextAlign('left');
  39133. context.fillText(item.value, item.position.x + 4, item.position.y + fontSize / 2 - 2);
  39134. }
  39135. }
  39136. });
  39137. context.closePath();
  39138. context.stroke();
  39139. });
  39140. context.setTextAlign('left');
  39141. }
  39142. return {
  39143. center: centerPosition,
  39144. radius: radius,
  39145. angleList: coordinateAngle
  39146. };
  39147. }
  39148. function normalInt(min, max, iter) {
  39149. iter = iter == 0 ? 1 : iter;
  39150. var arr = [];
  39151. for (var i = 0; i < iter; i++) {
  39152. arr[i] = Math.random();
  39153. }
  39154. ;
  39155. return Math.floor(arr.reduce(function (i, j) {
  39156. return i + j;
  39157. }) / iter * (max - min)) + min;
  39158. }
  39159. ;
  39160. function collisionNew(area, points, width, height) {
  39161. var isIn = false;
  39162. for (var i = 0; i < points.length; i++) {
  39163. if (points[i].area) {
  39164. 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]) {
  39165. if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
  39166. isIn = true;
  39167. break;
  39168. } else {
  39169. isIn = false;
  39170. }
  39171. } else {
  39172. isIn = true;
  39173. break;
  39174. }
  39175. }
  39176. }
  39177. return isIn;
  39178. }
  39179. ;
  39180. function getBoundingBox(data) {
  39181. var bounds = {},
  39182. coords;
  39183. bounds.xMin = 180;
  39184. bounds.xMax = 0;
  39185. bounds.yMin = 90;
  39186. bounds.yMax = 0;
  39187. for (var i = 0; i < data.length; i++) {
  39188. var coorda = data[i].geometry.coordinates;
  39189. for (var k = 0; k < coorda.length; k++) {
  39190. coords = coorda[k];
  39191. if (coords.length == 1) {
  39192. coords = coords[0];
  39193. }
  39194. for (var j = 0; j < coords.length; j++) {
  39195. var longitude = coords[j][0];
  39196. var latitude = coords[j][1];
  39197. var point = {
  39198. x: longitude,
  39199. y: latitude
  39200. };
  39201. bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
  39202. bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
  39203. bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
  39204. bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
  39205. }
  39206. }
  39207. }
  39208. return bounds;
  39209. }
  39210. function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
  39211. return {
  39212. x: (longitude - bounds.xMin) * scale + xoffset,
  39213. y: (bounds.yMax - latitude) * scale + yoffset
  39214. };
  39215. }
  39216. function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
  39217. return {
  39218. x: (pointX - xoffset) / scale + bounds.xMin,
  39219. y: bounds.yMax - (pointY - yoffset) / scale
  39220. };
  39221. }
  39222. function isRayIntersectsSegment(poi, s_poi, e_poi) {
  39223. if (s_poi[1] == e_poi[1]) {
  39224. return false;
  39225. }
  39226. if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
  39227. return false;
  39228. }
  39229. if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
  39230. return false;
  39231. }
  39232. if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
  39233. return false;
  39234. }
  39235. if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
  39236. return false;
  39237. }
  39238. if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
  39239. return false;
  39240. }
  39241. var xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
  39242. if (xseg < poi[0]) {
  39243. return false;
  39244. } else {
  39245. return true;
  39246. }
  39247. }
  39248. function isPoiWithinPoly(poi, poly, mercator) {
  39249. var sinsc = 0;
  39250. for (var i = 0; i < poly.length; i++) {
  39251. var epoly = poly[i][0];
  39252. if (poly.length == 1) {
  39253. epoly = poly[i][0];
  39254. }
  39255. for (var j = 0; j < epoly.length - 1; j++) {
  39256. var s_poi = epoly[j];
  39257. var e_poi = epoly[j + 1];
  39258. if (mercator) {
  39259. s_poi = lonlat2mercator(epoly[j][0], epoly[j][1]);
  39260. e_poi = lonlat2mercator(epoly[j + 1][0], epoly[j + 1][1]);
  39261. }
  39262. if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
  39263. sinsc += 1;
  39264. }
  39265. }
  39266. }
  39267. if (sinsc % 2 == 1) {
  39268. return true;
  39269. } else {
  39270. return false;
  39271. }
  39272. }
  39273. function drawMapDataPoints(series, opts, config, context) {
  39274. var mapOption = assign({}, {
  39275. border: true,
  39276. mercator: false,
  39277. borderWidth: 1,
  39278. borderColor: '#666666',
  39279. fillOpacity: 0.6,
  39280. activeBorderColor: '#f04864',
  39281. activeFillColor: '#facc14',
  39282. activeFillOpacity: 1
  39283. }, opts.extra.map);
  39284. var coords, point;
  39285. var data = series;
  39286. var bounds = getBoundingBox(data);
  39287. if (mapOption.mercator) {
  39288. var max = lonlat2mercator(bounds.xMax, bounds.yMax);
  39289. var min = lonlat2mercator(bounds.xMin, bounds.yMin);
  39290. bounds.xMax = max[0];
  39291. bounds.yMax = max[1];
  39292. bounds.xMin = min[0];
  39293. bounds.yMin = min[1];
  39294. }
  39295. var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
  39296. var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
  39297. var scale = xScale < yScale ? xScale : yScale;
  39298. var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
  39299. var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
  39300. for (var i = 0; i < data.length; i++) {
  39301. context.beginPath();
  39302. context.setLineWidth(mapOption.borderWidth * opts.pix);
  39303. context.setStrokeStyle(mapOption.borderColor);
  39304. context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
  39305. if (opts.tooltip) {
  39306. if (opts.tooltip.index == i) {
  39307. context.setStrokeStyle(mapOption.activeBorderColor);
  39308. context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
  39309. }
  39310. }
  39311. var coorda = data[i].geometry.coordinates;
  39312. for (var k = 0; k < coorda.length; k++) {
  39313. coords = coorda[k];
  39314. if (coords.length == 1) {
  39315. coords = coords[0];
  39316. }
  39317. for (var j = 0; j < coords.length; j++) {
  39318. var gaosi = Array(2);
  39319. if (mapOption.mercator) {
  39320. gaosi = lonlat2mercator(coords[j][0], coords[j][1]);
  39321. } else {
  39322. gaosi = coords[j];
  39323. }
  39324. point = coordinateToPoint(gaosi[1], gaosi[0], bounds, scale, xoffset, yoffset);
  39325. if (j === 0) {
  39326. context.beginPath();
  39327. context.moveTo(point.x, point.y);
  39328. } else {
  39329. context.lineTo(point.x, point.y);
  39330. }
  39331. }
  39332. context.fill();
  39333. if (mapOption.border == true) {
  39334. context.stroke();
  39335. }
  39336. }
  39337. if (opts.dataLabel == true) {
  39338. var centerPoint = data[i].properties.centroid;
  39339. if (centerPoint) {
  39340. if (mapOption.mercator) {
  39341. centerPoint = lonlat2mercator(data[i].properties.centroid[0], data[i].properties.centroid[1]);
  39342. }
  39343. point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
  39344. var fontSize = data[i].textSize * opts.pix || config.fontSize;
  39345. var text = data[i].properties.name;
  39346. context.beginPath();
  39347. context.setFontSize(fontSize);
  39348. context.setFillStyle(data[i].textColor || opts.fontColor);
  39349. context.fillText(text, point.x - measureText(text, fontSize, context) / 2, point.y + fontSize / 2);
  39350. context.closePath();
  39351. context.stroke();
  39352. }
  39353. }
  39354. }
  39355. opts.chartData.mapData = {
  39356. bounds: bounds,
  39357. scale: scale,
  39358. xoffset: xoffset,
  39359. yoffset: yoffset,
  39360. mercator: mapOption.mercator
  39361. };
  39362. drawToolTipBridge(opts, config, context, 1);
  39363. context.draw();
  39364. }
  39365. function getWordCloudPoint(opts, type, context) {
  39366. var points = opts.series;
  39367. switch (type) {
  39368. case 'normal':
  39369. for (var i = 0; i < points.length; i++) {
  39370. var text = points[i].name;
  39371. var tHeight = points[i].textSize * opts.pix;
  39372. var tWidth = measureText(text, tHeight, context);
  39373. var x = void 0,
  39374. y = void 0;
  39375. var area = void 0;
  39376. var breaknum = 0;
  39377. while (true) {
  39378. breaknum++;
  39379. x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
  39380. y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
  39381. area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
  39382. var isCollision = collisionNew(area, points, opts.width, opts.height);
  39383. if (!isCollision) break;
  39384. if (breaknum == 1000) {
  39385. area = [-100, -100, -100, -100];
  39386. break;
  39387. }
  39388. }
  39389. ;
  39390. points[i].area = area;
  39391. }
  39392. break;
  39393. case 'vertical':
  39394. var Spin = function Spin() {
  39395. //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
  39396. if (Math.random() > 0.7) {
  39397. return true;
  39398. } else {
  39399. return false;
  39400. }
  39401. ;
  39402. };
  39403. ;
  39404. for (var _i27 = 0; _i27 < points.length; _i27++) {
  39405. var _text = points[_i27].name;
  39406. var _tHeight = points[_i27].textSize * opts.pix;
  39407. var _tWidth = measureText(_text, _tHeight, context);
  39408. var isSpin = Spin();
  39409. var _x = void 0,
  39410. _y = void 0,
  39411. _area = void 0,
  39412. areav = void 0;
  39413. var _breaknum = 0;
  39414. while (true) {
  39415. _breaknum++;
  39416. var _isCollision = void 0;
  39417. if (isSpin) {
  39418. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  39419. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  39420. _area = [_y - 5 - _tWidth + opts.width / 2, -_x - 5 + opts.height / 2, _y + 5 + opts.width / 2, -_x + _tHeight + 5 + opts.height / 2];
  39421. 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];
  39422. _isCollision = collisionNew(areav, points, opts.height, opts.width);
  39423. } else {
  39424. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  39425. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  39426. _area = [_x - 5 + opts.width / 2, _y - 5 - _tHeight + opts.height / 2, _x + _tWidth + 5 + opts.width / 2, _y + 5 + opts.height / 2];
  39427. _isCollision = collisionNew(_area, points, opts.width, opts.height);
  39428. }
  39429. if (!_isCollision) break;
  39430. if (_breaknum == 1000) {
  39431. _area = [-1000, -1000, -1000, -1000];
  39432. break;
  39433. }
  39434. }
  39435. ;
  39436. if (isSpin) {
  39437. points[_i27].area = areav;
  39438. points[_i27].areav = _area;
  39439. } else {
  39440. points[_i27].area = _area;
  39441. }
  39442. points[_i27].rotate = isSpin;
  39443. }
  39444. ;
  39445. break;
  39446. }
  39447. return points;
  39448. }
  39449. function drawWordCloudDataPoints(series, opts, config, context) {
  39450. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39451. var wordOption = assign({}, {
  39452. type: 'normal',
  39453. autoColors: true
  39454. }, opts.extra.word);
  39455. if (!opts.chartData.wordCloudData) {
  39456. opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type, context);
  39457. }
  39458. context.beginPath();
  39459. context.setFillStyle(opts.background);
  39460. context.rect(0, 0, opts.width, opts.height);
  39461. context.fill();
  39462. context.save();
  39463. var points = opts.chartData.wordCloudData;
  39464. context.translate(opts.width / 2, opts.height / 2);
  39465. for (var i = 0; i < points.length; i++) {
  39466. context.save();
  39467. if (points[i].rotate) {
  39468. context.rotate(90 * Math.PI / 180);
  39469. }
  39470. var text = points[i].name;
  39471. var tHeight = points[i].textSize * opts.pix;
  39472. var tWidth = measureText(text, tHeight, context);
  39473. context.beginPath();
  39474. context.setStrokeStyle(points[i].color);
  39475. context.setFillStyle(points[i].color);
  39476. context.setFontSize(tHeight);
  39477. if (points[i].rotate) {
  39478. if (points[i].areav[0] > 0) {
  39479. if (opts.tooltip) {
  39480. if (opts.tooltip.index == i) {
  39481. 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);
  39482. } else {
  39483. 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);
  39484. }
  39485. } else {
  39486. 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);
  39487. }
  39488. }
  39489. } else {
  39490. if (points[i].area[0] > 0) {
  39491. if (opts.tooltip) {
  39492. if (opts.tooltip.index == i) {
  39493. 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);
  39494. } else {
  39495. 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);
  39496. }
  39497. } else {
  39498. 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);
  39499. }
  39500. }
  39501. }
  39502. context.stroke();
  39503. context.restore();
  39504. }
  39505. context.restore();
  39506. }
  39507. function drawFunnelDataPoints(series, opts, config, context) {
  39508. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39509. var funnelOption = assign({}, {
  39510. type: 'funnel',
  39511. activeWidth: 10,
  39512. activeOpacity: 0.3,
  39513. border: false,
  39514. borderWidth: 2,
  39515. borderColor: '#FFFFFF',
  39516. fillOpacity: 1,
  39517. labelAlign: 'right',
  39518. linearType: 'none',
  39519. customColor: []
  39520. }, opts.extra.funnel);
  39521. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
  39522. var centerPosition = {
  39523. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39524. y: opts.height - opts.area[2]
  39525. };
  39526. var activeWidth = funnelOption.activeWidth * opts.pix;
  39527. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
  39528. series = getFunnelDataPoints(series, radius, funnelOption.type, eachSpacing, process);
  39529. context.save();
  39530. context.translate(centerPosition.x, centerPosition.y);
  39531. funnelOption.customColor = fillCustomColor(funnelOption.linearType, funnelOption.customColor, series, config);
  39532. if (funnelOption.type == 'pyramid') {
  39533. for (var i = 0; i < series.length; i++) {
  39534. if (i == series.length - 1) {
  39535. if (opts.tooltip) {
  39536. if (opts.tooltip.index == i) {
  39537. context.beginPath();
  39538. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  39539. context.moveTo(-activeWidth, -eachSpacing);
  39540. context.lineTo(-series[i].radius - activeWidth, 0);
  39541. context.lineTo(series[i].radius + activeWidth, 0);
  39542. context.lineTo(activeWidth, -eachSpacing);
  39543. context.lineTo(-activeWidth, -eachSpacing);
  39544. context.closePath();
  39545. context.fill();
  39546. }
  39547. }
  39548. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  39549. context.beginPath();
  39550. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39551. context.setStrokeStyle(funnelOption.borderColor);
  39552. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  39553. if (funnelOption.linearType == 'custom') {
  39554. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  39555. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39556. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  39557. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39558. fillColor = grd;
  39559. }
  39560. context.setFillStyle(fillColor);
  39561. context.moveTo(0, -eachSpacing);
  39562. context.lineTo(-series[i].radius, 0);
  39563. context.lineTo(series[i].radius, 0);
  39564. context.lineTo(0, -eachSpacing);
  39565. context.closePath();
  39566. context.fill();
  39567. if (funnelOption.border == true) {
  39568. context.stroke();
  39569. }
  39570. } else {
  39571. if (opts.tooltip) {
  39572. if (opts.tooltip.index == i) {
  39573. context.beginPath();
  39574. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  39575. context.moveTo(0, 0);
  39576. context.lineTo(-series[i].radius - activeWidth, 0);
  39577. context.lineTo(-series[i + 1].radius - activeWidth, -eachSpacing);
  39578. context.lineTo(series[i + 1].radius + activeWidth, -eachSpacing);
  39579. context.lineTo(series[i].radius + activeWidth, 0);
  39580. context.lineTo(0, 0);
  39581. context.closePath();
  39582. context.fill();
  39583. }
  39584. }
  39585. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  39586. context.beginPath();
  39587. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39588. context.setStrokeStyle(funnelOption.borderColor);
  39589. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  39590. if (funnelOption.linearType == 'custom') {
  39591. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  39592. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39593. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  39594. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39595. fillColor = grd;
  39596. }
  39597. context.setFillStyle(fillColor);
  39598. context.moveTo(0, 0);
  39599. context.lineTo(-series[i].radius, 0);
  39600. context.lineTo(-series[i + 1].radius, -eachSpacing);
  39601. context.lineTo(series[i + 1].radius, -eachSpacing);
  39602. context.lineTo(series[i].radius, 0);
  39603. context.lineTo(0, 0);
  39604. context.closePath();
  39605. context.fill();
  39606. if (funnelOption.border == true) {
  39607. context.stroke();
  39608. }
  39609. }
  39610. context.translate(0, -eachSpacing);
  39611. }
  39612. } else {
  39613. for (var _i28 = 0; _i28 < series.length; _i28++) {
  39614. if (_i28 == 0) {
  39615. if (opts.tooltip) {
  39616. if (opts.tooltip.index == _i28) {
  39617. context.beginPath();
  39618. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  39619. context.moveTo(-activeWidth, 0);
  39620. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  39621. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  39622. context.lineTo(activeWidth, 0);
  39623. context.lineTo(-activeWidth, 0);
  39624. context.closePath();
  39625. context.fill();
  39626. }
  39627. }
  39628. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing, centerPosition.x + series[_i28].radius, centerPosition.y];
  39629. context.beginPath();
  39630. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39631. context.setStrokeStyle(funnelOption.borderColor);
  39632. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  39633. if (funnelOption.linearType == 'custom') {
  39634. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  39635. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39636. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  39637. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39638. fillColor = grd;
  39639. }
  39640. context.setFillStyle(fillColor);
  39641. context.moveTo(0, 0);
  39642. context.lineTo(-series[_i28].radius, -eachSpacing);
  39643. context.lineTo(series[_i28].radius, -eachSpacing);
  39644. context.lineTo(0, 0);
  39645. context.closePath();
  39646. context.fill();
  39647. if (funnelOption.border == true) {
  39648. context.stroke();
  39649. }
  39650. } else {
  39651. if (opts.tooltip) {
  39652. if (opts.tooltip.index == _i28) {
  39653. context.beginPath();
  39654. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  39655. context.moveTo(0, 0);
  39656. context.lineTo(-series[_i28 - 1].radius - activeWidth, 0);
  39657. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  39658. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  39659. context.lineTo(series[_i28 - 1].radius + activeWidth, 0);
  39660. context.lineTo(0, 0);
  39661. context.closePath();
  39662. context.fill();
  39663. }
  39664. }
  39665. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing * (_i28 + 1), centerPosition.x + series[_i28].radius, centerPosition.y - eachSpacing * _i28];
  39666. context.beginPath();
  39667. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39668. context.setStrokeStyle(funnelOption.borderColor);
  39669. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  39670. if (funnelOption.linearType == 'custom') {
  39671. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  39672. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39673. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  39674. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39675. fillColor = grd;
  39676. }
  39677. context.setFillStyle(fillColor);
  39678. context.moveTo(0, 0);
  39679. context.lineTo(-series[_i28 - 1].radius, 0);
  39680. context.lineTo(-series[_i28].radius, -eachSpacing);
  39681. context.lineTo(series[_i28].radius, -eachSpacing);
  39682. context.lineTo(series[_i28 - 1].radius, 0);
  39683. context.lineTo(0, 0);
  39684. context.closePath();
  39685. context.fill();
  39686. if (funnelOption.border == true) {
  39687. context.stroke();
  39688. }
  39689. }
  39690. context.translate(0, -eachSpacing);
  39691. }
  39692. }
  39693. context.restore();
  39694. if (opts.dataLabel !== false && process === 1) {
  39695. drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
  39696. }
  39697. return {
  39698. center: centerPosition,
  39699. radius: radius,
  39700. series: series
  39701. };
  39702. }
  39703. function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
  39704. for (var i = 0; i < series.length; i++) {
  39705. var item = series[i];
  39706. var startX = void 0,
  39707. endX = void 0,
  39708. startY = void 0,
  39709. fontSize = void 0;
  39710. var text = item.formatter ? item.formatter(item, i, series) : util.toFixed(item._proportion_ * 100) + '%';
  39711. if (labelAlign == 'right') {
  39712. if (opts.extra.funnel.type === 'pyramid') {
  39713. if (i == series.length - 1) {
  39714. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  39715. } else {
  39716. startX = (item.funnelArea[2] + series[i + 1].funnelArea[2]) / 2;
  39717. }
  39718. } else {
  39719. if (i == 0) {
  39720. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  39721. } else {
  39722. startX = (item.funnelArea[2] + series[i - 1].funnelArea[2]) / 2;
  39723. }
  39724. }
  39725. endX = startX + activeWidth * 2;
  39726. startY = item.funnelArea[1] + eachSpacing / 2;
  39727. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  39728. context.setLineWidth(1 * opts.pix);
  39729. context.setStrokeStyle(item.color);
  39730. context.setFillStyle(item.color);
  39731. context.beginPath();
  39732. context.moveTo(startX, startY);
  39733. context.lineTo(endX, startY);
  39734. context.stroke();
  39735. context.closePath();
  39736. context.beginPath();
  39737. context.moveTo(endX, startY);
  39738. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  39739. context.closePath();
  39740. context.fill();
  39741. context.beginPath();
  39742. context.setFontSize(fontSize);
  39743. context.setFillStyle(item.textColor || opts.fontColor);
  39744. context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
  39745. context.closePath();
  39746. context.stroke();
  39747. context.closePath();
  39748. } else {
  39749. if (opts.extra.funnel.type === 'pyramid') {
  39750. if (i == series.length - 1) {
  39751. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  39752. } else {
  39753. startX = (item.funnelArea[0] + series[i + 1].funnelArea[0]) / 2;
  39754. }
  39755. } else {
  39756. if (i == 0) {
  39757. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  39758. } else {
  39759. startX = (item.funnelArea[0] + series[i - 1].funnelArea[0]) / 2;
  39760. }
  39761. }
  39762. endX = startX - activeWidth * 2;
  39763. startY = item.funnelArea[1] + eachSpacing / 2;
  39764. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  39765. context.setLineWidth(1 * opts.pix);
  39766. context.setStrokeStyle(item.color);
  39767. context.setFillStyle(item.color);
  39768. context.beginPath();
  39769. context.moveTo(startX, startY);
  39770. context.lineTo(endX, startY);
  39771. context.stroke();
  39772. context.closePath();
  39773. context.beginPath();
  39774. context.moveTo(endX, startY);
  39775. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  39776. context.closePath();
  39777. context.fill();
  39778. context.beginPath();
  39779. context.setFontSize(fontSize);
  39780. context.setFillStyle(item.textColor || opts.fontColor);
  39781. context.fillText(text, endX - 5 - measureText(text, fontSize, context), startY + fontSize / 2 - 2);
  39782. context.closePath();
  39783. context.stroke();
  39784. context.closePath();
  39785. }
  39786. }
  39787. }
  39788. function drawCanvas(opts, context) {
  39789. context.draw();
  39790. }
  39791. var Timing = {
  39792. easeIn: function easeIn(pos) {
  39793. return Math.pow(pos, 3);
  39794. },
  39795. easeOut: function easeOut(pos) {
  39796. return Math.pow(pos - 1, 3) + 1;
  39797. },
  39798. easeInOut: function easeInOut(pos) {
  39799. if ((pos /= 0.5) < 1) {
  39800. return 0.5 * Math.pow(pos, 3);
  39801. } else {
  39802. return 0.5 * (Math.pow(pos - 2, 3) + 2);
  39803. }
  39804. },
  39805. linear: function linear(pos) {
  39806. return pos;
  39807. }
  39808. };
  39809. function Animation(opts) {
  39810. this.isStop = false;
  39811. opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
  39812. opts.timing = opts.timing || 'easeInOut';
  39813. var delay = 17;
  39814. function createAnimationFrame() {
  39815. if (typeof setTimeout !== 'undefined') {
  39816. return function (step, delay) {
  39817. setTimeout(function () {
  39818. var timeStamp = +new Date();
  39819. step(timeStamp);
  39820. }, delay);
  39821. };
  39822. } else if (typeof requestAnimationFrame !== 'undefined') {
  39823. return requestAnimationFrame;
  39824. } else {
  39825. return function (step) {
  39826. step(null);
  39827. };
  39828. }
  39829. }
  39830. ;
  39831. var animationFrame = createAnimationFrame();
  39832. var startTimeStamp = null;
  39833. var _step = function step(timestamp) {
  39834. if (timestamp === null || this.isStop === true) {
  39835. opts.onProcess && opts.onProcess(1);
  39836. opts.onAnimationFinish && opts.onAnimationFinish();
  39837. return;
  39838. }
  39839. if (startTimeStamp === null) {
  39840. startTimeStamp = timestamp;
  39841. }
  39842. if (timestamp - startTimeStamp < opts.duration) {
  39843. var process = (timestamp - startTimeStamp) / opts.duration;
  39844. var timingFunction = Timing[opts.timing];
  39845. process = timingFunction(process);
  39846. opts.onProcess && opts.onProcess(process);
  39847. animationFrame(_step, delay);
  39848. } else {
  39849. opts.onProcess && opts.onProcess(1);
  39850. opts.onAnimationFinish && opts.onAnimationFinish();
  39851. }
  39852. };
  39853. _step = _step.bind(this);
  39854. animationFrame(_step, delay);
  39855. }
  39856. Animation.prototype.stop = function () {
  39857. this.isStop = true;
  39858. };
  39859. function drawCharts(type, opts, config, context) {
  39860. var _this = this;
  39861. var series = opts.series;
  39862. //兼容ECharts饼图类数据格式
  39863. if (type === 'pie' || type === 'ring' || type === 'rose' || type === 'funnel') {
  39864. series = fixPieSeries(series, opts, config);
  39865. }
  39866. var categories = opts.categories;
  39867. series = fillSeries(series, opts, config);
  39868. var duration = opts.animation ? opts.duration : 0;
  39869. _this.animationInstance && _this.animationInstance.stop();
  39870. var seriesMA = null;
  39871. if (type == 'candle') {
  39872. var average = assign({}, opts.extra.candle.average);
  39873. if (average.show) {
  39874. seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
  39875. seriesMA = fillSeries(seriesMA, opts, config);
  39876. opts.seriesMA = seriesMA;
  39877. } else if (opts.seriesMA) {
  39878. seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
  39879. } else {
  39880. seriesMA = series;
  39881. }
  39882. } else {
  39883. seriesMA = series;
  39884. }
  39885. /* 过滤掉show=false的series */
  39886. opts._series_ = series = filterSeries(series);
  39887. //重新计算图表区域
  39888. opts.area = new Array(4);
  39889. //复位绘图区域
  39890. for (var j = 0; j < 4; j++) {
  39891. opts.area[j] = opts.padding[j] * opts.pix;
  39892. }
  39893. //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
  39894. var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData, context),
  39895. legendHeight = _calLegendData.area.wholeHeight,
  39896. legendWidth = _calLegendData.area.wholeWidth;
  39897. switch (opts.legend.position) {
  39898. case 'top':
  39899. opts.area[0] += legendHeight;
  39900. break;
  39901. case 'bottom':
  39902. opts.area[2] += legendHeight;
  39903. break;
  39904. case 'left':
  39905. opts.area[3] += legendWidth;
  39906. break;
  39907. case 'right':
  39908. opts.area[1] += legendWidth;
  39909. break;
  39910. }
  39911. var _calYAxisData = {},
  39912. yAxisWidth = 0;
  39913. 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') {
  39914. _calYAxisData = calYAxisData(series, opts, config, context);
  39915. yAxisWidth = _calYAxisData.yAxisWidth;
  39916. //如果显示Y轴标题
  39917. if (opts.yAxis.showTitle) {
  39918. var maxTitleHeight = 0;
  39919. for (var i = 0; i < opts.yAxis.data.length; i++) {
  39920. maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize * opts.pix : config.fontSize);
  39921. }
  39922. opts.area[0] += maxTitleHeight;
  39923. }
  39924. var rightIndex = 0,
  39925. leftIndex = 0;
  39926. //计算主绘图区域左右位置
  39927. for (var _i29 = 0; _i29 < yAxisWidth.length; _i29++) {
  39928. if (yAxisWidth[_i29].position == 'left') {
  39929. if (leftIndex > 0) {
  39930. opts.area[3] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39931. } else {
  39932. opts.area[3] += yAxisWidth[_i29].width;
  39933. }
  39934. leftIndex += 1;
  39935. } else if (yAxisWidth[_i29].position == 'right') {
  39936. if (rightIndex > 0) {
  39937. opts.area[1] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39938. } else {
  39939. opts.area[1] += yAxisWidth[_i29].width;
  39940. }
  39941. rightIndex += 1;
  39942. }
  39943. }
  39944. } else {
  39945. config.yAxisWidth = yAxisWidth;
  39946. }
  39947. opts.chartData.yAxisData = _calYAxisData;
  39948. if (opts.categories && opts.categories.length && opts.type !== 'radar' && opts.type !== 'gauge' && opts.type !== 'bar') {
  39949. opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
  39950. var _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39951. xAxisHeight = _calCategoriesData.xAxisHeight,
  39952. angle = _calCategoriesData.angle;
  39953. config.xAxisHeight = xAxisHeight;
  39954. config._xAxisTextAngle_ = angle;
  39955. opts.area[2] += xAxisHeight;
  39956. opts.chartData.categoriesData = _calCategoriesData;
  39957. } else {
  39958. if (opts.type === 'line' || opts.type === 'area' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  39959. opts.chartData.xAxisData = calXAxisData(series, opts, config, context);
  39960. categories = opts.chartData.xAxisData.rangesFormat;
  39961. var _calCategoriesData2 = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39962. _xAxisHeight = _calCategoriesData2.xAxisHeight,
  39963. _angle = _calCategoriesData2.angle;
  39964. config.xAxisHeight = _xAxisHeight;
  39965. config._xAxisTextAngle_ = _angle;
  39966. opts.area[2] += _xAxisHeight;
  39967. opts.chartData.categoriesData = _calCategoriesData2;
  39968. } else {
  39969. opts.chartData.xAxisData = {
  39970. xAxisPoints: []
  39971. };
  39972. }
  39973. }
  39974. //计算右对齐偏移距离
  39975. if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
  39976. var offsetLeft = 0,
  39977. xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  39978. startX = opts.chartData.xAxisData.startX,
  39979. endX = opts.chartData.xAxisData.endX,
  39980. eachSpacing = opts.chartData.xAxisData.eachSpacing;
  39981. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  39982. var screenWidth = endX - startX;
  39983. offsetLeft = screenWidth - totalWidth;
  39984. _this.scrollOption = {
  39985. currentOffset: offsetLeft,
  39986. startTouchX: offsetLeft,
  39987. distance: 0,
  39988. lastMoveTime: 0
  39989. };
  39990. opts._scrollDistance_ = offsetLeft;
  39991. }
  39992. if (type === 'pie' || type === 'ring' || type === 'rose') {
  39993. config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA, config, context, opts);
  39994. }
  39995. switch (type) {
  39996. case 'word':
  39997. this.animationInstance = new Animation({
  39998. timing: opts.timing,
  39999. duration: duration,
  40000. onProcess: function onProcess(process) {
  40001. context.clearRect(0, 0, opts.width, opts.height);
  40002. if (opts.rotate) {
  40003. contextRotate(context, opts);
  40004. }
  40005. drawWordCloudDataPoints(series, opts, config, context, process);
  40006. drawCanvas(opts, context);
  40007. },
  40008. onAnimationFinish: function onAnimationFinish() {
  40009. _this.uevent.trigger('renderComplete');
  40010. }
  40011. });
  40012. break;
  40013. case 'map':
  40014. context.clearRect(0, 0, opts.width, opts.height);
  40015. drawMapDataPoints(series, opts, config, context);
  40016. break;
  40017. case 'funnel':
  40018. this.animationInstance = new Animation({
  40019. timing: opts.timing,
  40020. duration: duration,
  40021. onProcess: function onProcess(process) {
  40022. context.clearRect(0, 0, opts.width, opts.height);
  40023. if (opts.rotate) {
  40024. contextRotate(context, opts);
  40025. }
  40026. opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
  40027. drawLegend(opts.series, opts, config, context, opts.chartData);
  40028. drawToolTipBridge(opts, config, context, process);
  40029. drawCanvas(opts, context);
  40030. },
  40031. onAnimationFinish: function onAnimationFinish() {
  40032. _this.uevent.trigger('renderComplete');
  40033. }
  40034. });
  40035. break;
  40036. case 'line':
  40037. this.animationInstance = new Animation({
  40038. timing: opts.timing,
  40039. duration: duration,
  40040. onProcess: function onProcess(process) {
  40041. context.clearRect(0, 0, opts.width, opts.height);
  40042. if (opts.rotate) {
  40043. contextRotate(context, opts);
  40044. }
  40045. drawYAxisGrid(categories, opts, config, context);
  40046. drawXAxis(categories, opts, config, context);
  40047. var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
  40048. xAxisPoints = _drawLineDataPoints.xAxisPoints,
  40049. calPoints = _drawLineDataPoints.calPoints,
  40050. eachSpacing = _drawLineDataPoints.eachSpacing;
  40051. opts.chartData.xAxisPoints = xAxisPoints;
  40052. opts.chartData.calPoints = calPoints;
  40053. opts.chartData.eachSpacing = eachSpacing;
  40054. drawYAxis(series, opts, config, context);
  40055. if (opts.enableMarkLine !== false && process === 1) {
  40056. drawMarkLine(opts, config, context);
  40057. }
  40058. drawLegend(opts.series, opts, config, context, opts.chartData);
  40059. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40060. drawCanvas(opts, context);
  40061. },
  40062. onAnimationFinish: function onAnimationFinish() {
  40063. _this.uevent.trigger('renderComplete');
  40064. }
  40065. });
  40066. break;
  40067. case 'scatter':
  40068. this.animationInstance = new Animation({
  40069. timing: opts.timing,
  40070. duration: duration,
  40071. onProcess: function onProcess(process) {
  40072. context.clearRect(0, 0, opts.width, opts.height);
  40073. if (opts.rotate) {
  40074. contextRotate(context, opts);
  40075. }
  40076. drawYAxisGrid(categories, opts, config, context);
  40077. drawXAxis(categories, opts, config, context);
  40078. var _drawScatterDataPoints = drawScatterDataPoints(series, opts, config, context, process),
  40079. xAxisPoints = _drawScatterDataPoints.xAxisPoints,
  40080. calPoints = _drawScatterDataPoints.calPoints,
  40081. eachSpacing = _drawScatterDataPoints.eachSpacing;
  40082. opts.chartData.xAxisPoints = xAxisPoints;
  40083. opts.chartData.calPoints = calPoints;
  40084. opts.chartData.eachSpacing = eachSpacing;
  40085. drawYAxis(series, opts, config, context);
  40086. if (opts.enableMarkLine !== false && process === 1) {
  40087. drawMarkLine(opts, config, context);
  40088. }
  40089. drawLegend(opts.series, opts, config, context, opts.chartData);
  40090. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40091. drawCanvas(opts, context);
  40092. },
  40093. onAnimationFinish: function onAnimationFinish() {
  40094. _this.uevent.trigger('renderComplete');
  40095. }
  40096. });
  40097. break;
  40098. case 'bubble':
  40099. this.animationInstance = new Animation({
  40100. timing: opts.timing,
  40101. duration: duration,
  40102. onProcess: function onProcess(process) {
  40103. context.clearRect(0, 0, opts.width, opts.height);
  40104. if (opts.rotate) {
  40105. contextRotate(context, opts);
  40106. }
  40107. drawYAxisGrid(categories, opts, config, context);
  40108. drawXAxis(categories, opts, config, context);
  40109. var _drawBubbleDataPoints = drawBubbleDataPoints(series, opts, config, context, process),
  40110. xAxisPoints = _drawBubbleDataPoints.xAxisPoints,
  40111. calPoints = _drawBubbleDataPoints.calPoints,
  40112. eachSpacing = _drawBubbleDataPoints.eachSpacing;
  40113. opts.chartData.xAxisPoints = xAxisPoints;
  40114. opts.chartData.calPoints = calPoints;
  40115. opts.chartData.eachSpacing = eachSpacing;
  40116. drawYAxis(series, opts, config, context);
  40117. if (opts.enableMarkLine !== false && process === 1) {
  40118. drawMarkLine(opts, config, context);
  40119. }
  40120. drawLegend(opts.series, opts, config, context, opts.chartData);
  40121. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40122. drawCanvas(opts, context);
  40123. },
  40124. onAnimationFinish: function onAnimationFinish() {
  40125. _this.uevent.trigger('renderComplete');
  40126. }
  40127. });
  40128. break;
  40129. case 'mix':
  40130. this.animationInstance = new Animation({
  40131. timing: opts.timing,
  40132. duration: duration,
  40133. onProcess: function onProcess(process) {
  40134. context.clearRect(0, 0, opts.width, opts.height);
  40135. if (opts.rotate) {
  40136. contextRotate(context, opts);
  40137. }
  40138. drawYAxisGrid(categories, opts, config, context);
  40139. drawXAxis(categories, opts, config, context);
  40140. var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
  40141. xAxisPoints = _drawMixDataPoints.xAxisPoints,
  40142. calPoints = _drawMixDataPoints.calPoints,
  40143. eachSpacing = _drawMixDataPoints.eachSpacing;
  40144. opts.chartData.xAxisPoints = xAxisPoints;
  40145. opts.chartData.calPoints = calPoints;
  40146. opts.chartData.eachSpacing = eachSpacing;
  40147. drawYAxis(series, opts, config, context);
  40148. if (opts.enableMarkLine !== false && process === 1) {
  40149. drawMarkLine(opts, config, context);
  40150. }
  40151. drawLegend(opts.series, opts, config, context, opts.chartData);
  40152. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40153. drawCanvas(opts, context);
  40154. },
  40155. onAnimationFinish: function onAnimationFinish() {
  40156. _this.uevent.trigger('renderComplete');
  40157. }
  40158. });
  40159. break;
  40160. case 'column':
  40161. this.animationInstance = new Animation({
  40162. timing: opts.timing,
  40163. duration: duration,
  40164. onProcess: function onProcess(process) {
  40165. context.clearRect(0, 0, opts.width, opts.height);
  40166. if (opts.rotate) {
  40167. contextRotate(context, opts);
  40168. }
  40169. drawYAxisGrid(categories, opts, config, context);
  40170. drawXAxis(categories, opts, config, context);
  40171. var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
  40172. xAxisPoints = _drawColumnDataPoints.xAxisPoints,
  40173. calPoints = _drawColumnDataPoints.calPoints,
  40174. eachSpacing = _drawColumnDataPoints.eachSpacing;
  40175. opts.chartData.xAxisPoints = xAxisPoints;
  40176. opts.chartData.calPoints = calPoints;
  40177. opts.chartData.eachSpacing = eachSpacing;
  40178. drawYAxis(series, opts, config, context);
  40179. if (opts.enableMarkLine !== false && process === 1) {
  40180. drawMarkLine(opts, config, context);
  40181. }
  40182. drawLegend(opts.series, opts, config, context, opts.chartData);
  40183. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40184. drawCanvas(opts, context);
  40185. },
  40186. onAnimationFinish: function onAnimationFinish() {
  40187. _this.uevent.trigger('renderComplete');
  40188. }
  40189. });
  40190. break;
  40191. case 'bar':
  40192. this.animationInstance = new Animation({
  40193. timing: opts.timing,
  40194. duration: duration,
  40195. onProcess: function onProcess(process) {
  40196. context.clearRect(0, 0, opts.width, opts.height);
  40197. if (opts.rotate) {
  40198. contextRotate(context, opts);
  40199. }
  40200. drawXAxis(categories, opts, config, context);
  40201. var _drawBarDataPoints = drawBarDataPoints(series, opts, config, context, process),
  40202. yAxisPoints = _drawBarDataPoints.yAxisPoints,
  40203. calPoints = _drawBarDataPoints.calPoints,
  40204. eachSpacing = _drawBarDataPoints.eachSpacing;
  40205. opts.chartData.yAxisPoints = yAxisPoints;
  40206. opts.chartData.xAxisPoints = opts.chartData.xAxisData.xAxisPoints;
  40207. opts.chartData.calPoints = calPoints;
  40208. opts.chartData.eachSpacing = eachSpacing;
  40209. drawYAxis(series, opts, config, context);
  40210. if (opts.enableMarkLine !== false && process === 1) {
  40211. drawMarkLine(opts, config, context);
  40212. }
  40213. drawLegend(opts.series, opts, config, context, opts.chartData);
  40214. drawToolTipBridge(opts, config, context, process, eachSpacing, yAxisPoints);
  40215. drawCanvas(opts, context);
  40216. },
  40217. onAnimationFinish: function onAnimationFinish() {
  40218. _this.uevent.trigger('renderComplete');
  40219. }
  40220. });
  40221. break;
  40222. case 'area':
  40223. this.animationInstance = new Animation({
  40224. timing: opts.timing,
  40225. duration: duration,
  40226. onProcess: function onProcess(process) {
  40227. context.clearRect(0, 0, opts.width, opts.height);
  40228. if (opts.rotate) {
  40229. contextRotate(context, opts);
  40230. }
  40231. drawYAxisGrid(categories, opts, config, context);
  40232. drawXAxis(categories, opts, config, context);
  40233. var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
  40234. xAxisPoints = _drawAreaDataPoints.xAxisPoints,
  40235. calPoints = _drawAreaDataPoints.calPoints,
  40236. eachSpacing = _drawAreaDataPoints.eachSpacing;
  40237. opts.chartData.xAxisPoints = xAxisPoints;
  40238. opts.chartData.calPoints = calPoints;
  40239. opts.chartData.eachSpacing = eachSpacing;
  40240. drawYAxis(series, opts, config, context);
  40241. if (opts.enableMarkLine !== false && process === 1) {
  40242. drawMarkLine(opts, config, context);
  40243. }
  40244. drawLegend(opts.series, opts, config, context, opts.chartData);
  40245. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40246. drawCanvas(opts, context);
  40247. },
  40248. onAnimationFinish: function onAnimationFinish() {
  40249. _this.uevent.trigger('renderComplete');
  40250. }
  40251. });
  40252. break;
  40253. case 'ring':
  40254. case 'pie':
  40255. this.animationInstance = new Animation({
  40256. timing: opts.timing,
  40257. duration: duration,
  40258. onProcess: function onProcess(process) {
  40259. context.clearRect(0, 0, opts.width, opts.height);
  40260. if (opts.rotate) {
  40261. contextRotate(context, opts);
  40262. }
  40263. opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
  40264. drawLegend(opts.series, opts, config, context, opts.chartData);
  40265. drawToolTipBridge(opts, config, context, process);
  40266. drawCanvas(opts, context);
  40267. },
  40268. onAnimationFinish: function onAnimationFinish() {
  40269. _this.uevent.trigger('renderComplete');
  40270. }
  40271. });
  40272. break;
  40273. case 'rose':
  40274. this.animationInstance = new Animation({
  40275. timing: opts.timing,
  40276. duration: duration,
  40277. onProcess: function onProcess(process) {
  40278. context.clearRect(0, 0, opts.width, opts.height);
  40279. if (opts.rotate) {
  40280. contextRotate(context, opts);
  40281. }
  40282. opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
  40283. drawLegend(opts.series, opts, config, context, opts.chartData);
  40284. drawToolTipBridge(opts, config, context, process);
  40285. drawCanvas(opts, context);
  40286. },
  40287. onAnimationFinish: function onAnimationFinish() {
  40288. _this.uevent.trigger('renderComplete');
  40289. }
  40290. });
  40291. break;
  40292. case 'radar':
  40293. this.animationInstance = new Animation({
  40294. timing: opts.timing,
  40295. duration: duration,
  40296. onProcess: function onProcess(process) {
  40297. context.clearRect(0, 0, opts.width, opts.height);
  40298. if (opts.rotate) {
  40299. contextRotate(context, opts);
  40300. }
  40301. opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
  40302. drawLegend(opts.series, opts, config, context, opts.chartData);
  40303. drawToolTipBridge(opts, config, context, process);
  40304. drawCanvas(opts, context);
  40305. },
  40306. onAnimationFinish: function onAnimationFinish() {
  40307. _this.uevent.trigger('renderComplete');
  40308. }
  40309. });
  40310. break;
  40311. case 'arcbar':
  40312. this.animationInstance = new Animation({
  40313. timing: opts.timing,
  40314. duration: duration,
  40315. onProcess: function onProcess(process) {
  40316. context.clearRect(0, 0, opts.width, opts.height);
  40317. if (opts.rotate) {
  40318. contextRotate(context, opts);
  40319. }
  40320. opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
  40321. drawCanvas(opts, context);
  40322. },
  40323. onAnimationFinish: function onAnimationFinish() {
  40324. _this.uevent.trigger('renderComplete');
  40325. }
  40326. });
  40327. break;
  40328. case 'gauge':
  40329. this.animationInstance = new Animation({
  40330. timing: opts.timing,
  40331. duration: duration,
  40332. onProcess: function onProcess(process) {
  40333. context.clearRect(0, 0, opts.width, opts.height);
  40334. if (opts.rotate) {
  40335. contextRotate(context, opts);
  40336. }
  40337. opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
  40338. drawCanvas(opts, context);
  40339. },
  40340. onAnimationFinish: function onAnimationFinish() {
  40341. _this.uevent.trigger('renderComplete');
  40342. }
  40343. });
  40344. break;
  40345. case 'candle':
  40346. this.animationInstance = new Animation({
  40347. timing: opts.timing,
  40348. duration: duration,
  40349. onProcess: function onProcess(process) {
  40350. context.clearRect(0, 0, opts.width, opts.height);
  40351. if (opts.rotate) {
  40352. contextRotate(context, opts);
  40353. }
  40354. drawYAxisGrid(categories, opts, config, context);
  40355. drawXAxis(categories, opts, config, context);
  40356. var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
  40357. xAxisPoints = _drawCandleDataPoints.xAxisPoints,
  40358. calPoints = _drawCandleDataPoints.calPoints,
  40359. eachSpacing = _drawCandleDataPoints.eachSpacing;
  40360. opts.chartData.xAxisPoints = xAxisPoints;
  40361. opts.chartData.calPoints = calPoints;
  40362. opts.chartData.eachSpacing = eachSpacing;
  40363. drawYAxis(series, opts, config, context);
  40364. if (opts.enableMarkLine !== false && process === 1) {
  40365. drawMarkLine(opts, config, context);
  40366. }
  40367. if (seriesMA) {
  40368. drawLegend(seriesMA, opts, config, context, opts.chartData);
  40369. } else {
  40370. drawLegend(opts.series, opts, config, context, opts.chartData);
  40371. }
  40372. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40373. drawCanvas(opts, context);
  40374. },
  40375. onAnimationFinish: function onAnimationFinish() {
  40376. _this.uevent.trigger('renderComplete');
  40377. }
  40378. });
  40379. break;
  40380. }
  40381. }
  40382. function uChartsEvent() {
  40383. this.events = {};
  40384. }
  40385. uChartsEvent.prototype.addEventListener = function (type, listener) {
  40386. this.events[type] = this.events[type] || [];
  40387. this.events[type].push(listener);
  40388. };
  40389. uChartsEvent.prototype.delEventListener = function (type) {
  40390. this.events[type] = [];
  40391. };
  40392. uChartsEvent.prototype.trigger = function () {
  40393. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  40394. args[_key] = arguments[_key];
  40395. }
  40396. var type = args[0];
  40397. var params = args.slice(1);
  40398. if (!!this.events[type]) {
  40399. this.events[type].forEach(function (listener) {
  40400. try {
  40401. listener.apply(null, params);
  40402. } catch (e) {
  40403. //console.log('[uCharts] '+e);
  40404. }
  40405. });
  40406. }
  40407. };
  40408. var uCharts = function uCharts(opts) {
  40409. opts.pix = opts.pixelRatio ? opts.pixelRatio : 1;
  40410. opts.fontSize = opts.fontSize ? opts.fontSize : 13;
  40411. opts.fontColor = opts.fontColor ? opts.fontColor : config.fontColor;
  40412. if (opts.background == "" || opts.background == "none") {
  40413. opts.background = "#FFFFFF";
  40414. }
  40415. opts.title = assign({}, opts.title);
  40416. opts.subtitle = assign({}, opts.subtitle);
  40417. opts.duration = opts.duration ? opts.duration : 1000;
  40418. opts.yAxis = assign({}, {
  40419. data: [],
  40420. showTitle: false,
  40421. disabled: false,
  40422. disableGrid: false,
  40423. splitNumber: 5,
  40424. gridType: 'solid',
  40425. dashLength: 4 * opts.pix,
  40426. gridColor: '#cccccc',
  40427. padding: 10,
  40428. fontColor: '#666666'
  40429. }, opts.yAxis);
  40430. opts.xAxis = assign({}, {
  40431. rotateLabel: false,
  40432. disabled: false,
  40433. disableGrid: false,
  40434. splitNumber: 5,
  40435. calibration: false,
  40436. gridType: 'solid',
  40437. dashLength: 4,
  40438. scrollAlign: 'left',
  40439. boundaryGap: 'center',
  40440. axisLine: true,
  40441. axisLineColor: '#cccccc'
  40442. }, opts.xAxis);
  40443. opts.xAxis.scrollPosition = opts.xAxis.scrollAlign;
  40444. opts.legend = assign({}, {
  40445. show: true,
  40446. position: 'bottom',
  40447. float: 'center',
  40448. backgroundColor: 'rgba(0,0,0,0)',
  40449. borderColor: 'rgba(0,0,0,0)',
  40450. borderWidth: 0,
  40451. padding: 5,
  40452. margin: 5,
  40453. itemGap: 10,
  40454. fontSize: opts.fontSize,
  40455. lineHeight: opts.fontSize,
  40456. fontColor: opts.fontColor,
  40457. formatter: {},
  40458. hiddenColor: '#CECECE'
  40459. }, opts.legend);
  40460. opts.extra = assign({}, opts.extra);
  40461. opts.rotate = opts.rotate ? true : false;
  40462. opts.animation = opts.animation ? true : false;
  40463. opts.rotate = opts.rotate ? true : false;
  40464. opts.canvas2d = opts.canvas2d ? true : false;
  40465. var config$$1 = JSON.parse(JSON.stringify(config));
  40466. config$$1.color = opts.color ? opts.color : config$$1.color;
  40467. config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
  40468. if (opts.type == 'pie') {
  40469. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40470. }
  40471. if (opts.type == 'ring') {
  40472. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.ring.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40473. }
  40474. if (opts.type == 'rose') {
  40475. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40476. }
  40477. config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pix;
  40478. config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
  40479. //屏幕旋转
  40480. config$$1.rotate = opts.rotate;
  40481. if (opts.rotate) {
  40482. var tempWidth = opts.width;
  40483. var tempHeight = opts.height;
  40484. opts.width = tempHeight;
  40485. opts.height = tempWidth;
  40486. }
  40487. //适配高分屏
  40488. opts.padding = opts.padding ? opts.padding : config$$1.padding;
  40489. config$$1.yAxisWidth = config.yAxisWidth * opts.pix;
  40490. config$$1.xAxisHeight = config.xAxisHeight * opts.pix;
  40491. if (opts.enableScroll && opts.xAxis.scrollShow) {
  40492. config$$1.xAxisHeight += 6 * opts.pix;
  40493. }
  40494. config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pix;
  40495. config$$1.fontSize = opts.fontSize * opts.pix;
  40496. config$$1.titleFontSize = config.titleFontSize * opts.pix;
  40497. config$$1.subtitleFontSize = config.subtitleFontSize * opts.pix;
  40498. config$$1.toolTipPadding = config.toolTipPadding * opts.pix;
  40499. config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pix;
  40500. config$$1.columePadding = config.columePadding * opts.pix;
  40501. //this.context = opts.context ? opts.context : uni.createCanvasContext(opts.canvasId, opts.$this);
  40502. //v2.0版本后需要自行获取context并传入opts进行初始化,这么做是为了确保uCharts可以跨更多端使用,并保证了自定义组件this实例不被循环嵌套。如果您觉得不便请取消上面注释,采用v1.0版本的方式使用,对此给您带来的不便敬请谅解!
  40503. if (!opts.context) {
  40504. throw new Error('[uCharts] 未获取到context!注意:v2.0版本后,需要自行获取canvas的绘图上下文并传入opts.context!');
  40505. }
  40506. this.context = opts.context;
  40507. if (!this.context.setTextAlign) {
  40508. this.context.setStrokeStyle = function (e) {
  40509. return this.strokeStyle = e;
  40510. };
  40511. this.context.setLineWidth = function (e) {
  40512. return this.lineWidth = e;
  40513. };
  40514. this.context.setLineCap = function (e) {
  40515. return this.lineCap = e;
  40516. };
  40517. this.context.setFontSize = function (e) {
  40518. return this.font = e + "px sans-serif";
  40519. };
  40520. this.context.setFillStyle = function (e) {
  40521. return this.fillStyle = e;
  40522. };
  40523. this.context.setTextAlign = function (e) {
  40524. return this.textAlign = e;
  40525. };
  40526. this.context.draw = function () {};
  40527. }
  40528. //兼容NVUEsetLineDash
  40529. if (!this.context.setLineDash) {
  40530. this.context.setLineDash = function (e) {};
  40531. }
  40532. opts.chartData = {};
  40533. this.uevent = new uChartsEvent();
  40534. this.scrollOption = {
  40535. currentOffset: 0,
  40536. startTouchX: 0,
  40537. distance: 0,
  40538. lastMoveTime: 0
  40539. };
  40540. this.opts = opts;
  40541. this.config = config$$1;
  40542. drawCharts.call(this, opts.type, opts, config$$1, this.context);
  40543. };
  40544. uCharts.prototype.updateData = function () {
  40545. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  40546. this.opts = assign({}, this.opts, data);
  40547. this.opts.updateData = true;
  40548. var scrollPosition = data.scrollPosition || 'current';
  40549. switch (scrollPosition) {
  40550. case 'current':
  40551. //this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  40552. break;
  40553. case 'left':
  40554. this.opts._scrollDistance_ = 0;
  40555. this.scrollOption = {
  40556. currentOffset: 0,
  40557. startTouchX: 0,
  40558. distance: 0,
  40559. lastMoveTime: 0
  40560. };
  40561. break;
  40562. case 'right':
  40563. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  40564. yAxisWidth = _calYAxisData.yAxisWidth;
  40565. this.config.yAxisWidth = yAxisWidth;
  40566. var offsetLeft = 0;
  40567. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  40568. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  40569. startX = _getXAxisPoints0.startX,
  40570. endX = _getXAxisPoints0.endX,
  40571. eachSpacing = _getXAxisPoints0.eachSpacing;
  40572. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  40573. var screenWidth = endX - startX;
  40574. offsetLeft = screenWidth - totalWidth;
  40575. this.scrollOption = {
  40576. currentOffset: offsetLeft,
  40577. startTouchX: offsetLeft,
  40578. distance: 0,
  40579. lastMoveTime: 0
  40580. };
  40581. this.opts._scrollDistance_ = offsetLeft;
  40582. break;
  40583. }
  40584. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40585. };
  40586. uCharts.prototype.zoom = function () {
  40587. var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
  40588. if (this.opts.enableScroll !== true) {
  40589. console.log('[uCharts] 请启用滚动条后使用');
  40590. return;
  40591. }
  40592. //当前屏幕中间点
  40593. var centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
  40594. this.opts.animation = false;
  40595. this.opts.xAxis.itemCount = val.itemCount;
  40596. //重新计算x轴偏移距离
  40597. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  40598. yAxisWidth = _calYAxisData.yAxisWidth;
  40599. this.config.yAxisWidth = yAxisWidth;
  40600. var offsetLeft = 0;
  40601. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  40602. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  40603. startX = _getXAxisPoints0.startX,
  40604. endX = _getXAxisPoints0.endX,
  40605. eachSpacing = _getXAxisPoints0.eachSpacing;
  40606. var centerLeft = eachSpacing * centerPoint;
  40607. var screenWidth = endX - startX;
  40608. var MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
  40609. offsetLeft = screenWidth / 2 - centerLeft;
  40610. if (offsetLeft > 0) {
  40611. offsetLeft = 0;
  40612. }
  40613. if (offsetLeft < MaxLeft) {
  40614. offsetLeft = MaxLeft;
  40615. }
  40616. this.scrollOption = {
  40617. currentOffset: offsetLeft,
  40618. startTouchX: offsetLeft,
  40619. distance: 0,
  40620. lastMoveTime: 0
  40621. };
  40622. this.opts._scrollDistance_ = offsetLeft;
  40623. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40624. };
  40625. uCharts.prototype.stopAnimation = function () {
  40626. this.animationInstance && this.animationInstance.stop();
  40627. };
  40628. uCharts.prototype.addEventListener = function (type, listener) {
  40629. this.uevent.addEventListener(type, listener);
  40630. };
  40631. uCharts.prototype.delEventListener = function (type) {
  40632. this.uevent.delEventListener(type);
  40633. };
  40634. uCharts.prototype.getCurrentDataIndex = function (e) {
  40635. var touches = null;
  40636. if (e.changedTouches) {
  40637. touches = e.changedTouches[0];
  40638. } else {
  40639. touches = e.mp.changedTouches[0];
  40640. }
  40641. if (touches) {
  40642. var _touches$ = getTouches(touches, this.opts, e);
  40643. if (this.opts.type === 'pie' || this.opts.type === 'ring') {
  40644. return findPieChartCurrentIndex({
  40645. x: _touches$.x,
  40646. y: _touches$.y
  40647. }, this.opts.chartData.pieData, this.opts);
  40648. } else if (this.opts.type === 'rose') {
  40649. return findRoseChartCurrentIndex({
  40650. x: _touches$.x,
  40651. y: _touches$.y
  40652. }, this.opts.chartData.pieData, this.opts);
  40653. } else if (this.opts.type === 'radar') {
  40654. return findRadarChartCurrentIndex({
  40655. x: _touches$.x,
  40656. y: _touches$.y
  40657. }, this.opts.chartData.radarData, this.opts.categories.length);
  40658. } else if (this.opts.type === 'funnel') {
  40659. return findFunnelChartCurrentIndex({
  40660. x: _touches$.x,
  40661. y: _touches$.y
  40662. }, this.opts.chartData.funnelData);
  40663. } else if (this.opts.type === 'map') {
  40664. return findMapChartCurrentIndex({
  40665. x: _touches$.x,
  40666. y: _touches$.y
  40667. }, this.opts);
  40668. } else if (this.opts.type === 'word') {
  40669. return findWordChartCurrentIndex({
  40670. x: _touches$.x,
  40671. y: _touches$.y
  40672. }, this.opts.chartData.wordCloudData);
  40673. } else if (this.opts.type === 'bar') {
  40674. return findBarChartCurrentIndex({
  40675. x: _touches$.x,
  40676. y: _touches$.y
  40677. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  40678. } else {
  40679. return findCurrentIndex({
  40680. x: _touches$.x,
  40681. y: _touches$.y
  40682. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  40683. }
  40684. }
  40685. return -1;
  40686. };
  40687. uCharts.prototype.getLegendDataIndex = function (e) {
  40688. var touches = null;
  40689. if (e.changedTouches) {
  40690. touches = e.changedTouches[0];
  40691. } else {
  40692. touches = e.mp.changedTouches[0];
  40693. }
  40694. if (touches) {
  40695. var _touches$ = getTouches(touches, this.opts, e);
  40696. return findLegendIndex({
  40697. x: _touches$.x,
  40698. y: _touches$.y
  40699. }, this.opts.chartData.legendData);
  40700. }
  40701. return -1;
  40702. };
  40703. uCharts.prototype.touchLegend = function (e) {
  40704. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  40705. var touches = null;
  40706. if (e.changedTouches) {
  40707. touches = e.changedTouches[0];
  40708. } else {
  40709. touches = e.mp.changedTouches[0];
  40710. }
  40711. if (touches) {
  40712. var _touches$ = getTouches(touches, this.opts, e);
  40713. var index = this.getLegendDataIndex(e);
  40714. if (index >= 0) {
  40715. if (this.opts.type == 'candle') {
  40716. this.opts.seriesMA[index].show = !this.opts.seriesMA[index].show;
  40717. } else {
  40718. this.opts.series[index].show = !this.opts.series[index].show;
  40719. }
  40720. this.opts.animation = option.animation ? true : false;
  40721. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  40722. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40723. }
  40724. }
  40725. };
  40726. uCharts.prototype.showToolTip = function (e) {
  40727. var _this2 = this;
  40728. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  40729. var touches = null;
  40730. if (e.changedTouches) {
  40731. touches = e.changedTouches[0];
  40732. } else {
  40733. touches = e.mp.changedTouches[0];
  40734. }
  40735. if (!touches) {
  40736. console.log("[uCharts] 未获取到event坐标信息");
  40737. }
  40738. var _touches$ = getTouches(touches, this.opts, e);
  40739. var currentOffset = this.scrollOption.currentOffset;
  40740. var opts = assign({}, this.opts, {
  40741. _scrollDistance_: currentOffset,
  40742. animation: false
  40743. });
  40744. if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column' || this.opts.type === 'scatter' || this.opts.type === 'bubble') {
  40745. var current = this.getCurrentDataIndex(e);
  40746. var index = option.index == undefined ? current.index : option.index;
  40747. if (index > -1 || index.length > 0) {
  40748. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  40749. if (seriesData.length !== 0) {
  40750. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  40751. textList = _getToolTipData.textList,
  40752. offset = _getToolTipData.offset;
  40753. offset.y = _touches$.y;
  40754. opts.tooltip = {
  40755. textList: option.textList !== undefined ? option.textList : textList,
  40756. offset: option.offset !== undefined ? option.offset : offset,
  40757. option: option,
  40758. index: index
  40759. };
  40760. }
  40761. }
  40762. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40763. }
  40764. if (this.opts.type === 'bar') {
  40765. var current = this.getCurrentDataIndex(e);
  40766. var index = option.index == undefined ? current.index : option.index;
  40767. if (index > -1 || index.length > 0) {
  40768. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  40769. if (seriesData.length !== 0) {
  40770. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  40771. textList = _getToolTipData.textList,
  40772. offset = _getToolTipData.offset;
  40773. offset.x = _touches$.x;
  40774. opts.tooltip = {
  40775. textList: option.textList !== undefined ? option.textList : textList,
  40776. offset: option.offset !== undefined ? option.offset : offset,
  40777. option: option,
  40778. index: index
  40779. };
  40780. }
  40781. }
  40782. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40783. }
  40784. if (this.opts.type === 'mix') {
  40785. var current = this.getCurrentDataIndex(e);
  40786. var index = option.index == undefined ? current.index : option.index;
  40787. if (index > -1) {
  40788. var currentOffset = this.scrollOption.currentOffset;
  40789. var opts = assign({}, this.opts, {
  40790. _scrollDistance_: currentOffset,
  40791. animation: false
  40792. });
  40793. var seriesData = getSeriesDataItem(this.opts.series, index);
  40794. if (seriesData.length !== 0) {
  40795. var _getMixToolTipData = getMixToolTipData(seriesData, this.opts, index, this.opts.categories, option),
  40796. textList = _getMixToolTipData.textList,
  40797. offset = _getMixToolTipData.offset;
  40798. offset.y = _touches$.y;
  40799. opts.tooltip = {
  40800. textList: option.textList ? option.textList : textList,
  40801. offset: option.offset !== undefined ? option.offset : offset,
  40802. option: option,
  40803. index: index
  40804. };
  40805. }
  40806. }
  40807. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40808. }
  40809. if (this.opts.type === 'candle') {
  40810. var current = this.getCurrentDataIndex(e);
  40811. var index = option.index == undefined ? current.index : option.index;
  40812. if (index > -1) {
  40813. var currentOffset = this.scrollOption.currentOffset;
  40814. var opts = assign({}, this.opts, {
  40815. _scrollDistance_: currentOffset,
  40816. animation: false
  40817. });
  40818. var seriesData = getSeriesDataItem(this.opts.series, index);
  40819. if (seriesData.length !== 0) {
  40820. var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts, index, this.opts.categories, this.opts.extra.candle, option),
  40821. textList = _getToolTipData.textList,
  40822. offset = _getToolTipData.offset;
  40823. offset.y = _touches$.y;
  40824. opts.tooltip = {
  40825. textList: option.textList ? option.textList : textList,
  40826. offset: option.offset !== undefined ? option.offset : offset,
  40827. option: option,
  40828. index: index
  40829. };
  40830. }
  40831. }
  40832. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40833. }
  40834. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
  40835. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40836. if (index > -1) {
  40837. var opts = assign({}, this.opts, {
  40838. animation: false
  40839. });
  40840. var seriesData = assign({}, opts._series_[index]);
  40841. var textList = [{
  40842. text: option.formatter ? option.formatter(seriesData, undefined, index, opts) : seriesData.name + ': ' + seriesData.data,
  40843. color: seriesData.color
  40844. }];
  40845. var offset = {
  40846. x: _touches$.x,
  40847. y: _touches$.y
  40848. };
  40849. opts.tooltip = {
  40850. textList: option.textList ? option.textList : textList,
  40851. offset: option.offset !== undefined ? option.offset : offset,
  40852. option: option,
  40853. index: index
  40854. };
  40855. }
  40856. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40857. }
  40858. if (this.opts.type === 'map') {
  40859. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40860. if (index > -1) {
  40861. var opts = assign({}, this.opts, {
  40862. animation: false
  40863. });
  40864. var seriesData = assign({}, this.opts.series[index]);
  40865. seriesData.name = seriesData.properties.name;
  40866. var textList = [{
  40867. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40868. color: seriesData.color
  40869. }];
  40870. var offset = {
  40871. x: _touches$.x,
  40872. y: _touches$.y
  40873. };
  40874. opts.tooltip = {
  40875. textList: option.textList ? option.textList : textList,
  40876. offset: option.offset !== undefined ? option.offset : offset,
  40877. option: option,
  40878. index: index
  40879. };
  40880. }
  40881. opts.updateData = false;
  40882. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40883. }
  40884. if (this.opts.type === 'word') {
  40885. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40886. if (index > -1) {
  40887. var opts = assign({}, this.opts, {
  40888. animation: false
  40889. });
  40890. var seriesData = assign({}, this.opts.series[index]);
  40891. var textList = [{
  40892. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40893. color: seriesData.color
  40894. }];
  40895. var offset = {
  40896. x: _touches$.x,
  40897. y: _touches$.y
  40898. };
  40899. opts.tooltip = {
  40900. textList: option.textList ? option.textList : textList,
  40901. offset: option.offset !== undefined ? option.offset : offset,
  40902. option: option,
  40903. index: index
  40904. };
  40905. }
  40906. opts.updateData = false;
  40907. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40908. }
  40909. if (this.opts.type === 'radar') {
  40910. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40911. if (index > -1) {
  40912. var opts = assign({}, this.opts, {
  40913. animation: false
  40914. });
  40915. var seriesData = getSeriesDataItem(this.opts.series, index);
  40916. if (seriesData.length !== 0) {
  40917. var textList = seriesData.map(function (item) {
  40918. return {
  40919. text: option.formatter ? option.formatter(item, _this2.opts.categories[index], index, _this2.opts) : item.name + ': ' + item.data,
  40920. color: item.color
  40921. };
  40922. });
  40923. var offset = {
  40924. x: _touches$.x,
  40925. y: _touches$.y
  40926. };
  40927. opts.tooltip = {
  40928. textList: option.textList ? option.textList : textList,
  40929. offset: option.offset !== undefined ? option.offset : offset,
  40930. option: option,
  40931. index: index
  40932. };
  40933. }
  40934. }
  40935. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40936. }
  40937. };
  40938. uCharts.prototype.translate = function (distance) {
  40939. this.scrollOption = {
  40940. currentOffset: distance,
  40941. startTouchX: distance,
  40942. distance: 0,
  40943. lastMoveTime: 0
  40944. };
  40945. var opts = assign({}, this.opts, {
  40946. _scrollDistance_: distance,
  40947. animation: false
  40948. });
  40949. drawCharts.call(this, this.opts.type, opts, this.config, this.context);
  40950. };
  40951. uCharts.prototype.scrollStart = function (e) {
  40952. var touches = null;
  40953. if (e.changedTouches) {
  40954. touches = e.changedTouches[0];
  40955. } else {
  40956. touches = e.mp.changedTouches[0];
  40957. }
  40958. var _touches$ = getTouches(touches, this.opts, e);
  40959. if (touches && this.opts.enableScroll === true) {
  40960. this.scrollOption.startTouchX = _touches$.x;
  40961. }
  40962. };
  40963. uCharts.prototype.scroll = function (e) {
  40964. if (this.scrollOption.lastMoveTime === 0) {
  40965. this.scrollOption.lastMoveTime = Date.now();
  40966. }
  40967. var Limit = this.opts.touchMoveLimit || 60;
  40968. var currMoveTime = Date.now();
  40969. var duration = currMoveTime - this.scrollOption.lastMoveTime;
  40970. if (duration < Math.floor(1000 / Limit)) return;
  40971. this.scrollOption.lastMoveTime = currMoveTime;
  40972. var touches = null;
  40973. if (e.changedTouches) {
  40974. touches = e.changedTouches[0];
  40975. } else {
  40976. touches = e.mp.changedTouches[0];
  40977. }
  40978. if (touches && this.opts.enableScroll === true) {
  40979. var _touches$ = getTouches(touches, this.opts, e);
  40980. var _distance;
  40981. _distance = _touches$.x - this.scrollOption.startTouchX;
  40982. var currentOffset = this.scrollOption.currentOffset;
  40983. var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
  40984. this.scrollOption.distance = _distance = validDistance - currentOffset;
  40985. var opts = assign({}, this.opts, {
  40986. _scrollDistance_: currentOffset + _distance,
  40987. animation: false
  40988. });
  40989. this.opts = opts;
  40990. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40991. return currentOffset + _distance;
  40992. }
  40993. };
  40994. uCharts.prototype.scrollEnd = function (e) {
  40995. if (this.opts.enableScroll === true) {
  40996. var _scrollOption = this.scrollOption,
  40997. currentOffset = _scrollOption.currentOffset,
  40998. distance = _scrollOption.distance;
  40999. this.scrollOption.currentOffset = currentOffset + distance;
  41000. this.scrollOption.distance = 0;
  41001. }
  41002. };
  41003. if (( false ? undefined : (0, _typeof2.default)(module)) === "object" && (0, _typeof2.default)(module.exports) === "object") {
  41004. module.exports = uCharts;
  41005. }
  41006. var _default = uCharts;
  41007. exports.default = _default;
  41008. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  41009. /***/ }),
  41010. /***/ 504:
  41011. /*!*************************************************************************************************!*\
  41012. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js ***!
  41013. \*************************************************************************************************/
  41014. /*! no static exports found */
  41015. /***/ (function(module, exports, __webpack_require__) {
  41016. "use strict";
  41017. Object.defineProperty(exports, "__esModule", {
  41018. value: true
  41019. });
  41020. exports.default = void 0;
  41021. /*
  41022. * uCharts®
  41023. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  41024. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  41025. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  41026. * 复制使用请保留本段注释,感谢支持开源!
  41027. *
  41028. * uCharts®官方网站
  41029. * https://www.uCharts.cn
  41030. *
  41031. * 开源地址:
  41032. * https://gitee.com/uCharts/uCharts
  41033. *
  41034. * uni-app插件市场地址:
  41035. * http://ext.dcloud.net.cn/plugin?id=271
  41036. *
  41037. */
  41038. // 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
  41039. var color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
  41040. //事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
  41041. var formatDateTime = function formatDateTime(timeStamp, returnType) {
  41042. var date = new Date();
  41043. date.setTime(timeStamp * 1000);
  41044. var y = date.getFullYear();
  41045. var m = date.getMonth() + 1;
  41046. m = m < 10 ? '0' + m : m;
  41047. var d = date.getDate();
  41048. d = d < 10 ? '0' + d : d;
  41049. var h = date.getHours();
  41050. h = h < 10 ? '0' + h : h;
  41051. var minute = date.getMinutes();
  41052. var second = date.getSeconds();
  41053. minute = minute < 10 ? '0' + minute : minute;
  41054. second = second < 10 ? '0' + second : second;
  41055. if (returnType == 'full') {
  41056. return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
  41057. }
  41058. if (returnType == 'y-m-d') {
  41059. return y + '-' + m + '-' + d;
  41060. }
  41061. if (returnType == 'h:m') {
  41062. return h + ':' + minute;
  41063. }
  41064. if (returnType == 'h:m:s') {
  41065. return h + ':' + minute + ':' + second;
  41066. }
  41067. return [y, m, d, h, minute, second];
  41068. };
  41069. var cfu = {
  41070. //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
  41071. "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"],
  41072. "range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "条状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"],
  41073. //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
  41074. //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
  41075. "categories": ["line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "demotype"],
  41076. //instance为实例变量承载属性,不要删除
  41077. "instance": {},
  41078. //option为opts及eopts承载属性,不要删除
  41079. "option": {},
  41080. //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
  41081. "formatter": {
  41082. "yAxisDemo1": function yAxisDemo1(val) {
  41083. return val + '元';
  41084. },
  41085. "yAxisDemo2": function yAxisDemo2(val) {
  41086. return val.toFixed(2);
  41087. },
  41088. "xAxisDemo1": function xAxisDemo1(val) {
  41089. return val + '年';
  41090. },
  41091. "xAxisDemo2": function xAxisDemo2(val) {
  41092. return formatDateTime(val, 'h:m');
  41093. },
  41094. "seriesDemo1": function seriesDemo1(val) {
  41095. return val + '元';
  41096. },
  41097. "tooltipDemo1": function tooltipDemo1(item, category, index, opts) {
  41098. if (index == 0) {
  41099. return '随便用' + item.data + '年';
  41100. } else {
  41101. return '其他我没改' + item.data + '天';
  41102. }
  41103. },
  41104. "pieDemo": function pieDemo(val, index, series) {
  41105. if (index !== undefined) {
  41106. return series[index].name + ':' + series[index].data + '元';
  41107. }
  41108. }
  41109. },
  41110. //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
  41111. "demotype": {
  41112. //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
  41113. "type": "line",
  41114. "color": color,
  41115. "padding": [15, 10, 0, 15],
  41116. "xAxis": {
  41117. "disableGrid": true
  41118. },
  41119. "yAxis": {
  41120. "gridType": "dash",
  41121. "dashLength": 2
  41122. },
  41123. "legend": {},
  41124. "extra": {
  41125. "line": {
  41126. "type": "curve",
  41127. "width": 2
  41128. }
  41129. }
  41130. },
  41131. //下面是自定义配置,请添加项目所需的通用配置
  41132. "pie": {
  41133. "type": "pie",
  41134. "color": color,
  41135. "padding": [5, 5, 5, 5],
  41136. "extra": {
  41137. "pie": {
  41138. "activeOpacity": 0.5,
  41139. "activeRadius": 10,
  41140. "offsetAngle": 0,
  41141. "labelWidth": 15,
  41142. "border": true,
  41143. "borderWidth": 3,
  41144. "borderColor": "#FFFFFF"
  41145. }
  41146. }
  41147. },
  41148. "ring": {
  41149. "type": "ring",
  41150. "color": color,
  41151. "padding": [5, 5, 5, 5],
  41152. "rotate": false,
  41153. "dataLabel": true,
  41154. "legend": {
  41155. "show": true,
  41156. "position": "right",
  41157. "lineHeight": 25
  41158. },
  41159. "title": {
  41160. "name": "收益率",
  41161. "fontSize": 15,
  41162. "color": "#666666"
  41163. },
  41164. "subtitle": {
  41165. "name": "70%",
  41166. "fontSize": 25,
  41167. "color": "#7cb5ec"
  41168. },
  41169. "extra": {
  41170. "ring": {
  41171. "ringWidth": 30,
  41172. "activeOpacity": 0.5,
  41173. "activeRadius": 10,
  41174. "offsetAngle": 0,
  41175. "labelWidth": 15,
  41176. "border": true,
  41177. "borderWidth": 3,
  41178. "borderColor": "#FFFFFF"
  41179. }
  41180. }
  41181. },
  41182. "rose": {
  41183. "type": "rose",
  41184. "color": color,
  41185. "padding": [5, 5, 5, 5],
  41186. "legend": {
  41187. "show": true,
  41188. "position": "left",
  41189. "lineHeight": 25
  41190. },
  41191. "extra": {
  41192. "rose": {
  41193. "type": "area",
  41194. "minRadius": 50,
  41195. "activeOpacity": 0.5,
  41196. "activeRadius": 10,
  41197. "offsetAngle": 0,
  41198. "labelWidth": 15,
  41199. "border": false,
  41200. "borderWidth": 2,
  41201. "borderColor": "#FFFFFF"
  41202. }
  41203. }
  41204. },
  41205. "word": {
  41206. "type": "word",
  41207. "color": color,
  41208. "extra": {
  41209. "word": {
  41210. "type": "normal",
  41211. "autoColors": false
  41212. }
  41213. }
  41214. },
  41215. "funnel": {
  41216. "type": "funnel",
  41217. "color": color,
  41218. "padding": [15, 15, 0, 15],
  41219. "extra": {
  41220. "funnel": {
  41221. "activeOpacity": 0.3,
  41222. "activeWidth": 10,
  41223. "border": true,
  41224. "borderWidth": 2,
  41225. "borderColor": "#FFFFFF",
  41226. "fillOpacity": 1,
  41227. "labelAlign": "right"
  41228. }
  41229. }
  41230. },
  41231. "map": {
  41232. "type": "map",
  41233. "color": color,
  41234. "padding": [0, 0, 0, 0],
  41235. "dataLabel": true,
  41236. "extra": {
  41237. "map": {
  41238. "border": true,
  41239. "borderWidth": 1,
  41240. "borderColor": "#666666",
  41241. "fillOpacity": 0.6,
  41242. "activeBorderColor": "#F04864",
  41243. "activeFillColor": "#FACC14",
  41244. "activeFillOpacity": 1
  41245. }
  41246. }
  41247. },
  41248. "arcbar": {
  41249. "type": "arcbar",
  41250. "color": color,
  41251. "title": {
  41252. "name": "百分比",
  41253. "fontSize": 25,
  41254. "color": "#00FF00"
  41255. },
  41256. "subtitle": {
  41257. "name": "默认标题",
  41258. "fontSize": 15,
  41259. "color": "#666666"
  41260. },
  41261. "extra": {
  41262. "arcbar": {
  41263. "type": "default",
  41264. "width": 12,
  41265. "backgroundColor": "#E9E9E9",
  41266. "startAngle": 0.75,
  41267. "endAngle": 0.25,
  41268. "gap": 2
  41269. }
  41270. }
  41271. },
  41272. "line": {
  41273. "type": "line",
  41274. "color": color,
  41275. "padding": [15, 10, 0, 15],
  41276. "xAxis": {
  41277. "disableGrid": true
  41278. },
  41279. "yAxis": {
  41280. "gridType": "dash",
  41281. "dashLength": 2
  41282. },
  41283. "legend": {},
  41284. "extra": {
  41285. "line": {
  41286. "type": "straight",
  41287. "width": 2
  41288. }
  41289. }
  41290. },
  41291. "tline": {
  41292. "type": "line",
  41293. "color": color,
  41294. "padding": [15, 10, 0, 15],
  41295. "xAxis": {
  41296. "disableGrid": false,
  41297. "boundaryGap": "justify"
  41298. },
  41299. "yAxis": {
  41300. "gridType": "dash",
  41301. "dashLength": 2,
  41302. "data": [{
  41303. "min": 0,
  41304. "max": 80
  41305. }]
  41306. },
  41307. "legend": {},
  41308. "extra": {
  41309. "line": {
  41310. "type": "curve",
  41311. "width": 2
  41312. }
  41313. }
  41314. },
  41315. "tarea": {
  41316. "type": "area",
  41317. "color": color,
  41318. "padding": [15, 10, 0, 15],
  41319. "xAxis": {
  41320. "disableGrid": true,
  41321. "boundaryGap": "justify"
  41322. },
  41323. "yAxis": {
  41324. "gridType": "dash",
  41325. "dashLength": 2,
  41326. "data": [{
  41327. "min": 0,
  41328. "max": 80
  41329. }]
  41330. },
  41331. "legend": {},
  41332. "extra": {
  41333. "area": {
  41334. "type": "curve",
  41335. "opacity": 0.2,
  41336. "addLine": true,
  41337. "width": 2,
  41338. "gradient": true
  41339. }
  41340. }
  41341. },
  41342. "column": {
  41343. "type": "column",
  41344. "color": color,
  41345. "padding": [15, 15, 0, 5],
  41346. "xAxis": {
  41347. "disableGrid": true
  41348. },
  41349. "yAxis": {
  41350. "data": [{
  41351. "min": 0
  41352. }]
  41353. },
  41354. "legend": {},
  41355. "extra": {
  41356. "column": {
  41357. "type": "group",
  41358. "width": 30,
  41359. "meterBorde": 1,
  41360. "meterFillColor": "#FFFFFF",
  41361. "activeBgColor": "#000000",
  41362. "activeBgOpacity": 0.08
  41363. }
  41364. }
  41365. },
  41366. "bar": {
  41367. "type": "bar",
  41368. "color": color,
  41369. "padding": [15, 30, 0, 5],
  41370. "xAxis": {
  41371. "boundaryGap": "justify",
  41372. "disableGrid": false,
  41373. "min": 0,
  41374. "axisLine": false
  41375. },
  41376. "yAxis": {},
  41377. "legend": {},
  41378. "extra": {
  41379. "bar": {
  41380. "type": "group",
  41381. "width": 30,
  41382. "meterBorde": 1,
  41383. "meterFillColor": "#FFFFFF",
  41384. "activeBgColor": "#000000",
  41385. "activeBgOpacity": 0.08
  41386. }
  41387. }
  41388. },
  41389. "area": {
  41390. "type": "area",
  41391. "color": color,
  41392. "padding": [15, 15, 0, 15],
  41393. "xAxis": {
  41394. "disableGrid": true
  41395. },
  41396. "yAxis": {
  41397. "gridType": "dash",
  41398. "dashLength": 2
  41399. },
  41400. "legend": {},
  41401. "extra": {
  41402. "area": {
  41403. "type": "straight",
  41404. "opacity": 0.2,
  41405. "addLine": true,
  41406. "width": 2,
  41407. "gradient": false
  41408. }
  41409. }
  41410. },
  41411. "radar": {
  41412. "type": "radar",
  41413. "color": color,
  41414. "padding": [5, 5, 5, 5],
  41415. "dataLabel": false,
  41416. "legend": {
  41417. "show": true,
  41418. "position": "right",
  41419. "lineHeight": 25
  41420. },
  41421. "extra": {
  41422. "radar": {
  41423. "gridType": "radar",
  41424. "gridColor": "#CCCCCC",
  41425. "gridCount": 3,
  41426. "opacity": 0.2,
  41427. "max": 200
  41428. }
  41429. }
  41430. },
  41431. "gauge": {
  41432. "type": "gauge",
  41433. "color": color,
  41434. "title": {
  41435. "name": "66Km/H",
  41436. "fontSize": 25,
  41437. "color": "#2fc25b",
  41438. "offsetY": 50
  41439. },
  41440. "subtitle": {
  41441. "name": "实时速度",
  41442. "fontSize": 15,
  41443. "color": "#1890ff",
  41444. "offsetY": -50
  41445. },
  41446. "extra": {
  41447. "gauge": {
  41448. "type": "default",
  41449. "width": 30,
  41450. "labelColor": "#666666",
  41451. "startAngle": 0.75,
  41452. "endAngle": 0.25,
  41453. "startNumber": 0,
  41454. "endNumber": 100,
  41455. "labelFormat": "",
  41456. "splitLine": {
  41457. "fixRadius": 0,
  41458. "splitNumber": 10,
  41459. "width": 30,
  41460. "color": "#FFFFFF",
  41461. "childNumber": 5,
  41462. "childWidth": 12
  41463. },
  41464. "pointer": {
  41465. "width": 24,
  41466. "color": "auto"
  41467. }
  41468. }
  41469. }
  41470. },
  41471. "candle": {
  41472. "type": "candle",
  41473. "color": color,
  41474. "padding": [15, 15, 0, 15],
  41475. "enableScroll": true,
  41476. "enableMarkLine": true,
  41477. "dataLabel": false,
  41478. "xAxis": {
  41479. "labelCount": 4,
  41480. "itemCount": 40,
  41481. "disableGrid": true,
  41482. "gridColor": "#CCCCCC",
  41483. "gridType": "solid",
  41484. "dashLength": 4,
  41485. "scrollShow": true,
  41486. "scrollAlign": "left",
  41487. "scrollColor": "#A6A6A6",
  41488. "scrollBackgroundColor": "#EFEBEF"
  41489. },
  41490. "yAxis": {},
  41491. "legend": {},
  41492. "extra": {
  41493. "candle": {
  41494. "color": {
  41495. "upLine": "#f04864",
  41496. "upFill": "#f04864",
  41497. "downLine": "#2fc25b",
  41498. "downFill": "#2fc25b"
  41499. },
  41500. "average": {
  41501. "show": true,
  41502. "name": ["MA5", "MA10", "MA30"],
  41503. "day": [5, 10, 20],
  41504. "color": ["#1890ff", "#2fc25b", "#facc14"]
  41505. }
  41506. },
  41507. "markLine": {
  41508. "type": "dash",
  41509. "dashLength": 5,
  41510. "data": [{
  41511. "value": 2150,
  41512. "lineColor": "#f04864",
  41513. "showLabel": true
  41514. }, {
  41515. "value": 2350,
  41516. "lineColor": "#f04864",
  41517. "showLabel": true
  41518. }]
  41519. }
  41520. }
  41521. },
  41522. "mix": {
  41523. "type": "mix",
  41524. "color": color,
  41525. "padding": [15, 15, 0, 15],
  41526. "xAxis": {
  41527. "disableGrid": true
  41528. },
  41529. "yAxis": {
  41530. "disabled": false,
  41531. "disableGrid": false,
  41532. "splitNumber": 5,
  41533. "gridType": "dash",
  41534. "dashLength": 4,
  41535. "gridColor": "#CCCCCC",
  41536. "padding": 10,
  41537. "showTitle": true,
  41538. "data": []
  41539. },
  41540. "legend": {},
  41541. "extra": {
  41542. "mix": {
  41543. "column": {
  41544. "width": 20
  41545. }
  41546. }
  41547. }
  41548. },
  41549. "scatter": {
  41550. "type": "scatter",
  41551. "color": color,
  41552. "padding": [15, 15, 0, 15],
  41553. "dataLabel": false,
  41554. "xAxis": {
  41555. "disableGrid": false,
  41556. "gridType": "dash",
  41557. "splitNumber": 5,
  41558. "boundaryGap": "justify",
  41559. "min": 0
  41560. },
  41561. "yAxis": {
  41562. "disableGrid": false,
  41563. "gridType": "dash"
  41564. },
  41565. "legend": {},
  41566. "extra": {
  41567. "scatter": {}
  41568. }
  41569. },
  41570. "bubble": {
  41571. "type": "bubble",
  41572. "color": color,
  41573. "padding": [15, 15, 0, 15],
  41574. "xAxis": {
  41575. "disableGrid": false,
  41576. "gridType": "dash",
  41577. "splitNumber": 5,
  41578. "boundaryGap": "justify",
  41579. "min": 0,
  41580. "max": 250
  41581. },
  41582. "yAxis": {
  41583. "disableGrid": false,
  41584. "gridType": "dash",
  41585. "data": [{
  41586. "min": 0,
  41587. "max": 150
  41588. }]
  41589. },
  41590. "legend": {},
  41591. "extra": {
  41592. "bubble": {
  41593. "border": 2,
  41594. "opacity": 0.5
  41595. }
  41596. }
  41597. }
  41598. };
  41599. var _default = cfu;
  41600. exports.default = _default;
  41601. /***/ }),
  41602. /***/ 51:
  41603. /*!*******************************************************************!*\
  41604. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  41605. \*******************************************************************/
  41606. /*! no static exports found */
  41607. /***/ (function(module, exports, __webpack_require__) {
  41608. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  41609. function _regeneratorRuntime() {
  41610. "use strict";
  41611. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  41612. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  41613. return exports;
  41614. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41615. var exports = {},
  41616. Op = Object.prototype,
  41617. hasOwn = Op.hasOwnProperty,
  41618. defineProperty = Object.defineProperty || function (obj, key, desc) {
  41619. obj[key] = desc.value;
  41620. },
  41621. $Symbol = "function" == typeof Symbol ? Symbol : {},
  41622. iteratorSymbol = $Symbol.iterator || "@@iterator",
  41623. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  41624. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  41625. function define(obj, key, value) {
  41626. return Object.defineProperty(obj, key, {
  41627. value: value,
  41628. enumerable: !0,
  41629. configurable: !0,
  41630. writable: !0
  41631. }), obj[key];
  41632. }
  41633. try {
  41634. define({}, "");
  41635. } catch (err) {
  41636. define = function define(obj, key, value) {
  41637. return obj[key] = value;
  41638. };
  41639. }
  41640. function wrap(innerFn, outerFn, self, tryLocsList) {
  41641. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  41642. generator = Object.create(protoGenerator.prototype),
  41643. context = new Context(tryLocsList || []);
  41644. return defineProperty(generator, "_invoke", {
  41645. value: makeInvokeMethod(innerFn, self, context)
  41646. }), generator;
  41647. }
  41648. function tryCatch(fn, obj, arg) {
  41649. try {
  41650. return {
  41651. type: "normal",
  41652. arg: fn.call(obj, arg)
  41653. };
  41654. } catch (err) {
  41655. return {
  41656. type: "throw",
  41657. arg: err
  41658. };
  41659. }
  41660. }
  41661. exports.wrap = wrap;
  41662. var ContinueSentinel = {};
  41663. function Generator() {}
  41664. function GeneratorFunction() {}
  41665. function GeneratorFunctionPrototype() {}
  41666. var IteratorPrototype = {};
  41667. define(IteratorPrototype, iteratorSymbol, function () {
  41668. return this;
  41669. });
  41670. var getProto = Object.getPrototypeOf,
  41671. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  41672. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  41673. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  41674. function defineIteratorMethods(prototype) {
  41675. ["next", "throw", "return"].forEach(function (method) {
  41676. define(prototype, method, function (arg) {
  41677. return this._invoke(method, arg);
  41678. });
  41679. });
  41680. }
  41681. function AsyncIterator(generator, PromiseImpl) {
  41682. function invoke(method, arg, resolve, reject) {
  41683. var record = tryCatch(generator[method], generator, arg);
  41684. if ("throw" !== record.type) {
  41685. var result = record.arg,
  41686. value = result.value;
  41687. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  41688. invoke("next", value, resolve, reject);
  41689. }, function (err) {
  41690. invoke("throw", err, resolve, reject);
  41691. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  41692. result.value = unwrapped, resolve(result);
  41693. }, function (error) {
  41694. return invoke("throw", error, resolve, reject);
  41695. });
  41696. }
  41697. reject(record.arg);
  41698. }
  41699. var previousPromise;
  41700. defineProperty(this, "_invoke", {
  41701. value: function value(method, arg) {
  41702. function callInvokeWithMethodAndArg() {
  41703. return new PromiseImpl(function (resolve, reject) {
  41704. invoke(method, arg, resolve, reject);
  41705. });
  41706. }
  41707. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  41708. }
  41709. });
  41710. }
  41711. function makeInvokeMethod(innerFn, self, context) {
  41712. var state = "suspendedStart";
  41713. return function (method, arg) {
  41714. if ("executing" === state) throw new Error("Generator is already running");
  41715. if ("completed" === state) {
  41716. if ("throw" === method) throw arg;
  41717. return doneResult();
  41718. }
  41719. for (context.method = method, context.arg = arg;;) {
  41720. var delegate = context.delegate;
  41721. if (delegate) {
  41722. var delegateResult = maybeInvokeDelegate(delegate, context);
  41723. if (delegateResult) {
  41724. if (delegateResult === ContinueSentinel) continue;
  41725. return delegateResult;
  41726. }
  41727. }
  41728. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  41729. if ("suspendedStart" === state) throw state = "completed", context.arg;
  41730. context.dispatchException(context.arg);
  41731. } else "return" === context.method && context.abrupt("return", context.arg);
  41732. state = "executing";
  41733. var record = tryCatch(innerFn, self, context);
  41734. if ("normal" === record.type) {
  41735. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  41736. return {
  41737. value: record.arg,
  41738. done: context.done
  41739. };
  41740. }
  41741. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  41742. }
  41743. };
  41744. }
  41745. function maybeInvokeDelegate(delegate, context) {
  41746. var methodName = context.method,
  41747. method = delegate.iterator[methodName];
  41748. 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;
  41749. var record = tryCatch(method, delegate.iterator, context.arg);
  41750. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  41751. var info = record.arg;
  41752. 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);
  41753. }
  41754. function pushTryEntry(locs) {
  41755. var entry = {
  41756. tryLoc: locs[0]
  41757. };
  41758. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  41759. }
  41760. function resetTryEntry(entry) {
  41761. var record = entry.completion || {};
  41762. record.type = "normal", delete record.arg, entry.completion = record;
  41763. }
  41764. function Context(tryLocsList) {
  41765. this.tryEntries = [{
  41766. tryLoc: "root"
  41767. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  41768. }
  41769. function values(iterable) {
  41770. if (iterable) {
  41771. var iteratorMethod = iterable[iteratorSymbol];
  41772. if (iteratorMethod) return iteratorMethod.call(iterable);
  41773. if ("function" == typeof iterable.next) return iterable;
  41774. if (!isNaN(iterable.length)) {
  41775. var i = -1,
  41776. next = function next() {
  41777. for (; ++i < iterable.length;) {
  41778. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  41779. }
  41780. return next.value = undefined, next.done = !0, next;
  41781. };
  41782. return next.next = next;
  41783. }
  41784. }
  41785. return {
  41786. next: doneResult
  41787. };
  41788. }
  41789. function doneResult() {
  41790. return {
  41791. value: undefined,
  41792. done: !0
  41793. };
  41794. }
  41795. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  41796. value: GeneratorFunctionPrototype,
  41797. configurable: !0
  41798. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  41799. value: GeneratorFunction,
  41800. configurable: !0
  41801. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  41802. var ctor = "function" == typeof genFun && genFun.constructor;
  41803. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  41804. }, exports.mark = function (genFun) {
  41805. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  41806. }, exports.awrap = function (arg) {
  41807. return {
  41808. __await: arg
  41809. };
  41810. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  41811. return this;
  41812. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  41813. void 0 === PromiseImpl && (PromiseImpl = Promise);
  41814. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  41815. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  41816. return result.done ? result.value : iter.next();
  41817. });
  41818. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  41819. return this;
  41820. }), define(Gp, "toString", function () {
  41821. return "[object Generator]";
  41822. }), exports.keys = function (val) {
  41823. var object = Object(val),
  41824. keys = [];
  41825. for (var key in object) {
  41826. keys.push(key);
  41827. }
  41828. return keys.reverse(), function next() {
  41829. for (; keys.length;) {
  41830. var key = keys.pop();
  41831. if (key in object) return next.value = key, next.done = !1, next;
  41832. }
  41833. return next.done = !0, next;
  41834. };
  41835. }, exports.values = values, Context.prototype = {
  41836. constructor: Context,
  41837. reset: function reset(skipTempReset) {
  41838. 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) {
  41839. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  41840. }
  41841. },
  41842. stop: function stop() {
  41843. this.done = !0;
  41844. var rootRecord = this.tryEntries[0].completion;
  41845. if ("throw" === rootRecord.type) throw rootRecord.arg;
  41846. return this.rval;
  41847. },
  41848. dispatchException: function dispatchException(exception) {
  41849. if (this.done) throw exception;
  41850. var context = this;
  41851. function handle(loc, caught) {
  41852. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  41853. }
  41854. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41855. var entry = this.tryEntries[i],
  41856. record = entry.completion;
  41857. if ("root" === entry.tryLoc) return handle("end");
  41858. if (entry.tryLoc <= this.prev) {
  41859. var hasCatch = hasOwn.call(entry, "catchLoc"),
  41860. hasFinally = hasOwn.call(entry, "finallyLoc");
  41861. if (hasCatch && hasFinally) {
  41862. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41863. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41864. } else if (hasCatch) {
  41865. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41866. } else {
  41867. if (!hasFinally) throw new Error("try statement without catch or finally");
  41868. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41869. }
  41870. }
  41871. }
  41872. },
  41873. abrupt: function abrupt(type, arg) {
  41874. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41875. var entry = this.tryEntries[i];
  41876. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  41877. var finallyEntry = entry;
  41878. break;
  41879. }
  41880. }
  41881. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  41882. var record = finallyEntry ? finallyEntry.completion : {};
  41883. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  41884. },
  41885. complete: function complete(record, afterLoc) {
  41886. if ("throw" === record.type) throw record.arg;
  41887. 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;
  41888. },
  41889. finish: function finish(finallyLoc) {
  41890. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41891. var entry = this.tryEntries[i];
  41892. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  41893. }
  41894. },
  41895. "catch": function _catch(tryLoc) {
  41896. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41897. var entry = this.tryEntries[i];
  41898. if (entry.tryLoc === tryLoc) {
  41899. var record = entry.completion;
  41900. if ("throw" === record.type) {
  41901. var thrown = record.arg;
  41902. resetTryEntry(entry);
  41903. }
  41904. return thrown;
  41905. }
  41906. }
  41907. throw new Error("illegal catch attempt");
  41908. },
  41909. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  41910. return this.delegate = {
  41911. iterator: values(iterable),
  41912. resultName: resultName,
  41913. nextLoc: nextLoc
  41914. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  41915. }
  41916. }, exports;
  41917. }
  41918. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41919. /***/ }),
  41920. /***/ 52:
  41921. /*!*****************************************************************!*\
  41922. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  41923. \*****************************************************************/
  41924. /*! no static exports found */
  41925. /***/ (function(module, exports) {
  41926. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  41927. try {
  41928. var info = gen[key](arg);
  41929. var value = info.value;
  41930. } catch (error) {
  41931. reject(error);
  41932. return;
  41933. }
  41934. if (info.done) {
  41935. resolve(value);
  41936. } else {
  41937. Promise.resolve(value).then(_next, _throw);
  41938. }
  41939. }
  41940. function _asyncToGenerator(fn) {
  41941. return function () {
  41942. var self = this,
  41943. args = arguments;
  41944. return new Promise(function (resolve, reject) {
  41945. var gen = fn.apply(self, args);
  41946. function _next(value) {
  41947. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  41948. }
  41949. function _throw(err) {
  41950. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  41951. }
  41952. _next(undefined);
  41953. });
  41954. };
  41955. }
  41956. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41957. /***/ }),
  41958. /***/ 53:
  41959. /*!***********************************************************************!*\
  41960. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFormat.js ***!
  41961. \***********************************************************************/
  41962. /*! no static exports found */
  41963. /***/ (function(module, exports, __webpack_require__) {
  41964. "use strict";
  41965. Object.defineProperty(exports, "__esModule", {
  41966. value: true
  41967. });
  41968. exports.default = void 0;
  41969. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  41970. // 所以这里做一个兼容polyfill的兼容处理
  41971. if (!String.prototype.padStart) {
  41972. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  41973. String.prototype.padStart = function (maxLength) {
  41974. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  41975. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  41976. var str = this;
  41977. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  41978. if (str.length >= maxLength) return String(str);
  41979. var fillLength = maxLength - str.length,
  41980. times = Math.ceil(fillLength / fillString.length);
  41981. while (times >>= 1) {
  41982. fillString += fillString;
  41983. if (times === 1) {
  41984. fillString += fillString;
  41985. }
  41986. }
  41987. return fillString.slice(0, fillLength) + str;
  41988. };
  41989. }
  41990. // 其他更多是格式化有如下:
  41991. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  41992. function timeFormat() {
  41993. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  41994. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  41995. // 如果为null,则格式化当前时间
  41996. if (!dateTime) dateTime = Number(new Date());
  41997. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  41998. if (dateTime.toString().length == 10) dateTime *= 1000;
  41999. var date = new Date(dateTime);
  42000. var ret;
  42001. var opt = {
  42002. "y+": date.getFullYear().toString(),
  42003. // 年
  42004. "m+": (date.getMonth() + 1).toString(),
  42005. // 月
  42006. "d+": date.getDate().toString(),
  42007. // 日
  42008. "h+": date.getHours().toString(),
  42009. // 时
  42010. "M+": date.getMinutes().toString(),
  42011. // 分
  42012. "s+": date.getSeconds().toString() // 秒
  42013. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  42014. };
  42015. for (var k in opt) {
  42016. ret = new RegExp("(" + k + ")").exec(fmt);
  42017. if (ret) {
  42018. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  42019. }
  42020. ;
  42021. }
  42022. ;
  42023. return fmt;
  42024. }
  42025. var _default = timeFormat;
  42026. exports.default = _default;
  42027. /***/ }),
  42028. /***/ 54:
  42029. /*!*********************************************************************!*\
  42030. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFrom.js ***!
  42031. \*********************************************************************/
  42032. /*! no static exports found */
  42033. /***/ (function(module, exports, __webpack_require__) {
  42034. "use strict";
  42035. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42036. Object.defineProperty(exports, "__esModule", {
  42037. value: true
  42038. });
  42039. exports.default = void 0;
  42040. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 53));
  42041. /**
  42042. * 时间戳转为多久之前
  42043. * @param String timestamp 时间戳
  42044. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  42045. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  42046. */
  42047. function timeFrom() {
  42048. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  42049. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  42050. // 如果为null,则格式化当前时间
  42051. if (!dateTime) dateTime = Number(new Date());
  42052. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  42053. if (dateTime.toString().length == 10) dateTime *= 1000;
  42054. var timestamp = +new Date(Number(dateTime));
  42055. var timer = (Number(new Date()) - timestamp) / 1000;
  42056. // 如果小于5分钟,则返回"刚刚",其他以此类推
  42057. var tips = '';
  42058. switch (true) {
  42059. case timer < 300:
  42060. tips = '刚刚';
  42061. break;
  42062. case timer >= 300 && timer < 3600:
  42063. tips = parseInt(timer / 60) + '分钟前';
  42064. break;
  42065. case timer >= 3600 && timer < 86400:
  42066. tips = parseInt(timer / 3600) + '小时前';
  42067. break;
  42068. case timer >= 86400 && timer < 2592000:
  42069. tips = parseInt(timer / 86400) + '天前';
  42070. break;
  42071. default:
  42072. // 如果format为false,则无论什么时间戳,都显示xx之前
  42073. if (format === false) {
  42074. if (timer >= 2592000 && timer < 365 * 86400) {
  42075. tips = parseInt(timer / (86400 * 30)) + '个月前';
  42076. } else {
  42077. tips = parseInt(timer / (86400 * 365)) + '年前';
  42078. }
  42079. } else {
  42080. tips = (0, _timeFormat.default)(timestamp, format);
  42081. }
  42082. }
  42083. return tips;
  42084. }
  42085. var _default = timeFrom;
  42086. exports.default = _default;
  42087. /***/ }),
  42088. /***/ 55:
  42089. /*!**************************************************************************!*\
  42090. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/colorGradient.js ***!
  42091. \**************************************************************************/
  42092. /*! no static exports found */
  42093. /***/ (function(module, exports, __webpack_require__) {
  42094. "use strict";
  42095. Object.defineProperty(exports, "__esModule", {
  42096. value: true
  42097. });
  42098. exports.default = void 0;
  42099. /**
  42100. * 求两个颜色之间的渐变值
  42101. * @param {string} startColor 开始的颜色
  42102. * @param {string} endColor 结束的颜色
  42103. * @param {number} step 颜色等分的份额
  42104. * */
  42105. function colorGradient() {
  42106. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  42107. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  42108. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  42109. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  42110. var startR = startRGB[0];
  42111. var startG = startRGB[1];
  42112. var startB = startRGB[2];
  42113. var endRGB = hexToRgb(endColor, false);
  42114. var endR = endRGB[0];
  42115. var endG = endRGB[1];
  42116. var endB = endRGB[2];
  42117. var sR = (endR - startR) / step; //总差值
  42118. var sG = (endG - startG) / step;
  42119. var sB = (endB - startB) / step;
  42120. var colorArr = [];
  42121. for (var i = 0; i < step; i++) {
  42122. //计算每一步的hex值
  42123. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  42124. colorArr.push(hex);
  42125. }
  42126. return colorArr;
  42127. }
  42128. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  42129. function hexToRgb(sColor) {
  42130. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42131. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42132. sColor = sColor.toLowerCase();
  42133. if (sColor && reg.test(sColor)) {
  42134. if (sColor.length === 4) {
  42135. var sColorNew = "#";
  42136. for (var i = 1; i < 4; i += 1) {
  42137. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  42138. }
  42139. sColor = sColorNew;
  42140. }
  42141. //处理六位的颜色值
  42142. var sColorChange = [];
  42143. for (var _i = 1; _i < 7; _i += 2) {
  42144. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  42145. }
  42146. if (!str) {
  42147. return sColorChange;
  42148. } else {
  42149. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  42150. }
  42151. } else if (/^(rgb|RGB)/.test(sColor)) {
  42152. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  42153. return arr.map(function (val) {
  42154. return Number(val);
  42155. });
  42156. } else {
  42157. return sColor;
  42158. }
  42159. }
  42160. ;
  42161. // 将rgb表示方式转换为hex表示方式
  42162. function rgbToHex(rgb) {
  42163. var _this = rgb;
  42164. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42165. if (/^(rgb|RGB)/.test(_this)) {
  42166. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  42167. var strHex = "#";
  42168. for (var i = 0; i < aColor.length; i++) {
  42169. var hex = Number(aColor[i]).toString(16);
  42170. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  42171. if (hex === "0") {
  42172. hex += hex;
  42173. }
  42174. strHex += hex;
  42175. }
  42176. if (strHex.length !== 7) {
  42177. strHex = _this;
  42178. }
  42179. return strHex;
  42180. } else if (reg.test(_this)) {
  42181. var aNum = _this.replace(/#/, "").split("");
  42182. if (aNum.length === 6) {
  42183. return _this;
  42184. } else if (aNum.length === 3) {
  42185. var numHex = "#";
  42186. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  42187. numHex += aNum[_i2] + aNum[_i2];
  42188. }
  42189. return numHex;
  42190. }
  42191. } else {
  42192. return _this;
  42193. }
  42194. }
  42195. /**
  42196. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  42197. * sHex为传入的十六进制的色值
  42198. * alpha为rgba的透明度
  42199. */
  42200. function colorToRgba(color) {
  42201. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  42202. color = rgbToHex(color);
  42203. // 十六进制颜色值的正则表达式
  42204. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42205. /* 16进制颜色转为RGB格式 */
  42206. var sColor = color.toLowerCase();
  42207. if (sColor && reg.test(sColor)) {
  42208. if (sColor.length === 4) {
  42209. var sColorNew = '#';
  42210. for (var i = 1; i < 4; i += 1) {
  42211. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  42212. }
  42213. sColor = sColorNew;
  42214. }
  42215. // 处理六位的颜色值
  42216. var sColorChange = [];
  42217. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  42218. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  42219. }
  42220. // return sColorChange.join(',')
  42221. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  42222. } else {
  42223. return sColor;
  42224. }
  42225. }
  42226. var _default = {
  42227. colorGradient: colorGradient,
  42228. hexToRgb: hexToRgb,
  42229. rgbToHex: rgbToHex,
  42230. colorToRgba: colorToRgba
  42231. };
  42232. exports.default = _default;
  42233. /***/ }),
  42234. /***/ 56:
  42235. /*!*****************************************************************!*\
  42236. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/guid.js ***!
  42237. \*****************************************************************/
  42238. /*! no static exports found */
  42239. /***/ (function(module, exports, __webpack_require__) {
  42240. "use strict";
  42241. Object.defineProperty(exports, "__esModule", {
  42242. value: true
  42243. });
  42244. exports.default = void 0;
  42245. /**
  42246. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  42247. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  42248. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  42249. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  42250. * v-for的时候,推荐使用后端返回的id而不是循环的index
  42251. * @param {Number} len uuid的长度
  42252. * @param {Boolean} firstU 将返回的首字母置为"u"
  42253. * @param {Number} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  42254. */
  42255. function guid() {
  42256. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  42257. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42258. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  42259. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  42260. var uuid = [];
  42261. radix = radix || chars.length;
  42262. if (len) {
  42263. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  42264. for (var i = 0; i < len; i++) {
  42265. uuid[i] = chars[0 | Math.random() * radix];
  42266. }
  42267. } else {
  42268. var r;
  42269. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  42270. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  42271. uuid[14] = '4';
  42272. for (var _i = 0; _i < 36; _i++) {
  42273. if (!uuid[_i]) {
  42274. r = 0 | Math.random() * 16;
  42275. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  42276. }
  42277. }
  42278. }
  42279. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guid不能用作id或者class
  42280. if (firstU) {
  42281. uuid.shift();
  42282. return 'u' + uuid.join('');
  42283. } else {
  42284. return uuid.join('');
  42285. }
  42286. }
  42287. var _default = guid;
  42288. exports.default = _default;
  42289. /***/ }),
  42290. /***/ 57:
  42291. /*!******************************************************************!*\
  42292. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/color.js ***!
  42293. \******************************************************************/
  42294. /*! no static exports found */
  42295. /***/ (function(module, exports, __webpack_require__) {
  42296. "use strict";
  42297. Object.defineProperty(exports, "__esModule", {
  42298. value: true
  42299. });
  42300. exports.default = void 0;
  42301. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  42302. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  42303. var color = {
  42304. primary: "#2979ff",
  42305. primaryDark: "#2b85e4",
  42306. primaryDisabled: "#a0cfff",
  42307. primaryLight: "#ecf5ff",
  42308. bgColor: "#f3f4f6",
  42309. info: "#909399",
  42310. infoDark: "#82848a",
  42311. infoDisabled: "#c8c9cc",
  42312. infoLight: "#f4f4f5",
  42313. warning: "#ff9900",
  42314. warningDark: "#f29100",
  42315. warningDisabled: "#fcbd71",
  42316. warningLight: "#fdf6ec",
  42317. error: "#fa3534",
  42318. errorDark: "#dd6161",
  42319. errorDisabled: "#fab6b6",
  42320. errorLight: "#fef0f0",
  42321. success: "#19be6b",
  42322. successDark: "#18b566",
  42323. successDisabled: "#71d5a1",
  42324. successLight: "#dbf1e1",
  42325. mainColor: "#303133",
  42326. contentColor: "#606266",
  42327. tipsColor: "#909399",
  42328. lightColor: "#c0c4cc",
  42329. borderColor: "#e4e7ed"
  42330. };
  42331. var _default = color;
  42332. exports.default = _default;
  42333. /***/ }),
  42334. /***/ 58:
  42335. /*!**********************************************************************!*\
  42336. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/type2icon.js ***!
  42337. \**********************************************************************/
  42338. /*! no static exports found */
  42339. /***/ (function(module, exports, __webpack_require__) {
  42340. "use strict";
  42341. Object.defineProperty(exports, "__esModule", {
  42342. value: true
  42343. });
  42344. exports.default = void 0;
  42345. /**
  42346. * 根据主题type值,获取对应的图标
  42347. * @param String type 主题名称,primary|info|error|warning|success
  42348. * @param String fill 是否使用fill填充实体的图标
  42349. */
  42350. function type2icon() {
  42351. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  42352. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  42353. // 如果非预置值,默认为success
  42354. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  42355. var iconName = '';
  42356. // 目前(2019-12-12),info和primary使用同一个图标
  42357. switch (type) {
  42358. case 'primary':
  42359. iconName = 'info-circle';
  42360. break;
  42361. case 'info':
  42362. iconName = 'info-circle';
  42363. break;
  42364. case 'error':
  42365. iconName = 'close-circle';
  42366. break;
  42367. case 'warning':
  42368. iconName = 'error-circle';
  42369. break;
  42370. case 'success':
  42371. iconName = 'checkmark-circle';
  42372. break;
  42373. default:
  42374. iconName = 'checkmark-circle';
  42375. }
  42376. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  42377. if (fill) iconName += '-fill';
  42378. return iconName;
  42379. }
  42380. var _default = type2icon;
  42381. exports.default = _default;
  42382. /***/ }),
  42383. /***/ 59:
  42384. /*!************************************************************************!*\
  42385. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/randomArray.js ***!
  42386. \************************************************************************/
  42387. /*! no static exports found */
  42388. /***/ (function(module, exports, __webpack_require__) {
  42389. "use strict";
  42390. Object.defineProperty(exports, "__esModule", {
  42391. value: true
  42392. });
  42393. exports.default = void 0;
  42394. // 打乱数组
  42395. function randomArray() {
  42396. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  42397. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  42398. return array.sort(function () {
  42399. return Math.random() - 0.5;
  42400. });
  42401. }
  42402. var _default = randomArray;
  42403. exports.default = _default;
  42404. /***/ }),
  42405. /***/ 6:
  42406. /*!***************************************************************!*\
  42407. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  42408. \***************************************************************/
  42409. /*! no static exports found */
  42410. /***/ (function(module, exports) {
  42411. function _arrayWithHoles(arr) {
  42412. if (Array.isArray(arr)) return arr;
  42413. }
  42414. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42415. /***/ }),
  42416. /***/ 60:
  42417. /*!********************************************************************!*\
  42418. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/addUnit.js ***!
  42419. \********************************************************************/
  42420. /*! no static exports found */
  42421. /***/ (function(module, exports, __webpack_require__) {
  42422. "use strict";
  42423. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42424. Object.defineProperty(exports, "__esModule", {
  42425. value: true
  42426. });
  42427. exports.default = addUnit;
  42428. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 47));
  42429. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  42430. function addUnit() {
  42431. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  42432. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  42433. value = String(value);
  42434. // 用uView内置验证规则中的number判断是否为数值
  42435. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  42436. }
  42437. /***/ }),
  42438. /***/ 61:
  42439. /*!*******************************************************************!*\
  42440. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/random.js ***!
  42441. \*******************************************************************/
  42442. /*! no static exports found */
  42443. /***/ (function(module, exports, __webpack_require__) {
  42444. "use strict";
  42445. Object.defineProperty(exports, "__esModule", {
  42446. value: true
  42447. });
  42448. exports.default = void 0;
  42449. function random(min, max) {
  42450. if (min >= 0 && max > 0 && max >= min) {
  42451. var gab = max - min + 1;
  42452. return Math.floor(Math.random() * gab + min);
  42453. } else {
  42454. return 0;
  42455. }
  42456. }
  42457. var _default = random;
  42458. exports.default = _default;
  42459. /***/ }),
  42460. /***/ 62:
  42461. /*!*****************************************************************!*\
  42462. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/trim.js ***!
  42463. \*****************************************************************/
  42464. /*! no static exports found */
  42465. /***/ (function(module, exports, __webpack_require__) {
  42466. "use strict";
  42467. Object.defineProperty(exports, "__esModule", {
  42468. value: true
  42469. });
  42470. exports.default = void 0;
  42471. function trim(str) {
  42472. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  42473. if (pos == 'both') {
  42474. return str.replace(/^\s+|\s+$/g, "");
  42475. } else if (pos == "left") {
  42476. return str.replace(/^\s*/, '');
  42477. } else if (pos == 'right') {
  42478. return str.replace(/(\s*$)/g, "");
  42479. } else if (pos == 'all') {
  42480. return str.replace(/\s+/g, "");
  42481. } else {
  42482. return str;
  42483. }
  42484. }
  42485. var _default = trim;
  42486. exports.default = _default;
  42487. /***/ }),
  42488. /***/ 63:
  42489. /*!******************************************************************!*\
  42490. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/toast.js ***!
  42491. \******************************************************************/
  42492. /*! no static exports found */
  42493. /***/ (function(module, exports, __webpack_require__) {
  42494. "use strict";
  42495. /* WEBPACK VAR INJECTION */(function(uni) {
  42496. Object.defineProperty(exports, "__esModule", {
  42497. value: true
  42498. });
  42499. exports.default = void 0;
  42500. function toast(title) {
  42501. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  42502. uni.showToast({
  42503. title: title,
  42504. icon: 'none',
  42505. duration: duration
  42506. });
  42507. }
  42508. var _default = toast;
  42509. exports.default = _default;
  42510. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42511. /***/ }),
  42512. /***/ 64:
  42513. /*!**********************************************************************!*\
  42514. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/getParent.js ***!
  42515. \**********************************************************************/
  42516. /*! no static exports found */
  42517. /***/ (function(module, exports, __webpack_require__) {
  42518. "use strict";
  42519. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42520. Object.defineProperty(exports, "__esModule", {
  42521. value: true
  42522. });
  42523. exports.default = getParent;
  42524. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  42525. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42526. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42527. function getParent(name, keys) {
  42528. var parent = this.$parent;
  42529. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42530. while (parent) {
  42531. // 父组件
  42532. if (parent.$options.name !== name) {
  42533. // 如果组件的name不相等,继续上一级寻找
  42534. parent = parent.$parent;
  42535. } else {
  42536. var _ret = function () {
  42537. var data = {};
  42538. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  42539. if (Array.isArray(keys)) {
  42540. keys.map(function (val) {
  42541. data[val] = parent[val] ? parent[val] : '';
  42542. });
  42543. } else {
  42544. // 历遍传过来的对象参数
  42545. for (var i in keys) {
  42546. // 如果子组件有此值则用,无此值则用父组件的值
  42547. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  42548. if (Array.isArray(keys[i])) {
  42549. if (keys[i].length) {
  42550. data[i] = keys[i];
  42551. } else {
  42552. data[i] = parent[i];
  42553. }
  42554. } else if (keys[i].constructor === Object) {
  42555. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  42556. if (Object.keys(keys[i]).length) {
  42557. data[i] = keys[i];
  42558. } else {
  42559. data[i] = parent[i];
  42560. }
  42561. } else {
  42562. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  42563. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  42564. }
  42565. }
  42566. }
  42567. return {
  42568. v: data
  42569. };
  42570. }();
  42571. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  42572. }
  42573. }
  42574. return {};
  42575. }
  42576. /***/ }),
  42577. /***/ 65:
  42578. /*!********************************************************************!*\
  42579. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/$parent.js ***!
  42580. \********************************************************************/
  42581. /*! no static exports found */
  42582. /***/ (function(module, exports, __webpack_require__) {
  42583. "use strict";
  42584. Object.defineProperty(exports, "__esModule", {
  42585. value: true
  42586. });
  42587. exports.default = $parent;
  42588. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42589. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42590. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  42591. // 值(默认为undefined),就是查找最顶层的$parent
  42592. function $parent() {
  42593. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  42594. var parent = this.$parent;
  42595. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42596. while (parent) {
  42597. // 父组件
  42598. if (parent.$options && parent.$options.name !== name) {
  42599. // 如果组件的name不相等,继续上一级寻找
  42600. parent = parent.$parent;
  42601. } else {
  42602. return parent;
  42603. }
  42604. }
  42605. return false;
  42606. }
  42607. /***/ }),
  42608. /***/ 66:
  42609. /*!****************************************************************!*\
  42610. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/sys.js ***!
  42611. \****************************************************************/
  42612. /*! no static exports found */
  42613. /***/ (function(module, exports, __webpack_require__) {
  42614. "use strict";
  42615. /* WEBPACK VAR INJECTION */(function(uni) {
  42616. Object.defineProperty(exports, "__esModule", {
  42617. value: true
  42618. });
  42619. exports.os = os;
  42620. exports.sys = sys;
  42621. function os() {
  42622. return uni.getSystemInfoSync().platform;
  42623. }
  42624. ;
  42625. function sys() {
  42626. return uni.getSystemInfoSync();
  42627. }
  42628. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42629. /***/ }),
  42630. /***/ 67:
  42631. /*!*********************************************************************!*\
  42632. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/debounce.js ***!
  42633. \*********************************************************************/
  42634. /*! no static exports found */
  42635. /***/ (function(module, exports, __webpack_require__) {
  42636. "use strict";
  42637. Object.defineProperty(exports, "__esModule", {
  42638. value: true
  42639. });
  42640. exports.default = void 0;
  42641. var timeout = null;
  42642. /**
  42643. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  42644. *
  42645. * @param {Function} func 要执行的回调函数
  42646. * @param {Number} wait 延时的时间
  42647. * @param {Boolean} immediate 是否立即执行
  42648. * @return null
  42649. */
  42650. function debounce(func) {
  42651. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42652. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  42653. // 清除定时器
  42654. if (timeout !== null) clearTimeout(timeout);
  42655. // 立即执行,此类情况一般用不到
  42656. if (immediate) {
  42657. var callNow = !timeout;
  42658. timeout = setTimeout(function () {
  42659. timeout = null;
  42660. }, wait);
  42661. if (callNow) typeof func === 'function' && func();
  42662. } else {
  42663. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  42664. timeout = setTimeout(function () {
  42665. typeof func === 'function' && func();
  42666. }, wait);
  42667. }
  42668. }
  42669. var _default = debounce;
  42670. exports.default = _default;
  42671. /***/ }),
  42672. /***/ 68:
  42673. /*!*********************************************************************!*\
  42674. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/throttle.js ***!
  42675. \*********************************************************************/
  42676. /*! no static exports found */
  42677. /***/ (function(module, exports, __webpack_require__) {
  42678. "use strict";
  42679. Object.defineProperty(exports, "__esModule", {
  42680. value: true
  42681. });
  42682. exports.default = void 0;
  42683. var timer, flag;
  42684. /**
  42685. * 节流原理:在一定时间内,只能触发一次
  42686. *
  42687. * @param {Function} func 要执行的回调函数
  42688. * @param {Number} wait 延时的时间
  42689. * @param {Boolean} immediate 是否立即执行
  42690. * @return null
  42691. */
  42692. function throttle(func) {
  42693. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42694. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  42695. if (immediate) {
  42696. if (!flag) {
  42697. flag = true;
  42698. // 如果是立即执行,则在wait毫秒内开始时执行
  42699. typeof func === 'function' && func();
  42700. timer = setTimeout(function () {
  42701. flag = false;
  42702. }, wait);
  42703. }
  42704. } else {
  42705. if (!flag) {
  42706. flag = true;
  42707. // 如果是非立即执行,则在wait毫秒内的结束处执行
  42708. timer = setTimeout(function () {
  42709. flag = false;
  42710. typeof func === 'function' && func();
  42711. }, wait);
  42712. }
  42713. }
  42714. }
  42715. ;
  42716. var _default = throttle;
  42717. exports.default = _default;
  42718. /***/ }),
  42719. /***/ 69:
  42720. /*!*****************************************************************!*\
  42721. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/config.js ***!
  42722. \*****************************************************************/
  42723. /*! no static exports found */
  42724. /***/ (function(module, exports, __webpack_require__) {
  42725. "use strict";
  42726. Object.defineProperty(exports, "__esModule", {
  42727. value: true
  42728. });
  42729. exports.default = void 0;
  42730. // 此版本发布于2022-04-19
  42731. var version = '1.8.6';
  42732. var _default = {
  42733. v: version,
  42734. version: version,
  42735. // 主题名称
  42736. type: ['primary', 'success', 'info', 'error', 'warning']
  42737. };
  42738. exports.default = _default;
  42739. /***/ }),
  42740. /***/ 7:
  42741. /*!*********************************************************************!*\
  42742. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  42743. \*********************************************************************/
  42744. /*! no static exports found */
  42745. /***/ (function(module, exports) {
  42746. function _iterableToArrayLimit(arr, i) {
  42747. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  42748. if (null != _i) {
  42749. var _s,
  42750. _e,
  42751. _x,
  42752. _r,
  42753. _arr = [],
  42754. _n = !0,
  42755. _d = !1;
  42756. try {
  42757. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  42758. if (Object(_i) !== _i) return;
  42759. _n = !1;
  42760. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  42761. ;
  42762. }
  42763. } catch (err) {
  42764. _d = !0, _e = err;
  42765. } finally {
  42766. try {
  42767. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  42768. } finally {
  42769. if (_d) throw _e;
  42770. }
  42771. }
  42772. return _arr;
  42773. }
  42774. }
  42775. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42776. /***/ }),
  42777. /***/ 70:
  42778. /*!*****************************************************************!*\
  42779. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/zIndex.js ***!
  42780. \*****************************************************************/
  42781. /*! no static exports found */
  42782. /***/ (function(module, exports, __webpack_require__) {
  42783. "use strict";
  42784. Object.defineProperty(exports, "__esModule", {
  42785. value: true
  42786. });
  42787. exports.default = void 0;
  42788. // uniapp在H5中各API的z-index值如下:
  42789. /**
  42790. * actionsheet: 999
  42791. * modal: 999
  42792. * navigate: 998
  42793. * tabbar: 998
  42794. * toast: 999
  42795. */
  42796. var _default = {
  42797. toast: 10090,
  42798. noNetwork: 10080,
  42799. // popup包含popup,actionsheet,keyboard,picker的值
  42800. popup: 10075,
  42801. mask: 10070,
  42802. navbar: 980,
  42803. topTips: 975,
  42804. sticky: 970,
  42805. indexListSticky: 965
  42806. };
  42807. exports.default = _default;
  42808. /***/ }),
  42809. /***/ 8:
  42810. /*!***************************************************************************!*\
  42811. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  42812. \***************************************************************************/
  42813. /*! no static exports found */
  42814. /***/ (function(module, exports, __webpack_require__) {
  42815. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  42816. function _unsupportedIterableToArray(o, minLen) {
  42817. if (!o) return;
  42818. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  42819. var n = Object.prototype.toString.call(o).slice(8, -1);
  42820. if (n === "Object" && o.constructor) n = o.constructor.name;
  42821. if (n === "Map" || n === "Set") return Array.from(o);
  42822. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  42823. }
  42824. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42825. /***/ }),
  42826. /***/ 9:
  42827. /*!*****************************************************************!*\
  42828. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  42829. \*****************************************************************/
  42830. /*! no static exports found */
  42831. /***/ (function(module, exports) {
  42832. function _arrayLikeToArray(arr, len) {
  42833. if (len == null || len > arr.length) len = arr.length;
  42834. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  42835. arr2[i] = arr[i];
  42836. }
  42837. return arr2;
  42838. }
  42839. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42840. /***/ })
  42841. }]);
  42842. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map