12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350 |
- !function (t, e) {
- "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.echarts = {});
- }(this, function (t) {
- "use strict";
- function e(t) {
- var e = {},
- i = {},
- n = t.match(/Firefox\/([\d.]+)/),
- r = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/),
- a = t.match(/Edge\/([\d.]+)/),
- o = /micromessenger/i.test(t);
- return n && (i.firefox = !0, i.version = n[1]), r && (i.ie = !0, i.version = r[1]), a && (i.edge = !0, i.version = a[1]), o && (i.weChat = !0), {
- browser: i,
- os: e,
- node: !1,
- canvasSupported: !!document.createElement("canvas").getContext,
- svgSupported: "undefined" != typeof SVGRect,
- touchEventsSupported: "ontouchstart" in window && !i.ie && !i.edge,
- pointerEventsSupported: "onpointerdown" in window && (i.edge || i.ie && i.version >= 11),
- domSupported: "undefined" != typeof document
- };
- }
- function i(t, e) {
- "createCanvas" === t && (Rg = null), zg[t] = e;
- }
- function n(t) {
- if (null == t || "object" != typeof t) return t;
- var e = t,
- i = Cg.call(t);
- if ("[object Array]" === i) {
- if (!R(t)) {
- e = [];
- for (var r = 0, a = t.length; a > r; r++) e[r] = n(t[r]);
- }
- } else if (Tg[i]) {
- if (!R(t)) {
- var o = t.constructor;
- if (t.constructor.from) e = o.from(t);else {
- e = new o(t.length);
- for (var r = 0, a = t.length; a > r; r++) e[r] = n(t[r]);
- }
- }
- } else if (!Ig[i] && !R(t) && !T(t)) {
- e = {};
- for (var s in t) t.hasOwnProperty(s) && (e[s] = n(t[s]));
- }
- return e;
- }
- function r(t, e, i) {
- if (!S(e) || !S(t)) return i ? n(e) : t;
- for (var a in e) if (e.hasOwnProperty(a)) {
- var o = t[a],
- s = e[a];
- !S(s) || !S(o) || x(s) || x(o) || T(s) || T(o) || M(s) || M(o) || R(s) || R(o) ? !i && a in t || (t[a] = n(e[a], !0)) : r(o, s, i);
- }
- return t;
- }
- function a(t, e) {
- for (var i = t[0], n = 1, a = t.length; a > n; n++) i = r(i, t[n], e);
- return i;
- }
- function o(t, e) {
- for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
- return t;
- }
- function s(t, e, i) {
- for (var n in e) e.hasOwnProperty(n) && (i ? null != e[n] : null == t[n]) && (t[n] = e[n]);
- return t;
- }
- function l() {
- return Rg || (Rg = Eg().getContext("2d")), Rg;
- }
- function u(t, e) {
- if (t) {
- if (t.indexOf) return t.indexOf(e);
- for (var i = 0, n = t.length; n > i; i++) if (t[i] === e) return i;
- }
- return -1;
- }
- function h(t, e) {
- function i() {}
- var n = t.prototype;
- i.prototype = e.prototype, t.prototype = new i();
- for (var r in n) n.hasOwnProperty(r) && (t.prototype[r] = n[r]);
- t.prototype.constructor = t, t.superClass = e;
- }
- function c(t, e, i) {
- t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, s(t, e, i);
- }
- function d(t) {
- return t ? "string" == typeof t ? !1 : "number" == typeof t.length : void 0;
- }
- function f(t, e, i) {
- if (t && e) if (t.forEach && t.forEach === Ag) t.forEach(e, i);else if (t.length === +t.length) for (var n = 0, r = t.length; r > n; n++) e.call(i, t[n], n, t);else for (var a in t) t.hasOwnProperty(a) && e.call(i, t[a], a, t);
- }
- function p(t, e, i) {
- if (t && e) {
- if (t.map && t.map === Lg) return t.map(e, i);
- for (var n = [], r = 0, a = t.length; a > r; r++) n.push(e.call(i, t[r], r, t));
- return n;
- }
- }
- function g(t, e, i, n) {
- if (t && e) {
- if (t.reduce && t.reduce === Og) return t.reduce(e, i, n);
- for (var r = 0, a = t.length; a > r; r++) i = e.call(n, i, t[r], r, t);
- return i;
- }
- }
- function m(t, e, i) {
- if (t && e) {
- if (t.filter && t.filter === kg) return t.filter(e, i);
- for (var n = [], r = 0, a = t.length; a > r; r++) e.call(i, t[r], r, t) && n.push(t[r]);
- return n;
- }
- }
- function v(t, e, i) {
- if (t && e) for (var n = 0, r = t.length; r > n; n++) if (e.call(i, t[n], n, t)) return t[n];
- }
- function y(t, e) {
- var i = Pg.call(arguments, 2);
- return function () {
- return t.apply(e, i.concat(Pg.call(arguments)));
- };
- }
- function _(t) {
- var e = Pg.call(arguments, 1);
- return function () {
- return t.apply(this, e.concat(Pg.call(arguments)));
- };
- }
- function x(t) {
- return "[object Array]" === Cg.call(t);
- }
- function w(t) {
- return "function" == typeof t;
- }
- function b(t) {
- return "[object String]" === Cg.call(t);
- }
- function S(t) {
- var e = typeof t;
- return "function" === e || !!t && "object" === e;
- }
- function M(t) {
- return !!Ig[Cg.call(t)];
- }
- function I(t) {
- return !!Tg[Cg.call(t)];
- }
- function T(t) {
- return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument;
- }
- function C(t) {
- return t !== t;
- }
- function D() {
- for (var t = 0, e = arguments.length; e > t; t++) if (null != arguments[t]) return arguments[t];
- }
- function A(t, e) {
- return null != t ? t : e;
- }
- function k(t, e, i) {
- return null != t ? t : null != e ? e : i;
- }
- function P() {
- return Function.call.apply(Pg, arguments);
- }
- function L(t) {
- if ("number" == typeof t) return [t, t, t, t];
- var e = t.length;
- return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t;
- }
- function O(t, e) {
- if (!t) throw new Error(e);
- }
- function z(t) {
- return null == t ? null : "function" == typeof t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
- }
- function E(t) {
- t[Bg] = !0;
- }
- function R(t) {
- return t[Bg];
- }
- function B(t) {
- function e(t, e) {
- i ? n.set(t, e) : n.set(e, t);
- }
- var i = x(t);
- this.data = {};
- var n = this;
- t instanceof B ? t.each(e) : t && f(t, e);
- }
- function N(t) {
- return new B(t);
- }
- function F(t, e) {
- for (var i = new t.constructor(t.length + e.length), n = 0; n < t.length; n++) i[n] = t[n];
- var r = t.length;
- for (n = 0; n < e.length; n++) i[n + r] = e[n];
- return i;
- }
- function G() {}
- function V(t, e) {
- var i = new Fg(2);
- return null == t && (t = 0), null == e && (e = 0), i[0] = t, i[1] = e, i;
- }
- function H(t, e) {
- return t[0] = e[0], t[1] = e[1], t;
- }
- function W(t) {
- var e = new Fg(2);
- return e[0] = t[0], e[1] = t[1], e;
- }
- function U(t, e, i) {
- return t[0] = e, t[1] = i, t;
- }
- function X(t, e, i) {
- return t[0] = e[0] + i[0], t[1] = e[1] + i[1], t;
- }
- function Y(t, e, i, n) {
- return t[0] = e[0] + i[0] * n, t[1] = e[1] + i[1] * n, t;
- }
- function j(t, e, i) {
- return t[0] = e[0] - i[0], t[1] = e[1] - i[1], t;
- }
- function q(t) {
- return Math.sqrt(Z(t));
- }
- function Z(t) {
- return t[0] * t[0] + t[1] * t[1];
- }
- function K(t, e, i) {
- return t[0] = e[0] * i[0], t[1] = e[1] * i[1], t;
- }
- function $(t, e, i) {
- return t[0] = e[0] / i[0], t[1] = e[1] / i[1], t;
- }
- function Q(t, e) {
- return t[0] * e[0] + t[1] * e[1];
- }
- function J(t, e, i) {
- return t[0] = e[0] * i, t[1] = e[1] * i, t;
- }
- function te(t, e) {
- var i = q(e);
- return 0 === i ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / i, t[1] = e[1] / i), t;
- }
- function ee(t, e) {
- return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]));
- }
- function ie(t, e) {
- return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]);
- }
- function ne(t, e) {
- return t[0] = -e[0], t[1] = -e[1], t;
- }
- function re(t, e, i, n) {
- return t[0] = e[0] + n * (i[0] - e[0]), t[1] = e[1] + n * (i[1] - e[1]), t;
- }
- function ae(t, e, i) {
- var n = e[0],
- r = e[1];
- return t[0] = i[0] * n + i[2] * r + i[4], t[1] = i[1] * n + i[3] * r + i[5], t;
- }
- function oe(t, e, i) {
- return t[0] = Math.min(e[0], i[0]), t[1] = Math.min(e[1], i[1]), t;
- }
- function se(t, e, i) {
- return t[0] = Math.max(e[0], i[0]), t[1] = Math.max(e[1], i[1]), t;
- }
- function le() {
- this.on("mousedown", this._dragStart, this), this.on("mousemove", this._drag, this), this.on("mouseup", this._dragEnd, this), this.on("globalout", this._dragEnd, this);
- }
- function ue(t, e) {
- return {
- target: t,
- topTarget: e && e.topTarget
- };
- }
- function he(t, e) {
- var i = t._$eventProcessor;
- return null != e && i && i.normalizeQuery && (e = i.normalizeQuery(e)), e;
- }
- function ce(t, e, i, n, r, a) {
- var o = t._$handlers;
- if ("function" == typeof i && (r = n, n = i, i = null), !n || !e) return t;
- i = he(t, i), o[e] || (o[e] = []);
- for (var s = 0; s < o[e].length; s++) if (o[e][s].h === n) return t;
- var l = {
- h: n,
- one: a,
- query: i,
- ctx: r || t,
- callAtLast: n.zrEventfulCallAtLast
- },
- u = o[e].length - 1,
- h = o[e][u];
- return h && h.callAtLast ? o[e].splice(u, 0, l) : o[e].push(l), t;
- }
- function de(t, e, i, n, r, a) {
- var o = n + "-" + r,
- s = t.length;
- if (a.hasOwnProperty(o)) return a[o];
- if (1 === e) {
- var l = Math.round(Math.log((1 << s) - 1 & ~r) / jg);
- return t[i][l];
- }
- for (var u = n | 1 << i, h = i + 1; n & 1 << h;) h++;
- for (var c = 0, d = 0, f = 0; s > d; d++) {
- var p = 1 << d;
- p & r || (c += (f % 2 ? -1 : 1) * t[i][d] * de(t, e - 1, h, u, r | p, a), f++);
- }
- return a[o] = c, c;
- }
- function fe(t, e) {
- var i = [[t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]], [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]], [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]], [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]], [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]], [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]], [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]], [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]],
- n = {},
- r = de(i, 8, 0, 0, 0, n);
- if (0 !== r) {
- for (var a = [], o = 0; 8 > o; o++) for (var s = 0; 8 > s; s++) null == a[s] && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * de(i, 7, 0 === o ? 1 : 0, 1 << o, 1 << s, n) / r * e[o];
- return function (t, e, i) {
- var n = e * a[6] + i * a[7] + 1;
- t[0] = (e * a[0] + i * a[1] + a[2]) / n, t[1] = (e * a[3] + i * a[4] + a[5]) / n;
- };
- }
- }
- function pe(t, e, i, n) {
- return i = i || {}, n || !Mg.canvasSupported ? ge(t, e, i) : Mg.browser.firefox && null != e.layerX && e.layerX !== e.offsetX ? (i.zrX = e.layerX, i.zrY = e.layerY) : null != e.offsetX ? (i.zrX = e.offsetX, i.zrY = e.offsetY) : ge(t, e, i), i;
- }
- function ge(t, e, i) {
- if (t.getBoundingClientRect && Mg.domSupported) {
- var n = e.clientX,
- r = e.clientY;
- if ("CANVAS" === t.nodeName.toUpperCase()) {
- var a = t.getBoundingClientRect();
- return i.zrX = n - a.left, void (i.zrY = r - a.top);
- }
- var o = t[Kg] || (t[Kg] = {}),
- s = ve(me(t, o), o);
- if (s) return s($g, n, r), i.zrX = $g[0], void (i.zrY = $g[1]);
- }
- i.zrX = i.zrY = 0;
- }
- function me(t, e) {
- var i = e.markers;
- if (i) return i;
- i = e.markers = [];
- for (var n = ["left", "right"], r = ["top", "bottom"], a = 0; 4 > a; a++) {
- var o = document.createElement("div"),
- s = o.style,
- l = a % 2,
- u = (a >> 1) % 2;
- s.cssText = ["position:absolute", "visibility: hidden", "padding: 0", "margin: 0", "border-width: 0", "width:0", "height:0", n[l] + ":0", r[u] + ":0", n[1 - l] + ":auto", r[1 - u] + ":auto", ""].join("!important;"), t.appendChild(o), i.push(o);
- }
- return i;
- }
- function ve(t, e) {
- for (var i = e.transformer, n = e.srcCoords, r = !0, a = [], o = [], s = 0; 4 > s; s++) {
- var l = t[s].getBoundingClientRect(),
- u = 2 * s,
- h = l.left,
- c = l.top;
- a.push(h, c), r &= n && h === n[u] && c === n[u + 1], o.push(t[s].offsetLeft, t[s].offsetTop);
- }
- return r ? i : (e.srcCoords = a, e.transformer = fe(a, o));
- }
- function ye(t, e, i) {
- if (e = e || window.event, null != e.zrX) return e;
- var n = e.type,
- r = n && n.indexOf("touch") >= 0;
- if (r) {
- var a = "touchend" !== n ? e.targetTouches[0] : e.changedTouches[0];
- a && pe(t, a, e, i);
- } else pe(t, e, e, i), e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3;
- var o = e.button;
- return null == e.which && void 0 !== o && Zg.test(e.type) && (e.which = 1 & o ? 1 : 2 & o ? 3 : 4 & o ? 2 : 0), e;
- }
- function _e(t, e, i) {
- qg ? t.addEventListener(e, i) : t.attachEvent("on" + e, i);
- }
- function xe(t, e, i) {
- qg ? t.removeEventListener(e, i) : t.detachEvent("on" + e, i);
- }
- function we(t) {
- return 2 === t.which || 3 === t.which;
- }
- function be(t) {
- var e = t[1][0] - t[0][0],
- i = t[1][1] - t[0][1];
- return Math.sqrt(e * e + i * i);
- }
- function Se(t) {
- return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2];
- }
- function Me(t, e, i) {
- return {
- type: t,
- event: i,
- target: e.target,
- topTarget: e.topTarget,
- cancelBubble: !1,
- offsetX: i.zrX,
- offsetY: i.zrY,
- gestureEvent: i.gestureEvent,
- pinchX: i.pinchX,
- pinchY: i.pinchY,
- pinchScale: i.pinchScale,
- wheelDelta: i.zrDelta,
- zrByTouch: i.zrByTouch,
- which: i.which,
- stop: Ie
- };
- }
- function Ie() {
- Qg(this.event);
- }
- function Te() {}
- function Ce(t, e, i) {
- if (t[t.rectHover ? "rectContain" : "contain"](e, i)) {
- for (var n, r = t; r;) {
- if (r.clipPath && !r.clipPath.contain(e, i)) return !1;
- r.silent && (n = !0), r = r.parent;
- }
- return n ? em : !0;
- }
- return !1;
- }
- function De() {
- var t = new rm(6);
- return Ae(t), t;
- }
- function Ae(t) {
- return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t;
- }
- function ke(t, e) {
- return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t;
- }
- function Pe(t, e, i) {
- var n = e[0] * i[0] + e[2] * i[1],
- r = e[1] * i[0] + e[3] * i[1],
- a = e[0] * i[2] + e[2] * i[3],
- o = e[1] * i[2] + e[3] * i[3],
- s = e[0] * i[4] + e[2] * i[5] + e[4],
- l = e[1] * i[4] + e[3] * i[5] + e[5];
- return t[0] = n, t[1] = r, t[2] = a, t[3] = o, t[4] = s, t[5] = l, t;
- }
- function Le(t, e, i) {
- return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4] + i[0], t[5] = e[5] + i[1], t;
- }
- function Oe(t, e, i) {
- var n = e[0],
- r = e[2],
- a = e[4],
- o = e[1],
- s = e[3],
- l = e[5],
- u = Math.sin(i),
- h = Math.cos(i);
- return t[0] = n * h + o * u, t[1] = -n * u + o * h, t[2] = r * h + s * u, t[3] = -r * u + h * s, t[4] = h * a + u * l, t[5] = h * l - u * a, t;
- }
- function ze(t, e, i) {
- var n = i[0],
- r = i[1];
- return t[0] = e[0] * n, t[1] = e[1] * r, t[2] = e[2] * n, t[3] = e[3] * r, t[4] = e[4] * n, t[5] = e[5] * r, t;
- }
- function Ee(t, e) {
- var i = e[0],
- n = e[2],
- r = e[4],
- a = e[1],
- o = e[3],
- s = e[5],
- l = i * o - a * n;
- return l ? (l = 1 / l, t[0] = o * l, t[1] = -a * l, t[2] = -n * l, t[3] = i * l, t[4] = (n * s - o * r) * l, t[5] = (a * r - i * s) * l, t) : null;
- }
- function Re(t) {
- var e = De();
- return ke(e, t), e;
- }
- function Be(t) {
- return t > sm || -sm > t;
- }
- function Ne(t) {
- this._target = t.target, this._life = t.life || 1e3, this._delay = t.delay || 0, this._initialized = !1, this.loop = null == t.loop ? !1 : t.loop, this.gap = t.gap || 0, this.easing = t.easing || "Linear", this.onframe = t.onframe, this.ondestroy = t.ondestroy, this.onrestart = t.onrestart, this._pausedTime = 0, this._paused = !1;
- }
- function Fe(t) {
- return t = Math.round(t), 0 > t ? 0 : t > 255 ? 255 : t;
- }
- function Ge(t) {
- return t = Math.round(t), 0 > t ? 0 : t > 360 ? 360 : t;
- }
- function Ve(t) {
- return 0 > t ? 0 : t > 1 ? 1 : t;
- }
- function He(t) {
- return Fe(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 * 255 : parseInt(t, 10));
- }
- function We(t) {
- return Ve(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 : parseFloat(t));
- }
- function Ue(t, e, i) {
- return 0 > i ? i += 1 : i > 1 && (i -= 1), 1 > 6 * i ? t + (e - t) * i * 6 : 1 > 2 * i ? e : 2 > 3 * i ? t + (e - t) * (2 / 3 - i) * 6 : t;
- }
- function Xe(t, e, i) {
- return t + (e - t) * i;
- }
- function Ye(t, e, i, n, r) {
- return t[0] = e, t[1] = i, t[2] = n, t[3] = r, t;
- }
- function je(t, e) {
- return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t;
- }
- function qe(t, e) {
- wm && je(wm, e), wm = xm.put(t, wm || e.slice());
- }
- function Ze(t, e) {
- if (t) {
- e = e || [];
- var i = xm.get(t);
- if (i) return je(e, i);
- t += "";
- var n = t.replace(/ /g, "").toLowerCase();
- if (n in _m) return je(e, _m[n]), qe(t, e), e;
- if ("#" !== n.charAt(0)) {
- var r = n.indexOf("("),
- a = n.indexOf(")");
- if (-1 !== r && a + 1 === n.length) {
- var o = n.substr(0, r),
- s = n.substr(r + 1, a - (r + 1)).split(","),
- l = 1;
- switch (o) {
- case "rgba":
- if (4 !== s.length) return void Ye(e, 0, 0, 0, 1);
- l = We(s.pop());
- case "rgb":
- return 3 !== s.length ? void Ye(e, 0, 0, 0, 1) : (Ye(e, He(s[0]), He(s[1]), He(s[2]), l), qe(t, e), e);
- case "hsla":
- return 4 !== s.length ? void Ye(e, 0, 0, 0, 1) : (s[3] = We(s[3]), Ke(s, e), qe(t, e), e);
- case "hsl":
- return 3 !== s.length ? void Ye(e, 0, 0, 0, 1) : (Ke(s, e), qe(t, e), e);
- default:
- return;
- }
- }
- Ye(e, 0, 0, 0, 1);
- } else {
- if (4 === n.length) {
- var u = parseInt(n.substr(1), 16);
- return u >= 0 && 4095 >= u ? (Ye(e, (3840 & u) >> 4 | (3840 & u) >> 8, 240 & u | (240 & u) >> 4, 15 & u | (15 & u) << 4, 1), qe(t, e), e) : void Ye(e, 0, 0, 0, 1);
- }
- if (7 === n.length) {
- var u = parseInt(n.substr(1), 16);
- return u >= 0 && 16777215 >= u ? (Ye(e, (16711680 & u) >> 16, (65280 & u) >> 8, 255 & u, 1), qe(t, e), e) : void Ye(e, 0, 0, 0, 1);
- }
- }
- }
- }
- function Ke(t, e) {
- var i = (parseFloat(t[0]) % 360 + 360) % 360 / 360,
- n = We(t[1]),
- r = We(t[2]),
- a = .5 >= r ? r * (n + 1) : r + n - r * n,
- o = 2 * r - a;
- return e = e || [], Ye(e, Fe(255 * Ue(o, a, i + 1 / 3)), Fe(255 * Ue(o, a, i)), Fe(255 * Ue(o, a, i - 1 / 3)), 1), 4 === t.length && (e[3] = t[3]), e;
- }
- function $e(t) {
- if (t) {
- var e,
- i,
- n = t[0] / 255,
- r = t[1] / 255,
- a = t[2] / 255,
- o = Math.min(n, r, a),
- s = Math.max(n, r, a),
- l = s - o,
- u = (s + o) / 2;
- if (0 === l) e = 0, i = 0;else {
- i = .5 > u ? l / (s + o) : l / (2 - s - o);
- var h = ((s - n) / 6 + l / 2) / l,
- c = ((s - r) / 6 + l / 2) / l,
- d = ((s - a) / 6 + l / 2) / l;
- n === s ? e = d - c : r === s ? e = 1 / 3 + h - d : a === s && (e = 2 / 3 + c - h), 0 > e && (e += 1), e > 1 && (e -= 1);
- }
- var f = [360 * e, i, u];
- return null != t[3] && f.push(t[3]), f;
- }
- }
- function Qe(t, e) {
- var i = Ze(t);
- if (i) {
- for (var n = 0; 3 > n; n++) i[n] = 0 > e ? i[n] * (1 - e) | 0 : (255 - i[n]) * e + i[n] | 0, i[n] > 255 ? i[n] = 255 : t[n] < 0 && (i[n] = 0);
- return ri(i, 4 === i.length ? "rgba" : "rgb");
- }
- }
- function Je(t) {
- var e = Ze(t);
- return e ? ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1) : void 0;
- }
- function ti(t, e, i) {
- if (e && e.length && t >= 0 && 1 >= t) {
- i = i || [];
- var n = t * (e.length - 1),
- r = Math.floor(n),
- a = Math.ceil(n),
- o = e[r],
- s = e[a],
- l = n - r;
- return i[0] = Fe(Xe(o[0], s[0], l)), i[1] = Fe(Xe(o[1], s[1], l)), i[2] = Fe(Xe(o[2], s[2], l)), i[3] = Ve(Xe(o[3], s[3], l)), i;
- }
- }
- function ei(t, e, i) {
- if (e && e.length && t >= 0 && 1 >= t) {
- var n = t * (e.length - 1),
- r = Math.floor(n),
- a = Math.ceil(n),
- o = Ze(e[r]),
- s = Ze(e[a]),
- l = n - r,
- u = ri([Fe(Xe(o[0], s[0], l)), Fe(Xe(o[1], s[1], l)), Fe(Xe(o[2], s[2], l)), Ve(Xe(o[3], s[3], l))], "rgba");
- return i ? {
- color: u,
- leftIndex: r,
- rightIndex: a,
- value: n
- } : u;
- }
- }
- function ii(t, e, i, n) {
- return t = Ze(t), t ? (t = $e(t), null != e && (t[0] = Ge(e)), null != i && (t[1] = We(i)), null != n && (t[2] = We(n)), ri(Ke(t), "rgba")) : void 0;
- }
- function ni(t, e) {
- return t = Ze(t), t && null != e ? (t[3] = Ve(e), ri(t, "rgba")) : void 0;
- }
- function ri(t, e) {
- if (t && t.length) {
- var i = t[0] + "," + t[1] + "," + t[2];
- return ("rgba" === e || "hsva" === e || "hsla" === e) && (i += "," + t[3]), e + "(" + i + ")";
- }
- }
- function ai(t, e) {
- return t[e];
- }
- function oi(t, e, i) {
- t[e] = i;
- }
- function si(t, e, i) {
- return (e - t) * i + t;
- }
- function li(t, e, i) {
- return i > .5 ? e : t;
- }
- function ui(t, e, i, n, r) {
- var a = t.length;
- if (1 === r) for (var o = 0; a > o; o++) n[o] = si(t[o], e[o], i);else for (var s = a && t[0].length, o = 0; a > o; o++) for (var l = 0; s > l; l++) n[o][l] = si(t[o][l], e[o][l], i);
- }
- function hi(t, e, i) {
- var n = t.length,
- r = e.length;
- if (n !== r) {
- var a = n > r;
- if (a) t.length = r;else for (var o = n; r > o; o++) t.push(1 === i ? e[o] : Im.call(e[o]));
- }
- for (var s = t[0] && t[0].length, o = 0; o < t.length; o++) if (1 === i) isNaN(t[o]) && (t[o] = e[o]);else for (var l = 0; s > l; l++) isNaN(t[o][l]) && (t[o][l] = e[o][l]);
- }
- function ci(t, e, i) {
- if (t === e) return !0;
- var n = t.length;
- if (n !== e.length) return !1;
- if (1 === i) {
- for (var r = 0; n > r; r++) if (t[r] !== e[r]) return !1;
- } else for (var a = t[0].length, r = 0; n > r; r++) for (var o = 0; a > o; o++) if (t[r][o] !== e[r][o]) return !1;
- return !0;
- }
- function di(t, e, i, n, r, a, o, s, l) {
- var u = t.length;
- if (1 === l) for (var h = 0; u > h; h++) s[h] = fi(t[h], e[h], i[h], n[h], r, a, o);else for (var c = t[0].length, h = 0; u > h; h++) for (var d = 0; c > d; d++) s[h][d] = fi(t[h][d], e[h][d], i[h][d], n[h][d], r, a, o);
- }
- function fi(t, e, i, n, r, a, o) {
- var s = .5 * (i - t),
- l = .5 * (n - e);
- return (2 * (e - i) + s + l) * o + (-3 * (e - i) - 2 * s - l) * a + s * r + e;
- }
- function pi(t) {
- if (d(t)) {
- var e = t.length;
- if (d(t[0])) {
- for (var i = [], n = 0; e > n; n++) i.push(Im.call(t[n]));
- return i;
- }
- return Im.call(t);
- }
- return t;
- }
- function gi(t) {
- return t[0] = Math.floor(t[0]), t[1] = Math.floor(t[1]), t[2] = Math.floor(t[2]), "rgba(" + t.join(",") + ")";
- }
- function mi(t) {
- var e = t[t.length - 1].value;
- return d(e && e[0]) ? 2 : 1;
- }
- function vi(t, e, i, n, r, a) {
- var o = t._getter,
- s = t._setter,
- l = "spline" === e,
- u = n.length;
- if (u) {
- var h,
- c = n[0].value,
- f = d(c),
- p = !1,
- g = !1,
- m = f ? mi(n) : 0;
- n.sort(function (t, e) {
- return t.time - e.time;
- }), h = n[u - 1].time;
- for (var v = [], y = [], _ = n[0].value, x = !0, w = 0; u > w; w++) {
- v.push(n[w].time / h);
- var b = n[w].value;
- if (f && ci(b, _, m) || !f && b === _ || (x = !1), _ = b, "string" == typeof b) {
- var S = Ze(b);
- S ? (b = S, p = !0) : g = !0;
- }
- y.push(b);
- }
- if (a || !x) {
- for (var M = y[u - 1], w = 0; u - 1 > w; w++) f ? hi(y[w], M, m) : !isNaN(y[w]) || isNaN(M) || g || p || (y[w] = M);
- f && hi(o(t._target, r), M, m);
- var I,
- T,
- C,
- D,
- A,
- k,
- P = 0,
- L = 0;
- if (p) var O = [0, 0, 0, 0];
- var z = function (t, e) {
- var i;
- if (0 > e) i = 0;else if (L > e) {
- for (I = Math.min(P + 1, u - 1), i = I; i >= 0 && !(v[i] <= e); i--);
- i = Math.min(i, u - 2);
- } else {
- for (i = P; u > i && !(v[i] > e); i++);
- i = Math.min(i - 1, u - 2);
- }
- P = i, L = e;
- var n = v[i + 1] - v[i];
- if (0 !== n) if (T = (e - v[i]) / n, l) {
- if (D = y[i], C = y[0 === i ? i : i - 1], A = y[i > u - 2 ? u - 1 : i + 1], k = y[i > u - 3 ? u - 1 : i + 2], f) di(C, D, A, k, T, T * T, T * T * T, o(t, r), m);else {
- var a;
- if (p) a = di(C, D, A, k, T, T * T, T * T * T, O, 1), a = gi(O);else {
- if (g) return li(D, A, T);
- a = fi(C, D, A, k, T, T * T, T * T * T);
- }
- s(t, r, a);
- }
- } else if (f) ui(y[i], y[i + 1], T, o(t, r), m);else {
- var a;
- if (p) ui(y[i], y[i + 1], T, O, 1), a = gi(O);else {
- if (g) return li(y[i], y[i + 1], T);
- a = si(y[i], y[i + 1], T);
- }
- s(t, r, a);
- }
- },
- E = new Ne({
- target: t._target,
- life: h,
- loop: t._loop,
- delay: t._delay,
- onframe: z,
- ondestroy: i
- });
- return e && "spline" !== e && (E.easing = e), E;
- }
- }
- }
- function yi(t, e, i, n, r, a, o, s) {
- function l() {
- h--, h || a && a();
- }
- b(n) ? (a = r, r = n, n = 0) : w(r) ? (a = r, r = "linear", n = 0) : w(n) ? (a = n, n = 0) : w(i) ? (a = i, i = 500) : i || (i = 500), t.stopAnimation(), _i(t, "", t, e, i, n, s);
- var u = t.animators.slice(),
- h = u.length;
- h || a && a();
- for (var c = 0; c < u.length; c++) u[c].done(l).start(r, o);
- }
- function _i(t, e, i, n, r, a, o) {
- var s = {},
- l = 0;
- for (var u in n) n.hasOwnProperty(u) && (null != i[u] ? S(n[u]) && !d(n[u]) ? _i(t, e ? e + "." + u : u, i[u], n[u], r, a, o) : (o ? (s[u] = i[u], xi(t, e, u, n[u])) : s[u] = n[u], l++) : null == n[u] || o || xi(t, e, u, n[u]));
- l > 0 && t.animate(e, !1).when(null == r ? 500 : r, s).delay(a || 0);
- }
- function xi(t, e, i, n) {
- if (e) {
- var r = {};
- r[e] = {}, r[e][i] = n, t.attr(r);
- } else t.attr(i, n);
- }
- function wi(t, e, i, n) {
- 0 > i && (t += i, i = -i), 0 > n && (e += n, n = -n), this.x = t, this.y = e, this.width = i, this.height = n;
- }
- function bi(t) {
- for (var e = 0; t >= Nm;) e |= 1 & t, t >>= 1;
- return t + e;
- }
- function Si(t, e, i, n) {
- var r = e + 1;
- if (r === i) return 1;
- if (n(t[r++], t[e]) < 0) {
- for (; i > r && n(t[r], t[r - 1]) < 0;) r++;
- Mi(t, e, r);
- } else for (; i > r && n(t[r], t[r - 1]) >= 0;) r++;
- return r - e;
- }
- function Mi(t, e, i) {
- for (i--; i > e;) {
- var n = t[e];
- t[e++] = t[i], t[i--] = n;
- }
- }
- function Ii(t, e, i, n, r) {
- for (n === e && n++; i > n; n++) {
- for (var a, o = t[n], s = e, l = n; l > s;) a = s + l >>> 1, r(o, t[a]) < 0 ? l = a : s = a + 1;
- var u = n - s;
- switch (u) {
- case 3:
- t[s + 3] = t[s + 2];
- case 2:
- t[s + 2] = t[s + 1];
- case 1:
- t[s + 1] = t[s];
- break;
- default:
- for (; u > 0;) t[s + u] = t[s + u - 1], u--;
- }
- t[s] = o;
- }
- }
- function Ti(t, e, i, n, r, a) {
- var o = 0,
- s = 0,
- l = 1;
- if (a(t, e[i + r]) > 0) {
- for (s = n - r; s > l && a(t, e[i + r + l]) > 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
- l > s && (l = s), o += r, l += r;
- } else {
- for (s = r + 1; s > l && a(t, e[i + r - l]) <= 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
- l > s && (l = s);
- var u = o;
- o = r - l, l = r - u;
- }
- for (o++; l > o;) {
- var h = o + (l - o >>> 1);
- a(t, e[i + h]) > 0 ? o = h + 1 : l = h;
- }
- return l;
- }
- function Ci(t, e, i, n, r, a) {
- var o = 0,
- s = 0,
- l = 1;
- if (a(t, e[i + r]) < 0) {
- for (s = r + 1; s > l && a(t, e[i + r - l]) < 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
- l > s && (l = s);
- var u = o;
- o = r - l, l = r - u;
- } else {
- for (s = n - r; s > l && a(t, e[i + r + l]) >= 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
- l > s && (l = s), o += r, l += r;
- }
- for (o++; l > o;) {
- var h = o + (l - o >>> 1);
- a(t, e[i + h]) < 0 ? l = h : o = h + 1;
- }
- return l;
- }
- function Di(t, e) {
- function i(t, e) {
- l[c] = t, u[c] = e, c += 1;
- }
- function n() {
- for (; c > 1;) {
- var t = c - 2;
- if (t >= 1 && u[t - 1] <= u[t] + u[t + 1] || t >= 2 && u[t - 2] <= u[t] + u[t - 1]) u[t - 1] < u[t + 1] && t--;else if (u[t] > u[t + 1]) break;
- a(t);
- }
- }
- function r() {
- for (; c > 1;) {
- var t = c - 2;
- t > 0 && u[t - 1] < u[t + 1] && t--, a(t);
- }
- }
- function a(i) {
- var n = l[i],
- r = u[i],
- a = l[i + 1],
- h = u[i + 1];
- u[i] = r + h, i === c - 3 && (l[i + 1] = l[i + 2], u[i + 1] = u[i + 2]), c--;
- var d = Ci(t[a], t, n, r, 0, e);
- n += d, r -= d, 0 !== r && (h = Ti(t[n + r - 1], t, a, h, h - 1, e), 0 !== h && (h >= r ? o(n, r, a, h) : s(n, r, a, h)));
- }
- function o(i, n, r, a) {
- var o = 0;
- for (o = 0; n > o; o++) d[o] = t[i + o];
- var s = 0,
- l = r,
- u = i;
- if (t[u++] = t[l++], 0 !== --a) {
- if (1 === n) {
- for (o = 0; a > o; o++) t[u + o] = t[l + o];
- return void (t[u + a] = d[s]);
- }
- for (var c, f, p, g = h;;) {
- c = 0, f = 0, p = !1;
- do if (e(t[l], d[s]) < 0) {
- if (t[u++] = t[l++], f++, c = 0, 0 === --a) {
- p = !0;
- break;
- }
- } else if (t[u++] = d[s++], c++, f = 0, 1 === --n) {
- p = !0;
- break;
- } while (g > (c | f));
- if (p) break;
- do {
- if (c = Ci(t[l], d, s, n, 0, e), 0 !== c) {
- for (o = 0; c > o; o++) t[u + o] = d[s + o];
- if (u += c, s += c, n -= c, 1 >= n) {
- p = !0;
- break;
- }
- }
- if (t[u++] = t[l++], 0 === --a) {
- p = !0;
- break;
- }
- if (f = Ti(d[s], t, l, a, 0, e), 0 !== f) {
- for (o = 0; f > o; o++) t[u + o] = t[l + o];
- if (u += f, l += f, a -= f, 0 === a) {
- p = !0;
- break;
- }
- }
- if (t[u++] = d[s++], 1 === --n) {
- p = !0;
- break;
- }
- g--;
- } while (c >= Fm || f >= Fm);
- if (p) break;
- 0 > g && (g = 0), g += 2;
- }
- if (h = g, 1 > h && (h = 1), 1 === n) {
- for (o = 0; a > o; o++) t[u + o] = t[l + o];
- t[u + a] = d[s];
- } else {
- if (0 === n) throw new Error();
- for (o = 0; n > o; o++) t[u + o] = d[s + o];
- }
- } else for (o = 0; n > o; o++) t[u + o] = d[s + o];
- }
- function s(i, n, r, a) {
- var o = 0;
- for (o = 0; a > o; o++) d[o] = t[r + o];
- var s = i + n - 1,
- l = a - 1,
- u = r + a - 1,
- c = 0,
- f = 0;
- if (t[u--] = t[s--], 0 !== --n) {
- if (1 === a) {
- for (u -= n, s -= n, f = u + 1, c = s + 1, o = n - 1; o >= 0; o--) t[f + o] = t[c + o];
- return void (t[u] = d[l]);
- }
- for (var p = h;;) {
- var g = 0,
- m = 0,
- v = !1;
- do if (e(d[l], t[s]) < 0) {
- if (t[u--] = t[s--], g++, m = 0, 0 === --n) {
- v = !0;
- break;
- }
- } else if (t[u--] = d[l--], m++, g = 0, 1 === --a) {
- v = !0;
- break;
- } while (p > (g | m));
- if (v) break;
- do {
- if (g = n - Ci(d[l], t, i, n, n - 1, e), 0 !== g) {
- for (u -= g, s -= g, n -= g, f = u + 1, c = s + 1, o = g - 1; o >= 0; o--) t[f + o] = t[c + o];
- if (0 === n) {
- v = !0;
- break;
- }
- }
- if (t[u--] = d[l--], 1 === --a) {
- v = !0;
- break;
- }
- if (m = a - Ti(t[s], d, 0, a, a - 1, e), 0 !== m) {
- for (u -= m, l -= m, a -= m, f = u + 1, c = l + 1, o = 0; m > o; o++) t[f + o] = d[c + o];
- if (1 >= a) {
- v = !0;
- break;
- }
- }
- if (t[u--] = t[s--], 0 === --n) {
- v = !0;
- break;
- }
- p--;
- } while (g >= Fm || m >= Fm);
- if (v) break;
- 0 > p && (p = 0), p += 2;
- }
- if (h = p, 1 > h && (h = 1), 1 === a) {
- for (u -= n, s -= n, f = u + 1, c = s + 1, o = n - 1; o >= 0; o--) t[f + o] = t[c + o];
- t[u] = d[l];
- } else {
- if (0 === a) throw new Error();
- for (c = u - (a - 1), o = 0; a > o; o++) t[c + o] = d[o];
- }
- } else for (c = u - (a - 1), o = 0; a > o; o++) t[c + o] = d[o];
- }
- var l,
- u,
- h = Fm,
- c = 0,
- d = [];
- l = [], u = [], this.mergeRuns = n, this.forceMergeRuns = r, this.pushRun = i;
- }
- function Ai(t, e, i, n) {
- i || (i = 0), n || (n = t.length);
- var r = n - i;
- if (!(2 > r)) {
- var a = 0;
- if (Nm > r) return a = Si(t, i, n, e), void Ii(t, i, n, i + a, e);
- var o = new Di(t, e),
- s = bi(r);
- do {
- if (a = Si(t, i, n, e), s > a) {
- var l = r;
- l > s && (l = s), Ii(t, i, i + l, i + a, e), a = l;
- }
- o.pushRun(i, a), o.mergeRuns(), r -= a, i += a;
- } while (0 !== r);
- o.forceMergeRuns();
- }
- }
- function ki(t, e) {
- return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel;
- }
- function Pi(t, e, i) {
- var n = null == e.x ? 0 : e.x,
- r = null == e.x2 ? 1 : e.x2,
- a = null == e.y ? 0 : e.y,
- o = null == e.y2 ? 0 : e.y2;
- e.global || (n = n * i.width + i.x, r = r * i.width + i.x, a = a * i.height + i.y, o = o * i.height + i.y), n = isNaN(n) ? 0 : n, r = isNaN(r) ? 1 : r, a = isNaN(a) ? 0 : a, o = isNaN(o) ? 0 : o;
- var s = t.createLinearGradient(n, a, r, o);
- return s;
- }
- function Li(t, e, i) {
- var n = i.width,
- r = i.height,
- a = Math.min(n, r),
- o = null == e.x ? .5 : e.x,
- s = null == e.y ? .5 : e.y,
- l = null == e.r ? .5 : e.r;
- e.global || (o = o * n + i.x, s = s * r + i.y, l *= a);
- var u = t.createRadialGradient(o, s, 0, o, s, l);
- return u;
- }
- function Oi() {
- return !1;
- }
- function zi(t, e, i) {
- var n = Eg(),
- r = e.getWidth(),
- a = e.getHeight(),
- o = n.style;
- return o && (o.position = "absolute", o.left = 0, o.top = 0, o.width = r + "px", o.height = a + "px", n.setAttribute("data-zr-dom-id", t)), n.width = r * i, n.height = a * i, n;
- }
- function Ei(t) {
- if ("string" == typeof t) {
- var e = Jm.get(t);
- return e && e.image;
- }
- return t;
- }
- function Ri(t, e, i, n, r) {
- if (t) {
- if ("string" == typeof t) {
- if (e && e.__zrImageSrc === t || !i) return e;
- var a = Jm.get(t),
- o = {
- hostEl: i,
- cb: n,
- cbPayload: r
- };
- return a ? (e = a.image, !Ni(e) && a.pending.push(o)) : (e = new Image(), e.onload = e.onerror = Bi, Jm.put(t, e.__cachedImgObj = {
- image: e,
- pending: [o]
- }), e.src = e.__zrImageSrc = t), e;
- }
- return t;
- }
- return e;
- }
- function Bi() {
- var t = this.__cachedImgObj;
- this.onload = this.onerror = this.__cachedImgObj = null;
- for (var e = 0; e < t.pending.length; e++) {
- var i = t.pending[e],
- n = i.cb;
- n && n(this, i.cbPayload), i.hostEl.dirty();
- }
- t.pending.length = 0;
- }
- function Ni(t) {
- return t && t.width && t.height;
- }
- function Fi(t, e) {
- e = e || rv;
- var i = t + ":" + e;
- if (tv[i]) return tv[i];
- for (var n = (t + "").split("\n"), r = 0, a = 0, o = n.length; o > a; a++) r = Math.max($i(n[a], e).width, r);
- return ev > iv && (ev = 0, tv = {}), ev++, tv[i] = r, r;
- }
- function Gi(t, e, i, n, r, a, o, s) {
- return o ? Hi(t, e, i, n, r, a, o, s) : Vi(t, e, i, n, r, a, s);
- }
- function Vi(t, e, i, n, r, a, o) {
- var s = Qi(t, e, r, a, o),
- l = Fi(t, e);
- r && (l += r[1] + r[3]);
- var u = s.outerHeight,
- h = Wi(0, l, i),
- c = Ui(0, u, n),
- d = new wi(h, c, l, u);
- return d.lineHeight = s.lineHeight, d;
- }
- function Hi(t, e, i, n, r, a, o, s) {
- var l = Ji(t, {
- rich: o,
- truncate: s,
- font: e,
- textAlign: i,
- textPadding: r,
- textLineHeight: a
- }),
- u = l.outerWidth,
- h = l.outerHeight,
- c = Wi(0, u, i),
- d = Ui(0, h, n);
- return new wi(c, d, u, h);
- }
- function Wi(t, e, i) {
- return "right" === i ? t -= e : "center" === i && (t -= e / 2), t;
- }
- function Ui(t, e, i) {
- return "middle" === i ? t -= e / 2 : "bottom" === i && (t -= e), t;
- }
- function Xi(t, e, i) {
- var n = e.textPosition,
- r = e.textDistance,
- a = i.x,
- o = i.y;
- r = r || 0;
- var s = i.height,
- l = i.width,
- u = s / 2,
- h = "left",
- c = "top";
- switch (n) {
- case "left":
- a -= r, o += u, h = "right", c = "middle";
- break;
- case "right":
- a += r + l, o += u, c = "middle";
- break;
- case "top":
- a += l / 2, o -= r, h = "center", c = "bottom";
- break;
- case "bottom":
- a += l / 2, o += s + r, h = "center";
- break;
- case "inside":
- a += l / 2, o += u, h = "center", c = "middle";
- break;
- case "insideLeft":
- a += r, o += u, c = "middle";
- break;
- case "insideRight":
- a += l - r, o += u, h = "right", c = "middle";
- break;
- case "insideTop":
- a += l / 2, o += r, h = "center";
- break;
- case "insideBottom":
- a += l / 2, o += s - r, h = "center", c = "bottom";
- break;
- case "insideTopLeft":
- a += r, o += r;
- break;
- case "insideTopRight":
- a += l - r, o += r, h = "right";
- break;
- case "insideBottomLeft":
- a += r, o += s - r, c = "bottom";
- break;
- case "insideBottomRight":
- a += l - r, o += s - r, h = "right", c = "bottom";
- }
- return t = t || {}, t.x = a, t.y = o, t.textAlign = h, t.textVerticalAlign = c, t;
- }
- function Yi(t, e, i, n, r) {
- if (!e) return "";
- var a = (t + "").split("\n");
- r = ji(e, i, n, r);
- for (var o = 0, s = a.length; s > o; o++) a[o] = qi(a[o], r);
- return a.join("\n");
- }
- function ji(t, e, i, n) {
- n = o({}, n), n.font = e;
- var i = A(i, "...");
- n.maxIterations = A(n.maxIterations, 2);
- var r = n.minChar = A(n.minChar, 0);
- n.cnCharWidth = Fi("国", e);
- var a = n.ascCharWidth = Fi("a", e);
- n.placeholder = A(n.placeholder, "");
- for (var s = t = Math.max(0, t - 1), l = 0; r > l && s >= a; l++) s -= a;
- var u = Fi(i, e);
- return u > s && (i = "", u = 0), s = t - u, n.ellipsis = i, n.ellipsisWidth = u, n.contentWidth = s, n.containerWidth = t, n;
- }
- function qi(t, e) {
- var i = e.containerWidth,
- n = e.font,
- r = e.contentWidth;
- if (!i) return "";
- var a = Fi(t, n);
- if (i >= a) return t;
- for (var o = 0;; o++) {
- if (r >= a || o >= e.maxIterations) {
- t += e.ellipsis;
- break;
- }
- var s = 0 === o ? Zi(t, r, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * r / a) : 0;
- t = t.substr(0, s), a = Fi(t, n);
- }
- return "" === t && (t = e.placeholder), t;
- }
- function Zi(t, e, i, n) {
- for (var r = 0, a = 0, o = t.length; o > a && e > r; a++) {
- var s = t.charCodeAt(a);
- r += s >= 0 && 127 >= s ? i : n;
- }
- return a;
- }
- function Ki(t) {
- return Fi("国", t);
- }
- function $i(t, e) {
- return av.measureText(t, e);
- }
- function Qi(t, e, i, n, r) {
- null != t && (t += "");
- var a = A(n, Ki(e)),
- o = t ? t.split("\n") : [],
- s = o.length * a,
- l = s,
- u = !0;
- if (i && (l += i[0] + i[2]), t && r) {
- u = !1;
- var h = r.outerHeight,
- c = r.outerWidth;
- if (null != h && l > h) t = "", o = [];else if (null != c) for (var d = ji(c - (i ? i[1] + i[3] : 0), e, r.ellipsis, {
- minChar: r.minChar,
- placeholder: r.placeholder
- }), f = 0, p = o.length; p > f; f++) o[f] = qi(o[f], d);
- }
- return {
- lines: o,
- height: s,
- outerHeight: l,
- lineHeight: a,
- canCacheByTextString: u
- };
- }
- function Ji(t, e) {
- var i = {
- lines: [],
- width: 0,
- height: 0
- };
- if (null != t && (t += ""), !t) return i;
- for (var n, r = nv.lastIndex = 0; null != (n = nv.exec(t));) {
- var a = n.index;
- a > r && tn(i, t.substring(r, a)), tn(i, n[2], n[1]), r = nv.lastIndex;
- }
- r < t.length && tn(i, t.substring(r, t.length));
- var o = i.lines,
- s = 0,
- l = 0,
- u = [],
- h = e.textPadding,
- c = e.truncate,
- d = c && c.outerWidth,
- f = c && c.outerHeight;
- h && (null != d && (d -= h[1] + h[3]), null != f && (f -= h[0] + h[2]));
- for (var p = 0; p < o.length; p++) {
- for (var g = o[p], m = 0, v = 0, y = 0; y < g.tokens.length; y++) {
- var _ = g.tokens[y],
- x = _.styleName && e.rich[_.styleName] || {},
- w = _.textPadding = x.textPadding,
- b = _.font = x.font || e.font,
- S = _.textHeight = A(x.textHeight, Ki(b));
- if (w && (S += w[0] + w[2]), _.height = S, _.lineHeight = k(x.textLineHeight, e.textLineHeight, S), _.textAlign = x && x.textAlign || e.textAlign, _.textVerticalAlign = x && x.textVerticalAlign || "middle", null != f && s + _.lineHeight > f) return {
- lines: [],
- width: 0,
- height: 0
- };
- _.textWidth = Fi(_.text, b);
- var M = x.textWidth,
- I = null == M || "auto" === M;
- if ("string" == typeof M && "%" === M.charAt(M.length - 1)) _.percentWidth = M, u.push(_), M = 0;else {
- if (I) {
- M = _.textWidth;
- var T = x.textBackgroundColor,
- C = T && T.image;
- C && (C = Ei(C), Ni(C) && (M = Math.max(M, C.width * S / C.height)));
- }
- var D = w ? w[1] + w[3] : 0;
- M += D;
- var P = null != d ? d - v : null;
- null != P && M > P && (!I || D > P ? (_.text = "", _.textWidth = M = 0) : (_.text = Yi(_.text, P - D, b, c.ellipsis, {
- minChar: c.minChar
- }), _.textWidth = Fi(_.text, b), M = _.textWidth + D));
- }
- v += _.width = M, x && (m = Math.max(m, _.lineHeight));
- }
- g.width = v, g.lineHeight = m, s += m, l = Math.max(l, v);
- }
- i.outerWidth = i.width = A(e.textWidth, l), i.outerHeight = i.height = A(e.textHeight, s), h && (i.outerWidth += h[1] + h[3], i.outerHeight += h[0] + h[2]);
- for (var p = 0; p < u.length; p++) {
- var _ = u[p],
- L = _.percentWidth;
- _.width = parseInt(L, 10) / 100 * l;
- }
- return i;
- }
- function tn(t, e, i) {
- for (var n = "" === e, r = e.split("\n"), a = t.lines, o = 0; o < r.length; o++) {
- var s = r[o],
- l = {
- styleName: i,
- text: s,
- isLineHolder: !s && !n
- };
- if (o) a.push({
- tokens: [l]
- });else {
- var u = (a[a.length - 1] || (a[0] = {
- tokens: []
- })).tokens,
- h = u.length;
- 1 === h && u[0].isLineHolder ? u[0] = l : (s || !h || n) && u.push(l);
- }
- }
- }
- function en(t) {
- var e = (t.fontSize || t.fontFamily) && [t.fontStyle, t.fontWeight, (t.fontSize || 12) + "px", t.fontFamily || "sans-serif"].join(" ");
- return e && z(e) || t.textFont || t.font;
- }
- function nn(t, e) {
- var i,
- n,
- r,
- a,
- o = e.x,
- s = e.y,
- l = e.width,
- u = e.height,
- h = e.r;
- 0 > l && (o += l, l = -l), 0 > u && (s += u, u = -u), "number" == typeof h ? i = n = r = a = h : h instanceof Array ? 1 === h.length ? i = n = r = a = h[0] : 2 === h.length ? (i = r = h[0], n = a = h[1]) : 3 === h.length ? (i = h[0], n = a = h[1], r = h[2]) : (i = h[0], n = h[1], r = h[2], a = h[3]) : i = n = r = a = 0;
- var c;
- i + n > l && (c = i + n, i *= l / c, n *= l / c), r + a > l && (c = r + a, r *= l / c, a *= l / c), n + r > u && (c = n + r, n *= u / c, r *= u / c), i + a > u && (c = i + a, i *= u / c, a *= u / c), t.moveTo(o + i, s), t.lineTo(o + l - n, s), 0 !== n && t.arc(o + l - n, s + n, n, -Math.PI / 2, 0), t.lineTo(o + l, s + u - r), 0 !== r && t.arc(o + l - r, s + u - r, r, 0, Math.PI / 2), t.lineTo(o + a, s + u), 0 !== a && t.arc(o + a, s + u - a, a, Math.PI / 2, Math.PI), t.lineTo(o, s + i), 0 !== i && t.arc(o + i, s + i, i, Math.PI, 1.5 * Math.PI);
- }
- function rn(t) {
- return an(t), f(t.rich, an), t;
- }
- function an(t) {
- if (t) {
- t.font = en(t);
- var e = t.textAlign;
- "middle" === e && (e = "center"), t.textAlign = null == e || sv[e] ? e : "left";
- var i = t.textVerticalAlign || t.textBaseline;
- "center" === i && (i = "middle"), t.textVerticalAlign = null == i || lv[i] ? i : "top";
- var n = t.textPadding;
- n && (t.textPadding = L(t.textPadding));
- }
- }
- function on(t, e, i, n, r, a) {
- n.rich ? ln(t, e, i, n, r, a) : sn(t, e, i, n, r, a);
- }
- function sn(t, e, i, n, r, a) {
- var o,
- s = dn(n),
- l = !1,
- u = e.__attrCachedBy === Wm.PLAIN_TEXT;
- a !== Um ? (a && (o = a.style, l = !s && u && o), e.__attrCachedBy = s ? Wm.NONE : Wm.PLAIN_TEXT) : u && (e.__attrCachedBy = Wm.NONE);
- var h = n.font || ov;
- l && h === (o.font || ov) || (e.font = h);
- var c = t.__computedFont;
- t.__styleFont !== h && (t.__styleFont = h, c = t.__computedFont = e.font);
- var d = n.textPadding,
- f = n.textLineHeight,
- p = t.__textCotentBlock;
- (!p || t.__dirtyText) && (p = t.__textCotentBlock = Qi(i, c, d, f, n.truncate));
- var g = p.outerHeight,
- m = p.lines,
- v = p.lineHeight,
- y = gn(cv, t, n, r),
- _ = y.baseX,
- x = y.baseY,
- w = y.textAlign || "left",
- b = y.textVerticalAlign;
- hn(e, n, r, _, x);
- var S = Ui(x, g, b),
- M = _,
- I = S;
- if (s || d) {
- var T = Fi(i, c),
- C = T;
- d && (C += d[1] + d[3]);
- var D = Wi(_, C, w);
- s && fn(t, e, n, D, S, C, g), d && (M = xn(_, w, d), I += d[0]);
- }
- e.textAlign = w, e.textBaseline = "middle", e.globalAlpha = n.opacity || 1;
- for (var A = 0; A < uv.length; A++) {
- var k = uv[A],
- P = k[0],
- L = k[1],
- O = n[P];
- l && O === o[P] || (e[L] = Hm(e, L, O || k[2]));
- }
- I += v / 2;
- var z = n.textStrokeWidth,
- E = l ? o.textStrokeWidth : null,
- R = !l || z !== E,
- B = !l || R || n.textStroke !== o.textStroke,
- N = vn(n.textStroke, z),
- F = yn(n.textFill);
- if (N && (R && (e.lineWidth = z), B && (e.strokeStyle = N)), F && (l && n.textFill === o.textFill || (e.fillStyle = F)), 1 === m.length) N && e.strokeText(m[0], M, I), F && e.fillText(m[0], M, I);else for (var A = 0; A < m.length; A++) N && e.strokeText(m[A], M, I), F && e.fillText(m[A], M, I), I += v;
- }
- function ln(t, e, i, n, r, a) {
- a !== Um && (e.__attrCachedBy = Wm.NONE);
- var o = t.__textCotentBlock;
- (!o || t.__dirtyText) && (o = t.__textCotentBlock = Ji(i, n)), un(t, e, o, n, r);
- }
- function un(t, e, i, n, r) {
- var a = i.width,
- o = i.outerWidth,
- s = i.outerHeight,
- l = n.textPadding,
- u = gn(cv, t, n, r),
- h = u.baseX,
- c = u.baseY,
- d = u.textAlign,
- f = u.textVerticalAlign;
- hn(e, n, r, h, c);
- var p = Wi(h, o, d),
- g = Ui(c, s, f),
- m = p,
- v = g;
- l && (m += l[3], v += l[0]);
- var y = m + a;
- dn(n) && fn(t, e, n, p, g, o, s);
- for (var _ = 0; _ < i.lines.length; _++) {
- for (var x, w = i.lines[_], b = w.tokens, S = b.length, M = w.lineHeight, I = w.width, T = 0, C = m, D = y, A = S - 1; S > T && (x = b[T], !x.textAlign || "left" === x.textAlign);) cn(t, e, x, n, M, v, C, "left"), I -= x.width, C += x.width, T++;
- for (; A >= 0 && (x = b[A], "right" === x.textAlign);) cn(t, e, x, n, M, v, D, "right"), I -= x.width, D -= x.width, A--;
- for (C += (a - (C - m) - (y - D) - I) / 2; A >= T;) x = b[T], cn(t, e, x, n, M, v, C + x.width / 2, "center"), C += x.width, T++;
- v += M;
- }
- }
- function hn(t, e, i, n, r) {
- if (i && e.textRotation) {
- var a = e.textOrigin;
- "center" === a ? (n = i.width / 2 + i.x, r = i.height / 2 + i.y) : a && (n = a[0] + i.x, r = a[1] + i.y), t.translate(n, r), t.rotate(-e.textRotation), t.translate(-n, -r);
- }
- }
- function cn(t, e, i, n, r, a, o, s) {
- var l = n.rich[i.styleName] || {};
- l.text = i.text;
- var u = i.textVerticalAlign,
- h = a + r / 2;
- "top" === u ? h = a + i.height / 2 : "bottom" === u && (h = a + r - i.height / 2), !i.isLineHolder && dn(l) && fn(t, e, l, "right" === s ? o - i.width : "center" === s ? o - i.width / 2 : o, h - i.height / 2, i.width, i.height);
- var c = i.textPadding;
- c && (o = xn(o, s, c), h -= i.height / 2 - c[2] - i.textHeight / 2), mn(e, "shadowBlur", k(l.textShadowBlur, n.textShadowBlur, 0)), mn(e, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"), mn(e, "shadowOffsetX", k(l.textShadowOffsetX, n.textShadowOffsetX, 0)), mn(e, "shadowOffsetY", k(l.textShadowOffsetY, n.textShadowOffsetY, 0)), mn(e, "textAlign", s), mn(e, "textBaseline", "middle"), mn(e, "font", i.font || ov);
- var d = vn(l.textStroke || n.textStroke, p),
- f = yn(l.textFill || n.textFill),
- p = A(l.textStrokeWidth, n.textStrokeWidth);
- d && (mn(e, "lineWidth", p), mn(e, "strokeStyle", d), e.strokeText(i.text, o, h)), f && (mn(e, "fillStyle", f), e.fillText(i.text, o, h));
- }
- function dn(t) {
- return !!(t.textBackgroundColor || t.textBorderWidth && t.textBorderColor);
- }
- function fn(t, e, i, n, r, a, o) {
- var s = i.textBackgroundColor,
- l = i.textBorderWidth,
- u = i.textBorderColor,
- h = b(s);
- if (mn(e, "shadowBlur", i.textBoxShadowBlur || 0), mn(e, "shadowColor", i.textBoxShadowColor || "transparent"), mn(e, "shadowOffsetX", i.textBoxShadowOffsetX || 0), mn(e, "shadowOffsetY", i.textBoxShadowOffsetY || 0), h || l && u) {
- e.beginPath();
- var c = i.textBorderRadius;
- c ? nn(e, {
- x: n,
- y: r,
- width: a,
- height: o,
- r: c
- }) : e.rect(n, r, a, o), e.closePath();
- }
- if (h) {
- if (mn(e, "fillStyle", s), null != i.fillOpacity) {
- var d = e.globalAlpha;
- e.globalAlpha = i.fillOpacity * i.opacity, e.fill(), e.globalAlpha = d;
- } else e.fill();
- } else if (S(s)) {
- var f = s.image;
- f = Ri(f, null, t, pn, s), f && Ni(f) && e.drawImage(f, n, r, a, o);
- }
- if (l && u) if (mn(e, "lineWidth", l), mn(e, "strokeStyle", u), null != i.strokeOpacity) {
- var d = e.globalAlpha;
- e.globalAlpha = i.strokeOpacity * i.opacity, e.stroke(), e.globalAlpha = d;
- } else e.stroke();
- }
- function pn(t, e) {
- e.image = t;
- }
- function gn(t, e, i, n) {
- var r = i.x || 0,
- a = i.y || 0,
- o = i.textAlign,
- s = i.textVerticalAlign;
- if (n) {
- var l = i.textPosition;
- if (l instanceof Array) r = n.x + _n(l[0], n.width), a = n.y + _n(l[1], n.height);else {
- var u = e && e.calculateTextPosition ? e.calculateTextPosition(hv, i, n) : Xi(hv, i, n);
- r = u.x, a = u.y, o = o || u.textAlign, s = s || u.textVerticalAlign;
- }
- var h = i.textOffset;
- h && (r += h[0], a += h[1]);
- }
- return t = t || {}, t.baseX = r, t.baseY = a, t.textAlign = o, t.textVerticalAlign = s, t;
- }
- function mn(t, e, i) {
- return t[e] = Hm(t, e, i), t[e];
- }
- function vn(t, e) {
- return null == t || 0 >= e || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t;
- }
- function yn(t) {
- return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t;
- }
- function _n(t, e) {
- return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t;
- }
- function xn(t, e, i) {
- return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3];
- }
- function wn(t, e) {
- return null != t && (t || e.textBackgroundColor || e.textBorderWidth && e.textBorderColor || e.textPadding);
- }
- function bn(t) {
- t = t || {}, Om.call(this, t);
- for (var e in t) t.hasOwnProperty(e) && "style" !== e && (this[e] = t[e]);
- this.style = new Ym(t.style, this), this._rect = null, this.__clipPaths = null;
- }
- function Sn(t) {
- bn.call(this, t);
- }
- function Mn(t) {
- return parseInt(t, 10);
- }
- function In(t) {
- return t ? t.__builtin__ ? !0 : "function" != typeof t.resize || "function" != typeof t.refresh ? !1 : !0 : !1;
- }
- function Tn(t, e, i) {
- return yv.copy(t.getBoundingRect()), t.transform && yv.applyTransform(t.transform), _v.width = e, _v.height = i, !yv.intersect(_v);
- }
- function Cn(t, e) {
- if (t === e) return !1;
- if (!t || !e || t.length !== e.length) return !0;
- for (var i = 0; i < t.length; i++) if (t[i] !== e[i]) return !0;
- return !1;
- }
- function Dn(t, e) {
- for (var i = 0; i < t.length; i++) {
- var n = t[i];
- n.setTransform(e), e.beginPath(), n.buildPath(e, n.shape), e.clip(), n.restoreTransform(e);
- }
- }
- function An(t, e) {
- var i = document.createElement("div");
- return i.style.cssText = ["position:relative", "width:" + t + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";", i;
- }
- function kn(t) {
- return "mousewheel" === t && Mg.browser.firefox ? "DOMMouseScroll" : t;
- }
- function Pn(t) {
- t._touching = !0, clearTimeout(t._touchTimer), t._touchTimer = setTimeout(function () {
- t._touching = !1;
- }, 700);
- }
- function Ln(t) {
- var e = t.pointerType;
- return "pen" === e || "touch" === e;
- }
- function On(t) {
- function e(t, e) {
- return function () {
- return e._touching ? void 0 : t.apply(e, arguments);
- };
- }
- f(Mv, function (e) {
- t._handlers[e] = y(Cv[e], t);
- }), f(Tv, function (e) {
- t._handlers[e] = y(Cv[e], t);
- }), f(Sv, function (i) {
- t._handlers[i] = e(Cv[i], t);
- });
- }
- function zn(t) {
- function e(e, i) {
- f(e, function (e) {
- _e(t, kn(e), i._handlers[e]);
- }, i);
- }
- Yg.call(this), this.dom = t, this._touching = !1, this._touchTimer, this._handlers = {}, On(this), Mg.pointerEventsSupported ? e(Tv, this) : (Mg.touchEventsSupported && e(Mv, this), e(Sv, this));
- }
- function En(t, e) {
- var i = new Ov(bg(), t, e);
- return Pv[i.id] = i, i;
- }
- function Rn(t) {
- if (t) t.dispose();else {
- for (var e in Pv) Pv.hasOwnProperty(e) && Pv[e].dispose();
- Pv = {};
- }
- return this;
- }
- function Bn(t) {
- return Pv[t];
- }
- function Nn(t, e) {
- kv[t] = e;
- }
- function Fn(t) {
- delete Pv[t];
- }
- function Gn(t) {
- return t instanceof Array ? t : null == t ? [] : [t];
- }
- function Vn(t, e, i) {
- if (t) {
- t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
- for (var n = 0, r = i.length; r > n; n++) {
- var a = i[n];
- !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]);
- }
- }
- }
- function Hn(t) {
- return !Rv(t) || Bv(t) || t instanceof Date ? t : t.value;
- }
- function Wn(t) {
- return Rv(t) && !(t instanceof Array);
- }
- function Un(t, e) {
- e = (e || []).slice();
- var i = p(t || [], function (t) {
- return {
- exist: t
- };
- });
- return Ev(e, function (t, n) {
- if (Rv(t)) {
- for (var r = 0; r < i.length; r++) if (!i[r].option && null != t.id && i[r].exist.id === t.id + "") return i[r].option = t, void (e[n] = null);
- for (var r = 0; r < i.length; r++) {
- var a = i[r].exist;
- if (!(i[r].option || null != a.id && null != t.id || null == t.name || jn(t) || jn(a) || a.name !== t.name + "")) return i[r].option = t, void (e[n] = null);
- }
- }
- }), Ev(e, function (t) {
- if (Rv(t)) {
- for (var e = 0; e < i.length; e++) {
- var n = i[e].exist;
- if (!i[e].option && !jn(n) && null == t.id) {
- i[e].option = t;
- break;
- }
- }
- e >= i.length && i.push({
- option: t
- });
- }
- }), i;
- }
- function Xn(t) {
- var e = N();
- Ev(t, function (t) {
- var i = t.exist;
- i && e.set(i.id, t);
- }), Ev(t, function (t) {
- var i = t.option;
- O(!i || null == i.id || !e.get(i.id) || e.get(i.id) === t, "id duplicates: " + (i && i.id)), i && null != i.id && e.set(i.id, t), !t.keyInfo && (t.keyInfo = {});
- }), Ev(t, function (t, i) {
- var n = t.exist,
- r = t.option,
- a = t.keyInfo;
- if (Rv(r)) {
- if (a.name = null != r.name ? r.name + "" : n ? n.name : Nv + i, n) a.id = n.id;else if (null != r.id) a.id = r.id + "";else {
- var o = 0;
- do a.id = "\x00" + a.name + "\x00" + o++; while (e.get(a.id));
- }
- e.set(a.id, t);
- }
- });
- }
- function Yn(t) {
- var e = t.name;
- return !(!e || !e.indexOf(Nv));
- }
- function jn(t) {
- return Rv(t) && t.id && 0 === (t.id + "").indexOf("\x00_ec_\x00");
- }
- function qn(t, e) {
- return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? x(e.dataIndex) ? p(e.dataIndex, function (e) {
- return t.indexOfRawIndex(e);
- }) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? x(e.name) ? p(e.name, function (e) {
- return t.indexOfName(e);
- }) : t.indexOfName(e.name) : void 0;
- }
- function Zn() {
- var t = "__\x00ec_inner_" + Gv++ + "_" + Math.random().toFixed(5);
- return function (e) {
- return e[t] || (e[t] = {});
- };
- }
- function Kn(t, e, i) {
- if (b(e)) {
- var n = {};
- n[e + "Index"] = 0, e = n;
- }
- var r = i && i.defaultMainType;
- !r || $n(e, r + "Index") || $n(e, r + "Id") || $n(e, r + "Name") || (e[r + "Index"] = 0);
- var a = {};
- return Ev(e, function (n, r) {
- var n = e[r];
- if ("dataIndex" === r || "dataIndexInside" === r) return void (a[r] = n);
- var o = r.match(/^(\w+)(Index|Id|Name)$/) || [],
- s = o[1],
- l = (o[2] || "").toLowerCase();
- if (!(!s || !l || null == n || "index" === l && "none" === n || i && i.includeMainTypes && u(i.includeMainTypes, s) < 0)) {
- var h = {
- mainType: s
- };
- ("index" !== l || "all" !== n) && (h[l] = n);
- var c = t.queryComponents(h);
- a[s + "Models"] = c, a[s + "Model"] = c[0];
- }
- }), a;
- }
- function $n(t, e) {
- return t && t.hasOwnProperty(e);
- }
- function Qn(t, e, i) {
- t.setAttribute ? t.setAttribute(e, i) : t[e] = i;
- }
- function Jn(t, e) {
- return t.getAttribute ? t.getAttribute(e) : t[e];
- }
- function tr(t) {
- return "auto" === t ? Mg.domSupported ? "html" : "richText" : t || "html";
- }
- function er(t) {
- var e = {
- main: "",
- sub: ""
- };
- return t && (t = t.split(Vv), e.main = t[0] || "", e.sub = t[1] || ""), e;
- }
- function ir(t) {
- O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal');
- }
- function nr(t) {
- t.$constructor = t, t.extend = function (t) {
- var e = this,
- i = function () {
- t.$constructor ? t.$constructor.apply(this, arguments) : e.apply(this, arguments);
- };
- return o(i.prototype, t), i.extend = this.extend, i.superCall = ar, i.superApply = or, h(i, this), i.superClass = e, i;
- };
- }
- function rr(t) {
- var e = ["__\x00is_clz", Wv++, Math.random().toFixed(3)].join("_");
- t.prototype[e] = !0, t.isInstance = function (t) {
- return !(!t || !t[e]);
- };
- }
- function ar(t, e) {
- var i = P(arguments, 2);
- return this.superClass.prototype[e].apply(t, i);
- }
- function or(t, e, i) {
- return this.superClass.prototype[e].apply(t, i);
- }
- function sr(t, e) {
- function i(t) {
- var e = n[t.main];
- return e && e[Hv] || (e = n[t.main] = {}, e[Hv] = !0), e;
- }
- e = e || {};
- var n = {};
- if (t.registerClass = function (t, e) {
- if (e) if (ir(e), e = er(e), e.sub) {
- if (e.sub !== Hv) {
- var r = i(e);
- r[e.sub] = t;
- }
- } else n[e.main] = t;
- return t;
- }, t.getClass = function (t, e, i) {
- var r = n[t];
- if (r && r[Hv] && (r = e ? r[e] : null), i && !r) throw new Error(e ? "Component " + t + "." + (e || "") + " not exists. Load it first." : t + ".type should be specified.");
- return r;
- }, t.getClassesByMainType = function (t) {
- t = er(t);
- var e = [],
- i = n[t.main];
- return i && i[Hv] ? f(i, function (t, i) {
- i !== Hv && e.push(t);
- }) : e.push(i), e;
- }, t.hasClass = function (t) {
- return t = er(t), !!n[t.main];
- }, t.getAllClassMainTypes = function () {
- var t = [];
- return f(n, function (e, i) {
- t.push(i);
- }), t;
- }, t.hasSubTypes = function (t) {
- t = er(t);
- var e = n[t.main];
- return e && e[Hv];
- }, t.parseClassType = er, e.registerWhenExtend) {
- var r = t.extend;
- r && (t.extend = function (e) {
- var i = r.call(this, e);
- return t.registerClass(i, e.type);
- });
- }
- return t;
- }
- function lr(t) {
- return t > -$v && $v > t;
- }
- function ur(t) {
- return t > $v || -$v > t;
- }
- function hr(t, e, i, n, r) {
- var a = 1 - r;
- return a * a * (a * t + 3 * r * e) + r * r * (r * n + 3 * a * i);
- }
- function cr(t, e, i, n, r) {
- var a = 1 - r;
- return 3 * (((e - t) * a + 2 * (i - e) * r) * a + (n - i) * r * r);
- }
- function dr(t, e, i, n, r, a) {
- var o = n + 3 * (e - i) - t,
- s = 3 * (i - 2 * e + t),
- l = 3 * (e - t),
- u = t - r,
- h = s * s - 3 * o * l,
- c = s * l - 9 * o * u,
- d = l * l - 3 * s * u,
- f = 0;
- if (lr(h) && lr(c)) {
- if (lr(s)) a[0] = 0;else {
- var p = -l / s;
- p >= 0 && 1 >= p && (a[f++] = p);
- }
- } else {
- var g = c * c - 4 * h * d;
- if (lr(g)) {
- var m = c / h,
- p = -s / o + m,
- v = -m / 2;
- p >= 0 && 1 >= p && (a[f++] = p), v >= 0 && 1 >= v && (a[f++] = v);
- } else if (g > 0) {
- var y = Kv(g),
- _ = h * s + 1.5 * o * (-c + y),
- x = h * s + 1.5 * o * (-c - y);
- _ = 0 > _ ? -Zv(-_, ty) : Zv(_, ty), x = 0 > x ? -Zv(-x, ty) : Zv(x, ty);
- var p = (-s - (_ + x)) / (3 * o);
- p >= 0 && 1 >= p && (a[f++] = p);
- } else {
- var w = (2 * h * s - 3 * o * c) / (2 * Kv(h * h * h)),
- b = Math.acos(w) / 3,
- S = Kv(h),
- M = Math.cos(b),
- p = (-s - 2 * S * M) / (3 * o),
- v = (-s + S * (M + Jv * Math.sin(b))) / (3 * o),
- I = (-s + S * (M - Jv * Math.sin(b))) / (3 * o);
- p >= 0 && 1 >= p && (a[f++] = p), v >= 0 && 1 >= v && (a[f++] = v), I >= 0 && 1 >= I && (a[f++] = I);
- }
- }
- return f;
- }
- function fr(t, e, i, n, r) {
- var a = 6 * i - 12 * e + 6 * t,
- o = 9 * e + 3 * n - 3 * t - 9 * i,
- s = 3 * e - 3 * t,
- l = 0;
- if (lr(o)) {
- if (ur(a)) {
- var u = -s / a;
- u >= 0 && 1 >= u && (r[l++] = u);
- }
- } else {
- var h = a * a - 4 * o * s;
- if (lr(h)) r[0] = -a / (2 * o);else if (h > 0) {
- var c = Kv(h),
- u = (-a + c) / (2 * o),
- d = (-a - c) / (2 * o);
- u >= 0 && 1 >= u && (r[l++] = u), d >= 0 && 1 >= d && (r[l++] = d);
- }
- }
- return l;
- }
- function pr(t, e, i, n, r, a) {
- var o = (e - t) * r + t,
- s = (i - e) * r + e,
- l = (n - i) * r + i,
- u = (s - o) * r + o,
- h = (l - s) * r + s,
- c = (h - u) * r + u;
- a[0] = t, a[1] = o, a[2] = u, a[3] = c, a[4] = c, a[5] = h, a[6] = l, a[7] = n;
- }
- function gr(t, e, i, n, r, a, o, s, l, u, h) {
- var c,
- d,
- f,
- p,
- g,
- m = .005,
- v = 1 / 0;
- ey[0] = l, ey[1] = u;
- for (var y = 0; 1 > y; y += .05) iy[0] = hr(t, i, r, o, y), iy[1] = hr(e, n, a, s, y), p = Wg(ey, iy), v > p && (c = y, v = p);
- v = 1 / 0;
- for (var _ = 0; 32 > _ && !(Qv > m); _++) d = c - m, f = c + m, iy[0] = hr(t, i, r, o, d), iy[1] = hr(e, n, a, s, d), p = Wg(iy, ey), d >= 0 && v > p ? (c = d, v = p) : (ny[0] = hr(t, i, r, o, f), ny[1] = hr(e, n, a, s, f), g = Wg(ny, ey), 1 >= f && v > g ? (c = f, v = g) : m *= .5);
- return h && (h[0] = hr(t, i, r, o, c), h[1] = hr(e, n, a, s, c)), Kv(v);
- }
- function mr(t, e, i, n) {
- var r = 1 - n;
- return r * (r * t + 2 * n * e) + n * n * i;
- }
- function vr(t, e, i, n) {
- return 2 * ((1 - n) * (e - t) + n * (i - e));
- }
- function yr(t, e, i, n, r) {
- var a = t - 2 * e + i,
- o = 2 * (e - t),
- s = t - n,
- l = 0;
- if (lr(a)) {
- if (ur(o)) {
- var u = -s / o;
- u >= 0 && 1 >= u && (r[l++] = u);
- }
- } else {
- var h = o * o - 4 * a * s;
- if (lr(h)) {
- var u = -o / (2 * a);
- u >= 0 && 1 >= u && (r[l++] = u);
- } else if (h > 0) {
- var c = Kv(h),
- u = (-o + c) / (2 * a),
- d = (-o - c) / (2 * a);
- u >= 0 && 1 >= u && (r[l++] = u), d >= 0 && 1 >= d && (r[l++] = d);
- }
- }
- return l;
- }
- function _r(t, e, i) {
- var n = t + i - 2 * e;
- return 0 === n ? .5 : (t - e) / n;
- }
- function xr(t, e, i, n, r) {
- var a = (e - t) * n + t,
- o = (i - e) * n + e,
- s = (o - a) * n + a;
- r[0] = t, r[1] = a, r[2] = s, r[3] = s, r[4] = o, r[5] = i;
- }
- function wr(t, e, i, n, r, a, o, s, l) {
- var u,
- h = .005,
- c = 1 / 0;
- ey[0] = o, ey[1] = s;
- for (var d = 0; 1 > d; d += .05) {
- iy[0] = mr(t, i, r, d), iy[1] = mr(e, n, a, d);
- var f = Wg(ey, iy);
- c > f && (u = d, c = f);
- }
- c = 1 / 0;
- for (var p = 0; 32 > p && !(Qv > h); p++) {
- var g = u - h,
- m = u + h;
- iy[0] = mr(t, i, r, g), iy[1] = mr(e, n, a, g);
- var f = Wg(iy, ey);
- if (g >= 0 && c > f) u = g, c = f;else {
- ny[0] = mr(t, i, r, m), ny[1] = mr(e, n, a, m);
- var v = Wg(ny, ey);
- 1 >= m && c > v ? (u = m, c = v) : h *= .5;
- }
- }
- return l && (l[0] = mr(t, i, r, u), l[1] = mr(e, n, a, u)), Kv(c);
- }
- function br(t, e, i) {
- if (0 !== t.length) {
- var n,
- r = t[0],
- a = r[0],
- o = r[0],
- s = r[1],
- l = r[1];
- for (n = 1; n < t.length; n++) r = t[n], a = ry(a, r[0]), o = ay(o, r[0]), s = ry(s, r[1]), l = ay(l, r[1]);
- e[0] = a, e[1] = s, i[0] = o, i[1] = l;
- }
- }
- function Sr(t, e, i, n, r, a) {
- r[0] = ry(t, i), r[1] = ry(e, n), a[0] = ay(t, i), a[1] = ay(e, n);
- }
- function Mr(t, e, i, n, r, a, o, s, l, u) {
- var h,
- c = fr,
- d = hr,
- f = c(t, i, r, o, dy);
- for (l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0, h = 0; f > h; h++) {
- var p = d(t, i, r, o, dy[h]);
- l[0] = ry(p, l[0]), u[0] = ay(p, u[0]);
- }
- for (f = c(e, n, a, s, fy), h = 0; f > h; h++) {
- var g = d(e, n, a, s, fy[h]);
- l[1] = ry(g, l[1]), u[1] = ay(g, u[1]);
- }
- l[0] = ry(t, l[0]), u[0] = ay(t, u[0]), l[0] = ry(o, l[0]), u[0] = ay(o, u[0]), l[1] = ry(e, l[1]), u[1] = ay(e, u[1]), l[1] = ry(s, l[1]), u[1] = ay(s, u[1]);
- }
- function Ir(t, e, i, n, r, a, o, s) {
- var l = _r,
- u = mr,
- h = ay(ry(l(t, i, r), 1), 0),
- c = ay(ry(l(e, n, a), 1), 0),
- d = u(t, i, r, h),
- f = u(e, n, a, c);
- o[0] = ry(t, r, d), o[1] = ry(e, a, f), s[0] = ay(t, r, d), s[1] = ay(e, a, f);
- }
- function Tr(t, e, i, n, r, a, o, s, l) {
- var u = oe,
- h = se,
- c = Math.abs(r - a);
- if (1e-4 > c % ly && c > 1e-4) return s[0] = t - i, s[1] = e - n, l[0] = t + i, void (l[1] = e + n);
- if (uy[0] = sy(r) * i + t, uy[1] = oy(r) * n + e, hy[0] = sy(a) * i + t, hy[1] = oy(a) * n + e, u(s, uy, hy), h(l, uy, hy), r %= ly, 0 > r && (r += ly), a %= ly, 0 > a && (a += ly), r > a && !o ? a += ly : a > r && o && (r += ly), o) {
- var d = a;
- a = r, r = d;
- }
- for (var f = 0; a > f; f += Math.PI / 2) f > r && (cy[0] = sy(f) * i + t, cy[1] = oy(f) * n + e, u(s, cy, s), h(l, cy, l));
- }
- function Cr(t, e, i, n, r, a, o) {
- if (0 === r) return !1;
- var s = r,
- l = 0,
- u = t;
- if (o > e + s && o > n + s || e - s > o && n - s > o || a > t + s && a > i + s || t - s > a && i - s > a) return !1;
- if (t === i) return Math.abs(a - t) <= s / 2;
- l = (e - n) / (t - i), u = (t * n - i * e) / (t - i);
- var h = l * a - o + u,
- c = h * h / (l * l + 1);
- return s / 2 * s / 2 >= c;
- }
- function Dr(t, e, i, n, r, a, o, s, l, u, h) {
- if (0 === l) return !1;
- var c = l;
- if (h > e + c && h > n + c && h > a + c && h > s + c || e - c > h && n - c > h && a - c > h && s - c > h || u > t + c && u > i + c && u > r + c && u > o + c || t - c > u && i - c > u && r - c > u && o - c > u) return !1;
- var d = gr(t, e, i, n, r, a, o, s, u, h, null);
- return c / 2 >= d;
- }
- function Ar(t, e, i, n, r, a, o, s, l) {
- if (0 === o) return !1;
- var u = o;
- if (l > e + u && l > n + u && l > a + u || e - u > l && n - u > l && a - u > l || s > t + u && s > i + u && s > r + u || t - u > s && i - u > s && r - u > s) return !1;
- var h = wr(t, e, i, n, r, a, s, l, null);
- return u / 2 >= h;
- }
- function kr(t) {
- return t %= Cy, 0 > t && (t += Cy), t;
- }
- function Pr(t, e, i, n, r, a, o, s, l) {
- if (0 === o) return !1;
- var u = o;
- s -= t, l -= e;
- var h = Math.sqrt(s * s + l * l);
- if (h - u > i || i > h + u) return !1;
- if (Math.abs(n - r) % Dy < 1e-4) return !0;
- if (a) {
- var c = n;
- n = kr(r), r = kr(c);
- } else n = kr(n), r = kr(r);
- n > r && (r += Dy);
- var d = Math.atan2(l, s);
- return 0 > d && (d += Dy), d >= n && r >= d || d + Dy >= n && r >= d + Dy;
- }
- function Lr(t, e, i, n, r, a) {
- if (a > e && a > n || e > a && n > a) return 0;
- if (n === e) return 0;
- var o = e > n ? 1 : -1,
- s = (a - e) / (n - e);
- (1 === s || 0 === s) && (o = e > n ? .5 : -.5);
- var l = s * (i - t) + t;
- return l === r ? 1 / 0 : l > r ? o : 0;
- }
- function Or(t, e) {
- return Math.abs(t - e) < Py;
- }
- function zr() {
- var t = Oy[0];
- Oy[0] = Oy[1], Oy[1] = t;
- }
- function Er(t, e, i, n, r, a, o, s, l, u) {
- if (u > e && u > n && u > a && u > s || e > u && n > u && a > u && s > u) return 0;
- var h = dr(e, n, a, s, u, Ly);
- if (0 === h) return 0;
- for (var c, d, f = 0, p = -1, g = 0; h > g; g++) {
- var m = Ly[g],
- v = 0 === m || 1 === m ? .5 : 1,
- y = hr(t, i, r, o, m);
- l > y || (0 > p && (p = fr(e, n, a, s, Oy), Oy[1] < Oy[0] && p > 1 && zr(), c = hr(e, n, a, s, Oy[0]), p > 1 && (d = hr(e, n, a, s, Oy[1]))), f += 2 === p ? m < Oy[0] ? e > c ? v : -v : m < Oy[1] ? c > d ? v : -v : d > s ? v : -v : m < Oy[0] ? e > c ? v : -v : c > s ? v : -v);
- }
- return f;
- }
- function Rr(t, e, i, n, r, a, o, s) {
- if (s > e && s > n && s > a || e > s && n > s && a > s) return 0;
- var l = yr(e, n, a, s, Ly);
- if (0 === l) return 0;
- var u = _r(e, n, a);
- if (u >= 0 && 1 >= u) {
- for (var h = 0, c = mr(e, n, a, u), d = 0; l > d; d++) {
- var f = 0 === Ly[d] || 1 === Ly[d] ? .5 : 1,
- p = mr(t, i, r, Ly[d]);
- o > p || (h += Ly[d] < u ? e > c ? f : -f : c > a ? f : -f);
- }
- return h;
- }
- var f = 0 === Ly[0] || 1 === Ly[0] ? .5 : 1,
- p = mr(t, i, r, Ly[0]);
- return o > p ? 0 : e > a ? f : -f;
- }
- function Br(t, e, i, n, r, a, o, s) {
- if (s -= e, s > i || -i > s) return 0;
- var l = Math.sqrt(i * i - s * s);
- Ly[0] = -l, Ly[1] = l;
- var u = Math.abs(n - r);
- if (1e-4 > u) return 0;
- if (1e-4 > u % ky) {
- n = 0, r = ky;
- var h = a ? 1 : -1;
- return o >= Ly[0] + t && o <= Ly[1] + t ? h : 0;
- }
- if (a) {
- var l = n;
- n = kr(r), r = kr(l);
- } else n = kr(n), r = kr(r);
- n > r && (r += ky);
- for (var c = 0, d = 0; 2 > d; d++) {
- var f = Ly[d];
- if (f + t > o) {
- var p = Math.atan2(s, f),
- h = a ? 1 : -1;
- 0 > p && (p = ky + p), (p >= n && r >= p || p + ky >= n && r >= p + ky) && (p > Math.PI / 2 && p < 1.5 * Math.PI && (h = -h), c += h);
- }
- }
- return c;
- }
- function Nr(t, e, i, n, r) {
- for (var a = 0, o = 0, s = 0, l = 0, u = 0, h = 0; h < t.length;) {
- var c = t[h++];
- switch (c === Ay.M && h > 1 && (i || (a += Lr(o, s, l, u, n, r))), 1 === h && (o = t[h], s = t[h + 1], l = o, u = s), c) {
- case Ay.M:
- l = t[h++], u = t[h++], o = l, s = u;
- break;
- case Ay.L:
- if (i) {
- if (Cr(o, s, t[h], t[h + 1], e, n, r)) return !0;
- } else a += Lr(o, s, t[h], t[h + 1], n, r) || 0;
- o = t[h++], s = t[h++];
- break;
- case Ay.C:
- if (i) {
- if (Dr(o, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], e, n, r)) return !0;
- } else a += Er(o, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], n, r) || 0;
- o = t[h++], s = t[h++];
- break;
- case Ay.Q:
- if (i) {
- if (Ar(o, s, t[h++], t[h++], t[h], t[h + 1], e, n, r)) return !0;
- } else a += Rr(o, s, t[h++], t[h++], t[h], t[h + 1], n, r) || 0;
- o = t[h++], s = t[h++];
- break;
- case Ay.A:
- var d = t[h++],
- f = t[h++],
- p = t[h++],
- g = t[h++],
- m = t[h++],
- v = t[h++];
- h += 1;
- var y = 1 - t[h++],
- _ = Math.cos(m) * p + d,
- x = Math.sin(m) * g + f;
- h > 1 ? a += Lr(o, s, _, x, n, r) : (l = _, u = x);
- var w = (n - d) * g / p + d;
- if (i) {
- if (Pr(d, f, g, m, m + v, y, e, w, r)) return !0;
- } else a += Br(d, f, g, m, m + v, y, w, r);
- o = Math.cos(m + v) * p + d, s = Math.sin(m + v) * g + f;
- break;
- case Ay.R:
- l = o = t[h++], u = s = t[h++];
- var b = t[h++],
- S = t[h++],
- _ = l + b,
- x = u + S;
- if (i) {
- if (Cr(l, u, _, u, e, n, r) || Cr(_, u, _, x, e, n, r) || Cr(_, x, l, x, e, n, r) || Cr(l, x, l, u, e, n, r)) return !0;
- } else a += Lr(_, u, _, x, n, r), a += Lr(l, x, l, u, n, r);
- break;
- case Ay.Z:
- if (i) {
- if (Cr(o, s, l, u, e, n, r)) return !0;
- } else a += Lr(o, s, l, u, n, r);
- o = l, s = u;
- }
- }
- return i || Or(s, u) || (a += Lr(o, s, l, u, n, r) || 0), 0 !== a;
- }
- function Fr(t, e, i) {
- return Nr(t, 0, !1, e, i);
- }
- function Gr(t, e, i, n) {
- return Nr(t, e, !0, i, n);
- }
- function Vr(t) {
- bn.call(this, t), this.path = null;
- }
- function Hr(t, e, i, n, r, a, o, s, l, u, h) {
- var c = l * (Xy / 180),
- d = Uy(c) * (t - i) / 2 + Wy(c) * (e - n) / 2,
- f = -1 * Wy(c) * (t - i) / 2 + Uy(c) * (e - n) / 2,
- p = d * d / (o * o) + f * f / (s * s);
- p > 1 && (o *= Hy(p), s *= Hy(p));
- var g = (r === a ? -1 : 1) * Hy((o * o * s * s - o * o * f * f - s * s * d * d) / (o * o * f * f + s * s * d * d)) || 0,
- m = g * o * f / s,
- v = g * -s * d / o,
- y = (t + i) / 2 + Uy(c) * m - Wy(c) * v,
- _ = (e + n) / 2 + Wy(c) * m + Uy(c) * v,
- x = qy([1, 0], [(d - m) / o, (f - v) / s]),
- w = [(d - m) / o, (f - v) / s],
- b = [(-1 * d - m) / o, (-1 * f - v) / s],
- S = qy(w, b);
- jy(w, b) <= -1 && (S = Xy), jy(w, b) >= 1 && (S = 0), 0 === a && S > 0 && (S -= 2 * Xy), 1 === a && 0 > S && (S += 2 * Xy), h.addData(u, y, _, o, s, x, S, c, a);
- }
- function Wr(t) {
- if (!t) return new Ty();
- for (var e, i = 0, n = 0, r = i, a = n, o = new Ty(), s = Ty.CMD, l = t.match(Zy), u = 0; u < l.length; u++) {
- for (var h, c = l[u], d = c.charAt(0), f = c.match(Ky) || [], p = f.length, g = 0; p > g; g++) f[g] = parseFloat(f[g]);
- for (var m = 0; p > m;) {
- var v,
- y,
- _,
- x,
- w,
- b,
- S,
- M = i,
- I = n;
- switch (d) {
- case "l":
- i += f[m++], n += f[m++], h = s.L, o.addData(h, i, n);
- break;
- case "L":
- i = f[m++], n = f[m++], h = s.L, o.addData(h, i, n);
- break;
- case "m":
- i += f[m++], n += f[m++], h = s.M, o.addData(h, i, n), r = i, a = n, d = "l";
- break;
- case "M":
- i = f[m++], n = f[m++], h = s.M, o.addData(h, i, n), r = i, a = n, d = "L";
- break;
- case "h":
- i += f[m++], h = s.L, o.addData(h, i, n);
- break;
- case "H":
- i = f[m++], h = s.L, o.addData(h, i, n);
- break;
- case "v":
- n += f[m++], h = s.L, o.addData(h, i, n);
- break;
- case "V":
- n = f[m++], h = s.L, o.addData(h, i, n);
- break;
- case "C":
- h = s.C, o.addData(h, f[m++], f[m++], f[m++], f[m++], f[m++], f[m++]), i = f[m - 2], n = f[m - 1];
- break;
- case "c":
- h = s.C, o.addData(h, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n), i += f[m - 2], n += f[m - 1];
- break;
- case "S":
- v = i, y = n;
- var T = o.len(),
- C = o.data;
- e === s.C && (v += i - C[T - 4], y += n - C[T - 3]), h = s.C, M = f[m++], I = f[m++], i = f[m++], n = f[m++], o.addData(h, v, y, M, I, i, n);
- break;
- case "s":
- v = i, y = n;
- var T = o.len(),
- C = o.data;
- e === s.C && (v += i - C[T - 4], y += n - C[T - 3]), h = s.C, M = i + f[m++], I = n + f[m++], i += f[m++], n += f[m++], o.addData(h, v, y, M, I, i, n);
- break;
- case "Q":
- M = f[m++], I = f[m++], i = f[m++], n = f[m++], h = s.Q, o.addData(h, M, I, i, n);
- break;
- case "q":
- M = f[m++] + i, I = f[m++] + n, i += f[m++], n += f[m++], h = s.Q, o.addData(h, M, I, i, n);
- break;
- case "T":
- v = i, y = n;
- var T = o.len(),
- C = o.data;
- e === s.Q && (v += i - C[T - 4], y += n - C[T - 3]), i = f[m++], n = f[m++], h = s.Q, o.addData(h, v, y, i, n);
- break;
- case "t":
- v = i, y = n;
- var T = o.len(),
- C = o.data;
- e === s.Q && (v += i - C[T - 4], y += n - C[T - 3]), i += f[m++], n += f[m++], h = s.Q, o.addData(h, v, y, i, n);
- break;
- case "A":
- _ = f[m++], x = f[m++], w = f[m++], b = f[m++], S = f[m++], M = i, I = n, i = f[m++], n = f[m++], h = s.A, Hr(M, I, i, n, b, S, _, x, w, h, o);
- break;
- case "a":
- _ = f[m++], x = f[m++], w = f[m++], b = f[m++], S = f[m++], M = i, I = n, i += f[m++], n += f[m++], h = s.A, Hr(M, I, i, n, b, S, _, x, w, h, o);
- }
- }
- ("z" === d || "Z" === d) && (h = s.Z, o.addData(h), i = r, n = a), e = h;
- }
- return o.toStatic(), o;
- }
- function Ur(t, e) {
- var i = Wr(t);
- return e = e || {}, e.buildPath = function (t) {
- if (t.setData) {
- t.setData(i.data);
- var e = t.getContext();
- e && t.rebuildPath(e);
- } else {
- var e = t;
- i.rebuildPath(e);
- }
- }, e.applyTransform = function (t) {
- Vy(i, t), this.dirty(!0);
- }, e;
- }
- function Xr(t, e) {
- return new Vr(Ur(t, e));
- }
- function Yr(t, e) {
- return Vr.extend(Ur(t, e));
- }
- function jr(t, e) {
- for (var i = [], n = t.length, r = 0; n > r; r++) {
- var a = t[r];
- a.path || a.createPathProxy(), a.__dirtyPath && a.buildPath(a.path, a.shape, !0), i.push(a.path);
- }
- var o = new Vr(e);
- return o.createPathProxy(), o.buildPath = function (t) {
- t.appendPath(i);
- var e = t.getContext();
- e && t.rebuildPath(e);
- }, o;
- }
- function qr(t, e, i, n, r, a, o) {
- var s = .5 * (i - t),
- l = .5 * (n - e);
- return (2 * (e - i) + s + l) * o + (-3 * (e - i) - 2 * s - l) * a + s * r + e;
- }
- function Zr(t, e, i) {
- var n = e.points,
- r = e.smooth;
- if (n && n.length >= 2) {
- if (r && "spline" !== r) {
- var a = r_(n, r, i, e.smoothConstraint);
- t.moveTo(n[0][0], n[0][1]);
- for (var o = n.length, s = 0; (i ? o : o - 1) > s; s++) {
- var l = a[2 * s],
- u = a[2 * s + 1],
- h = n[(s + 1) % o];
- t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1]);
- }
- } else {
- "spline" === r && (n = n_(n, i)), t.moveTo(n[0][0], n[0][1]);
- for (var s = 1, c = n.length; c > s; s++) t.lineTo(n[s][0], n[s][1]);
- }
- i && t.closePath();
- }
- }
- function Kr(t, e, i) {
- var n = i && i.lineWidth;
- if (e && n) {
- var r = e.x1,
- a = e.x2,
- o = e.y1,
- s = e.y2;
- s_(2 * r) === s_(2 * a) ? t.x1 = t.x2 = Qr(r, n, !0) : (t.x1 = r, t.x2 = a), s_(2 * o) === s_(2 * s) ? t.y1 = t.y2 = Qr(o, n, !0) : (t.y1 = o, t.y2 = s);
- }
- }
- function $r(t, e, i) {
- var n = i && i.lineWidth;
- if (e && n) {
- var r = e.x,
- a = e.y,
- o = e.width,
- s = e.height;
- t.x = Qr(r, n, !0), t.y = Qr(a, n, !0), t.width = Math.max(Qr(r + o, n, !1) - t.x, 0 === o ? 0 : 1), t.height = Math.max(Qr(a + s, n, !1) - t.y, 0 === s ? 0 : 1);
- }
- }
- function Qr(t, e, i) {
- var n = s_(2 * t);
- return (n + s_(e)) % 2 === 0 ? n / 2 : (n + (i ? 1 : -1)) / 2;
- }
- function Jr(t, e, i) {
- var n = t.cpx2,
- r = t.cpy2;
- return null === n || null === r ? [(i ? cr : hr)(t.x1, t.cpx1, t.cpx2, t.x2, e), (i ? cr : hr)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(i ? vr : mr)(t.x1, t.cpx1, t.x2, e), (i ? vr : mr)(t.y1, t.cpy1, t.y2, e)];
- }
- function ta(t) {
- bn.call(this, t), this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.notClear = !0;
- }
- function ea(t) {
- return Vr.extend(t);
- }
- function ia(t, e) {
- return Yr(t, e);
- }
- function na(t, e) {
- A_[t] = e;
- }
- function ra(t) {
- return A_.hasOwnProperty(t) ? A_[t] : void 0;
- }
- function aa(t, e, i, n) {
- var r = Xr(t, e);
- return i && ("center" === n && (i = sa(i, r.getBoundingRect())), la(r, i)), r;
- }
- function oa(t, e, i) {
- var n = new Sn({
- style: {
- image: t,
- x: e.x,
- y: e.y,
- width: e.width,
- height: e.height
- },
- onload: function (t) {
- if ("center" === i) {
- var r = {
- width: t.width,
- height: t.height
- };
- n.setStyle(sa(e, r));
- }
- }
- });
- return n;
- }
- function sa(t, e) {
- var i,
- n = e.width / e.height,
- r = t.height * n;
- r <= t.width ? i = t.height : (r = t.width, i = r / n);
- var a = t.x + t.width / 2,
- o = t.y + t.height / 2;
- return {
- x: a - r / 2,
- y: o - i / 2,
- width: r,
- height: i
- };
- }
- function la(t, e) {
- if (t.applyTransform) {
- var i = t.getBoundingRect(),
- n = i.calculateTransform(e);
- t.applyTransform(n);
- }
- }
- function ua(t) {
- return Kr(t.shape, t.shape, t.style), t;
- }
- function ha(t) {
- return $r(t.shape, t.shape, t.style), t;
- }
- function ca(t) {
- return null != t && "none" !== t;
- }
- function da(t) {
- if ("string" != typeof t) return t;
- var e = L_.get(t);
- return e || (e = Qe(t, -.1), 1e4 > O_ && (L_.set(t, e), O_++)), e;
- }
- function fa(t) {
- if (t.__hoverStlDirty) {
- t.__hoverStlDirty = !1;
- var e = t.__hoverStl;
- if (!e) return void (t.__cachedNormalStl = t.__cachedNormalZ2 = null);
- var i = t.__cachedNormalStl = {};
- t.__cachedNormalZ2 = t.z2;
- var n = t.style;
- for (var r in e) null != e[r] && (i[r] = n[r]);
- i.fill = n.fill, i.stroke = n.stroke;
- }
- }
- function pa(t) {
- var e = t.__hoverStl;
- if (e && !t.__highlighted) {
- var i = t.__zr,
- n = t.useHoverLayer && i && "canvas" === i.painter.type;
- if (t.__highlighted = n ? "layer" : "plain", !(t.isGroup || !i && t.useHoverLayer)) {
- var r = t,
- a = t.style;
- n && (r = i.addHover(t), a = r.style), Ba(a), n || fa(r), a.extendFrom(e), ga(a, e, "fill"), ga(a, e, "stroke"), Ra(a), n || (t.dirty(!1), t.z2 += S_);
- }
- }
- }
- function ga(t, e, i) {
- !ca(e[i]) && ca(t[i]) && (t[i] = da(t[i]));
- }
- function ma(t) {
- var e = t.__highlighted;
- if (e && (t.__highlighted = !1, !t.isGroup)) if ("layer" === e) t.__zr && t.__zr.removeHover(t);else {
- var i = t.style,
- n = t.__cachedNormalStl;
- n && (Ba(i), t.setStyle(n), Ra(i));
- var r = t.__cachedNormalZ2;
- null != r && t.z2 - r === S_ && (t.z2 = r);
- }
- }
- function va(t, e, i) {
- var n,
- r = T_,
- a = T_;
- t.__highlighted && (r = I_, n = !0), e(t, i), t.__highlighted && (a = I_, n = !0), t.isGroup && t.traverse(function (t) {
- !t.isGroup && e(t, i);
- }), n && t.__highDownOnUpdate && t.__highDownOnUpdate(r, a);
- }
- function ya(t, e) {
- e = t.__hoverStl = e !== !1 && (t.hoverStyle || e || {}), t.__hoverStlDirty = !0, t.__highlighted && (t.__cachedNormalStl = null, ma(t), pa(t));
- }
- function _a(t) {
- !Sa(this, t) && !this.__highByOuter && va(this, pa);
- }
- function xa(t) {
- !Sa(this, t) && !this.__highByOuter && va(this, ma);
- }
- function wa(t) {
- this.__highByOuter |= 1 << (t || 0), va(this, pa);
- }
- function ba(t) {
- !(this.__highByOuter &= ~(1 << (t || 0))) && va(this, ma);
- }
- function Sa(t, e) {
- return t.__highDownSilentOnTouch && e.zrByTouch;
- }
- function Ma(t, e) {
- Ia(t, !0), va(t, ya, e);
- }
- function Ia(t, e) {
- var i = e === !1;
- if (t.__highDownSilentOnTouch = t.highDownSilentOnTouch, t.__highDownOnUpdate = t.highDownOnUpdate, !i || t.__highDownDispatcher) {
- var n = i ? "off" : "on";
- t[n]("mouseover", _a)[n]("mouseout", xa), t[n]("emphasis", wa)[n]("normal", ba), t.__highByOuter = t.__highByOuter || 0, t.__highDownDispatcher = !i;
- }
- }
- function Ta(t) {
- return !(!t || !t.__highDownDispatcher);
- }
- function Ca(t) {
- var e = D_[t];
- return null == e && 32 >= C_ && (e = D_[t] = C_++), e;
- }
- function Da(t, e, i, n, r, a, o) {
- r = r || b_;
- var s,
- l = r.labelFetcher,
- u = r.labelDataIndex,
- h = r.labelDimIndex,
- c = i.getShallow("show"),
- d = n.getShallow("show");
- (c || d) && (l && (s = l.getFormattedLabel(u, "normal", null, h)), null == s && (s = w(r.defaultText) ? r.defaultText(u, r) : r.defaultText));
- var f = c ? s : null,
- p = d ? A(l ? l.getFormattedLabel(u, "emphasis", null, h) : null, s) : null;
- (null != f || null != p) && (ka(t, i, a, r), ka(e, n, o, r, !0)), t.text = f, e.text = p;
- }
- function Aa(t, e, i) {
- var n = t.style;
- e && (Ba(n), t.setStyle(e), Ra(n)), n = t.__hoverStl, i && n && (Ba(n), o(n, i), Ra(n));
- }
- function ka(t, e, i, n, r) {
- return La(t, e, n, r), i && o(t, i), t;
- }
- function Pa(t, e, i) {
- var n,
- r = {
- isRectText: !0
- };
- i === !1 ? n = !0 : r.autoColor = i, La(t, e, r, n);
- }
- function La(t, e, i, n) {
- if (i = i || b_, i.isRectText) {
- var r;
- i.getTextPosition ? r = i.getTextPosition(e, n) : (r = e.getShallow("position") || (n ? null : "inside"), "outside" === r && (r = "top")), t.textPosition = r, t.textOffset = e.getShallow("offset");
- var a = e.getShallow("rotate");
- null != a && (a *= Math.PI / 180), t.textRotation = a, t.textDistance = A(e.getShallow("distance"), n ? null : 5);
- }
- var o,
- s = e.ecModel,
- l = s && s.option.textStyle,
- u = Oa(e);
- if (u) {
- o = {};
- for (var h in u) if (u.hasOwnProperty(h)) {
- var c = e.getModel(["rich", h]);
- za(o[h] = {}, c, l, i, n);
- }
- }
- return t.rich = o, za(t, e, l, i, n, !0), i.forceRich && !i.textStyle && (i.textStyle = {}), t;
- }
- function Oa(t) {
- for (var e; t && t !== t.ecModel;) {
- var i = (t.option || b_).rich;
- if (i) {
- e = e || {};
- for (var n in i) i.hasOwnProperty(n) && (e[n] = 1);
- }
- t = t.parentModel;
- }
- return e;
- }
- function za(t, e, i, n, r, a) {
- i = !r && i || b_, t.textFill = Ea(e.getShallow("color"), n) || i.color, t.textStroke = Ea(e.getShallow("textBorderColor"), n) || i.textBorderColor, t.textStrokeWidth = A(e.getShallow("textBorderWidth"), i.textBorderWidth), r || (a && (t.insideRollbackOpt = n, Ra(t)), null == t.textFill && (t.textFill = n.autoColor)), t.fontStyle = e.getShallow("fontStyle") || i.fontStyle, t.fontWeight = e.getShallow("fontWeight") || i.fontWeight, t.fontSize = e.getShallow("fontSize") || i.fontSize, t.fontFamily = e.getShallow("fontFamily") || i.fontFamily, t.textAlign = e.getShallow("align"), t.textVerticalAlign = e.getShallow("verticalAlign") || e.getShallow("baseline"), t.textLineHeight = e.getShallow("lineHeight"), t.textWidth = e.getShallow("width"), t.textHeight = e.getShallow("height"), t.textTag = e.getShallow("tag"), a && n.disableBox || (t.textBackgroundColor = Ea(e.getShallow("backgroundColor"), n), t.textPadding = e.getShallow("padding"), t.textBorderColor = Ea(e.getShallow("borderColor"), n), t.textBorderWidth = e.getShallow("borderWidth"), t.textBorderRadius = e.getShallow("borderRadius"), t.textBoxShadowColor = e.getShallow("shadowColor"), t.textBoxShadowBlur = e.getShallow("shadowBlur"), t.textBoxShadowOffsetX = e.getShallow("shadowOffsetX"), t.textBoxShadowOffsetY = e.getShallow("shadowOffsetY")), t.textShadowColor = e.getShallow("textShadowColor") || i.textShadowColor, t.textShadowBlur = e.getShallow("textShadowBlur") || i.textShadowBlur, t.textShadowOffsetX = e.getShallow("textShadowOffsetX") || i.textShadowOffsetX, t.textShadowOffsetY = e.getShallow("textShadowOffsetY") || i.textShadowOffsetY;
- }
- function Ea(t, e) {
- return "auto" !== t ? t : e && e.autoColor ? e.autoColor : null;
- }
- function Ra(t) {
- var e,
- i = t.textPosition,
- n = t.insideRollbackOpt;
- if (n && null == t.textFill) {
- var r = n.autoColor,
- a = n.isRectText,
- o = n.useInsideStyle,
- s = o !== !1 && (o === !0 || a && i && "string" == typeof i && i.indexOf("inside") >= 0),
- l = !s && null != r;
- (s || l) && (e = {
- textFill: t.textFill,
- textStroke: t.textStroke,
- textStrokeWidth: t.textStrokeWidth
- }), s && (t.textFill = "#fff", null == t.textStroke && (t.textStroke = r, null == t.textStrokeWidth && (t.textStrokeWidth = 2))), l && (t.textFill = r);
- }
- t.insideRollback = e;
- }
- function Ba(t) {
- var e = t.insideRollback;
- e && (t.textFill = e.textFill, t.textStroke = e.textStroke, t.textStrokeWidth = e.textStrokeWidth, t.insideRollback = null);
- }
- function Na(t, e) {
- var i = e || e.getModel("textStyle");
- return z([t.fontStyle || i && i.getShallow("fontStyle") || "", t.fontWeight || i && i.getShallow("fontWeight") || "", (t.fontSize || i && i.getShallow("fontSize") || 12) + "px", t.fontFamily || i && i.getShallow("fontFamily") || "sans-serif"].join(" "));
- }
- function Fa(t, e, i, n, r, a) {
- "function" == typeof r && (a = r, r = null);
- var o = n && n.isAnimationEnabled();
- if (o) {
- var s = t ? "Update" : "",
- l = n.getShallow("animationDuration" + s),
- u = n.getShallow("animationEasing" + s),
- h = n.getShallow("animationDelay" + s);
- "function" == typeof h && (h = h(r, n.getAnimationDelayParams ? n.getAnimationDelayParams(e, r) : null)), "function" == typeof l && (l = l(r)), l > 0 ? e.animateTo(i, l, h || 0, u, a, !!a) : (e.stopAnimation(), e.attr(i), a && a());
- } else e.stopAnimation(), e.attr(i), a && a();
- }
- function Ga(t, e, i, n, r) {
- Fa(!0, t, e, i, n, r);
- }
- function Va(t, e, i, n, r) {
- Fa(!1, t, e, i, n, r);
- }
- function Ha(t, e) {
- for (var i = Ae([]); t && t !== e;) Pe(i, t.getLocalTransform(), i), t = t.parent;
- return i;
- }
- function Wa(t, e, i) {
- return e && !d(e) && (e = lm.getLocalTransform(e)), i && (e = Ee([], e)), ae([], t, e);
- }
- function Ua(t, e, i) {
- var n = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0]),
- r = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2]),
- a = ["left" === t ? -n : "right" === t ? n : 0, "top" === t ? -r : "bottom" === t ? r : 0];
- return a = Wa(a, e, i), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top";
- }
- function Xa(t, e, i) {
- function n(t) {
- var e = {};
- return t.traverse(function (t) {
- !t.isGroup && t.anid && (e[t.anid] = t);
- }), e;
- }
- function r(t) {
- var e = {
- position: W(t.position),
- rotation: t.rotation
- };
- return t.shape && (e.shape = o({}, t.shape)), e;
- }
- if (t && e) {
- var a = n(t);
- e.traverse(function (t) {
- if (!t.isGroup && t.anid) {
- var e = a[t.anid];
- if (e) {
- var n = r(t);
- t.attr(r(e)), Ga(t, n, i, t.dataIndex);
- }
- }
- });
- }
- }
- function Ya(t, e) {
- return p(t, function (t) {
- var i = t[0];
- i = x_(i, e.x), i = w_(i, e.x + e.width);
- var n = t[1];
- return n = x_(n, e.y), n = w_(n, e.y + e.height), [i, n];
- });
- }
- function ja(t, e) {
- var i = x_(t.x, e.x),
- n = w_(t.x + t.width, e.x + e.width),
- r = x_(t.y, e.y),
- a = w_(t.y + t.height, e.y + e.height);
- return n >= i && a >= r ? {
- x: i,
- y: r,
- width: n - i,
- height: a - r
- } : void 0;
- }
- function qa(t, e, i) {
- e = o({
- rectHover: !0
- }, e);
- var n = e.style = {
- strokeNoScale: !0
- };
- return i = i || {
- x: -1,
- y: -1,
- width: 2,
- height: 2
- }, t ? 0 === t.indexOf("image://") ? (n.image = t.slice(8), s(n, i), new Sn(e)) : aa(t.replace("path://", ""), e, i, "center") : void 0;
- }
- function Za(t, e, i, n, r) {
- for (var a = 0, o = r[r.length - 1]; a < r.length; a++) {
- var s = r[a];
- if (Ka(t, e, i, n, s[0], s[1], o[0], o[1])) return !0;
- o = s;
- }
- }
- function Ka(t, e, i, n, r, a, o, s) {
- var l = i - t,
- u = n - e,
- h = o - r,
- c = s - a,
- d = $a(h, c, l, u);
- if (Qa(d)) return !1;
- var f = t - r,
- p = e - a,
- g = $a(f, p, l, u) / d;
- if (0 > g || g > 1) return !1;
- var m = $a(f, p, h, c) / d;
- return 0 > m || m > 1 ? !1 : !0;
- }
- function $a(t, e, i, n) {
- return t * n - i * e;
- }
- function Qa(t) {
- return 1e-6 >= t && t >= -1e-6;
- }
- function Ja(t, e, i) {
- this.parentModel = e, this.ecModel = i, this.option = t;
- }
- function to(t, e, i) {
- for (var n = 0; n < e.length && (!e[n] || (t = t && "object" == typeof t ? t[e[n]] : null, null != t)); n++);
- return null == t && i && (t = i.get(e)), t;
- }
- function eo(t, e) {
- var i = G_(t).getParent;
- return i ? i.call(t, e) : t.parentModel;
- }
- function io(t) {
- return [t || "", V_++, Math.random().toFixed(5)].join("_");
- }
- function no(t) {
- var e = {};
- return t.registerSubTypeDefaulter = function (t, i) {
- t = er(t), e[t.main] = i;
- }, t.determineSubType = function (i, n) {
- var r = n.type;
- if (!r) {
- var a = er(i).main;
- t.hasSubTypes(i) && e[a] && (r = e[a](n));
- }
- return r;
- }, t;
- }
- function ro(t, e) {
- function i(t) {
- var i = {},
- a = [];
- return f(t, function (o) {
- var s = n(i, o),
- l = s.originalDeps = e(o),
- h = r(l, t);
- s.entryCount = h.length, 0 === s.entryCount && a.push(o), f(h, function (t) {
- u(s.predecessor, t) < 0 && s.predecessor.push(t);
- var e = n(i, t);
- u(e.successor, t) < 0 && e.successor.push(o);
- });
- }), {
- graph: i,
- noEntryList: a
- };
- }
- function n(t, e) {
- return t[e] || (t[e] = {
- predecessor: [],
- successor: []
- }), t[e];
- }
- function r(t, e) {
- var i = [];
- return f(t, function (t) {
- u(e, t) >= 0 && i.push(t);
- }), i;
- }
- t.topologicalTravel = function (t, e, n, r) {
- function a(t) {
- l[t].entryCount--, 0 === l[t].entryCount && u.push(t);
- }
- function o(t) {
- h[t] = !0, a(t);
- }
- if (t.length) {
- var s = i(e),
- l = s.graph,
- u = s.noEntryList,
- h = {};
- for (f(t, function (t) {
- h[t] = !0;
- }); u.length;) {
- var c = u.pop(),
- d = l[c],
- p = !!h[c];
- p && (n.call(r, c, d.originalDeps.slice()), delete h[c]), f(d.successor, p ? o : a);
- }
- f(h, function () {
- throw new Error("Circle dependency may exists");
- });
- }
- };
- }
- function ao(t) {
- return t.replace(/^\s+|\s+$/g, "");
- }
- function oo(t, e, i, n) {
- var r = e[1] - e[0],
- a = i[1] - i[0];
- if (0 === r) return 0 === a ? i[0] : (i[0] + i[1]) / 2;
- if (n) {
- if (r > 0) {
- if (t <= e[0]) return i[0];
- if (t >= e[1]) return i[1];
- } else {
- if (t >= e[0]) return i[0];
- if (t <= e[1]) return i[1];
- }
- } else {
- if (t === e[0]) return i[0];
- if (t === e[1]) return i[1];
- }
- return (t - e[0]) / r * a + i[0];
- }
- function so(t, e) {
- switch (t) {
- case "center":
- case "middle":
- t = "50%";
- break;
- case "left":
- case "top":
- t = "0%";
- break;
- case "right":
- case "bottom":
- t = "100%";
- }
- return "string" == typeof t ? ao(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? 0 / 0 : +t;
- }
- function lo(t, e, i) {
- return null == e && (e = 10), e = Math.min(Math.max(0, e), 20), t = (+t).toFixed(e), i ? t : +t;
- }
- function uo(t) {
- return t.sort(function (t, e) {
- return t - e;
- }), t;
- }
- function ho(t) {
- if (t = +t, isNaN(t)) return 0;
- for (var e = 1, i = 0; Math.round(t * e) / e !== t;) e *= 10, i++;
- return i;
- }
- function co(t) {
- var e = t.toString(),
- i = e.indexOf("e");
- if (i > 0) {
- var n = +e.slice(i + 1);
- return 0 > n ? -n : 0;
- }
- var r = e.indexOf(".");
- return 0 > r ? 0 : e.length - 1 - r;
- }
- function fo(t, e) {
- var i = Math.log,
- n = Math.LN10,
- r = Math.floor(i(t[1] - t[0]) / n),
- a = Math.round(i(Math.abs(e[1] - e[0])) / n),
- o = Math.min(Math.max(-r + a, 0), 20);
- return isFinite(o) ? o : 20;
- }
- function po(t, e, i) {
- if (!t[e]) return 0;
- var n = g(t, function (t, e) {
- return t + (isNaN(e) ? 0 : e);
- }, 0);
- if (0 === n) return 0;
- for (var r = Math.pow(10, i), a = p(t, function (t) {
- return (isNaN(t) ? 0 : t) / n * r * 100;
- }), o = 100 * r, s = p(a, function (t) {
- return Math.floor(t);
- }), l = g(s, function (t, e) {
- return t + e;
- }, 0), u = p(a, function (t, e) {
- return t - s[e];
- }); o > l;) {
- for (var h = Number.NEGATIVE_INFINITY, c = null, d = 0, f = u.length; f > d; ++d) u[d] > h && (h = u[d], c = d);
- ++s[c], u[c] = 0, ++l;
- }
- return s[e] / r;
- }
- function go(t) {
- var e = 2 * Math.PI;
- return (t % e + e) % e;
- }
- function mo(t) {
- return t > -H_ && H_ > t;
- }
- function vo(t) {
- if (t instanceof Date) return t;
- if ("string" == typeof t) {
- var e = U_.exec(t);
- if (!e) return new Date(0 / 0);
- if (e[8]) {
- var i = +e[4] || 0;
- return "Z" !== e[8].toUpperCase() && (i -= e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, i, +(e[5] || 0), +e[6] || 0, +e[7] || 0));
- }
- return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, +e[7] || 0);
- }
- return new Date(null == t ? 0 / 0 : Math.round(t));
- }
- function yo(t) {
- return Math.pow(10, _o(t));
- }
- function _o(t) {
- if (0 === t) return 0;
- var e = Math.floor(Math.log(t) / Math.LN10);
- return t / Math.pow(10, e) >= 10 && e++, e;
- }
- function xo(t, e) {
- var i,
- n = _o(t),
- r = Math.pow(10, n),
- a = t / r;
- return i = e ? 1.5 > a ? 1 : 2.5 > a ? 2 : 4 > a ? 3 : 7 > a ? 5 : 10 : 1 > a ? 1 : 2 > a ? 2 : 3 > a ? 3 : 5 > a ? 5 : 10, t = i * r, n >= -20 ? +t.toFixed(0 > n ? -n : 0) : t;
- }
- function wo(t, e) {
- var i = (t.length - 1) * e + 1,
- n = Math.floor(i),
- r = +t[n - 1],
- a = i - n;
- return a ? r + a * (t[n] - r) : r;
- }
- function bo(t) {
- function e(t, i, n) {
- return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] === (n ? -1 : 1) || !n && e(t, i, 1));
- }
- t.sort(function (t, i) {
- return e(t, i, 0) ? -1 : 1;
- });
- for (var i = -1 / 0, n = 1, r = 0; r < t.length;) {
- for (var a = t[r].interval, o = t[r].close, s = 0; 2 > s; s++) a[s] <= i && (a[s] = i, o[s] = s ? 1 : 1 - n), i = a[s], n = o[s];
- a[0] === a[1] && o[0] * o[1] !== 1 ? t.splice(r, 1) : r++;
- }
- return t;
- }
- function So(t) {
- return t - parseFloat(t) >= 0;
- }
- function Mo(t) {
- return isNaN(t) ? "-" : (t = (t + "").split("."), t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (t.length > 1 ? "." + t[1] : ""));
- }
- function Io(t, e) {
- return t = (t || "").toLowerCase().replace(/-(.)/g, function (t, e) {
- return e.toUpperCase();
- }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t;
- }
- function To(t) {
- return null == t ? "" : (t + "").replace(j_, function (t, e) {
- return q_[e];
- });
- }
- function Co(t, e, i) {
- x(e) || (e = [e]);
- var n = e.length;
- if (!n) return "";
- for (var r = e[0].$vars || [], a = 0; a < r.length; a++) {
- var o = Z_[a];
- t = t.replace(K_(o), K_(o, 0));
- }
- for (var s = 0; n > s; s++) for (var l = 0; l < r.length; l++) {
- var u = e[s][r[l]];
- t = t.replace(K_(Z_[l], s), i ? To(u) : u);
- }
- return t;
- }
- function Do(t, e, i) {
- return f(e, function (e, n) {
- t = t.replace("{" + n + "}", i ? To(e) : e);
- }), t;
- }
- function Ao(t, e) {
- t = b(t) ? {
- color: t,
- extraCssText: e
- } : t || {};
- var i = t.color,
- n = t.type,
- e = t.extraCssText,
- r = t.renderMode || "html",
- a = t.markerId || "X";
- return i ? "html" === r ? "subItem" === n ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + To(i) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + To(i) + ";" + (e || "") + '"></span>' : {
- renderMode: r,
- content: "{marker" + a + "|} ",
- style: {
- color: i
- }
- } : "";
- }
- function ko(t, e) {
- return t += "", "0000".substr(0, e - t.length) + t;
- }
- function Po(t, e, i) {
- ("week" === t || "month" === t || "quarter" === t || "half-year" === t || "year" === t) && (t = "MM-dd\nyyyy");
- var n = vo(e),
- r = i ? "UTC" : "",
- a = n["get" + r + "FullYear"](),
- o = n["get" + r + "Month"]() + 1,
- s = n["get" + r + "Date"](),
- l = n["get" + r + "Hours"](),
- u = n["get" + r + "Minutes"](),
- h = n["get" + r + "Seconds"](),
- c = n["get" + r + "Milliseconds"]();
- return t = t.replace("MM", ko(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", a % 100).replace("dd", ko(s, 2)).replace("d", s).replace("hh", ko(l, 2)).replace("h", l).replace("mm", ko(u, 2)).replace("m", u).replace("ss", ko(h, 2)).replace("s", h).replace("SSS", ko(c, 3));
- }
- function Lo(t) {
- return t ? t.charAt(0).toUpperCase() + t.substr(1) : t;
- }
- function Oo(t) {
- return Gi(t.text, t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.textLineHeight, t.rich, t.truncate);
- }
- function zo(t, e, i, n, r, a, o, s) {
- return Gi(t, e, i, n, r, s, a, o);
- }
- function Eo(t, e, i, n, r) {
- var a = 0,
- o = 0;
- null == n && (n = 1 / 0), null == r && (r = 1 / 0);
- var s = 0;
- e.eachChild(function (l, u) {
- var h,
- c,
- d = l.position,
- f = l.getBoundingRect(),
- p = e.childAt(u + 1),
- g = p && p.getBoundingRect();
- if ("horizontal" === t) {
- var m = f.width + (g ? -g.x + f.x : 0);
- h = a + m, h > n || l.newline ? (a = 0, h = m, o += s + i, s = f.height) : s = Math.max(s, f.height);
- } else {
- var v = f.height + (g ? -g.y + f.y : 0);
- c = o + v, c > r || l.newline ? (a += s + i, o = 0, c = v, s = f.width) : s = Math.max(s, f.width);
- }
- l.newline || (d[0] = a, d[1] = o, "horizontal" === t ? a = h + i : o = c + i);
- });
- }
- function Ro(t, e, i) {
- i = Y_(i || 0);
- var n = e.width,
- r = e.height,
- a = so(t.left, n),
- o = so(t.top, r),
- s = so(t.right, n),
- l = so(t.bottom, r),
- u = so(t.width, n),
- h = so(t.height, r),
- c = i[2] + i[0],
- d = i[1] + i[3],
- f = t.aspect;
- switch (isNaN(u) && (u = n - s - d - a), isNaN(h) && (h = r - l - c - o), null != f && (isNaN(u) && isNaN(h) && (f > n / r ? u = .8 * n : h = .8 * r), isNaN(u) && (u = f * h), isNaN(h) && (h = u / f)), isNaN(a) && (a = n - s - u - d), isNaN(o) && (o = r - l - h - c), t.left || t.right) {
- case "center":
- a = n / 2 - u / 2 - i[3];
- break;
- case "right":
- a = n - u - d;
- }
- switch (t.top || t.bottom) {
- case "middle":
- case "center":
- o = r / 2 - h / 2 - i[0];
- break;
- case "bottom":
- o = r - h - c;
- }
- a = a || 0, o = o || 0, isNaN(u) && (u = n - d - a - (s || 0)), isNaN(h) && (h = r - c - o - (l || 0));
- var p = new wi(a + i[3], o + i[0], u, h);
- return p.margin = i, p;
- }
- function Bo(t, e, i) {
- function n(i, n) {
- var o = {},
- l = 0,
- u = {},
- h = 0,
- c = 2;
- if (J_(i, function (e) {
- u[e] = t[e];
- }), J_(i, function (t) {
- r(e, t) && (o[t] = u[t] = e[t]), a(o, t) && l++, a(u, t) && h++;
- }), s[n]) return a(e, i[1]) ? u[i[2]] = null : a(e, i[2]) && (u[i[1]] = null), u;
- if (h !== c && l) {
- if (l >= c) return o;
- for (var d = 0; d < i.length; d++) {
- var f = i[d];
- if (!r(o, f) && r(t, f)) {
- o[f] = t[f];
- break;
- }
- }
- return o;
- }
- return u;
- }
- function r(t, e) {
- return t.hasOwnProperty(e);
- }
- function a(t, e) {
- return null != t[e] && "auto" !== t[e];
- }
- function o(t, e, i) {
- J_(t, function (t) {
- e[t] = i[t];
- });
- }
- !S(i) && (i = {});
- var s = i.ignoreSize;
- !x(s) && (s = [s, s]);
- var l = n(ex[0], 0),
- u = n(ex[1], 1);
- o(ex[0], t, l), o(ex[1], t, u);
- }
- function No(t) {
- return Fo({}, t);
- }
- function Fo(t, e) {
- return e && t && J_(tx, function (i) {
- e.hasOwnProperty(i) && (t[i] = e[i]);
- }), t;
- }
- function Go(t) {
- var e = [];
- return f(ax.getClassesByMainType(t), function (t) {
- e = e.concat(t.prototype.dependencies || []);
- }), e = p(e, function (t) {
- return er(t).main;
- }), "dataset" !== t && u(e, "dataset") <= 0 && e.unshift("dataset"), e;
- }
- function Vo(t, e) {
- for (var i = t.length, n = 0; i > n; n++) if (t[n].length > e) return t[n];
- return t[i - 1];
- }
- function Ho(t) {
- var e = t.get("coordinateSystem"),
- i = {
- coordSysName: e,
- coordSysDims: [],
- axisMap: N(),
- categoryAxisMap: N()
- },
- n = hx[e];
- return n ? (n(t, i, i.axisMap, i.categoryAxisMap), i) : void 0;
- }
- function Wo(t) {
- return "category" === t.get("type");
- }
- function Uo(t) {
- this.fromDataset = t.fromDataset, this.data = t.data || (t.sourceFormat === px ? {} : []), this.sourceFormat = t.sourceFormat || gx, this.seriesLayoutBy = t.seriesLayoutBy || vx, this.dimensionsDefine = t.dimensionsDefine, this.encodeDefine = t.encodeDefine && N(t.encodeDefine), this.startIndex = t.startIndex || 0, this.dimensionsDetectCount = t.dimensionsDetectCount;
- }
- function Xo(t) {
- var e = t.option.source,
- i = gx;
- if (I(e)) i = mx;else if (x(e)) {
- 0 === e.length && (i = dx);
- for (var n = 0, r = e.length; r > n; n++) {
- var a = e[n];
- if (null != a) {
- if (x(a)) {
- i = dx;
- break;
- }
- if (S(a)) {
- i = fx;
- break;
- }
- }
- }
- } else if (S(e)) {
- for (var o in e) if (e.hasOwnProperty(o) && d(e[o])) {
- i = px;
- break;
- }
- } else if (null != e) throw new Error("Invalid data");
- _x(t).sourceFormat = i;
- }
- function Yo(t) {
- return _x(t).source;
- }
- function jo(t) {
- _x(t).datasetMap = N();
- }
- function qo(t) {
- var e = t.option,
- i = e.data,
- n = I(i) ? mx : cx,
- r = !1,
- a = e.seriesLayoutBy,
- o = e.sourceHeader,
- s = e.dimensions,
- l = ts(t);
- if (l) {
- var u = l.option;
- i = u.source, n = _x(l).sourceFormat, r = !0, a = a || u.seriesLayoutBy, null == o && (o = u.sourceHeader), s = s || u.dimensions;
- }
- var h = Zo(i, n, a, o, s),
- c = e.encode;
- !c && l && (c = Jo(t, l, i, n, a, h)), _x(t).source = new Uo({
- data: i,
- fromDataset: r,
- seriesLayoutBy: a,
- sourceFormat: n,
- dimensionsDefine: h.dimensionsDefine,
- startIndex: h.startIndex,
- dimensionsDetectCount: h.dimensionsDetectCount,
- encodeDefine: c
- });
- }
- function Zo(t, e, i, n, r) {
- if (!t) return {
- dimensionsDefine: Ko(r)
- };
- var a, o, s;
- if (e === dx) "auto" === n || null == n ? $o(function (t) {
- null != t && "-" !== t && (b(t) ? null == o && (o = 1) : o = 0);
- }, i, t, 10) : o = n ? 1 : 0, r || 1 !== o || (r = [], $o(function (t, e) {
- r[e] = null != t ? t : "";
- }, i, t)), a = r ? r.length : i === yx ? t.length : t[0] ? t[0].length : null;else if (e === fx) r || (r = Qo(t), s = !0);else if (e === px) r || (r = [], s = !0, f(t, function (t, e) {
- r.push(e);
- }));else if (e === cx) {
- var l = Hn(t[0]);
- a = x(l) && l.length || 1;
- }
- var u;
- return s && f(r, function (t, e) {
- "name" === (S(t) ? t.name : t) && (u = e);
- }), {
- startIndex: o,
- dimensionsDefine: Ko(r),
- dimensionsDetectCount: a,
- potentialNameDimIndex: u
- };
- }
- function Ko(t) {
- if (t) {
- var e = N();
- return p(t, function (t) {
- if (t = o({}, S(t) ? t : {
- name: t
- }), null == t.name) return t;
- t.name += "", null == t.displayName && (t.displayName = t.name);
- var i = e.get(t.name);
- return i ? t.name += "-" + i.count++ : e.set(t.name, {
- count: 1
- }), t;
- });
- }
- }
- function $o(t, e, i, n) {
- if (null == n && (n = 1 / 0), e === yx) for (var r = 0; r < i.length && n > r; r++) t(i[r] ? i[r][0] : null, r);else for (var a = i[0] || [], r = 0; r < a.length && n > r; r++) t(a[r], r);
- }
- function Qo(t) {
- for (var e, i = 0; i < t.length && !(e = t[i++]););
- if (e) {
- var n = [];
- return f(e, function (t, e) {
- n.push(e);
- }), n;
- }
- }
- function Jo(t, e, i, n, r, a) {
- var o = Ho(t),
- s = {},
- l = [],
- u = [],
- h = t.subType,
- c = N(["pie", "map", "funnel"]),
- d = N(["line", "bar", "pictorialBar", "scatter", "effectScatter", "candlestick", "boxplot"]);
- if (o && null != d.get(h)) {
- var p = t.ecModel,
- g = _x(p).datasetMap,
- m = e.uid + "_" + r,
- v = g.get(m) || g.set(m, {
- categoryWayDim: 1,
- valueWayDim: 0
- });
- f(o.coordSysDims, function (t) {
- if (null == o.firstCategoryDimIndex) {
- var e = v.valueWayDim++;
- s[t] = e, u.push(e);
- } else if (o.categoryAxisMap.get(t)) s[t] = 0, l.push(0);else {
- var e = v.categoryWayDim++;
- s[t] = e, u.push(e);
- }
- });
- } else if (null != c.get(h)) {
- for (var y, _ = 0; 5 > _ && null == y; _++) is(i, n, r, a.dimensionsDefine, a.startIndex, _) || (y = _);
- if (null != y) {
- s.value = y;
- var x = a.potentialNameDimIndex || Math.max(y - 1, 0);
- u.push(x), l.push(x);
- }
- }
- return l.length && (s.itemName = l), u.length && (s.seriesName = u), s;
- }
- function ts(t) {
- var e = t.option,
- i = e.data;
- return i ? void 0 : t.ecModel.getComponent("dataset", e.datasetIndex || 0);
- }
- function es(t, e) {
- return is(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e);
- }
- function is(t, e, i, n, r, a) {
- function o(t) {
- return null != t && isFinite(t) && "" !== t ? !1 : b(t) && "-" !== t ? !0 : void 0;
- }
- var s,
- l = 5;
- if (I(t)) return !1;
- var u;
- if (n && (u = n[a], u = S(u) ? u.name : u), e === dx) {
- if (i === yx) {
- for (var h = t[a], c = 0; c < (h || []).length && l > c; c++) if (null != (s = o(h[r + c]))) return s;
- } else for (var c = 0; c < t.length && l > c; c++) {
- var d = t[r + c];
- if (d && null != (s = o(d[a]))) return s;
- }
- } else if (e === fx) {
- if (!u) return;
- for (var c = 0; c < t.length && l > c; c++) {
- var f = t[c];
- if (f && null != (s = o(f[u]))) return s;
- }
- } else if (e === px) {
- if (!u) return;
- var h = t[u];
- if (!h || I(h)) return !1;
- for (var c = 0; c < h.length && l > c; c++) if (null != (s = o(h[c]))) return s;
- } else if (e === cx) for (var c = 0; c < t.length && l > c; c++) {
- var f = t[c],
- p = Hn(f);
- if (!x(p)) return !1;
- if (null != (s = o(p[a]))) return s;
- }
- return !1;
- }
- function ns(t, e) {
- if (e) {
- var i = e.seiresIndex,
- n = e.seriesId,
- r = e.seriesName;
- return null != i && t.componentIndex !== i || null != n && t.id !== n || null != r && t.name !== r;
- }
- }
- function rs(t, e) {
- var i = t.color && !t.colorLayer;
- f(e, function (e, a) {
- "colorLayer" === a && i || ax.hasClass(a) || ("object" == typeof e ? t[a] = t[a] ? r(t[a], e, !1) : n(e) : null == t[a] && (t[a] = e));
- });
- }
- function as(t) {
- t = t, this.option = {}, this.option[xx] = 1, this._componentsMap = N({
- series: []
- }), this._seriesIndices, this._seriesIndicesMap, rs(t, this._theme.option), r(t, sx, !1), this.mergeOption(t);
- }
- function os(t, e) {
- x(e) || (e = e ? [e] : []);
- var i = {};
- return f(e, function (e) {
- i[e] = (t.get(e) || []).slice();
- }), i;
- }
- function ss(t, e, i) {
- var n = e.type ? e.type : i ? i.subType : ax.determineSubType(t, e);
- return n;
- }
- function ls(t, e) {
- t._seriesIndicesMap = N(t._seriesIndices = p(e, function (t) {
- return t.componentIndex;
- }) || []);
- }
- function us(t, e) {
- return e.hasOwnProperty("subType") ? m(t, function (t) {
- return t.subType === e.subType;
- }) : t;
- }
- function hs(t) {
- f(Sx, function (e) {
- this[e] = y(t[e], t);
- }, this);
- }
- function cs() {
- this._coordinateSystems = [];
- }
- function ds(t) {
- this._api = t, this._timelineOptions = [], this._mediaList = [], this._mediaDefault, this._currentMediaIndices = [], this._optionBackup, this._newBaseOption;
- }
- function fs(t, e, i) {
- var n,
- r,
- a = [],
- o = [],
- s = t.timeline;
- if (t.baseOption && (r = t.baseOption), (s || t.options) && (r = r || {}, a = (t.options || []).slice()), t.media) {
- r = r || {};
- var l = t.media;
- Ix(l, function (t) {
- t && t.option && (t.query ? o.push(t) : n || (n = t));
- });
- }
- return r || (r = t), r.timeline || (r.timeline = s), Ix([r].concat(a).concat(p(o, function (t) {
- return t.option;
- })), function (t) {
- Ix(e, function (e) {
- e(t, i);
- });
- }), {
- baseOption: r,
- timelineOptions: a,
- mediaDefault: n,
- mediaList: o
- };
- }
- function ps(t, e, i) {
- var n = {
- width: e,
- height: i,
- aspectratio: e / i
- },
- r = !0;
- return f(t, function (t, e) {
- var i = e.match(Ax);
- if (i && i[1] && i[2]) {
- var a = i[1],
- o = i[2].toLowerCase();
- gs(n[o], t, a) || (r = !1);
- }
- }), r;
- }
- function gs(t, e, i) {
- return "min" === i ? t >= e : "max" === i ? e >= t : t === e;
- }
- function ms(t, e) {
- return t.join(",") === e.join(",");
- }
- function vs(t, e) {
- e = e || {}, Ix(e, function (e, i) {
- if (null != e) {
- var n = t[i];
- if (ax.hasClass(i)) {
- e = Gn(e), n = Gn(n);
- var r = Un(n, e);
- t[i] = Cx(r, function (t) {
- return t.option && t.exist ? Dx(t.exist, t.option, !0) : t.exist || t.option;
- });
- } else t[i] = Dx(n, e, !0);
- }
- });
- }
- function ys(t) {
- var e = t && t.itemStyle;
- if (e) for (var i = 0, n = Lx.length; n > i; i++) {
- var a = Lx[i],
- o = e.normal,
- s = e.emphasis;
- o && o[a] && (t[a] = t[a] || {}, t[a].normal ? r(t[a].normal, o[a]) : t[a].normal = o[a], o[a] = null), s && s[a] && (t[a] = t[a] || {}, t[a].emphasis ? r(t[a].emphasis, s[a]) : t[a].emphasis = s[a], s[a] = null);
- }
- }
- function _s(t, e, i) {
- if (t && t[e] && (t[e].normal || t[e].emphasis)) {
- var n = t[e].normal,
- r = t[e].emphasis;
- n && (i ? (t[e].normal = t[e].emphasis = null, s(t[e], n)) : t[e] = n), r && (t.emphasis = t.emphasis || {}, t.emphasis[e] = r);
- }
- }
- function xs(t) {
- _s(t, "itemStyle"), _s(t, "lineStyle"), _s(t, "areaStyle"), _s(t, "label"), _s(t, "labelLine"), _s(t, "upperLabel"), _s(t, "edgeLabel");
- }
- function ws(t, e) {
- var i = Px(t) && t[e],
- n = Px(i) && i.textStyle;
- if (n) for (var r = 0, a = Fv.length; a > r; r++) {
- var e = Fv[r];
- n.hasOwnProperty(e) && (i[e] = n[e]);
- }
- }
- function bs(t) {
- t && (xs(t), ws(t, "label"), t.emphasis && ws(t.emphasis, "label"));
- }
- function Ss(t) {
- if (Px(t)) {
- ys(t), xs(t), ws(t, "label"), ws(t, "upperLabel"), ws(t, "edgeLabel"), t.emphasis && (ws(t.emphasis, "label"), ws(t.emphasis, "upperLabel"), ws(t.emphasis, "edgeLabel"));
- var e = t.markPoint;
- e && (ys(e), bs(e));
- var i = t.markLine;
- i && (ys(i), bs(i));
- var n = t.markArea;
- n && bs(n);
- var r = t.data;
- if ("graph" === t.type) {
- r = r || t.nodes;
- var a = t.links || t.edges;
- if (a && !I(a)) for (var o = 0; o < a.length; o++) bs(a[o]);
- f(t.categories, function (t) {
- xs(t);
- });
- }
- if (r && !I(r)) for (var o = 0; o < r.length; o++) bs(r[o]);
- var e = t.markPoint;
- if (e && e.data) for (var s = e.data, o = 0; o < s.length; o++) bs(s[o]);
- var i = t.markLine;
- if (i && i.data) for (var l = i.data, o = 0; o < l.length; o++) x(l[o]) ? (bs(l[o][0]), bs(l[o][1])) : bs(l[o]);
- "gauge" === t.type ? (ws(t, "axisLabel"), ws(t, "title"), ws(t, "detail")) : "treemap" === t.type ? (_s(t.breadcrumb, "itemStyle"), f(t.levels, function (t) {
- xs(t);
- })) : "tree" === t.type && xs(t.leaves);
- }
- }
- function Ms(t) {
- return x(t) ? t : t ? [t] : [];
- }
- function Is(t) {
- return (x(t) ? t[0] : t) || {};
- }
- function Ts(t, e) {
- e = e.split(",");
- for (var i = t, n = 0; n < e.length && (i = i && i[e[n]], null != i); n++);
- return i;
- }
- function Cs(t, e, i, n) {
- e = e.split(",");
- for (var r, a = t, o = 0; o < e.length - 1; o++) r = e[o], null == a[r] && (a[r] = {}), a = a[r];
- (n || null == a[e[o]]) && (a[e[o]] = i);
- }
- function Ds(t) {
- f(zx, function (e) {
- e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]);
- });
- }
- function As(t) {
- f(t, function (e, i) {
- var n = [],
- r = [0 / 0, 0 / 0],
- a = [e.stackResultDimension, e.stackedOverDimension],
- o = e.data,
- s = e.isStackedByIndex,
- l = o.map(a, function (a, l, u) {
- var h = o.get(e.stackedDimension, u);
- if (isNaN(h)) return r;
- var c, d;
- s ? d = o.getRawIndex(u) : c = o.get(e.stackedByDimension, u);
- for (var f = 0 / 0, p = i - 1; p >= 0; p--) {
- var g = t[p];
- if (s || (d = g.data.rawIndexOf(g.stackedByDimension, c)), d >= 0) {
- var m = g.data.getByRawIndex(g.stackResultDimension, d);
- if (h >= 0 && m > 0 || 0 >= h && 0 > m) {
- h += m, f = m;
- break;
- }
- }
- }
- return n[0] = h, n[1] = f, n;
- });
- o.hostModel.setData(l), e.data = l;
- });
- }
- function ks(t, e) {
- Uo.isInstance(t) || (t = Uo.seriesDataToSource(t)), this._source = t;
- var i = this._data = t.data,
- n = t.sourceFormat;
- n === mx && (this._offset = 0, this._dimSize = e, this._data = i);
- var r = Fx[n === dx ? n + "_" + t.seriesLayoutBy : n];
- o(this, r);
- }
- function Ps() {
- return this._data.length;
- }
- function Ls(t) {
- return this._data[t];
- }
- function Os(t) {
- for (var e = 0; e < t.length; e++) this._data.push(t[e]);
- }
- function zs(t, e, i) {
- return null != i ? t[i] : t;
- }
- function Es(t, e, i, n) {
- return Rs(t[n], this._dimensionInfos[e]);
- }
- function Rs(t, e) {
- var i = e && e.type;
- if ("ordinal" === i) {
- var n = e && e.ordinalMeta;
- return n ? n.parseAndCollect(t) : t;
- }
- return "time" === i && "number" != typeof t && null != t && "-" !== t && (t = +vo(t)), null == t || "" === t ? 0 / 0 : +t;
- }
- function Bs(t, e, i) {
- if (t) {
- var n = t.getRawDataItem(e);
- if (null != n) {
- var r,
- a,
- o = t.getProvider().getSource().sourceFormat,
- s = t.getDimensionInfo(i);
- return s && (r = s.name, a = s.index), Gx[o](n, e, a, r);
- }
- }
- }
- function Ns(t, e, i) {
- if (t) {
- var n = t.getProvider().getSource().sourceFormat;
- if (n === cx || n === fx) {
- var r = t.getRawDataItem(e);
- return n !== cx || S(r) || (r = null), r ? r[i] : void 0;
- }
- }
- }
- function Fs(t) {
- return new Gs(t);
- }
- function Gs(t) {
- t = t || {}, this._reset = t.reset, this._plan = t.plan, this._count = t.count, this._onDirty = t.onDirty, this._dirty = !0, this.context;
- }
- function Vs(t, e, i, n, r, a) {
- Xx.reset(i, n, r, a), t._callingProgress = e, t._callingProgress({
- start: i,
- end: n,
- count: n - i,
- next: Xx.next
- }, t.context);
- }
- function Hs(t, e) {
- t._dueIndex = t._outputDueEnd = t._dueEnd = 0, t._settedOutputEnd = null;
- var i, n;
- !e && t._reset && (i = t._reset(t.context), i && i.progress && (n = i.forceFirstProgress, i = i.progress), x(i) && !i.length && (i = null)), t._progress = i, t._modBy = t._modDataCount = null;
- var r = t._downstream;
- return r && r.dirty(), n;
- }
- function Ws(t) {
- var e = t.name;
- Yn(t) || (t.name = Us(t) || e);
- }
- function Us(t) {
- var e = t.getRawData(),
- i = e.mapDimension("seriesName", !0),
- n = [];
- return f(i, function (t) {
- var i = e.getDimensionInfo(t);
- i.displayName && n.push(i.displayName);
- }), n.join(" ");
- }
- function Xs(t) {
- return t.model.getRawData().count();
- }
- function Ys(t) {
- var e = t.model;
- return e.setData(e.getRawData().cloneShallow()), js;
- }
- function js(t, e) {
- t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
- }
- function qs(t, e) {
- f(t.CHANGABLE_METHODS, function (i) {
- t.wrapMethod(i, _(Zs, e));
- });
- }
- function Zs(t) {
- var e = Ks(t);
- e && e.setOutputEnd(this.count());
- }
- function Ks(t) {
- var e = (t.ecModel || {}).scheduler,
- i = e && e.getPipeline(t.uid);
- if (i) {
- var n = i.currentTask;
- if (n) {
- var r = n.agentStubMap;
- r && (n = r.get(t.uid));
- }
- return n;
- }
- }
- function $s() {
- this.group = new Bm(), this.uid = io("viewChart"), this.renderTask = Fs({
- plan: tl,
- reset: el
- }), this.renderTask.context = {
- view: this
- };
- }
- function Qs(t, e, i) {
- if (t && (t.trigger(e, i), t.isGroup && !Ta(t))) for (var n = 0, r = t.childCount(); r > n; n++) Qs(t.childAt(n), e, i);
- }
- function Js(t, e, i) {
- var n = qn(t, e),
- r = e && null != e.highlightKey ? Ca(e.highlightKey) : null;
- null != n ? f(Gn(n), function (e) {
- Qs(t.getItemGraphicEl(e), i, r);
- }) : t.eachItemGraphicEl(function (t) {
- Qs(t, i, r);
- });
- }
- function tl(t) {
- return Qx(t.model);
- }
- function el(t) {
- var e = t.model,
- i = t.ecModel,
- n = t.api,
- r = t.payload,
- a = e.pipelineContext.progressiveRender,
- o = t.view,
- s = r && $x(r).updateMethod,
- l = a ? "incrementalPrepareRender" : s && o[s] ? s : "render";
- return "render" !== l && o[l](e, i, n, r), tw[l];
- }
- function il(t, e, i) {
- function n() {
- h = new Date().getTime(), c = null, t.apply(o, s || []);
- }
- var r,
- a,
- o,
- s,
- l,
- u = 0,
- h = 0,
- c = null;
- e = e || 0;
- var d = function () {
- r = new Date().getTime(), o = this, s = arguments;
- var t = l || e,
- d = l || i;
- l = null, a = r - (d ? u : h) - t, clearTimeout(c), d ? c = setTimeout(n, t) : a >= 0 ? n() : c = setTimeout(n, -a), u = r;
- };
- return d.clear = function () {
- c && (clearTimeout(c), c = null);
- }, d.debounceNextCall = function (t) {
- l = t;
- }, d;
- }
- function nl(t, e, i, n) {
- var r = t[e];
- if (r) {
- var a = r[ew] || r,
- o = r[nw],
- s = r[iw];
- if (s !== i || o !== n) {
- if (null == i || !n) return t[e] = a;
- r = t[e] = il(a, i, "debounce" === n), r[ew] = a, r[nw] = n, r[iw] = i;
- }
- return r;
- }
- }
- function rl(t, e, i, n) {
- this.ecInstance = t, this.api = e, this.unfinished;
- var i = this._dataProcessorHandlers = i.slice(),
- n = this._visualHandlers = n.slice();
- this._allHandlers = i.concat(n), this._stageTaskMap = N();
- }
- function al(t, e, i, n, r) {
- function a(t, e) {
- return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id));
- }
- r = r || {};
- var o;
- f(e, function (e) {
- if (!r.visualType || r.visualType === e.visualType) {
- var s = t._stageTaskMap.get(e.uid),
- l = s.seriesTaskMap,
- u = s.overallTask;
- if (u) {
- var h,
- c = u.agentStubMap;
- c.each(function (t) {
- a(r, t) && (t.dirty(), h = !0);
- }), h && u.dirty(), hw(u, n);
- var d = t.getPerformArgs(u, r.block);
- c.each(function (t) {
- t.perform(d);
- }), o |= u.perform(d);
- } else l && l.each(function (s) {
- a(r, s) && s.dirty();
- var l = t.getPerformArgs(s, r.block);
- l.skip = !e.performRawSeries && i.isSeriesFiltered(s.context.model), hw(s, n), o |= s.perform(l);
- });
- }
- }), t.unfinished |= o;
- }
- function ol(t, e, i, n, r) {
- function a(i) {
- var a = i.uid,
- s = o.get(a) || o.set(a, Fs({
- plan: dl,
- reset: fl,
- count: gl
- }));
- s.context = {
- model: i,
- ecModel: n,
- api: r,
- useClearVisual: e.isVisual && !e.isLayout,
- plan: e.plan,
- reset: e.reset,
- scheduler: t
- }, ml(t, i, s);
- }
- var o = i.seriesTaskMap || (i.seriesTaskMap = N()),
- s = e.seriesType,
- l = e.getTargetSeries;
- e.createOnAllSeries ? n.eachRawSeries(a) : s ? n.eachRawSeriesByType(s, a) : l && l(n, r).each(a);
- var u = t._pipelineMap;
- o.each(function (t, e) {
- u.get(e) || (t.dispose(), o.removeKey(e));
- });
- }
- function sl(t, e, i, n, r) {
- function a(e) {
- var i = e.uid,
- n = s.get(i);
- n || (n = s.set(i, Fs({
- reset: ul,
- onDirty: cl
- })), o.dirty()), n.context = {
- model: e,
- overallProgress: h,
- modifyOutputEnd: c
- }, n.agent = o, n.__block = h, ml(t, e, n);
- }
- var o = i.overallTask = i.overallTask || Fs({
- reset: ll
- });
- o.context = {
- ecModel: n,
- api: r,
- overallReset: e.overallReset,
- scheduler: t
- };
- var s = o.agentStubMap = o.agentStubMap || N(),
- l = e.seriesType,
- u = e.getTargetSeries,
- h = !0,
- c = e.modifyOutputEnd;
- l ? n.eachRawSeriesByType(l, a) : u ? u(n, r).each(a) : (h = !1, f(n.getSeries(), a));
- var d = t._pipelineMap;
- s.each(function (t, e) {
- d.get(e) || (t.dispose(), o.dirty(), s.removeKey(e));
- });
- }
- function ll(t) {
- t.overallReset(t.ecModel, t.api, t.payload);
- }
- function ul(t) {
- return t.overallProgress && hl;
- }
- function hl() {
- this.agent.dirty(), this.getDownstream().dirty();
- }
- function cl() {
- this.agent && this.agent.dirty();
- }
- function dl(t) {
- return t.plan && t.plan(t.model, t.ecModel, t.api, t.payload);
- }
- function fl(t) {
- t.useClearVisual && t.data.clearAllVisual();
- var e = t.resetDefines = Gn(t.reset(t.model, t.ecModel, t.api, t.payload));
- return e.length > 1 ? p(e, function (t, e) {
- return pl(e);
- }) : cw;
- }
- function pl(t) {
- return function (e, i) {
- var n = i.data,
- r = i.resetDefines[t];
- if (r && r.dataEach) for (var a = e.start; a < e.end; a++) r.dataEach(n, a);else r && r.progress && r.progress(e, n);
- };
- }
- function gl(t) {
- return t.data.count();
- }
- function ml(t, e, i) {
- var n = e.uid,
- r = t._pipelineMap.get(n);
- !r.head && (r.head = i), r.tail && r.tail.pipe(i), r.tail = i, i.__idxInPipeline = r.count++, i.__pipeline = r;
- }
- function vl(t) {
- dw = null;
- try {
- t(fw, pw);
- } catch (e) {}
- return dw;
- }
- function yl(t, e) {
- for (var i in e.prototype) t[i] = G;
- }
- function _l(t) {
- if (b(t)) {
- var e = new DOMParser();
- t = e.parseFromString(t, "text/xml");
- }
- for (9 === t.nodeType && (t = t.firstChild); "svg" !== t.nodeName.toLowerCase() || 1 !== t.nodeType;) t = t.nextSibling;
- return t;
- }
- function xl() {
- this._defs = {}, this._root = null, this._isDefine = !1, this._isText = !1;
- }
- function wl(t, e) {
- for (var i = t.firstChild; i;) {
- if (1 === i.nodeType) {
- var n = i.getAttribute("offset");
- n = n.indexOf("%") > 0 ? parseInt(n, 10) / 100 : n ? parseFloat(n) : 0;
- var r = i.getAttribute("stop-color") || "#000000";
- e.addColorStop(n, r);
- }
- i = i.nextSibling;
- }
- }
- function bl(t, e) {
- t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), s(e.__inheritedStyle, t.__inheritedStyle));
- }
- function Sl(t) {
- for (var e = z(t).split(bw), i = [], n = 0; n < e.length; n += 2) {
- var r = parseFloat(e[n]),
- a = parseFloat(e[n + 1]);
- i.push([r, a]);
- }
- return i;
- }
- function Ml(t, e, i, n) {
- var r = e.__inheritedStyle || {},
- a = "text" === e.type;
- if (1 === t.nodeType && (Tl(t, e), o(r, Cl(t)), !n)) for (var s in Iw) if (Iw.hasOwnProperty(s)) {
- var l = t.getAttribute(s);
- null != l && (r[Iw[s]] = l);
- }
- var u = a ? "textFill" : "fill",
- h = a ? "textStroke" : "stroke";
- e.style = e.style || new Ym();
- var c = e.style;
- null != r.fill && c.set(u, Il(r.fill, i)), null != r.stroke && c.set(h, Il(r.stroke, i)), f(["lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"], function (t) {
- var e = "lineWidth" === t && a ? "textStrokeWidth" : t;
- null != r[t] && c.set(e, parseFloat(r[t]));
- }), r.textBaseline && "auto" !== r.textBaseline || (r.textBaseline = "alphabetic"), "alphabetic" === r.textBaseline && (r.textBaseline = "bottom"), "start" === r.textAlign && (r.textAlign = "left"), "end" === r.textAlign && (r.textAlign = "right"), f(["lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign", "textBaseline"], function (t) {
- null != r[t] && c.set(t, r[t]);
- }), r.lineDash && (e.style.lineDash = z(r.lineDash).split(bw)), c[h] && "none" !== c[h] && (e[h] = !0), e.__inheritedStyle = r;
- }
- function Il(t, e) {
- var i = e && t && t.match(Tw);
- if (i) {
- var n = z(i[1]),
- r = e[n];
- return r;
- }
- return t;
- }
- function Tl(t, e) {
- var i = t.getAttribute("transform");
- if (i) {
- i = i.replace(/,/g, " ");
- var n = null,
- r = [];
- i.replace(Cw, function (t, e, i) {
- r.push(e, i);
- });
- for (var a = r.length - 1; a > 0; a -= 2) {
- var o = r[a],
- s = r[a - 1];
- switch (n = n || De(), s) {
- case "translate":
- o = z(o).split(bw), Le(n, n, [parseFloat(o[0]), parseFloat(o[1] || 0)]);
- break;
- case "scale":
- o = z(o).split(bw), ze(n, n, [parseFloat(o[0]), parseFloat(o[1] || o[0])]);
- break;
- case "rotate":
- o = z(o).split(bw), Oe(n, n, parseFloat(o[0]));
- break;
- case "skew":
- o = z(o).split(bw), console.warn("Skew transform is not supported yet");
- break;
- case "matrix":
- var o = z(o).split(bw);
- n[0] = parseFloat(o[0]), n[1] = parseFloat(o[1]), n[2] = parseFloat(o[2]), n[3] = parseFloat(o[3]), n[4] = parseFloat(o[4]), n[5] = parseFloat(o[5]);
- }
- }
- e.setLocalTransform(n);
- }
- }
- function Cl(t) {
- var e = t.getAttribute("style"),
- i = {};
- if (!e) return i;
- var n = {};
- Dw.lastIndex = 0;
- for (var r; null != (r = Dw.exec(e));) n[r[1]] = r[2];
- for (var a in Iw) Iw.hasOwnProperty(a) && null != n[a] && (i[Iw[a]] = n[a]);
- return i;
- }
- function Dl(t, e, i) {
- var n = e / t.width,
- r = i / t.height,
- a = Math.min(n, r),
- o = [a, a],
- s = [-(t.x + t.width / 2) * a + e / 2, -(t.y + t.height / 2) * a + i / 2];
- return {
- scale: o,
- position: s
- };
- }
- function Al(t, e) {
- var i = new xl();
- return i.parse(t, e);
- }
- function kl(t, e) {
- return function (i, n, r) {
- (e || !this._disposed) && (i = i && i.toLowerCase(), Yg.prototype[t].call(this, i, n, r));
- };
- }
- function Pl() {
- Yg.call(this);
- }
- function Ll(t, e, i) {
- function r(t, e) {
- return t.__prio - e.__prio;
- }
- i = i || {}, "string" == typeof e && (e = hb[e]), this.id, this.group, this._dom = t;
- var a = "canvas",
- o = this._zr = En(t, {
- renderer: i.renderer || a,
- devicePixelRatio: i.devicePixelRatio,
- width: i.width,
- height: i.height
- });
- this._throttledZrFlush = il(y(o.flush, o), 17);
- var e = n(e);
- e && Rx(e, !0), this._theme = e, this._chartsViews = [], this._chartsMap = {}, this._componentsViews = [], this._componentsMap = {}, this._coordSysMgr = new cs();
- var s = this._api = Kl(this);
- Ai(ub, r), Ai(ob, r), this._scheduler = new rl(this, s, ob, ub), Yg.call(this, this._ecEventProcessor = new $l()), this._messageCenter = new Pl(), this._initEvents(), this.resize = y(this.resize, this), this._pendingActions = [], o.animation.on("frame", this._onframe, this), Gl(o, this), E(this);
- }
- function Ol(t, e, i) {
- if (!this._disposed) {
- var n,
- r = this._model,
- a = this._coordSysMgr.getCoordinateSystems();
- e = Kn(r, e);
- for (var o = 0; o < a.length; o++) {
- var s = a[o];
- if (s[t] && null != (n = s[t](r, e, i))) return n;
- }
- }
- }
- function zl(t) {
- var e = t._model,
- i = t._scheduler;
- i.restorePipelines(e), i.prepareStageTasks(), Vl(t, "component", e, i), Vl(t, "chart", e, i), i.plan();
- }
- function El(t, e, i, n, r) {
- function a(n) {
- n && n.__alive && n[e] && n[e](n.__model, o, t._api, i);
- }
- var o = t._model;
- if (!n) return void Ow(t._componentsViews.concat(t._chartsViews), a);
- var s = {};
- s[n + "Id"] = i[n + "Id"], s[n + "Index"] = i[n + "Index"], s[n + "Name"] = i[n + "Name"];
- var l = {
- mainType: n,
- query: s
- };
- r && (l.subType = r);
- var u = i.excludeSeriesId;
- null != u && (u = N(Gn(u))), o && o.eachComponent(l, function (e) {
- u && null != u.get(e.id) || a(t["series" === n ? "_chartsMap" : "_componentsMap"][e.__viewId]);
- }, t);
- }
- function Rl(t, e) {
- var i = t._chartsMap,
- n = t._scheduler;
- e.eachSeries(function (t) {
- n.updateStreamModes(t, i[t.__viewId]);
- });
- }
- function Bl(t, e) {
- var i = t.type,
- n = t.escapeConnect,
- r = rb[i],
- a = r.actionInfo,
- l = (a.update || "update").split(":"),
- u = l.pop();
- l = null != l[0] && Rw(l[0]), this[Qw] = !0;
- var h = [t],
- c = !1;
- t.batch && (c = !0, h = p(t.batch, function (e) {
- return e = s(o({}, e), t), e.batch = null, e;
- }));
- var d,
- f = [],
- g = "highlight" === i || "downplay" === i;
- Ow(h, function (t) {
- d = r.action(t, this._model, this._api), d = d || o({}, t), d.type = a.event || d.type, f.push(d), g ? El(this, u, t, "series") : l && El(this, u, t, l.main, l.sub);
- }, this), "none" === u || g || l || (this[Jw] ? (zl(this), ib.update.call(this, t), this[Jw] = !1) : ib[u].call(this, t)), d = c ? {
- type: a.event || i,
- escapeConnect: n,
- batch: f
- } : f[0], this[Qw] = !1, !e && this._messageCenter.trigger(d.type, d);
- }
- function Nl(t) {
- for (var e = this._pendingActions; e.length;) {
- var i = e.shift();
- Bl.call(this, i, t);
- }
- }
- function Fl(t) {
- !t && this.trigger("updated");
- }
- function Gl(t, e) {
- t.on("rendered", function () {
- e.trigger("rendered"), !t.animation.isFinished() || e[Jw] || e._scheduler.unfinished || e._pendingActions.length || e.trigger("finished");
- });
- }
- function Vl(t, e, i, n) {
- function r(t) {
- var e = "_ec_" + t.id + "_" + t.type,
- r = s[e];
- if (!r) {
- var h = Rw(t.type),
- c = a ? qx.getClass(h.main, h.sub) : $s.getClass(h.sub);
- r = new c(), r.init(i, u), s[e] = r, o.push(r), l.add(r.group);
- }
- t.__viewId = r.__id = e, r.__alive = !0, r.__model = t, r.group.__ecComponentInfo = {
- mainType: t.mainType,
- index: t.componentIndex
- }, !a && n.prepareView(r, t, i, u);
- }
- for (var a = "component" === e, o = a ? t._componentsViews : t._chartsViews, s = a ? t._componentsMap : t._chartsMap, l = t._zr, u = t._api, h = 0; h < o.length; h++) o[h].__alive = !1;
- a ? i.eachComponent(function (t, e) {
- "series" !== t && r(e);
- }) : i.eachSeries(r);
- for (var h = 0; h < o.length;) {
- var c = o[h];
- c.__alive ? h++ : (!a && c.renderTask.dispose(), l.remove(c.group), c.dispose(i, u), o.splice(h, 1), delete s[c.__id], c.__id = c.group.__ecComponentInfo = null);
- }
- }
- function Hl(t) {
- t.clearColorPalette(), t.eachSeries(function (t) {
- t.clearColorPalette();
- });
- }
- function Wl(t, e, i, n) {
- Ul(t, e, i, n), Ow(t._chartsViews, function (t) {
- t.__alive = !1;
- }), Xl(t, e, i, n), Ow(t._chartsViews, function (t) {
- t.__alive || t.remove(e, i);
- });
- }
- function Ul(t, e, i, n, r) {
- Ow(r || t._componentsViews, function (t) {
- var r = t.__model;
- t.render(r, e, i, n), Zl(r, t);
- });
- }
- function Xl(t, e, i, n, r) {
- var a,
- o = t._scheduler;
- e.eachSeries(function (e) {
- var i = t._chartsMap[e.__viewId];
- i.__alive = !0;
- var s = i.renderTask;
- o.updatePayload(s, n), r && r.get(e.uid) && s.dirty(), a |= s.perform(o.getPerformArgs(s)), i.group.silent = !!e.get("silent"), Zl(e, i), ql(e, i);
- }), o.unfinished |= a, jl(t, e), ow(t._zr.dom, e);
- }
- function Yl(t, e) {
- Ow(lb, function (i) {
- i(t, e);
- });
- }
- function jl(t, e) {
- var i = t._zr,
- n = i.storage,
- r = 0;
- n.traverse(function () {
- r++;
- }), r > e.get("hoverLayerThreshold") && !Mg.node && e.eachSeries(function (e) {
- if (!e.preventUsingHoverLayer) {
- var i = t._chartsMap[e.__viewId];
- i.__alive && i.group.traverse(function (t) {
- t.useHoverLayer = !0;
- });
- }
- });
- }
- function ql(t, e) {
- var i = t.get("blendMode") || null;
- e.group.traverse(function (t) {
- t.isGroup || t.style.blend !== i && t.setStyle("blend", i), t.eachPendingDisplayable && t.eachPendingDisplayable(function (t) {
- t.setStyle("blend", i);
- });
- });
- }
- function Zl(t, e) {
- var i = t.get("z"),
- n = t.get("zlevel");
- e.group.traverse(function (t) {
- "group" !== t.type && (null != i && (t.z = i), null != n && (t.zlevel = n));
- });
- }
- function Kl(t) {
- var e = t._coordSysMgr;
- return o(new hs(t), {
- getCoordinateSystems: y(e.getCoordinateSystems, e),
- getComponentByElement: function (e) {
- for (; e;) {
- var i = e.__ecComponentInfo;
- if (null != i) return t._model.getComponent(i.mainType, i.index);
- e = e.parent;
- }
- }
- });
- }
- function $l() {
- this.eventInfo;
- }
- function Ql(t) {
- function e(t, e) {
- for (var i = 0; i < t.length; i++) {
- var n = t[i];
- n[a] = e;
- }
- }
- var i = 0,
- n = 1,
- r = 2,
- a = "__connectUpdateStatus";
- Ow(ab, function (o, s) {
- t._messageCenter.on(s, function (o) {
- if (fb[t.group] && t[a] !== i) {
- if (o && o.escapeConnect) return;
- var s = t.makeActionFromEvent(o),
- l = [];
- Ow(db, function (e) {
- e !== t && e.group === t.group && l.push(e);
- }), e(l, i), Ow(l, function (t) {
- t[a] !== n && t.dispatchAction(s);
- }), e(l, r);
- }
- });
- });
- }
- function Jl(t, e, i) {
- var n = nu(t);
- if (n) return n;
- var r = new Ll(t, e, i);
- return r.id = "ec_" + pb++, db[r.id] = r, Qn(t, mb, r.id), Ql(r), r;
- }
- function tu(t) {
- if (x(t)) {
- var e = t;
- t = null, Ow(e, function (e) {
- null != e.group && (t = e.group);
- }), t = t || "g_" + gb++, Ow(e, function (e) {
- e.group = t;
- });
- }
- return fb[t] = !0, t;
- }
- function eu(t) {
- fb[t] = !1;
- }
- function iu(t) {
- "string" == typeof t ? t = db[t] : t instanceof Ll || (t = nu(t)), t instanceof Ll && !t.isDisposed() && t.dispose();
- }
- function nu(t) {
- return db[Jn(t, mb)];
- }
- function ru(t) {
- return db[t];
- }
- function au(t, e) {
- hb[t] = e;
- }
- function ou(t) {
- sb.push(t);
- }
- function su(t, e) {
- pu(ob, t, e, Gw);
- }
- function lu(t) {
- lb.push(t);
- }
- function uu(t, e, i) {
- "function" == typeof e && (i = e, e = "");
- var n = Ew(t) ? t.type : [t, t = {
- event: e
- }][0];
- t.event = (t.event || n).toLowerCase(), e = t.event, Lw(tb.test(n) && tb.test(e)), rb[n] || (rb[n] = {
- action: i,
- actionInfo: t
- }), ab[e] = n;
- }
- function hu(t, e) {
- cs.register(t, e);
- }
- function cu(t) {
- var e = cs.get(t);
- return e ? e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice() : void 0;
- }
- function du(t, e) {
- pu(ub, t, e, Uw, "layout");
- }
- function fu(t, e) {
- pu(ub, t, e, jw, "visual");
- }
- function pu(t, e, i, n, r) {
- (zw(e) || Ew(e)) && (i = e, e = n);
- var a = rl.wrapStageHandler(i, r);
- return a.__prio = e, a.__raw = i, t.push(a), a;
- }
- function gu(t, e) {
- cb[t] = e;
- }
- function mu(t) {
- return ax.extend(t);
- }
- function vu(t) {
- return qx.extend(t);
- }
- function yu(t) {
- return jx.extend(t);
- }
- function _u(t) {
- return $s.extend(t);
- }
- function xu(t) {
- i("createCanvas", t);
- }
- function wu(t, e, i) {
- kw.registerMap(t, e, i);
- }
- function bu(t) {
- var e = kw.retrieveMap(t);
- return e && e[0] && {
- geoJson: e[0].geoJSON,
- specialAreas: e[0].specialAreas
- };
- }
- function Su(t) {
- return t;
- }
- function Mu(t, e, i, n, r) {
- this._old = t, this._new = e, this._oldKeyGetter = i || Su, this._newKeyGetter = n || Su, this.context = r;
- }
- function Iu(t, e, i, n, r) {
- for (var a = 0; a < t.length; a++) {
- var o = "_ec_" + r[n](t[a], a),
- s = e[o];
- null == s ? (i.push(o), e[o] = a) : (s.length || (e[o] = s = [s]), s.push(a));
- }
- }
- function Tu(t) {
- var e = {},
- i = e.encode = {},
- n = N(),
- r = [],
- a = [],
- o = e.userOutput = {
- dimensionNames: t.dimensions.slice(),
- encode: {}
- };
- f(t.dimensions, function (e) {
- var s = t.getDimensionInfo(e),
- l = s.coordDim;
- if (l) {
- var u = s.coordDimIndex;
- Cu(i, l)[u] = e, s.isExtraCoord || (n.set(l, 1), Au(s.type) && (r[0] = e), Cu(o.encode, l)[u] = s.index), s.defaultTooltip && a.push(e);
- }
- _b.each(function (t, e) {
- var n = Cu(i, e),
- r = s.otherDims[e];
- null != r && r !== !1 && (n[r] = s.name);
- });
- });
- var s = [],
- l = {};
- n.each(function (t, e) {
- var n = i[e];
- l[e] = n[0], s = s.concat(n);
- }), e.dataDimsOnCoord = s, e.encodeFirstDimNotExtra = l;
- var u = i.label;
- u && u.length && (r = u.slice());
- var h = i.tooltip;
- return h && h.length ? a = h.slice() : a.length || (a = r.slice()), i.defaultedLabel = r, i.defaultedTooltip = a, e;
- }
- function Cu(t, e) {
- return t.hasOwnProperty(e) || (t[e] = []), t[e];
- }
- function Du(t) {
- return "category" === t ? "ordinal" : "time" === t ? "time" : "float";
- }
- function Au(t) {
- return !("ordinal" === t || "time" === t);
- }
- function ku(t) {
- return t._rawCount > 65535 ? Ib : Cb;
- }
- function Pu(t) {
- var e = t.constructor;
- return e === Array ? t.slice() : new e(t);
- }
- function Lu(t, e) {
- f(Db.concat(e.__wrappedMethods || []), function (i) {
- e.hasOwnProperty(i) && (t[i] = e[i]);
- }), t.__wrappedMethods = e.__wrappedMethods, f(Ab, function (i) {
- t[i] = n(e[i]);
- }), t._calculationInfo = o(e._calculationInfo);
- }
- function Ou(t, e, i, n, r) {
- var a = Mb[e.type],
- o = n - 1,
- s = e.name,
- l = t[s][o];
- if (l && l.length < i) {
- for (var u = new a(Math.min(r - o * i, i)), h = 0; h < l.length; h++) u[h] = l[h];
- t[s][o] = u;
- }
- for (var c = n * i; r > c; c += i) t[s].push(new a(Math.min(r - c, i)));
- }
- function zu(t) {
- var e = t._invertedIndicesMap;
- f(e, function (i, n) {
- var r = t._dimensionInfos[n],
- a = r.ordinalMeta;
- if (a) {
- i = e[n] = new Tb(a.categories.length);
- for (var o = 0; o < i.length; o++) i[o] = bb;
- for (var o = 0; o < t._count; o++) i[t.get(n, o)] = o;
- }
- });
- }
- function Eu(t, e, i) {
- var n;
- if (null != e) {
- var r = t._chunkSize,
- a = Math.floor(i / r),
- o = i % r,
- s = t.dimensions[e],
- l = t._storage[s][a];
- if (l) {
- n = l[o];
- var u = t._dimensionInfos[s].ordinalMeta;
- u && u.categories.length && (n = u.categories[n]);
- }
- }
- return n;
- }
- function Ru(t) {
- return t;
- }
- function Bu(t) {
- return t < this._count && t >= 0 ? this._indices[t] : -1;
- }
- function Nu(t, e) {
- var i = t._idList[e];
- return null == i && (i = Eu(t, t._idDimIdx, e)), null == i && (i = Sb + e), i;
- }
- function Fu(t) {
- return x(t) || (t = [t]), t;
- }
- function Gu(t, e) {
- var i = t.dimensions,
- n = new kb(p(i, t.getDimensionInfo, t), t.hostModel);
- Lu(n, t);
- for (var r = n._storage = {}, a = t._storage, o = 0; o < i.length; o++) {
- var s = i[o];
- a[s] && (u(e, s) >= 0 ? (r[s] = Vu(a[s]), n._rawExtent[s] = Hu(), n._extent[s] = null) : r[s] = a[s]);
- }
- return n;
- }
- function Vu(t) {
- for (var e = new Array(t.length), i = 0; i < t.length; i++) e[i] = Pu(t[i]);
- return e;
- }
- function Hu() {
- return [1 / 0, -1 / 0];
- }
- function Wu(t, e, i) {
- function r(t, e, i) {
- null != _b.get(e) ? t.otherDims[e] = i : (t.coordDim = e, t.coordDimIndex = i, h.set(e, !0));
- }
- Uo.isInstance(e) || (e = Uo.seriesDataToSource(e)), i = i || {}, t = (t || []).slice();
- for (var a = (i.dimsDef || []).slice(), l = N(i.encodeDef), u = N(), h = N(), c = [], d = Uu(e, t, a, i.dimCount), p = 0; d > p; p++) {
- var g = a[p] = o({}, S(a[p]) ? a[p] : {
- name: a[p]
- }),
- m = g.name,
- v = c[p] = {
- otherDims: {}
- };
- null != m && null == u.get(m) && (v.name = v.displayName = m, u.set(m, p)), null != g.type && (v.type = g.type), null != g.displayName && (v.displayName = g.displayName);
- }
- l.each(function (t, e) {
- if (t = Gn(t).slice(), 1 === t.length && !b(t[0]) && t[0] < 0) return void l.set(e, !1);
- var i = l.set(e, []);
- f(t, function (t, n) {
- b(t) && (t = u.get(t)), null != t && d > t && (i[n] = t, r(c[t], e, n));
- });
- });
- var y = 0;
- f(t, function (t) {
- var e, t, i, a;
- if (b(t)) e = t, t = {};else {
- e = t.name;
- var o = t.ordinalMeta;
- t.ordinalMeta = null, t = n(t), t.ordinalMeta = o, i = t.dimsDef, a = t.otherDims, t.name = t.coordDim = t.coordDimIndex = t.dimsDef = t.otherDims = null;
- }
- var u = l.get(e);
- if (u !== !1) {
- var u = Gn(u);
- if (!u.length) for (var h = 0; h < (i && i.length || 1); h++) {
- for (; y < c.length && null != c[y].coordDim;) y++;
- y < c.length && u.push(y++);
- }
- f(u, function (n, o) {
- var l = c[n];
- if (r(s(l, t), e, o), null == l.name && i) {
- var u = i[o];
- !S(u) && (u = {
- name: u
- }), l.name = l.displayName = u.name, l.defaultTooltip = u.defaultTooltip;
- }
- a && s(l.otherDims, a);
- });
- }
- });
- var _ = i.generateCoord,
- x = i.generateCoordCount,
- w = null != x;
- x = _ ? x || 1 : 0;
- for (var M = _ || "value", I = 0; d > I; I++) {
- var v = c[I] = c[I] || {},
- T = v.coordDim;
- null == T && (v.coordDim = Xu(M, h, w), v.coordDimIndex = 0, (!_ || 0 >= x) && (v.isExtraCoord = !0), x--), null == v.name && (v.name = Xu(v.coordDim, u)), null == v.type && es(e, I, v.name) && (v.type = "ordinal");
- }
- return c;
- }
- function Uu(t, e, i, n) {
- var r = Math.max(t.dimensionsDetectCount || 1, e.length, i.length, n || 0);
- return f(e, function (t) {
- var e = t.dimsDef;
- e && (r = Math.max(r, e.length));
- }), r;
- }
- function Xu(t, e, i) {
- if (i || null != e.get(t)) {
- for (var n = 0; null != e.get(t + n);) n++;
- t += n;
- }
- return e.set(t, !0), t;
- }
- function Yu(t, e, i) {
- i = i || {};
- var n,
- r,
- a,
- o,
- s = i.byIndex,
- l = i.stackedCoordDimension,
- u = !(!t || !t.get("stack"));
- if (f(e, function (t, i) {
- b(t) && (e[i] = t = {
- name: t
- }), u && !t.isExtraCoord && (s || n || !t.ordinalMeta || (n = t), r || "ordinal" === t.type || "time" === t.type || l && l !== t.coordDim || (r = t));
- }), !r || s || n || (s = !0), r) {
- a = "__\x00ecstackresult", o = "__\x00ecstackedover", n && (n.createInvertedIndices = !0);
- var h = r.coordDim,
- c = r.type,
- d = 0;
- f(e, function (t) {
- t.coordDim === h && d++;
- }), e.push({
- name: a,
- coordDim: h,
- coordDimIndex: d,
- type: c,
- isExtraCoord: !0,
- isCalculationCoord: !0
- }), d++, e.push({
- name: o,
- coordDim: o,
- coordDimIndex: d,
- type: c,
- isExtraCoord: !0,
- isCalculationCoord: !0
- });
- }
- return {
- stackedDimension: r && r.name,
- stackedByDimension: n && n.name,
- isStackedByIndex: s,
- stackedOverDimension: o,
- stackResultDimension: a
- };
- }
- function ju(t, e) {
- return !!e && e === t.getCalculationInfo("stackedDimension");
- }
- function qu(t, e) {
- return ju(t, e) ? t.getCalculationInfo("stackResultDimension") : e;
- }
- function Zu(t, e, i) {
- i = i || {}, Uo.isInstance(t) || (t = Uo.seriesDataToSource(t));
- var n,
- r = e.get("coordinateSystem"),
- a = cs.get(r),
- o = Ho(e);
- o && (n = p(o.coordSysDims, function (t) {
- var e = {
- name: t
- },
- i = o.axisMap.get(t);
- if (i) {
- var n = i.get("type");
- e.type = Du(n);
- }
- return e;
- })), n || (n = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"]);
- var s,
- l,
- u = Ob(t, {
- coordDimensions: n,
- generateCoord: i.generateCoord
- });
- o && f(u, function (t, e) {
- var i = t.coordDim,
- n = o.categoryAxisMap.get(i);
- n && (null == s && (s = e), t.ordinalMeta = n.getOrdinalMeta()), null != t.otherDims.itemName && (l = !0);
- }), l || null == s || (u[s].otherDims.itemName = 0);
- var h = Yu(e, u),
- c = new kb(u, e);
- c.setCalculationInfo(h);
- var d = null != s && Ku(t) ? function (t, e, i, n) {
- return n === s ? i : this.defaultDimValueGetter(t, e, i, n);
- } : null;
- return c.hasItemOption = !1, c.initData(t, null, d), c;
- }
- function Ku(t) {
- if (t.sourceFormat === cx) {
- var e = $u(t.data || []);
- return null != e && !x(Hn(e));
- }
- }
- function $u(t) {
- for (var e = 0; e < t.length && null == t[e];) e++;
- return t[e];
- }
- function Qu(t) {
- this._setting = t || {}, this._extent = [1 / 0, -1 / 0], this._interval = 0, this.init && this.init.apply(this, arguments);
- }
- function Ju(t) {
- this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this._map;
- }
- function th(t) {
- return t._map || (t._map = N(t.categories));
- }
- function eh(t) {
- return S(t) && null != t.value ? t.value : t + "";
- }
- function ih(t, e, i, n) {
- var r = {},
- a = t[1] - t[0],
- o = r.interval = xo(a / e, !0);
- null != i && i > o && (o = r.interval = i), null != n && o > n && (o = r.interval = n);
- var s = r.intervalPrecision = nh(o),
- l = r.niceTickExtent = [Bb(Math.ceil(t[0] / o) * o, s), Bb(Math.floor(t[1] / o) * o, s)];
- return ah(l, t), r;
- }
- function nh(t) {
- return co(t) + 2;
- }
- function rh(t, e, i) {
- t[e] = Math.max(Math.min(t[e], i[1]), i[0]);
- }
- function ah(t, e) {
- !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), rh(t, 0, e), rh(t, 1, e), t[0] > t[1] && (t[0] = t[1]);
- }
- function oh(t, e, i, n) {
- var r = [];
- if (!t) return r;
- var a = 1e4;
- e[0] < i[0] && r.push(e[0]);
- for (var o = i[0]; o <= i[1] && (r.push(o), o = Bb(o + t, n), o !== r[r.length - 1]);) if (r.length > a) return [];
- return e[1] > (r.length ? r[r.length - 1] : i[1]) && r.push(e[1]), r;
- }
- function sh(t) {
- return t.get("stack") || Gb + t.seriesIndex;
- }
- function lh(t) {
- return t.dim + t.index;
- }
- function uh(t, e) {
- var i = [];
- return e.eachSeriesByType(t, function (t) {
- gh(t) && !mh(t) && i.push(t);
- }), i;
- }
- function hh(t) {
- var e = {};
- f(t, function (t) {
- var i = t.coordinateSystem,
- n = i.getBaseAxis();
- if ("time" === n.type || "value" === n.type) for (var r = t.getData(), a = n.dim + "_" + n.index, o = r.mapDimension(n.dim), s = 0, l = r.count(); l > s; ++s) {
- var u = r.get(o, s);
- e[a] ? e[a].push(u) : e[a] = [u];
- }
- });
- var i = [];
- for (var n in e) if (e.hasOwnProperty(n)) {
- var r = e[n];
- if (r) {
- r.sort(function (t, e) {
- return t - e;
- });
- for (var a = null, o = 1; o < r.length; ++o) {
- var s = r[o] - r[o - 1];
- s > 0 && (a = null === a ? s : Math.min(a, s));
- }
- i[n] = a;
- }
- }
- return i;
- }
- function ch(t) {
- var e = hh(t),
- i = [];
- return f(t, function (t) {
- var n,
- r = t.coordinateSystem,
- a = r.getBaseAxis(),
- o = a.getExtent();
- if ("category" === a.type) n = a.getBandWidth();else if ("value" === a.type || "time" === a.type) {
- var s = a.dim + "_" + a.index,
- l = e[s],
- u = Math.abs(o[1] - o[0]),
- h = a.scale.getExtent(),
- c = Math.abs(h[1] - h[0]);
- n = l ? u / c * l : u;
- } else {
- var d = t.getData();
- n = Math.abs(o[1] - o[0]) / d.count();
- }
- var f = so(t.get("barWidth"), n),
- p = so(t.get("barMaxWidth"), n),
- g = so(t.get("barMinWidth") || 1, n),
- m = t.get("barGap"),
- v = t.get("barCategoryGap");
- i.push({
- bandWidth: n,
- barWidth: f,
- barMaxWidth: p,
- barMinWidth: g,
- barGap: m,
- barCategoryGap: v,
- axisKey: lh(a),
- stackId: sh(t)
- });
- }), dh(i);
- }
- function dh(t) {
- var e = {};
- f(t, function (t) {
- var i = t.axisKey,
- n = t.bandWidth,
- r = e[i] || {
- bandWidth: n,
- remainedWidth: n,
- autoWidthCount: 0,
- categoryGap: "20%",
- gap: "30%",
- stacks: {}
- },
- a = r.stacks;
- e[i] = r;
- var o = t.stackId;
- a[o] || r.autoWidthCount++, a[o] = a[o] || {
- width: 0,
- maxWidth: 0
- };
- var s = t.barWidth;
- s && !a[o].width && (a[o].width = s, s = Math.min(r.remainedWidth, s), r.remainedWidth -= s);
- var l = t.barMaxWidth;
- l && (a[o].maxWidth = l);
- var u = t.barMinWidth;
- u && (a[o].minWidth = u);
- var h = t.barGap;
- null != h && (r.gap = h);
- var c = t.barCategoryGap;
- null != c && (r.categoryGap = c);
- });
- var i = {};
- return f(e, function (t, e) {
- i[e] = {};
- var n = t.stacks,
- r = t.bandWidth,
- a = so(t.categoryGap, r),
- o = so(t.gap, 1),
- s = t.remainedWidth,
- l = t.autoWidthCount,
- u = (s - a) / (l + (l - 1) * o);
- u = Math.max(u, 0), f(n, function (t) {
- var e = t.maxWidth,
- i = t.minWidth;
- if (t.width) {
- var n = t.width;
- e && (n = Math.min(n, e)), i && (n = Math.max(n, i)), t.width = n, s -= n, l--;
- } else {
- var n = u;
- e && n > e && (n = Math.min(e, s)), i && i > n && (n = i), n !== u && (t.width = n, s -= n, l--);
- }
- }), u = (s - a) / (l + (l - 1) * o), u = Math.max(u, 0);
- var h,
- c = 0;
- f(n, function (t) {
- t.width || (t.width = u), h = t, c += t.width * (1 + o);
- }), h && (c -= h.width * o);
- var d = -c / 2;
- f(n, function (t, n) {
- i[e][n] = i[e][n] || {
- bandWidth: r,
- offset: d,
- width: t.width
- }, d += t.width * (1 + o);
- });
- }), i;
- }
- function fh(t, e, i) {
- if (t && e) {
- var n = t[lh(e)];
- return null != n && null != i && (n = n[sh(i)]), n;
- }
- }
- function ph(t, e) {
- var i = uh(t, e),
- n = ch(i),
- r = {};
- f(i, function (t) {
- var e = t.getData(),
- i = t.coordinateSystem,
- a = i.getBaseAxis(),
- o = sh(t),
- s = n[lh(a)][o],
- l = s.offset,
- u = s.width,
- h = i.getOtherAxis(a),
- c = t.get("barMinHeight") || 0;
- r[o] = r[o] || [], e.setLayout({
- bandWidth: s.bandWidth,
- offset: l,
- size: u
- });
- for (var d = e.mapDimension(h.dim), f = e.mapDimension(a.dim), p = ju(e, d), g = h.isHorizontal(), m = vh(a, h, p), v = 0, y = e.count(); y > v; v++) {
- var _ = e.get(d, v),
- x = e.get(f, v);
- if (!isNaN(_) && !isNaN(x)) {
- var w = _ >= 0 ? "p" : "n",
- b = m;
- p && (r[o][x] || (r[o][x] = {
- p: m,
- n: m
- }), b = r[o][x][w]);
- var S, M, I, T;
- if (g) {
- var C = i.dataToPoint([_, x]);
- S = b, M = C[1] + l, I = C[0] - m, T = u, Math.abs(I) < c && (I = (0 > I ? -1 : 1) * c), p && (r[o][x][w] += I);
- } else {
- var C = i.dataToPoint([x, _]);
- S = C[0] + l, M = b, I = u, T = C[1] - m, Math.abs(T) < c && (T = (0 >= T ? -1 : 1) * c), p && (r[o][x][w] += T);
- }
- e.setItemLayout(v, {
- x: S,
- y: M,
- width: I,
- height: T
- });
- }
- }
- }, this);
- }
- function gh(t) {
- return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type;
- }
- function mh(t) {
- return t.pipelineContext && t.pipelineContext.large;
- }
- function vh(t, e) {
- return e.toGlobalCoord(e.dataToCoord("log" === e.type ? 1 : 0));
- }
- function yh(t, e) {
- return nS(t, iS(e));
- }
- function _h(t, e) {
- var i,
- n,
- r,
- a = t.type,
- o = e.getMin(),
- s = e.getMax(),
- l = null != o,
- u = null != s,
- h = t.getExtent();
- "ordinal" === a ? i = e.getCategories().length : (n = e.get("boundaryGap"), x(n) || (n = [n || 0, n || 0]), "boolean" == typeof n[0] && (n = [0, 0]), n[0] = so(n[0], 1), n[1] = so(n[1], 1), r = h[1] - h[0] || Math.abs(h[0])), null == o && (o = "ordinal" === a ? i ? 0 : 0 / 0 : h[0] - n[0] * r), null == s && (s = "ordinal" === a ? i ? i - 1 : 0 / 0 : h[1] + n[1] * r), "dataMin" === o ? o = h[0] : "function" == typeof o && (o = o({
- min: h[0],
- max: h[1]
- })), "dataMax" === s ? s = h[1] : "function" == typeof s && (s = s({
- min: h[0],
- max: h[1]
- })), (null == o || !isFinite(o)) && (o = 0 / 0), (null == s || !isFinite(s)) && (s = 0 / 0), t.setBlank(C(o) || C(s) || "ordinal" === a && !t.getOrdinalMeta().categories.length), e.getNeedCrossZero() && (o > 0 && s > 0 && !l && (o = 0), 0 > o && 0 > s && !u && (s = 0));
- var c = e.ecModel;
- if (c && "time" === a) {
- var d,
- p = uh("bar", c);
- if (f(p, function (t) {
- d |= t.getBaseAxis() === e.axis;
- }), d) {
- var g = ch(p),
- m = xh(o, s, e, g);
- o = m.min, s = m.max;
- }
- }
- return [o, s];
- }
- function xh(t, e, i, n) {
- var r = i.axis.getExtent(),
- a = r[1] - r[0],
- o = fh(n, i.axis);
- if (void 0 === o) return {
- min: t,
- max: e
- };
- var s = 1 / 0;
- f(o, function (t) {
- s = Math.min(t.offset, s);
- });
- var l = -1 / 0;
- f(o, function (t) {
- l = Math.max(t.offset + t.width, l);
- }), s = Math.abs(s), l = Math.abs(l);
- var u = s + l,
- h = e - t,
- c = 1 - (s + l) / a,
- d = h / c - h;
- return e += d * (l / u), t -= d * (s / u), {
- min: t,
- max: e
- };
- }
- function wh(t, e) {
- var i = _h(t, e),
- n = null != e.getMin(),
- r = null != e.getMax(),
- a = e.get("splitNumber");
- "log" === t.type && (t.base = e.get("logBase"));
- var o = t.type;
- t.setExtent(i[0], i[1]), t.niceExtent({
- splitNumber: a,
- fixMin: n,
- fixMax: r,
- minInterval: "interval" === o || "time" === o ? e.get("minInterval") : null,
- maxInterval: "interval" === o || "time" === o ? e.get("maxInterval") : null
- });
- var s = e.get("interval");
- null != s && t.setInterval && t.setInterval(s);
- }
- function bh(t, e) {
- if (e = e || t.get("type")) switch (e) {
- case "category":
- return new Rb(t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(), [1 / 0, -1 / 0]);
- case "value":
- return new Fb();
- default:
- return (Qu.getClass(e) || Fb).create(t);
- }
- }
- function Sh(t) {
- var e = t.scale.getExtent(),
- i = e[0],
- n = e[1];
- return !(i > 0 && n > 0 || 0 > i && 0 > n);
- }
- function Mh(t) {
- var e = t.getLabelModel().get("formatter"),
- i = "category" === t.type ? t.scale.getExtent()[0] : null;
- return "string" == typeof e ? e = function (e) {
- return function (i) {
- return i = t.scale.getLabel(i), e.replace("{value}", null != i ? i : "");
- };
- }(e) : "function" == typeof e ? function (n, r) {
- return null != i && (r = n - i), e(Ih(t, n), r);
- } : function (e) {
- return t.scale.getLabel(e);
- };
- }
- function Ih(t, e) {
- return "category" === t.type ? t.scale.getLabel(e) : e;
- }
- function Th(t) {
- var e = t.model,
- i = t.scale;
- if (e.get("axisLabel.show") && !i.isBlank()) {
- var n,
- r,
- a = "category" === t.type,
- o = i.getExtent();
- a ? r = i.count() : (n = i.getTicks(), r = n.length);
- var s,
- l = t.getLabelModel(),
- u = Mh(t),
- h = 1;
- r > 40 && (h = Math.ceil(r / 40));
- for (var c = 0; r > c; c += h) {
- var d = n ? n[c] : o[0] + c,
- f = u(d),
- p = l.getTextRect(f),
- g = Ch(p, l.get("rotate") || 0);
- s ? s.union(g) : s = g;
- }
- return s;
- }
- }
- function Ch(t, e) {
- var i = e * Math.PI / 180,
- n = t.plain(),
- r = n.width,
- a = n.height,
- o = r * Math.cos(i) + a * Math.sin(i),
- s = r * Math.sin(i) + a * Math.cos(i),
- l = new wi(n.x, n.y, o, s);
- return l;
- }
- function Dh(t) {
- var e = t.get("interval");
- return null == e ? "auto" : e;
- }
- function Ah(t) {
- return "category" === t.type && 0 === Dh(t.getLabelModel());
- }
- function kh(t, e) {
- if ("image" !== this.type) {
- var i = this.style,
- n = this.shape;
- n && "line" === n.symbolType ? i.stroke = t : this.__isEmptyBrush ? (i.stroke = t, i.fill = e || "#fff") : (i.fill && (i.fill = t), i.stroke && (i.stroke = t)), this.dirty(!1);
- }
- }
- function Ph(t, e, i, n, r, a, o) {
- var s = 0 === t.indexOf("empty");
- s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
- var l;
- return l = 0 === t.indexOf("image://") ? oa(t.slice(8), new wi(e, i, n, r), o ? "center" : "cover") : 0 === t.indexOf("path://") ? aa(t.slice(7), {}, new wi(e, i, n, r), o ? "center" : "cover") : new vS({
- shape: {
- symbolType: t,
- x: e,
- y: i,
- width: n,
- height: r
- }
- }), l.__isEmptyBrush = s, l.setColor = kh, l.setColor(a), l;
- }
- function Lh(t) {
- return Zu(t.getSource(), t);
- }
- function Oh(t, e) {
- var i = e;
- Ja.isInstance(e) || (i = new Ja(e), c(i, uS));
- var n = bh(i);
- return n.setExtent(t[0], t[1]), wh(n, i), n;
- }
- function zh(t) {
- c(t, uS);
- }
- function Eh(t, e) {
- return Math.abs(t - e) < xS;
- }
- function Rh(t, e, i) {
- var n = 0,
- r = t[0];
- if (!r) return !1;
- for (var a = 1; a < t.length; a++) {
- var o = t[a];
- n += Lr(r[0], r[1], o[0], o[1], e, i), r = o;
- }
- var s = t[0];
- return Eh(r[0], s[0]) && Eh(r[1], s[1]) || (n += Lr(r[0], r[1], s[0], s[1], e, i)), 0 !== n;
- }
- function Bh(t, e, i) {
- if (this.name = t, this.geometries = e, i) i = [i[0], i[1]];else {
- var n = this.getBoundingRect();
- i = [n.x + n.width / 2, n.y + n.height / 2];
- }
- this.center = i;
- }
- function Nh(t) {
- if (!t.UTF8Encoding) return t;
- var e = t.UTF8Scale;
- null == e && (e = 1024);
- for (var i = t.features, n = 0; n < i.length; n++) for (var r = i[n], a = r.geometry, o = a.coordinates, s = a.encodeOffsets, l = 0; l < o.length; l++) {
- var u = o[l];
- if ("Polygon" === a.type) o[l] = Fh(u, s[l], e);else if ("MultiPolygon" === a.type) for (var h = 0; h < u.length; h++) {
- var c = u[h];
- u[h] = Fh(c, s[l][h], e);
- }
- }
- return t.UTF8Encoding = !1, t;
- }
- function Fh(t, e, i) {
- for (var n = [], r = e[0], a = e[1], o = 0; o < t.length; o += 2) {
- var s = t.charCodeAt(o) - 64,
- l = t.charCodeAt(o + 1) - 64;
- s = s >> 1 ^ -(1 & s), l = l >> 1 ^ -(1 & l), s += r, l += a, r = s, a = l, n.push([s / i, l / i]);
- }
- return n;
- }
- function Gh(t) {
- return "category" === t.type ? Hh(t) : Xh(t);
- }
- function Vh(t, e) {
- return "category" === t.type ? Uh(t, e) : {
- ticks: t.scale.getTicks()
- };
- }
- function Hh(t) {
- var e = t.getLabelModel(),
- i = Wh(t, e);
- return !e.get("show") || t.scale.isBlank() ? {
- labels: [],
- labelCategoryInterval: i.labelCategoryInterval
- } : i;
- }
- function Wh(t, e) {
- var i = Yh(t, "labels"),
- n = Dh(e),
- r = jh(i, n);
- if (r) return r;
- var a, o;
- return w(n) ? a = Jh(t, n) : (o = "auto" === n ? Zh(t) : n, a = Qh(t, o)), qh(i, n, {
- labels: a,
- labelCategoryInterval: o
- });
- }
- function Uh(t, e) {
- var i = Yh(t, "ticks"),
- n = Dh(e),
- r = jh(i, n);
- if (r) return r;
- var a, o;
- if ((!e.get("show") || t.scale.isBlank()) && (a = []), w(n)) a = Jh(t, n, !0);else if ("auto" === n) {
- var s = Wh(t, t.getLabelModel());
- o = s.labelCategoryInterval, a = p(s.labels, function (t) {
- return t.tickValue;
- });
- } else o = n, a = Qh(t, o, !0);
- return qh(i, n, {
- ticks: a,
- tickCategoryInterval: o
- });
- }
- function Xh(t) {
- var e = t.scale.getTicks(),
- i = Mh(t);
- return {
- labels: p(e, function (e, n) {
- return {
- formattedLabel: i(e, n),
- rawLabel: t.scale.getLabel(e),
- tickValue: e
- };
- })
- };
- }
- function Yh(t, e) {
- return bS(t)[e] || (bS(t)[e] = []);
- }
- function jh(t, e) {
- for (var i = 0; i < t.length; i++) if (t[i].key === e) return t[i].value;
- }
- function qh(t, e, i) {
- return t.push({
- key: e,
- value: i
- }), i;
- }
- function Zh(t) {
- var e = bS(t).autoInterval;
- return null != e ? e : bS(t).autoInterval = t.calculateCategoryInterval();
- }
- function Kh(t) {
- var e = $h(t),
- i = Mh(t),
- n = (e.axisRotate - e.labelRotate) / 180 * Math.PI,
- r = t.scale,
- a = r.getExtent(),
- o = r.count();
- if (a[1] - a[0] < 1) return 0;
- var s = 1;
- o > 40 && (s = Math.max(1, Math.floor(o / 40)));
- for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), h = Math.abs(u * Math.cos(n)), c = Math.abs(u * Math.sin(n)), d = 0, f = 0; l <= a[1]; l += s) {
- var p = 0,
- g = 0,
- m = Gi(i(l), e.font, "center", "top");
- p = 1.3 * m.width, g = 1.3 * m.height, d = Math.max(d, p, 7), f = Math.max(f, g, 7);
- }
- var v = d / h,
- y = f / c;
- isNaN(v) && (v = 1 / 0), isNaN(y) && (y = 1 / 0);
- var _ = Math.max(0, Math.floor(Math.min(v, y))),
- x = bS(t.model),
- w = t.getExtent(),
- b = x.lastAutoInterval,
- S = x.lastTickCount;
- return null != b && null != S && Math.abs(b - _) <= 1 && Math.abs(S - o) <= 1 && b > _ && x.axisExtend0 === w[0] && x.axisExtend1 === w[1] ? _ = b : (x.lastTickCount = o, x.lastAutoInterval = _, x.axisExtend0 = w[0], x.axisExtend1 = w[1]), _;
- }
- function $h(t) {
- var e = t.getLabelModel();
- return {
- axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
- labelRotate: e.get("rotate") || 0,
- font: e.getFont()
- };
- }
- function Qh(t, e, i) {
- function n(t) {
- l.push(i ? t : {
- formattedLabel: r(t),
- rawLabel: a.getLabel(t),
- tickValue: t
- });
- }
- var r = Mh(t),
- a = t.scale,
- o = a.getExtent(),
- s = t.getLabelModel(),
- l = [],
- u = Math.max((e || 0) + 1, 1),
- h = o[0],
- c = a.count();
- 0 !== h && u > 1 && c / u > 2 && (h = Math.round(Math.ceil(h / u) * u));
- var d = Ah(t),
- f = s.get("showMinLabel") || d,
- p = s.get("showMaxLabel") || d;
- f && h !== o[0] && n(o[0]);
- for (var g = h; g <= o[1]; g += u) n(g);
- return p && g - u !== o[1] && n(o[1]), l;
- }
- function Jh(t, e, i) {
- var n = t.scale,
- r = Mh(t),
- a = [];
- return f(n.getTicks(), function (t) {
- var o = n.getLabel(t);
- e(t, o) && a.push(i ? t : {
- formattedLabel: r(t),
- rawLabel: o,
- tickValue: t
- });
- }), a;
- }
- function tc(t, e) {
- var i = t[1] - t[0],
- n = e,
- r = i / n / 2;
- t[0] += r, t[1] -= r;
- }
- function ec(t, e, i, n) {
- function r(t, e) {
- return t = lo(t), e = lo(e), d ? t > e : e > t;
- }
- var a = e.length;
- if (t.onBand && !i && a) {
- var o,
- s,
- l = t.getExtent();
- if (1 === a) e[0].coord = l[0], o = e[1] = {
- coord: l[0]
- };else {
- var u = e[a - 1].tickValue - e[0].tickValue,
- h = (e[a - 1].coord - e[0].coord) / u;
- f(e, function (t) {
- t.coord -= h / 2;
- });
- var c = t.scale.getExtent();
- s = 1 + c[1] - e[a - 1].tickValue, o = {
- coord: e[a - 1].coord + h * s
- }, e.push(o);
- }
- var d = l[0] > l[1];
- r(e[0].coord, l[0]) && (n ? e[0].coord = l[0] : e.shift()), n && r(l[0], e[0].coord) && e.unshift({
- coord: l[0]
- }), r(l[1], o.coord) && (n ? o.coord = l[1] : e.pop()), n && r(o.coord, l[1]) && e.push({
- coord: l[1]
- });
- }
- }
- function ic(t) {
- return this._axes[t];
- }
- function nc(t) {
- DS.call(this, t);
- }
- function rc(t, e) {
- return e.type || (e.data ? "category" : "value");
- }
- function ac(t, e) {
- return t.getCoordSysModel() === e;
- }
- function oc(t, e, i) {
- this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this._initCartesian(t, e, i), this.model = t;
- }
- function sc(t, e, i, n) {
- function r(t) {
- return t.dim + "_" + t.index;
- }
- i.getAxesOnZeroOf = function () {
- return a ? [a] : [];
- };
- var a,
- o = t[e],
- s = i.model,
- l = s.get("axisLine.onZero"),
- u = s.get("axisLine.onZeroAxisIndex");
- if (l) {
- if (null != u) lc(o[u]) && (a = o[u]);else for (var h in o) if (o.hasOwnProperty(h) && lc(o[h]) && !n[r(o[h])]) {
- a = o[h];
- break;
- }
- a && (n[r(a)] = !0);
- }
- }
- function lc(t) {
- return t && "category" !== t.type && "time" !== t.type && Sh(t);
- }
- function uc(t, e) {
- var i = t.getExtent(),
- n = i[0] + i[1];
- t.toGlobalCoord = "x" === t.dim ? function (t) {
- return t + e;
- } : function (t) {
- return n - t + e;
- }, t.toLocalCoord = "x" === t.dim ? function (t) {
- return t - e;
- } : function (t) {
- return n - t + e;
- };
- }
- function hc(t) {
- return p(BS, function (e) {
- var i = t.getReferringComponents(e)[0];
- return i;
- });
- }
- function cc(t) {
- return "cartesian2d" === t.get("coordinateSystem");
- }
- function dc(t, e) {
- var i = t.mapDimension("defaultedLabel", !0),
- n = i.length;
- if (1 === n) return Bs(t, e, i[0]);
- if (n) {
- for (var r = [], a = 0; a < i.length; a++) {
- var o = Bs(t, e, i[a]);
- r.push(o);
- }
- return r.join(" ");
- }
- }
- function fc(t, e, i, n, r, a) {
- var o = i.getModel("label"),
- s = i.getModel("emphasis.label");
- Da(t, e, o, s, {
- labelFetcher: r,
- labelDataIndex: a,
- defaultText: dc(r.getData(), a),
- isRectText: !0,
- autoColor: n
- }), pc(t), pc(e);
- }
- function pc(t, e) {
- "outside" === t.textPosition && (t.textPosition = e);
- }
- function gc(t, e, i) {
- var n = t.getArea(),
- r = t.getBaseAxis().isHorizontal(),
- a = n.x,
- o = n.y,
- s = n.width,
- l = n.height,
- u = i.get("lineStyle.width") || 2;
- a -= u / 2, o -= u / 2, s += u, l += u;
- var h = new u_({
- shape: {
- x: a,
- y: o,
- width: s,
- height: l
- }
- });
- return e && (h.shape[r ? "width" : "height"] = 0, Va(h, {
- shape: {
- width: s,
- height: l
- }
- }, i)), h;
- }
- function mc(t, e, i) {
- var n = t.getArea(),
- r = new e_({
- shape: {
- cx: lo(t.cx, 1),
- cy: lo(t.cy, 1),
- r0: lo(n.r0, 1),
- r: lo(n.r, 1),
- startAngle: n.startAngle,
- endAngle: n.endAngle,
- clockwise: n.clockwise
- }
- });
- return e && (r.shape.endAngle = n.startAngle, Va(r, {
- shape: {
- endAngle: n.endAngle
- }
- }, i)), r;
- }
- function vc(t, e, i) {
- return t ? "polar" === t.type ? mc(t, e, i) : "cartesian2d" === t.type ? gc(t, e, i) : null : null;
- }
- function yc(t, e) {
- var i = t.getArea && t.getArea();
- if ("cartesian2d" === t.type) {
- var n = t.getBaseAxis();
- if ("category" !== n.type || !n.onBand) {
- var r = e.getLayout("bandWidth");
- n.isHorizontal() ? (i.x -= r, i.width += 2 * r) : (i.y -= r, i.height += 2 * r);
- }
- }
- return i;
- }
- function _c(t, e, i) {
- i.style.text = null, Ga(i, {
- shape: {
- width: 0
- }
- }, e, t, function () {
- i.parent && i.parent.remove(i);
- });
- }
- function xc(t, e, i) {
- i.style.text = null, Ga(i, {
- shape: {
- r: i.shape.r0
- }
- }, e, t, function () {
- i.parent && i.parent.remove(i);
- });
- }
- function wc(t, e, i, n, r, a, o, l) {
- var u = e.getItemVisual(i, "color"),
- h = e.getItemVisual(i, "opacity"),
- c = n.getModel("itemStyle"),
- d = n.getModel("emphasis.itemStyle").getBarItemStyle();
- l || t.setShape("r", c.get("barBorderRadius") || 0), t.useStyle(s({
- fill: u,
- opacity: h
- }, c.getBarItemStyle()));
- var f = n.getShallow("cursor");
- f && t.attr("cursor", f);
- var p = o ? r.height > 0 ? "bottom" : "top" : r.width > 0 ? "left" : "right";
- l || fc(t.style, d, n, u, a, i, p), Ma(t, d);
- }
- function bc(t, e) {
- var i = t.get(HS) || 0;
- return Math.min(i, Math.abs(e.width), Math.abs(e.height));
- }
- function Sc(t, e, i) {
- var n = t.getData(),
- r = [],
- a = n.getLayout("valueAxisHorizontal") ? 1 : 0;
- r[1 - a] = n.getLayout("valueAxisStart");
- var o = new ZS({
- shape: {
- points: n.getLayout("largePoints")
- },
- incremental: !!i,
- __startPoint: r,
- __baseDimIdx: a,
- __largeDataIndices: n.getLayout("largeDataIndices"),
- __barWidth: n.getLayout("barWidth")
- });
- e.add(o), Ic(o, t, n), o.seriesIndex = t.seriesIndex, t.get("silent") || (o.on("mousedown", KS), o.on("mousemove", KS));
- }
- function Mc(t, e, i) {
- var n = t.__baseDimIdx,
- r = 1 - n,
- a = t.shape.points,
- o = t.__largeDataIndices,
- s = Math.abs(t.__barWidth / 2),
- l = t.__startPoint[r];
- WS[0] = e, WS[1] = i;
- for (var u = WS[n], h = WS[1 - n], c = u - s, d = u + s, f = 0, p = a.length / 2; p > f; f++) {
- var g = 2 * f,
- m = a[g + n],
- v = a[g + r];
- if (m >= c && d >= m && (v >= l ? h >= l && v >= h : h >= v && l >= h)) return o[f];
- }
- return -1;
- }
- function Ic(t, e, i) {
- var n = i.getVisual("borderColor") || i.getVisual("color"),
- r = e.getModel("itemStyle").getItemStyle(["color", "borderColor"]);
- t.useStyle(r), t.style.fill = null, t.style.stroke = n, t.style.lineWidth = i.getLayout("barWidth");
- }
- function Tc(t, e, i, n) {
- var r,
- a,
- o = go(i - t.rotation),
- s = n[0] > n[1],
- l = "start" === e && !s || "start" !== e && s;
- return mo(o - $S / 2) ? (a = l ? "bottom" : "top", r = "center") : mo(o - 1.5 * $S) ? (a = l ? "top" : "bottom", r = "center") : (a = "middle", r = 1.5 * $S > o && o > $S / 2 ? l ? "left" : "right" : l ? "right" : "left"), {
- rotation: o,
- textAlign: r,
- textVerticalAlign: a
- };
- }
- function Cc(t, e, i) {
- if (!Ah(t.axis)) {
- var n = t.get("axisLabel.showMinLabel"),
- r = t.get("axisLabel.showMaxLabel");
- e = e || [], i = i || [];
- var a = e[0],
- o = e[1],
- s = e[e.length - 1],
- l = e[e.length - 2],
- u = i[0],
- h = i[1],
- c = i[i.length - 1],
- d = i[i.length - 2];
- n === !1 ? (Dc(a), Dc(u)) : Ac(a, o) && (n ? (Dc(o), Dc(h)) : (Dc(a), Dc(u))), r === !1 ? (Dc(s), Dc(c)) : Ac(l, s) && (r ? (Dc(l), Dc(d)) : (Dc(s), Dc(c)));
- }
- }
- function Dc(t) {
- t && (t.ignore = !0);
- }
- function Ac(t, e) {
- var i = t && t.getBoundingRect().clone(),
- n = e && e.getBoundingRect().clone();
- if (i && n) {
- var r = Ae([]);
- return Oe(r, r, -t.rotation), i.applyTransform(Pe([], r, t.getLocalTransform())), n.applyTransform(Pe([], r, e.getLocalTransform())), i.intersect(n);
- }
- }
- function kc(t) {
- return "middle" === t || "center" === t;
- }
- function Pc(t, e, i) {
- var n = e.axis;
- if (e.get("axisTick.show") && !n.scale.isBlank()) {
- for (var r = e.getModel("axisTick"), a = r.getModel("lineStyle"), o = r.get("length"), l = n.getTicksCoords(), u = [], h = [], c = t._transform, d = [], f = 0; f < l.length; f++) {
- var p = l[f].coord;
- u[0] = p, u[1] = 0, h[0] = p, h[1] = i.tickDirection * o, c && (ae(u, u, c), ae(h, h, c));
- var g = new c_({
- anid: "tick_" + l[f].tickValue,
- subPixelOptimize: !0,
- shape: {
- x1: u[0],
- y1: u[1],
- x2: h[0],
- y2: h[1]
- },
- style: s(a.getLineStyle(), {
- stroke: e.get("axisLine.lineStyle.color")
- }),
- z2: 2,
- silent: !0
- });
- t.group.add(g), d.push(g);
- }
- return d;
- }
- }
- function Lc(t, e, i) {
- var n = e.axis,
- r = D(i.axisLabelShow, e.get("axisLabel.show"));
- if (r && !n.scale.isBlank()) {
- var a = e.getModel("axisLabel"),
- o = a.get("margin"),
- s = n.getViewLabels(),
- l = (D(i.labelRotate, a.get("rotate")) || 0) * $S / 180,
- u = eM(i.rotation, l, i.labelDirection),
- h = e.getCategories && e.getCategories(!0),
- c = [],
- d = iM(e),
- p = e.get("triggerEvent");
- return f(s, function (r, s) {
- var l = r.tickValue,
- f = r.formattedLabel,
- g = r.rawLabel,
- m = a;
- h && h[l] && h[l].textStyle && (m = new Ja(h[l].textStyle, a, e.ecModel));
- var v = m.getTextColor() || e.get("axisLine.lineStyle.color"),
- y = n.dataToCoord(l),
- _ = [y, i.labelOffset + i.labelDirection * o],
- x = new $y({
- anid: "label_" + l,
- position: _,
- rotation: u.rotation,
- silent: d,
- z2: 10
- });
- ka(x.style, m, {
- text: f,
- textAlign: m.getShallow("align", !0) || u.textAlign,
- textVerticalAlign: m.getShallow("verticalAlign", !0) || m.getShallow("baseline", !0) || u.textVerticalAlign,
- textFill: "function" == typeof v ? v("category" === n.type ? g : "value" === n.type ? l + "" : l, s) : v
- }), p && (x.eventData = tM(e), x.eventData.targetType = "axisLabel", x.eventData.value = g), t._dumbGroup.add(x), x.updateTransform(), c.push(x), t.group.add(x), x.decomposeTransform();
- }), c;
- }
- }
- function Oc(t, e) {
- var i = {
- axesInfo: {},
- seriesInvolved: !1,
- coordSysAxesInfo: {},
- coordSysMap: {}
- };
- return zc(i, t, e), i.seriesInvolved && Rc(i, t), i;
- }
- function zc(t, e, i) {
- var n = e.getComponent("tooltip"),
- r = e.getComponent("axisPointer"),
- a = r.get("link", !0) || [],
- o = [];
- nM(i.getCoordinateSystems(), function (i) {
- function s(n, s, l) {
- var h = l.model.getModel("axisPointer", r),
- d = h.get("show");
- if (d && ("auto" !== d || n || Hc(h))) {
- null == s && (s = h.get("triggerTooltip")), h = n ? Ec(l, c, r, e, n, s) : h;
- var f = h.get("snap"),
- p = Wc(l.model),
- g = s || f || "category" === l.type,
- m = t.axesInfo[p] = {
- key: p,
- axis: l,
- coordSys: i,
- axisPointerModel: h,
- triggerTooltip: s,
- involveSeries: g,
- snap: f,
- useHandle: Hc(h),
- seriesModels: []
- };
- u[p] = m, t.seriesInvolved |= g;
- var v = Bc(a, l);
- if (null != v) {
- var y = o[v] || (o[v] = {
- axesInfo: {}
- });
- y.axesInfo[p] = m, y.mapper = a[v].mapper, m.linkGroup = y;
- }
- }
- }
- if (i.axisPointerEnabled) {
- var l = Wc(i.model),
- u = t.coordSysAxesInfo[l] = {};
- t.coordSysMap[l] = i;
- var h = i.model,
- c = h.getModel("tooltip", n);
- if (nM(i.getAxes(), rM(s, !1, null)), i.getTooltipAxes && n && c.get("show")) {
- var d = "axis" === c.get("trigger"),
- f = "cross" === c.get("axisPointer.type"),
- p = i.getTooltipAxes(c.get("axisPointer.axis"));
- (d || f) && nM(p.baseAxes, rM(s, f ? "cross" : !0, d)), f && nM(p.otherAxes, rM(s, "cross", !1));
- }
- }
- });
- }
- function Ec(t, e, i, r, a, o) {
- var l = e.getModel("axisPointer"),
- u = {};
- nM(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], function (t) {
- u[t] = n(l.get(t));
- }), u.snap = "category" !== t.type && !!o, "cross" === l.get("type") && (u.type = "line");
- var h = u.label || (u.label = {});
- if (null == h.show && (h.show = !1), "cross" === a) {
- var c = l.get("label.show");
- if (h.show = null != c ? c : !0, !o) {
- var d = u.lineStyle = l.get("crossStyle");
- d && s(h, d.textStyle);
- }
- }
- return t.model.getModel("axisPointer", new Ja(u, i, r));
- }
- function Rc(t, e) {
- e.eachSeries(function (e) {
- var i = e.coordinateSystem,
- n = e.get("tooltip.trigger", !0),
- r = e.get("tooltip.show", !0);
- i && "none" !== n && n !== !1 && "item" !== n && r !== !1 && e.get("axisPointer.show", !0) !== !1 && nM(t.coordSysAxesInfo[Wc(i.model)], function (t) {
- var n = t.axis;
- i.getAxis(n.dim) === n && (t.seriesModels.push(e), null == t.seriesDataCount && (t.seriesDataCount = 0), t.seriesDataCount += e.getData().count());
- });
- }, this);
- }
- function Bc(t, e) {
- for (var i = e.model, n = e.dim, r = 0; r < t.length; r++) {
- var a = t[r] || {};
- if (Nc(a[n + "AxisId"], i.id) || Nc(a[n + "AxisIndex"], i.componentIndex) || Nc(a[n + "AxisName"], i.name)) return r;
- }
- }
- function Nc(t, e) {
- return "all" === t || x(t) && u(t, e) >= 0 || t === e;
- }
- function Fc(t) {
- var e = Gc(t);
- if (e) {
- var i = e.axisPointerModel,
- n = e.axis.scale,
- r = i.option,
- a = i.get("status"),
- o = i.get("value");
- null != o && (o = n.parse(o));
- var s = Hc(i);
- null == a && (r.status = s ? "show" : "hide");
- var l = n.getExtent().slice();
- l[0] > l[1] && l.reverse(), (null == o || o > l[1]) && (o = l[1]), o < l[0] && (o = l[0]), r.value = o, s && (r.status = e.axis.scale.isBlank() ? "hide" : "show");
- }
- }
- function Gc(t) {
- var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
- return e && e.axesInfo[Wc(t)];
- }
- function Vc(t) {
- var e = Gc(t);
- return e && e.axisPointerModel;
- }
- function Hc(t) {
- return !!t.get("handle.show");
- }
- function Wc(t) {
- return t.type + "||" + t.id;
- }
- function Uc(t, e, i, n, r, a) {
- var o = aM.getAxisPointerClass(t.axisPointerClass);
- if (o) {
- var s = Vc(e);
- s ? (t._axisPointer || (t._axisPointer = new o())).render(e, s, n, a) : Xc(t, n);
- }
- }
- function Xc(t, e, i) {
- var n = t._axisPointer;
- n && n.dispose(e, i), t._axisPointer = null;
- }
- function Yc(t, e, i) {
- i = i || {};
- var n = t.coordinateSystem,
- r = e.axis,
- a = {},
- o = r.getAxesOnZeroOf()[0],
- s = r.position,
- l = o ? "onZero" : s,
- u = r.dim,
- h = n.getRect(),
- c = [h.x, h.x + h.width, h.y, h.y + h.height],
- d = {
- left: 0,
- right: 1,
- top: 0,
- bottom: 1,
- onZero: 2
- },
- f = e.get("offset") || 0,
- p = "x" === u ? [c[2] - f, c[3] + f] : [c[0] - f, c[1] + f];
- if (o) {
- var g = o.toGlobalCoord(o.dataToCoord(0));
- p[d.onZero] = Math.max(Math.min(g, p[1]), p[0]);
- }
- a.position = ["y" === u ? p[d[l]] : c[0], "x" === u ? p[d[l]] : c[3]], a.rotation = Math.PI / 2 * ("x" === u ? 0 : 1);
- var m = {
- top: -1,
- bottom: 1,
- left: -1,
- right: 1
- };
- a.labelDirection = a.tickDirection = a.nameDirection = m[s], a.labelOffset = o ? p[d[s]] - p[d.onZero] : 0, e.get("axisTick.inside") && (a.tickDirection = -a.tickDirection), D(i.labelInside, e.get("axisLabel.inside")) && (a.labelDirection = -a.labelDirection);
- var v = e.get("axisLabel.rotate");
- return a.labelRotate = "top" === l ? -v : v, a.z2 = 1, a;
- }
- function jc(t, e, i) {
- Bm.call(this), this.updateData(t, e, i);
- }
- function qc(t) {
- return [t[0] / 2, t[1] / 2];
- }
- function Zc(t, e) {
- this.parent.drift(t, e);
- }
- function Kc(t, e) {
- if (!this.incremental && !this.useHoverLayer) if ("emphasis" === e) {
- var i = this.__symbolOriginalScale,
- n = i[1] / i[0],
- r = {
- scale: [Math.max(1.1 * i[0], i[0] + 3), Math.max(1.1 * i[1], i[1] + 3 * n)]
- };
- this.animateTo(r, 400, "elasticOut");
- } else "normal" === e && this.animateTo({
- scale: this.__symbolOriginalScale
- }, 400, "elasticOut");
- }
- function $c(t) {
- this.group = new Bm(), this._symbolCtor = t || jc;
- }
- function Qc(t, e, i, n) {
- return !(!e || isNaN(e[0]) || isNaN(e[1]) || n.isIgnore && n.isIgnore(i) || n.clipShape && !n.clipShape.contain(e[0], e[1]) || "none" === t.getItemVisual(i, "symbol"));
- }
- function Jc(t) {
- return null == t || S(t) || (t = {
- isIgnore: t
- }), t || {};
- }
- function td(t) {
- var e = t.hostModel;
- return {
- itemStyle: e.getModel("itemStyle").getItemStyle(["color"]),
- hoverItemStyle: e.getModel("emphasis.itemStyle").getItemStyle(),
- symbolRotate: e.get("symbolRotate"),
- symbolOffset: e.get("symbolOffset"),
- hoverAnimation: e.get("hoverAnimation"),
- labelModel: e.getModel("label"),
- hoverLabelModel: e.getModel("emphasis.label"),
- cursorStyle: e.get("cursor")
- };
- }
- function ed(t, e, i) {
- var n,
- r = t.getBaseAxis(),
- a = t.getOtherAxis(r),
- o = id(a, i),
- s = r.dim,
- l = a.dim,
- u = e.mapDimension(l),
- h = e.mapDimension(s),
- c = "x" === l || "radius" === l ? 1 : 0,
- d = p(t.dimensions, function (t) {
- return e.mapDimension(t);
- }),
- f = e.getCalculationInfo("stackResultDimension");
- return (n |= ju(e, d[0])) && (d[0] = f), (n |= ju(e, d[1])) && (d[1] = f), {
- dataDimsForPoint: d,
- valueStart: o,
- valueAxisDim: l,
- baseAxisDim: s,
- stacked: !!n,
- valueDim: u,
- baseDim: h,
- baseDataOffset: c,
- stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
- };
- }
- function id(t, e) {
- var i = 0,
- n = t.scale.getExtent();
- return "start" === e ? i = n[0] : "end" === e ? i = n[1] : n[0] > 0 ? i = n[0] : n[1] < 0 && (i = n[1]), i;
- }
- function nd(t, e, i, n) {
- var r = 0 / 0;
- t.stacked && (r = i.get(i.getCalculationInfo("stackedOverDimension"), n)), isNaN(r) && (r = t.valueStart);
- var a = t.baseDataOffset,
- o = [];
- return o[a] = i.get(t.baseDim, n), o[1 - a] = r, e.dataToPoint(o);
- }
- function rd(t, e) {
- var i = [];
- return e.diff(t).add(function (t) {
- i.push({
- cmd: "+",
- idx: t
- });
- }).update(function (t, e) {
- i.push({
- cmd: "=",
- idx: e,
- idx1: t
- });
- }).remove(function (t) {
- i.push({
- cmd: "-",
- idx: t
- });
- }).execute(), i;
- }
- function ad(t) {
- return isNaN(t[0]) || isNaN(t[1]);
- }
- function od(t, e, i, n, r, a, o, s, l, u) {
- return "none" !== u && u ? sd.apply(this, arguments) : ld.apply(this, arguments);
- }
- function sd(t, e, i, n, r, a, o, s, l, u, h) {
- for (var c = 0, d = i, f = 0; n > f; f++) {
- var p = e[d];
- if (d >= r || 0 > d) break;
- if (ad(p)) {
- if (h) {
- d += a;
- continue;
- }
- break;
- }
- if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]);else if (l > 0) {
- var g = e[c],
- m = "y" === u ? 1 : 0,
- v = (p[m] - g[m]) * l;
- wM(SM, g), SM[m] = g[m] + v, wM(MM, p), MM[m] = p[m] - v, t.bezierCurveTo(SM[0], SM[1], MM[0], MM[1], p[0], p[1]);
- } else t.lineTo(p[0], p[1]);
- c = d, d += a;
- }
- return f;
- }
- function ld(t, e, i, n, r, a, o, s, l, u, h) {
- for (var c = 0, d = i, f = 0; n > f; f++) {
- var p = e[d];
- if (d >= r || 0 > d) break;
- if (ad(p)) {
- if (h) {
- d += a;
- continue;
- }
- break;
- }
- if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]), wM(SM, p);else if (l > 0) {
- var g = d + a,
- m = e[g];
- if (h) for (; m && ad(e[g]);) g += a, m = e[g];
- var v = .5,
- y = e[c],
- m = e[g];
- if (!m || ad(m)) wM(MM, p);else {
- ad(m) && !h && (m = p), j(bM, m, y);
- var _, x;
- if ("x" === u || "y" === u) {
- var w = "x" === u ? 0 : 1;
- _ = Math.abs(p[w] - y[w]), x = Math.abs(p[w] - m[w]);
- } else _ = Hg(p, y), x = Hg(p, m);
- v = x / (x + _), xM(MM, p, bM, -l * (1 - v));
- }
- yM(SM, SM, s), _M(SM, SM, o), yM(MM, MM, s), _M(MM, MM, o), t.bezierCurveTo(SM[0], SM[1], MM[0], MM[1], p[0], p[1]), xM(SM, p, bM, l * v);
- } else t.lineTo(p[0], p[1]);
- c = d, d += a;
- }
- return f;
- }
- function ud(t, e) {
- var i = [1 / 0, 1 / 0],
- n = [-1 / 0, -1 / 0];
- if (e) for (var r = 0; r < t.length; r++) {
- var a = t[r];
- a[0] < i[0] && (i[0] = a[0]), a[1] < i[1] && (i[1] = a[1]), a[0] > n[0] && (n[0] = a[0]), a[1] > n[1] && (n[1] = a[1]);
- }
- return {
- min: e ? i : n,
- max: e ? n : i
- };
- }
- function hd(t, e) {
- if (t.length === e.length) {
- for (var i = 0; i < t.length; i++) {
- var n = t[i],
- r = e[i];
- if (n[0] !== r[0] || n[1] !== r[1]) return;
- }
- return !0;
- }
- }
- function cd(t) {
- return "number" == typeof t ? t : t ? .5 : 0;
- }
- function dd(t, e, i) {
- if (!i.valueDim) return [];
- for (var n = [], r = 0, a = e.count(); a > r; r++) n.push(nd(i, t, e, r));
- return n;
- }
- function fd(t, e, i) {
- for (var n = e.getBaseAxis(), r = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], o = 0; o < t.length - 1; o++) {
- var s = t[o + 1],
- l = t[o];
- a.push(l);
- var u = [];
- switch (i) {
- case "end":
- u[r] = s[r], u[1 - r] = l[1 - r], a.push(u);
- break;
- case "middle":
- var h = (l[r] + s[r]) / 2,
- c = [];
- u[r] = c[r] = h, u[1 - r] = l[1 - r], c[1 - r] = s[1 - r], a.push(u), a.push(c);
- break;
- default:
- u[r] = l[r], u[1 - r] = s[1 - r], a.push(u);
- }
- }
- return t[o] && a.push(t[o]), a;
- }
- function pd(t, e) {
- var i = t.getVisual("visualMeta");
- if (i && i.length && t.count() && "cartesian2d" === e.type) {
- for (var n, r, a = i.length - 1; a >= 0; a--) {
- var o = i[a].dimension,
- s = t.dimensions[o],
- l = t.getDimensionInfo(s);
- if (n = l && l.coordDim, "x" === n || "y" === n) {
- r = i[a];
- break;
- }
- }
- if (r) {
- var u = e.getAxis(n),
- h = p(r.stops, function (t) {
- return {
- coord: u.toGlobalCoord(u.dataToCoord(t.value)),
- color: t.color
- };
- }),
- c = h.length,
- d = r.outerColors.slice();
- c && h[0].coord > h[c - 1].coord && (h.reverse(), d.reverse());
- var g = 10,
- m = h[0].coord - g,
- v = h[c - 1].coord + g,
- y = v - m;
- if (.001 > y) return "transparent";
- f(h, function (t) {
- t.offset = (t.coord - m) / y;
- }), h.push({
- offset: c ? h[c - 1].offset : .5,
- color: d[1] || "transparent"
- }), h.unshift({
- offset: c ? h[0].offset : .5,
- color: d[0] || "transparent"
- });
- var _ = new v_(0, 0, 0, 0, h, !0);
- return _[n] = m, _[n + "2"] = v, _;
- }
- }
- }
- function gd(t, e, i) {
- var n = t.get("showAllSymbol"),
- r = "auto" === n;
- if (!n || r) {
- var a = i.getAxesByScale("ordinal")[0];
- if (a && (!r || !md(a, e))) {
- var o = e.mapDimension(a.dim),
- s = {};
- return f(a.getViewLabels(), function (t) {
- s[t.tickValue] = 1;
- }), function (t) {
- return !s.hasOwnProperty(e.get(o, t));
- };
- }
- }
- }
- function md(t, e) {
- var i = t.getExtent(),
- n = Math.abs(i[1] - i[0]) / t.scale.count();
- isNaN(n) && (n = 0);
- for (var r = e.count(), a = Math.max(1, Math.round(r / 5)), o = 0; r > o; o += a) if (1.5 * jc.getSymbolSize(e, o)[t.isHorizontal() ? 1 : 0] > n) return !1;
- return !0;
- }
- function vd(t, e, i) {
- if ("cartesian2d" === t.type) {
- var n = t.getBaseAxis().isHorizontal(),
- r = gc(t, e, i);
- if (!i.get("clip", !0)) {
- var a = r.shape,
- o = Math.max(a.width, a.height);
- n ? (a.y -= o, a.height += 2 * o) : (a.x -= o, a.width += 2 * o);
- }
- return r;
- }
- return mc(t, e, i);
- }
- function yd(t, e, i, n) {
- var r = e.getData(),
- a = this.dataIndex,
- o = r.getName(a),
- s = e.get("selectedOffset");
- n.dispatchAction({
- type: "pieToggleSelect",
- from: t,
- name: o,
- seriesId: e.id
- }), r.each(function (t) {
- _d(r.getItemGraphicEl(t), r.getItemLayout(t), e.isSelected(r.getName(t)), s, i);
- });
- }
- function _d(t, e, i, n, r) {
- var a = (e.startAngle + e.endAngle) / 2,
- o = Math.cos(a),
- s = Math.sin(a),
- l = i ? n : 0,
- u = [o * l, s * l];
- r ? t.animate().when(200, {
- position: u
- }).start("bounceOut") : t.attr("position", u);
- }
- function xd(t, e) {
- Bm.call(this);
- var i = new e_({
- z2: 2
- }),
- n = new o_(),
- r = new $y();
- this.add(i), this.add(n), this.add(r), this.updateData(t, e, !0);
- }
- function wd(t, e, i, n, r, a, o) {
- function s(e, i, n) {
- for (var r = e; i > r; r++) if (t[r].y += n, r > e && i > r + 1 && t[r + 1].y > t[r].y + t[r].height) return void l(r, n / 2);
- l(i - 1, n / 2);
- }
- function l(e, i) {
- for (var n = e; n >= 0 && (t[n].y -= i, !(n > 0 && t[n].y > t[n - 1].y + t[n - 1].height)); n--);
- }
- function u(t, e, i, n, r, a) {
- for (var o = a > 0 ? e ? Number.MAX_VALUE : 0 : e ? Number.MAX_VALUE : 0, s = 0, l = t.length; l > s; s++) {
- var u = Math.abs(t[s].y - n),
- h = t[s].len,
- c = t[s].len2,
- d = r + h > u ? Math.sqrt((r + h + c) * (r + h + c) - u * u) : Math.abs(t[s].x - i);
- e && d >= o && (d = o - 10), !e && o >= d && (d = o + 10), t[s].x = i + d * a, o = d;
- }
- }
- t.sort(function (t, e) {
- return t.y - e.y;
- });
- for (var h, c = 0, d = t.length, f = [], p = [], g = 0; d > g; g++) h = t[g].y - c, 0 > h && s(g, d, -h, r), c = t[g].y + t[g].height;
- 0 > o - c && l(d - 1, c - o);
- for (var g = 0; d > g; g++) t[g].y >= i ? p.push(t[g]) : f.push(t[g]);
- u(f, !1, e, i, n, r), u(p, !0, e, i, n, r);
- }
- function bd(t, e, i, n, r, a) {
- for (var o = [], s = [], l = 0; l < t.length; l++) Sd(t[l]) || (t[l].x < e ? o.push(t[l]) : s.push(t[l]));
- wd(s, e, i, n, 1, r, a), wd(o, e, i, n, -1, r, a);
- for (var l = 0; l < t.length; l++) if (!Sd(t[l])) {
- var u = t[l].linePoints;
- if (u) {
- var h = u[1][0] - u[2][0];
- u[2][0] = t[l].x < e ? t[l].x + 3 : t[l].x - 3, u[1][1] = u[2][1] = t[l].y, u[1][0] = u[2][0] + h;
- }
- }
- }
- function Sd(t) {
- return "center" === t.position;
- }
- function Md(t) {
- for (var e, i = 0; i < t.length; i++) {
- var n = t[i].getBoundingRect();
- e = e || n.clone(), e.union(n);
- }
- return e;
- }
- function Id(t, e) {
- var i,
- n,
- r = t.svgXML;
- try {
- i = r && Al(r, {
- ignoreViewBox: !0,
- ignoreRootClip: !0
- }) || {}, n = i.root, O(null != n);
- } catch (a) {
- throw new Error("Invalid svg format\n" + a.message);
- }
- var o = i.width,
- s = i.height,
- l = i.viewBoxRect;
- if (e || (e = null == o || null == s ? n.getBoundingRect() : new wi(0, 0, 0, 0), null != o && (e.width = o), null != s && (e.height = s)), l) {
- var u = Dl(l, e.width, e.height),
- h = n;
- n = new Bm(), n.add(h), h.scale = u.scale, h.position = u.position;
- }
- return n.setClipPath(new u_({
- shape: e.plain()
- })), {
- root: n,
- boundingRect: e
- };
- }
- function Td(t) {
- return function (e, i) {
- var n = Cd(e),
- r = [];
- return f(n, function (n) {
- var a = aI[n.type][t];
- a && r.push(a(e, n, i));
- }), r;
- };
- }
- function Cd(t) {
- var e = kw.retrieveMap(t) || [];
- return e;
- }
- function Dd(t, e) {
- return !!Ad(t)[e];
- }
- function Ad(t) {
- return t[lI] || (t[lI] = {});
- }
- function kd(t) {
- this.pointerChecker, this._zr = t, this._opt = {};
- var e = y,
- i = e(Pd, this),
- r = e(Ld, this),
- a = e(Od, this),
- o = e(zd, this),
- l = e(Ed, this);
- Yg.call(this), this.setPointerChecker = function (t) {
- this.pointerChecker = t;
- }, this.enable = function (e, u) {
- this.disable(), this._opt = s(n(u) || {}, {
- zoomOnMouseWheel: !0,
- moveOnMouseMove: !0,
- moveOnMouseWheel: !1,
- preventDefaultMouseMove: !0
- }), null == e && (e = !0), (e === !0 || "move" === e || "pan" === e) && (t.on("mousedown", i), t.on("mousemove", r), t.on("mouseup", a)), (e === !0 || "scale" === e || "zoom" === e) && (t.on("mousewheel", o), t.on("pinch", l));
- }, this.disable = function () {
- t.off("mousedown", i), t.off("mousemove", r), t.off("mouseup", a), t.off("mousewheel", o), t.off("pinch", l);
- }, this.dispose = this.disable, this.isDragging = function () {
- return this._dragging;
- }, this.isPinching = function () {
- return this._pinching;
- };
- }
- function Pd(t) {
- if (!(we(t) || t.target && t.target.draggable)) {
- var e = t.offsetX,
- i = t.offsetY;
- this.pointerChecker && this.pointerChecker(t, e, i) && (this._x = e, this._y = i, this._dragging = !0);
- }
- }
- function Ld(t) {
- if (this._dragging && Nd("moveOnMouseMove", t, this._opt) && "pinch" !== t.gestureEvent && !Dd(this._zr, "globalPan")) {
- var e = t.offsetX,
- i = t.offsetY,
- n = this._x,
- r = this._y,
- a = e - n,
- o = i - r;
- this._x = e, this._y = i, this._opt.preventDefaultMouseMove && Qg(t.event), Bd(this, "pan", "moveOnMouseMove", t, {
- dx: a,
- dy: o,
- oldX: n,
- oldY: r,
- newX: e,
- newY: i
- });
- }
- }
- function Od(t) {
- we(t) || (this._dragging = !1);
- }
- function zd(t) {
- var e = Nd("zoomOnMouseWheel", t, this._opt),
- i = Nd("moveOnMouseWheel", t, this._opt),
- n = t.wheelDelta,
- r = Math.abs(n),
- a = t.offsetX,
- o = t.offsetY;
- if (0 !== n && (e || i)) {
- if (e) {
- var s = r > 3 ? 1.4 : r > 1 ? 1.2 : 1.1,
- l = n > 0 ? s : 1 / s;
- Rd(this, "zoom", "zoomOnMouseWheel", t, {
- scale: l,
- originX: a,
- originY: o
- });
- }
- if (i) {
- var u = Math.abs(n),
- h = (n > 0 ? 1 : -1) * (u > 3 ? .4 : u > 1 ? .15 : .05);
- Rd(this, "scrollMove", "moveOnMouseWheel", t, {
- scrollDelta: h,
- originX: a,
- originY: o
- });
- }
- }
- }
- function Ed(t) {
- if (!Dd(this._zr, "globalPan")) {
- var e = t.pinchScale > 1 ? 1.1 : 1 / 1.1;
- Rd(this, "zoom", null, t, {
- scale: e,
- originX: t.pinchX,
- originY: t.pinchY
- });
- }
- }
- function Rd(t, e, i, n, r) {
- t.pointerChecker && t.pointerChecker(n, r.originX, r.originY) && (Qg(n.event), Bd(t, e, i, n, r));
- }
- function Bd(t, e, i, n, r) {
- r.isAvailableBehavior = y(Nd, null, i, n), t.trigger(e, r);
- }
- function Nd(t, e, i) {
- var n = i[t];
- return !t || n && (!b(n) || e.event[n + "Key"]);
- }
- function Fd(t, e, i) {
- var n = t.target,
- r = n.position;
- r[0] += e, r[1] += i, n.dirty();
- }
- function Gd(t, e, i, n) {
- var r = t.target,
- a = t.zoomLimit,
- o = r.position,
- s = r.scale,
- l = t.zoom = t.zoom || 1;
- if (l *= e, a) {
- var u = a.min || 0,
- h = a.max || 1 / 0;
- l = Math.max(Math.min(h, l), u);
- }
- var c = l / t.zoom;
- t.zoom = l, o[0] -= (i - o[0]) * (c - 1), o[1] -= (n - o[1]) * (c - 1), s[0] *= c, s[1] *= c, r.dirty();
- }
- function Vd(t, e, i) {
- var n = e.getComponentByElement(t.topTarget),
- r = n && n.coordinateSystem;
- return n && n !== i && !uI[n.mainType] && r && r.model !== i;
- }
- function Hd(t) {
- var e = t.getItemStyle(),
- i = t.get("areaColor");
- return null != i && (e.fill = i), e;
- }
- function Wd(t, e, i, n, r) {
- i.off("click"), i.off("mousedown"), e.get("selectedMode") && (i.on("mousedown", function () {
- t._mouseDownFlag = !0;
- }), i.on("click", function (a) {
- if (t._mouseDownFlag) {
- t._mouseDownFlag = !1;
- for (var o = a.target; !o.__regions;) o = o.parent;
- if (o) {
- var s = {
- type: ("geo" === e.mainType ? "geo" : "map") + "ToggleSelect",
- batch: p(o.__regions, function (t) {
- return {
- name: t.name,
- from: r.uid
- };
- })
- };
- s[e.mainType + "Id"] = e.id, n.dispatchAction(s), Ud(e, i);
- }
- }
- }));
- }
- function Ud(t, e) {
- e.eachChild(function (e) {
- f(e.__regions, function (i) {
- e.trigger(t.isSelected(i.name) ? "emphasis" : "normal");
- });
- });
- }
- function Xd(t, e) {
- var i = new Bm();
- this.uid = io("ec_map_draw"), this._controller = new kd(t.getZr()), this._controllerHost = {
- target: e ? i : null
- }, this.group = i, this._updateGroup = e, this._mouseDownFlag, this._mapName, this._initialized, i.add(this._regionsGroup = new Bm()), i.add(this._backgroundGroup = new Bm());
- }
- function Yd(t) {
- var e = this[hI];
- e && e.recordVersion === this[cI] && jd(e, t);
- }
- function jd(t, e) {
- var i = t.circle,
- n = t.labelModel,
- r = t.hoverLabelModel,
- a = t.emphasisText,
- o = t.normalText;
- e ? (i.style.extendFrom(ka({}, r, {
- text: r.get("show") ? a : null
- }, {
- isRectText: !0,
- useInsideStyle: !1
- }, !0)), i.__mapOriginalZ2 = i.z2, i.z2 += S_) : (ka(i.style, n, {
- text: n.get("show") ? o : null,
- textPosition: n.getShallow("position") || "bottom"
- }, {
- isRectText: !0,
- useInsideStyle: !1
- }), i.dirty(!1), null != i.__mapOriginalZ2 && (i.z2 = i.__mapOriginalZ2, i.__mapOriginalZ2 = null));
- }
- function qd(t, e, i) {
- var n = t.getZoom(),
- r = t.getCenter(),
- a = e.zoom,
- o = t.dataToPoint(r);
- if (null != e.dx && null != e.dy) {
- o[0] -= e.dx, o[1] -= e.dy;
- var r = t.pointToData(o);
- t.setCenter(r);
- }
- if (null != a) {
- if (i) {
- var s = i.min || 0,
- l = i.max || 1 / 0;
- a = Math.max(Math.min(n * a, l), s) / n;
- }
- t.scale[0] *= a, t.scale[1] *= a;
- var u = t.position,
- h = (e.originX - u[0]) * (a - 1),
- c = (e.originY - u[1]) * (a - 1);
- u[0] -= h, u[1] -= c, t.updateTransform();
- var r = t.pointToData(o);
- t.setCenter(r), t.setZoom(a * n);
- }
- return {
- center: t.getCenter(),
- zoom: t.getZoom()
- };
- }
- function Zd() {
- lm.call(this);
- }
- function Kd(t) {
- this.name = t, this.zoomLimit, lm.call(this), this._roamTransformable = new Zd(), this._rawTransformable = new Zd(), this._center, this._zoom;
- }
- function $d(t, e, i, n) {
- var r = i.seriesModel,
- a = r ? r.coordinateSystem : null;
- return a === this ? a[t](n) : null;
- }
- function Qd(t, e, i, n) {
- Kd.call(this, t), this.map = e;
- var r = oI.load(e, i);
- this._nameCoordMap = r.nameCoordMap, this._regionsMap = r.regionsMap, this._invertLongitute = null == n ? !0 : n, this.regions = r.regions, this._rect = r.boundingRect;
- }
- function Jd(t, e, i, n) {
- var r = i.geoModel,
- a = i.seriesModel,
- o = r ? r.coordinateSystem : a ? a.coordinateSystem || (a.getReferringComponents("geo")[0] || {}).coordinateSystem : null;
- return o === this ? o[t](n) : null;
- }
- function tf(t, e) {
- var i = t.get("boundingCoords");
- if (null != i) {
- var n = i[0],
- r = i[1];
- isNaN(n[0]) || isNaN(n[1]) || isNaN(r[0]) || isNaN(r[1]) || this.setBoundingRect(n[0], n[1], r[0] - n[0], r[1] - n[1]);
- }
- var a,
- o = this.getBoundingRect(),
- s = t.get("layoutCenter"),
- l = t.get("layoutSize"),
- u = e.getWidth(),
- h = e.getHeight(),
- c = o.width / o.height * this.aspectScale,
- d = !1;
- s && l && (s = [so(s[0], u), so(s[1], h)], l = so(l, Math.min(u, h)), isNaN(s[0]) || isNaN(s[1]) || isNaN(l) || (d = !0));
- var f;
- if (d) {
- var f = {};
- c > 1 ? (f.width = l, f.height = l / c) : (f.height = l, f.width = l * c), f.y = s[1] - f.height / 2, f.x = s[0] - f.width / 2;
- } else a = t.getBoxLayoutParams(), a.aspect = c, f = Ro(a, {
- width: u,
- height: h
- });
- this.setViewRect(f.x, f.y, f.width, f.height), this.setCenter(t.get("center")), this.setZoom(t.get("zoom"));
- }
- function ef(t, e) {
- f(e.get("geoCoord"), function (e, i) {
- t.addGeoCoord(i, e);
- });
- }
- function nf(t, e) {
- var i = {};
- return f(t, function (t) {
- t.each(t.mapDimension("value"), function (e, n) {
- var r = "ec-" + t.getName(n);
- i[r] = i[r] || [], isNaN(e) || i[r].push(e);
- });
- }), t[0].map(t[0].mapDimension("value"), function (n, r) {
- for (var a = "ec-" + t[0].getName(r), o = 0, s = 1 / 0, l = -1 / 0, u = i[a].length, h = 0; u > h; h++) s = Math.min(s, i[a][h]), l = Math.max(l, i[a][h]), o += i[a][h];
- var c;
- return c = "min" === e ? s : "max" === e ? l : "average" === e ? o / u : o, 0 === u ? 0 / 0 : c;
- });
- }
- function rf(t, e) {
- var i = t.get("center"),
- n = e.getWidth(),
- r = e.getHeight(),
- a = Math.min(n, r),
- o = so(i[0], e.getWidth()),
- s = so(i[1], e.getHeight()),
- l = so(t.get("radius"), a / 2);
- return {
- cx: o,
- cy: s,
- r: l
- };
- }
- function af(t, e) {
- return e && ("string" == typeof e ? t = e.replace("{value}", null != t ? t : "") : "function" == typeof e && (t = e(t))), t;
- }
- function of(t, e) {
- e.update = "updateView", uu(e, function (e, i) {
- var n = {};
- return i.eachComponent({
- mainType: "geo",
- query: e
- }, function (i) {
- i[t](e.name);
- var r = i.coordinateSystem;
- f(r.regions, function (t) {
- n[t.name] = i.isSelected(t.name) || !1;
- });
- }), {
- selected: n,
- name: e.name
- };
- });
- }
- function sf(t, e, i) {
- this.dimension = "single", this.dimensions = ["single"], this._axis = null, this._rect, this._init(t, e, i), this.model = t;
- }
- function lf(t, e) {
- var i = [];
- return t.eachComponent("singleAxis", function (n, r) {
- var a = new sf(n, t, e);
- a.name = "single_" + r, a.resize(n, e), n.coordinateSystem = a, i.push(a);
- }), t.eachSeries(function (e) {
- if ("singleAxis" === e.get("coordinateSystem")) {
- var i = t.queryComponents({
- mainType: "singleAxis",
- index: e.get("singleAxisIndex"),
- id: e.get("singleAxisId")
- })[0];
- e.coordinateSystem = i && i.coordinateSystem;
- }
- }), i;
- }
- function uf(t, e) {
- e = e || {};
- var i = t.coordinateSystem,
- n = t.axis,
- r = {},
- a = n.position,
- o = n.orient,
- s = i.getRect(),
- l = [s.x, s.x + s.width, s.y, s.y + s.height],
- u = {
- horizontal: {
- top: l[2],
- bottom: l[3]
- },
- vertical: {
- left: l[0],
- right: l[1]
- }
- };
- r.position = ["vertical" === o ? u.vertical[a] : l[0], "horizontal" === o ? u.horizontal[a] : l[3]];
- var h = {
- horizontal: 0,
- vertical: 1
- };
- r.rotation = Math.PI / 2 * h[o];
- var c = {
- top: -1,
- bottom: 1,
- right: 1,
- left: -1
- };
- r.labelDirection = r.tickDirection = r.nameDirection = c[a], t.get("axisTick.inside") && (r.tickDirection = -r.tickDirection), D(e.labelInside, t.get("axisLabel.inside")) && (r.labelDirection = -r.labelDirection);
- var d = e.rotate;
- return null == d && (d = t.get("axisLabel.rotate")), r.labelRotation = "top" === a ? -d : d, r.z2 = 1, r;
- }
- function hf(t, e) {
- return e.type || (e.data ? "category" : "value");
- }
- function cf(t, e, i, n, r) {
- var a = t.axis;
- if (!a.scale.isBlank() && a.containData(e)) {
- if (!t.involveSeries) return void i.showPointer(t, e);
- var s = df(e, t),
- l = s.payloadBatch,
- u = s.snapToValue;
- l[0] && null == r.seriesIndex && o(r, l[0]), !n && t.snap && a.containData(u) && null != u && (e = u), i.showPointer(t, e, l, r), i.showTooltip(t, s, u);
- }
- }
- function df(t, e) {
- var i = e.axis,
- n = i.dim,
- r = t,
- a = [],
- o = Number.MAX_VALUE,
- s = -1;
- return DI(e.seriesModels, function (e) {
- var l,
- u,
- h = e.getData().mapDimension(n, !0);
- if (e.getAxisTooltipData) {
- var c = e.getAxisTooltipData(h, t, i);
- u = c.dataIndices, l = c.nestestValue;
- } else {
- if (u = e.getData().indicesOfNearest(h[0], t, "category" === i.type ? .5 : null), !u.length) return;
- l = e.getData().get(h[0], u[0]);
- }
- if (null != l && isFinite(l)) {
- var d = t - l,
- f = Math.abs(d);
- o >= f && ((o > f || d >= 0 && 0 > s) && (o = f, s = d, r = l, a.length = 0), DI(u, function (t) {
- a.push({
- seriesIndex: e.seriesIndex,
- dataIndexInside: t,
- dataIndex: e.getData().getRawIndex(t)
- });
- }));
- }
- }), {
- payloadBatch: a,
- snapToValue: r
- };
- }
- function ff(t, e, i, n) {
- t[e.key] = {
- value: i,
- payloadBatch: n
- };
- }
- function pf(t, e, i, n) {
- var r = i.payloadBatch,
- a = e.axis,
- o = a.model,
- s = e.axisPointerModel;
- if (e.triggerTooltip && r.length) {
- var l = e.coordSys.model,
- u = Wc(l),
- h = t.map[u];
- h || (h = t.map[u] = {
- coordSysId: l.id,
- coordSysIndex: l.componentIndex,
- coordSysType: l.type,
- coordSysMainType: l.mainType,
- dataByAxis: []
- }, t.list.push(h)), h.dataByAxis.push({
- axisDim: a.dim,
- axisIndex: o.componentIndex,
- axisType: o.type,
- axisId: o.id,
- value: n,
- valueLabelOpt: {
- precision: s.get("label.precision"),
- formatter: s.get("label.formatter")
- },
- seriesDataIndices: r.slice()
- });
- }
- }
- function gf(t, e, i) {
- var n = i.axesInfo = [];
- DI(e, function (e, i) {
- var r = e.axisPointerModel.option,
- a = t[i];
- a ? (!e.useHandle && (r.status = "show"), r.value = a.value, r.seriesDataIndices = (a.payloadBatch || []).slice()) : !e.useHandle && (r.status = "hide"), "show" === r.status && n.push({
- axisDim: e.axis.dim,
- axisIndex: e.axis.model.componentIndex,
- value: r.value
- });
- });
- }
- function mf(t, e, i, n) {
- if (xf(e) || !t.list.length) return void n({
- type: "hideTip"
- });
- var r = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
- n({
- type: "showTip",
- escapeConnect: !0,
- x: e[0],
- y: e[1],
- tooltipOption: i.tooltipOption,
- position: i.position,
- dataIndexInside: r.dataIndexInside,
- dataIndex: r.dataIndex,
- seriesIndex: r.seriesIndex,
- dataByCoordSys: t.list
- });
- }
- function vf(t, e, i) {
- var n = i.getZr(),
- r = "axisPointerLastHighlights",
- a = kI(n)[r] || {},
- o = kI(n)[r] = {};
- DI(t, function (t) {
- var e = t.axisPointerModel.option;
- "show" === e.status && DI(e.seriesDataIndices, function (t) {
- var e = t.seriesIndex + " | " + t.dataIndex;
- o[e] = t;
- });
- });
- var s = [],
- l = [];
- f(a, function (t, e) {
- !o[e] && l.push(t);
- }), f(o, function (t, e) {
- !a[e] && s.push(t);
- }), l.length && i.dispatchAction({
- type: "downplay",
- escapeConnect: !0,
- batch: l
- }), s.length && i.dispatchAction({
- type: "highlight",
- escapeConnect: !0,
- batch: s
- });
- }
- function yf(t, e) {
- for (var i = 0; i < (t || []).length; i++) {
- var n = t[i];
- if (e.axis.dim === n.axisDim && e.axis.model.componentIndex === n.axisIndex) return n;
- }
- }
- function _f(t) {
- var e = t.axis.model,
- i = {},
- n = i.axisDim = t.axis.dim;
- return i.axisIndex = i[n + "AxisIndex"] = e.componentIndex, i.axisName = i[n + "AxisName"] = e.name, i.axisId = i[n + "AxisId"] = e.id, i;
- }
- function xf(t) {
- return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1]);
- }
- function wf(t, e, i) {
- if (!Mg.node) {
- var n = e.getZr();
- LI(n).records || (LI(n).records = {}), bf(n, e);
- var r = LI(n).records[t] || (LI(n).records[t] = {});
- r.handler = i;
- }
- }
- function bf(t, e) {
- function i(i, n) {
- t.on(i, function (i) {
- var r = Tf(e);
- OI(LI(t).records, function (t) {
- t && n(t, i, r.dispatchAction);
- }), Sf(r.pendings, e);
- });
- }
- LI(t).initialized || (LI(t).initialized = !0, i("click", _(If, "click")), i("mousemove", _(If, "mousemove")), i("globalout", Mf));
- }
- function Sf(t, e) {
- var i,
- n = t.showTip.length,
- r = t.hideTip.length;
- n ? i = t.showTip[n - 1] : r && (i = t.hideTip[r - 1]), i && (i.dispatchAction = null, e.dispatchAction(i));
- }
- function Mf(t, e, i) {
- t.handler("leave", null, i);
- }
- function If(t, e, i, n) {
- e.handler(t, i, n);
- }
- function Tf(t) {
- var e = {
- showTip: [],
- hideTip: []
- },
- i = function (n) {
- var r = e[n.type];
- r ? r.push(n) : (n.dispatchAction = i, t.dispatchAction(n));
- };
- return {
- dispatchAction: i,
- pendings: e
- };
- }
- function Cf(t, e) {
- if (!Mg.node) {
- var i = e.getZr(),
- n = (LI(i).records || {})[t];
- n && (LI(i).records[t] = null);
- }
- }
- function Df() {}
- function Af(t, e, i, n) {
- kf(EI(i).lastProp, n) || (EI(i).lastProp = n, e ? Ga(i, n, t) : (i.stopAnimation(), i.attr(n)));
- }
- function kf(t, e) {
- if (S(t) && S(e)) {
- var i = !0;
- return f(e, function (e, n) {
- i = i && kf(t[n], e);
- }), !!i;
- }
- return t === e;
- }
- function Pf(t, e) {
- t[e.get("label.show") ? "show" : "hide"]();
- }
- function Lf(t) {
- return {
- position: t.position.slice(),
- rotation: t.rotation || 0
- };
- }
- function Of(t, e, i) {
- var n = e.get("z"),
- r = e.get("zlevel");
- t && t.traverse(function (t) {
- "group" !== t.type && (null != n && (t.z = n), null != r && (t.zlevel = r), t.silent = i);
- });
- }
- function zf(t) {
- var e,
- i = t.get("type"),
- n = t.getModel(i + "Style");
- return "line" === i ? (e = n.getLineStyle(), e.fill = null) : "shadow" === i && (e = n.getAreaStyle(), e.stroke = null), e;
- }
- function Ef(t, e, i, n, r) {
- var a = i.get("value"),
- o = Bf(a, e.axis, e.ecModel, i.get("seriesDataIndices"), {
- precision: i.get("label.precision"),
- formatter: i.get("label.formatter")
- }),
- s = i.getModel("label"),
- l = Y_(s.get("padding") || 0),
- u = s.getFont(),
- h = Gi(o, u),
- c = r.position,
- d = h.width + l[1] + l[3],
- f = h.height + l[0] + l[2],
- p = r.align;
- "right" === p && (c[0] -= d), "center" === p && (c[0] -= d / 2);
- var g = r.verticalAlign;
- "bottom" === g && (c[1] -= f), "middle" === g && (c[1] -= f / 2), Rf(c, d, f, n);
- var m = s.get("backgroundColor");
- m && "auto" !== m || (m = e.get("axisLine.lineStyle.color")), t.label = {
- shape: {
- x: 0,
- y: 0,
- width: d,
- height: f,
- r: s.get("borderRadius")
- },
- position: c.slice(),
- style: {
- text: o,
- textFont: u,
- textFill: s.getTextColor(),
- textPosition: "inside",
- textPadding: l,
- fill: m,
- stroke: s.get("borderColor") || "transparent",
- lineWidth: s.get("borderWidth") || 0,
- shadowBlur: s.get("shadowBlur"),
- shadowColor: s.get("shadowColor"),
- shadowOffsetX: s.get("shadowOffsetX"),
- shadowOffsetY: s.get("shadowOffsetY")
- },
- z2: 10
- };
- }
- function Rf(t, e, i, n) {
- var r = n.getWidth(),
- a = n.getHeight();
- t[0] = Math.min(t[0] + e, r) - e, t[1] = Math.min(t[1] + i, a) - i, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0);
- }
- function Bf(t, e, i, n, r) {
- t = e.scale.parse(t);
- var a = e.scale.getLabel(t, {
- precision: r.precision
- }),
- o = r.formatter;
- if (o) {
- var s = {
- value: Ih(e, t),
- axisDimension: e.dim,
- axisIndex: e.index,
- seriesData: []
- };
- f(n, function (t) {
- var e = i.getSeriesByIndex(t.seriesIndex),
- n = t.dataIndexInside,
- r = e && e.getDataParams(n);
- r && s.seriesData.push(r);
- }), b(o) ? a = o.replace("{value}", a) : w(o) && (a = o(s));
- }
- return a;
- }
- function Nf(t, e, i) {
- var n = De();
- return Oe(n, n, i.rotation), Le(n, n, i.position), Wa([t.dataToCoord(e), (i.labelOffset || 0) + (i.labelDirection || 1) * (i.labelMargin || 0)], n);
- }
- function Ff(t, e, i, n, r, a) {
- var o = QS.innerTextLayout(i.rotation, 0, i.labelDirection);
- i.labelMargin = r.get("label.margin"), Ef(e, n, r, a, {
- position: Nf(n.axis, t, i),
- align: o.textAlign,
- verticalAlign: o.textVerticalAlign
- });
- }
- function Gf(t, e, i) {
- return i = i || 0, {
- x1: t[i],
- y1: t[1 - i],
- x2: e[i],
- y2: e[1 - i]
- };
- }
- function Vf(t, e, i) {
- return i = i || 0, {
- x: t[i],
- y: t[1 - i],
- width: e[i],
- height: e[1 - i]
- };
- }
- function Hf(t, e) {
- var i = {};
- return i[e.dim + "AxisIndex"] = e.index, t.getCartesian(i);
- }
- function Wf(t) {
- return "x" === t.dim ? 0 : 1;
- }
- function Uf(t) {
- return t.isHorizontal() ? 0 : 1;
- }
- function Xf(t, e) {
- var i = t.getRect();
- return [i[GI[e]], i[GI[e]] + i[VI[e]]];
- }
- function Yf(t, e, i) {
- var n,
- r = {},
- a = "toggleSelected" === t;
- return i.eachComponent("legend", function (i) {
- a && null != n ? i[n ? "select" : "unSelect"](e.name) : "allSelect" === t || "inverseSelect" === t ? i[t]() : (i[t](e.name), n = i.isSelected(e.name));
- var o = i.getData();
- f(o, function (t) {
- var e = t.get("name");
- if ("\n" !== e && "" !== e) {
- var n = i.isSelected(e);
- r[e] = r.hasOwnProperty(e) ? r[e] && n : n;
- }
- });
- }), "allSelect" === t || "inverseSelect" === t ? {
- selected: r
- } : {
- name: e.name,
- selected: r
- };
- }
- function jf(t, e) {
- var i = Y_(e.get("padding")),
- n = e.getItemStyle(["color", "opacity"]);
- n.fill = e.get("backgroundColor");
- var t = new u_({
- shape: {
- x: t.x - i[3],
- y: t.y - i[0],
- width: t.width + i[1] + i[3],
- height: t.height + i[0] + i[2],
- r: e.get("borderRadius")
- },
- style: n,
- silent: !0,
- z2: -1
- });
- return t;
- }
- function qf(t, e, i, n, r, a) {
- var o;
- return "line" !== e && e.indexOf("empty") < 0 ? (o = i.getItemStyle(), t.style.stroke = n, a || (o.stroke = r)) : o = i.getItemStyle(["borderWidth", "borderColor"]), t.setStyle(o);
- }
- function Zf(t, e) {
- e.dispatchAction({
- type: "legendToggleSelect",
- name: t
- });
- }
- function Kf(t, e, i, n) {
- var r = i.getZr().storage.getDisplayList()[0];
- r && r.useHoverLayer || i.dispatchAction({
- type: "highlight",
- seriesName: t,
- name: e,
- excludeSeriesId: n
- });
- }
- function $f(t, e, i, n) {
- var r = i.getZr().storage.getDisplayList()[0];
- r && r.useHoverLayer || i.dispatchAction({
- type: "downplay",
- seriesName: t,
- name: e,
- excludeSeriesId: n
- });
- }
- function Qf(t, e, i) {
- var n = t.getOrient(),
- r = [1, 1];
- r[n.index] = 0, Bo(e, i, {
- type: "box",
- ignoreSize: r
- });
- }
- function Jf(t) {
- var e = "cubic-bezier(0.23, 1, 0.32, 1)",
- i = "left " + t + "s " + e + ",top " + t + "s " + e;
- return p(aT, function (t) {
- return t + "transition:" + i;
- }).join(";");
- }
- function tp(t) {
- var e = [],
- i = t.get("fontSize"),
- n = t.getTextColor();
- return n && e.push("color:" + n), e.push("font:" + t.getFont()), i && e.push("line-height:" + Math.round(3 * i / 2) + "px"), nT(["decoration", "align"], function (i) {
- var n = t.get(i);
- n && e.push("text-" + i + ":" + n);
- }), e.join(";");
- }
- function ep(t) {
- var e = [],
- i = t.get("transitionDuration"),
- n = t.get("backgroundColor"),
- r = t.getModel("textStyle"),
- a = t.get("padding");
- return i && e.push(Jf(i)), n && (Mg.canvasSupported ? e.push("background-Color:" + n) : (e.push("background-Color:#" + Je(n)), e.push("filter:alpha(opacity=70)"))), nT(["width", "color", "radius"], function (i) {
- var n = "border-" + i,
- r = rT(n),
- a = t.get(r);
- null != a && e.push(n + ":" + a + ("color" === i ? "" : "px"));
- }), e.push(tp(r)), null != a && e.push("padding:" + Y_(a).join("px ") + "px"), e.join(";") + ";";
- }
- function ip(t, e) {
- if (Mg.wxa) return null;
- var i = document.createElement("div"),
- n = this._zr = e.getZr();
- this.el = i, this._x = e.getWidth() / 2, this._y = e.getHeight() / 2, t.appendChild(i), this._container = t, this._show = !1, this._hideTimeout;
- var r = this;
- i.onmouseenter = function () {
- r._enterable && (clearTimeout(r._hideTimeout), r._show = !0), r._inContent = !0;
- }, i.onmousemove = function (e) {
- if (e = e || window.event, !r._enterable) {
- var i = n.handler;
- ye(t, e, !0), i.dispatch("mousemove", e);
- }
- }, i.onmouseleave = function () {
- r._enterable && r._show && r.hideLater(r._hideDelay), r._inContent = !1;
- };
- }
- function np(t) {
- this._zr = t.getZr(), this._show = !1, this._hideTimeout;
- }
- function rp(t) {
- for (var e = t.pop(); t.length;) {
- var i = t.pop();
- i && (Ja.isInstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = {
- formatter: i
- }), e = new Ja(i, e, e.ecModel));
- }
- return e;
- }
- function ap(t, e) {
- return t.dispatchAction || y(e.dispatchAction, e);
- }
- function op(t, e, i, n, r, a, o) {
- var s = i.getOuterSize(),
- l = s.width,
- u = s.height;
- return null != a && (t + l + a > n ? t -= l + a : t += a), null != o && (e + u + o > r ? e -= u + o : e += o), [t, e];
- }
- function sp(t, e, i, n, r) {
- var a = i.getOuterSize(),
- o = a.width,
- s = a.height;
- return t = Math.min(t + o, n) - o, e = Math.min(e + s, r) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e];
- }
- function lp(t, e, i) {
- var n = i[0],
- r = i[1],
- a = 5,
- o = 0,
- s = 0,
- l = e.width,
- u = e.height;
- switch (t) {
- case "inside":
- o = e.x + l / 2 - n / 2, s = e.y + u / 2 - r / 2;
- break;
- case "top":
- o = e.x + l / 2 - n / 2, s = e.y - r - a;
- break;
- case "bottom":
- o = e.x + l / 2 - n / 2, s = e.y + u + a;
- break;
- case "left":
- o = e.x - n - a, s = e.y + u / 2 - r / 2;
- break;
- case "right":
- o = e.x + l + a, s = e.y + u / 2 - r / 2;
- }
- return [o, s];
- }
- function up(t) {
- return "center" === t || "middle" === t;
- }
- function hp(t) {
- Vn(t, "label", ["show"]);
- }
- function cp(t) {
- return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)));
- }
- function dp(t) {
- return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y));
- }
- function fp(t, e, i, n, r, a) {
- var o = [],
- s = ju(e, n),
- l = s ? e.getCalculationInfo("stackResultDimension") : n,
- u = _p(e, l, t),
- h = e.indicesOfNearest(l, u)[0];
- o[r] = e.get(i, h), o[a] = e.get(n, h);
- var c = ho(e.get(n, h));
- return c = Math.min(c, 20), c >= 0 && (o[a] = +o[a].toFixed(c)), o;
- }
- function pp(t, e) {
- var i = t.getData(),
- r = t.coordinateSystem;
- if (e && !dp(e) && !x(e.coord) && r) {
- var a = r.dimensions,
- o = gp(e, i, r, t);
- if (e = n(e), e.type && mT[e.type] && o.baseAxis && o.valueAxis) {
- var s = pT(a, o.baseAxis.dim),
- l = pT(a, o.valueAxis.dim);
- e.coord = mT[e.type](i, o.baseDataDim, o.valueDataDim, s, l), e.value = e.coord[l];
- } else {
- for (var u = [null != e.xAxis ? e.xAxis : e.radiusAxis, null != e.yAxis ? e.yAxis : e.angleAxis], h = 0; 2 > h; h++) mT[u[h]] && (u[h] = _p(i, i.mapDimension(a[h]), u[h]));
- e.coord = u;
- }
- }
- return e;
- }
- function gp(t, e, i, n) {
- var r = {};
- return null != t.valueIndex || null != t.valueDim ? (r.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) : t.valueDim, r.valueAxis = i.getAxis(mp(n, r.valueDataDim)), r.baseAxis = i.getOtherAxis(r.valueAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim)) : (r.baseAxis = n.getBaseAxis(), r.valueAxis = i.getOtherAxis(r.baseAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim), r.valueDataDim = e.mapDimension(r.valueAxis.dim)), r;
- }
- function mp(t, e) {
- var i = t.getData(),
- n = i.dimensions;
- e = i.getDimension(e);
- for (var r = 0; r < n.length; r++) {
- var a = i.getDimensionInfo(n[r]);
- if (a.name === e) return a.coordDim;
- }
- }
- function vp(t, e) {
- return t && t.containData && e.coord && !cp(e) ? t.containData(e.coord) : !0;
- }
- function yp(t, e, i, n) {
- return 2 > n ? t.coord && t.coord[n] : t.value;
- }
- function _p(t, e, i) {
- if ("average" === i) {
- var n = 0,
- r = 0;
- return t.each(e, function (t) {
- isNaN(t) || (n += t, r++);
- }), n / r;
- }
- return "median" === i ? t.getMedian(e) : t.getDataExtent(e, !0)["max" === i ? 1 : 0];
- }
- function xp(t, e, i) {
- var n = e.coordinateSystem;
- t.each(function (r) {
- var a,
- o = t.getItemModel(r),
- s = so(o.get("x"), i.getWidth()),
- l = so(o.get("y"), i.getHeight());
- if (isNaN(s) || isNaN(l)) {
- if (e.getMarkerPosition) a = e.getMarkerPosition(t.getValues(t.dimensions, r));else if (n) {
- var u = t.get(n.dimensions[0], r),
- h = t.get(n.dimensions[1], r);
- a = n.dataToPoint([u, h]);
- }
- } else a = [s, l];
- isNaN(s) || (a[0] = s), isNaN(l) || (a[1] = l), t.setItemLayout(r, a);
- });
- }
- function wp(t, e, i) {
- var n;
- n = t ? p(t && t.dimensions, function (t) {
- var i = e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {};
- return s({
- name: t
- }, i);
- }) : [{
- name: "value",
- type: "float"
- }];
- var r = new kb(n, i),
- a = p(i.get("data"), _(pp, e));
- return t && (a = m(a, _(vp, t))), r.initData(a, null, t ? yp : function (t) {
- return t.value;
- }), r;
- }
- function bp(t) {
- return isNaN(+t.cpx1) || isNaN(+t.cpy1);
- }
- function Sp(t) {
- return "_" + t + "Type";
- }
- function Mp(t, e, i) {
- var n = e.getItemVisual(i, "color"),
- r = e.getItemVisual(i, t),
- a = e.getItemVisual(i, t + "Size");
- if (r && "none" !== r) {
- x(a) || (a = [a, a]);
- var o = Ph(r, -a[0] / 2, -a[1] / 2, a[0], a[1], n);
- return o.name = t, o;
- }
- }
- function Ip(t) {
- var e = new xT({
- name: "line",
- subPixelOptimize: !0
- });
- return Tp(e.shape, t), e;
- }
- function Tp(t, e) {
- t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
- var i = e[2];
- i ? (t.cpx1 = i[0], t.cpy1 = i[1]) : (t.cpx1 = 0 / 0, t.cpy1 = 0 / 0);
- }
- function Cp() {
- var t = this,
- e = t.childOfName("fromSymbol"),
- i = t.childOfName("toSymbol"),
- n = t.childOfName("label");
- if (e || i || !n.ignore) {
- for (var r = 1, a = this.parent; a;) a.scale && (r /= a.scale[0]), a = a.parent;
- var o = t.childOfName("line");
- if (this.__dirty || o.__dirty) {
- var s = o.shape.percent,
- l = o.pointAt(0),
- u = o.pointAt(s),
- h = j([], u, l);
- if (te(h, h), e) {
- e.attr("position", l);
- var c = o.tangentAt(0);
- e.attr("rotation", Math.PI / 2 - Math.atan2(c[1], c[0])), e.attr("scale", [r * s, r * s]);
- }
- if (i) {
- i.attr("position", u);
- var c = o.tangentAt(1);
- i.attr("rotation", -Math.PI / 2 - Math.atan2(c[1], c[0])), i.attr("scale", [r * s, r * s]);
- }
- if (!n.ignore) {
- n.attr("position", u);
- var d,
- f,
- p,
- g = 5 * r;
- if ("end" === n.__position) d = [h[0] * g + u[0], h[1] * g + u[1]], f = h[0] > .8 ? "left" : h[0] < -.8 ? "right" : "center", p = h[1] > .8 ? "top" : h[1] < -.8 ? "bottom" : "middle";else if ("middle" === n.__position) {
- var m = s / 2,
- c = o.tangentAt(m),
- v = [c[1], -c[0]],
- y = o.pointAt(m);
- v[1] > 0 && (v[0] = -v[0], v[1] = -v[1]), d = [y[0] + v[0] * g, y[1] + v[1] * g], f = "center", p = "bottom";
- var _ = -Math.atan2(c[1], c[0]);
- u[0] < l[0] && (_ = Math.PI + _), n.attr("rotation", _);
- } else d = [-h[0] * g + l[0], -h[1] * g + l[1]], f = h[0] > .8 ? "right" : h[0] < -.8 ? "left" : "center", p = h[1] > .8 ? "bottom" : h[1] < -.8 ? "top" : "middle";
- n.attr({
- style: {
- textVerticalAlign: n.__verticalAlign || p,
- textAlign: n.__textAlign || f
- },
- position: d,
- scale: [r, r]
- });
- }
- }
- }
- }
- function Dp(t, e, i) {
- Bm.call(this), this._createLine(t, e, i);
- }
- function Ap(t) {
- this._ctor = t || Dp, this.group = new Bm();
- }
- function kp(t, e, i, n) {
- var r = e.getItemLayout(i);
- if (zp(r)) {
- var a = new t._ctor(e, i, n);
- e.setItemGraphicEl(i, a), t.group.add(a);
- }
- }
- function Pp(t, e, i, n, r, a) {
- var o = e.getItemGraphicEl(n);
- return zp(i.getItemLayout(r)) ? (o ? o.updateData(i, r, a) : o = new t._ctor(i, r, a), i.setItemGraphicEl(r, o), void t.group.add(o)) : void t.group.remove(o);
- }
- function Lp(t) {
- var e = t.hostModel;
- return {
- lineStyle: e.getModel("lineStyle").getLineStyle(),
- hoverLineStyle: e.getModel("emphasis.lineStyle").getLineStyle(),
- labelModel: e.getModel("label"),
- hoverLabelModel: e.getModel("emphasis.label")
- };
- }
- function Op(t) {
- return isNaN(t[0]) || isNaN(t[1]);
- }
- function zp(t) {
- return !Op(t[0]) && !Op(t[1]);
- }
- function Ep(t) {
- return !isNaN(t) && !isFinite(t);
- }
- function Rp(t, e, i, n) {
- var r = 1 - t,
- a = n.dimensions[t];
- return Ep(e[r]) && Ep(i[r]) && e[t] === i[t] && n.getAxis(a).containData(e[t]);
- }
- function Bp(t, e) {
- if ("cartesian2d" === t.type) {
- var i = e[0].coord,
- n = e[1].coord;
- if (i && n && (Rp(1, i, n, t) || Rp(0, i, n, t))) return !0;
- }
- return vp(t, e[0]) && vp(t, e[1]);
- }
- function Np(t, e, i, n, r) {
- var a,
- o = n.coordinateSystem,
- s = t.getItemModel(e),
- l = so(s.get("x"), r.getWidth()),
- u = so(s.get("y"), r.getHeight());
- if (isNaN(l) || isNaN(u)) {
- if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(t.dimensions, e));else {
- var h = o.dimensions,
- c = t.get(h[0], e),
- d = t.get(h[1], e);
- a = o.dataToPoint([c, d]);
- }
- if ("cartesian2d" === o.type) {
- var f = o.getAxis("x"),
- p = o.getAxis("y"),
- h = o.dimensions;
- Ep(t.get(h[0], e)) ? a[0] = f.toGlobalCoord(f.getExtent()[i ? 0 : 1]) : Ep(t.get(h[1], e)) && (a[1] = p.toGlobalCoord(p.getExtent()[i ? 0 : 1]));
- }
- isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u);
- } else a = [l, u];
- t.setItemLayout(e, a);
- }
- function Fp(t, e, i) {
- var n;
- n = t ? p(t && t.dimensions, function (t) {
- var i = e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {};
- return s({
- name: t
- }, i);
- }) : [{
- name: "value",
- type: "float"
- }];
- var r = new kb(n, i),
- a = new kb(n, i),
- o = new kb([], i),
- l = p(i.get("data"), _(MT, e, t, i));
- t && (l = m(l, _(Bp, t)));
- var u = t ? yp : function (t) {
- return t.value;
- };
- return r.initData(p(l, function (t) {
- return t[0];
- }), null, u), a.initData(p(l, function (t) {
- return t[1];
- }), null, u), o.initData(p(l, function (t) {
- return t[2];
- })), o.hasItemOption = !0, {
- from: r,
- to: a,
- line: o
- };
- }
- function Gp(t) {
- return !isNaN(t) && !isFinite(t);
- }
- function Vp(t, e, i) {
- var n = 1 - t;
- return Gp(e[n]) && Gp(i[n]);
- }
- function Hp(t, e) {
- var i = e.coord[0],
- n = e.coord[1];
- return "cartesian2d" === t.type && i && n && (Vp(1, i, n, t) || Vp(0, i, n, t)) ? !0 : vp(t, {
- coord: i,
- x: e.x0,
- y: e.y0
- }) || vp(t, {
- coord: n,
- x: e.x1,
- y: e.y1
- });
- }
- function Wp(t, e, i, n, r) {
- var a,
- o = n.coordinateSystem,
- s = t.getItemModel(e),
- l = so(s.get(i[0]), r.getWidth()),
- u = so(s.get(i[1]), r.getHeight());
- if (isNaN(l) || isNaN(u)) {
- if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(i, e));else {
- var h = t.get(i[0], e),
- c = t.get(i[1], e),
- d = [h, c];
- o.clampData && o.clampData(d, d), a = o.dataToPoint(d, !0);
- }
- if ("cartesian2d" === o.type) {
- var f = o.getAxis("x"),
- p = o.getAxis("y"),
- h = t.get(i[0], e),
- c = t.get(i[1], e);
- Gp(h) ? a[0] = f.toGlobalCoord(f.getExtent()["x0" === i[0] ? 0 : 1]) : Gp(c) && (a[1] = p.toGlobalCoord(p.getExtent()["y0" === i[1] ? 0 : 1]));
- }
- isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u);
- } else a = [l, u];
- return a;
- }
- function Up(t, e, i) {
- var n,
- r,
- a = ["x0", "y0", "x1", "y1"];
- t ? (n = p(t && t.dimensions, function (t) {
- var i = e.getData(),
- n = i.getDimensionInfo(i.mapDimension(t)) || {};
- return s({
- name: t
- }, n);
- }), r = new kb(p(a, function (t, e) {
- return {
- name: t,
- type: n[e % 2].type
- };
- }), i)) : (n = [{
- name: "value",
- type: "float"
- }], r = new kb(n, i));
- var o = p(i.get("data"), _(IT, e, t, i));
- t && (o = m(o, _(Hp, t)));
- var l = t ? function (t, e, i, n) {
- return t.coord[Math.floor(n / 2)][n % 2];
- } : function (t) {
- return t.value;
- };
- return r.initData(o, null, l), r.hasItemOption = !0, r;
- }
- function Xp(t) {
- return document.createElementNS(CT, t);
- }
- function Yp(t) {
- return PT(1e4 * t) / 1e4;
- }
- function jp(t) {
- return BT > t && t > -BT;
- }
- function qp(t, e) {
- var i = e ? t.textFill : t.fill;
- return null != i && i !== kT;
- }
- function Zp(t, e) {
- var i = e ? t.textStroke : t.stroke;
- return null != i && i !== kT;
- }
- function Kp(t, e) {
- e && $p(t, "transform", "matrix(" + AT.call(e, ",") + ")");
- }
- function $p(t, e, i) {
- (!i || "linear" !== i.type && "radial" !== i.type) && t.setAttribute(e, i);
- }
- function Qp(t, e, i) {
- t.setAttributeNS("http://www.w3.org/1999/xlink", e, i);
- }
- function Jp(t, e, i, n) {
- if (qp(e, i)) {
- var r = i ? e.textFill : e.fill;
- r = "transparent" === r ? kT : r, $p(t, "fill", r), $p(t, "fill-opacity", null != e.fillOpacity ? e.fillOpacity * e.opacity : e.opacity);
- } else $p(t, "fill", kT);
- if (Zp(e, i)) {
- var a = i ? e.textStroke : e.stroke;
- a = "transparent" === a ? kT : a, $p(t, "stroke", a);
- var o = i ? e.textStrokeWidth : e.lineWidth,
- s = !i && e.strokeNoScale ? n.getLineScale() : 1;
- $p(t, "stroke-width", o / s), $p(t, "paint-order", i ? "stroke" : "fill"), $p(t, "stroke-opacity", null != e.strokeOpacity ? e.strokeOpacity : e.opacity);
- var l = e.lineDash;
- l ? ($p(t, "stroke-dasharray", e.lineDash.join(",")), $p(t, "stroke-dashoffset", PT(e.lineDashOffset || 0))) : $p(t, "stroke-dasharray", ""), e.lineCap && $p(t, "stroke-linecap", e.lineCap), e.lineJoin && $p(t, "stroke-linejoin", e.lineJoin), e.miterLimit && $p(t, "stroke-miterlimit", e.miterLimit);
- } else $p(t, "stroke", kT);
- }
- function tg(t) {
- for (var e = [], i = t.data, n = t.len(), r = 0; n > r;) {
- var a = i[r++],
- o = "",
- s = 0;
- switch (a) {
- case DT.M:
- o = "M", s = 2;
- break;
- case DT.L:
- o = "L", s = 2;
- break;
- case DT.Q:
- o = "Q", s = 4;
- break;
- case DT.C:
- o = "C", s = 6;
- break;
- case DT.A:
- var l = i[r++],
- u = i[r++],
- h = i[r++],
- c = i[r++],
- d = i[r++],
- f = i[r++],
- p = i[r++],
- g = i[r++],
- m = Math.abs(f),
- v = jp(m - ET) || (g ? f >= ET : -f >= ET),
- y = f > 0 ? f % ET : f % ET + ET,
- _ = !1;
- _ = v ? !0 : jp(m) ? !1 : y >= zT == !!g;
- var x = Yp(l + h * OT(d)),
- w = Yp(u + c * LT(d));
- v && (f = g ? ET - 1e-4 : -ET + 1e-4, _ = !0, 9 === r && e.push("M", x, w));
- var b = Yp(l + h * OT(d + f)),
- S = Yp(u + c * LT(d + f));
- e.push("A", Yp(h), Yp(c), PT(p * RT), +_, +g, b, S);
- break;
- case DT.Z:
- o = "Z";
- break;
- case DT.R:
- var b = Yp(i[r++]),
- S = Yp(i[r++]),
- M = Yp(i[r++]),
- I = Yp(i[r++]);
- e.push("M", b, S, "L", b + M, S, "L", b + M, S + I, "L", b, S + I, "L", b, S);
- }
- o && e.push(o);
- for (var T = 0; s > T; T++) e.push(Yp(i[r++]));
- }
- return e.join(" ");
- }
- function eg(t, e, i, n, r, a, o) {
- Ae(WT), e && i && ke(WT, i);
- var s = n.textRotation;
- if (r && s) {
- var l = n.textOrigin;
- "center" === l ? (a = r.width / 2 + r.x, o = r.height / 2 + r.y) : l && (a = l[0] + r.x, o = l[1] + r.y), WT[4] -= a, WT[5] -= o, Oe(WT, WT, s), WT[4] += a, WT[5] += o;
- }
- Kp(t, WT);
- }
- function ig(t, e, i) {
- return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3];
- }
- function ng(t, e, i, n) {
- $p(t, "dominant-baseline", "middle"), $p(t, "text-anchor", UT[e]), $p(t, "x", i), $p(t, "y", n);
- }
- function rg() {}
- function ag(t, e) {
- for (var i = 0, n = e.length, r = 0, a = 0; n > i; i++) {
- var o = e[i];
- if (o.removed) {
- for (var s = [], l = a; l < a + o.count; l++) s.push(l);
- o.indices = s, a += o.count;
- } else {
- for (var s = [], l = r; l < r + o.count; l++) s.push(l);
- o.indices = s, r += o.count, o.added || (a += o.count);
- }
- }
- return e;
- }
- function og(t) {
- return {
- newPos: t.newPos,
- components: t.components.slice(0)
- };
- }
- function sg(t, e, i, n, r) {
- this._zrId = t, this._svgRoot = e, this._tagNames = "string" == typeof i ? [i] : i, this._markLabel = n, this._domName = r || "_dom", this.nextId = 0;
- }
- function lg(t, e) {
- sg.call(this, t, e, ["linearGradient", "radialGradient"], "__gradient_in_use__");
- }
- function ug(t, e) {
- sg.call(this, t, e, "clipPath", "__clippath_in_use__");
- }
- function hg(t, e) {
- sg.call(this, t, e, ["filter"], "__filter_in_use__", "_shadowDom");
- }
- function cg(t) {
- return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY || t.textShadowBlur || t.textShadowOffsetX || t.textShadowOffsetY);
- }
- function dg(t) {
- return parseInt(t, 10);
- }
- function fg(t) {
- return t instanceof Vr ? NT : t instanceof Sn ? FT : t instanceof $y ? GT : NT;
- }
- function pg(t, e) {
- return e && t && e.parentNode !== t;
- }
- function gg(t, e, i) {
- if (pg(t, e) && i) {
- var n = i.nextSibling;
- n ? t.insertBefore(e, n) : t.appendChild(e);
- }
- }
- function mg(t, e) {
- if (pg(t, e)) {
- var i = t.firstChild;
- i ? t.insertBefore(e, i) : t.appendChild(e);
- }
- }
- function vg(t, e) {
- e && t && e.parentNode === t && t.removeChild(e);
- }
- function yg(t) {
- return t.__textSvgEl;
- }
- function _g(t) {
- return t.__svgEl;
- }
- function xg(t) {
- return function () {
- Pm('In SVG mode painter not support method "' + t + '"');
- };
- }
- var wg = 2311,
- bg = function () {
- return wg++;
- },
- Sg = {};
- Sg = "object" == typeof wx && "function" == typeof uni.getSystemInfoSync ? {
- browser: {},
- os: {},
- node: !1,
- wxa: !0,
- canvasSupported: !0,
- svgSupported: !1,
- touchEventsSupported: !0,
- domSupported: !1
- } : "undefined" == typeof document && "undefined" != typeof self ? {
- browser: {},
- os: {},
- node: !1,
- worker: !0,
- canvasSupported: !0,
- domSupported: !1
- } : "undefined" == typeof navigator ? {
- browser: {},
- os: {},
- node: !0,
- worker: !1,
- canvasSupported: !0,
- svgSupported: !0,
- domSupported: !1
- } : e(navigator.userAgent);
- var Mg = Sg,
- Ig = {
- "[object Function]": 1,
- "[object RegExp]": 1,
- "[object Date]": 1,
- "[object Error]": 1,
- "[object CanvasGradient]": 1,
- "[object CanvasPattern]": 1,
- "[object Image]": 1,
- "[object Canvas]": 1
- },
- Tg = {
- "[object Int8Array]": 1,
- "[object Uint8Array]": 1,
- "[object Uint8ClampedArray]": 1,
- "[object Int16Array]": 1,
- "[object Uint16Array]": 1,
- "[object Int32Array]": 1,
- "[object Uint32Array]": 1,
- "[object Float32Array]": 1,
- "[object Float64Array]": 1
- },
- Cg = Object.prototype.toString,
- Dg = Array.prototype,
- Ag = Dg.forEach,
- kg = Dg.filter,
- Pg = Dg.slice,
- Lg = Dg.map,
- Og = Dg.reduce,
- zg = {},
- Eg = function () {
- return zg.createCanvas();
- };
- zg.createCanvas = function () {
- return document.createElement("canvas");
- };
- var Rg,
- Bg = "__ec_primitive__";
- B.prototype = {
- constructor: B,
- get: function (t) {
- return this.data.hasOwnProperty(t) ? this.data[t] : null;
- },
- set: function (t, e) {
- return this.data[t] = e;
- },
- each: function (t, e) {
- void 0 !== e && (t = y(t, e));
- for (var i in this.data) this.data.hasOwnProperty(i) && t(this.data[i], i);
- },
- removeKey: function (t) {
- delete this.data[t];
- }
- };
- var Ng = (Object.freeze || Object)({
- $override: i,
- clone: n,
- merge: r,
- mergeAll: a,
- extend: o,
- defaults: s,
- createCanvas: Eg,
- getContext: l,
- indexOf: u,
- inherits: h,
- mixin: c,
- isArrayLike: d,
- each: f,
- map: p,
- reduce: g,
- filter: m,
- find: v,
- bind: y,
- curry: _,
- isArray: x,
- isFunction: w,
- isString: b,
- isObject: S,
- isBuiltInObject: M,
- isTypedArray: I,
- isDom: T,
- eqNaN: C,
- retrieve: D,
- retrieve2: A,
- retrieve3: k,
- slice: P,
- normalizeCssArray: L,
- assert: O,
- trim: z,
- setAsPrimitive: E,
- isPrimitive: R,
- createHashMap: N,
- concatArray: F,
- noop: G
- }),
- Fg = "undefined" == typeof Float32Array ? Array : Float32Array,
- Gg = q,
- Vg = Z,
- Hg = ee,
- Wg = ie,
- Ug = (Object.freeze || Object)({
- create: V,
- copy: H,
- clone: W,
- set: U,
- add: X,
- scaleAndAdd: Y,
- sub: j,
- len: q,
- length: Gg,
- lenSquare: Z,
- lengthSquare: Vg,
- mul: K,
- div: $,
- dot: Q,
- scale: J,
- normalize: te,
- distance: ee,
- dist: Hg,
- distanceSquare: ie,
- distSquare: Wg,
- negate: ne,
- lerp: re,
- applyTransform: ae,
- min: oe,
- max: se
- });
- le.prototype = {
- constructor: le,
- _dragStart: function (t) {
- var e = t.target;
- e && e.draggable && (this._draggingTarget = e, e.dragging = !0, this._x = t.offsetX, this._y = t.offsetY, this.dispatchToElement(ue(e, t), "dragstart", t.event));
- },
- _drag: function (t) {
- var e = this._draggingTarget;
- if (e) {
- var i = t.offsetX,
- n = t.offsetY,
- r = i - this._x,
- a = n - this._y;
- this._x = i, this._y = n, e.drift(r, a, t), this.dispatchToElement(ue(e, t), "drag", t.event);
- var o = this.findHover(i, n, e).target,
- s = this._dropTarget;
- this._dropTarget = o, e !== o && (s && o !== s && this.dispatchToElement(ue(s, t), "dragleave", t.event), o && o !== s && this.dispatchToElement(ue(o, t), "dragenter", t.event));
- }
- },
- _dragEnd: function (t) {
- var e = this._draggingTarget;
- e && (e.dragging = !1), this.dispatchToElement(ue(e, t), "dragend", t.event), this._dropTarget && this.dispatchToElement(ue(this._dropTarget, t), "drop", t.event), this._draggingTarget = null, this._dropTarget = null;
- }
- };
- var Xg = Array.prototype.slice,
- Yg = function (t) {
- this._$handlers = {}, this._$eventProcessor = t;
- };
- Yg.prototype = {
- constructor: Yg,
- one: function (t, e, i, n) {
- return ce(this, t, e, i, n, !0);
- },
- on: function (t, e, i, n) {
- return ce(this, t, e, i, n, !1);
- },
- isSilent: function (t) {
- var e = this._$handlers;
- return !e[t] || !e[t].length;
- },
- off: function (t, e) {
- var i = this._$handlers;
- if (!t) return this._$handlers = {}, this;
- if (e) {
- if (i[t]) {
- for (var n = [], r = 0, a = i[t].length; a > r; r++) i[t][r].h !== e && n.push(i[t][r]);
- i[t] = n;
- }
- i[t] && 0 === i[t].length && delete i[t];
- } else delete i[t];
- return this;
- },
- trigger: function (t) {
- var e = this._$handlers[t],
- i = this._$eventProcessor;
- if (e) {
- var n = arguments,
- r = n.length;
- r > 3 && (n = Xg.call(n, 1));
- for (var a = e.length, o = 0; a > o;) {
- var s = e[o];
- if (i && i.filter && null != s.query && !i.filter(t, s.query)) o++;else {
- switch (r) {
- case 1:
- s.h.call(s.ctx);
- break;
- case 2:
- s.h.call(s.ctx, n[1]);
- break;
- case 3:
- s.h.call(s.ctx, n[1], n[2]);
- break;
- default:
- s.h.apply(s.ctx, n);
- }
- s.one ? (e.splice(o, 1), a--) : o++;
- }
- }
- }
- return i && i.afterTrigger && i.afterTrigger(t), this;
- },
- triggerWithContext: function (t) {
- var e = this._$handlers[t],
- i = this._$eventProcessor;
- if (e) {
- var n = arguments,
- r = n.length;
- r > 4 && (n = Xg.call(n, 1, n.length - 1));
- for (var a = n[n.length - 1], o = e.length, s = 0; o > s;) {
- var l = e[s];
- if (i && i.filter && null != l.query && !i.filter(t, l.query)) s++;else {
- switch (r) {
- case 1:
- l.h.call(a);
- break;
- case 2:
- l.h.call(a, n[1]);
- break;
- case 3:
- l.h.call(a, n[1], n[2]);
- break;
- default:
- l.h.apply(a, n);
- }
- l.one ? (e.splice(s, 1), o--) : s++;
- }
- }
- }
- return i && i.afterTrigger && i.afterTrigger(t), this;
- }
- };
- var jg = Math.log(2),
- qg = "undefined" != typeof window && !!window.addEventListener,
- Zg = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- Kg = "___zrEVENTSAVED",
- $g = [],
- Qg = qg ? function (t) {
- t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0;
- } : function (t) {
- t.returnValue = !1, t.cancelBubble = !0;
- },
- Jg = function () {
- this._track = [];
- };
- Jg.prototype = {
- constructor: Jg,
- recognize: function (t, e, i) {
- return this._doTrack(t, e, i), this._recognize(t);
- },
- clear: function () {
- return this._track.length = 0, this;
- },
- _doTrack: function (t, e, i) {
- var n = t.touches;
- if (n) {
- for (var r = {
- points: [],
- touches: [],
- target: e,
- event: t
- }, a = 0, o = n.length; o > a; a++) {
- var s = n[a],
- l = pe(i, s, {});
- r.points.push([l.zrX, l.zrY]), r.touches.push(s);
- }
- this._track.push(r);
- }
- },
- _recognize: function (t) {
- for (var e in tm) if (tm.hasOwnProperty(e)) {
- var i = tm[e](this._track, t);
- if (i) return i;
- }
- }
- };
- var tm = {
- pinch: function (t, e) {
- var i = t.length;
- if (i) {
- var n = (t[i - 1] || {}).points,
- r = (t[i - 2] || {}).points || n;
- if (r && r.length > 1 && n && n.length > 1) {
- var a = be(n) / be(r);
- !isFinite(a) && (a = 1), e.pinchScale = a;
- var o = Se(n);
- return e.pinchX = o[0], e.pinchY = o[1], {
- type: "pinch",
- target: t[0].target,
- event: e
- };
- }
- }
- }
- },
- em = "silent";
- Te.prototype.dispose = function () {};
- var im = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
- nm = function (t, e, i, n) {
- Yg.call(this), this.storage = t, this.painter = e, this.painterRoot = n, i = i || new Te(), this.proxy = null, this._hovered = {}, this._lastTouchMoment, this._lastX, this._lastY, this._gestureMgr, le.call(this), this.setHandlerProxy(i);
- };
- nm.prototype = {
- constructor: nm,
- setHandlerProxy: function (t) {
- this.proxy && this.proxy.dispose(), t && (f(im, function (e) {
- t.on && t.on(e, this[e], this);
- }, this), t.handler = this), this.proxy = t;
- },
- mousemove: function (t) {
- var e = t.zrX,
- i = t.zrY,
- n = this._hovered,
- r = n.target;
- r && !r.__zr && (n = this.findHover(n.x, n.y), r = n.target);
- var a = this._hovered = this.findHover(e, i),
- o = a.target,
- s = this.proxy;
- s.setCursor && s.setCursor(o ? o.cursor : "default"), r && o !== r && this.dispatchToElement(n, "mouseout", t), this.dispatchToElement(a, "mousemove", t), o && o !== r && this.dispatchToElement(a, "mouseover", t);
- },
- mouseout: function (t) {
- this.dispatchToElement(this._hovered, "mouseout", t);
- var e,
- i = t.toElement || t.relatedTarget;
- do i = i && i.parentNode; while (i && 9 !== i.nodeType && !(e = i === this.painterRoot));
- !e && this.trigger("globalout", {
- event: t
- });
- },
- resize: function () {
- this._hovered = {};
- },
- dispatch: function (t, e) {
- var i = this[t];
- i && i.call(this, e);
- },
- dispose: function () {
- this.proxy.dispose(), this.storage = this.proxy = this.painter = null;
- },
- setCursorStyle: function (t) {
- var e = this.proxy;
- e.setCursor && e.setCursor(t);
- },
- dispatchToElement: function (t, e, i) {
- t = t || {};
- var n = t.target;
- if (!n || !n.silent) {
- for (var r = "on" + e, a = Me(e, t, i); n && (n[r] && (a.cancelBubble = n[r].call(n, a)), n.trigger(e, a), n = n.parent, !a.cancelBubble););
- a.cancelBubble || (this.trigger(e, a), this.painter && this.painter.eachOtherLayer(function (t) {
- "function" == typeof t[r] && t[r].call(t, a), t.trigger && t.trigger(e, a);
- }));
- }
- },
- findHover: function (t, e, i) {
- for (var n = this.storage.getDisplayList(), r = {
- x: t,
- y: e
- }, a = n.length - 1; a >= 0; a--) {
- var o;
- if (n[a] !== i && !n[a].ignore && (o = Ce(n[a], t, e)) && (!r.topTarget && (r.topTarget = n[a]), o !== em)) {
- r.target = n[a];
- break;
- }
- }
- return r;
- },
- processGesture: function (t, e) {
- this._gestureMgr || (this._gestureMgr = new Jg());
- var i = this._gestureMgr;
- "start" === e && i.clear();
- var n = i.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom);
- if ("end" === e && i.clear(), n) {
- var r = n.type;
- t.gestureEvent = r, this.dispatchToElement({
- target: n.target
- }, r, n.event);
- }
- }
- }, f(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (t) {
- nm.prototype[t] = function (e) {
- var i = this.findHover(e.zrX, e.zrY),
- n = i.target;
- if ("mousedown" === t) this._downEl = n, this._downPoint = [e.zrX, e.zrY], this._upEl = n;else if ("mouseup" === t) this._upEl = n;else if ("click" === t) {
- if (this._downEl !== this._upEl || !this._downPoint || Hg(this._downPoint, [e.zrX, e.zrY]) > 4) return;
- this._downPoint = null;
- }
- this.dispatchToElement(i, t, e);
- };
- }), c(nm, Yg), c(nm, le);
- var rm = "undefined" == typeof Float32Array ? Array : Float32Array,
- am = (Object.freeze || Object)({
- create: De,
- identity: Ae,
- copy: ke,
- mul: Pe,
- translate: Le,
- rotate: Oe,
- scale: ze,
- invert: Ee,
- clone: Re
- }),
- om = Ae,
- sm = 5e-5,
- lm = function (t) {
- t = t || {}, t.position || (this.position = [0, 0]), null == t.rotation && (this.rotation = 0), t.scale || (this.scale = [1, 1]), this.origin = this.origin || null;
- },
- um = lm.prototype;
- um.transform = null, um.needLocalTransform = function () {
- return Be(this.rotation) || Be(this.position[0]) || Be(this.position[1]) || Be(this.scale[0] - 1) || Be(this.scale[1] - 1);
- };
- var hm = [];
- um.updateTransform = function () {
- var t = this.parent,
- e = t && t.transform,
- i = this.needLocalTransform(),
- n = this.transform;
- if (!i && !e) return void (n && om(n));
- n = n || De(), i ? this.getLocalTransform(n) : om(n), e && (i ? Pe(n, t.transform, n) : ke(n, t.transform)), this.transform = n;
- var r = this.globalScaleRatio;
- if (null != r && 1 !== r) {
- this.getGlobalScale(hm);
- var a = hm[0] < 0 ? -1 : 1,
- o = hm[1] < 0 ? -1 : 1,
- s = ((hm[0] - a) * r + a) / hm[0] || 0,
- l = ((hm[1] - o) * r + o) / hm[1] || 0;
- n[0] *= s, n[1] *= s, n[2] *= l, n[3] *= l;
- }
- this.invTransform = this.invTransform || De(), Ee(this.invTransform, n);
- }, um.getLocalTransform = function (t) {
- return lm.getLocalTransform(this, t);
- }, um.setTransform = function (t) {
- var e = this.transform,
- i = t.dpr || 1;
- e ? t.setTransform(i * e[0], i * e[1], i * e[2], i * e[3], i * e[4], i * e[5]) : t.setTransform(i, 0, 0, i, 0, 0);
- }, um.restoreTransform = function (t) {
- var e = t.dpr || 1;
- t.setTransform(e, 0, 0, e, 0, 0);
- };
- var cm = [],
- dm = De();
- um.setLocalTransform = function (t) {
- if (t) {
- var e = t[0] * t[0] + t[1] * t[1],
- i = t[2] * t[2] + t[3] * t[3],
- n = this.position,
- r = this.scale;
- Be(e - 1) && (e = Math.sqrt(e)), Be(i - 1) && (i = Math.sqrt(i)), t[0] < 0 && (e = -e), t[3] < 0 && (i = -i), n[0] = t[4], n[1] = t[5], r[0] = e, r[1] = i, this.rotation = Math.atan2(-t[1] / i, t[0] / e);
- }
- }, um.decomposeTransform = function () {
- if (this.transform) {
- var t = this.parent,
- e = this.transform;
- t && t.transform && (Pe(cm, t.invTransform, e), e = cm);
- var i = this.origin;
- i && (i[0] || i[1]) && (dm[4] = i[0], dm[5] = i[1], Pe(cm, e, dm), cm[4] -= i[0], cm[5] -= i[1], e = cm), this.setLocalTransform(e);
- }
- }, um.getGlobalScale = function (t) {
- var e = this.transform;
- return t = t || [], e ? (t[0] = Math.sqrt(e[0] * e[0] + e[1] * e[1]), t[1] = Math.sqrt(e[2] * e[2] + e[3] * e[3]), e[0] < 0 && (t[0] = -t[0]), e[3] < 0 && (t[1] = -t[1]), t) : (t[0] = 1, t[1] = 1, t);
- }, um.transformCoordToLocal = function (t, e) {
- var i = [t, e],
- n = this.invTransform;
- return n && ae(i, i, n), i;
- }, um.transformCoordToGlobal = function (t, e) {
- var i = [t, e],
- n = this.transform;
- return n && ae(i, i, n), i;
- }, lm.getLocalTransform = function (t, e) {
- e = e || [], om(e);
- var i = t.origin,
- n = t.scale || [1, 1],
- r = t.rotation || 0,
- a = t.position || [0, 0];
- return i && (e[4] -= i[0], e[5] -= i[1]), ze(e, e, n), r && Oe(e, e, r), i && (e[4] += i[0], e[5] += i[1]), e[4] += a[0], e[5] += a[1], e;
- };
- var fm = {
- linear: function (t) {
- return t;
- },
- quadraticIn: function (t) {
- return t * t;
- },
- quadraticOut: function (t) {
- return t * (2 - t);
- },
- quadraticInOut: function (t) {
- return (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1);
- },
- cubicIn: function (t) {
- return t * t * t;
- },
- cubicOut: function (t) {
- return --t * t * t + 1;
- },
- cubicInOut: function (t) {
- return (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2);
- },
- quarticIn: function (t) {
- return t * t * t * t;
- },
- quarticOut: function (t) {
- return 1 - --t * t * t * t;
- },
- quarticInOut: function (t) {
- return (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2);
- },
- quinticIn: function (t) {
- return t * t * t * t * t;
- },
- quinticOut: function (t) {
- return --t * t * t * t * t + 1;
- },
- quinticInOut: function (t) {
- return (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2);
- },
- sinusoidalIn: function (t) {
- return 1 - Math.cos(t * Math.PI / 2);
- },
- sinusoidalOut: function (t) {
- return Math.sin(t * Math.PI / 2);
- },
- sinusoidalInOut: function (t) {
- return .5 * (1 - Math.cos(Math.PI * t));
- },
- exponentialIn: function (t) {
- return 0 === t ? 0 : Math.pow(1024, t - 1);
- },
- exponentialOut: function (t) {
- return 1 === t ? 1 : 1 - Math.pow(2, -10 * t);
- },
- exponentialInOut: function (t) {
- return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * Math.pow(1024, t - 1) : .5 * (-Math.pow(2, -10 * (t - 1)) + 2);
- },
- circularIn: function (t) {
- return 1 - Math.sqrt(1 - t * t);
- },
- circularOut: function (t) {
- return Math.sqrt(1 - --t * t);
- },
- circularInOut: function (t) {
- return (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
- },
- elasticIn: function (t) {
- var e,
- i = .1,
- n = .4;
- return 0 === t ? 0 : 1 === t ? 1 : (!i || 1 > i ? (i = 1, e = n / 4) : e = n * Math.asin(1 / i) / (2 * Math.PI), -(i * Math.pow(2, 10 * (t -= 1)) * Math.sin(2 * (t - e) * Math.PI / n)));
- },
- elasticOut: function (t) {
- var e,
- i = .1,
- n = .4;
- return 0 === t ? 0 : 1 === t ? 1 : (!i || 1 > i ? (i = 1, e = n / 4) : e = n * Math.asin(1 / i) / (2 * Math.PI), i * Math.pow(2, -10 * t) * Math.sin(2 * (t - e) * Math.PI / n) + 1);
- },
- elasticInOut: function (t) {
- var e,
- i = .1,
- n = .4;
- return 0 === t ? 0 : 1 === t ? 1 : (!i || 1 > i ? (i = 1, e = n / 4) : e = n * Math.asin(1 / i) / (2 * Math.PI), (t *= 2) < 1 ? -.5 * i * Math.pow(2, 10 * (t -= 1)) * Math.sin(2 * (t - e) * Math.PI / n) : i * Math.pow(2, -10 * (t -= 1)) * Math.sin(2 * (t - e) * Math.PI / n) * .5 + 1);
- },
- backIn: function (t) {
- var e = 1.70158;
- return t * t * ((e + 1) * t - e);
- },
- backOut: function (t) {
- var e = 1.70158;
- return --t * t * ((e + 1) * t + e) + 1;
- },
- backInOut: function (t) {
- var e = 2.5949095;
- return (t *= 2) < 1 ? .5 * t * t * ((e + 1) * t - e) : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
- },
- bounceIn: function (t) {
- return 1 - fm.bounceOut(1 - t);
- },
- bounceOut: function (t) {
- return 1 / 2.75 > t ? 7.5625 * t * t : 2 / 2.75 > t ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : 2.5 / 2.75 > t ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
- },
- bounceInOut: function (t) {
- return .5 > t ? .5 * fm.bounceIn(2 * t) : .5 * fm.bounceOut(2 * t - 1) + .5;
- }
- };
- Ne.prototype = {
- constructor: Ne,
- step: function (t, e) {
- if (this._initialized || (this._startTime = t + this._delay, this._initialized = !0), this._paused) return void (this._pausedTime += e);
- var i = (t - this._startTime - this._pausedTime) / this._life;
- if (!(0 > i)) {
- i = Math.min(i, 1);
- var n = this.easing,
- r = "string" == typeof n ? fm[n] : n,
- a = "function" == typeof r ? r(i) : i;
- return this.fire("frame", a), 1 === i ? this.loop ? (this.restart(t), "restart") : (this._needsRemove = !0, "destroy") : null;
- }
- },
- restart: function (t) {
- var e = (t - this._startTime - this._pausedTime) % this._life;
- this._startTime = t - e + this.gap, this._pausedTime = 0, this._needsRemove = !1;
- },
- fire: function (t, e) {
- t = "on" + t, this[t] && this[t](this._target, e);
- },
- pause: function () {
- this._paused = !0;
- },
- resume: function () {
- this._paused = !1;
- }
- };
- var pm = function () {
- this.head = null, this.tail = null, this._len = 0;
- },
- gm = pm.prototype;
- gm.insert = function (t) {
- var e = new mm(t);
- return this.insertEntry(e), e;
- }, gm.insertEntry = function (t) {
- this.head ? (this.tail.next = t, t.prev = this.tail, t.next = null, this.tail = t) : this.head = this.tail = t, this._len++;
- }, gm.remove = function (t) {
- var e = t.prev,
- i = t.next;
- e ? e.next = i : this.head = i, i ? i.prev = e : this.tail = e, t.next = t.prev = null, this._len--;
- }, gm.len = function () {
- return this._len;
- }, gm.clear = function () {
- this.head = this.tail = null, this._len = 0;
- };
- var mm = function (t) {
- this.value = t, this.next, this.prev;
- },
- vm = function (t) {
- this._list = new pm(), this._map = {}, this._maxSize = t || 10, this._lastRemovedEntry = null;
- },
- ym = vm.prototype;
- ym.put = function (t, e) {
- var i = this._list,
- n = this._map,
- r = null;
- if (null == n[t]) {
- var a = i.len(),
- o = this._lastRemovedEntry;
- if (a >= this._maxSize && a > 0) {
- var s = i.head;
- i.remove(s), delete n[s.key], r = s.value, this._lastRemovedEntry = s;
- }
- o ? o.value = e : o = new mm(e), o.key = t, i.insertEntry(o), n[t] = o;
- }
- return r;
- }, ym.get = function (t) {
- var e = this._map[t],
- i = this._list;
- return null != e ? (e !== i.tail && (i.remove(e), i.insertEntry(e)), e.value) : void 0;
- }, ym.clear = function () {
- this._list.clear(), this._map = {};
- };
- var _m = {
- transparent: [0, 0, 0, 0],
- aliceblue: [240, 248, 255, 1],
- antiquewhite: [250, 235, 215, 1],
- aqua: [0, 255, 255, 1],
- aquamarine: [127, 255, 212, 1],
- azure: [240, 255, 255, 1],
- beige: [245, 245, 220, 1],
- bisque: [255, 228, 196, 1],
- black: [0, 0, 0, 1],
- blanchedalmond: [255, 235, 205, 1],
- blue: [0, 0, 255, 1],
- blueviolet: [138, 43, 226, 1],
- brown: [165, 42, 42, 1],
- burlywood: [222, 184, 135, 1],
- cadetblue: [95, 158, 160, 1],
- chartreuse: [127, 255, 0, 1],
- chocolate: [210, 105, 30, 1],
- coral: [255, 127, 80, 1],
- cornflowerblue: [100, 149, 237, 1],
- cornsilk: [255, 248, 220, 1],
- crimson: [220, 20, 60, 1],
- cyan: [0, 255, 255, 1],
- darkblue: [0, 0, 139, 1],
- darkcyan: [0, 139, 139, 1],
- darkgoldenrod: [184, 134, 11, 1],
- darkgray: [169, 169, 169, 1],
- darkgreen: [0, 100, 0, 1],
- darkgrey: [169, 169, 169, 1],
- darkkhaki: [189, 183, 107, 1],
- darkmagenta: [139, 0, 139, 1],
- darkolivegreen: [85, 107, 47, 1],
- darkorange: [255, 140, 0, 1],
- darkorchid: [153, 50, 204, 1],
- darkred: [139, 0, 0, 1],
- darksalmon: [233, 150, 122, 1],
- darkseagreen: [143, 188, 143, 1],
- darkslateblue: [72, 61, 139, 1],
- darkslategray: [47, 79, 79, 1],
- darkslategrey: [47, 79, 79, 1],
- darkturquoise: [0, 206, 209, 1],
- darkviolet: [148, 0, 211, 1],
- deeppink: [255, 20, 147, 1],
- deepskyblue: [0, 191, 255, 1],
- dimgray: [105, 105, 105, 1],
- dimgrey: [105, 105, 105, 1],
- dodgerblue: [30, 144, 255, 1],
- firebrick: [178, 34, 34, 1],
- floralwhite: [255, 250, 240, 1],
- forestgreen: [34, 139, 34, 1],
- fuchsia: [255, 0, 255, 1],
- gainsboro: [220, 220, 220, 1],
- ghostwhite: [248, 248, 255, 1],
- gold: [255, 215, 0, 1],
- goldenrod: [218, 165, 32, 1],
- gray: [128, 128, 128, 1],
- green: [0, 128, 0, 1],
- greenyellow: [173, 255, 47, 1],
- grey: [128, 128, 128, 1],
- honeydew: [240, 255, 240, 1],
- hotpink: [255, 105, 180, 1],
- indianred: [205, 92, 92, 1],
- indigo: [75, 0, 130, 1],
- ivory: [255, 255, 240, 1],
- khaki: [240, 230, 140, 1],
- lavender: [230, 230, 250, 1],
- lavenderblush: [255, 240, 245, 1],
- lawngreen: [124, 252, 0, 1],
- lemonchiffon: [255, 250, 205, 1],
- lightblue: [173, 216, 230, 1],
- lightcoral: [240, 128, 128, 1],
- lightcyan: [224, 255, 255, 1],
- lightgoldenrodyellow: [250, 250, 210, 1],
- lightgray: [211, 211, 211, 1],
- lightgreen: [144, 238, 144, 1],
- lightgrey: [211, 211, 211, 1],
- lightpink: [255, 182, 193, 1],
- lightsalmon: [255, 160, 122, 1],
- lightseagreen: [32, 178, 170, 1],
- lightskyblue: [135, 206, 250, 1],
- lightslategray: [119, 136, 153, 1],
- lightslategrey: [119, 136, 153, 1],
- lightsteelblue: [176, 196, 222, 1],
- lightyellow: [255, 255, 224, 1],
- lime: [0, 255, 0, 1],
- limegreen: [50, 205, 50, 1],
- linen: [250, 240, 230, 1],
- magenta: [255, 0, 255, 1],
- maroon: [128, 0, 0, 1],
- mediumaquamarine: [102, 205, 170, 1],
- mediumblue: [0, 0, 205, 1],
- mediumorchid: [186, 85, 211, 1],
- mediumpurple: [147, 112, 219, 1],
- mediumseagreen: [60, 179, 113, 1],
- mediumslateblue: [123, 104, 238, 1],
- mediumspringgreen: [0, 250, 154, 1],
- mediumturquoise: [72, 209, 204, 1],
- mediumvioletred: [199, 21, 133, 1],
- midnightblue: [25, 25, 112, 1],
- mintcream: [245, 255, 250, 1],
- mistyrose: [255, 228, 225, 1],
- moccasin: [255, 228, 181, 1],
- navajowhite: [255, 222, 173, 1],
- navy: [0, 0, 128, 1],
- oldlace: [253, 245, 230, 1],
- olive: [128, 128, 0, 1],
- olivedrab: [107, 142, 35, 1],
- orange: [255, 165, 0, 1],
- orangered: [255, 69, 0, 1],
- orchid: [218, 112, 214, 1],
- palegoldenrod: [238, 232, 170, 1],
- palegreen: [152, 251, 152, 1],
- paleturquoise: [175, 238, 238, 1],
- palevioletred: [219, 112, 147, 1],
- papayawhip: [255, 239, 213, 1],
- peachpuff: [255, 218, 185, 1],
- peru: [205, 133, 63, 1],
- pink: [255, 192, 203, 1],
- plum: [221, 160, 221, 1],
- powderblue: [176, 224, 230, 1],
- purple: [128, 0, 128, 1],
- red: [255, 0, 0, 1],
- rosybrown: [188, 143, 143, 1],
- royalblue: [65, 105, 225, 1],
- saddlebrown: [139, 69, 19, 1],
- salmon: [250, 128, 114, 1],
- sandybrown: [244, 164, 96, 1],
- seagreen: [46, 139, 87, 1],
- seashell: [255, 245, 238, 1],
- sienna: [160, 82, 45, 1],
- silver: [192, 192, 192, 1],
- skyblue: [135, 206, 235, 1],
- slateblue: [106, 90, 205, 1],
- slategray: [112, 128, 144, 1],
- slategrey: [112, 128, 144, 1],
- snow: [255, 250, 250, 1],
- springgreen: [0, 255, 127, 1],
- steelblue: [70, 130, 180, 1],
- tan: [210, 180, 140, 1],
- teal: [0, 128, 128, 1],
- thistle: [216, 191, 216, 1],
- tomato: [255, 99, 71, 1],
- turquoise: [64, 224, 208, 1],
- violet: [238, 130, 238, 1],
- wheat: [245, 222, 179, 1],
- white: [255, 255, 255, 1],
- whitesmoke: [245, 245, 245, 1],
- yellow: [255, 255, 0, 1],
- yellowgreen: [154, 205, 50, 1]
- },
- xm = new vm(20),
- wm = null,
- bm = ti,
- Sm = ei,
- Mm = (Object.freeze || Object)({
- parse: Ze,
- lift: Qe,
- toHex: Je,
- fastLerp: ti,
- fastMapToColor: bm,
- lerp: ei,
- mapToColor: Sm,
- modifyHSL: ii,
- modifyAlpha: ni,
- stringify: ri
- }),
- Im = Array.prototype.slice,
- Tm = function (t, e, i, n) {
- this._tracks = {}, this._target = t, this._loop = e || !1, this._getter = i || ai, this._setter = n || oi, this._clipCount = 0, this._delay = 0, this._doneList = [], this._onframeList = [], this._clipList = [];
- };
- Tm.prototype = {
- when: function (t, e) {
- var i = this._tracks;
- for (var n in e) if (e.hasOwnProperty(n)) {
- if (!i[n]) {
- i[n] = [];
- var r = this._getter(this._target, n);
- if (null == r) continue;
- 0 !== t && i[n].push({
- time: 0,
- value: pi(r)
- });
- }
- i[n].push({
- time: t,
- value: e[n]
- });
- }
- return this;
- },
- during: function (t) {
- return this._onframeList.push(t), this;
- },
- pause: function () {
- for (var t = 0; t < this._clipList.length; t++) this._clipList[t].pause();
- this._paused = !0;
- },
- resume: function () {
- for (var t = 0; t < this._clipList.length; t++) this._clipList[t].resume();
- this._paused = !1;
- },
- isPaused: function () {
- return !!this._paused;
- },
- _doneCallback: function () {
- this._tracks = {}, this._clipList.length = 0;
- for (var t = this._doneList, e = t.length, i = 0; e > i; i++) t[i].call(this);
- },
- start: function (t, e) {
- var i,
- n = this,
- r = 0,
- a = function () {
- r--, r || n._doneCallback();
- };
- for (var o in this._tracks) if (this._tracks.hasOwnProperty(o)) {
- var s = vi(this, t, a, this._tracks[o], o, e);
- s && (this._clipList.push(s), r++, this.animation && this.animation.addClip(s), i = s);
- }
- if (i) {
- var l = i.onframe;
- i.onframe = function (t, e) {
- l(t, e);
- for (var i = 0; i < n._onframeList.length; i++) n._onframeList[i](t, e);
- };
- }
- return r || this._doneCallback(), this;
- },
- stop: function (t) {
- for (var e = this._clipList, i = this.animation, n = 0; n < e.length; n++) {
- var r = e[n];
- t && r.onframe(this._target, 1), i && i.removeClip(r);
- }
- e.length = 0;
- },
- delay: function (t) {
- return this._delay = t, this;
- },
- done: function (t) {
- return t && this._doneList.push(t), this;
- },
- getClips: function () {
- return this._clipList;
- }
- };
- var Cm = 1;
- "undefined" != typeof window && (Cm = Math.max(window.devicePixelRatio || 1, 1));
- var Dm = 0,
- Am = Cm,
- km = function () {};
- 1 === Dm && (km = console.error);
- var Pm = km,
- Lm = function () {
- this.animators = [];
- };
- Lm.prototype = {
- constructor: Lm,
- animate: function (t, e) {
- var i,
- n = !1,
- r = this,
- a = this.__zr;
- if (t) {
- var o = t.split("."),
- s = r;
- n = "shape" === o[0];
- for (var l = 0, h = o.length; h > l; l++) s && (s = s[o[l]]);
- s && (i = s);
- } else i = r;
- if (!i) return void Pm('Property "' + t + '" is not existed in element ' + r.id);
- var c = r.animators,
- d = new Tm(i, e);
- return d.during(function () {
- r.dirty(n);
- }).done(function () {
- c.splice(u(c, d), 1);
- }), c.push(d), a && a.animation.addAnimator(d), d;
- },
- stopAnimation: function (t) {
- for (var e = this.animators, i = e.length, n = 0; i > n; n++) e[n].stop(t);
- return e.length = 0, this;
- },
- animateTo: function (t, e, i, n, r, a) {
- yi(this, t, e, i, n, r, a);
- },
- animateFrom: function (t, e, i, n, r, a) {
- yi(this, t, e, i, n, r, a, !0);
- }
- };
- var Om = function (t) {
- lm.call(this, t), Yg.call(this, t), Lm.call(this, t), this.id = t.id || bg();
- };
- Om.prototype = {
- type: "element",
- name: "",
- __zr: null,
- ignore: !1,
- clipPath: null,
- isGroup: !1,
- drift: function (t, e) {
- switch (this.draggable) {
- case "horizontal":
- e = 0;
- break;
- case "vertical":
- t = 0;
- }
- var i = this.transform;
- i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += t, i[5] += e, this.decomposeTransform(), this.dirty(!1);
- },
- beforeUpdate: function () {},
- afterUpdate: function () {},
- update: function () {
- this.updateTransform();
- },
- traverse: function () {},
- attrKV: function (t, e) {
- if ("position" === t || "scale" === t || "origin" === t) {
- if (e) {
- var i = this[t];
- i || (i = this[t] = []), i[0] = e[0], i[1] = e[1];
- }
- } else this[t] = e;
- },
- hide: function () {
- this.ignore = !0, this.__zr && this.__zr.refresh();
- },
- show: function () {
- this.ignore = !1, this.__zr && this.__zr.refresh();
- },
- attr: function (t, e) {
- if ("string" == typeof t) this.attrKV(t, e);else if (S(t)) for (var i in t) t.hasOwnProperty(i) && this.attrKV(i, t[i]);
- return this.dirty(!1), this;
- },
- setClipPath: function (t) {
- var e = this.__zr;
- e && t.addSelfToZr(e), this.clipPath && this.clipPath !== t && this.removeClipPath(), this.clipPath = t, t.__zr = e, t.__clipTarget = this, this.dirty(!1);
- },
- removeClipPath: function () {
- var t = this.clipPath;
- t && (t.__zr && t.removeSelfFromZr(t.__zr), t.__zr = null, t.__clipTarget = null, this.clipPath = null, this.dirty(!1));
- },
- addSelfToZr: function (t) {
- this.__zr = t;
- var e = this.animators;
- if (e) for (var i = 0; i < e.length; i++) t.animation.addAnimator(e[i]);
- this.clipPath && this.clipPath.addSelfToZr(t);
- },
- removeSelfFromZr: function (t) {
- this.__zr = null;
- var e = this.animators;
- if (e) for (var i = 0; i < e.length; i++) t.animation.removeAnimator(e[i]);
- this.clipPath && this.clipPath.removeSelfFromZr(t);
- }
- }, c(Om, Lm), c(Om, lm), c(Om, Yg);
- var zm = ae,
- Em = Math.min,
- Rm = Math.max;
- wi.prototype = {
- constructor: wi,
- union: function (t) {
- var e = Em(t.x, this.x),
- i = Em(t.y, this.y);
- this.width = Rm(t.x + t.width, this.x + this.width) - e, this.height = Rm(t.y + t.height, this.y + this.height) - i, this.x = e, this.y = i;
- },
- applyTransform: function () {
- var t = [],
- e = [],
- i = [],
- n = [];
- return function (r) {
- if (r) {
- t[0] = i[0] = this.x, t[1] = n[1] = this.y, e[0] = n[0] = this.x + this.width, e[1] = i[1] = this.y + this.height, zm(t, t, r), zm(e, e, r), zm(i, i, r), zm(n, n, r), this.x = Em(t[0], e[0], i[0], n[0]), this.y = Em(t[1], e[1], i[1], n[1]);
- var a = Rm(t[0], e[0], i[0], n[0]),
- o = Rm(t[1], e[1], i[1], n[1]);
- this.width = a - this.x, this.height = o - this.y;
- }
- };
- }(),
- calculateTransform: function (t) {
- var e = this,
- i = t.width / e.width,
- n = t.height / e.height,
- r = De();
- return Le(r, r, [-e.x, -e.y]), ze(r, r, [i, n]), Le(r, r, [t.x, t.y]), r;
- },
- intersect: function (t) {
- if (!t) return !1;
- t instanceof wi || (t = wi.create(t));
- var e = this,
- i = e.x,
- n = e.x + e.width,
- r = e.y,
- a = e.y + e.height,
- o = t.x,
- s = t.x + t.width,
- l = t.y,
- u = t.y + t.height;
- return !(o > n || i > s || l > a || r > u);
- },
- contain: function (t, e) {
- var i = this;
- return t >= i.x && t <= i.x + i.width && e >= i.y && e <= i.y + i.height;
- },
- clone: function () {
- return new wi(this.x, this.y, this.width, this.height);
- },
- copy: function (t) {
- this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height;
- },
- plain: function () {
- return {
- x: this.x,
- y: this.y,
- width: this.width,
- height: this.height
- };
- }
- }, wi.create = function (t) {
- return new wi(t.x, t.y, t.width, t.height);
- };
- var Bm = function (t) {
- t = t || {}, Om.call(this, t);
- for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]);
- this._children = [], this.__storage = null, this.__dirty = !0;
- };
- Bm.prototype = {
- constructor: Bm,
- isGroup: !0,
- type: "group",
- silent: !1,
- children: function () {
- return this._children.slice();
- },
- childAt: function (t) {
- return this._children[t];
- },
- childOfName: function (t) {
- for (var e = this._children, i = 0; i < e.length; i++) if (e[i].name === t) return e[i];
- },
- childCount: function () {
- return this._children.length;
- },
- add: function (t) {
- return t && t !== this && t.parent !== this && (this._children.push(t), this._doAdd(t)), this;
- },
- addBefore: function (t, e) {
- if (t && t !== this && t.parent !== this && e && e.parent === this) {
- var i = this._children,
- n = i.indexOf(e);
- n >= 0 && (i.splice(n, 0, t), this._doAdd(t));
- }
- return this;
- },
- _doAdd: function (t) {
- t.parent && t.parent.remove(t), t.parent = this;
- var e = this.__storage,
- i = this.__zr;
- e && e !== t.__storage && (e.addToStorage(t), t instanceof Bm && t.addChildrenToStorage(e)), i && i.refresh();
- },
- remove: function (t) {
- var e = this.__zr,
- i = this.__storage,
- n = this._children,
- r = u(n, t);
- return 0 > r ? this : (n.splice(r, 1), t.parent = null, i && (i.delFromStorage(t), t instanceof Bm && t.delChildrenFromStorage(i)), e && e.refresh(), this);
- },
- removeAll: function () {
- var t,
- e,
- i = this._children,
- n = this.__storage;
- for (e = 0; e < i.length; e++) t = i[e], n && (n.delFromStorage(t), t instanceof Bm && t.delChildrenFromStorage(n)), t.parent = null;
- return i.length = 0, this;
- },
- eachChild: function (t, e) {
- for (var i = this._children, n = 0; n < i.length; n++) {
- var r = i[n];
- t.call(e, r, n);
- }
- return this;
- },
- traverse: function (t, e) {
- for (var i = 0; i < this._children.length; i++) {
- var n = this._children[i];
- t.call(e, n), "group" === n.type && n.traverse(t, e);
- }
- return this;
- },
- addChildrenToStorage: function (t) {
- for (var e = 0; e < this._children.length; e++) {
- var i = this._children[e];
- t.addToStorage(i), i instanceof Bm && i.addChildrenToStorage(t);
- }
- },
- delChildrenFromStorage: function (t) {
- for (var e = 0; e < this._children.length; e++) {
- var i = this._children[e];
- t.delFromStorage(i), i instanceof Bm && i.delChildrenFromStorage(t);
- }
- },
- dirty: function () {
- return this.__dirty = !0, this.__zr && this.__zr.refresh(), this;
- },
- getBoundingRect: function (t) {
- for (var e = null, i = new wi(0, 0, 0, 0), n = t || this._children, r = [], a = 0; a < n.length; a++) {
- var o = n[a];
- if (!o.ignore && !o.invisible) {
- var s = o.getBoundingRect(),
- l = o.getLocalTransform(r);
- l ? (i.copy(s), i.applyTransform(l), e = e || i.clone(), e.union(i)) : (e = e || s.clone(), e.union(s));
- }
- }
- return e || i;
- }
- }, h(Bm, Om);
- var Nm = 32,
- Fm = 7,
- Gm = function () {
- this._roots = [], this._displayList = [], this._displayListLen = 0;
- };
- Gm.prototype = {
- constructor: Gm,
- traverse: function (t, e) {
- for (var i = 0; i < this._roots.length; i++) this._roots[i].traverse(t, e);
- },
- getDisplayList: function (t, e) {
- return e = e || !1, t && this.updateDisplayList(e), this._displayList;
- },
- updateDisplayList: function (t) {
- this._displayListLen = 0;
- for (var e = this._roots, i = this._displayList, n = 0, r = e.length; r > n; n++) this._updateAndAddDisplayable(e[n], null, t);
- i.length = this._displayListLen, Mg.canvasSupported && Ai(i, ki);
- },
- _updateAndAddDisplayable: function (t, e, i) {
- if (!t.ignore || i) {
- t.beforeUpdate(), t.__dirty && t.update(), t.afterUpdate();
- var n = t.clipPath;
- if (n) {
- e = e ? e.slice() : [];
- for (var r = n, a = t; r;) r.parent = a, r.updateTransform(), e.push(r), a = r, r = r.clipPath;
- }
- if (t.isGroup) {
- for (var o = t._children, s = 0; s < o.length; s++) {
- var l = o[s];
- t.__dirty && (l.__dirty = !0), this._updateAndAddDisplayable(l, e, i);
- }
- t.__dirty = !1;
- } else t.__clipPaths = e, this._displayList[this._displayListLen++] = t;
- }
- },
- addRoot: function (t) {
- t.__storage !== this && (t instanceof Bm && t.addChildrenToStorage(this), this.addToStorage(t), this._roots.push(t));
- },
- delRoot: function (t) {
- if (null == t) {
- for (var e = 0; e < this._roots.length; e++) {
- var i = this._roots[e];
- i instanceof Bm && i.delChildrenFromStorage(this);
- }
- return this._roots = [], this._displayList = [], void (this._displayListLen = 0);
- }
- if (t instanceof Array) for (var e = 0, n = t.length; n > e; e++) this.delRoot(t[e]);else {
- var r = u(this._roots, t);
- r >= 0 && (this.delFromStorage(t), this._roots.splice(r, 1), t instanceof Bm && t.delChildrenFromStorage(this));
- }
- },
- addToStorage: function (t) {
- return t && (t.__storage = this, t.dirty(!1)), this;
- },
- delFromStorage: function (t) {
- return t && (t.__storage = null), this;
- },
- dispose: function () {
- this._renderList = this._roots = null;
- },
- displayableSortFunc: ki
- };
- var Vm = {
- shadowBlur: 1,
- shadowOffsetX: 1,
- shadowOffsetY: 1,
- textShadowBlur: 1,
- textShadowOffsetX: 1,
- textShadowOffsetY: 1,
- textBoxShadowBlur: 1,
- textBoxShadowOffsetX: 1,
- textBoxShadowOffsetY: 1
- },
- Hm = function (t, e, i) {
- return Vm.hasOwnProperty(e) ? i *= t.dpr : i;
- },
- Wm = {
- NONE: 0,
- STYLE_BIND: 1,
- PLAIN_TEXT: 2
- },
- Um = 9,
- Xm = [["shadowBlur", 0], ["shadowOffsetX", 0], ["shadowOffsetY", 0], ["shadowColor", "#000"], ["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10]],
- Ym = function (t) {
- this.extendFrom(t, !1);
- };
- Ym.prototype = {
- constructor: Ym,
- fill: "#000",
- stroke: null,
- opacity: 1,
- fillOpacity: null,
- strokeOpacity: null,
- lineDash: null,
- lineDashOffset: 0,
- shadowBlur: 0,
- shadowOffsetX: 0,
- shadowOffsetY: 0,
- lineWidth: 1,
- strokeNoScale: !1,
- text: null,
- font: null,
- textFont: null,
- fontStyle: null,
- fontWeight: null,
- fontSize: null,
- fontFamily: null,
- textTag: null,
- textFill: "#000",
- textStroke: null,
- textWidth: null,
- textHeight: null,
- textStrokeWidth: 0,
- textLineHeight: null,
- textPosition: "inside",
- textRect: null,
- textOffset: null,
- textAlign: null,
- textVerticalAlign: null,
- textDistance: 5,
- textShadowColor: "transparent",
- textShadowBlur: 0,
- textShadowOffsetX: 0,
- textShadowOffsetY: 0,
- textBoxShadowColor: "transparent",
- textBoxShadowBlur: 0,
- textBoxShadowOffsetX: 0,
- textBoxShadowOffsetY: 0,
- transformText: !1,
- textRotation: 0,
- textOrigin: null,
- textBackgroundColor: null,
- textBorderColor: null,
- textBorderWidth: 0,
- textBorderRadius: 0,
- textPadding: null,
- rich: null,
- truncate: null,
- blend: null,
- bind: function (t, e, i) {
- var n = this,
- r = i && i.style,
- a = !r || t.__attrCachedBy !== Wm.STYLE_BIND;
- t.__attrCachedBy = Wm.STYLE_BIND;
- for (var o = 0; o < Xm.length; o++) {
- var s = Xm[o],
- l = s[0];
- (a || n[l] !== r[l]) && (t[l] = Hm(t, l, n[l] || s[1]));
- }
- if ((a || n.fill !== r.fill) && (t.fillStyle = n.fill), (a || n.stroke !== r.stroke) && (t.strokeStyle = n.stroke), (a || n.opacity !== r.opacity) && (t.globalAlpha = null == n.opacity ? 1 : n.opacity), (a || n.blend !== r.blend) && (t.globalCompositeOperation = n.blend || "source-over"), this.hasStroke()) {
- var u = n.lineWidth;
- t.lineWidth = u / (this.strokeNoScale && e && e.getLineScale ? e.getLineScale() : 1);
- }
- },
- hasFill: function () {
- var t = this.fill;
- return null != t && "none" !== t;
- },
- hasStroke: function () {
- var t = this.stroke;
- return null != t && "none" !== t && this.lineWidth > 0;
- },
- extendFrom: function (t, e) {
- if (t) for (var i in t) !t.hasOwnProperty(i) || e !== !0 && (e === !1 ? this.hasOwnProperty(i) : null == t[i]) || (this[i] = t[i]);
- },
- set: function (t, e) {
- "string" == typeof t ? this[t] = e : this.extendFrom(t, !0);
- },
- clone: function () {
- var t = new this.constructor();
- return t.extendFrom(this, !0), t;
- },
- getGradient: function (t, e, i) {
- for (var n = "radial" === e.type ? Li : Pi, r = n(t, e, i), a = e.colorStops, o = 0; o < a.length; o++) r.addColorStop(a[o].offset, a[o].color);
- return r;
- }
- };
- for (var jm = Ym.prototype, qm = 0; qm < Xm.length; qm++) {
- var Zm = Xm[qm];
- Zm[0] in jm || (jm[Zm[0]] = Zm[1]);
- }
- Ym.getGradient = jm.getGradient;
- var Km = function (t, e) {
- this.image = t, this.repeat = e, this.type = "pattern";
- };
- Km.prototype.getCanvasPattern = function (t) {
- return t.createPattern(this.image, this.repeat || "repeat");
- };
- var $m = function (t, e, i) {
- var n;
- i = i || Am, "string" == typeof t ? n = zi(t, e, i) : S(t) && (n = t, t = n.id), this.id = t, this.dom = n;
- var r = n.style;
- r && (n.onselectstart = Oi, r["-webkit-user-select"] = "none", r["user-select"] = "none", r["-webkit-touch-callout"] = "none", r["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)", r.padding = 0, r.margin = 0, r["border-width"] = 0), this.domBack = null, this.ctxBack = null, this.painter = e, this.config = null, this.clearColor = 0, this.motionBlur = !1, this.lastFrameAlpha = .7, this.dpr = i;
- };
- $m.prototype = {
- constructor: $m,
- __dirty: !0,
- __used: !1,
- __drawIndex: 0,
- __startIndex: 0,
- __endIndex: 0,
- incremental: !1,
- getElementCount: function () {
- return this.__endIndex - this.__startIndex;
- },
- initContext: function () {
- this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr;
- },
- createBackBuffer: function () {
- var t = this.dpr;
- this.domBack = zi("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), 1 !== t && this.ctxBack.scale(t, t);
- },
- resize: function (t, e) {
- var i = this.dpr,
- n = this.dom,
- r = n.style,
- a = this.domBack;
- r && (r.width = t + "px", r.height = e + "px"), n.width = t * i, n.height = e * i, a && (a.width = t * i, a.height = e * i, 1 !== i && this.ctxBack.scale(i, i));
- },
- clear: function (t, e) {
- var i = this.dom,
- n = this.ctx,
- r = i.width,
- a = i.height,
- e = e || this.clearColor,
- o = this.motionBlur && !t,
- s = this.lastFrameAlpha,
- l = this.dpr;
- if (o && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(i, 0, 0, r / l, a / l)), n.clearRect(0, 0, r, a), e && "transparent" !== e) {
- var u;
- e.colorStops ? (u = e.__canvasGradient || Ym.getGradient(n, e, {
- x: 0,
- y: 0,
- width: r,
- height: a
- }), e.__canvasGradient = u) : e.image && (u = Km.prototype.getCanvasPattern.call(e, n)), n.save(), n.fillStyle = u || e, n.fillRect(0, 0, r, a), n.restore();
- }
- if (o) {
- var h = this.domBack;
- n.save(), n.globalAlpha = s, n.drawImage(h, 0, 0, r, a), n.restore();
- }
- }
- };
- var Qm = "undefined" != typeof window && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function (t) {
- setTimeout(t, 16);
- },
- Jm = new vm(50),
- tv = {},
- ev = 0,
- iv = 5e3,
- nv = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,
- rv = "12px sans-serif",
- av = {};
- av.measureText = function (t, e) {
- var i = l();
- return i.font = e || rv, i.measureText(t);
- };
- var ov = rv,
- sv = {
- left: 1,
- right: 1,
- center: 1
- },
- lv = {
- top: 1,
- bottom: 1,
- middle: 1
- },
- uv = [["textShadowBlur", "shadowBlur", 0], ["textShadowOffsetX", "shadowOffsetX", 0], ["textShadowOffsetY", "shadowOffsetY", 0], ["textShadowColor", "shadowColor", "transparent"]],
- hv = {},
- cv = {},
- dv = new wi(),
- fv = function () {};
- // #ifdef MP-WEIXIN
- this.$scope.animate("style",t)
- // #endif
- // #ifndef MP-WEIXIN
- fv.prototype = {
- constructor: fv,
- drawRectText: function (t, e) {
- var i = this.style;
- e = i.textRect || e, this.__dirty && rn(i, !0);
- var n = i.text;
- if (null != n && (n += ""), wn(n, i)) {
- t.save();
- var r = this.transform;
- i.transformText ? this.setTransform(t) : r && (dv.copy(e), dv.applyTransform(r), e = dv), on(this, t, n, i, e, Um), t.restore();
- }
- }
- }, bn.prototype = {
- constructor: bn,
- type: "displayable",
- __dirty: !0,
- invisible: !1,
- z: 0,
- z2: 0,
- zlevel: 0,
- draggable: !1,
- dragging: !1,
- silent: !1,
- culling: !1,
- cursor: "pointer",
- rectHover: !1,
- progressive: !1,
- incremental: !1,
- globalScaleRatio: 1,
- beforeBrush: function () {},
- afterBrush: function () {},
- brush: function () {},
- getBoundingRect: function () {},
- contain: function (t, e) {
- return this.rectContain(t, e);
- },
- traverse: function (t, e) {
- t.call(e, this);
- },
- rectContain: function (t, e) {
- var i = this.transformCoordToLocal(t, e),
- n = this.getBoundingRect();
- return n.contain(i[0], i[1]);
- },
- dirty: function () {
- this.__dirty = this.__dirtyText = !0, this._rect = null, this.__zr && this.__zr.refresh();
- },
- animateStyle: function (t) {
- return this.animate("style", t);
- },
- attrKV: function (t, e) {
- "style" !== t ? Om.prototype.attrKV.call(this, t, e) : this.style.set(e);
- },
- setStyle: function (t, e) {
- return this.style.set(t, e), this.dirty(!1), this;
- },
- useStyle: function (t) {
- return this.style = new Ym(t, this), this.dirty(!1), this;
- },
- calculateTextPosition: null
- }, h(bn, Om), c(bn, fv), Sn.prototype = {
- constructor: Sn,
- type: "image",
- brush: function (t, e) {
- var i = this.style,
- n = i.image;
- i.bind(t, this, e);
- var r = this._image = Ri(n, this._image, this, this.onload);
- if (r && Ni(r)) {
- var a = i.x || 0,
- o = i.y || 0,
- s = i.width,
- l = i.height,
- u = r.width / r.height;
- if (null == s && null != l ? s = l * u : null == l && null != s ? l = s / u : null == s && null == l && (s = r.width, l = r.height), this.setTransform(t), i.sWidth && i.sHeight) {
- var h = i.sx || 0,
- c = i.sy || 0;
- t.drawImage(r, h, c, i.sWidth, i.sHeight, a, o, s, l);
- } else if (i.sx && i.sy) {
- var h = i.sx,
- c = i.sy,
- d = s - h,
- f = l - c;
- t.drawImage(r, h, c, d, f, a, o, s, l);
- } else t.drawImage(r, a, o, s, l);
- null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect()));
- }
- },
- getBoundingRect: function () {
- var t = this.style;
- return this._rect || (this._rect = new wi(t.x || 0, t.y || 0, t.width || 0, t.height || 0)), this._rect;
- }
- }, h(Sn, bn);
- // #endif
- var pv = 1e5,
- gv = 314159,
- mv = .01,
- vv = .001,
- yv = new wi(0, 0, 0, 0),
- _v = new wi(0, 0, 0, 0),
- xv = function (t, e, i) {
- this.type = "canvas";
- var n = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase();
- this._opts = i = o({}, i || {}), this.dpr = i.devicePixelRatio || Am, this._singleCanvas = n, this.root = t;
- var r = t.style;
- r && (r["-webkit-tap-highlight-color"] = "transparent", r["-webkit-user-select"] = r["user-select"] = r["-webkit-touch-callout"] = "none", t.innerHTML = ""), this.storage = e;
- var a = this._zlevelList = [],
- s = this._layers = {};
- if (this._layerConfig = {}, this._needsManuallyCompositing = !1, n) {
- var l = t.width,
- u = t.height;
- null != i.width && (l = i.width), null != i.height && (u = i.height), this.dpr = i.devicePixelRatio || 1, t.width = l * this.dpr, t.height = u * this.dpr, this._width = l, this._height = u;
- var h = new $m(t, this, this.dpr);
- h.__builtin__ = !0, h.initContext(), s[gv] = h, h.zlevel = gv, a.push(gv), this._domRoot = t;
- } else {
- this._width = this._getSize(0), this._height = this._getSize(1);
- var c = this._domRoot = An(this._width, this._height);
- t.appendChild(c);
- }
- this._hoverlayer = null, this._hoverElements = [];
- };
- xv.prototype = {
- constructor: xv,
- getType: function () {
- return "canvas";
- },
- isSingleCanvas: function () {
- return this._singleCanvas;
- },
- getViewportRoot: function () {
- return this._domRoot;
- },
- getViewportRootOffset: function () {
- var t = this.getViewportRoot();
- return t ? {
- offsetLeft: t.offsetLeft || 0,
- offsetTop: t.offsetTop || 0
- } : void 0;
- },
- refresh: function (t) {
- var e = this.storage.getDisplayList(!0),
- i = this._zlevelList;
- this._redrawId = Math.random(), this._paintList(e, t, this._redrawId);
- for (var n = 0; n < i.length; n++) {
- var r = i[n],
- a = this._layers[r];
- if (!a.__builtin__ && a.refresh) {
- var o = 0 === n ? this._backgroundColor : null;
- a.refresh(o);
- }
- }
- return this.refreshHover(), this;
- },
- addHover: function (t, e) {
- if (!t.__hoverMir) {
- var i = new t.constructor({
- style: t.style,
- shape: t.shape,
- z: t.z,
- z2: t.z2,
- silent: t.silent
- });
- return i.__from = t, t.__hoverMir = i, e && i.setStyle(e), this._hoverElements.push(i), i;
- }
- },
- removeHover: function (t) {
- var e = t.__hoverMir,
- i = this._hoverElements,
- n = u(i, e);
- n >= 0 && i.splice(n, 1), t.__hoverMir = null;
- },
- clearHover: function () {
- for (var t = this._hoverElements, e = 0; e < t.length; e++) {
- var i = t[e].__from;
- i && (i.__hoverMir = null);
- }
- t.length = 0;
- },
- refreshHover: function () {
- var t = this._hoverElements,
- e = t.length,
- i = this._hoverlayer;
- if (i && i.clear(), e) {
- Ai(t, this.storage.displayableSortFunc), i || (i = this._hoverlayer = this.getLayer(pv));
- var n = {};
- i.ctx.save();
- for (var r = 0; e > r;) {
- var a = t[r],
- o = a.__from;
- o && o.__zr ? (r++, o.invisible || (a.transform = o.transform, a.invTransform = o.invTransform, a.__clipPaths = o.__clipPaths, this._doPaintEl(a, i, !0, n))) : (t.splice(r, 1), o.__hoverMir = null, e--);
- }
- i.ctx.restore();
- }
- },
- getHoverLayer: function () {
- return this.getLayer(pv);
- },
- _paintList: function (t, e, i) {
- if (this._redrawId === i) {
- e = e || !1, this._updateLayerStatus(t);
- var n = this._doPaintList(t, e);
- if (this._needsManuallyCompositing && this._compositeManually(), !n) {
- var r = this;
- Qm(function () {
- r._paintList(t, e, i);
- });
- }
- }
- },
- _compositeManually: function () {
- var t = this.getLayer(gv).ctx,
- e = this._domRoot.width,
- i = this._domRoot.height;
- t.clearRect(0, 0, e, i), this.eachBuiltinLayer(function (n) {
- n.virtual && t.drawImage(n.dom, 0, 0, e, i);
- });
- },
- _doPaintList: function (t, e) {
- for (var i = [], n = 0; n < this._zlevelList.length; n++) {
- var r = this._zlevelList[n],
- a = this._layers[r];
- a.__builtin__ && a !== this._hoverlayer && (a.__dirty || e) && i.push(a);
- }
- for (var o = !0, s = 0; s < i.length; s++) {
- var a = i[s],
- l = a.ctx,
- u = {};
- l.save();
- var h = e ? a.__startIndex : a.__drawIndex,
- c = !e && a.incremental && Date.now,
- d = c && Date.now(),
- p = a.zlevel === this._zlevelList[0] ? this._backgroundColor : null;
- if (a.__startIndex === a.__endIndex) a.clear(!1, p);else if (h === a.__startIndex) {
- var g = t[h];
- g.incremental && g.notClear && !e || a.clear(!1, p);
- }
- -1 === h && (console.error("For some unknown reason. drawIndex is -1"), h = a.__startIndex);
- for (var m = h; m < a.__endIndex; m++) {
- var v = t[m];
- if (this._doPaintEl(v, a, e, u), v.__dirty = v.__dirtyText = !1, c) {
- var y = Date.now() - d;
- if (y > 15) break;
- }
- }
- a.__drawIndex = m, a.__drawIndex < a.__endIndex && (o = !1), u.prevElClipPaths && l.restore(), l.restore();
- }
- return Mg.wxa && f(this._layers, function (t) {
- t && t.ctx && t.ctx.draw && t.ctx.draw();
- }), o;
- },
- _doPaintEl: function (t, e, i, n) {
- var r = e.ctx,
- a = t.transform;
- if (!(!e.__dirty && !i || t.invisible || 0 === t.style.opacity || a && !a[0] && !a[3] || t.culling && Tn(t, this._width, this._height))) {
- var o = t.__clipPaths,
- s = n.prevElClipPaths;
- (!s || Cn(o, s)) && (s && (r.restore(), n.prevElClipPaths = null, n.prevEl = null), o && (r.save(), Dn(o, r), n.prevElClipPaths = o)), t.beforeBrush && t.beforeBrush(r), t.brush(r, n.prevEl || null), n.prevEl = t, t.afterBrush && t.afterBrush(r);
- }
- },
- getLayer: function (t, e) {
- this._singleCanvas && !this._needsManuallyCompositing && (t = gv);
- var i = this._layers[t];
- return i || (i = new $m("zr_" + t, this, this.dpr), i.zlevel = t, i.__builtin__ = !0, this._layerConfig[t] && r(i, this._layerConfig[t], !0), e && (i.virtual = e), this.insertLayer(t, i), i.initContext()), i;
- },
- insertLayer: function (t, e) {
- var i = this._layers,
- n = this._zlevelList,
- r = n.length,
- a = null,
- o = -1,
- s = this._domRoot;
- if (i[t]) return void Pm("ZLevel " + t + " has been used already");
- if (!In(e)) return void Pm("Layer of zlevel " + t + " is not valid");
- if (r > 0 && t > n[0]) {
- for (o = 0; r - 1 > o && !(n[o] < t && n[o + 1] > t); o++);
- a = i[n[o]];
- }
- if (n.splice(o + 1, 0, t), i[t] = e, !e.virtual) if (a) {
- var l = a.dom;
- l.nextSibling ? s.insertBefore(e.dom, l.nextSibling) : s.appendChild(e.dom);
- } else s.firstChild ? s.insertBefore(e.dom, s.firstChild) : s.appendChild(e.dom);
- },
- eachLayer: function (t, e) {
- var i,
- n,
- r = this._zlevelList;
- for (n = 0; n < r.length; n++) i = r[n], t.call(e, this._layers[i], i);
- },
- eachBuiltinLayer: function (t, e) {
- var i,
- n,
- r,
- a = this._zlevelList;
- for (r = 0; r < a.length; r++) n = a[r], i = this._layers[n], i.__builtin__ && t.call(e, i, n);
- },
- eachOtherLayer: function (t, e) {
- var i,
- n,
- r,
- a = this._zlevelList;
- for (r = 0; r < a.length; r++) n = a[r], i = this._layers[n], i.__builtin__ || t.call(e, i, n);
- },
- getLayers: function () {
- return this._layers;
- },
- _updateLayerStatus: function (t) {
- function e(t) {
- r && (r.__endIndex !== t && (r.__dirty = !0), r.__endIndex = t);
- }
- if (this.eachBuiltinLayer(function (t) {
- t.__dirty = t.__used = !1;
- }), this._singleCanvas) for (var i = 1; i < t.length; i++) {
- var n = t[i];
- if (n.zlevel !== t[i - 1].zlevel || n.incremental) {
- this._needsManuallyCompositing = !0;
- break;
- }
- }
- for (var r = null, a = 0, i = 0; i < t.length; i++) {
- var o,
- n = t[i],
- s = n.zlevel;
- n.incremental ? (o = this.getLayer(s + vv, this._needsManuallyCompositing), o.incremental = !0, a = 1) : o = this.getLayer(s + (a > 0 ? mv : 0), this._needsManuallyCompositing), o.__builtin__ || Pm("ZLevel " + s + " has been used by unkown layer " + o.id), o !== r && (o.__used = !0, o.__startIndex !== i && (o.__dirty = !0), o.__startIndex = i, o.__drawIndex = o.incremental ? -1 : i, e(i), r = o), n.__dirty && (o.__dirty = !0, o.incremental && o.__drawIndex < 0 && (o.__drawIndex = i));
- }
- e(i), this.eachBuiltinLayer(function (t) {
- !t.__used && t.getElementCount() > 0 && (t.__dirty = !0, t.__startIndex = t.__endIndex = t.__drawIndex = 0), t.__dirty && t.__drawIndex < 0 && (t.__drawIndex = t.__startIndex);
- });
- },
- clear: function () {
- return this.eachBuiltinLayer(this._clearLayer), this;
- },
- _clearLayer: function (t) {
- t.clear();
- },
- setBackgroundColor: function (t) {
- this._backgroundColor = t;
- },
- configLayer: function (t, e) {
- if (e) {
- var i = this._layerConfig;
- i[t] ? r(i[t], e, !0) : i[t] = e;
- for (var n = 0; n < this._zlevelList.length; n++) {
- var a = this._zlevelList[n];
- if (a === t || a === t + mv) {
- var o = this._layers[a];
- r(o, i[t], !0);
- }
- }
- }
- },
- delLayer: function (t) {
- var e = this._layers,
- i = this._zlevelList,
- n = e[t];
- n && (n.dom.parentNode.removeChild(n.dom), delete e[t], i.splice(u(i, t), 1));
- },
- resize: function (t, e) {
- if (this._domRoot.style) {
- var i = this._domRoot;
- i.style.display = "none";
- var n = this._opts;
- if (null != t && (n.width = t), null != e && (n.height = e), t = this._getSize(0), e = this._getSize(1), i.style.display = "", this._width !== t || e !== this._height) {
- i.style.width = t + "px", i.style.height = e + "px";
- for (var r in this._layers) this._layers.hasOwnProperty(r) && this._layers[r].resize(t, e);
- f(this._progressiveLayers, function (i) {
- i.resize(t, e);
- }), this.refresh(!0);
- }
- this._width = t, this._height = e;
- } else {
- if (null == t || null == e) return;
- this._width = t, this._height = e, this.getLayer(gv).resize(t, e);
- }
- return this;
- },
- clearLayer: function (t) {
- var e = this._layers[t];
- e && e.clear();
- },
- dispose: function () {
- this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
- },
- getRenderedCanvas: function (t) {
- if (t = t || {}, this._singleCanvas && !this._compositeManually) return this._layers[gv].dom;
- var e = new $m("image", this, t.pixelRatio || this.dpr);
- if (e.initContext(), e.clear(!1, t.backgroundColor || this._backgroundColor), t.pixelRatio <= this.dpr) {
- this.refresh();
- var i = e.dom.width,
- n = e.dom.height,
- r = e.ctx;
- this.eachLayer(function (t) {
- t.__builtin__ ? r.drawImage(t.dom, 0, 0, i, n) : t.renderToCanvas && (e.ctx.save(), t.renderToCanvas(e.ctx), e.ctx.restore());
- });
- } else for (var a = {}, o = this.storage.getDisplayList(!0), s = 0; s < o.length; s++) {
- var l = o[s];
- this._doPaintEl(l, e, !0, a);
- }
- return e.dom;
- },
- getWidth: function () {
- return this._width;
- },
- getHeight: function () {
- return this._height;
- },
- _getSize: function (t) {
- var e = this._opts,
- i = ["width", "height"][t],
- n = ["clientWidth", "clientHeight"][t],
- r = ["paddingLeft", "paddingTop"][t],
- a = ["paddingRight", "paddingBottom"][t];
- if (null != e[i] && "auto" !== e[i]) return parseFloat(e[i]);
- var o = this.root,
- s = document.defaultView.getComputedStyle(o);
- return (o[n] || Mn(s[i]) || Mn(o.style[i])) - (Mn(s[r]) || 0) - (Mn(s[a]) || 0) | 0;
- },
- pathToImage: function (t, e) {
- e = e || this.dpr;
- var i = document.createElement("canvas"),
- n = i.getContext("2d"),
- r = t.getBoundingRect(),
- a = t.style,
- o = a.shadowBlur * e,
- s = a.shadowOffsetX * e,
- l = a.shadowOffsetY * e,
- u = a.hasStroke() ? a.lineWidth : 0,
- h = Math.max(u / 2, -s + o),
- c = Math.max(u / 2, s + o),
- d = Math.max(u / 2, -l + o),
- f = Math.max(u / 2, l + o),
- p = r.width + h + c,
- g = r.height + d + f;
- i.width = p * e, i.height = g * e, n.scale(e, e), n.clearRect(0, 0, p, g), n.dpr = e;
- var m = {
- position: t.position,
- rotation: t.rotation,
- scale: t.scale
- };
- t.position = [h - r.x, d - r.y], t.rotation = 0, t.scale = [1, 1], t.updateTransform(), t && t.brush(n);
- var v = Sn,
- y = new v({
- style: {
- x: 0,
- y: 0,
- image: i
- }
- });
- return null != m.position && (y.position = t.position = m.position), null != m.rotation && (y.rotation = t.rotation = m.rotation), null != m.scale && (y.scale = t.scale = m.scale), y;
- }
- };
- var wv = function (t) {
- t = t || {}, this.stage = t.stage || {}, this.onframe = t.onframe || function () {}, this._clips = [], this._running = !1, this._time, this._pausedTime, this._pauseStart, this._paused = !1, Yg.call(this);
- };
- wv.prototype = {
- constructor: wv,
- addClip: function (t) {
- this._clips.push(t);
- },
- addAnimator: function (t) {
- t.animation = this;
- for (var e = t.getClips(), i = 0; i < e.length; i++) this.addClip(e[i]);
- },
- removeClip: function (t) {
- var e = u(this._clips, t);
- e >= 0 && this._clips.splice(e, 1);
- },
- removeAnimator: function (t) {
- for (var e = t.getClips(), i = 0; i < e.length; i++) this.removeClip(e[i]);
- t.animation = null;
- },
- _update: function () {
- for (var t = new Date().getTime() - this._pausedTime, e = t - this._time, i = this._clips, n = i.length, r = [], a = [], o = 0; n > o; o++) {
- var s = i[o],
- l = s.step(t, e);
- l && (r.push(l), a.push(s));
- }
- for (var o = 0; n > o;) i[o]._needsRemove ? (i[o] = i[n - 1], i.pop(), n--) : o++;
- n = r.length;
- for (var o = 0; n > o; o++) a[o].fire(r[o]);
- this._time = t, this.onframe(e), this.trigger("frame", e), this.stage.update && this.stage.update();
- },
- _startLoop: function () {
- function t() {
- e._running && (Qm(t), !e._paused && e._update());
- }
- var e = this;
- this._running = !0, Qm(t);
- },
- start: function () {
- this._time = new Date().getTime(), this._pausedTime = 0, this._startLoop();
- },
- stop: function () {
- this._running = !1;
- },
- pause: function () {
- this._paused || (this._pauseStart = new Date().getTime(), this._paused = !0);
- },
- resume: function () {
- this._paused && (this._pausedTime += new Date().getTime() - this._pauseStart, this._paused = !1);
- },
- clear: function () {
- this._clips = [];
- },
- isFinished: function () {
- return !this._clips.length;
- },
- animate: function (t, e) {
- e = e || {};
- var i = new Tm(t, e.loop, e.getter, e.setter);
- return this.addAnimator(i), i;
- }
- }, c(wv, Yg);
- var bv = 300,
- Sv = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
- Mv = ["touchstart", "touchend", "touchmove"],
- Iv = {
- pointerdown: 1,
- pointerup: 1,
- pointermove: 1,
- pointerout: 1
- },
- Tv = p(Sv, function (t) {
- var e = t.replace("mouse", "pointer");
- return Iv[e] ? e : t;
- }),
- Cv = {
- mousemove: function (t) {
- t = ye(this.dom, t), this.trigger("mousemove", t);
- },
- mouseout: function (t) {
- t = ye(this.dom, t);
- var e = t.toElement || t.relatedTarget;
- if (e !== this.dom) for (; e && 9 !== e.nodeType;) {
- if (e === this.dom) return;
- e = e.parentNode;
- }
- this.trigger("mouseout", t);
- },
- touchstart: function (t) {
- t = ye(this.dom, t), t.zrByTouch = !0, this._lastTouchMoment = new Date(), this.handler.processGesture(t, "start"), Cv.mousemove.call(this, t), Cv.mousedown.call(this, t), Pn(this);
- },
- touchmove: function (t) {
- t = ye(this.dom, t), t.zrByTouch = !0, this.handler.processGesture(t, "change"), Cv.mousemove.call(this, t), Pn(this);
- },
- touchend: function (t) {
- t = ye(this.dom, t), t.zrByTouch = !0, this.handler.processGesture(t, "end"), Cv.mouseup.call(this, t), +new Date() - this._lastTouchMoment < bv && Cv.click.call(this, t), Pn(this);
- },
- pointerdown: function (t) {
- Cv.mousedown.call(this, t);
- },
- pointermove: function (t) {
- Ln(t) || Cv.mousemove.call(this, t);
- },
- pointerup: function (t) {
- Cv.mouseup.call(this, t);
- },
- pointerout: function (t) {
- Ln(t) || Cv.mouseout.call(this, t);
- }
- };
- f(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (t) {
- Cv[t] = function (e) {
- e = ye(this.dom, e), this.trigger(t, e);
- };
- });
- var Dv = zn.prototype;
- Dv.dispose = function () {
- for (var t = Sv.concat(Mv), e = 0; e < t.length; e++) {
- var i = t[e];
- xe(this.dom, kn(i), this._handlers[i]);
- }
- }, Dv.setCursor = function (t) {
- this.dom.style && (this.dom.style.cursor = t || "default");
- }, c(zn, Yg);
- var Av = !Mg.canvasSupported,
- kv = {
- canvas: xv
- },
- Pv = {},
- Lv = "4.1.2",
- Ov = function (t, e, i) {
- i = i || {}, this.dom = e, this.id = t;
- var n = this,
- r = new Gm(),
- a = i.renderer;
- if (Av) {
- if (!kv.vml) throw new Error("You need to require 'zrender/vml/vml' to support IE8");
- a = "vml";
- } else a && kv[a] || (a = "canvas");
- var o = new kv[a](e, r, i, t);
- this.storage = r, this.painter = o;
- var s = Mg.node || Mg.worker ? null : new zn(o.getViewportRoot());
- this.handler = new nm(r, o, s, o.root), this.animation = new wv({
- stage: {
- update: y(this.flush, this)
- }
- }), this.animation.start(), this._needsRefresh;
- var l = r.delFromStorage,
- u = r.addToStorage;
- r.delFromStorage = function (t) {
- l.call(r, t), t && t.removeSelfFromZr(n);
- }, r.addToStorage = function (t) {
- u.call(r, t), t.addSelfToZr(n);
- };
- };
- Ov.prototype = {
- constructor: Ov,
- getId: function () {
- return this.id;
- },
- add: function (t) {
- this.storage.addRoot(t), this._needsRefresh = !0;
- },
- remove: function (t) {
- this.storage.delRoot(t), this._needsRefresh = !0;
- },
- configLayer: function (t, e) {
- this.painter.configLayer && this.painter.configLayer(t, e), this._needsRefresh = !0;
- },
- setBackgroundColor: function (t) {
- this.painter.setBackgroundColor && this.painter.setBackgroundColor(t), this._needsRefresh = !0;
- },
- refreshImmediately: function () {
- this._needsRefresh = this._needsRefreshHover = !1, this.painter.refresh(), this._needsRefresh = this._needsRefreshHover = !1;
- },
- refresh: function () {
- this._needsRefresh = !0;
- },
- flush: function () {
- var t;
- this._needsRefresh && (t = !0, this.refreshImmediately()), this._needsRefreshHover && (t = !0, this.refreshHoverImmediately()), t && this.trigger("rendered");
- },
- addHover: function (t, e) {
- if (this.painter.addHover) {
- var i = this.painter.addHover(t, e);
- return this.refreshHover(), i;
- }
- },
- removeHover: function (t) {
- this.painter.removeHover && (this.painter.removeHover(t), this.refreshHover());
- },
- clearHover: function () {
- this.painter.clearHover && (this.painter.clearHover(), this.refreshHover());
- },
- refreshHover: function () {
- this._needsRefreshHover = !0;
- },
- refreshHoverImmediately: function () {
- this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.refreshHover();
- },
- resize: function (t) {
- t = t || {}, this.painter.resize(t.width, t.height), this.handler.resize();
- },
- clearAnimation: function () {
- this.animation.clear();
- },
- getWidth: function () {
- return this.painter.getWidth();
- },
- getHeight: function () {
- return this.painter.getHeight();
- },
- pathToImage: function (t, e) {
- return this.painter.pathToImage(t, e);
- },
- setCursorStyle: function (t) {
- this.handler.setCursorStyle(t);
- },
- findHover: function (t, e) {
- return this.handler.findHover(t, e);
- },
- on: function (t, e, i) {
- this.handler.on(t, e, i);
- },
- off: function (t, e) {
- this.handler.off(t, e);
- },
- trigger: function (t, e) {
- this.handler.trigger(t, e);
- },
- clear: function () {
- this.storage.delRoot(), this.painter.clear();
- },
- dispose: function () {
- this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, Fn(this.id);
- }
- };
- var zv = (Object.freeze || Object)({
- version: Lv,
- init: En,
- dispose: Rn,
- getInstance: Bn,
- registerPainter: Nn
- }),
- Ev = f,
- Rv = S,
- Bv = x,
- Nv = "series\x00",
- Fv = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"],
- Gv = 0,
- Vv = ".",
- Hv = "___EC__COMPONENT__CONTAINER___",
- Wv = 0,
- Uv = function (t) {
- for (var e = 0; e < t.length; e++) t[e][1] || (t[e][1] = t[e][0]);
- return function (e, i, n) {
- for (var r = {}, a = 0; a < t.length; a++) {
- var o = t[a][1];
- if (!(i && u(i, o) >= 0 || n && u(n, o) < 0)) {
- var s = e.getShallow(o);
- null != s && (r[t[a][0]] = s);
- }
- }
- return r;
- };
- },
- Xv = Uv([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]),
- Yv = {
- getLineStyle: function (t) {
- var e = Xv(this, t);
- return e.lineDash = this.getLineDash(e.lineWidth), e;
- },
- getLineDash: function (t) {
- null == t && (t = 1);
- var e = this.get("type"),
- i = Math.max(t, 2),
- n = 4 * t;
- return "solid" === e || null == e ? !1 : "dashed" === e ? [n, n] : [i, i];
- }
- },
- jv = Uv([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]),
- qv = {
- getAreaStyle: function (t, e) {
- return jv(this, t, e);
- }
- },
- Zv = Math.pow,
- Kv = Math.sqrt,
- $v = 1e-8,
- Qv = 1e-4,
- Jv = Kv(3),
- ty = 1 / 3,
- ey = V(),
- iy = V(),
- ny = V(),
- ry = Math.min,
- ay = Math.max,
- oy = Math.sin,
- sy = Math.cos,
- ly = 2 * Math.PI,
- uy = V(),
- hy = V(),
- cy = V(),
- dy = [],
- fy = [],
- py = {
- M: 1,
- L: 2,
- C: 3,
- Q: 4,
- A: 5,
- Z: 6,
- R: 7
- },
- gy = [],
- my = [],
- vy = [],
- yy = [],
- _y = Math.min,
- xy = Math.max,
- wy = Math.cos,
- by = Math.sin,
- Sy = Math.sqrt,
- My = Math.abs,
- Iy = "undefined" != typeof Float32Array,
- Ty = function (t) {
- this._saveData = !t, this._saveData && (this.data = []), this._ctx = null;
- };
- Ty.prototype = {
- constructor: Ty,
- _xi: 0,
- _yi: 0,
- _x0: 0,
- _y0: 0,
- _ux: 0,
- _uy: 0,
- _len: 0,
- _lineDash: null,
- _dashOffset: 0,
- _dashIdx: 0,
- _dashSum: 0,
- setScale: function (t, e, i) {
- i = i || 0, this._ux = My(i / Am / t) || 0, this._uy = My(i / Am / e) || 0;
- },
- getContext: function () {
- return this._ctx;
- },
- beginPath: function (t) {
- return this._ctx = t, t && t.beginPath(), t && (this.dpr = t.dpr), this._saveData && (this._len = 0), this._lineDash && (this._lineDash = null, this._dashOffset = 0), this;
- },
- moveTo: function (t, e) {
- return this.addData(py.M, t, e), this._ctx && this._ctx.moveTo(t, e), this._x0 = t, this._y0 = e, this._xi = t, this._yi = e, this;
- },
- lineTo: function (t, e) {
- var i = My(t - this._xi) > this._ux || My(e - this._yi) > this._uy || this._len < 5;
- return this.addData(py.L, t, e), this._ctx && i && (this._needsDash() ? this._dashedLineTo(t, e) : this._ctx.lineTo(t, e)), i && (this._xi = t, this._yi = e), this;
- },
- bezierCurveTo: function (t, e, i, n, r, a) {
- return this.addData(py.C, t, e, i, n, r, a), this._ctx && (this._needsDash() ? this._dashedBezierTo(t, e, i, n, r, a) : this._ctx.bezierCurveTo(t, e, i, n, r, a)), this._xi = r, this._yi = a, this;
- },
- quadraticCurveTo: function (t, e, i, n) {
- return this.addData(py.Q, t, e, i, n), this._ctx && (this._needsDash() ? this._dashedQuadraticTo(t, e, i, n) : this._ctx.quadraticCurveTo(t, e, i, n)), this._xi = i, this._yi = n, this;
- },
- arc: function (t, e, i, n, r, a) {
- return this.addData(py.A, t, e, i, i, n, r - n, 0, a ? 0 : 1), this._ctx && this._ctx.arc(t, e, i, n, r, a), this._xi = wy(r) * i + t, this._yi = by(r) * i + e, this;
- },
- arcTo: function (t, e, i, n, r) {
- return this._ctx && this._ctx.arcTo(t, e, i, n, r), this;
- },
- rect: function (t, e, i, n) {
- return this._ctx && this._ctx.rect(t, e, i, n), this.addData(py.R, t, e, i, n), this;
- },
- closePath: function () {
- this.addData(py.Z);
- var t = this._ctx,
- e = this._x0,
- i = this._y0;
- return t && (this._needsDash() && this._dashedLineTo(e, i), t.closePath()), this._xi = e, this._yi = i, this;
- },
- fill: function (t) {
- t && t.fill(), this.toStatic();
- },
- stroke: function (t) {
- t && t.stroke(), this.toStatic();
- },
- setLineDash: function (t) {
- if (t instanceof Array) {
- this._lineDash = t, this._dashIdx = 0;
- for (var e = 0, i = 0; i < t.length; i++) e += t[i];
- this._dashSum = e;
- }
- return this;
- },
- setLineDashOffset: function (t) {
- return this._dashOffset = t, this;
- },
- len: function () {
- return this._len;
- },
- setData: function (t) {
- var e = t.length;
- this.data && this.data.length === e || !Iy || (this.data = new Float32Array(e));
- for (var i = 0; e > i; i++) this.data[i] = t[i];
- this._len = e;
- },
- appendPath: function (t) {
- t instanceof Array || (t = [t]);
- for (var e = t.length, i = 0, n = this._len, r = 0; e > r; r++) i += t[r].len();
- Iy && this.data instanceof Float32Array && (this.data = new Float32Array(n + i));
- for (var r = 0; e > r; r++) for (var a = t[r].data, o = 0; o < a.length; o++) this.data[n++] = a[o];
- this._len = n;
- },
- addData: function (t) {
- if (this._saveData) {
- var e = this.data;
- this._len + arguments.length > e.length && (this._expandData(), e = this.data);
- for (var i = 0; i < arguments.length; i++) e[this._len++] = arguments[i];
- this._prevCmd = t;
- }
- },
- _expandData: function () {
- if (!(this.data instanceof Array)) {
- for (var t = [], e = 0; e < this._len; e++) t[e] = this.data[e];
- this.data = t;
- }
- },
- _needsDash: function () {
- return this._lineDash;
- },
- _dashedLineTo: function (t, e) {
- var i,
- n,
- r = this._dashSum,
- a = this._dashOffset,
- o = this._lineDash,
- s = this._ctx,
- l = this._xi,
- u = this._yi,
- h = t - l,
- c = e - u,
- d = Sy(h * h + c * c),
- f = l,
- p = u,
- g = o.length;
- for (h /= d, c /= d, 0 > a && (a = r + a), a %= r, f -= a * h, p -= a * c; h > 0 && t >= f || 0 > h && f >= t || 0 === h && (c > 0 && e >= p || 0 > c && p >= e);) n = this._dashIdx, i = o[n], f += h * i, p += c * i, this._dashIdx = (n + 1) % g, h > 0 && l > f || 0 > h && f > l || c > 0 && u > p || 0 > c && p > u || s[n % 2 ? "moveTo" : "lineTo"](h >= 0 ? _y(f, t) : xy(f, t), c >= 0 ? _y(p, e) : xy(p, e));
- h = f - t, c = p - e, this._dashOffset = -Sy(h * h + c * c);
- },
- _dashedBezierTo: function (t, e, i, n, r, a) {
- var o,
- s,
- l,
- u,
- h,
- c = this._dashSum,
- d = this._dashOffset,
- f = this._lineDash,
- p = this._ctx,
- g = this._xi,
- m = this._yi,
- v = hr,
- y = 0,
- _ = this._dashIdx,
- x = f.length,
- w = 0;
- for (0 > d && (d = c + d), d %= c, o = 0; 1 > o; o += .1) s = v(g, t, i, r, o + .1) - v(g, t, i, r, o), l = v(m, e, n, a, o + .1) - v(m, e, n, a, o), y += Sy(s * s + l * l);
- for (; x > _ && (w += f[_], !(w > d)); _++);
- for (o = (w - d) / y; 1 >= o;) u = v(g, t, i, r, o), h = v(m, e, n, a, o), _ % 2 ? p.moveTo(u, h) : p.lineTo(u, h), o += f[_] / y, _ = (_ + 1) % x;
- _ % 2 !== 0 && p.lineTo(r, a), s = r - u, l = a - h, this._dashOffset = -Sy(s * s + l * l);
- },
- _dashedQuadraticTo: function (t, e, i, n) {
- var r = i,
- a = n;
- i = (i + 2 * t) / 3, n = (n + 2 * e) / 3, t = (this._xi + 2 * t) / 3, e = (this._yi + 2 * e) / 3, this._dashedBezierTo(t, e, i, n, r, a);
- },
- toStatic: function () {
- var t = this.data;
- t instanceof Array && (t.length = this._len, Iy && (this.data = new Float32Array(t)));
- },
- getBoundingRect: function () {
- gy[0] = gy[1] = vy[0] = vy[1] = Number.MAX_VALUE, my[0] = my[1] = yy[0] = yy[1] = -Number.MAX_VALUE;
- for (var t = this.data, e = 0, i = 0, n = 0, r = 0, a = 0; a < t.length;) {
- var o = t[a++];
- switch (1 === a && (e = t[a], i = t[a + 1], n = e, r = i), o) {
- case py.M:
- n = t[a++], r = t[a++], e = n, i = r, vy[0] = n, vy[1] = r, yy[0] = n, yy[1] = r;
- break;
- case py.L:
- Sr(e, i, t[a], t[a + 1], vy, yy), e = t[a++], i = t[a++];
- break;
- case py.C:
- Mr(e, i, t[a++], t[a++], t[a++], t[a++], t[a], t[a + 1], vy, yy), e = t[a++], i = t[a++];
- break;
- case py.Q:
- Ir(e, i, t[a++], t[a++], t[a], t[a + 1], vy, yy), e = t[a++], i = t[a++];
- break;
- case py.A:
- var s = t[a++],
- l = t[a++],
- u = t[a++],
- h = t[a++],
- c = t[a++],
- d = t[a++] + c;
- a += 1;
- var f = 1 - t[a++];
- 1 === a && (n = wy(c) * u + s, r = by(c) * h + l), Tr(s, l, u, h, c, d, f, vy, yy), e = wy(d) * u + s, i = by(d) * h + l;
- break;
- case py.R:
- n = e = t[a++], r = i = t[a++];
- var p = t[a++],
- g = t[a++];
- Sr(n, r, n + p, r + g, vy, yy);
- break;
- case py.Z:
- e = n, i = r;
- }
- oe(gy, gy, vy), se(my, my, yy);
- }
- return 0 === a && (gy[0] = gy[1] = my[0] = my[1] = 0), new wi(gy[0], gy[1], my[0] - gy[0], my[1] - gy[1]);
- },
- rebuildPath: function (t) {
- for (var e, i, n, r, a, o, s = this.data, l = this._ux, u = this._uy, h = this._len, c = 0; h > c;) {
- var d = s[c++];
- switch (1 === c && (n = s[c], r = s[c + 1], e = n, i = r), d) {
- case py.M:
- e = n = s[c++], i = r = s[c++], t.moveTo(n, r);
- break;
- case py.L:
- a = s[c++], o = s[c++], (My(a - n) > l || My(o - r) > u || c === h - 1) && (t.lineTo(a, o), n = a, r = o);
- break;
- case py.C:
- t.bezierCurveTo(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], r = s[c - 1];
- break;
- case py.Q:
- t.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], r = s[c - 1];
- break;
- case py.A:
- var f = s[c++],
- p = s[c++],
- g = s[c++],
- m = s[c++],
- v = s[c++],
- y = s[c++],
- _ = s[c++],
- x = s[c++],
- w = g > m ? g : m,
- b = g > m ? 1 : g / m,
- S = g > m ? m / g : 1,
- M = Math.abs(g - m) > .001,
- I = v + y;
- M ? (t.translate(f, p), t.rotate(_), t.scale(b, S), t.arc(0, 0, w, v, I, 1 - x), t.scale(1 / b, 1 / S), t.rotate(-_), t.translate(-f, -p)) : t.arc(f, p, w, v, I, 1 - x), 1 === c && (e = wy(v) * g + f, i = by(v) * m + p), n = wy(I) * g + f, r = by(I) * m + p;
- break;
- case py.R:
- e = n = s[c], i = r = s[c + 1], t.rect(s[c++], s[c++], s[c++], s[c++]);
- break;
- case py.Z:
- t.closePath(), n = e, r = i;
- }
- }
- }
- }, Ty.CMD = py;
- var Cy = 2 * Math.PI,
- Dy = 2 * Math.PI,
- Ay = Ty.CMD,
- ky = 2 * Math.PI,
- Py = 1e-4,
- Ly = [-1, -1, -1],
- Oy = [-1, -1],
- zy = Km.prototype.getCanvasPattern,
- Ey = Math.abs,
- Ry = new Ty(!0);
- // #ifdef MP-WEIXIN
- this.$scope.animate("shape",t)
- // #endif
- // #ifndef MP-WEIXIN
- Vr.prototype = {
- constructor: Vr,
- type: "path",
- __dirtyPath: !0,
- strokeContainThreshold: 5,
- segmentIgnoreThreshold: 0,
- subPixelOptimize: !1,
- brush: function (t, e) {
- var i = this.style,
- n = this.path || Ry,
- r = i.hasStroke(),
- a = i.hasFill(),
- o = i.fill,
- s = i.stroke,
- l = a && !!o.colorStops,
- u = r && !!s.colorStops,
- h = a && !!o.image,
- c = r && !!s.image;
- if (i.bind(t, this, e), this.setTransform(t), this.__dirty) {
- var d;
- l && (d = d || this.getBoundingRect(), this._fillGradient = i.getGradient(t, o, d)), u && (d = d || this.getBoundingRect(), this._strokeGradient = i.getGradient(t, s, d));
- }
- l ? t.fillStyle = this._fillGradient : h && (t.fillStyle = zy.call(o, t)), u ? t.strokeStyle = this._strokeGradient : c && (t.strokeStyle = zy.call(s, t));
- var f = i.lineDash,
- p = i.lineDashOffset,
- g = !!t.setLineDash,
- m = this.getGlobalScale();
- if (n.setScale(m[0], m[1], this.segmentIgnoreThreshold), this.__dirtyPath || f && !g && r ? (n.beginPath(t), f && !g && (n.setLineDash(f), n.setLineDashOffset(p)), this.buildPath(n, this.shape, !1), this.path && (this.__dirtyPath = !1)) : (t.beginPath(), this.path.rebuildPath(t)), a) if (null != i.fillOpacity) {
- var v = t.globalAlpha;
- t.globalAlpha = i.fillOpacity * i.opacity, n.fill(t), t.globalAlpha = v;
- } else n.fill(t);
- if (f && g && (t.setLineDash(f), t.lineDashOffset = p), r) if (null != i.strokeOpacity) {
- var v = t.globalAlpha;
- t.globalAlpha = i.strokeOpacity * i.opacity, n.stroke(t), t.globalAlpha = v;
- } else n.stroke(t);
- f && g && t.setLineDash([]), null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect()));
- },
- buildPath: function () {},
- createPathProxy: function () {
- this.path = new Ty();
- },
- getBoundingRect: function () {
- var t = this._rect,
- e = this.style,
- i = !t;
- if (i) {
- var n = this.path;
- n || (n = this.path = new Ty()), this.__dirtyPath && (n.beginPath(), this.buildPath(n, this.shape, !1)), t = n.getBoundingRect();
- }
- if (this._rect = t, e.hasStroke()) {
- var r = this._rectWithStroke || (this._rectWithStroke = t.clone());
- if (this.__dirty || i) {
- r.copy(t);
- var a = e.lineWidth,
- o = e.strokeNoScale ? this.getLineScale() : 1;
- e.hasFill() || (a = Math.max(a, this.strokeContainThreshold || 4)), o > 1e-10 && (r.width += a / o, r.height += a / o, r.x -= a / o / 2, r.y -= a / o / 2);
- }
- return r;
- }
- return t;
- },
- contain: function (t, e) {
- var i = this.transformCoordToLocal(t, e),
- n = this.getBoundingRect(),
- r = this.style;
- if (t = i[0], e = i[1], n.contain(t, e)) {
- var a = this.path.data;
- if (r.hasStroke()) {
- var o = r.lineWidth,
- s = r.strokeNoScale ? this.getLineScale() : 1;
- if (s > 1e-10 && (r.hasFill() || (o = Math.max(o, this.strokeContainThreshold)), Gr(a, o / s, t, e))) return !0;
- }
- if (r.hasFill()) return Fr(a, t, e);
- }
- return !1;
- },
- dirty: function (t) {
- null == t && (t = !0), t && (this.__dirtyPath = t, this._rect = null), this.__dirty = this.__dirtyText = !0, this.__zr && this.__zr.refresh(), this.__clipTarget && this.__clipTarget.dirty();
- },
- animateShape: function (t) {
- return this.animate("shape", t);
- },
- attrKV: function (t, e) {
- "shape" === t ? (this.setShape(e), this.__dirtyPath = !0, this._rect = null) : bn.prototype.attrKV.call(this, t, e);
- },
- setShape: function (t, e) {
- var i = this.shape;
- if (i) {
- if (S(t)) for (var n in t) t.hasOwnProperty(n) && (i[n] = t[n]);else i[t] = e;
- this.dirty(!0);
- }
- return this;
- },
- getLineScale: function () {
- var t = this.transform;
- return t && Ey(t[0] - 1) > 1e-10 && Ey(t[3] - 1) > 1e-10 ? Math.sqrt(Ey(t[0] * t[3] - t[2] * t[1])) : 1;
- }
- }, Vr.extend = function (t) {
- var e = function (e) {
- Vr.call(this, e), t.style && this.style.extendFrom(t.style, !1);
- var i = t.shape;
- if (i) {
- this.shape = this.shape || {};
- var n = this.shape;
- for (var r in i) !n.hasOwnProperty(r) && i.hasOwnProperty(r) && (n[r] = i[r]);
- }
- t.init && t.init.call(this, e);
- };
- h(e, Vr);
- for (var i in t) "style" !== i && "shape" !== i && (e.prototype[i] = t[i]);
- return e;
- }, h(Vr, bn);
- // #endif
- var By = Ty.CMD,
- Ny = [[], [], []],
- Fy = Math.sqrt,
- Gy = Math.atan2,
- Vy = function (t, e) {
- var i,
- n,
- r,
- a,
- o,
- s,
- l = t.data,
- u = By.M,
- h = By.C,
- c = By.L,
- d = By.R,
- f = By.A,
- p = By.Q;
- for (r = 0, a = 0; r < l.length;) {
- switch (i = l[r++], a = r, n = 0, i) {
- case u:
- n = 1;
- break;
- case c:
- n = 1;
- break;
- case h:
- n = 3;
- break;
- case p:
- n = 2;
- break;
- case f:
- var g = e[4],
- m = e[5],
- v = Fy(e[0] * e[0] + e[1] * e[1]),
- y = Fy(e[2] * e[2] + e[3] * e[3]),
- _ = Gy(-e[1] / y, e[0] / v);
- l[r] *= v, l[r++] += g, l[r] *= y, l[r++] += m, l[r++] *= v, l[r++] *= y, l[r++] += _, l[r++] += _, r += 2, a = r;
- break;
- case d:
- s[0] = l[r++], s[1] = l[r++], ae(s, s, e), l[a++] = s[0], l[a++] = s[1], s[0] += l[r++], s[1] += l[r++], ae(s, s, e), l[a++] = s[0], l[a++] = s[1];
- }
- for (o = 0; n > o; o++) {
- var s = Ny[o];
- s[0] = l[r++], s[1] = l[r++], ae(s, s, e), l[a++] = s[0], l[a++] = s[1];
- }
- }
- },
- Hy = Math.sqrt,
- Wy = Math.sin,
- Uy = Math.cos,
- Xy = Math.PI,
- Yy = function (t) {
- return Math.sqrt(t[0] * t[0] + t[1] * t[1]);
- },
- jy = function (t, e) {
- return (t[0] * e[0] + t[1] * e[1]) / (Yy(t) * Yy(e));
- },
- qy = function (t, e) {
- return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(jy(t, e));
- },
- Zy = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,
- Ky = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,
- $y = function (t) {
- bn.call(this, t);
- };
- $y.prototype = {
- constructor: $y,
- type: "text",
- brush: function (t, e) {
- var i = this.style;
- this.__dirty && rn(i, !0), i.fill = i.stroke = i.shadowBlur = i.shadowColor = i.shadowOffsetX = i.shadowOffsetY = null;
- var n = i.text;
- return null != n && (n += ""), wn(n, i) ? (this.setTransform(t), on(this, t, n, i, null, e), void this.restoreTransform(t)) : void (t.__attrCachedBy = Wm.NONE);
- },
- getBoundingRect: function () {
- var t = this.style;
- if (this.__dirty && rn(t, !0), !this._rect) {
- var e = t.text;
- null != e ? e += "" : e = "";
- var i = Gi(t.text + "", t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.textLineHeight, t.rich);
- if (i.x += t.x || 0, i.y += t.y || 0, vn(t.textStroke, t.textStrokeWidth)) {
- var n = t.textStrokeWidth;
- i.x -= n / 2, i.y -= n / 2, i.width += n, i.height += n;
- }
- this._rect = i;
- }
- return this._rect;
- }
- }, h($y, bn);
- var Qy = Vr.extend({
- type: "circle",
- shape: {
- cx: 0,
- cy: 0,
- r: 0
- },
- buildPath: function (t, e, i) {
- i && t.moveTo(e.cx + e.r, e.cy), t.arc(e.cx, e.cy, e.r, 0, 2 * Math.PI, !0);
- }
- }),
- Jy = [["shadowBlur", 0], ["shadowColor", "#000"], ["shadowOffsetX", 0], ["shadowOffsetY", 0]],
- t_ = function (t) {
- return Mg.browser.ie && Mg.browser.version >= 11 ? function () {
- var e,
- i = this.__clipPaths,
- n = this.style;
- if (i) for (var r = 0; r < i.length; r++) {
- var a = i[r],
- o = a && a.shape,
- s = a && a.type;
- if (o && ("sector" === s && o.startAngle === o.endAngle || "rect" === s && (!o.width || !o.height))) {
- for (var l = 0; l < Jy.length; l++) Jy[l][2] = n[Jy[l][0]], n[Jy[l][0]] = Jy[l][1];
- e = !0;
- break;
- }
- }
- if (t.apply(this, arguments), e) for (var l = 0; l < Jy.length; l++) n[Jy[l][0]] = Jy[l][2];
- } : t;
- },
- e_ = Vr.extend({
- type: "sector",
- shape: {
- cx: 0,
- cy: 0,
- r0: 0,
- r: 0,
- startAngle: 0,
- endAngle: 2 * Math.PI,
- clockwise: !0
- },
- brush: t_(Vr.prototype.brush),
- buildPath: function (t, e) {
- var i = e.cx,
- n = e.cy,
- r = Math.max(e.r0 || 0, 0),
- a = Math.max(e.r, 0),
- o = e.startAngle,
- s = e.endAngle,
- l = e.clockwise,
- u = Math.cos(o),
- h = Math.sin(o);
- t.moveTo(u * r + i, h * r + n), t.lineTo(u * a + i, h * a + n), t.arc(i, n, a, o, s, !l), t.lineTo(Math.cos(s) * r + i, Math.sin(s) * r + n), 0 !== r && t.arc(i, n, r, s, o, l), t.closePath();
- }
- }),
- i_ = Vr.extend({
- type: "ring",
- shape: {
- cx: 0,
- cy: 0,
- r: 0,
- r0: 0
- },
- buildPath: function (t, e) {
- var i = e.cx,
- n = e.cy,
- r = 2 * Math.PI;
- t.moveTo(i + e.r, n), t.arc(i, n, e.r, 0, r, !1), t.moveTo(i + e.r0, n), t.arc(i, n, e.r0, 0, r, !0);
- }
- }),
- n_ = function (t, e) {
- for (var i = t.length, n = [], r = 0, a = 1; i > a; a++) r += ee(t[a - 1], t[a]);
- var o = r / 2;
- o = i > o ? i : o;
- for (var a = 0; o > a; a++) {
- var s,
- l,
- u,
- h = a / (o - 1) * (e ? i : i - 1),
- c = Math.floor(h),
- d = h - c,
- f = t[c % i];
- e ? (s = t[(c - 1 + i) % i], l = t[(c + 1) % i], u = t[(c + 2) % i]) : (s = t[0 === c ? c : c - 1], l = t[c > i - 2 ? i - 1 : c + 1], u = t[c > i - 3 ? i - 1 : c + 2]);
- var p = d * d,
- g = d * p;
- n.push([qr(s[0], f[0], l[0], u[0], d, p, g), qr(s[1], f[1], l[1], u[1], d, p, g)]);
- }
- return n;
- },
- r_ = function (t, e, i, n) {
- var r,
- a,
- o,
- s,
- l = [],
- u = [],
- h = [],
- c = [];
- if (n) {
- o = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0];
- for (var d = 0, f = t.length; f > d; d++) oe(o, o, t[d]), se(s, s, t[d]);
- oe(o, o, n[0]), se(s, s, n[1]);
- }
- for (var d = 0, f = t.length; f > d; d++) {
- var p = t[d];
- if (i) r = t[d ? d - 1 : f - 1], a = t[(d + 1) % f];else {
- if (0 === d || d === f - 1) {
- l.push(W(t[d]));
- continue;
- }
- r = t[d - 1], a = t[d + 1];
- }
- j(u, a, r), J(u, u, e);
- var g = ee(p, r),
- m = ee(p, a),
- v = g + m;
- 0 !== v && (g /= v, m /= v), J(h, u, -g), J(c, u, m);
- var y = X([], p, h),
- _ = X([], p, c);
- n && (se(y, y, o), oe(y, y, s), se(_, _, o), oe(_, _, s)), l.push(y), l.push(_);
- }
- return i && l.push(l.shift()), l;
- },
- a_ = Vr.extend({
- type: "polygon",
- shape: {
- points: null,
- smooth: !1,
- smoothConstraint: null
- },
- buildPath: function (t, e) {
- Zr(t, e, !0);
- }
- }),
- o_ = Vr.extend({
- type: "polyline",
- shape: {
- points: null,
- smooth: !1,
- smoothConstraint: null
- },
- style: {
- stroke: "#000",
- fill: null
- },
- buildPath: function (t, e) {
- Zr(t, e, !1);
- }
- }),
- s_ = Math.round,
- l_ = {},
- u_ = Vr.extend({
- type: "rect",
- shape: {
- r: 0,
- x: 0,
- y: 0,
- width: 0,
- height: 0
- },
- buildPath: function (t, e) {
- var i, n, r, a;
- this.subPixelOptimize ? ($r(l_, e, this.style), i = l_.x, n = l_.y, r = l_.width, a = l_.height, l_.r = e.r, e = l_) : (i = e.x, n = e.y, r = e.width, a = e.height), e.r ? nn(t, e) : t.rect(i, n, r, a), t.closePath();
- }
- }),
- h_ = {},
- c_ = Vr.extend({
- type: "line",
- shape: {
- x1: 0,
- y1: 0,
- x2: 0,
- y2: 0,
- percent: 1
- },
- style: {
- stroke: "#000",
- fill: null
- },
- buildPath: function (t, e) {
- var i, n, r, a;
- this.subPixelOptimize ? (Kr(h_, e, this.style), i = h_.x1, n = h_.y1, r = h_.x2, a = h_.y2) : (i = e.x1, n = e.y1, r = e.x2, a = e.y2);
- var o = e.percent;
- 0 !== o && (t.moveTo(i, n), 1 > o && (r = i * (1 - o) + r * o, a = n * (1 - o) + a * o), t.lineTo(r, a));
- },
- pointAt: function (t) {
- var e = this.shape;
- return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t];
- }
- }),
- d_ = [],
- f_ = Vr.extend({
- type: "bezier-curve",
- shape: {
- x1: 0,
- y1: 0,
- x2: 0,
- y2: 0,
- cpx1: 0,
- cpy1: 0,
- percent: 1
- },
- style: {
- stroke: "#000",
- fill: null
- },
- buildPath: function (t, e) {
- var i = e.x1,
- n = e.y1,
- r = e.x2,
- a = e.y2,
- o = e.cpx1,
- s = e.cpy1,
- l = e.cpx2,
- u = e.cpy2,
- h = e.percent;
- 0 !== h && (t.moveTo(i, n), null == l || null == u ? (1 > h && (xr(i, o, r, h, d_), o = d_[1], r = d_[2], xr(n, s, a, h, d_), s = d_[1], a = d_[2]), t.quadraticCurveTo(o, s, r, a)) : (1 > h && (pr(i, o, l, r, h, d_), o = d_[1], l = d_[2], r = d_[3], pr(n, s, u, a, h, d_), s = d_[1], u = d_[2], a = d_[3]), t.bezierCurveTo(o, s, l, u, r, a)));
- },
- pointAt: function (t) {
- return Jr(this.shape, t, !1);
- },
- tangentAt: function (t) {
- var e = Jr(this.shape, t, !0);
- return te(e, e);
- }
- }),
- p_ = Vr.extend({
- type: "arc",
- shape: {
- cx: 0,
- cy: 0,
- r: 0,
- startAngle: 0,
- endAngle: 2 * Math.PI,
- clockwise: !0
- },
- style: {
- stroke: "#000",
- fill: null
- },
- buildPath: function (t, e) {
- var i = e.cx,
- n = e.cy,
- r = Math.max(e.r, 0),
- a = e.startAngle,
- o = e.endAngle,
- s = e.clockwise,
- l = Math.cos(a),
- u = Math.sin(a);
- t.moveTo(l * r + i, u * r + n), t.arc(i, n, r, a, o, !s);
- }
- }),
- g_ = Vr.extend({
- type: "compound",
- shape: {
- paths: null
- },
- _updatePathDirty: function () {
- for (var t = this.__dirtyPath, e = this.shape.paths, i = 0; i < e.length; i++) t = t || e[i].__dirtyPath;
- this.__dirtyPath = t, this.__dirty = this.__dirty || t;
- },
- beforeBrush: function () {
- this._updatePathDirty();
- for (var t = this.shape.paths || [], e = this.getGlobalScale(), i = 0; i < t.length; i++) t[i].path || t[i].createPathProxy(), t[i].path.setScale(e[0], e[1], t[i].segmentIgnoreThreshold);
- },
- buildPath: function (t, e) {
- for (var i = e.paths || [], n = 0; n < i.length; n++) i[n].buildPath(t, i[n].shape, !0);
- },
- afterBrush: function () {
- for (var t = this.shape.paths || [], e = 0; e < t.length; e++) t[e].__dirtyPath = !1;
- },
- getBoundingRect: function () {
- return this._updatePathDirty(), Vr.prototype.getBoundingRect.call(this);
- }
- }),
- m_ = function (t) {
- this.colorStops = t || [];
- };
- m_.prototype = {
- constructor: m_,
- addColorStop: function (t, e) {
- this.colorStops.push({
- offset: t,
- color: e
- });
- }
- };
- var v_ = function (t, e, i, n, r, a) {
- this.x = null == t ? 0 : t, this.y = null == e ? 0 : e, this.x2 = null == i ? 1 : i, this.y2 = null == n ? 0 : n, this.type = "linear", this.global = a || !1, m_.call(this, r);
- };
- v_.prototype = {
- constructor: v_
- }, h(v_, m_);
- var y_ = function (t, e, i, n, r) {
- this.x = null == t ? .5 : t, this.y = null == e ? .5 : e, this.r = null == i ? .5 : i, this.type = "radial", this.global = r || !1, m_.call(this, n);
- };
- y_.prototype = {
- constructor: y_
- }, h(y_, m_), ta.prototype.incremental = !0, ta.prototype.clearDisplaybles = function () {
- this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.dirty(), this.notClear = !1;
- }, ta.prototype.addDisplayable = function (t, e) {
- e ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.dirty();
- }, ta.prototype.addDisplayables = function (t, e) {
- e = e || !1;
- for (var i = 0; i < t.length; i++) this.addDisplayable(t[i], e);
- }, ta.prototype.eachPendingDisplayable = function (t) {
- for (var e = this._cursor; e < this._displayables.length; e++) t && t(this._displayables[e]);
- for (var e = 0; e < this._temporaryDisplayables.length; e++) t && t(this._temporaryDisplayables[e]);
- }, ta.prototype.update = function () {
- this.updateTransform();
- for (var t = this._cursor; t < this._displayables.length; t++) {
- var e = this._displayables[t];
- e.parent = this, e.update(), e.parent = null;
- }
- for (var t = 0; t < this._temporaryDisplayables.length; t++) {
- var e = this._temporaryDisplayables[t];
- e.parent = this, e.update(), e.parent = null;
- }
- }, ta.prototype.brush = function (t) {
- for (var e = this._cursor; e < this._displayables.length; e++) {
- var i = this._displayables[e];
- i.beforeBrush && i.beforeBrush(t), i.brush(t, e === this._cursor ? null : this._displayables[e - 1]), i.afterBrush && i.afterBrush(t);
- }
- this._cursor = e;
- for (var e = 0; e < this._temporaryDisplayables.length; e++) {
- var i = this._temporaryDisplayables[e];
- i.beforeBrush && i.beforeBrush(t), i.brush(t, 0 === e ? null : this._temporaryDisplayables[e - 1]), i.afterBrush && i.afterBrush(t);
- }
- this._temporaryDisplayables = [], this.notClear = !0;
- };
- var __ = [];
- ta.prototype.getBoundingRect = function () {
- if (!this._rect) {
- for (var t = new wi(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0; e < this._displayables.length; e++) {
- var i = this._displayables[e],
- n = i.getBoundingRect().clone();
- i.needLocalTransform() && n.applyTransform(i.getLocalTransform(__)), t.union(n);
- }
- this._rect = t;
- }
- return this._rect;
- }, ta.prototype.contain = function (t, e) {
- var i = this.transformCoordToLocal(t, e),
- n = this.getBoundingRect();
- if (n.contain(i[0], i[1])) for (var r = 0; r < this._displayables.length; r++) {
- var a = this._displayables[r];
- if (a.contain(t, e)) return !0;
- }
- return !1;
- }, h(ta, bn);
- var x_ = Math.max,
- w_ = Math.min,
- b_ = {},
- S_ = 1,
- M_ = {
- color: "textFill",
- textBorderColor: "textStroke",
- textBorderWidth: "textStrokeWidth"
- },
- I_ = "emphasis",
- T_ = "normal",
- C_ = 1,
- D_ = {},
- A_ = {},
- k_ = jr,
- P_ = Qr,
- L_ = N(),
- O_ = 0;
- na("circle", Qy), na("sector", e_), na("ring", i_), na("polygon", a_), na("polyline", o_), na("rect", u_), na("line", c_), na("bezierCurve", f_), na("arc", p_);
- var z_ = (Object.freeze || Object)({
- Z2_EMPHASIS_LIFT: S_,
- CACHED_LABEL_STYLE_PROPERTIES: M_,
- extendShape: ea,
- extendPath: ia,
- registerShape: na,
- getShapeClass: ra,
- makePath: aa,
- makeImage: oa,
- mergePath: k_,
- resizePath: la,
- subPixelOptimizeLine: ua,
- subPixelOptimizeRect: ha,
- subPixelOptimize: P_,
- setElementHoverStyle: ya,
- setHoverStyle: Ma,
- setAsHighDownDispatcher: Ia,
- isHighDownDispatcher: Ta,
- getHighlightDigit: Ca,
- setLabelStyle: Da,
- modifyLabelStyle: Aa,
- setTextStyle: ka,
- setText: Pa,
- getFont: Na,
- updateProps: Ga,
- initProps: Va,
- getTransform: Ha,
- applyTransform: Wa,
- transformDirection: Ua,
- groupTransition: Xa,
- clipPointsByRect: Ya,
- clipRectByRect: ja,
- createIcon: qa,
- linePolygonIntersect: Za,
- lineLineIntersect: Ka,
- Group: Bm,
- Image: Sn,
- Text: $y,
- Circle: Qy,
- Sector: e_,
- Ring: i_,
- Polygon: a_,
- Polyline: o_,
- Rect: u_,
- Line: c_,
- BezierCurve: f_,
- Arc: p_,
- IncrementalDisplayable: ta,
- CompoundPath: g_,
- LinearGradient: v_,
- RadialGradient: y_,
- BoundingRect: wi
- }),
- E_ = ["textStyle", "color"],
- R_ = {
- getTextColor: function (t) {
- var e = this.ecModel;
- return this.getShallow("color") || (!t && e ? e.get(E_) : null);
- },
- getFont: function () {
- return Na({
- fontStyle: this.getShallow("fontStyle"),
- fontWeight: this.getShallow("fontWeight"),
- fontSize: this.getShallow("fontSize"),
- fontFamily: this.getShallow("fontFamily")
- }, this.ecModel);
- },
- getTextRect: function (t) {
- return Gi(t, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow("baseline"), this.getShallow("padding"), this.getShallow("lineHeight"), this.getShallow("rich"), this.getShallow("truncateText"));
- }
- },
- B_ = Uv([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]]),
- N_ = {
- getItemStyle: function (t, e) {
- var i = B_(this, t, e),
- n = this.getBorderLineDash();
- return n && (i.lineDash = n), i;
- },
- getBorderLineDash: function () {
- var t = this.get("borderType");
- return "solid" === t || null == t ? null : "dashed" === t ? [5, 5] : [1, 1];
- }
- },
- F_ = c,
- G_ = Zn();
- Ja.prototype = {
- constructor: Ja,
- init: null,
- mergeOption: function (t) {
- r(this.option, t, !0);
- },
- get: function (t, e) {
- return null == t ? this.option : to(this.option, this.parsePath(t), !e && eo(this, t));
- },
- getShallow: function (t, e) {
- var i = this.option,
- n = null == i ? i : i[t],
- r = !e && eo(this, t);
- return null == n && r && (n = r.getShallow(t)), n;
- },
- getModel: function (t, e) {
- var i,
- n = null == t ? this.option : to(this.option, t = this.parsePath(t));
- return e = e || (i = eo(this, t)) && i.getModel(t), new Ja(n, e, this.ecModel);
- },
- isEmpty: function () {
- return null == this.option;
- },
- restoreData: function () {},
- clone: function () {
- var t = this.constructor;
- return new t(n(this.option));
- },
- setReadOnly: function () {},
- parsePath: function (t) {
- return "string" == typeof t && (t = t.split(".")), t;
- },
- customizeGetParent: function (t) {
- G_(this).getParent = t;
- },
- isAnimationEnabled: function () {
- if (!Mg.node) {
- if (null != this.option.animation) return !!this.option.animation;
- if (this.parentModel) return this.parentModel.isAnimationEnabled();
- }
- }
- }, nr(Ja), rr(Ja), F_(Ja, Yv), F_(Ja, qv), F_(Ja, R_), F_(Ja, N_);
- var V_ = 0,
- H_ = 1e-4,
- W_ = 9007199254740991,
- U_ = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,
- X_ = (Object.freeze || Object)({
- linearMap: oo,
- parsePercent: so,
- round: lo,
- asc: uo,
- getPrecision: ho,
- getPrecisionSafe: co,
- getPixelPrecision: fo,
- getPercentWithPrecision: po,
- MAX_SAFE_INTEGER: W_,
- remRadian: go,
- isRadianAroundZero: mo,
- parseDate: vo,
- quantity: yo,
- quantityExponent: _o,
- nice: xo,
- quantile: wo,
- reformIntervals: bo,
- isNumeric: So
- }),
- Y_ = L,
- j_ = /([&<>"'])/g,
- q_ = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'"
- },
- Z_ = ["a", "b", "c", "d", "e", "f", "g"],
- K_ = function (t, e) {
- return "{" + t + (null == e ? "" : e) + "}";
- },
- $_ = Yi,
- Q_ = (Object.freeze || Object)({
- addCommas: Mo,
- toCamelCase: Io,
- normalizeCssArray: Y_,
- encodeHTML: To,
- formatTpl: Co,
- formatTplSimple: Do,
- getTooltipMarker: Ao,
- formatTime: Po,
- capitalFirst: Lo,
- truncateText: $_,
- getTextBoundingRect: Oo,
- getTextRect: zo
- }),
- J_ = f,
- tx = ["left", "right", "top", "bottom", "width", "height"],
- ex = [["width", "left", "right"], ["height", "top", "bottom"]],
- ix = Eo,
- nx = (_(Eo, "vertical"), _(Eo, "horizontal"), {
- getBoxLayoutParams: function () {
- return {
- left: this.get("left"),
- top: this.get("top"),
- right: this.get("right"),
- bottom: this.get("bottom"),
- width: this.get("width"),
- height: this.get("height")
- };
- }
- }),
- rx = Zn(),
- ax = Ja.extend({
- type: "component",
- id: "",
- name: "",
- mainType: "",
- subType: "",
- componentIndex: 0,
- defaultOption: null,
- ecModel: null,
- dependentModels: [],
- uid: null,
- layoutMode: null,
- $constructor: function (t, e, i, n) {
- Ja.call(this, t, e, i, n), this.uid = io("ec_cpt_model");
- },
- init: function (t, e, i) {
- this.mergeDefaultAndTheme(t, i);
- },
- mergeDefaultAndTheme: function (t, e) {
- var i = this.layoutMode,
- n = i ? No(t) : {},
- a = e.getTheme();
- r(t, a.get(this.mainType)), r(t, this.getDefaultOption()), i && Bo(t, n, i);
- },
- mergeOption: function (t) {
- r(this.option, t, !0);
- var e = this.layoutMode;
- e && Bo(this.option, t, e);
- },
- optionUpdated: function () {},
- getDefaultOption: function () {
- var t = rx(this);
- if (!t.defaultOption) {
- for (var e = [], i = this.constructor; i;) {
- var n = i.prototype.defaultOption;
- n && e.push(n), i = i.superClass;
- }
- for (var a = {}, o = e.length - 1; o >= 0; o--) a = r(a, e[o], !0);
- t.defaultOption = a;
- }
- return t.defaultOption;
- },
- getReferringComponents: function (t) {
- return this.ecModel.queryComponents({
- mainType: t,
- index: this.get(t + "Index", !0),
- id: this.get(t + "Id", !0)
- });
- }
- });
- sr(ax, {
- registerWhenExtend: !0
- }), no(ax), ro(ax, Go), c(ax, nx);
- var ox = "";
- "undefined" != typeof navigator && (ox = navigator.platform || "");
- var sx = {
- color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3"],
- gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
- textStyle: {
- fontFamily: ox.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
- fontSize: 12,
- fontStyle: "normal",
- fontWeight: "normal"
- },
- blendMode: null,
- animation: "auto",
- animationDuration: 1e3,
- animationDurationUpdate: 300,
- animationEasing: "exponentialOut",
- animationEasingUpdate: "cubicOut",
- animationThreshold: 2e3,
- progressiveThreshold: 3e3,
- progressive: 400,
- hoverLayerThreshold: 3e3,
- useUTC: !1
- },
- lx = Zn(),
- ux = {
- clearColorPalette: function () {
- lx(this).colorIdx = 0, lx(this).colorNameMap = {};
- },
- getColorFromPalette: function (t, e, i) {
- e = e || this;
- var n = lx(e),
- r = n.colorIdx || 0,
- a = n.colorNameMap = n.colorNameMap || {};
- if (a.hasOwnProperty(t)) return a[t];
- var o = Gn(this.get("color", !0)),
- s = this.get("colorLayer", !0),
- l = null != i && s ? Vo(s, i) : o;
- if (l = l || o, l && l.length) {
- var u = l[r];
- return t && (a[t] = u), n.colorIdx = (r + 1) % l.length, u;
- }
- }
- },
- hx = {
- cartesian2d: function (t, e, i, n) {
- var r = t.getReferringComponents("xAxis")[0],
- a = t.getReferringComponents("yAxis")[0];
- e.coordSysDims = ["x", "y"], i.set("x", r), i.set("y", a), Wo(r) && (n.set("x", r), e.firstCategoryDimIndex = 0), Wo(a) && (n.set("y", a), e.firstCategoryDimIndex = 1);
- },
- singleAxis: function (t, e, i, n) {
- var r = t.getReferringComponents("singleAxis")[0];
- e.coordSysDims = ["single"], i.set("single", r), Wo(r) && (n.set("single", r), e.firstCategoryDimIndex = 0);
- },
- polar: function (t, e, i, n) {
- var r = t.getReferringComponents("polar")[0],
- a = r.findAxisModel("radiusAxis"),
- o = r.findAxisModel("angleAxis");
- e.coordSysDims = ["radius", "angle"], i.set("radius", a), i.set("angle", o), Wo(a) && (n.set("radius", a), e.firstCategoryDimIndex = 0), Wo(o) && (n.set("angle", o), e.firstCategoryDimIndex = 1);
- },
- geo: function (t, e) {
- e.coordSysDims = ["lng", "lat"];
- },
- parallel: function (t, e, i, n) {
- var r = t.ecModel,
- a = r.getComponent("parallel", t.get("parallelIndex")),
- o = e.coordSysDims = a.dimensions.slice();
- f(a.parallelAxisIndex, function (t, a) {
- var s = r.getComponent("parallelAxis", t),
- l = o[a];
- i.set(l, s), Wo(s) && null == e.firstCategoryDimIndex && (n.set(l, s), e.firstCategoryDimIndex = a);
- });
- }
- },
- cx = "original",
- dx = "arrayRows",
- fx = "objectRows",
- px = "keyedColumns",
- gx = "unknown",
- mx = "typedArray",
- vx = "column",
- yx = "row";
- Uo.seriesDataToSource = function (t) {
- return new Uo({
- data: t,
- sourceFormat: I(t) ? mx : cx,
- fromDataset: !1
- });
- }, rr(Uo);
- var _x = Zn(),
- xx = "\x00_ec_inner",
- bx = Ja.extend({
- init: function (t, e, i, n) {
- i = i || {}, this.option = null, this._theme = new Ja(i), this._optionManager = n;
- },
- setOption: function (t, e) {
- O(!(xx in t), "please use chart.getOption()"), this._optionManager.setOption(t, e), this.resetOption(null);
- },
- resetOption: function (t) {
- var e = !1,
- i = this._optionManager;
- if (!t || "recreate" === t) {
- var n = i.mountOption("recreate" === t);
- this.option && "recreate" !== t ? (this.restoreData(), this.mergeOption(n)) : as.call(this, n), e = !0;
- }
- if (("timeline" === t || "media" === t) && this.restoreData(), !t || "recreate" === t || "timeline" === t) {
- var r = i.getTimelineOption(this);
- r && (this.mergeOption(r), e = !0);
- }
- if (!t || "recreate" === t || "media" === t) {
- var a = i.getMediaOption(this, this._api);
- a.length && f(a, function (t) {
- this.mergeOption(t, e = !0);
- }, this);
- }
- return e;
- },
- mergeOption: function (t) {
- function e(e, n) {
- var r = Gn(t[e]),
- s = Un(a.get(e), r);
- Xn(s), f(s, function (t) {
- var i = t.option;
- S(i) && (t.keyInfo.mainType = e, t.keyInfo.subType = ss(e, i, t.exist));
- });
- var l = os(a, n);
- i[e] = [], a.set(e, []), f(s, function (t, n) {
- var r = t.exist,
- s = t.option;
- if (O(S(s) || r, "Empty component definition"), s) {
- var u = ax.getClass(e, t.keyInfo.subType, !0);
- if (r && r.constructor === u) r.name = t.keyInfo.name, r.mergeOption(s, this), r.optionUpdated(s, !1);else {
- var h = o({
- dependentModels: l,
- componentIndex: n
- }, t.keyInfo);
- r = new u(s, this, this, h), o(r, h), r.init(s, this, this, h), r.optionUpdated(null, !0);
- }
- } else r.mergeOption({}, this), r.optionUpdated({}, !1);
- a.get(e)[n] = r, i[e][n] = r.option;
- }, this), "series" === e && ls(this, a.get("series"));
- }
- var i = this.option,
- a = this._componentsMap,
- s = [];
- jo(this), f(t, function (t, e) {
- null != t && (ax.hasClass(e) ? e && s.push(e) : i[e] = null == i[e] ? n(t) : r(i[e], t, !0));
- }), ax.topologicalTravel(s, ax.getAllClassMainTypes(), e, this), this._seriesIndicesMap = N(this._seriesIndices = this._seriesIndices || []);
- },
- getOption: function () {
- var t = n(this.option);
- return f(t, function (e, i) {
- if (ax.hasClass(i)) {
- for (var e = Gn(e), n = e.length - 1; n >= 0; n--) jn(e[n]) && e.splice(n, 1);
- t[i] = e;
- }
- }), delete t[xx], t;
- },
- getTheme: function () {
- return this._theme;
- },
- getComponent: function (t, e) {
- var i = this._componentsMap.get(t);
- return i ? i[e || 0] : void 0;
- },
- queryComponents: function (t) {
- var e = t.mainType;
- if (!e) return [];
- var i = t.index,
- n = t.id,
- r = t.name,
- a = this._componentsMap.get(e);
- if (!a || !a.length) return [];
- var o;
- if (null != i) x(i) || (i = [i]), o = m(p(i, function (t) {
- return a[t];
- }), function (t) {
- return !!t;
- });else if (null != n) {
- var s = x(n);
- o = m(a, function (t) {
- return s && u(n, t.id) >= 0 || !s && t.id === n;
- });
- } else if (null != r) {
- var l = x(r);
- o = m(a, function (t) {
- return l && u(r, t.name) >= 0 || !l && t.name === r;
- });
- } else o = a.slice();
- return us(o, t);
- },
- findComponents: function (t) {
- function e(t) {
- var e = r + "Index",
- i = r + "Id",
- n = r + "Name";
- return !t || null == t[e] && null == t[i] && null == t[n] ? null : {
- mainType: r,
- index: t[e],
- id: t[i],
- name: t[n]
- };
- }
- function i(e) {
- return t.filter ? m(e, t.filter) : e;
- }
- var n = t.query,
- r = t.mainType,
- a = e(n),
- o = a ? this.queryComponents(a) : this._componentsMap.get(r);
- return i(us(o, t));
- },
- eachComponent: function (t, e, i) {
- var n = this._componentsMap;
- if ("function" == typeof t) i = e, e = t, n.each(function (t, n) {
- f(t, function (t, r) {
- e.call(i, n, t, r);
- });
- });else if (b(t)) f(n.get(t), e, i);else if (S(t)) {
- var r = this.findComponents(t);
- f(r, e, i);
- }
- },
- getSeriesByName: function (t) {
- var e = this._componentsMap.get("series");
- return m(e, function (e) {
- return e.name === t;
- });
- },
- getSeriesByIndex: function (t) {
- return this._componentsMap.get("series")[t];
- },
- getSeriesByType: function (t) {
- var e = this._componentsMap.get("series");
- return m(e, function (e) {
- return e.subType === t;
- });
- },
- getSeries: function () {
- return this._componentsMap.get("series").slice();
- },
- getSeriesCount: function () {
- return this._componentsMap.get("series").length;
- },
- eachSeries: function (t, e) {
- f(this._seriesIndices, function (i) {
- var n = this._componentsMap.get("series")[i];
- t.call(e, n, i);
- }, this);
- },
- eachRawSeries: function (t, e) {
- f(this._componentsMap.get("series"), t, e);
- },
- eachSeriesByType: function (t, e, i) {
- f(this._seriesIndices, function (n) {
- var r = this._componentsMap.get("series")[n];
- r.subType === t && e.call(i, r, n);
- }, this);
- },
- eachRawSeriesByType: function (t, e, i) {
- return f(this.getSeriesByType(t), e, i);
- },
- isSeriesFiltered: function (t) {
- return null == this._seriesIndicesMap.get(t.componentIndex);
- },
- getCurrentSeriesIndices: function () {
- return (this._seriesIndices || []).slice();
- },
- filterSeries: function (t, e) {
- var i = m(this._componentsMap.get("series"), t, e);
- ls(this, i);
- },
- restoreData: function (t) {
- var e = this._componentsMap;
- ls(this, e.get("series"));
- var i = [];
- e.each(function (t, e) {
- i.push(e);
- }), ax.topologicalTravel(i, ax.getAllClassMainTypes(), function (i) {
- f(e.get(i), function (e) {
- ("series" !== i || !ns(e, t)) && e.restoreData();
- });
- });
- }
- });
- c(bx, ux);
- var Sx = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getModel", "getOption", "getViewOfComponentModel", "getViewOfSeriesModel"],
- Mx = {};
- cs.prototype = {
- constructor: cs,
- create: function (t, e) {
- var i = [];
- f(Mx, function (n) {
- var r = n.create(t, e);
- i = i.concat(r || []);
- }), this._coordinateSystems = i;
- },
- update: function (t, e) {
- f(this._coordinateSystems, function (i) {
- i.update && i.update(t, e);
- });
- },
- getCoordinateSystems: function () {
- return this._coordinateSystems.slice();
- }
- }, cs.register = function (t, e) {
- Mx[t] = e;
- }, cs.get = function (t) {
- return Mx[t];
- };
- var Ix = f,
- Tx = n,
- Cx = p,
- Dx = r,
- Ax = /^(min|max)?(.+)$/;
- ds.prototype = {
- constructor: ds,
- setOption: function (t, e) {
- t && f(Gn(t.series), function (t) {
- t && t.data && I(t.data) && E(t.data);
- }), t = Tx(t);
- var i = this._optionBackup,
- n = fs.call(this, t, e, !i);
- this._newBaseOption = n.baseOption, i ? (vs(i.baseOption, n.baseOption), n.timelineOptions.length && (i.timelineOptions = n.timelineOptions), n.mediaList.length && (i.mediaList = n.mediaList), n.mediaDefault && (i.mediaDefault = n.mediaDefault)) : this._optionBackup = n;
- },
- mountOption: function (t) {
- var e = this._optionBackup;
- return this._timelineOptions = Cx(e.timelineOptions, Tx), this._mediaList = Cx(e.mediaList, Tx), this._mediaDefault = Tx(e.mediaDefault), this._currentMediaIndices = [], Tx(t ? e.baseOption : this._newBaseOption);
- },
- getTimelineOption: function (t) {
- var e,
- i = this._timelineOptions;
- if (i.length) {
- var n = t.getComponent("timeline");
- n && (e = Tx(i[n.getCurrentIndex()], !0));
- }
- return e;
- },
- getMediaOption: function () {
- var t = this._api.getWidth(),
- e = this._api.getHeight(),
- i = this._mediaList,
- n = this._mediaDefault,
- r = [],
- a = [];
- if (!i.length && !n) return a;
- for (var o = 0, s = i.length; s > o; o++) ps(i[o].query, t, e) && r.push(o);
- return !r.length && n && (r = [-1]), r.length && !ms(r, this._currentMediaIndices) && (a = Cx(r, function (t) {
- return Tx(-1 === t ? n.option : i[t].option);
- })), this._currentMediaIndices = r, a;
- }
- };
- var kx = f,
- Px = S,
- Lx = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"],
- Ox = function (t, e) {
- kx(Ms(t.series), function (t) {
- Px(t) && Ss(t);
- });
- var i = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
- e && i.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), kx(i, function (e) {
- kx(Ms(t[e]), function (t) {
- t && (ws(t, "axisLabel"), ws(t.axisPointer, "label"));
- });
- }), kx(Ms(t.parallel), function (t) {
- var e = t && t.parallelAxisDefault;
- ws(e, "axisLabel"), ws(e && e.axisPointer, "label");
- }), kx(Ms(t.calendar), function (t) {
- _s(t, "itemStyle"), ws(t, "dayLabel"), ws(t, "monthLabel"), ws(t, "yearLabel");
- }), kx(Ms(t.radar), function (t) {
- ws(t, "name");
- }), kx(Ms(t.geo), function (t) {
- Px(t) && (bs(t), kx(Ms(t.regions), function (t) {
- bs(t);
- }));
- }), kx(Ms(t.timeline), function (t) {
- bs(t), _s(t, "label"), _s(t, "itemStyle"), _s(t, "controlStyle", !0);
- var e = t.data;
- x(e) && f(e, function (t) {
- S(t) && (_s(t, "label"), _s(t, "itemStyle"));
- });
- }), kx(Ms(t.toolbox), function (t) {
- _s(t, "iconStyle"), kx(t.feature, function (t) {
- _s(t, "iconStyle");
- });
- }), ws(Is(t.axisPointer), "label"), ws(Is(t.tooltip).axisPointer, "label");
- },
- zx = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]],
- Ex = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"],
- Rx = function (t, e) {
- Ox(t, e), t.series = Gn(t.series), f(t.series, function (t) {
- if (S(t)) {
- var e = t.type;
- if ("line" === e) null != t.clipOverflow && (t.clip = t.clipOverflow);else if ("pie" === e || "gauge" === e) null != t.clockWise && (t.clockwise = t.clockWise);else if ("gauge" === e) {
- var i = Ts(t, "pointer.color");
- null != i && Cs(t, "itemStyle.color", i);
- }
- Ds(t);
- }
- }), t.dataRange && (t.visualMap = t.dataRange), f(Ex, function (e) {
- var i = t[e];
- i && (x(i) || (i = [i]), f(i, function (t) {
- Ds(t);
- }));
- });
- },
- Bx = function (t) {
- var e = N();
- t.eachSeries(function (t) {
- var i = t.get("stack");
- if (i) {
- var n = e.get(i) || e.set(i, []),
- r = t.getData(),
- a = {
- stackResultDimension: r.getCalculationInfo("stackResultDimension"),
- stackedOverDimension: r.getCalculationInfo("stackedOverDimension"),
- stackedDimension: r.getCalculationInfo("stackedDimension"),
- stackedByDimension: r.getCalculationInfo("stackedByDimension"),
- isStackedByIndex: r.getCalculationInfo("isStackedByIndex"),
- data: r,
- seriesModel: t
- };
- if (!a.stackedDimension || !a.isStackedByIndex && !a.stackedByDimension) return;
- n.length && r.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(a);
- }
- }), e.each(As);
- },
- Nx = ks.prototype;
- Nx.pure = !1, Nx.persistent = !0, Nx.getSource = function () {
- return this._source;
- };
- var Fx = {
- arrayRows_column: {
- pure: !0,
- count: function () {
- return Math.max(0, this._data.length - this._source.startIndex);
- },
- getItem: function (t) {
- return this._data[t + this._source.startIndex];
- },
- appendData: Os
- },
- arrayRows_row: {
- pure: !0,
- count: function () {
- var t = this._data[0];
- return t ? Math.max(0, t.length - this._source.startIndex) : 0;
- },
- getItem: function (t) {
- t += this._source.startIndex;
- for (var e = [], i = this._data, n = 0; n < i.length; n++) {
- var r = i[n];
- e.push(r ? r[t] : null);
- }
- return e;
- },
- appendData: function () {
- throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
- }
- },
- objectRows: {
- pure: !0,
- count: Ps,
- getItem: Ls,
- appendData: Os
- },
- keyedColumns: {
- pure: !0,
- count: function () {
- var t = this._source.dimensionsDefine[0].name,
- e = this._data[t];
- return e ? e.length : 0;
- },
- getItem: function (t) {
- for (var e = [], i = this._source.dimensionsDefine, n = 0; n < i.length; n++) {
- var r = this._data[i[n].name];
- e.push(r ? r[t] : null);
- }
- return e;
- },
- appendData: function (t) {
- var e = this._data;
- f(t, function (t, i) {
- for (var n = e[i] || (e[i] = []), r = 0; r < (t || []).length; r++) n.push(t[r]);
- });
- }
- },
- original: {
- count: Ps,
- getItem: Ls,
- appendData: Os
- },
- typedArray: {
- persistent: !1,
- pure: !0,
- count: function () {
- return this._data ? this._data.length / this._dimSize : 0;
- },
- getItem: function (t, e) {
- t -= this._offset, e = e || [];
- for (var i = this._dimSize * t, n = 0; n < this._dimSize; n++) e[n] = this._data[i + n];
- return e;
- },
- appendData: function (t) {
- this._data = t;
- },
- clean: function () {
- this._offset += this.count(), this._data = null;
- }
- }
- },
- Gx = {
- arrayRows: zs,
- objectRows: function (t, e, i, n) {
- return null != i ? t[n] : t;
- },
- keyedColumns: zs,
- original: function (t, e, i) {
- var n = Hn(t);
- return null != i && n instanceof Array ? n[i] : n;
- },
- typedArray: zs
- },
- Vx = {
- arrayRows: Es,
- objectRows: function (t, e) {
- return Rs(t[e], this._dimensionInfos[e]);
- },
- keyedColumns: Es,
- original: function (t, e, i, n) {
- var r = t && (null == t.value ? t : t.value);
- return !this._rawData.pure && Wn(t) && (this.hasItemOption = !0), Rs(r instanceof Array ? r[n] : r, this._dimensionInfos[e]);
- },
- typedArray: function (t, e, i, n) {
- return t[n];
- }
- },
- Hx = /\{@(.+?)\}/g,
- Wx = {
- getDataParams: function (t, e) {
- var i = this.getData(e),
- n = this.getRawValue(t, e),
- r = i.getRawIndex(t),
- a = i.getName(t),
- o = i.getRawDataItem(t),
- s = i.getItemVisual(t, "color"),
- l = i.getItemVisual(t, "borderColor"),
- u = this.ecModel.getComponent("tooltip"),
- h = u && u.get("renderMode"),
- c = tr(h),
- d = this.mainType,
- f = "series" === d,
- p = i.userOutput;
- return {
- componentType: d,
- componentSubType: this.subType,
- componentIndex: this.componentIndex,
- seriesType: f ? this.subType : null,
- seriesIndex: this.seriesIndex,
- seriesId: f ? this.id : null,
- seriesName: f ? this.name : null,
- name: a,
- dataIndex: r,
- data: o,
- dataType: e,
- value: n,
- color: s,
- borderColor: l,
- dimensionNames: p ? p.dimensionNames : null,
- encode: p ? p.encode : null,
- marker: Ao({
- color: s,
- renderMode: c
- }),
- $vars: ["seriesName", "name", "value"]
- };
- },
- getFormattedLabel: function (t, e, i, n, r) {
- e = e || "normal";
- var a = this.getData(i),
- o = a.getItemModel(t),
- s = this.getDataParams(t, i);
- null != n && s.value instanceof Array && (s.value = s.value[n]);
- var l = o.get("normal" === e ? [r || "label", "formatter"] : [e, r || "label", "formatter"]);
- if ("function" == typeof l) return s.status = e, s.dimensionIndex = n, l(s);
- if ("string" == typeof l) {
- var u = Co(l, s);
- return u.replace(Hx, function (e, i) {
- var n = i.length;
- return "[" === i.charAt(0) && "]" === i.charAt(n - 1) && (i = +i.slice(1, n - 1)), Bs(a, t, i);
- });
- }
- },
- getRawValue: function (t, e) {
- return Bs(this.getData(e), t);
- },
- formatTooltip: function () {}
- },
- Ux = Gs.prototype;
- Ux.perform = function (t) {
- function e(t) {
- return !(t >= 1) && (t = 1), t;
- }
- var i = this._upstream,
- n = t && t.skip;
- if (this._dirty && i) {
- var r = this.context;
- r.data = r.outputData = i.context.outputData;
- }
- this.__pipeline && (this.__pipeline.currentTask = this);
- var a;
- this._plan && !n && (a = this._plan(this.context));
- var o = e(this._modBy),
- s = this._modDataCount || 0,
- l = e(t && t.modBy),
- u = t && t.modDataCount || 0;
- (o !== l || s !== u) && (a = "reset");
- var h;
- (this._dirty || "reset" === a) && (this._dirty = !1, h = Hs(this, n)), this._modBy = l, this._modDataCount = u;
- var c = t && t.step;
- if (this._dueEnd = i ? i._outputDueEnd : this._count ? this._count(this.context) : 1 / 0, this._progress) {
- var d = this._dueIndex,
- f = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd);
- if (!n && (h || f > d)) {
- var p = this._progress;
- if (x(p)) for (var g = 0; g < p.length; g++) Vs(this, p[g], d, f, l, u);else Vs(this, p, d, f, l, u);
- }
- this._dueIndex = f;
- var m = null != this._settedOutputEnd ? this._settedOutputEnd : f;
- this._outputDueEnd = m;
- } else this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd;
- return this.unfinished();
- };
- var Xx = function () {
- function t() {
- return i > n ? n++ : null;
- }
- function e() {
- var t = n % o * r + Math.ceil(n / o),
- e = n >= i ? null : a > t ? t : n;
- return n++, e;
- }
- var i,
- n,
- r,
- a,
- o,
- s = {
- reset: function (l, u, h, c) {
- n = l, i = u, r = h, a = c, o = Math.ceil(a / r), s.next = r > 1 && a > 0 ? e : t;
- }
- };
- return s;
- }();
- Ux.dirty = function () {
- this._dirty = !0, this._onDirty && this._onDirty(this.context);
- }, Ux.unfinished = function () {
- return this._progress && this._dueIndex < this._dueEnd;
- }, Ux.pipe = function (t) {
- (this._downstream !== t || this._dirty) && (this._downstream = t, t._upstream = this, t.dirty());
- }, Ux.dispose = function () {
- this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
- }, Ux.getUpstream = function () {
- return this._upstream;
- }, Ux.getDownstream = function () {
- return this._downstream;
- }, Ux.setOutputEnd = function (t) {
- this._outputDueEnd = this._settedOutputEnd = t;
- };
- var Yx = Zn(),
- jx = ax.extend({
- type: "series.__base__",
- seriesIndex: 0,
- coordinateSystem: null,
- defaultOption: null,
- legendDataProvider: null,
- visualColorAccessPath: "itemStyle.color",
- visualBorderColorAccessPath: "itemStyle.borderColor",
- layoutMode: null,
- init: function (t, e, i) {
- this.seriesIndex = this.componentIndex, this.dataTask = Fs({
- count: Xs,
- reset: Ys
- }), this.dataTask.context = {
- model: this
- }, this.mergeDefaultAndTheme(t, i), qo(this);
- var n = this.getInitialData(t, i);
- qs(n, this), this.dataTask.context.data = n, Yx(this).dataBeforeProcessed = n, Ws(this);
- },
- mergeDefaultAndTheme: function (t, e) {
- var i = this.layoutMode,
- n = i ? No(t) : {},
- a = this.subType;
- ax.hasClass(a) && (a += "Series"), r(t, e.getTheme().get(this.subType)), r(t, this.getDefaultOption()), Vn(t, "label", ["show"]), this.fillDataTextStyle(t.data), i && Bo(t, n, i);
- },
- mergeOption: function (t, e) {
- t = r(this.option, t, !0), this.fillDataTextStyle(t.data);
- var i = this.layoutMode;
- i && Bo(this.option, t, i), qo(this);
- var n = this.getInitialData(t, e);
- qs(n, this), this.dataTask.dirty(), this.dataTask.context.data = n, Yx(this).dataBeforeProcessed = n, Ws(this);
- },
- fillDataTextStyle: function (t) {
- if (t && !I(t)) for (var e = ["show"], i = 0; i < t.length; i++) t[i] && t[i].label && Vn(t[i], "label", e);
- },
- getInitialData: function () {},
- appendData: function (t) {
- var e = this.getRawData();
- e.appendData(t.data);
- },
- getData: function (t) {
- var e = Ks(this);
- if (e) {
- var i = e.context.data;
- return null == t ? i : i.getLinkedData(t);
- }
- return Yx(this).data;
- },
- setData: function (t) {
- var e = Ks(this);
- if (e) {
- var i = e.context;
- i.data !== t && e.modifyOutputEnd && e.setOutputEnd(t.count()), i.outputData = t, e !== this.dataTask && (i.data = t);
- }
- Yx(this).data = t;
- },
- getSource: function () {
- return Yo(this);
- },
- getRawData: function () {
- return Yx(this).dataBeforeProcessed;
- },
- getBaseAxis: function () {
- var t = this.coordinateSystem;
- return t && t.getBaseAxis && t.getBaseAxis();
- },
- formatTooltip: function (t, e, i, n) {
- function r(i) {
- function r(t, i) {
- var r = c.getDimensionInfo(i);
- if (r && r.otherDims.tooltip !== !1) {
- var d = r.type,
- f = "sub" + o.seriesIndex + "at" + h,
- p = Ao({
- color: y,
- type: "subItem",
- renderMode: n,
- markerId: f
- }),
- g = "string" == typeof p ? p : p.content,
- m = (a ? g + To(r.displayName || "-") + ": " : "") + To("ordinal" === d ? t + "" : "time" === d ? e ? "" : Po("yyyy/MM/dd hh:mm:ss", t) : Mo(t));
- m && s.push(m), l && (u[f] = y, ++h);
- }
- }
- var a = g(i, function (t, e, i) {
- var n = c.getDimensionInfo(i);
- return t |= n && n.tooltip !== !1 && null != n.displayName;
- }, 0),
- s = [];
- d.length ? f(d, function (e) {
- r(Bs(c, t, e), e);
- }) : f(i, r);
- var p = a ? l ? "\n" : "<br/>" : "",
- m = p + s.join(p || ", ");
- return {
- renderMode: n,
- content: m,
- style: u
- };
- }
- function a(t) {
- return {
- renderMode: n,
- content: To(Mo(t)),
- style: u
- };
- }
- var o = this;
- n = n || "html";
- var s = "html" === n ? "<br/>" : "\n",
- l = "richText" === n,
- u = {},
- h = 0,
- c = this.getData(),
- d = c.mapDimension("defaultedTooltip", !0),
- p = d.length,
- m = this.getRawValue(t),
- v = x(m),
- y = c.getItemVisual(t, "color");
- S(y) && y.colorStops && (y = (y.colorStops[0] || {}).color), y = y || "transparent";
- var _ = p > 1 || v && !p ? r(m) : a(p ? Bs(c, t, d[0]) : v ? m[0] : m),
- w = _.content,
- b = o.seriesIndex + "at" + h,
- M = Ao({
- color: y,
- type: "item",
- renderMode: n,
- markerId: b
- });
- u[b] = y, ++h;
- var I = c.getName(t),
- T = this.name;
- Yn(this) || (T = ""), T = T ? To(T) + (e ? ": " : s) : "";
- var C = "string" == typeof M ? M : M.content,
- D = e ? C + T + w : T + C + (I ? To(I) + ": " + w : w);
- return {
- html: D,
- markers: u
- };
- },
- isAnimationEnabled: function () {
- if (Mg.node) return !1;
- var t = this.getShallow("animation");
- return t && this.getData().count() > this.getShallow("animationThreshold") && (t = !1), t;
- },
- restoreData: function () {
- this.dataTask.dirty();
- },
- getColorFromPalette: function (t, e, i) {
- var n = this.ecModel,
- r = ux.getColorFromPalette.call(this, t, e, i);
- return r || (r = n.getColorFromPalette(t, e, i)), r;
- },
- coordDimToDataDim: function (t) {
- return this.getRawData().mapDimension(t, !0);
- },
- getProgressive: function () {
- return this.get("progressive");
- },
- getProgressiveThreshold: function () {
- return this.get("progressiveThreshold");
- },
- getAxisTooltipData: null,
- getTooltipPosition: null,
- pipeTask: null,
- preventIncremental: null,
- pipelineContext: null
- });
- c(jx, Wx), c(jx, ux);
- var qx = function () {
- this.group = new Bm(), this.uid = io("viewComponent");
- };
- qx.prototype = {
- constructor: qx,
- init: function () {},
- render: function () {},
- dispose: function () {},
- filterForExposedEvent: null
- };
- var Zx = qx.prototype;
- Zx.updateView = Zx.updateLayout = Zx.updateVisual = function () {}, nr(qx), sr(qx, {
- registerWhenExtend: !0
- });
- var Kx = function () {
- var t = Zn();
- return function (e) {
- var i = t(e),
- n = e.pipelineContext,
- r = i.large,
- a = i.progressiveRender,
- o = i.large = n.large,
- s = i.progressiveRender = n.progressiveRender;
- return !!(r ^ o || a ^ s) && "reset";
- };
- },
- $x = Zn(),
- Qx = Kx();
- $s.prototype = {
- type: "chart",
- init: function () {},
- render: function () {},
- highlight: function (t, e, i, n) {
- Js(t.getData(), n, "emphasis");
- },
- downplay: function (t, e, i, n) {
- Js(t.getData(), n, "normal");
- },
- remove: function () {
- this.group.removeAll();
- },
- dispose: function () {},
- incrementalPrepareRender: null,
- incrementalRender: null,
- updateTransform: null,
- filterForExposedEvent: null
- };
- var Jx = $s.prototype;
- Jx.updateView = Jx.updateLayout = Jx.updateVisual = function (t, e, i, n) {
- this.render(t, e, i, n);
- }, nr($s, ["dispose"]), sr($s, {
- registerWhenExtend: !0
- }), $s.markUpdateMethod = function (t, e) {
- $x(t).updateMethod = e;
- };
- var tw = {
- incrementalPrepareRender: {
- progress: function (t, e) {
- e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload);
- }
- },
- render: {
- forceFirstProgress: !0,
- progress: function (t, e) {
- e.view.render(e.model, e.ecModel, e.api, e.payload);
- }
- }
- },
- ew = "\x00__throttleOriginMethod",
- iw = "\x00__throttleRate",
- nw = "\x00__throttleType",
- rw = {
- createOnAllSeries: !0,
- performRawSeries: !0,
- reset: function (t, e) {
- var i = t.getData(),
- n = (t.visualColorAccessPath || "itemStyle.color").split("."),
- r = t.get(n) || t.getColorFromPalette(t.name, null, e.getSeriesCount());
- i.setVisual("color", r);
- var a = (t.visualBorderColorAccessPath || "itemStyle.borderColor").split("."),
- o = t.get(a);
- if (i.setVisual("borderColor", o), !e.isSeriesFiltered(t)) {
- "function" != typeof r || r instanceof m_ || i.each(function (e) {
- i.setItemVisual(e, "color", r(t.getDataParams(e)));
- });
- var s = function (t, e) {
- var i = t.getItemModel(e),
- r = i.get(n, !0),
- o = i.get(a, !0);
- null != r && t.setItemVisual(e, "color", r), null != o && t.setItemVisual(e, "borderColor", o);
- };
- return {
- dataEach: i.hasItemOption ? s : null
- };
- }
- }
- },
- aw = {
- legend: {
- selector: {
- all: "全选",
- inverse: "反选"
- }
- },
- toolbox: {
- brush: {
- title: {
- rect: "矩形选择",
- polygon: "圈选",
- lineX: "横向选择",
- lineY: "纵向选择",
- keep: "保持选择",
- clear: "清除选择"
- }
- },
- dataView: {
- title: "数据视图",
- lang: ["数据视图", "关闭", "刷新"]
- },
- dataZoom: {
- title: {
- zoom: "区域缩放",
- back: "区域缩放还原"
- }
- },
- magicType: {
- title: {
- line: "切换为折线图",
- bar: "切换为柱状图",
- stack: "切换为堆叠",
- tiled: "切换为平铺"
- }
- },
- restore: {
- title: "还原"
- },
- saveAsImage: {
- title: "保存为图片",
- lang: ["右键另存为图片"]
- }
- },
- series: {
- typeNames: {
- pie: "饼图",
- bar: "柱状图",
- line: "折线图",
- scatter: "散点图",
- effectScatter: "涟漪散点图",
- radar: "雷达图",
- tree: "树图",
- treemap: "矩形树图",
- boxplot: "箱型图",
- candlestick: "K线图",
- k: "K线图",
- heatmap: "热力图",
- map: "地图",
- parallel: "平行坐标图",
- lines: "线图",
- graph: "关系图",
- sankey: "桑基图",
- funnel: "漏斗图",
- gauge: "仪表盘图",
- pictorialBar: "象形柱图",
- themeRiver: "主题河流图",
- sunburst: "旭日图"
- }
- },
- aria: {
- general: {
- withTitle: "这是一个关于“{title}”的图表。",
- withoutTitle: "这是一个图表,"
- },
- series: {
- single: {
- prefix: "",
- withName: "图表类型是{seriesType},表示{seriesName}。",
- withoutName: "图表类型是{seriesType}。"
- },
- multiple: {
- prefix: "它由{seriesCount}个图表系列组成。",
- withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
- withoutName: "第{seriesId}个系列是一个{seriesType},",
- separator: {
- middle: ";",
- end: "。"
- }
- }
- },
- data: {
- allData: "其数据是——",
- partialData: "其中,前{displayCnt}项是——",
- withName: "{name}的数据是{value}",
- withoutName: "{value}",
- separator: {
- middle: ",",
- end: ""
- }
- }
- }
- },
- ow = function (t, e) {
- function i(t, e) {
- if ("string" != typeof t) return t;
- var i = t;
- return f(e, function (t, e) {
- i = i.replace(new RegExp("\\{\\s*" + e + "\\s*\\}", "g"), t);
- }), i;
- }
- function n(t) {
- var e = o.get(t);
- if (null == e) {
- for (var i = t.split("."), n = aw.aria, r = 0; r < i.length; ++r) n = n[i[r]];
- return n;
- }
- return e;
- }
- function r() {
- var t = e.getModel("title").option;
- return t && t.length && (t = t[0]), t && t.text;
- }
- function a(t) {
- return aw.series.typeNames[t] || "自定义图";
- }
- var o = e.getModel("aria");
- if (o.get("show")) {
- if (o.get("description")) return void t.setAttribute("aria-label", o.get("description"));
- var s = 0;
- e.eachSeries(function () {
- ++s;
- }, this);
- var l,
- u = o.get("data.maxCount") || 10,
- h = o.get("series.maxCount") || 10,
- c = Math.min(s, h);
- if (!(1 > s)) {
- var d = r();
- l = d ? i(n("general.withTitle"), {
- title: d
- }) : n("general.withoutTitle");
- var p = [],
- g = s > 1 ? "series.multiple.prefix" : "series.single.prefix";
- l += i(n(g), {
- seriesCount: s
- }), e.eachSeries(function (t, e) {
- if (c > e) {
- var r,
- o = t.get("name"),
- l = "series." + (s > 1 ? "multiple" : "single") + ".";
- r = n(o ? l + "withName" : l + "withoutName"), r = i(r, {
- seriesId: t.seriesIndex,
- seriesName: t.get("name"),
- seriesType: a(t.subType)
- });
- var h = t.getData();
- window.data = h, r += h.count() > u ? i(n("data.partialData"), {
- displayCnt: u
- }) : n("data.allData");
- for (var d = [], f = 0; f < h.count(); f++) if (u > f) {
- var g = h.getName(f),
- m = Bs(h, f);
- d.push(i(n(g ? "data.withName" : "data.withoutName"), {
- name: g,
- value: m
- }));
- }
- r += d.join(n("data.separator.middle")) + n("data.separator.end"), p.push(r);
- }
- }), l += p.join(n("series.multiple.separator.middle")) + n("series.multiple.separator.end"), t.setAttribute("aria-label", l);
- }
- }
- },
- sw = Math.PI,
- lw = function (t, e) {
- e = e || {}, s(e, {
- text: "loading",
- color: "#c23531",
- textColor: "#000",
- maskColor: "rgba(255, 255, 255, 0.8)",
- zlevel: 0
- });
- var i = new u_({
- style: {
- fill: e.maskColor
- },
- zlevel: e.zlevel,
- z: 1e4
- }),
- n = new p_({
- shape: {
- startAngle: -sw / 2,
- endAngle: -sw / 2 + .1,
- r: 10
- },
- style: {
- stroke: e.color,
- lineCap: "round",
- lineWidth: 5
- },
- zlevel: e.zlevel,
- z: 10001
- }),
- r = new u_({
- style: {
- fill: "none",
- text: e.text,
- textPosition: "right",
- textDistance: 10,
- textFill: e.textColor
- },
- zlevel: e.zlevel,
- z: 10001
- });
- n.animateShape(!0).when(1e3, {
- endAngle: 3 * sw / 2
- }).start("circularInOut"), n.animateShape(!0).when(1e3, {
- startAngle: 3 * sw / 2
- }).delay(300).start("circularInOut");
- var a = new Bm();
- return a.add(n), a.add(r), a.add(i), a.resize = function () {
- var e = t.getWidth() / 2,
- a = t.getHeight() / 2;
- n.setShape({
- cx: e,
- cy: a
- });
- var o = n.shape.r;
- r.setShape({
- x: e - o,
- y: a - o,
- width: 2 * o,
- height: 2 * o
- }), i.setShape({
- x: 0,
- y: 0,
- width: t.getWidth(),
- height: t.getHeight()
- });
- }, a.resize(), a;
- },
- uw = rl.prototype;
- uw.restoreData = function (t, e) {
- t.restoreData(e), this._stageTaskMap.each(function (t) {
- var e = t.overallTask;
- e && e.dirty();
- });
- }, uw.getPerformArgs = function (t, e) {
- if (t.__pipeline) {
- var i = this._pipelineMap.get(t.__pipeline.id),
- n = i.context,
- r = !e && i.progressiveEnabled && (!n || n.progressiveRender) && t.__idxInPipeline > i.blockIndex,
- a = r ? i.step : null,
- o = n && n.modDataCount,
- s = null != o ? Math.ceil(o / a) : null;
- return {
- step: a,
- modBy: s,
- modDataCount: o
- };
- }
- }, uw.getPipeline = function (t) {
- return this._pipelineMap.get(t);
- }, uw.updateStreamModes = function (t, e) {
- var i = this._pipelineMap.get(t.uid),
- n = t.getData(),
- r = n.count(),
- a = i.progressiveEnabled && e.incrementalPrepareRender && r >= i.threshold,
- o = t.get("large") && r >= t.get("largeThreshold"),
- s = "mod" === t.get("progressiveChunkMode") ? r : null;
- t.pipelineContext = i.context = {
- progressiveRender: a,
- modDataCount: s,
- large: o
- };
- }, uw.restorePipelines = function (t) {
- var e = this,
- i = e._pipelineMap = N();
- t.eachSeries(function (t) {
- var n = t.getProgressive(),
- r = t.uid;
- i.set(r, {
- id: r,
- head: null,
- tail: null,
- threshold: t.getProgressiveThreshold(),
- progressiveEnabled: n && !(t.preventIncremental && t.preventIncremental()),
- blockIndex: -1,
- step: Math.round(n || 700),
- count: 0
- }), ml(e, t, t.dataTask);
- });
- }, uw.prepareStageTasks = function () {
- var t = this._stageTaskMap,
- e = this.ecInstance.getModel(),
- i = this.api;
- f(this._allHandlers, function (n) {
- var r = t.get(n.uid) || t.set(n.uid, []);
- n.reset && ol(this, n, r, e, i), n.overallReset && sl(this, n, r, e, i);
- }, this);
- }, uw.prepareView = function (t, e, i, n) {
- var r = t.renderTask,
- a = r.context;
- a.model = e, a.ecModel = i, a.api = n, r.__block = !t.incrementalPrepareRender, ml(this, e, r);
- }, uw.performDataProcessorTasks = function (t, e) {
- al(this, this._dataProcessorHandlers, t, e, {
- block: !0
- });
- }, uw.performVisualTasks = function (t, e, i) {
- al(this, this._visualHandlers, t, e, i);
- }, uw.performSeriesTasks = function (t) {
- var e;
- t.eachSeries(function (t) {
- e |= t.dataTask.perform();
- }), this.unfinished |= e;
- }, uw.plan = function () {
- this._pipelineMap.each(function (t) {
- var e = t.tail;
- do {
- if (e.__block) {
- t.blockIndex = e.__idxInPipeline;
- break;
- }
- e = e.getUpstream();
- } while (e);
- });
- };
- var hw = uw.updatePayload = function (t, e) {
- "remain" !== e && (t.context.payload = e);
- },
- cw = pl(0);
- rl.wrapStageHandler = function (t, e) {
- return w(t) && (t = {
- overallReset: t,
- seriesType: vl(t)
- }), t.uid = io("stageHandler"), e && (t.visualType = e), t;
- };
- var dw,
- fw = {},
- pw = {};
- yl(fw, bx), yl(pw, hs), fw.eachSeriesByType = fw.eachRawSeriesByType = function (t) {
- dw = t;
- }, fw.eachComponent = function (t) {
- "series" === t.mainType && t.subType && (dw = t.subType);
- };
- var gw = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"],
- mw = {
- color: gw,
- colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], gw]
- },
- vw = "#eee",
- yw = function () {
- return {
- axisLine: {
- lineStyle: {
- color: vw
- }
- },
- axisTick: {
- lineStyle: {
- color: vw
- }
- },
- axisLabel: {
- textStyle: {
- color: vw
- }
- },
- splitLine: {
- lineStyle: {
- type: "dashed",
- color: "#aaa"
- }
- },
- splitArea: {
- areaStyle: {
- color: vw
- }
- }
- };
- },
- _w = ["#dd6b66", "#759aa0", "#e69d87", "#8dc1a9", "#ea7e53", "#eedd78", "#73a373", "#73b9bc", "#7289ab", "#91ca8c", "#f49f42"],
- xw = {
- color: _w,
- backgroundColor: "#333",
- tooltip: {
- axisPointer: {
- lineStyle: {
- color: vw
- },
- crossStyle: {
- color: vw
- }
- }
- },
- legend: {
- textStyle: {
- color: vw
- }
- },
- textStyle: {
- color: vw
- },
- title: {
- textStyle: {
- color: vw
- }
- },
- toolbox: {
- iconStyle: {
- normal: {
- borderColor: vw
- }
- }
- },
- dataZoom: {
- textStyle: {
- color: vw
- }
- },
- visualMap: {
- textStyle: {
- color: vw
- }
- },
- timeline: {
- lineStyle: {
- color: vw
- },
- itemStyle: {
- normal: {
- color: _w[1]
- }
- },
- label: {
- normal: {
- textStyle: {
- color: vw
- }
- }
- },
- controlStyle: {
- normal: {
- color: vw,
- borderColor: vw
- }
- }
- },
- timeAxis: yw(),
- logAxis: yw(),
- valueAxis: yw(),
- categoryAxis: yw(),
- line: {
- symbol: "circle"
- },
- graph: {
- color: _w
- },
- gauge: {
- title: {
- textStyle: {
- color: vw
- }
- }
- },
- candlestick: {
- itemStyle: {
- normal: {
- color: "#FD1050",
- color0: "#0CF49B",
- borderColor: "#FD1050",
- borderColor0: "#0CF49B"
- }
- }
- }
- };
- xw.categoryAxis.splitLine.show = !1, ax.extend({
- type: "dataset",
- defaultOption: {
- seriesLayoutBy: vx,
- sourceHeader: null,
- dimensions: null,
- source: null
- },
- optionUpdated: function () {
- Xo(this);
- }
- }), qx.extend({
- type: "dataset"
- });
- var ww = Vr.extend({
- type: "ellipse",
- shape: {
- cx: 0,
- cy: 0,
- rx: 0,
- ry: 0
- },
- buildPath: function (t, e) {
- var i = .5522848,
- n = e.cx,
- r = e.cy,
- a = e.rx,
- o = e.ry,
- s = a * i,
- l = o * i;
- t.moveTo(n - a, r), t.bezierCurveTo(n - a, r - l, n - s, r - o, n, r - o), t.bezierCurveTo(n + s, r - o, n + a, r - l, n + a, r), t.bezierCurveTo(n + a, r + l, n + s, r + o, n, r + o), t.bezierCurveTo(n - s, r + o, n - a, r + l, n - a, r), t.closePath();
- }
- }),
- bw = /[\s,]+/;
- xl.prototype.parse = function (t, e) {
- e = e || {};
- var i = _l(t);
- if (!i) throw new Error("Illegal svg");
- var n = new Bm();
- this._root = n;
- var r = i.getAttribute("viewBox") || "",
- a = parseFloat(i.getAttribute("width") || e.width),
- o = parseFloat(i.getAttribute("height") || e.height);
- isNaN(a) && (a = null), isNaN(o) && (o = null), Ml(i, n, null, !0);
- for (var s = i.firstChild; s;) this._parseNode(s, n), s = s.nextSibling;
- var l, u;
- if (r) {
- var h = z(r).split(bw);
- h.length >= 4 && (l = {
- x: parseFloat(h[0] || 0),
- y: parseFloat(h[1] || 0),
- width: parseFloat(h[2]),
- height: parseFloat(h[3])
- });
- }
- if (l && null != a && null != o && (u = Dl(l, a, o), !e.ignoreViewBox)) {
- var c = n;
- n = new Bm(), n.add(c), c.scale = u.scale.slice(), c.position = u.position.slice();
- }
- return e.ignoreRootClip || null == a || null == o || n.setClipPath(new u_({
- shape: {
- x: 0,
- y: 0,
- width: a,
- height: o
- }
- })), {
- root: n,
- width: a,
- height: o,
- viewBoxRect: l,
- viewBoxTransform: u
- };
- }, xl.prototype._parseNode = function (t, e) {
- var i = t.nodeName.toLowerCase();
- "defs" === i ? this._isDefine = !0 : "text" === i && (this._isText = !0);
- var n;
- if (this._isDefine) {
- var r = Mw[i];
- if (r) {
- var a = r.call(this, t),
- o = t.getAttribute("id");
- o && (this._defs[o] = a);
- }
- } else {
- var r = Sw[i];
- r && (n = r.call(this, t, e), e.add(n));
- }
- for (var s = t.firstChild; s;) 1 === s.nodeType && this._parseNode(s, n), 3 === s.nodeType && this._isText && this._parseText(s, n), s = s.nextSibling;
- "defs" === i ? this._isDefine = !1 : "text" === i && (this._isText = !1);
- }, xl.prototype._parseText = function (t, e) {
- if (1 === t.nodeType) {
- var i = t.getAttribute("dx") || 0,
- n = t.getAttribute("dy") || 0;
- this._textX += parseFloat(i), this._textY += parseFloat(n);
- }
- var r = new $y({
- style: {
- text: t.textContent,
- transformText: !0
- },
- position: [this._textX || 0, this._textY || 0]
- });
- bl(e, r), Ml(t, r, this._defs);
- var a = r.style.fontSize;
- a && 9 > a && (r.style.fontSize = 9, r.scale = r.scale || [1, 1], r.scale[0] *= a / 9, r.scale[1] *= a / 9);
- var o = r.getBoundingRect();
- return this._textX += o.width, e.add(r), r;
- };
- var Sw = {
- g: function (t, e) {
- var i = new Bm();
- return bl(e, i), Ml(t, i, this._defs), i;
- },
- rect: function (t, e) {
- var i = new u_();
- return bl(e, i), Ml(t, i, this._defs), i.setShape({
- x: parseFloat(t.getAttribute("x") || 0),
- y: parseFloat(t.getAttribute("y") || 0),
- width: parseFloat(t.getAttribute("width") || 0),
- height: parseFloat(t.getAttribute("height") || 0)
- }), i;
- },
- circle: function (t, e) {
- var i = new Qy();
- return bl(e, i), Ml(t, i, this._defs), i.setShape({
- cx: parseFloat(t.getAttribute("cx") || 0),
- cy: parseFloat(t.getAttribute("cy") || 0),
- r: parseFloat(t.getAttribute("r") || 0)
- }), i;
- },
- line: function (t, e) {
- var i = new c_();
- return bl(e, i), Ml(t, i, this._defs), i.setShape({
- x1: parseFloat(t.getAttribute("x1") || 0),
- y1: parseFloat(t.getAttribute("y1") || 0),
- x2: parseFloat(t.getAttribute("x2") || 0),
- y2: parseFloat(t.getAttribute("y2") || 0)
- }), i;
- },
- ellipse: function (t, e) {
- var i = new ww();
- return bl(e, i), Ml(t, i, this._defs), i.setShape({
- cx: parseFloat(t.getAttribute("cx") || 0),
- cy: parseFloat(t.getAttribute("cy") || 0),
- rx: parseFloat(t.getAttribute("rx") || 0),
- ry: parseFloat(t.getAttribute("ry") || 0)
- }), i;
- },
- polygon: function (t, e) {
- var i = t.getAttribute("points");
- i && (i = Sl(i));
- var n = new a_({
- shape: {
- points: i || []
- }
- });
- return bl(e, n), Ml(t, n, this._defs), n;
- },
- polyline: function (t, e) {
- var i = new Vr();
- bl(e, i), Ml(t, i, this._defs);
- var n = t.getAttribute("points");
- n && (n = Sl(n));
- var r = new o_({
- shape: {
- points: n || []
- }
- });
- return r;
- },
- image: function (t, e) {
- var i = new Sn();
- return bl(e, i), Ml(t, i, this._defs), i.setStyle({
- image: t.getAttribute("xlink:href"),
- x: t.getAttribute("x"),
- y: t.getAttribute("y"),
- width: t.getAttribute("width"),
- height: t.getAttribute("height")
- }), i;
- },
- text: function (t, e) {
- var i = t.getAttribute("x") || 0,
- n = t.getAttribute("y") || 0,
- r = t.getAttribute("dx") || 0,
- a = t.getAttribute("dy") || 0;
- this._textX = parseFloat(i) + parseFloat(r), this._textY = parseFloat(n) + parseFloat(a);
- var o = new Bm();
- return bl(e, o), Ml(t, o, this._defs), o;
- },
- tspan: function (t, e) {
- var i = t.getAttribute("x"),
- n = t.getAttribute("y");
- null != i && (this._textX = parseFloat(i)), null != n && (this._textY = parseFloat(n));
- var r = t.getAttribute("dx") || 0,
- a = t.getAttribute("dy") || 0,
- o = new Bm();
- return bl(e, o), Ml(t, o, this._defs), this._textX += r, this._textY += a, o;
- },
- path: function (t, e) {
- var i = t.getAttribute("d") || "",
- n = Xr(i);
- return bl(e, n), Ml(t, n, this._defs), n;
- }
- },
- Mw = {
- lineargradient: function (t) {
- var e = parseInt(t.getAttribute("x1") || 0, 10),
- i = parseInt(t.getAttribute("y1") || 0, 10),
- n = parseInt(t.getAttribute("x2") || 10, 10),
- r = parseInt(t.getAttribute("y2") || 0, 10),
- a = new v_(e, i, n, r);
- return wl(t, a), a;
- },
- radialgradient: function () {}
- },
- Iw = {
- fill: "fill",
- stroke: "stroke",
- "stroke-width": "lineWidth",
- opacity: "opacity",
- "fill-opacity": "fillOpacity",
- "stroke-opacity": "strokeOpacity",
- "stroke-dasharray": "lineDash",
- "stroke-dashoffset": "lineDashOffset",
- "stroke-linecap": "lineCap",
- "stroke-linejoin": "lineJoin",
- "stroke-miterlimit": "miterLimit",
- "font-family": "fontFamily",
- "font-size": "fontSize",
- "font-style": "fontStyle",
- "font-weight": "fontWeight",
- "text-align": "textAlign",
- "alignment-baseline": "textBaseline"
- },
- Tw = /url\(\s*#(.*?)\)/,
- Cw = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,
- Dw = /([^\s:;]+)\s*:\s*([^:;]+)/g,
- Aw = N(),
- kw = {
- registerMap: function (t, e, i) {
- var n;
- return x(e) ? n = e : e.svg ? n = [{
- type: "svg",
- source: e.svg,
- specialAreas: e.specialAreas
- }] : (e.geoJson && !e.features && (i = e.specialAreas, e = e.geoJson), n = [{
- type: "geoJSON",
- source: e,
- specialAreas: i
- }]), f(n, function (t) {
- var e = t.type;
- "geoJson" === e && (e = t.type = "geoJSON");
- var i = Pw[e];
- i(t);
- }), Aw.set(t, n);
- },
- retrieveMap: function (t) {
- return Aw.get(t);
- }
- },
- Pw = {
- geoJSON: function (t) {
- var e = t.source;
- t.geoJSON = b(e) ? "undefined" != typeof JSON && JSON.parse ? JSON.parse(e) : new Function("return (" + e + ");")() : e;
- },
- svg: function (t) {
- t.svgXML = _l(t.source);
- }
- },
- Lw = O,
- Ow = f,
- zw = w,
- Ew = S,
- Rw = ax.parseClassType,
- Bw = "4.5.0",
- Nw = {
- zrender: "4.1.2"
- },
- Fw = 1,
- Gw = 1e3,
- Vw = 800,
- Hw = 900,
- Ww = 5e3,
- Uw = 1e3,
- Xw = 1100,
- Yw = 2e3,
- jw = 3e3,
- qw = 3500,
- Zw = 4e3,
- Kw = 5e3,
- $w = {
- PROCESSOR: {
- FILTER: Gw,
- SERIES_FILTER: Vw,
- STATISTIC: Ww
- },
- VISUAL: {
- LAYOUT: Uw,
- PROGRESSIVE_LAYOUT: Xw,
- GLOBAL: Yw,
- CHART: jw,
- POST_CHART_LAYOUT: qw,
- COMPONENT: Zw,
- BRUSH: Kw
- }
- },
- Qw = "__flagInMainProcess",
- Jw = "__optionUpdated",
- tb = /^[a-zA-Z0-9_]+$/;
- Pl.prototype.on = kl("on", !0), Pl.prototype.off = kl("off", !0), Pl.prototype.one = kl("one", !0), c(Pl, Yg);
- var eb = Ll.prototype;
- eb._onframe = function () {
- if (!this._disposed) {
- var t = this._scheduler;
- if (this[Jw]) {
- var e = this[Jw].silent;
- this[Qw] = !0, zl(this), ib.update.call(this), this[Qw] = !1, this[Jw] = !1, Nl.call(this, e), Fl.call(this, e);
- } else if (t.unfinished) {
- var i = Fw,
- n = this._model,
- r = this._api;
- t.unfinished = !1;
- do {
- var a = +new Date();
- t.performSeriesTasks(n), t.performDataProcessorTasks(n), Rl(this, n), t.performVisualTasks(n), Xl(this, this._model, r, "remain"), i -= +new Date() - a;
- } while (i > 0 && t.unfinished);
- t.unfinished || this._zr.flush();
- }
- }
- }, eb.getDom = function () {
- return this._dom;
- }, eb.getZr = function () {
- return this._zr;
- }, eb.setOption = function (t, e, i) {
- if (!this._disposed) {
- var n;
- if (Ew(e) && (i = e.lazyUpdate, n = e.silent, e = e.notMerge), this[Qw] = !0, !this._model || e) {
- var r = new ds(this._api),
- a = this._theme,
- o = this._model = new bx();
- o.scheduler = this._scheduler, o.init(null, null, a, r);
- }
- this._model.setOption(t, sb), i ? (this[Jw] = {
- silent: n
- }, this[Qw] = !1) : (zl(this), ib.update.call(this), this._zr.flush(), this[Jw] = !1, this[Qw] = !1, Nl.call(this, n), Fl.call(this, n));
- }
- }, eb.setTheme = function () {
- console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0");
- }, eb.getModel = function () {
- return this._model;
- }, eb.getOption = function () {
- return this._model && this._model.getOption();
- }, eb.getWidth = function () {
- return this._zr.getWidth();
- }, eb.getHeight = function () {
- return this._zr.getHeight();
- }, eb.getDevicePixelRatio = function () {
- return this._zr.painter.dpr || window.devicePixelRatio || 1;
- }, eb.getRenderedCanvas = function (t) {
- if (Mg.canvasSupported) {
- t = t || {}, t.pixelRatio = t.pixelRatio || 1, t.backgroundColor = t.backgroundColor || this._model.get("backgroundColor");
- var e = this._zr;
- return e.painter.getRenderedCanvas(t);
- }
- }, eb.getSvgDataUrl = function () {
- if (Mg.svgSupported) {
- var t = this._zr,
- e = t.storage.getDisplayList();
- return f(e, function (t) {
- t.stopAnimation(!0);
- }), t.painter.pathToDataUrl();
- }
- }, eb.getDataURL = function (t) {
- if (!this._disposed) {
- t = t || {};
- var e = t.excludeComponents,
- i = this._model,
- n = [],
- r = this;
- Ow(e, function (t) {
- i.eachComponent({
- mainType: t
- }, function (t) {
- var e = r._componentsMap[t.__viewId];
- e.group.ignore || (n.push(e), e.group.ignore = !0);
- });
- });
- var a = "svg" === this._zr.painter.getType() ? this.getSvgDataUrl() : this.getRenderedCanvas(t).toDataURL("image/" + (t && t.type || "png"));
- return Ow(n, function (t) {
- t.group.ignore = !1;
- }), a;
- }
- }, eb.getConnectedDataURL = function (t) {
- if (!this._disposed && Mg.canvasSupported) {
- var e = this.group,
- i = Math.min,
- r = Math.max,
- a = 1 / 0;
- if (fb[e]) {
- var o = a,
- s = a,
- l = -a,
- u = -a,
- h = [],
- c = t && t.pixelRatio || 1;
- f(db, function (a) {
- if (a.group === e) {
- var c = a.getRenderedCanvas(n(t)),
- d = a.getDom().getBoundingClientRect();
- o = i(d.left, o), s = i(d.top, s), l = r(d.right, l), u = r(d.bottom, u), h.push({
- dom: c,
- left: d.left,
- top: d.top
- });
- }
- }), o *= c, s *= c, l *= c, u *= c;
- var d = l - o,
- p = u - s,
- g = Eg();
- g.width = d, g.height = p;
- var m = En(g);
- return t.connectedBackgroundColor && m.add(new u_({
- shape: {
- x: 0,
- y: 0,
- width: d,
- height: p
- },
- style: {
- fill: t.connectedBackgroundColor
- }
- })), Ow(h, function (t) {
- var e = new Sn({
- style: {
- x: t.left * c - o,
- y: t.top * c - s,
- image: t.dom
- }
- });
- m.add(e);
- }), m.refreshImmediately(), g.toDataURL("image/" + (t && t.type || "png"));
- }
- return this.getDataURL(t);
- }
- }, eb.convertToPixel = _(Ol, "convertToPixel"), eb.convertFromPixel = _(Ol, "convertFromPixel"), eb.containPixel = function (t, e) {
- if (!this._disposed) {
- var i,
- n = this._model;
- return t = Kn(n, t), f(t, function (t, n) {
- n.indexOf("Models") >= 0 && f(t, function (t) {
- var r = t.coordinateSystem;
- if (r && r.containPoint) i |= !!r.containPoint(e);else if ("seriesModels" === n) {
- var a = this._chartsMap[t.__viewId];
- a && a.containPoint && (i |= a.containPoint(e, t));
- }
- }, this);
- }, this), !!i;
- }
- }, eb.getVisual = function (t, e) {
- var i = this._model;
- t = Kn(i, t, {
- defaultMainType: "series"
- });
- var n = t.seriesModel,
- r = n.getData(),
- a = t.hasOwnProperty("dataIndexInside") ? t.dataIndexInside : t.hasOwnProperty("dataIndex") ? r.indexOfRawIndex(t.dataIndex) : null;
- return null != a ? r.getItemVisual(a, e) : r.getVisual(e);
- }, eb.getViewOfComponentModel = function (t) {
- return this._componentsMap[t.__viewId];
- }, eb.getViewOfSeriesModel = function (t) {
- return this._chartsMap[t.__viewId];
- };
- var ib = {
- prepareAndUpdate: function (t) {
- zl(this), ib.update.call(this, t);
- },
- update: function (t) {
- var e = this._model,
- i = this._api,
- n = this._zr,
- r = this._coordSysMgr,
- a = this._scheduler;
- if (e) {
- a.restoreData(e, t), a.performSeriesTasks(e), r.create(e, i), a.performDataProcessorTasks(e, t), Rl(this, e), r.update(e, i), Hl(e), a.performVisualTasks(e, t), Wl(this, e, i, t);
- var o = e.get("backgroundColor") || "transparent";
- if (Mg.canvasSupported) n.setBackgroundColor(o);else {
- var s = Ze(o);
- o = ri(s, "rgb"), 0 === s[3] && (o = "transparent");
- }
- Yl(e, i);
- }
- },
- updateTransform: function (t) {
- var e = this._model,
- i = this,
- n = this._api;
- if (e) {
- var r = [];
- e.eachComponent(function (a, o) {
- var s = i.getViewOfComponentModel(o);
- if (s && s.__alive) if (s.updateTransform) {
- var l = s.updateTransform(o, e, n, t);
- l && l.update && r.push(s);
- } else r.push(s);
- });
- var a = N();
- e.eachSeries(function (r) {
- var o = i._chartsMap[r.__viewId];
- if (o.updateTransform) {
- var s = o.updateTransform(r, e, n, t);
- s && s.update && a.set(r.uid, 1);
- } else a.set(r.uid, 1);
- }), Hl(e), this._scheduler.performVisualTasks(e, t, {
- setDirty: !0,
- dirtyMap: a
- }), Xl(i, e, n, t, a), Yl(e, this._api);
- }
- },
- updateView: function (t) {
- var e = this._model;
- e && ($s.markUpdateMethod(t, "updateView"), Hl(e), this._scheduler.performVisualTasks(e, t, {
- setDirty: !0
- }), Wl(this, this._model, this._api, t), Yl(e, this._api));
- },
- updateVisual: function (t) {
- ib.update.call(this, t);
- },
- updateLayout: function (t) {
- ib.update.call(this, t);
- }
- };
- eb.resize = function (t) {
- if (!this._disposed) {
- this._zr.resize(t);
- var e = this._model;
- if (this._loadingFX && this._loadingFX.resize(), e) {
- var i = e.resetOption("media"),
- n = t && t.silent;
- this[Qw] = !0, i && zl(this), ib.update.call(this), this[Qw] = !1, Nl.call(this, n), Fl.call(this, n);
- }
- }
- }, eb.showLoading = function (t, e) {
- if (!this._disposed && (Ew(t) && (e = t, t = ""), t = t || "default", this.hideLoading(), cb[t])) {
- var i = cb[t](this._api, e),
- n = this._zr;
- this._loadingFX = i, n.add(i);
- }
- }, eb.hideLoading = function () {
- this._disposed || (this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null);
- }, eb.makeActionFromEvent = function (t) {
- var e = o({}, t);
- return e.type = ab[t.type], e;
- }, eb.dispatchAction = function (t, e) {
- if (!this._disposed && (Ew(e) || (e = {
- silent: !!e
- }), rb[t.type] && this._model)) {
- if (this[Qw]) return void this._pendingActions.push(t);
- Bl.call(this, t, e.silent), e.flush ? this._zr.flush(!0) : e.flush !== !1 && Mg.browser.weChat && this._throttledZrFlush(), Nl.call(this, e.silent), Fl.call(this, e.silent);
- }
- }, eb.appendData = function (t) {
- if (!this._disposed) {
- var e = t.seriesIndex,
- i = this.getModel(),
- n = i.getSeriesByIndex(e);
- n.appendData(t), this._scheduler.unfinished = !0;
- }
- }, eb.on = kl("on", !1), eb.off = kl("off", !1), eb.one = kl("one", !1);
- var nb = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
- eb._initEvents = function () {
- Ow(nb, function (t) {
- var e = function (e) {
- var i,
- n = this.getModel(),
- r = e.target,
- a = "globalout" === t;
- if (a) i = {};else if (r && null != r.dataIndex) {
- var s = r.dataModel || n.getSeriesByIndex(r.seriesIndex);
- i = s && s.getDataParams(r.dataIndex, r.dataType, r) || {};
- } else r && r.eventData && (i = o({}, r.eventData));
- if (i) {
- var l = i.componentType,
- u = i.componentIndex;
- ("markLine" === l || "markPoint" === l || "markArea" === l) && (l = "series", u = i.seriesIndex);
- var h = l && null != u && n.getComponent(l, u),
- c = h && this["series" === h.mainType ? "_chartsMap" : "_componentsMap"][h.__viewId];
- i.event = e, i.type = t, this._ecEventProcessor.eventInfo = {
- targetEl: r,
- packedEvent: i,
- model: h,
- view: c
- }, this.trigger(t, i);
- }
- };
- e.zrEventfulCallAtLast = !0, this._zr.on(t, e, this);
- }, this), Ow(ab, function (t, e) {
- this._messageCenter.on(e, function (t) {
- this.trigger(e, t);
- }, this);
- }, this);
- }, eb.isDisposed = function () {
- return this._disposed;
- }, eb.clear = function () {
- this._disposed || this.setOption({
- series: []
- }, !0);
- }, eb.dispose = function () {
- if (!this._disposed) {
- this._disposed = !0, Qn(this.getDom(), mb, "");
- var t = this._api,
- e = this._model;
- Ow(this._componentsViews, function (i) {
- i.dispose(e, t);
- }), Ow(this._chartsViews, function (i) {
- i.dispose(e, t);
- }), this._zr.dispose(), delete db[this.id];
- }
- }, c(Ll, Yg), $l.prototype = {
- constructor: $l,
- normalizeQuery: function (t) {
- var e = {},
- i = {},
- n = {};
- if (b(t)) {
- var r = Rw(t);
- e.mainType = r.main || null, e.subType = r.sub || null;
- } else {
- var a = ["Index", "Name", "Id"],
- o = {
- name: 1,
- dataIndex: 1,
- dataType: 1
- };
- f(t, function (t, r) {
- for (var s = !1, l = 0; l < a.length; l++) {
- var u = a[l],
- h = r.lastIndexOf(u);
- if (h > 0 && h === r.length - u.length) {
- var c = r.slice(0, h);
- "data" !== c && (e.mainType = c, e[u.toLowerCase()] = t, s = !0);
- }
- }
- o.hasOwnProperty(r) && (i[r] = t, s = !0), s || (n[r] = t);
- });
- }
- return {
- cptQuery: e,
- dataQuery: i,
- otherQuery: n
- };
- },
- filter: function (t, e) {
- function i(t, e, i, n) {
- return null == t[i] || e[n || i] === t[i];
- }
- var n = this.eventInfo;
- if (!n) return !0;
- var r = n.targetEl,
- a = n.packedEvent,
- o = n.model,
- s = n.view;
- if (!o || !s) return !0;
- var l = e.cptQuery,
- u = e.dataQuery;
- return i(l, o, "mainType") && i(l, o, "subType") && i(l, o, "index", "componentIndex") && i(l, o, "name") && i(l, o, "id") && i(u, a, "name") && i(u, a, "dataIndex") && i(u, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(t, e.otherQuery, r, a));
- },
- afterTrigger: function () {
- this.eventInfo = null;
- }
- };
- var rb = {},
- ab = {},
- ob = [],
- sb = [],
- lb = [],
- ub = [],
- hb = {},
- cb = {},
- db = {},
- fb = {},
- pb = new Date() - 0,
- gb = new Date() - 0,
- mb = "_echarts_instance_",
- vb = eu;
- fu(Yw, rw), ou(Rx), su(Hw, Bx), gu("default", lw), uu({
- type: "highlight",
- event: "highlight",
- update: "highlight"
- }, G), uu({
- type: "downplay",
- event: "downplay",
- update: "downplay"
- }, G), au("light", mw), au("dark", xw);
- var yb = {};
- Mu.prototype = {
- constructor: Mu,
- add: function (t) {
- return this._add = t, this;
- },
- update: function (t) {
- return this._update = t, this;
- },
- remove: function (t) {
- return this._remove = t, this;
- },
- execute: function () {
- var t,
- e = this._old,
- i = this._new,
- n = {},
- r = {},
- a = [],
- o = [];
- for (Iu(e, n, a, "_oldKeyGetter", this), Iu(i, r, o, "_newKeyGetter", this), t = 0; t < e.length; t++) {
- var s = a[t],
- l = r[s];
- if (null != l) {
- var u = l.length;
- u ? (1 === u && (r[s] = null), l = l.shift()) : r[s] = null, this._update && this._update(l, t);
- } else this._remove && this._remove(t);
- }
- for (var t = 0; t < o.length; t++) {
- var s = o[t];
- if (r.hasOwnProperty(s)) {
- var l = r[s];
- if (null == l) continue;
- if (l.length) for (var h = 0, u = l.length; u > h; h++) this._add && this._add(l[h]);else this._add && this._add(l);
- }
- }
- }
- };
- var _b = N(["tooltip", "label", "itemName", "itemId", "seriesName"]),
- xb = S,
- wb = "undefined",
- bb = -1,
- Sb = "e\x00\x00",
- Mb = {
- "float": typeof Float64Array === wb ? Array : Float64Array,
- "int": typeof Int32Array === wb ? Array : Int32Array,
- ordinal: Array,
- number: Array,
- time: Array
- },
- Ib = typeof Uint32Array === wb ? Array : Uint32Array,
- Tb = typeof Int32Array === wb ? Array : Int32Array,
- Cb = typeof Uint16Array === wb ? Array : Uint16Array,
- Db = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_rawData", "_chunkSize", "_chunkCount", "_dimValueGetter", "_count", "_rawCount", "_nameDimIdx", "_idDimIdx"],
- Ab = ["_extent", "_approximateExtent", "_rawExtent"],
- kb = function (t, e) {
- t = t || ["x", "y"];
- for (var i = {}, n = [], r = {}, a = 0; a < t.length; a++) {
- var o = t[a];
- b(o) && (o = {
- name: o
- });
- var s = o.name;
- o.type = o.type || "float", o.coordDim || (o.coordDim = s, o.coordDimIndex = 0), o.otherDims = o.otherDims || {}, n.push(s), i[s] = o, o.index = a, o.createInvertedIndices && (r[s] = []);
- }
- this.dimensions = n, this._dimensionInfos = i, this.hostModel = e, this.dataType, this._indices = null, this._count = 0, this._rawCount = 0, this._storage = {}, this._nameList = [], this._idList = [], this._optionModels = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this.hasItemVisual = {}, this._itemLayouts = [], this._graphicEls = [], this._chunkSize = 1e5, this._chunkCount = 0, this._rawData, this._rawExtent = {}, this._extent = {}, this._approximateExtent = {}, this._dimensionsSummary = Tu(this), this._invertedIndicesMap = r, this._calculationInfo = {}, this.userOutput = this._dimensionsSummary.userOutput;
- },
- Pb = kb.prototype;
- Pb.type = "list", Pb.hasItemOption = !0, Pb.getDimension = function (t) {
- return ("number" == typeof t || !isNaN(t) && !this._dimensionInfos.hasOwnProperty(t)) && (t = this.dimensions[t]), t;
- }, Pb.getDimensionInfo = function (t) {
- return this._dimensionInfos[this.getDimension(t)];
- }, Pb.getDimensionsOnCoord = function () {
- return this._dimensionsSummary.dataDimsOnCoord.slice();
- }, Pb.mapDimension = function (t, e) {
- var i = this._dimensionsSummary;
- if (null == e) return i.encodeFirstDimNotExtra[t];
- var n = i.encode[t];
- return e === !0 ? (n || []).slice() : n && n[e];
- }, Pb.initData = function (t, e, i) {
- var n = Uo.isInstance(t) || d(t);
- n && (t = new ks(t, this.dimensions.length)), this._rawData = t, this._storage = {}, this._indices = null, this._nameList = e || [], this._idList = [], this._nameRepeatCount = {}, i || (this.hasItemOption = !1), this.defaultDimValueGetter = Vx[this._rawData.getSource().sourceFormat], this._dimValueGetter = i = i || this.defaultDimValueGetter, this._dimValueGetterArrayRows = Vx.arrayRows, this._rawExtent = {}, this._initDataFromProvider(0, t.count()), t.pure && (this.hasItemOption = !1);
- }, Pb.getProvider = function () {
- return this._rawData;
- }, Pb.appendData = function (t) {
- var e = this._rawData,
- i = this.count();
- e.appendData(t);
- var n = e.count();
- e.persistent || (n += i), this._initDataFromProvider(i, n);
- }, Pb.appendValues = function (t, e) {
- for (var i = this._chunkSize, n = this._storage, r = this.dimensions, a = r.length, o = this._rawExtent, s = this.count(), l = s + Math.max(t.length, e ? e.length : 0), u = this._chunkCount, h = 0; a > h; h++) {
- var c = r[h];
- o[c] || (o[c] = Hu()), n[c] || (n[c] = []), Ou(n, this._dimensionInfos[c], i, u, l), this._chunkCount = n[c].length;
- }
- for (var d = new Array(a), f = s; l > f; f++) {
- for (var p = f - s, g = Math.floor(f / i), m = f % i, v = 0; a > v; v++) {
- var c = r[v],
- y = this._dimValueGetterArrayRows(t[p] || d, c, p, v);
- n[c][g][m] = y;
- var _ = o[c];
- y < _[0] && (_[0] = y), y > _[1] && (_[1] = y);
- }
- e && (this._nameList[f] = e[p]);
- }
- this._rawCount = this._count = l, this._extent = {}, zu(this);
- }, Pb._initDataFromProvider = function (t, e) {
- if (!(t >= e)) {
- for (var i, n = this._chunkSize, r = this._rawData, a = this._storage, o = this.dimensions, s = o.length, l = this._dimensionInfos, u = this._nameList, h = this._idList, c = this._rawExtent, d = this._nameRepeatCount = {}, f = this._chunkCount, p = 0; s > p; p++) {
- var g = o[p];
- c[g] || (c[g] = Hu());
- var m = l[g];
- 0 === m.otherDims.itemName && (i = this._nameDimIdx = p), 0 === m.otherDims.itemId && (this._idDimIdx = p), a[g] || (a[g] = []), Ou(a, m, n, f, e), this._chunkCount = a[g].length;
- }
- for (var v = new Array(s), y = t; e > y; y++) {
- v = r.getItem(y, v);
- for (var _ = Math.floor(y / n), x = y % n, w = 0; s > w; w++) {
- var g = o[w],
- b = a[g][_],
- S = this._dimValueGetter(v, g, y, w);
- b[x] = S;
- var M = c[g];
- S < M[0] && (M[0] = S), S > M[1] && (M[1] = S);
- }
- if (!r.pure) {
- var I = u[y];
- if (v && null == I) if (null != v.name) u[y] = I = v.name;else if (null != i) {
- var T = o[i],
- C = a[T][_];
- if (C) {
- I = C[x];
- var D = l[T].ordinalMeta;
- D && D.categories.length && (I = D.categories[I]);
- }
- }
- var A = null == v ? null : v.id;
- null == A && null != I && (d[I] = d[I] || 0, A = I, d[I] > 0 && (A += "__ec__" + d[I]), d[I]++), null != A && (h[y] = A);
- }
- }
- !r.persistent && r.clean && r.clean(), this._rawCount = this._count = e, this._extent = {}, zu(this);
- }
- }, Pb.count = function () {
- return this._count;
- }, Pb.getIndices = function () {
- var t,
- e = this._indices;
- if (e) {
- var i = e.constructor,
- n = this._count;
- if (i === Array) {
- t = new i(n);
- for (var r = 0; n > r; r++) t[r] = e[r];
- } else t = new i(e.buffer, 0, n);
- } else for (var i = ku(this), t = new i(this.count()), r = 0; r < t.length; r++) t[r] = r;
- return t;
- }, Pb.get = function (t, e) {
- if (!(e >= 0 && e < this._count)) return 0 / 0;
- var i = this._storage;
- if (!i[t]) return 0 / 0;
- e = this.getRawIndex(e);
- var n = Math.floor(e / this._chunkSize),
- r = e % this._chunkSize,
- a = i[t][n],
- o = a[r];
- return o;
- }, Pb.getByRawIndex = function (t, e) {
- if (!(e >= 0 && e < this._rawCount)) return 0 / 0;
- var i = this._storage[t];
- if (!i) return 0 / 0;
- var n = Math.floor(e / this._chunkSize),
- r = e % this._chunkSize,
- a = i[n];
- return a[r];
- }, Pb._getFast = function (t, e) {
- var i = Math.floor(e / this._chunkSize),
- n = e % this._chunkSize,
- r = this._storage[t][i];
- return r[n];
- }, Pb.getValues = function (t, e) {
- var i = [];
- x(t) || (e = t, t = this.dimensions);
- for (var n = 0, r = t.length; r > n; n++) i.push(this.get(t[n], e));
- return i;
- }, Pb.hasValue = function (t) {
- for (var e = this._dimensionsSummary.dataDimsOnCoord, i = 0, n = e.length; n > i; i++) if (isNaN(this.get(e[i], t))) return !1;
- return !0;
- }, Pb.getDataExtent = function (t) {
- t = this.getDimension(t);
- var e = this._storage[t],
- i = Hu();
- if (!e) return i;
- var n,
- r = this.count(),
- a = !this._indices;
- if (a) return this._rawExtent[t].slice();
- if (n = this._extent[t]) return n.slice();
- n = i;
- for (var o = n[0], s = n[1], l = 0; r > l; l++) {
- var u = this._getFast(t, this.getRawIndex(l));
- o > u && (o = u), u > s && (s = u);
- }
- return n = [o, s], this._extent[t] = n, n;
- }, Pb.getApproximateExtent = function (t) {
- return t = this.getDimension(t), this._approximateExtent[t] || this.getDataExtent(t);
- }, Pb.setApproximateExtent = function (t, e) {
- e = this.getDimension(e), this._approximateExtent[e] = t.slice();
- }, Pb.getCalculationInfo = function (t) {
- return this._calculationInfo[t];
- }, Pb.setCalculationInfo = function (t, e) {
- xb(t) ? o(this._calculationInfo, t) : this._calculationInfo[t] = e;
- }, Pb.getSum = function (t) {
- var e = this._storage[t],
- i = 0;
- if (e) for (var n = 0, r = this.count(); r > n; n++) {
- var a = this.get(t, n);
- isNaN(a) || (i += a);
- }
- return i;
- }, Pb.getMedian = function (t) {
- var e = [];
- this.each(t, function (t) {
- isNaN(t) || e.push(t);
- });
- var i = [].concat(e).sort(function (t, e) {
- return t - e;
- }),
- n = this.count();
- return 0 === n ? 0 : n % 2 === 1 ? i[(n - 1) / 2] : (i[n / 2] + i[n / 2 - 1]) / 2;
- }, Pb.rawIndexOf = function (t, e) {
- var i = t && this._invertedIndicesMap[t],
- n = i[e];
- return null == n || isNaN(n) ? bb : n;
- }, Pb.indexOfName = function (t) {
- for (var e = 0, i = this.count(); i > e; e++) if (this.getName(e) === t) return e;
- return -1;
- }, Pb.indexOfRawIndex = function (t) {
- if (t >= this._rawCount || 0 > t) return -1;
- if (!this._indices) return t;
- var e = this._indices,
- i = e[t];
- if (null != i && i < this._count && i === t) return t;
- for (var n = 0, r = this._count - 1; r >= n;) {
- var a = (n + r) / 2 | 0;
- if (e[a] < t) n = a + 1;else {
- if (!(e[a] > t)) return a;
- r = a - 1;
- }
- }
- return -1;
- }, Pb.indicesOfNearest = function (t, e, i) {
- var n = this._storage,
- r = n[t],
- a = [];
- if (!r) return a;
- null == i && (i = 1 / 0);
- for (var o = Number.MAX_VALUE, s = -1, l = 0, u = this.count(); u > l; l++) {
- var h = e - this.get(t, l),
- c = Math.abs(h);
- i >= h && o >= c && ((o > c || h >= 0 && 0 > s) && (o = c, s = h, a.length = 0), a.push(l));
- }
- return a;
- }, Pb.getRawIndex = Ru, Pb.getRawDataItem = function (t) {
- if (this._rawData.persistent) return this._rawData.getItem(this.getRawIndex(t));
- for (var e = [], i = 0; i < this.dimensions.length; i++) {
- var n = this.dimensions[i];
- e.push(this.get(n, t));
- }
- return e;
- }, Pb.getName = function (t) {
- var e = this.getRawIndex(t);
- return this._nameList[e] || Eu(this, this._nameDimIdx, e) || "";
- }, Pb.getId = function (t) {
- return Nu(this, this.getRawIndex(t));
- }, Pb.each = function (t, e, i, n) {
- if (this._count) {
- "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this, t = p(Fu(t), this.getDimension, this);
- for (var r = t.length, a = 0; a < this.count(); a++) switch (r) {
- case 0:
- e.call(i, a);
- break;
- case 1:
- e.call(i, this.get(t[0], a), a);
- break;
- case 2:
- e.call(i, this.get(t[0], a), this.get(t[1], a), a);
- break;
- default:
- for (var o = 0, s = []; r > o; o++) s[o] = this.get(t[o], a);
- s[o] = a, e.apply(i, s);
- }
- }
- }, Pb.filterSelf = function (t, e, i, n) {
- if (this._count) {
- "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this, t = p(Fu(t), this.getDimension, this);
- for (var r = this.count(), a = ku(this), o = new a(r), s = [], l = t.length, u = 0, h = t[0], c = 0; r > c; c++) {
- var d,
- f = this.getRawIndex(c);
- if (0 === l) d = e.call(i, c);else if (1 === l) {
- var g = this._getFast(h, f);
- d = e.call(i, g, c);
- } else {
- for (var m = 0; l > m; m++) s[m] = this._getFast(h, f);
- s[m] = c, d = e.apply(i, s);
- }
- d && (o[u++] = f);
- }
- return r > u && (this._indices = o), this._count = u, this._extent = {}, this.getRawIndex = this._indices ? Bu : Ru, this;
- }
- }, Pb.selectRange = function (t) {
- if (this._count) {
- var e = [];
- for (var i in t) t.hasOwnProperty(i) && e.push(i);
- var n = e.length;
- if (n) {
- var r = this.count(),
- a = ku(this),
- o = new a(r),
- s = 0,
- l = e[0],
- u = t[l][0],
- h = t[l][1],
- c = !1;
- if (!this._indices) {
- var d = 0;
- if (1 === n) {
- for (var f = this._storage[e[0]], p = 0; p < this._chunkCount; p++) for (var g = f[p], m = Math.min(this._count - p * this._chunkSize, this._chunkSize), v = 0; m > v; v++) {
- var y = g[v];
- (y >= u && h >= y || isNaN(y)) && (o[s++] = d), d++;
- }
- c = !0;
- } else if (2 === n) {
- for (var f = this._storage[l], _ = this._storage[e[1]], x = t[e[1]][0], w = t[e[1]][1], p = 0; p < this._chunkCount; p++) for (var g = f[p], b = _[p], m = Math.min(this._count - p * this._chunkSize, this._chunkSize), v = 0; m > v; v++) {
- var y = g[v],
- S = b[v];
- (y >= u && h >= y || isNaN(y)) && (S >= x && w >= S || isNaN(S)) && (o[s++] = d), d++;
- }
- c = !0;
- }
- }
- if (!c) if (1 === n) for (var v = 0; r > v; v++) {
- var M = this.getRawIndex(v),
- y = this._getFast(l, M);
- (y >= u && h >= y || isNaN(y)) && (o[s++] = M);
- } else for (var v = 0; r > v; v++) {
- for (var I = !0, M = this.getRawIndex(v), p = 0; n > p; p++) {
- var T = e[p],
- y = this._getFast(i, M);
- (y < t[T][0] || y > t[T][1]) && (I = !1);
- }
- I && (o[s++] = this.getRawIndex(v));
- }
- return r > s && (this._indices = o), this._count = s, this._extent = {}, this.getRawIndex = this._indices ? Bu : Ru, this;
- }
- }
- }, Pb.mapArray = function (t, e, i, n) {
- "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this;
- var r = [];
- return this.each(t, function () {
- r.push(e && e.apply(this, arguments));
- }, i), r;
- }, Pb.map = function (t, e, i, n) {
- i = i || n || this, t = p(Fu(t), this.getDimension, this);
- var r = Gu(this, t);
- r._indices = this._indices, r.getRawIndex = r._indices ? Bu : Ru;
- for (var a = r._storage, o = [], s = this._chunkSize, l = t.length, u = this.count(), h = [], c = r._rawExtent, d = 0; u > d; d++) {
- for (var f = 0; l > f; f++) h[f] = this.get(t[f], d);
- h[l] = d;
- var g = e && e.apply(i, h);
- if (null != g) {
- "object" != typeof g && (o[0] = g, g = o);
- for (var m = this.getRawIndex(d), v = Math.floor(m / s), y = m % s, _ = 0; _ < g.length; _++) {
- var x = t[_],
- w = g[_],
- b = c[x],
- S = a[x];
- S && (S[v][y] = w), w < b[0] && (b[0] = w), w > b[1] && (b[1] = w);
- }
- }
- }
- return r;
- }, Pb.downSample = function (t, e, i, n) {
- for (var r = Gu(this, [t]), a = r._storage, o = [], s = Math.floor(1 / e), l = a[t], u = this.count(), h = this._chunkSize, c = r._rawExtent[t], d = new (ku(this))(u), f = 0, p = 0; u > p; p += s) {
- s > u - p && (s = u - p, o.length = s);
- for (var g = 0; s > g; g++) {
- var m = this.getRawIndex(p + g),
- v = Math.floor(m / h),
- y = m % h;
- o[g] = l[v][y];
- }
- var _ = i(o),
- x = this.getRawIndex(Math.min(p + n(o, _) || 0, u - 1)),
- w = Math.floor(x / h),
- b = x % h;
- l[w][b] = _, _ < c[0] && (c[0] = _), _ > c[1] && (c[1] = _), d[f++] = x;
- }
- return r._count = f, r._indices = d, r.getRawIndex = Bu, r;
- }, Pb.getItemModel = function (t) {
- var e = this.hostModel;
- return new Ja(this.getRawDataItem(t), e, e && e.ecModel);
- }, Pb.diff = function (t) {
- var e = this;
- return new Mu(t ? t.getIndices() : [], this.getIndices(), function (e) {
- return Nu(t, e);
- }, function (t) {
- return Nu(e, t);
- });
- }, Pb.getVisual = function (t) {
- var e = this._visual;
- return e && e[t];
- }, Pb.setVisual = function (t, e) {
- if (xb(t)) for (var i in t) t.hasOwnProperty(i) && this.setVisual(i, t[i]);else this._visual = this._visual || {}, this._visual[t] = e;
- }, Pb.setLayout = function (t, e) {
- if (xb(t)) for (var i in t) t.hasOwnProperty(i) && this.setLayout(i, t[i]);else this._layout[t] = e;
- }, Pb.getLayout = function (t) {
- return this._layout[t];
- }, Pb.getItemLayout = function (t) {
- return this._itemLayouts[t];
- }, Pb.setItemLayout = function (t, e, i) {
- this._itemLayouts[t] = i ? o(this._itemLayouts[t] || {}, e) : e;
- }, Pb.clearItemLayouts = function () {
- this._itemLayouts.length = 0;
- }, Pb.getItemVisual = function (t, e, i) {
- var n = this._itemVisuals[t],
- r = n && n[e];
- return null != r || i ? r : this.getVisual(e);
- }, Pb.setItemVisual = function (t, e, i) {
- var n = this._itemVisuals[t] || {},
- r = this.hasItemVisual;
- if (this._itemVisuals[t] = n, xb(e)) for (var a in e) e.hasOwnProperty(a) && (n[a] = e[a], r[a] = !0);else n[e] = i, r[e] = !0;
- }, Pb.clearAllVisual = function () {
- this._visual = {}, this._itemVisuals = [], this.hasItemVisual = {};
- };
- var Lb = function (t) {
- t.seriesIndex = this.seriesIndex, t.dataIndex = this.dataIndex, t.dataType = this.dataType;
- };
- Pb.setItemGraphicEl = function (t, e) {
- var i = this.hostModel;
- e && (e.dataIndex = t, e.dataType = this.dataType, e.seriesIndex = i && i.seriesIndex, "group" === e.type && e.traverse(Lb, e)), this._graphicEls[t] = e;
- }, Pb.getItemGraphicEl = function (t) {
- return this._graphicEls[t];
- }, Pb.eachItemGraphicEl = function (t, e) {
- f(this._graphicEls, function (i, n) {
- i && t && t.call(e, i, n);
- });
- }, Pb.cloneShallow = function (t) {
- if (!t) {
- var e = p(this.dimensions, this.getDimensionInfo, this);
- t = new kb(e, this.hostModel);
- }
- if (t._storage = this._storage, Lu(t, this), this._indices) {
- var i = this._indices.constructor;
- t._indices = new i(this._indices);
- } else t._indices = null;
- return t.getRawIndex = t._indices ? Bu : Ru, t;
- }, Pb.wrapMethod = function (t, e) {
- var i = this[t];
- "function" == typeof i && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(t), this[t] = function () {
- var t = i.apply(this, arguments);
- return e.apply(this, [t].concat(P(arguments)));
- });
- }, Pb.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "map"], Pb.CHANGABLE_METHODS = ["filterSelf", "selectRange"];
- var Ob = function (t, e) {
- return e = e || {}, Wu(e.coordDimensions || [], t, {
- dimsDef: e.dimensionsDefine || t.dimensionsDefine,
- encodeDef: e.encodeDefine || t.encodeDefine,
- dimCount: e.dimensionsCount,
- generateCoord: e.generateCoord,
- generateCoordCount: e.generateCoordCount
- });
- };
- Qu.prototype.parse = function (t) {
- return t;
- }, Qu.prototype.getSetting = function (t) {
- return this._setting[t];
- }, Qu.prototype.contain = function (t) {
- var e = this._extent;
- return t >= e[0] && t <= e[1];
- }, Qu.prototype.normalize = function (t) {
- var e = this._extent;
- return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0]);
- }, Qu.prototype.scale = function (t) {
- var e = this._extent;
- return t * (e[1] - e[0]) + e[0];
- }, Qu.prototype.unionExtent = function (t) {
- var e = this._extent;
- t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]);
- }, Qu.prototype.unionExtentFromData = function (t, e) {
- this.unionExtent(t.getApproximateExtent(e));
- }, Qu.prototype.getExtent = function () {
- return this._extent.slice();
- }, Qu.prototype.setExtent = function (t, e) {
- var i = this._extent;
- isNaN(t) || (i[0] = t), isNaN(e) || (i[1] = e);
- }, Qu.prototype.isBlank = function () {
- return this._isBlank;
- }, Qu.prototype.setBlank = function (t) {
- this._isBlank = t;
- }, Qu.prototype.getLabel = null, nr(Qu), sr(Qu, {
- registerWhenExtend: !0
- }), Ju.createByAxisModel = function (t) {
- var e = t.option,
- i = e.data,
- n = i && p(i, eh);
- return new Ju({
- categories: n,
- needCollect: !n,
- deduplication: e.dedplication !== !1
- });
- };
- var zb = Ju.prototype;
- zb.getOrdinal = function (t) {
- return th(this).get(t);
- }, zb.parseAndCollect = function (t) {
- var e,
- i = this._needCollect;
- if ("string" != typeof t && !i) return t;
- if (i && !this._deduplication) return e = this.categories.length, this.categories[e] = t, e;
- var n = th(this);
- return e = n.get(t), null == e && (i ? (e = this.categories.length, this.categories[e] = t, n.set(t, e)) : e = 0 / 0), e;
- };
- var Eb = Qu.prototype,
- Rb = Qu.extend({
- type: "ordinal",
- init: function (t, e) {
- (!t || x(t)) && (t = new Ju({
- categories: t
- })), this._ordinalMeta = t, this._extent = e || [0, t.categories.length - 1];
- },
- parse: function (t) {
- return "string" == typeof t ? this._ordinalMeta.getOrdinal(t) : Math.round(t);
- },
- contain: function (t) {
- return t = this.parse(t), Eb.contain.call(this, t) && null != this._ordinalMeta.categories[t];
- },
- normalize: function (t) {
- return Eb.normalize.call(this, this.parse(t));
- },
- scale: function (t) {
- return Math.round(Eb.scale.call(this, t));
- },
- getTicks: function () {
- for (var t = [], e = this._extent, i = e[0]; i <= e[1];) t.push(i), i++;
- return t;
- },
- getLabel: function (t) {
- return this.isBlank() ? void 0 : this._ordinalMeta.categories[t];
- },
- count: function () {
- return this._extent[1] - this._extent[0] + 1;
- },
- unionExtentFromData: function (t, e) {
- this.unionExtent(t.getApproximateExtent(e));
- },
- getOrdinalMeta: function () {
- return this._ordinalMeta;
- },
- niceTicks: G,
- niceExtent: G
- });
- Rb.create = function () {
- return new Rb();
- };
- var Bb = lo,
- Nb = lo,
- Fb = Qu.extend({
- type: "interval",
- _interval: 0,
- _intervalPrecision: 2,
- setExtent: function (t, e) {
- var i = this._extent;
- isNaN(t) || (i[0] = parseFloat(t)), isNaN(e) || (i[1] = parseFloat(e));
- },
- unionExtent: function (t) {
- var e = this._extent;
- t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]), Fb.prototype.setExtent.call(this, e[0], e[1]);
- },
- getInterval: function () {
- return this._interval;
- },
- setInterval: function (t) {
- this._interval = t, this._niceExtent = this._extent.slice(), this._intervalPrecision = nh(t);
- },
- getTicks: function () {
- return oh(this._interval, this._extent, this._niceExtent, this._intervalPrecision);
- },
- getLabel: function (t, e) {
- if (null == t) return "";
- var i = e && e.precision;
- return null == i ? i = co(t) || 0 : "auto" === i && (i = this._intervalPrecision), t = Nb(t, i, !0), Mo(t);
- },
- niceTicks: function (t, e, i) {
- t = t || 5;
- var n = this._extent,
- r = n[1] - n[0];
- if (isFinite(r)) {
- 0 > r && (r = -r, n.reverse());
- var a = ih(n, t, e, i);
- this._intervalPrecision = a.intervalPrecision, this._interval = a.interval, this._niceExtent = a.niceTickExtent;
- }
- },
- niceExtent: function (t) {
- var e = this._extent;
- if (e[0] === e[1]) if (0 !== e[0]) {
- var i = e[0];
- t.fixMax ? e[0] -= i / 2 : (e[1] += i / 2, e[0] -= i / 2);
- } else e[1] = 1;
- var n = e[1] - e[0];
- isFinite(n) || (e[0] = 0, e[1] = 1), this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
- var r = this._interval;
- t.fixMin || (e[0] = Nb(Math.floor(e[0] / r) * r)), t.fixMax || (e[1] = Nb(Math.ceil(e[1] / r) * r));
- }
- });
- Fb.create = function () {
- return new Fb();
- };
- var Gb = "__ec_stack_",
- Vb = .5,
- Hb = "undefined" != typeof Float32Array ? Float32Array : Array,
- Wb = {
- seriesType: "bar",
- plan: Kx(),
- reset: function (t) {
- function e(t, e) {
- for (var i, c = t.count, d = new Hb(2 * c), f = new Hb(c), p = [], g = [], m = 0, v = 0; null != (i = t.next());) g[u] = e.get(o, i), g[1 - u] = e.get(s, i), p = n.dataToPoint(g, null, p), d[m++] = p[0], d[m++] = p[1], f[v++] = i;
- e.setLayout({
- largePoints: d,
- largeDataIndices: f,
- barWidth: h,
- valueAxisStart: vh(r, a, !1),
- valueAxisHorizontal: l
- });
- }
- if (gh(t) && mh(t)) {
- var i = t.getData(),
- n = t.coordinateSystem,
- r = n.getBaseAxis(),
- a = n.getOtherAxis(r),
- o = i.mapDimension(a.dim),
- s = i.mapDimension(r.dim),
- l = a.isHorizontal(),
- u = l ? 0 : 1,
- h = fh(ch([t]), r, t).width;
- return h > Vb || (h = Vb), {
- progress: e
- };
- }
- }
- },
- Ub = Fb.prototype,
- Xb = Math.ceil,
- Yb = Math.floor,
- jb = 1e3,
- qb = 60 * jb,
- Zb = 60 * qb,
- Kb = 24 * Zb,
- $b = function (t, e, i, n) {
- for (; n > i;) {
- var r = i + n >>> 1;
- t[r][1] < e ? i = r + 1 : n = r;
- }
- return i;
- },
- Qb = Fb.extend({
- type: "time",
- getLabel: function (t) {
- var e = this._stepLvl,
- i = new Date(t);
- return Po(e[0], i, this.getSetting("useUTC"));
- },
- niceExtent: function (t) {
- var e = this._extent;
- if (e[0] === e[1] && (e[0] -= Kb, e[1] += Kb), e[1] === -1 / 0 && 1 / 0 === e[0]) {
- var i = new Date();
- e[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), e[0] = e[1] - Kb;
- }
- this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
- var n = this._interval;
- t.fixMin || (e[0] = lo(Yb(e[0] / n) * n)), t.fixMax || (e[1] = lo(Xb(e[1] / n) * n));
- },
- niceTicks: function (t, e, i) {
- t = t || 10;
- var n = this._extent,
- r = n[1] - n[0],
- a = r / t;
- null != e && e > a && (a = e), null != i && a > i && (a = i);
- var o = Jb.length,
- s = $b(Jb, a, 0, o),
- l = Jb[Math.min(s, o - 1)],
- u = l[1];
- if ("year" === l[0]) {
- var h = r / u,
- c = xo(h / t, !0);
- u *= c;
- }
- var d = this.getSetting("useUTC") ? 0 : 60 * new Date(+n[0] || +n[1]).getTimezoneOffset() * 1e3,
- f = [Math.round(Xb((n[0] - d) / u) * u + d), Math.round(Yb((n[1] - d) / u) * u + d)];
- ah(f, n), this._stepLvl = l, this._interval = u, this._niceExtent = f;
- },
- parse: function (t) {
- return +vo(t);
- }
- });
- f(["contain", "normalize"], function (t) {
- Qb.prototype[t] = function (e) {
- return Ub[t].call(this, this.parse(e));
- };
- });
- var Jb = [["hh:mm:ss", jb], ["hh:mm:ss", 5 * jb], ["hh:mm:ss", 10 * jb], ["hh:mm:ss", 15 * jb], ["hh:mm:ss", 30 * jb], ["hh:mm\nMM-dd", qb], ["hh:mm\nMM-dd", 5 * qb], ["hh:mm\nMM-dd", 10 * qb], ["hh:mm\nMM-dd", 15 * qb], ["hh:mm\nMM-dd", 30 * qb], ["hh:mm\nMM-dd", Zb], ["hh:mm\nMM-dd", 2 * Zb], ["hh:mm\nMM-dd", 6 * Zb], ["hh:mm\nMM-dd", 12 * Zb], ["MM-dd\nyyyy", Kb], ["MM-dd\nyyyy", 2 * Kb], ["MM-dd\nyyyy", 3 * Kb], ["MM-dd\nyyyy", 4 * Kb], ["MM-dd\nyyyy", 5 * Kb], ["MM-dd\nyyyy", 6 * Kb], ["week", 7 * Kb], ["MM-dd\nyyyy", 10 * Kb], ["week", 14 * Kb], ["week", 21 * Kb], ["month", 31 * Kb], ["week", 42 * Kb], ["month", 62 * Kb], ["week", 70 * Kb], ["quarter", 95 * Kb], ["month", 31 * Kb * 4], ["month", 31 * Kb * 5], ["half-year", 380 * Kb / 2], ["month", 31 * Kb * 8], ["month", 31 * Kb * 10], ["year", 380 * Kb]];
- Qb.create = function (t) {
- return new Qb({
- useUTC: t.ecModel.get("useUTC")
- });
- };
- var tS = Qu.prototype,
- eS = Fb.prototype,
- iS = co,
- nS = lo,
- rS = Math.floor,
- aS = Math.ceil,
- oS = Math.pow,
- sS = Math.log,
- lS = Qu.extend({
- type: "log",
- base: 10,
- $constructor: function () {
- Qu.apply(this, arguments), this._originalScale = new Fb();
- },
- getTicks: function () {
- var t = this._originalScale,
- e = this._extent,
- i = t.getExtent();
- return p(eS.getTicks.call(this), function (n) {
- var r = lo(oS(this.base, n));
- return r = n === e[0] && t.__fixMin ? yh(r, i[0]) : r, r = n === e[1] && t.__fixMax ? yh(r, i[1]) : r;
- }, this);
- },
- getLabel: eS.getLabel,
- scale: function (t) {
- return t = tS.scale.call(this, t), oS(this.base, t);
- },
- setExtent: function (t, e) {
- var i = this.base;
- t = sS(t) / sS(i), e = sS(e) / sS(i), eS.setExtent.call(this, t, e);
- },
- getExtent: function () {
- var t = this.base,
- e = tS.getExtent.call(this);
- e[0] = oS(t, e[0]), e[1] = oS(t, e[1]);
- var i = this._originalScale,
- n = i.getExtent();
- return i.__fixMin && (e[0] = yh(e[0], n[0])), i.__fixMax && (e[1] = yh(e[1], n[1])), e;
- },
- unionExtent: function (t) {
- this._originalScale.unionExtent(t);
- var e = this.base;
- t[0] = sS(t[0]) / sS(e), t[1] = sS(t[1]) / sS(e), tS.unionExtent.call(this, t);
- },
- unionExtentFromData: function (t, e) {
- this.unionExtent(t.getApproximateExtent(e));
- },
- niceTicks: function (t) {
- t = t || 10;
- var e = this._extent,
- i = e[1] - e[0];
- if (!(1 / 0 === i || 0 >= i)) {
- var n = yo(i),
- r = t / i * n;
- for (.5 >= r && (n *= 10); !isNaN(n) && Math.abs(n) < 1 && Math.abs(n) > 0;) n *= 10;
- var a = [lo(aS(e[0] / n) * n), lo(rS(e[1] / n) * n)];
- this._interval = n, this._niceExtent = a;
- }
- },
- niceExtent: function (t) {
- eS.niceExtent.call(this, t);
- var e = this._originalScale;
- e.__fixMin = t.fixMin, e.__fixMax = t.fixMax;
- }
- });
- f(["contain", "normalize"], function (t) {
- lS.prototype[t] = function (e) {
- return e = sS(e) / sS(this.base), tS[t].call(this, e);
- };
- }), lS.create = function () {
- return new lS();
- };
- var uS = {
- getMin: function (t) {
- var e = this.option,
- i = t || null == e.rangeStart ? e.min : e.rangeStart;
- return this.axis && null != i && "dataMin" !== i && "function" != typeof i && !C(i) && (i = this.axis.scale.parse(i)), i;
- },
- getMax: function (t) {
- var e = this.option,
- i = t || null == e.rangeEnd ? e.max : e.rangeEnd;
- return this.axis && null != i && "dataMax" !== i && "function" != typeof i && !C(i) && (i = this.axis.scale.parse(i)), i;
- },
- getNeedCrossZero: function () {
- var t = this.option;
- return null != t.rangeStart || null != t.rangeEnd ? !1 : !t.scale;
- },
- getCoordSysModel: G,
- setRange: function (t, e) {
- this.option.rangeStart = t, this.option.rangeEnd = e;
- },
- resetRange: function () {
- this.option.rangeStart = this.option.rangeEnd = null;
- }
- },
- hS = ea({
- type: "triangle",
- shape: {
- cx: 0,
- cy: 0,
- width: 0,
- height: 0
- },
- buildPath: function (t, e) {
- var i = e.cx,
- n = e.cy,
- r = e.width / 2,
- a = e.height / 2;
- t.moveTo(i, n - a), t.lineTo(i + r, n + a), t.lineTo(i - r, n + a), t.closePath();
- }
- }),
- cS = ea({
- type: "diamond",
- shape: {
- cx: 0,
- cy: 0,
- width: 0,
- height: 0
- },
- buildPath: function (t, e) {
- var i = e.cx,
- n = e.cy,
- r = e.width / 2,
- a = e.height / 2;
- t.moveTo(i, n - a), t.lineTo(i + r, n), t.lineTo(i, n + a), t.lineTo(i - r, n), t.closePath();
- }
- }),
- dS = ea({
- type: "pin",
- shape: {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- },
- buildPath: function (t, e) {
- var i = e.x,
- n = e.y,
- r = e.width / 5 * 3,
- a = Math.max(r, e.height),
- o = r / 2,
- s = o * o / (a - o),
- l = n - a + o + s,
- u = Math.asin(s / o),
- h = Math.cos(u) * o,
- c = Math.sin(u),
- d = Math.cos(u),
- f = .6 * o,
- p = .7 * o;
- t.moveTo(i - h, l + s), t.arc(i, l, o, Math.PI - u, 2 * Math.PI + u), t.bezierCurveTo(i + h - c * f, l + s + d * f, i, n - p, i, n), t.bezierCurveTo(i, n - p, i - h + c * f, l + s + d * f, i - h, l + s), t.closePath();
- }
- }),
- fS = ea({
- type: "arrow",
- shape: {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- },
- buildPath: function (t, e) {
- var i = e.height,
- n = e.width,
- r = e.x,
- a = e.y,
- o = n / 3 * 2;
- t.moveTo(r, a), t.lineTo(r + o, a + i), t.lineTo(r, a + i / 4 * 3), t.lineTo(r - o, a + i), t.lineTo(r, a), t.closePath();
- }
- }),
- pS = {
- line: c_,
- rect: u_,
- roundRect: u_,
- square: u_,
- circle: Qy,
- diamond: cS,
- pin: dS,
- arrow: fS,
- triangle: hS
- },
- gS = {
- line: function (t, e, i, n, r) {
- r.x1 = t, r.y1 = e + n / 2, r.x2 = t + i, r.y2 = e + n / 2;
- },
- rect: function (t, e, i, n, r) {
- r.x = t, r.y = e, r.width = i, r.height = n;
- },
- roundRect: function (t, e, i, n, r) {
- r.x = t, r.y = e, r.width = i, r.height = n, r.r = Math.min(i, n) / 4;
- },
- square: function (t, e, i, n, r) {
- var a = Math.min(i, n);
- r.x = t, r.y = e, r.width = a, r.height = a;
- },
- circle: function (t, e, i, n, r) {
- r.cx = t + i / 2, r.cy = e + n / 2, r.r = Math.min(i, n) / 2;
- },
- diamond: function (t, e, i, n, r) {
- r.cx = t + i / 2, r.cy = e + n / 2, r.width = i, r.height = n;
- },
- pin: function (t, e, i, n, r) {
- r.x = t + i / 2, r.y = e + n / 2, r.width = i, r.height = n;
- },
- arrow: function (t, e, i, n, r) {
- r.x = t + i / 2, r.y = e + n / 2, r.width = i, r.height = n;
- },
- triangle: function (t, e, i, n, r) {
- r.cx = t + i / 2, r.cy = e + n / 2, r.width = i, r.height = n;
- }
- },
- mS = {};
- f(pS, function (t, e) {
- mS[e] = new t();
- });
- var vS = ea({
- type: "symbol",
- shape: {
- symbolType: "",
- x: 0,
- y: 0,
- width: 0,
- height: 0
- },
- calculateTextPosition: function (t, e, i) {
- var n = Xi(t, e, i),
- r = this.shape;
- return r && "pin" === r.symbolType && "inside" === e.textPosition && (n.y = i.y + .4 * i.height), n;
- },
- buildPath: function (t, e, i) {
- var n = e.symbolType;
- if ("none" !== n) {
- var r = mS[n];
- r || (n = "rect", r = mS[n]), gS[n](e.x, e.y, e.width, e.height, r.shape), r.buildPath(t, r.shape, i);
- }
- }
- }),
- yS = {
- isDimensionStacked: ju,
- enableDataStack: Yu,
- getStackedDimension: qu
- },
- _S = (Object.freeze || Object)({
- createList: Lh,
- getLayoutRect: Ro,
- dataStack: yS,
- createScale: Oh,
- mixinAxisModelCommonMethods: zh,
- completeDimensions: Wu,
- createDimensions: Ob,
- createSymbol: Ph
- }),
- xS = 1e-8;
- Bh.prototype = {
- constructor: Bh,
- properties: null,
- getBoundingRect: function () {
- var t = this._rect;
- if (t) return t;
- for (var e = Number.MAX_VALUE, i = [e, e], n = [-e, -e], r = [], a = [], o = this.geometries, s = 0; s < o.length; s++) if ("polygon" === o[s].type) {
- var l = o[s].exterior;
- br(l, r, a), oe(i, i, r), se(n, n, a);
- }
- return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0), this._rect = new wi(i[0], i[1], n[0] - i[0], n[1] - i[1]);
- },
- contain: function (t) {
- var e = this.getBoundingRect(),
- i = this.geometries;
- if (!e.contain(t[0], t[1])) return !1;
- t: for (var n = 0, r = i.length; r > n; n++) if ("polygon" === i[n].type) {
- var a = i[n].exterior,
- o = i[n].interiors;
- if (Rh(a, t[0], t[1])) {
- for (var s = 0; s < (o ? o.length : 0); s++) if (Rh(o[s])) continue t;
- return !0;
- }
- }
- return !1;
- },
- transformTo: function (t, e, i, n) {
- var r = this.getBoundingRect(),
- a = r.width / r.height;
- i ? n || (n = i / a) : i = a * n;
- for (var o = new wi(t, e, i, n), s = r.calculateTransform(o), l = this.geometries, u = 0; u < l.length; u++) if ("polygon" === l[u].type) {
- for (var h = l[u].exterior, c = l[u].interiors, d = 0; d < h.length; d++) ae(h[d], h[d], s);
- for (var f = 0; f < (c ? c.length : 0); f++) for (var d = 0; d < c[f].length; d++) ae(c[f][d], c[f][d], s);
- }
- r = this._rect, r.copy(o), this.center = [r.x + r.width / 2, r.y + r.height / 2];
- },
- cloneShallow: function (t) {
- null == t && (t = this.name);
- var e = new Bh(t, this.geometries, this.center);
- return e._rect = this._rect, e.transformTo = null, e;
- }
- };
- var wS = function (t) {
- return Nh(t), p(m(t.features, function (t) {
- return t.geometry && t.properties && t.geometry.coordinates.length > 0;
- }), function (t) {
- var e = t.properties,
- i = t.geometry,
- n = i.coordinates,
- r = [];
- "Polygon" === i.type && r.push({
- type: "polygon",
- exterior: n[0],
- interiors: n.slice(1)
- }), "MultiPolygon" === i.type && f(n, function (t) {
- t[0] && r.push({
- type: "polygon",
- exterior: t[0],
- interiors: t.slice(1)
- });
- });
- var a = new Bh(e.name, r, e.cp);
- return a.properties = e, a;
- });
- },
- bS = Zn(),
- SS = [0, 1],
- MS = function (t, e, i) {
- this.dim = t, this.scale = e, this._extent = i || [0, 0], this.inverse = !1, this.onBand = !1;
- };
- MS.prototype = {
- constructor: MS,
- contain: function (t) {
- var e = this._extent,
- i = Math.min(e[0], e[1]),
- n = Math.max(e[0], e[1]);
- return t >= i && n >= t;
- },
- containData: function (t) {
- return this.contain(this.dataToCoord(t));
- },
- getExtent: function () {
- return this._extent.slice();
- },
- getPixelPrecision: function (t) {
- return fo(t || this.scale.getExtent(), this._extent);
- },
- setExtent: function (t, e) {
- var i = this._extent;
- i[0] = t, i[1] = e;
- },
- dataToCoord: function (t, e) {
- var i = this._extent,
- n = this.scale;
- return t = n.normalize(t), this.onBand && "ordinal" === n.type && (i = i.slice(), tc(i, n.count())), oo(t, SS, i, e);
- },
- coordToData: function (t, e) {
- var i = this._extent,
- n = this.scale;
- this.onBand && "ordinal" === n.type && (i = i.slice(), tc(i, n.count()));
- var r = oo(t, i, SS, e);
- return this.scale.scale(r);
- },
- pointToData: function () {},
- getTicksCoords: function (t) {
- t = t || {};
- var e = t.tickModel || this.getTickModel(),
- i = Vh(this, e),
- n = i.ticks,
- r = p(n, function (t) {
- return {
- coord: this.dataToCoord(t),
- tickValue: t
- };
- }, this),
- a = e.get("alignWithLabel");
- return ec(this, r, a, t.clamp), r;
- },
- getViewLabels: function () {
- return Gh(this).labels;
- },
- getLabelModel: function () {
- return this.model.getModel("axisLabel");
- },
- getTickModel: function () {
- return this.model.getModel("axisTick");
- },
- getBandWidth: function () {
- var t = this._extent,
- e = this.scale.getExtent(),
- i = e[1] - e[0] + (this.onBand ? 1 : 0);
- 0 === i && (i = 1);
- var n = Math.abs(t[1] - t[0]);
- return Math.abs(n) / i;
- },
- isHorizontal: null,
- getRotate: null,
- calculateCategoryInterval: function () {
- return Kh(this);
- }
- };
- var IS = wS,
- TS = {};
- f(["map", "each", "filter", "indexOf", "inherits", "reduce", "filter", "bind", "curry", "isArray", "isString", "isObject", "isFunction", "extend", "defaults", "clone", "merge"], function (t) {
- TS[t] = Ng[t];
- });
- var CS = {};
- f(["extendShape", "extendPath", "makePath", "makeImage", "mergePath", "resizePath", "createIcon", "setHoverStyle", "setLabelStyle", "setTextStyle", "setText", "getFont", "updateProps", "initProps", "getTransform", "clipPointsByRect", "clipRectByRect", "registerShape", "getShapeClass", "Group", "Image", "Text", "Circle", "Sector", "Ring", "Polygon", "Polyline", "Rect", "Line", "BezierCurve", "Arc", "IncrementalDisplayable", "CompoundPath", "LinearGradient", "RadialGradient", "BoundingRect"], function (t) {
- CS[t] = z_[t];
- });
- var DS = function (t) {
- this._axes = {}, this._dimList = [], this.name = t || "";
- };
- DS.prototype = {
- constructor: DS,
- type: "cartesian",
- getAxis: function (t) {
- return this._axes[t];
- },
- getAxes: function () {
- return p(this._dimList, ic, this);
- },
- getAxesByScale: function (t) {
- return t = t.toLowerCase(), m(this.getAxes(), function (e) {
- return e.scale.type === t;
- });
- },
- addAxis: function (t) {
- var e = t.dim;
- this._axes[e] = t, this._dimList.push(e);
- },
- dataToCoord: function (t) {
- return this._dataCoordConvert(t, "dataToCoord");
- },
- coordToData: function (t) {
- return this._dataCoordConvert(t, "coordToData");
- },
- _dataCoordConvert: function (t, e) {
- for (var i = this._dimList, n = t instanceof Array ? [] : {}, r = 0; r < i.length; r++) {
- var a = i[r],
- o = this._axes[a];
- n[a] = o[e](t[a]);
- }
- return n;
- }
- }, nc.prototype = {
- constructor: nc,
- type: "cartesian2d",
- dimensions: ["x", "y"],
- getBaseAxis: function () {
- return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
- },
- containPoint: function (t) {
- var e = this.getAxis("x"),
- i = this.getAxis("y");
- return e.contain(e.toLocalCoord(t[0])) && i.contain(i.toLocalCoord(t[1]));
- },
- containData: function (t) {
- return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1]);
- },
- dataToPoint: function (t, e, i) {
- var n = this.getAxis("x"),
- r = this.getAxis("y");
- return i = i || [], i[0] = n.toGlobalCoord(n.dataToCoord(t[0])), i[1] = r.toGlobalCoord(r.dataToCoord(t[1])), i;
- },
- clampData: function (t, e) {
- var i = this.getAxis("x").scale,
- n = this.getAxis("y").scale,
- r = i.getExtent(),
- a = n.getExtent(),
- o = i.parse(t[0]),
- s = n.parse(t[1]);
- return e = e || [], e[0] = Math.min(Math.max(Math.min(r[0], r[1]), o), Math.max(r[0], r[1])), e[1] = Math.min(Math.max(Math.min(a[0], a[1]), s), Math.max(a[0], a[1])), e;
- },
- pointToData: function (t, e) {
- var i = this.getAxis("x"),
- n = this.getAxis("y");
- return e = e || [], e[0] = i.coordToData(i.toLocalCoord(t[0])), e[1] = n.coordToData(n.toLocalCoord(t[1])), e;
- },
- getOtherAxis: function (t) {
- return this.getAxis("x" === t.dim ? "y" : "x");
- },
- getArea: function () {
- var t = this.getAxis("x").getGlobalExtent(),
- e = this.getAxis("y").getGlobalExtent(),
- i = Math.min(t[0], t[1]),
- n = Math.min(e[0], e[1]),
- r = Math.max(t[0], t[1]) - i,
- a = Math.max(e[0], e[1]) - n,
- o = new wi(i, n, r, a);
- return o;
- }
- }, h(nc, DS);
- var AS = function (t, e, i, n, r) {
- MS.call(this, t, e, i), this.type = n || "value", this.position = r || "bottom";
- };
- AS.prototype = {
- constructor: AS,
- index: 0,
- getAxesOnZeroOf: null,
- model: null,
- isHorizontal: function () {
- var t = this.position;
- return "top" === t || "bottom" === t;
- },
- getGlobalExtent: function (t) {
- var e = this.getExtent();
- return e[0] = this.toGlobalCoord(e[0]), e[1] = this.toGlobalCoord(e[1]), t && e[0] > e[1] && e.reverse(), e;
- },
- getOtherAxis: function () {
- this.grid.getOtherAxis();
- },
- pointToData: function (t, e) {
- return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e);
- },
- toLocalCoord: null,
- toGlobalCoord: null
- }, h(AS, MS);
- var kS = {
- show: !0,
- zlevel: 0,
- z: 0,
- inverse: !1,
- name: "",
- nameLocation: "end",
- nameRotate: null,
- nameTruncate: {
- maxWidth: null,
- ellipsis: "...",
- placeholder: "."
- },
- nameTextStyle: {},
- nameGap: 15,
- silent: !1,
- triggerEvent: !1,
- tooltip: {
- show: !1
- },
- axisPointer: {},
- axisLine: {
- show: !0,
- onZero: !0,
- onZeroAxisIndex: null,
- lineStyle: {
- color: "#333",
- width: 1,
- type: "solid"
- },
- symbol: ["none", "none"],
- symbolSize: [10, 15]
- },
- axisTick: {
- show: !0,
- inside: !1,
- length: 5,
- lineStyle: {
- width: 1
- }
- },
- axisLabel: {
- show: !0,
- inside: !1,
- rotate: 0,
- showMinLabel: null,
- showMaxLabel: null,
- margin: 8,
- fontSize: 12
- },
- splitLine: {
- show: !0,
- lineStyle: {
- color: ["#ccc"],
- width: 1,
- type: "solid"
- }
- },
- splitArea: {
- show: !1,
- areaStyle: {
- color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"]
- }
- }
- },
- PS = {};
- PS.categoryAxis = r({
- boundaryGap: !0,
- deduplication: null,
- splitLine: {
- show: !1
- },
- axisTick: {
- alignWithLabel: !1,
- interval: "auto"
- },
- axisLabel: {
- interval: "auto"
- }
- }, kS), PS.valueAxis = r({
- boundaryGap: [0, 0],
- splitNumber: 5
- }, kS), PS.timeAxis = s({
- scale: !0,
- min: "dataMin",
- max: "dataMax"
- }, PS.valueAxis), PS.logAxis = s({
- scale: !0,
- logBase: 10
- }, PS.valueAxis);
- var LS = ["value", "category", "time", "log"],
- OS = function (t, e, i, n) {
- f(LS, function (o) {
- e.extend({
- type: t + "Axis." + o,
- mergeDefaultAndTheme: function (e, n) {
- var a = this.layoutMode,
- s = a ? No(e) : {},
- l = n.getTheme();
- r(e, l.get(o + "Axis")), r(e, this.getDefaultOption()), e.type = i(t, e), a && Bo(e, s, a);
- },
- optionUpdated: function () {
- var t = this.option;
- "category" === t.type && (this.__ordinalMeta = Ju.createByAxisModel(this));
- },
- getCategories: function (t) {
- var e = this.option;
- return "category" === e.type ? t ? e.data : this.__ordinalMeta.categories : void 0;
- },
- getOrdinalMeta: function () {
- return this.__ordinalMeta;
- },
- defaultOption: a([{}, PS[o + "Axis"], n], !0)
- });
- }), ax.registerSubTypeDefaulter(t + "Axis", _(i, t));
- },
- zS = ax.extend({
- type: "cartesian2dAxis",
- axis: null,
- init: function () {
- zS.superApply(this, "init", arguments), this.resetRange();
- },
- mergeOption: function () {
- zS.superApply(this, "mergeOption", arguments), this.resetRange();
- },
- restoreData: function () {
- zS.superApply(this, "restoreData", arguments), this.resetRange();
- },
- getCoordSysModel: function () {
- return this.ecModel.queryComponents({
- mainType: "grid",
- index: this.option.gridIndex,
- id: this.option.gridId
- })[0];
- }
- });
- r(zS.prototype, uS);
- var ES = {
- offset: 0
- };
- OS("x", zS, rc, ES), OS("y", zS, rc, ES), ax.extend({
- type: "grid",
- dependencies: ["xAxis", "yAxis"],
- layoutMode: "box",
- coordinateSystem: null,
- defaultOption: {
- show: !1,
- zlevel: 0,
- z: 0,
- left: "10%",
- top: 60,
- right: "10%",
- bottom: 60,
- containLabel: !1,
- backgroundColor: "rgba(0,0,0,0)",
- borderWidth: 1,
- borderColor: "#ccc"
- }
- });
- var RS = oc.prototype;
- RS.type = "grid", RS.axisPointerEnabled = !0, RS.getRect = function () {
- return this._rect;
- }, RS.update = function (t, e) {
- var i = this._axesMap;
- this._updateScale(t, this.model), f(i.x, function (t) {
- wh(t.scale, t.model);
- }), f(i.y, function (t) {
- wh(t.scale, t.model);
- });
- var n = {};
- f(i.x, function (t) {
- sc(i, "y", t, n);
- }), f(i.y, function (t) {
- sc(i, "x", t, n);
- }), this.resize(this.model, e);
- }, RS.resize = function (t, e, i) {
- function n() {
- f(a, function (t) {
- var e = t.isHorizontal(),
- i = e ? [0, r.width] : [0, r.height],
- n = t.inverse ? 1 : 0;
- t.setExtent(i[n], i[1 - n]), uc(t, e ? r.x : r.y);
- });
- }
- var r = Ro(t.getBoxLayoutParams(), {
- width: e.getWidth(),
- height: e.getHeight()
- });
- this._rect = r;
- var a = this._axesList;
- n(), !i && t.get("containLabel") && (f(a, function (t) {
- if (!t.model.get("axisLabel.inside")) {
- var e = Th(t);
- if (e) {
- var i = t.isHorizontal() ? "height" : "width",
- n = t.model.get("axisLabel.margin");
- r[i] -= e[i] + n, "top" === t.position ? r.y += e.height + n : "left" === t.position && (r.x += e.width + n);
- }
- }
- }), n());
- }, RS.getAxis = function (t, e) {
- var i = this._axesMap[t];
- if (null != i) {
- if (null == e) for (var n in i) if (i.hasOwnProperty(n)) return i[n];
- return i[e];
- }
- }, RS.getAxes = function () {
- return this._axesList.slice();
- }, RS.getCartesian = function (t, e) {
- if (null != t && null != e) {
- var i = "x" + t + "y" + e;
- return this._coordsMap[i];
- }
- S(t) && (e = t.yAxisIndex, t = t.xAxisIndex);
- for (var n = 0, r = this._coordsList; n < r.length; n++) if (r[n].getAxis("x").index === t || r[n].getAxis("y").index === e) return r[n];
- }, RS.getCartesians = function () {
- return this._coordsList.slice();
- }, RS.convertToPixel = function (t, e, i) {
- var n = this._findConvertTarget(t, e);
- return n.cartesian ? n.cartesian.dataToPoint(i) : n.axis ? n.axis.toGlobalCoord(n.axis.dataToCoord(i)) : null;
- }, RS.convertFromPixel = function (t, e, i) {
- var n = this._findConvertTarget(t, e);
- return n.cartesian ? n.cartesian.pointToData(i) : n.axis ? n.axis.coordToData(n.axis.toLocalCoord(i)) : null;
- }, RS._findConvertTarget = function (t, e) {
- var i,
- n,
- r = e.seriesModel,
- a = e.xAxisModel || r && r.getReferringComponents("xAxis")[0],
- o = e.yAxisModel || r && r.getReferringComponents("yAxis")[0],
- s = e.gridModel,
- l = this._coordsList;
- if (r) i = r.coordinateSystem, u(l, i) < 0 && (i = null);else if (a && o) i = this.getCartesian(a.componentIndex, o.componentIndex);else if (a) n = this.getAxis("x", a.componentIndex);else if (o) n = this.getAxis("y", o.componentIndex);else if (s) {
- var h = s.coordinateSystem;
- h === this && (i = this._coordsList[0]);
- }
- return {
- cartesian: i,
- axis: n
- };
- }, RS.containPoint = function (t) {
- var e = this._coordsList[0];
- return e ? e.containPoint(t) : void 0;
- }, RS._initCartesian = function (t, e) {
- function i(i) {
- return function (o, s) {
- if (ac(o, t, e)) {
- var l = o.get("position");
- "x" === i ? "top" !== l && "bottom" !== l && (l = n.bottom ? "top" : "bottom") : "left" !== l && "right" !== l && (l = n.left ? "right" : "left"), n[l] = !0;
- var u = new AS(i, bh(o), [0, 0], o.get("type"), l),
- h = "category" === u.type;
- u.onBand = h && o.get("boundaryGap"), u.inverse = o.get("inverse"), o.axis = u, u.model = o, u.grid = this, u.index = s, this._axesList.push(u), r[i][s] = u, a[i]++;
- }
- };
- }
- var n = {
- left: !1,
- right: !1,
- top: !1,
- bottom: !1
- },
- r = {
- x: {},
- y: {}
- },
- a = {
- x: 0,
- y: 0
- };
- return e.eachComponent("xAxis", i("x"), this), e.eachComponent("yAxis", i("y"), this), a.x && a.y ? (this._axesMap = r, void f(r.x, function (e, i) {
- f(r.y, function (n, r) {
- var a = "x" + i + "y" + r,
- o = new nc(a);
- o.grid = this, o.model = t, this._coordsMap[a] = o, this._coordsList.push(o), o.addAxis(e), o.addAxis(n);
- }, this);
- }, this)) : (this._axesMap = {}, void (this._axesList = []));
- }, RS._updateScale = function (t, e) {
- function i(t, e) {
- f(t.mapDimension(e.dim, !0), function (i) {
- e.scale.unionExtentFromData(t, qu(t, i));
- });
- }
- f(this._axesList, function (t) {
- t.scale.setExtent(1 / 0, -1 / 0);
- }), t.eachSeries(function (n) {
- if (cc(n)) {
- var r = hc(n, t),
- a = r[0],
- o = r[1];
- if (!ac(a, e, t) || !ac(o, e, t)) return;
- var s = this.getCartesian(a.componentIndex, o.componentIndex),
- l = n.getData(),
- u = s.getAxis("x"),
- h = s.getAxis("y");
- "list" === l.type && (i(l, u, n), i(l, h, n));
- }
- }, this);
- }, RS.getTooltipAxes = function (t) {
- var e = [],
- i = [];
- return f(this.getCartesians(), function (n) {
- var r = null != t && "auto" !== t ? n.getAxis(t) : n.getBaseAxis(),
- a = n.getOtherAxis(r);
- u(e, r) < 0 && e.push(r), u(i, a) < 0 && i.push(a);
- }), {
- baseAxes: e,
- otherAxes: i
- };
- };
- var BS = ["xAxis", "yAxis"];
- oc.create = function (t, e) {
- var i = [];
- return t.eachComponent("grid", function (n, r) {
- var a = new oc(n, t, e);
- a.name = "grid_" + r, a.resize(n, e, !0), n.coordinateSystem = a, i.push(a);
- }), t.eachSeries(function (e) {
- if (cc(e)) {
- var i = hc(e, t),
- n = i[0],
- r = i[1],
- a = n.getCoordSysModel(),
- o = a.coordinateSystem;
- e.coordinateSystem = o.getCartesian(n.componentIndex, r.componentIndex);
- }
- }), i;
- }, oc.dimensions = oc.prototype.dimensions = nc.prototype.dimensions, cs.register("cartesian2d", oc);
- var NS = jx.extend({
- type: "series.__base_bar__",
- getInitialData: function () {
- return Zu(this.getSource(), this);
- },
- getMarkerPosition: function (t) {
- var e = this.coordinateSystem;
- if (e) {
- var i = e.dataToPoint(e.clampData(t)),
- n = this.getData(),
- r = n.getLayout("offset"),
- a = n.getLayout("size"),
- o = e.getBaseAxis().isHorizontal() ? 0 : 1;
- return i[o] += r + a / 2, i;
- }
- return [0 / 0, 0 / 0];
- },
- defaultOption: {
- zlevel: 0,
- z: 2,
- coordinateSystem: "cartesian2d",
- legendHoverLink: !0,
- barMinHeight: 0,
- barMinAngle: 0,
- large: !1,
- largeThreshold: 400,
- progressive: 3e3,
- progressiveChunkMode: "mod",
- itemStyle: {},
- emphasis: {}
- }
- });
- NS.extend({
- type: "series.bar",
- dependencies: ["grid", "polar"],
- brushSelector: "rect",
- getProgressive: function () {
- return this.get("large") ? this.get("progressive") : !1;
- },
- getProgressiveThreshold: function () {
- var t = this.get("progressiveThreshold"),
- e = this.get("largeThreshold");
- return e > t && (t = e), t;
- },
- defaultOption: {
- clip: !0,
- roundCap: !1
- }
- });
- var FS = Uv([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["stroke", "barBorderColor"], ["lineWidth", "barBorderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]),
- GS = {
- getBarItemStyle: function (t) {
- var e = FS(this, t);
- if (this.getBorderLineDash) {
- var i = this.getBorderLineDash();
- i && (e.lineDash = i);
- }
- return e;
- }
- },
- VS = ea({
- type: "sausage",
- shape: {
- cx: 0,
- cy: 0,
- r0: 0,
- r: 0,
- startAngle: 0,
- endAngle: 2 * Math.PI,
- clockwise: !0
- },
- buildPath: function (t, e) {
- var i = e.cx,
- n = e.cy,
- r = Math.max(e.r0 || 0, 0),
- a = Math.max(e.r, 0),
- o = .5 * (a - r),
- s = r + o,
- l = e.startAngle,
- u = e.endAngle,
- h = e.clockwise,
- c = Math.cos(l),
- d = Math.sin(l),
- f = Math.cos(u),
- p = Math.sin(u),
- g = h ? u - l < 2 * Math.PI : l - u < 2 * Math.PI;
- g && (t.moveTo(c * r + i, d * r + n), t.arc(c * s + i, d * s + n, o, -Math.PI + l, l, !h)), t.arc(i, n, a, l, u, !h), t.moveTo(f * a + i, p * a + n), t.arc(f * s + i, p * s + n, o, u - 2 * Math.PI, u - Math.PI, !h), 0 !== r && (t.arc(i, n, r, u, l, h), t.moveTo(c * r + i, p * r + n)), t.closePath();
- }
- }),
- HS = ["itemStyle", "barBorderWidth"],
- WS = [0, 0];
- o(Ja.prototype, GS), _u({
- type: "bar",
- render: function (t, e, i) {
- this._updateDrawMode(t);
- var n = t.get("coordinateSystem");
- return ("cartesian2d" === n || "polar" === n) && (this._isLargeDraw ? this._renderLarge(t, e, i) : this._renderNormal(t, e, i)), this.group;
- },
- incrementalPrepareRender: function (t) {
- this._clear(), this._updateDrawMode(t);
- },
- incrementalRender: function (t, e) {
- this._incrementalRenderLarge(t, e);
- },
- _updateDrawMode: function (t) {
- var e = t.pipelineContext.large;
- (null == this._isLargeDraw || e ^ this._isLargeDraw) && (this._isLargeDraw = e, this._clear());
- },
- _renderNormal: function (t) {
- var e,
- i = this.group,
- n = t.getData(),
- r = this._data,
- a = t.coordinateSystem,
- o = a.getBaseAxis();
- "cartesian2d" === a.type ? e = o.isHorizontal() : "polar" === a.type && (e = "angle" === o.dim);
- var s = t.isAnimationEnabled() ? t : null,
- l = t.get("clip", !0),
- u = yc(a, n);
- i.removeClipPath();
- var h = t.get("roundCap", !0);
- n.diff(r).add(function (r) {
- if (n.hasValue(r)) {
- var o = n.getItemModel(r),
- c = qS[a.type](n, r, o);
- if (l) {
- var d = YS[a.type](u, c);
- if (d) return void i.remove(f);
- }
- var f = jS[a.type](r, c, e, s, !1, h);
- n.setItemGraphicEl(r, f), i.add(f), wc(f, n, r, o, c, t, e, "polar" === a.type);
- }
- }).update(function (o, c) {
- var d = r.getItemGraphicEl(c);
- if (!n.hasValue(o)) return void i.remove(d);
- var f = n.getItemModel(o),
- p = qS[a.type](n, o, f);
- if (l) {
- var g = YS[a.type](u, p);
- if (g) return void i.remove(d);
- }
- d ? Ga(d, {
- shape: p
- }, s, o) : d = jS[a.type](o, p, e, s, !0, h), n.setItemGraphicEl(o, d), i.add(d), wc(d, n, o, f, p, t, e, "polar" === a.type);
- }).remove(function (t) {
- var e = r.getItemGraphicEl(t);
- "cartesian2d" === a.type ? e && _c(t, s, e) : e && xc(t, s, e);
- }).execute(), this._data = n;
- },
- _renderLarge: function (t) {
- this._clear(), Sc(t, this.group);
- var e = t.get("clip", !0) ? vc(t.coordinateSystem, !1, t) : null;
- e ? this.group.setClipPath(e) : this.group.removeClipPath();
- },
- _incrementalRenderLarge: function (t, e) {
- Sc(e, this.group, !0);
- },
- dispose: G,
- remove: function (t) {
- this._clear(t);
- },
- _clear: function (t) {
- var e = this.group,
- i = this._data;
- t && t.get("animation") && i && !this._isLargeDraw ? i.eachItemGraphicEl(function (e) {
- "sector" === e.type ? xc(e.dataIndex, t, e) : _c(e.dataIndex, t, e);
- }) : e.removeAll(), this._data = null;
- }
- });
- var US = Math.max,
- XS = Math.min,
- YS = {
- cartesian2d: function (t, e) {
- var i = e.width < 0 ? -1 : 1,
- n = e.height < 0 ? -1 : 1;
- 0 > i && (e.x += e.width, e.width = -e.width), 0 > n && (e.y += e.height, e.height = -e.height);
- var r = US(e.x, t.x),
- a = XS(e.x + e.width, t.x + t.width),
- o = US(e.y, t.y),
- s = XS(e.y + e.height, t.y + t.height);
- e.x = r, e.y = o, e.width = a - r, e.height = s - o;
- var l = e.width < 0 || e.height < 0;
- return 0 > i && (e.x += e.width, e.width = -e.width), 0 > n && (e.y += e.height, e.height = -e.height), l;
- },
- polar: function () {
- return !1;
- }
- },
- jS = {
- cartesian2d: function (t, e, i, n, r) {
- var a = new u_({
- shape: o({}, e)
- });
- if (n) {
- var s = a.shape,
- l = i ? "height" : "width",
- u = {};
- s[l] = 0, u[l] = e[l], z_[r ? "updateProps" : "initProps"](a, {
- shape: u
- }, n, t);
- }
- return a;
- },
- polar: function (t, e, i, n, r, a) {
- var o = e.startAngle < e.endAngle,
- l = !i && a ? VS : e_,
- u = new l({
- shape: s({
- clockwise: o
- }, e)
- });
- if (n) {
- var h = u.shape,
- c = i ? "r" : "endAngle",
- d = {};
- h[c] = i ? 0 : e.startAngle, d[c] = e[c], z_[r ? "updateProps" : "initProps"](u, {
- shape: d
- }, n, t);
- }
- return u;
- }
- },
- qS = {
- cartesian2d: function (t, e, i) {
- var n = t.getItemLayout(e),
- r = bc(i, n),
- a = n.width > 0 ? 1 : -1,
- o = n.height > 0 ? 1 : -1;
- return {
- x: n.x + a * r / 2,
- y: n.y + o * r / 2,
- width: n.width - a * r,
- height: n.height - o * r
- };
- },
- polar: function (t, e) {
- var i = t.getItemLayout(e);
- return {
- cx: i.cx,
- cy: i.cy,
- r0: i.r0,
- r: i.r,
- startAngle: i.startAngle,
- endAngle: i.endAngle
- };
- }
- },
- ZS = Vr.extend({
- type: "largeBar",
- shape: {
- points: []
- },
- buildPath: function (t, e) {
- for (var i = e.points, n = this.__startPoint, r = this.__baseDimIdx, a = 0; a < i.length; a += 2) n[r] = i[a + r], t.moveTo(n[0], n[1]), t.lineTo(i[a], i[a + 1]);
- }
- }),
- KS = il(function (t) {
- var e = this,
- i = Mc(e, t.offsetX, t.offsetY);
- e.dataIndex = i >= 0 ? i : null;
- }, 30, !1),
- $S = Math.PI,
- QS = function (t, e) {
- this.opt = e, this.axisModel = t, s(e, {
- labelOffset: 0,
- nameDirection: 1,
- tickDirection: 1,
- labelDirection: 1,
- silent: !0
- }), this.group = new Bm();
- var i = new Bm({
- position: e.position.slice(),
- rotation: e.rotation
- });
- i.updateTransform(), this._transform = i.transform, this._dumbGroup = i;
- };
- QS.prototype = {
- constructor: QS,
- hasBuilder: function (t) {
- return !!JS[t];
- },
- add: function (t) {
- JS[t].call(this);
- },
- getGroup: function () {
- return this.group;
- }
- };
- var JS = {
- axisLine: function () {
- var t = this.opt,
- e = this.axisModel;
- if (e.get("axisLine.show")) {
- var i = this.axisModel.axis.getExtent(),
- n = this._transform,
- r = [i[0], 0],
- a = [i[1], 0];
- n && (ae(r, r, n), ae(a, a, n));
- var s = o({
- lineCap: "round"
- }, e.getModel("axisLine.lineStyle").getLineStyle());
- this.group.add(new c_({
- anid: "line",
- subPixelOptimize: !0,
- shape: {
- x1: r[0],
- y1: r[1],
- x2: a[0],
- y2: a[1]
- },
- style: s,
- strokeContainThreshold: t.strokeContainThreshold || 5,
- silent: !0,
- z2: 1
- }));
- var l = e.get("axisLine.symbol"),
- u = e.get("axisLine.symbolSize"),
- h = e.get("axisLine.symbolOffset") || 0;
- if ("number" == typeof h && (h = [h, h]), null != l) {
- "string" == typeof l && (l = [l, l]), ("string" == typeof u || "number" == typeof u) && (u = [u, u]);
- var c = u[0],
- d = u[1];
- f([{
- rotate: t.rotation + Math.PI / 2,
- offset: h[0],
- r: 0
- }, {
- rotate: t.rotation - Math.PI / 2,
- offset: h[1],
- r: Math.sqrt((r[0] - a[0]) * (r[0] - a[0]) + (r[1] - a[1]) * (r[1] - a[1]))
- }], function (e, i) {
- if ("none" !== l[i] && null != l[i]) {
- var n = Ph(l[i], -c / 2, -d / 2, c, d, s.stroke, !0),
- a = e.r + e.offset,
- o = [r[0] + a * Math.cos(t.rotation), r[1] - a * Math.sin(t.rotation)];
- n.attr({
- rotation: e.rotate,
- position: o,
- silent: !0,
- z2: 11
- }), this.group.add(n);
- }
- }, this);
- }
- }
- },
- axisTickLabel: function () {
- var t = this.axisModel,
- e = this.opt,
- i = Pc(this, t, e),
- n = Lc(this, t, e);
- Cc(t, n, i);
- },
- axisName: function () {
- var t = this.opt,
- e = this.axisModel,
- i = D(t.axisName, e.get("name"));
- if (i) {
- var n,
- r = e.get("nameLocation"),
- a = t.nameDirection,
- s = e.getModel("nameTextStyle"),
- l = e.get("nameGap") || 0,
- u = this.axisModel.axis.getExtent(),
- h = u[0] > u[1] ? -1 : 1,
- c = ["start" === r ? u[0] - h * l : "end" === r ? u[1] + h * l : (u[0] + u[1]) / 2, kc(r) ? t.labelOffset + a * l : 0],
- d = e.get("nameRotate");
- null != d && (d = d * $S / 180);
- var f;
- kc(r) ? n = eM(t.rotation, null != d ? d : t.rotation, a) : (n = Tc(t, r, d || 0, u), f = t.axisNameAvailableWidth, null != f && (f = Math.abs(f / Math.sin(n.rotation)), !isFinite(f) && (f = null)));
- var p = s.getFont(),
- g = e.get("nameTruncate", !0) || {},
- m = g.ellipsis,
- v = D(t.nameTruncateMaxWidth, g.maxWidth, f),
- y = null != m && null != v ? $_(i, v, p, m, {
- minChar: 2,
- placeholder: g.placeholder
- }) : i,
- _ = e.get("tooltip", !0),
- x = e.mainType,
- w = {
- componentType: x,
- name: i,
- $vars: ["name"]
- };
- w[x + "Index"] = e.componentIndex;
- var b = new $y({
- anid: "name",
- __fullText: i,
- __truncatedText: y,
- position: c,
- rotation: n.rotation,
- silent: iM(e),
- z2: 1,
- tooltip: _ && _.show ? o({
- content: i,
- formatter: function () {
- return i;
- },
- formatterParams: w
- }, _) : null
- });
- ka(b.style, s, {
- text: y,
- textFont: p,
- textFill: s.getTextColor() || e.get("axisLine.lineStyle.color"),
- textAlign: s.get("align") || n.textAlign,
- textVerticalAlign: s.get("verticalAlign") || n.textVerticalAlign
- }), e.get("triggerEvent") && (b.eventData = tM(e), b.eventData.targetType = "axisName", b.eventData.name = i), this._dumbGroup.add(b), b.updateTransform(), this.group.add(b), b.decomposeTransform();
- }
- }
- },
- tM = QS.makeAxisEventDataBase = function (t) {
- var e = {
- componentType: t.mainType,
- componentIndex: t.componentIndex
- };
- return e[t.mainType + "Index"] = t.componentIndex, e;
- },
- eM = QS.innerTextLayout = function (t, e, i) {
- var n,
- r,
- a = go(e - t);
- return mo(a) ? (r = i > 0 ? "top" : "bottom", n = "center") : mo(a - $S) ? (r = i > 0 ? "bottom" : "top", n = "center") : (r = "middle", n = a > 0 && $S > a ? i > 0 ? "right" : "left" : i > 0 ? "left" : "right"), {
- rotation: a,
- textAlign: n,
- textVerticalAlign: r
- };
- },
- iM = QS.isLabelSilent = function (t) {
- var e = t.get("tooltip");
- return t.get("silent") || !(t.get("triggerEvent") || e && e.show);
- },
- nM = f,
- rM = _,
- aM = vu({
- type: "axis",
- _axisPointer: null,
- axisPointerClass: null,
- render: function (t, e, i, n) {
- this.axisPointerClass && Fc(t), aM.superApply(this, "render", arguments), Uc(this, t, e, i, n, !0);
- },
- updateAxisPointer: function (t, e, i, n) {
- Uc(this, t, e, i, n, !1);
- },
- remove: function (t, e) {
- var i = this._axisPointer;
- i && i.remove(e), aM.superApply(this, "remove", arguments);
- },
- dispose: function (t, e) {
- Xc(this, e), aM.superApply(this, "dispose", arguments);
- }
- }),
- oM = [];
- aM.registerAxisPointerClass = function (t, e) {
- oM[t] = e;
- }, aM.getAxisPointerClass = function (t) {
- return t && oM[t];
- };
- var sM = ["axisLine", "axisTickLabel", "axisName"],
- lM = ["splitArea", "splitLine"],
- uM = aM.extend({
- type: "cartesianAxis",
- axisPointerClass: "CartesianAxisPointer",
- render: function (t, e, i, n) {
- this.group.removeAll();
- var r = this._axisGroup;
- if (this._axisGroup = new Bm(), this.group.add(this._axisGroup), t.get("show")) {
- var a = t.getCoordSysModel(),
- o = Yc(a, t),
- s = new QS(t, o);
- f(sM, s.add, s), this._axisGroup.add(s.getGroup()), f(lM, function (e) {
- t.get(e + ".show") && this["_" + e](t, a);
- }, this), Xa(r, this._axisGroup, t), uM.superCall(this, "render", t, e, i, n);
- }
- },
- remove: function () {
- this._splitAreaColors = null;
- },
- _splitLine: function (t, e) {
- var i = t.axis;
- if (!i.scale.isBlank()) {
- var n = t.getModel("splitLine"),
- r = n.getModel("lineStyle"),
- a = r.get("color");
- a = x(a) ? a : [a];
- for (var o = e.coordinateSystem.getRect(), l = i.isHorizontal(), u = 0, h = i.getTicksCoords({
- tickModel: n
- }), c = [], d = [], f = r.getLineStyle(), p = 0; p < h.length; p++) {
- var g = i.toGlobalCoord(h[p].coord);
- l ? (c[0] = g, c[1] = o.y, d[0] = g, d[1] = o.y + o.height) : (c[0] = o.x, c[1] = g, d[0] = o.x + o.width, d[1] = g);
- var m = u++ % a.length,
- v = h[p].tickValue;
- this._axisGroup.add(new c_({
- anid: null != v ? "line_" + h[p].tickValue : null,
- subPixelOptimize: !0,
- shape: {
- x1: c[0],
- y1: c[1],
- x2: d[0],
- y2: d[1]
- },
- style: s({
- stroke: a[m]
- }, f),
- silent: !0
- }));
- }
- }
- },
- _splitArea: function (t, e) {
- var i = t.axis;
- if (!i.scale.isBlank()) {
- var n = t.getModel("splitArea"),
- r = n.getModel("areaStyle"),
- a = r.get("color"),
- o = e.coordinateSystem.getRect(),
- l = i.getTicksCoords({
- tickModel: n,
- clamp: !0
- });
- if (l.length) {
- var u = a.length,
- h = this._splitAreaColors,
- c = N(),
- d = 0;
- if (h) for (var f = 0; f < l.length; f++) {
- var p = h.get(l[f].tickValue);
- if (null != p) {
- d = (p + (u - 1) * f) % u;
- break;
- }
- }
- var g = i.toGlobalCoord(l[0].coord),
- m = r.getAreaStyle();
- a = x(a) ? a : [a];
- for (var f = 1; f < l.length; f++) {
- var v,
- y,
- _,
- w,
- b = i.toGlobalCoord(l[f].coord);
- i.isHorizontal() ? (v = g, y = o.y, _ = b - v, w = o.height, g = v + _) : (v = o.x, y = g, _ = o.width, w = b - y, g = y + w);
- var S = l[f - 1].tickValue;
- null != S && c.set(S, d), this._axisGroup.add(new u_({
- anid: null != S ? "area_" + S : null,
- shape: {
- x: v,
- y: y,
- width: _,
- height: w
- },
- style: s({
- fill: a[d]
- }, m),
- silent: !0
- })), d = (d + 1) % u;
- }
- this._splitAreaColors = c;
- }
- }
- }
- });
- uM.extend({
- type: "xAxis"
- }), uM.extend({
- type: "yAxis"
- }), vu({
- type: "grid",
- render: function (t) {
- this.group.removeAll(), t.get("show") && this.group.add(new u_({
- shape: t.coordinateSystem.getRect(),
- style: s({
- fill: t.get("backgroundColor")
- }, t.getItemStyle()),
- silent: !0,
- z2: -1
- }));
- }
- }), ou(function (t) {
- t.xAxis && t.yAxis && !t.grid && (t.grid = {});
- }), du($w.VISUAL.LAYOUT, _(ph, "bar")), du($w.VISUAL.PROGRESSIVE_LAYOUT, Wb), fu({
- seriesType: "bar",
- reset: function (t) {
- t.getData().setVisual("legendSymbol", "roundRect");
- }
- }), jx.extend({
- type: "series.line",
- dependencies: ["grid", "polar"],
- getInitialData: function () {
- return Zu(this.getSource(), this);
- },
- defaultOption: {
- zlevel: 0,
- z: 2,
- coordinateSystem: "cartesian2d",
- legendHoverLink: !0,
- hoverAnimation: !0,
- clip: !0,
- label: {
- position: "top"
- },
- lineStyle: {
- width: 2,
- type: "solid"
- },
- step: !1,
- smooth: !1,
- smoothMonotone: null,
- symbol: "emptyCircle",
- symbolSize: 4,
- symbolRotate: null,
- showSymbol: !0,
- showAllSymbol: "auto",
- connectNulls: !1,
- sampling: "none",
- animationEasing: "linear",
- progressive: 0,
- hoverLayerThreshold: 1 / 0
- }
- });
- var hM = jc.prototype,
- cM = jc.getSymbolSize = function (t, e) {
- var i = t.getItemVisual(e, "symbolSize");
- return i instanceof Array ? i.slice() : [+i, +i];
- };
- hM._createSymbol = function (t, e, i, n, r) {
- this.removeAll();
- var a = e.getItemVisual(i, "color"),
- o = Ph(t, -1, -1, 2, 2, a, r);
- o.attr({
- z2: 100,
- culling: !0,
- scale: qc(n)
- }), o.drift = Zc, this._symbolType = t, this.add(o);
- }, hM.stopSymbolAnimation = function (t) {
- this.childAt(0).stopAnimation(t);
- }, hM.getSymbolPath = function () {
- return this.childAt(0);
- }, hM.getScale = function () {
- return this.childAt(0).scale;
- }, hM.highlight = function () {
- this.childAt(0).trigger("emphasis");
- }, hM.downplay = function () {
- this.childAt(0).trigger("normal");
- }, hM.setZ = function (t, e) {
- var i = this.childAt(0);
- i.zlevel = t, i.z = e;
- }, hM.setDraggable = function (t) {
- var e = this.childAt(0);
- e.draggable = t, e.cursor = t ? "move" : e.cursor;
- }, hM.updateData = function (t, e, i) {
- this.silent = !1;
- var n = t.getItemVisual(e, "symbol") || "circle",
- r = t.hostModel,
- a = cM(t, e),
- o = n !== this._symbolType;
- if (o) {
- var s = t.getItemVisual(e, "symbolKeepAspect");
- this._createSymbol(n, t, e, a, s);
- } else {
- var l = this.childAt(0);
- l.silent = !1, Ga(l, {
- scale: qc(a)
- }, r, e);
- }
- if (this._updateCommon(t, e, a, i), o) {
- var l = this.childAt(0),
- u = i && i.fadeIn,
- h = {
- scale: l.scale.slice()
- };
- u && (h.style = {
- opacity: l.style.opacity
- }), l.scale = [0, 0], u && (l.style.opacity = 0), Va(l, h, r, e);
- }
- this._seriesModel = r;
- };
- var dM = ["itemStyle"],
- fM = ["emphasis", "itemStyle"],
- pM = ["label"],
- gM = ["emphasis", "label"];
- hM._updateCommon = function (t, e, i, n) {
- function r(e) {
- return b ? t.getName(e) : dc(t, e);
- }
- var a = this.childAt(0),
- s = t.hostModel,
- l = t.getItemVisual(e, "color");
- "image" !== a.type ? a.useStyle({
- strokeNoScale: !0
- }) : a.setStyle({
- opacity: null,
- shadowBlur: null,
- shadowOffsetX: null,
- shadowOffsetY: null,
- shadowColor: null
- });
- var u = n && n.itemStyle,
- h = n && n.hoverItemStyle,
- c = n && n.symbolRotate,
- d = n && n.symbolOffset,
- f = n && n.labelModel,
- p = n && n.hoverLabelModel,
- g = n && n.hoverAnimation,
- m = n && n.cursorStyle;
- if (!n || t.hasItemOption) {
- var v = n && n.itemModel ? n.itemModel : t.getItemModel(e);
- u = v.getModel(dM).getItemStyle(["color"]), h = v.getModel(fM).getItemStyle(), c = v.getShallow("symbolRotate"), d = v.getShallow("symbolOffset"), f = v.getModel(pM), p = v.getModel(gM), g = v.getShallow("hoverAnimation"), m = v.getShallow("cursor");
- } else h = o({}, h);
- var y = a.style;
- a.attr("rotation", (c || 0) * Math.PI / 180 || 0), d && a.attr("position", [so(d[0], i[0]), so(d[1], i[1])]), m && a.attr("cursor", m), a.setColor(l, n && n.symbolInnerColor), a.setStyle(u);
- var _ = t.getItemVisual(e, "opacity");
- null != _ && (y.opacity = _);
- var x = t.getItemVisual(e, "liftZ"),
- w = a.__z2Origin;
- null != x ? null == w && (a.__z2Origin = a.z2, a.z2 += x) : null != w && (a.z2 = w, a.__z2Origin = null);
- var b = n && n.useNameLabel;
- Da(y, h, f, p, {
- labelFetcher: s,
- labelDataIndex: e,
- defaultText: r,
- isRectText: !0,
- autoColor: l
- }), a.__symbolOriginalScale = qc(i), a.hoverStyle = h, a.highDownOnUpdate = g && s.isAnimationEnabled() ? Kc : null, Ma(a);
- }, hM.fadeOut = function (t, e) {
- var i = this.childAt(0);
- this.silent = i.silent = !0, !(e && e.keepLabel) && (i.style.text = null), Ga(i, {
- style: {
- opacity: 0
- },
- scale: [0, 0]
- }, this._seriesModel, this.dataIndex, t);
- }, h(jc, Bm);
- var mM = $c.prototype;
- mM.updateData = function (t, e) {
- e = Jc(e);
- var i = this.group,
- n = t.hostModel,
- r = this._data,
- a = this._symbolCtor,
- o = td(t);
- r || i.removeAll(), t.diff(r).add(function (n) {
- var r = t.getItemLayout(n);
- if (Qc(t, r, n, e)) {
- var s = new a(t, n, o);
- s.attr("position", r), t.setItemGraphicEl(n, s), i.add(s);
- }
- }).update(function (s, l) {
- var u = r.getItemGraphicEl(l),
- h = t.getItemLayout(s);
- return Qc(t, h, s, e) ? (u ? (u.updateData(t, s, o), Ga(u, {
- position: h
- }, n)) : (u = new a(t, s), u.attr("position", h)), i.add(u), void t.setItemGraphicEl(s, u)) : void i.remove(u);
- }).remove(function (t) {
- var e = r.getItemGraphicEl(t);
- e && e.fadeOut(function () {
- i.remove(e);
- });
- }).execute(), this._data = t;
- }, mM.isPersistent = function () {
- return !0;
- }, mM.updateLayout = function () {
- var t = this._data;
- t && t.eachItemGraphicEl(function (e, i) {
- var n = t.getItemLayout(i);
- e.attr("position", n);
- });
- }, mM.incrementalPrepareUpdate = function (t) {
- this._seriesScope = td(t), this._data = null, this.group.removeAll();
- }, mM.incrementalUpdate = function (t, e, i) {
- function n(t) {
- t.isGroup || (t.incremental = t.useHoverLayer = !0);
- }
- i = Jc(i);
- for (var r = t.start; r < t.end; r++) {
- var a = e.getItemLayout(r);
- if (Qc(e, a, r, i)) {
- var o = new this._symbolCtor(e, r, this._seriesScope);
- o.traverse(n), o.attr("position", a), this.group.add(o), e.setItemGraphicEl(r, o);
- }
- }
- }, mM.remove = function (t) {
- var e = this.group,
- i = this._data;
- i && t ? i.eachItemGraphicEl(function (t) {
- t.fadeOut(function () {
- e.remove(t);
- });
- }) : e.removeAll();
- };
- var vM = function (t, e, i, n, r, a, o, s) {
- for (var l = rd(t, e), u = [], h = [], c = [], d = [], f = [], p = [], g = [], m = ed(r, e, o), v = ed(a, t, s), y = 0; y < l.length; y++) {
- var _ = l[y],
- x = !0;
- switch (_.cmd) {
- case "=":
- var w = t.getItemLayout(_.idx),
- b = e.getItemLayout(_.idx1);
- (isNaN(w[0]) || isNaN(w[1])) && (w = b.slice()), u.push(w), h.push(b), c.push(i[_.idx]), d.push(n[_.idx1]), g.push(e.getRawIndex(_.idx1));
- break;
- case "+":
- var S = _.idx;
- u.push(r.dataToPoint([e.get(m.dataDimsForPoint[0], S), e.get(m.dataDimsForPoint[1], S)])), h.push(e.getItemLayout(S).slice()), c.push(nd(m, r, e, S)), d.push(n[S]), g.push(e.getRawIndex(S));
- break;
- case "-":
- var S = _.idx,
- M = t.getRawIndex(S);
- M !== S ? (u.push(t.getItemLayout(S)), h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0], S), t.get(v.dataDimsForPoint[1], S)])), c.push(i[S]), d.push(nd(v, a, t, S)), g.push(M)) : x = !1;
- }
- x && (f.push(_), p.push(p.length));
- }
- p.sort(function (t, e) {
- return g[t] - g[e];
- });
- for (var I = [], T = [], C = [], D = [], A = [], y = 0; y < p.length; y++) {
- var S = p[y];
- I[y] = u[S], T[y] = h[S], C[y] = c[S], D[y] = d[S], A[y] = f[S];
- }
- return {
- current: I,
- next: T,
- stackedOnCurrent: C,
- stackedOnNext: D,
- status: A
- };
- },
- yM = oe,
- _M = se,
- xM = Y,
- wM = H,
- bM = [],
- SM = [],
- MM = [],
- IM = Vr.extend({
- type: "ec-polyline",
- shape: {
- points: [],
- smooth: 0,
- smoothConstraint: !0,
- smoothMonotone: null,
- connectNulls: !1
- },
- style: {
- fill: null,
- stroke: "#000"
- },
- brush: t_(Vr.prototype.brush),
- buildPath: function (t, e) {
- var i = e.points,
- n = 0,
- r = i.length,
- a = ud(i, e.smoothConstraint);
- if (e.connectNulls) {
- for (; r > 0 && ad(i[r - 1]); r--);
- for (; r > n && ad(i[n]); n++);
- }
- for (; r > n;) n += od(t, i, n, r, r, 1, a.min, a.max, e.smooth, e.smoothMonotone, e.connectNulls) + 1;
- }
- }),
- TM = Vr.extend({
- type: "ec-polygon",
- shape: {
- points: [],
- stackedOnPoints: [],
- smooth: 0,
- stackedOnSmooth: 0,
- smoothConstraint: !0,
- smoothMonotone: null,
- connectNulls: !1
- },
- brush: t_(Vr.prototype.brush),
- buildPath: function (t, e) {
- var i = e.points,
- n = e.stackedOnPoints,
- r = 0,
- a = i.length,
- o = e.smoothMonotone,
- s = ud(i, e.smoothConstraint),
- l = ud(n, e.smoothConstraint);
- if (e.connectNulls) {
- for (; a > 0 && ad(i[a - 1]); a--);
- for (; a > r && ad(i[r]); r++);
- }
- for (; a > r;) {
- var u = od(t, i, r, a, a, 1, s.min, s.max, e.smooth, o, e.connectNulls);
- od(t, n, r + u - 1, u, a, -1, l.min, l.max, e.stackedOnSmooth, o, e.connectNulls), r += u + 1, t.closePath();
- }
- }
- });
- $s.extend({
- type: "line",
- init: function () {
- var t = new Bm(),
- e = new $c();
- this.group.add(e.group), this._symbolDraw = e, this._lineGroup = t;
- },
- render: function (t, e, i) {
- var n = t.coordinateSystem,
- r = this.group,
- a = t.getData(),
- o = t.getModel("lineStyle"),
- l = t.getModel("areaStyle"),
- u = a.mapArray(a.getItemLayout),
- h = "polar" === n.type,
- c = this._coordSys,
- d = this._symbolDraw,
- f = this._polyline,
- p = this._polygon,
- g = this._lineGroup,
- m = t.get("animation"),
- v = !l.isEmpty(),
- y = l.get("origin"),
- _ = ed(n, a, y),
- x = dd(n, a, _),
- w = t.get("showSymbol"),
- b = w && !h && gd(t, a, n),
- S = this._data;
- S && S.eachItemGraphicEl(function (t, e) {
- t.__temp && (r.remove(t), S.setItemGraphicEl(e, null));
- }), w || d.remove(), r.add(g);
- var M,
- I = !h && t.get("step");
- n && n.getArea && (M = n.getArea(), null != M.width ? (M.x -= .1, M.y -= .1, M.width += .2, M.height += .2) : M.r0 && (M.r0 -= .5, M.r1 += .5)), f && c.type === n.type && I === this._step ? (v && !p ? p = this._newPolygon(u, x, n, m) : p && !v && (g.remove(p), p = this._polygon = null), g.setClipPath(vd(n, !1, t)), w && d.updateData(a, {
- isIgnore: b,
- clipShape: M
- }), a.eachItemGraphicEl(function (t) {
- t.stopAnimation(!0);
- }), hd(this._stackedOnPoints, x) && hd(this._points, u) || (m ? this._updateAnimation(a, x, n, i, I, y) : (I && (u = fd(u, n, I), x = fd(x, n, I)), f.setShape({
- points: u
- }), p && p.setShape({
- points: u,
- stackedOnPoints: x
- })))) : (w && d.updateData(a, {
- isIgnore: b,
- clipShape: M
- }), I && (u = fd(u, n, I), x = fd(x, n, I)), f = this._newPolyline(u, n, m), v && (p = this._newPolygon(u, x, n, m)), g.setClipPath(vd(n, !0, t)));
- var T = pd(a, n) || a.getVisual("color");
- f.useStyle(s(o.getLineStyle(), {
- fill: "none",
- stroke: T,
- lineJoin: "bevel"
- }));
- var C = t.get("smooth");
- if (C = cd(t.get("smooth")), f.setShape({
- smooth: C,
- smoothMonotone: t.get("smoothMonotone"),
- connectNulls: t.get("connectNulls")
- }), p) {
- var D = a.getCalculationInfo("stackedOnSeries"),
- A = 0;
- p.useStyle(s(l.getAreaStyle(), {
- fill: T,
- opacity: .7,
- lineJoin: "bevel"
- })), D && (A = cd(D.get("smooth"))), p.setShape({
- smooth: C,
- stackedOnSmooth: A,
- smoothMonotone: t.get("smoothMonotone"),
- connectNulls: t.get("connectNulls")
- });
- }
- this._data = a, this._coordSys = n, this._stackedOnPoints = x, this._points = u, this._step = I, this._valueOrigin = y;
- },
- dispose: function () {},
- highlight: function (t, e, i, n) {
- var r = t.getData(),
- a = qn(r, n);
- if (!(a instanceof Array) && null != a && a >= 0) {
- var o = r.getItemGraphicEl(a);
- if (!o) {
- var s = r.getItemLayout(a);
- if (!s) return;
- o = new jc(r, a), o.position = s, o.setZ(t.get("zlevel"), t.get("z")), o.ignore = isNaN(s[0]) || isNaN(s[1]), o.__temp = !0, r.setItemGraphicEl(a, o), o.stopSymbolAnimation(!0), this.group.add(o);
- }
- o.highlight();
- } else $s.prototype.highlight.call(this, t, e, i, n);
- },
- downplay: function (t, e, i, n) {
- var r = t.getData(),
- a = qn(r, n);
- if (null != a && a >= 0) {
- var o = r.getItemGraphicEl(a);
- o && (o.__temp ? (r.setItemGraphicEl(a, null), this.group.remove(o)) : o.downplay());
- } else $s.prototype.downplay.call(this, t, e, i, n);
- },
- _newPolyline: function (t) {
- var e = this._polyline;
- return e && this._lineGroup.remove(e), e = new IM({
- shape: {
- points: t
- },
- silent: !0,
- z2: 10
- }), this._lineGroup.add(e), this._polyline = e, e;
- },
- _newPolygon: function (t, e) {
- var i = this._polygon;
- return i && this._lineGroup.remove(i), i = new TM({
- shape: {
- points: t,
- stackedOnPoints: e
- },
- silent: !0
- }), this._lineGroup.add(i), this._polygon = i, i;
- },
- _updateAnimation: function (t, e, i, n, r, a) {
- var o = this._polyline,
- s = this._polygon,
- l = t.hostModel,
- u = vM(this._data, t, this._stackedOnPoints, e, this._coordSys, i, this._valueOrigin, a),
- h = u.current,
- c = u.stackedOnCurrent,
- d = u.next,
- f = u.stackedOnNext;
- r && (h = fd(u.current, i, r), c = fd(u.stackedOnCurrent, i, r), d = fd(u.next, i, r), f = fd(u.stackedOnNext, i, r)), o.shape.__points = u.current, o.shape.points = h, Ga(o, {
- shape: {
- points: d
- }
- }, l), s && (s.setShape({
- points: h,
- stackedOnPoints: c
- }), Ga(s, {
- shape: {
- points: d,
- stackedOnPoints: f
- }
- }, l));
- for (var p = [], g = u.status, m = 0; m < g.length; m++) {
- var v = g[m].cmd;
- if ("=" === v) {
- var y = t.getItemGraphicEl(g[m].idx1);
- y && p.push({
- el: y,
- ptIdx: m
- });
- }
- }
- o.animators && o.animators.length && o.animators[0].during(function () {
- for (var t = 0; t < p.length; t++) {
- var e = p[t].el;
- e.attr("position", o.shape.__points[p[t].ptIdx]);
- }
- });
- },
- remove: function () {
- var t = this.group,
- e = this._data;
- this._lineGroup.removeAll(), this._symbolDraw.remove(!0), e && e.eachItemGraphicEl(function (i, n) {
- i.__temp && (t.remove(i), e.setItemGraphicEl(n, null));
- }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._data = null;
- }
- });
- var CM = function (t, e, i) {
- return {
- seriesType: t,
- performRawSeries: !0,
- reset: function (t, n) {
- function r(e, i) {
- if (c) {
- var n = t.getRawValue(i),
- r = t.getDataParams(i);
- u && e.setItemVisual(i, "symbol", o(n, r)), h && e.setItemVisual(i, "symbolSize", s(n, r));
- }
- if (e.hasItemOption) {
- var a = e.getItemModel(i),
- l = a.getShallow("symbol", !0),
- d = a.getShallow("symbolSize", !0),
- f = a.getShallow("symbolKeepAspect", !0);
- null != l && e.setItemVisual(i, "symbol", l), null != d && e.setItemVisual(i, "symbolSize", d), null != f && e.setItemVisual(i, "symbolKeepAspect", f);
- }
- }
- var a = t.getData(),
- o = t.get("symbol"),
- s = t.get("symbolSize"),
- l = t.get("symbolKeepAspect"),
- u = w(o),
- h = w(s),
- c = u || h,
- d = !u && o ? o : e,
- f = h ? null : s;
- return a.setVisual({
- legendSymbol: i || d,
- symbol: d,
- symbolSize: f,
- symbolKeepAspect: l
- }), n.isSeriesFiltered(t) ? void 0 : {
- dataEach: a.hasItemOption || c ? r : null
- };
- }
- };
- },
- DM = function (t) {
- return {
- seriesType: t,
- plan: Kx(),
- reset: function (t) {
- function e(t, e) {
- for (var i = t.end - t.start, r = a && new Float32Array(i * s), l = t.start, u = 0, h = [], c = []; l < t.end; l++) {
- var d;
- if (1 === s) {
- var f = e.get(o[0], l);
- d = !isNaN(f) && n.dataToPoint(f, null, c);
- } else {
- var f = h[0] = e.get(o[0], l),
- p = h[1] = e.get(o[1], l);
- d = !isNaN(f) && !isNaN(p) && n.dataToPoint(h, null, c);
- }
- a ? (r[u++] = d ? d[0] : 0 / 0, r[u++] = d ? d[1] : 0 / 0) : e.setItemLayout(l, d && d.slice() || [0 / 0, 0 / 0]);
- }
- a && e.setLayout("symbolPoints", r);
- }
- var i = t.getData(),
- n = t.coordinateSystem,
- r = t.pipelineContext,
- a = r.large;
- if (n) {
- var o = p(n.dimensions, function (t) {
- return i.mapDimension(t);
- }).slice(0, 2),
- s = o.length,
- l = i.getCalculationInfo("stackResultDimension");
- return ju(i, o[0]) && (o[0] = l), ju(i, o[1]) && (o[1] = l), s && {
- progress: e
- };
- }
- }
- };
- },
- AM = {
- average: function (t) {
- for (var e = 0, i = 0, n = 0; n < t.length; n++) isNaN(t[n]) || (e += t[n], i++);
- return 0 === i ? 0 / 0 : e / i;
- },
- sum: function (t) {
- for (var e = 0, i = 0; i < t.length; i++) e += t[i] || 0;
- return e;
- },
- max: function (t) {
- for (var e = -1 / 0, i = 0; i < t.length; i++) t[i] > e && (e = t[i]);
- return isFinite(e) ? e : 0 / 0;
- },
- min: function (t) {
- for (var e = 1 / 0, i = 0; i < t.length; i++) t[i] < e && (e = t[i]);
- return isFinite(e) ? e : 0 / 0;
- },
- nearest: function (t) {
- return t[0];
- }
- },
- kM = function (t) {
- return Math.round(t.length / 2);
- },
- PM = function (t) {
- return {
- seriesType: t,
- modifyOutputEnd: !0,
- reset: function (t) {
- var e = t.getData(),
- i = t.get("sampling"),
- n = t.coordinateSystem;
- if ("cartesian2d" === n.type && i) {
- var r = n.getBaseAxis(),
- a = n.getOtherAxis(r),
- o = r.getExtent(),
- s = o[1] - o[0],
- l = Math.round(e.count() / s);
- if (l > 1) {
- var u;
- "string" == typeof i ? u = AM[i] : "function" == typeof i && (u = i), u && t.setData(e.downSample(e.mapDimension(a.dim), 1 / l, u, kM));
- }
- }
- }
- };
- };
- fu(CM("line", "circle", "line")), du(DM("line")), su($w.PROCESSOR.STATISTIC, PM("line"));
- var LM = function (t, e, i) {
- e = x(e) && {
- coordDimensions: e
- } || o({}, e);
- var n = t.getSource(),
- r = Ob(n, e),
- a = new kb(r, t);
- return a.initData(n, i), a;
- },
- OM = {
- updateSelectedMap: function (t) {
- this._targetList = x(t) ? t.slice() : [], this._selectTargetMap = g(t || [], function (t, e) {
- return t.set(e.name, e), t;
- }, N());
- },
- select: function (t, e) {
- var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t),
- n = this.get("selectedMode");
- "single" === n && this._selectTargetMap.each(function (t) {
- t.selected = !1;
- }), i && (i.selected = !0);
- },
- unSelect: function (t, e) {
- var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
- i && (i.selected = !1);
- },
- toggleSelected: function (t, e) {
- var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
- return null != i ? (this[i.selected ? "unSelect" : "select"](t, e), i.selected) : void 0;
- },
- isSelected: function (t, e) {
- var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
- return i && i.selected;
- }
- },
- zM = yu({
- type: "series.pie",
- init: function (t) {
- zM.superApply(this, "init", arguments), this.legendDataProvider = function () {
- return this.getRawData();
- }, this.updateSelectedMap(this._createSelectableList()), this._defaultLabelLine(t);
- },
- mergeOption: function (t) {
- zM.superCall(this, "mergeOption", t), this.updateSelectedMap(this._createSelectableList());
- },
- getInitialData: function () {
- return LM(this, ["value"]);
- },
- _createSelectableList: function () {
- for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, r = t.count(); r > n; n++) i.push({
- name: t.getName(n),
- value: t.get(e, n),
- selected: Ns(t, n, "selected")
- });
- return i;
- },
- getDataParams: function (t) {
- var e = this.getData(),
- i = zM.superCall(this, "getDataParams", t),
- n = [];
- return e.each(e.mapDimension("value"), function (t) {
- n.push(t);
- }), i.percent = po(n, t, e.hostModel.get("percentPrecision")), i.$vars.push("percent"), i;
- },
- _defaultLabelLine: function (t) {
- Vn(t, "labelLine", ["show"]);
- var e = t.labelLine,
- i = t.emphasis.labelLine;
- e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.show;
- },
- defaultOption: {
- zlevel: 0,
- z: 2,
- legendHoverLink: !0,
- hoverAnimation: !0,
- center: ["50%", "50%"],
- radius: [0, "75%"],
- clockwise: !0,
- startAngle: 90,
- minAngle: 0,
- minShowLabelAngle: 0,
- selectedOffset: 10,
- hoverOffset: 10,
- avoidLabelOverlap: !0,
- percentPrecision: 2,
- stillShowZeroSum: !0,
- label: {
- rotate: !1,
- show: !0,
- position: "outer"
- },
- labelLine: {
- show: !0,
- length: 15,
- length2: 15,
- smooth: !1,
- lineStyle: {
- width: 1,
- type: "solid"
- }
- },
- itemStyle: {
- borderWidth: 1
- },
- animationType: "expansion",
- animationTypeUpdate: "transition",
- animationEasing: "cubicOut"
- }
- });
- c(zM, OM);
- var EM = xd.prototype;
- EM.updateData = function (t, e, i) {
- var n = this.childAt(0),
- r = this.childAt(1),
- a = this.childAt(2),
- l = t.hostModel,
- u = t.getItemModel(e),
- h = t.getItemLayout(e),
- c = o({}, h);
- c.label = null;
- var d = l.getShallow("animationTypeUpdate");
- if (i) {
- n.setShape(c);
- var f = l.getShallow("animationType");
- "scale" === f ? (n.shape.r = h.r0, Va(n, {
- shape: {
- r: h.r
- }
- }, l, e)) : (n.shape.endAngle = h.startAngle, Ga(n, {
- shape: {
- endAngle: h.endAngle
- }
- }, l, e));
- } else "expansion" === d ? n.setShape(c) : Ga(n, {
- shape: c
- }, l, e);
- var p = t.getItemVisual(e, "color");
- n.useStyle(s({
- lineJoin: "bevel",
- fill: p
- }, u.getModel("itemStyle").getItemStyle())), n.hoverStyle = u.getModel("emphasis.itemStyle").getItemStyle();
- var g = u.getShallow("cursor");
- g && n.attr("cursor", g), _d(this, t.getItemLayout(e), l.isSelected(null, e), l.get("selectedOffset"), l.get("animation"));
- var m = !i && "transition" === d;
- this._updateLabel(t, e, m), this.highDownOnUpdate = u.get("hoverAnimation") && l.isAnimationEnabled() ? function (t, e) {
- "emphasis" === e ? (r.ignore = r.hoverIgnore, a.ignore = a.hoverIgnore, n.stopAnimation(!0), n.animateTo({
- shape: {
- r: h.r + l.get("hoverOffset")
- }
- }, 300, "elasticOut")) : (r.ignore = r.normalIgnore, a.ignore = a.normalIgnore, n.stopAnimation(!0), n.animateTo({
- shape: {
- r: h.r
- }
- }, 300, "elasticOut"));
- } : null, Ma(this);
- }, EM._updateLabel = function (t, e, i) {
- var n = this.childAt(1),
- r = this.childAt(2),
- a = t.hostModel,
- o = t.getItemModel(e),
- s = t.getItemLayout(e),
- l = s.label,
- u = t.getItemVisual(e, "color");
- if (!l || isNaN(l.x) || isNaN(l.y)) return void (r.ignore = r.normalIgnore = r.hoverIgnore = n.ignore = n.normalIgnore = n.hoverIgnore = !0);
- var h = {
- points: l.linePoints || [[l.x, l.y], [l.x, l.y], [l.x, l.y]]
- },
- c = {
- x: l.x,
- y: l.y
- };
- i ? (Ga(n, {
- shape: h
- }, a, e), Ga(r, {
- style: c
- }, a, e)) : (n.attr({
- shape: h
- }), r.attr({
- style: c
- })), r.attr({
- rotation: l.rotation,
- origin: [l.x, l.y],
- z2: 10
- });
- var d = o.getModel("label"),
- f = o.getModel("emphasis.label"),
- p = o.getModel("labelLine"),
- g = o.getModel("emphasis.labelLine"),
- u = t.getItemVisual(e, "color");
- Da(r.style, r.hoverStyle = {}, d, f, {
- labelFetcher: t.hostModel,
- labelDataIndex: e,
- defaultText: t.getName(e),
- autoColor: u,
- useInsideStyle: !!l.inside
- }, {
- textAlign: l.textAlign,
- textVerticalAlign: l.verticalAlign,
- opacity: t.getItemVisual(e, "opacity")
- }), r.ignore = r.normalIgnore = !d.get("show"), r.hoverIgnore = !f.get("show"), n.ignore = n.normalIgnore = !p.get("show"), n.hoverIgnore = !g.get("show"), n.setStyle({
- stroke: u,
- opacity: t.getItemVisual(e, "opacity")
- }), n.setStyle(p.getModel("lineStyle").getLineStyle()), n.hoverStyle = g.getModel("lineStyle").getLineStyle();
- var m = p.get("smooth");
- m && m === !0 && (m = .4), n.setShape({
- smooth: m
- });
- }, h(xd, Bm);
- var RM = ($s.extend({
- type: "pie",
- init: function () {
- var t = new Bm();
- this._sectorGroup = t;
- },
- render: function (t, e, i, n) {
- if (!n || n.from !== this.uid) {
- var r = t.getData(),
- a = this._data,
- o = this.group,
- s = e.get("animation"),
- l = !a,
- u = t.get("animationType"),
- h = t.get("animationTypeUpdate"),
- c = _(yd, this.uid, t, s, i),
- d = t.get("selectedMode");
- if (r.diff(a).add(function (t) {
- var e = new xd(r, t);
- l && "scale" !== u && e.eachChild(function (t) {
- t.stopAnimation(!0);
- }), d && e.on("click", c), r.setItemGraphicEl(t, e), o.add(e);
- }).update(function (t, e) {
- var i = a.getItemGraphicEl(e);
- l || "transition" === h || i.eachChild(function (t) {
- t.stopAnimation(!0);
- }), i.updateData(r, t), i.off("click"), d && i.on("click", c), o.add(i), r.setItemGraphicEl(t, i);
- }).remove(function (t) {
- var e = a.getItemGraphicEl(t);
- o.remove(e);
- }).execute(), s && r.count() > 0 && (l ? "scale" !== u : "transition" !== h)) {
- for (var f = r.getItemLayout(0), p = 1; isNaN(f.startAngle) && p < r.count(); ++p) f = r.getItemLayout(p);
- var g = Math.max(i.getWidth(), i.getHeight()) / 2,
- m = y(o.removeClipPath, o);
- o.setClipPath(this._createClipPath(f.cx, f.cy, g, f.startAngle, f.clockwise, m, t, l));
- } else o.removeClipPath();
- this._data = r;
- }
- },
- dispose: function () {},
- _createClipPath: function (t, e, i, n, r, a, o, s) {
- var l = new e_({
- shape: {
- cx: t,
- cy: e,
- r0: 0,
- r: i,
- startAngle: n,
- endAngle: n,
- clockwise: r
- }
- }),
- u = s ? Va : Ga;
- return u(l, {
- shape: {
- endAngle: n + (r ? 1 : -1) * Math.PI * 2
- }
- }, o, a), l;
- },
- containPoint: function (t, e) {
- var i = e.getData(),
- n = i.getItemLayout(0);
- if (n) {
- var r = t[0] - n.cx,
- a = t[1] - n.cy,
- o = Math.sqrt(r * r + a * a);
- return o <= n.r && o >= n.r0;
- }
- }
- }), function (t, e) {
- f(e, function (e) {
- e.update = "updateView", uu(e, function (i, n) {
- var r = {};
- return n.eachComponent({
- mainType: "series",
- subType: t,
- query: i
- }, function (t) {
- t[e.method] && t[e.method](i.name, i.dataIndex);
- var n = t.getData();
- n.each(function (e) {
- var i = n.getName(e);
- r[i] = t.isSelected(i) || !1;
- });
- }), {
- name: i.name,
- selected: r,
- seriesId: i.seriesId
- };
- });
- });
- }),
- BM = function (t) {
- return {
- getTargetSeries: function (e) {
- var i = {},
- n = N();
- return e.eachSeriesByType(t, function (t) {
- t.__paletteScope = i, n.set(t.uid, t);
- }), n;
- },
- reset: function (t) {
- var e = t.getRawData(),
- i = {},
- n = t.getData();
- n.each(function (t) {
- var e = n.getRawIndex(t);
- i[e] = t;
- }), e.each(function (r) {
- var a,
- o = i[r],
- s = null != o && n.getItemVisual(o, "color", !0),
- l = null != o && n.getItemVisual(o, "borderColor", !0);
- if (s && l || (a = e.getItemModel(r)), s) e.setItemVisual(r, "color", s);else {
- var u = a.get("itemStyle.color") || t.getColorFromPalette(e.getName(r) || r + "", t.__paletteScope, e.count());
- e.setItemVisual(r, "color", u), null != o && n.setItemVisual(o, "color", u);
- }
- if (l) e.setItemVisual(r, "borderColor", l);else {
- var h = a.get("itemStyle.borderColor");
- e.setItemVisual(r, "borderColor", h), null != o && n.setItemVisual(o, "borderColor", h);
- }
- });
- }
- };
- },
- NM = Math.PI / 180,
- FM = function (t, e, i, n) {
- var r,
- a,
- o = t.getData(),
- s = [],
- l = !1,
- u = (t.get("minShowLabelAngle") || 0) * NM;
- o.each(function (i) {
- var n = o.getItemLayout(i),
- h = o.getItemModel(i),
- c = h.getModel("label"),
- d = c.get("position") || h.get("emphasis.label.position"),
- f = h.getModel("labelLine"),
- p = f.get("length"),
- g = f.get("length2");
- if (!(n.angle < u)) {
- var m,
- v,
- y,
- _,
- x = (n.startAngle + n.endAngle) / 2,
- w = Math.cos(x),
- b = Math.sin(x);
- r = n.cx, a = n.cy;
- var S = "inside" === d || "inner" === d;
- if ("center" === d) m = n.cx, v = n.cy, _ = "center";else {
- var M = (S ? (n.r + n.r0) / 2 * w : n.r * w) + r,
- I = (S ? (n.r + n.r0) / 2 * b : n.r * b) + a;
- if (m = M + 3 * w, v = I + 3 * b, !S) {
- var T = M + w * (p + e - n.r),
- C = I + b * (p + e - n.r),
- D = T + (0 > w ? -1 : 1) * g,
- A = C;
- m = D + (0 > w ? -5 : 5), v = A, y = [[M, I], [T, C], [D, A]];
- }
- _ = S ? "center" : w > 0 ? "left" : "right";
- }
- var k,
- P = c.getFont(),
- L = c.get("rotate");
- k = "number" == typeof L ? L * (Math.PI / 180) : L ? 0 > w ? -x + Math.PI : -x : 0;
- var O = t.getFormattedLabel(i, "normal") || o.getName(i),
- z = Gi(O, P, _, "top");
- l = !!k, n.label = {
- x: m,
- y: v,
- position: d,
- height: z.height,
- len: p,
- len2: g,
- linePoints: y,
- textAlign: _,
- verticalAlign: "middle",
- rotation: k,
- inside: S
- }, S || s.push(n.label);
- }
- }), !l && t.get("avoidLabelOverlap") && bd(s, r, a, e, i, n);
- },
- GM = 2 * Math.PI,
- VM = Math.PI / 180,
- HM = function (t, e, i) {
- e.eachSeriesByType(t, function (t) {
- var e = t.getData(),
- n = e.mapDimension("value"),
- r = t.get("center"),
- a = t.get("radius");
- x(a) || (a = [0, a]), x(r) || (r = [r, r]);
- var o = i.getWidth(),
- s = i.getHeight(),
- l = Math.min(o, s),
- u = so(r[0], o),
- h = so(r[1], s),
- c = so(a[0], l / 2),
- d = so(a[1], l / 2),
- f = -t.get("startAngle") * VM,
- p = t.get("minAngle") * VM,
- g = 0;
- e.each(n, function (t) {
- !isNaN(t) && g++;
- });
- var m = e.getSum(n),
- v = Math.PI / (m || g) * 2,
- y = t.get("clockwise"),
- _ = t.get("roseType"),
- w = t.get("stillShowZeroSum"),
- b = e.getDataExtent(n);
- b[0] = 0;
- var S = GM,
- M = 0,
- I = f,
- T = y ? 1 : -1;
- if (e.each(n, function (t, i) {
- var n;
- if (isNaN(t)) return void e.setItemLayout(i, {
- angle: 0 / 0,
- startAngle: 0 / 0,
- endAngle: 0 / 0,
- clockwise: y,
- cx: u,
- cy: h,
- r0: c,
- r: _ ? 0 / 0 : d
- });
- n = "area" !== _ ? 0 === m && w ? v : t * v : GM / g, p > n ? (n = p, S -= p) : M += t;
- var r = I + T * n;
- e.setItemLayout(i, {
- angle: n,
- startAngle: I,
- endAngle: r,
- clockwise: y,
- cx: u,
- cy: h,
- r0: c,
- r: _ ? oo(t, b, [c, d]) : d
- }), I = r;
- }), GM > S && g) if (.001 >= S) {
- var C = GM / g;
- e.each(n, function (t, i) {
- if (!isNaN(t)) {
- var n = e.getItemLayout(i);
- n.angle = C, n.startAngle = f + T * i * C, n.endAngle = f + T * (i + 1) * C;
- }
- });
- } else v = S / M, I = f, e.each(n, function (t, i) {
- if (!isNaN(t)) {
- var n = e.getItemLayout(i),
- r = n.angle === p ? p : t * v;
- n.startAngle = I, n.endAngle = I + T * r, I += T * r;
- }
- });
- FM(t, d, o, s);
- });
- },
- WM = function (t) {
- return {
- seriesType: t,
- reset: function (t, e) {
- var i = e.findComponents({
- mainType: "legend"
- });
- if (i && i.length) {
- var n = t.getData();
- n.filterSelf(function (t) {
- for (var e = n.getName(t), r = 0; r < i.length; r++) if (!i[r].isSelected(e)) return !1;
- return !0;
- });
- }
- }
- };
- };
- RM("pie", [{
- type: "pieToggleSelect",
- event: "pieselectchanged",
- method: "toggleSelected"
- }, {
- type: "pieSelect",
- event: "pieselected",
- method: "select"
- }, {
- type: "pieUnSelect",
- event: "pieunselected",
- method: "unSelect"
- }]), fu(BM("pie")), du(_(HM, "pie")), su(WM("pie"));
- for (var UM = [126, 25], XM = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, .7], [52, .7], [56, 7.7], [59, .7], [64, .7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]], YM = 0; YM < XM.length; YM++) for (var jM = 0; jM < XM[YM].length; jM++) XM[YM][jM][0] /= 10.5, XM[YM][jM][1] /= -14, XM[YM][jM][0] += UM[0], XM[YM][jM][1] += UM[1];
- var qM = function (t, e) {
- "china" === t && e.push(new Bh("南海诸岛", p(XM, function (t) {
- return {
- type: "polygon",
- exterior: t
- };
- }), UM));
- },
- ZM = {
- "南海诸岛": [32, 80],
- "广东": [0, -10],
- "香港": [10, 5],
- "澳门": [-10, 10],
- "天津": [5, 5]
- },
- KM = function (t, e) {
- if ("china" === t) {
- var i = ZM[e.name];
- if (i) {
- var n = e.center;
- n[0] += i[0] / 10.5, n[1] += -i[1] / 14;
- }
- }
- },
- $M = {
- Russia: [100, 60],
- "United States": [-99, 38],
- "United States of America": [-99, 38]
- },
- QM = function (t, e) {
- if ("world" === t) {
- var i = $M[e.name];
- if (i) {
- var n = e.center;
- n[0] = i[0], n[1] = i[1];
- }
- }
- },
- JM = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]],
- tI = function (t, e) {
- "china" === t && "台湾" === e.name && e.geometries.push({
- type: "polygon",
- exterior: JM[0]
- });
- },
- eI = Zn(),
- iI = {
- load: function (t, e) {
- var i = eI(e).parsed;
- if (i) return i;
- var n,
- r = e.specialAreas || {},
- a = e.geoJSON;
- try {
- n = a ? wS(a) : [];
- } catch (o) {
- throw new Error("Invalid geoJson format\n" + o.message);
- }
- return qM(t, n), f(n, function (e) {
- var i = e.name;
- KM(t, e), QM(t, e), tI(t, e);
- var n = r[i];
- n && e.transformTo(n.left, n.top, n.width, n.height);
- }), eI(e).parsed = {
- regions: n,
- boundingRect: Md(n)
- };
- }
- },
- nI = Zn(),
- rI = {
- load: function (t, e) {
- var i = nI(e).originRoot;
- if (i) return {
- root: i,
- boundingRect: nI(e).boundingRect
- };
- var n = Id(e);
- return nI(e).originRoot = n.root, nI(e).boundingRect = n.boundingRect, n;
- },
- makeGraphic: function (t, e, i) {
- var n = nI(e),
- r = n.rootMap || (n.rootMap = N()),
- a = r.get(i);
- if (a) return a;
- var o = n.originRoot,
- s = n.boundingRect;
- return n.originRootHostKey ? a = Id(e, s).root : (n.originRootHostKey = i, a = o), r.set(i, a);
- },
- removeGraphic: function (t, e, i) {
- var n = nI(e),
- r = n.rootMap;
- r && r.removeKey(i), i === n.originRootHostKey && (n.originRootHostKey = null);
- }
- },
- aI = {
- geoJSON: iI,
- svg: rI
- },
- oI = {
- load: function (t, e) {
- var i,
- n = [],
- r = N(),
- a = N(),
- o = Cd(t);
- return f(o, function (o) {
- var s = aI[o.type].load(t, o);
- f(s.regions, function (t) {
- var i = t.name;
- e && e.hasOwnProperty(i) && (t = t.cloneShallow(i = e[i])), n.push(t), r.set(i, t), a.set(i, t.center);
- });
- var l = s.boundingRect;
- l && (i ? i.union(l) : i = l.clone());
- }), {
- regions: n,
- regionsMap: r,
- nameCoordMap: a,
- boundingRect: i || new wi(0, 0, 0, 0)
- };
- },
- makeGraphic: Td("makeGraphic"),
- removeGraphic: Td("removeGraphic")
- },
- sI = jx.extend({
- type: "series.map",
- dependencies: ["geo"],
- layoutMode: "box",
- needsDrawMap: !1,
- seriesGroup: [],
- getInitialData: function () {
- for (var t = LM(this, ["value"]), e = t.mapDimension("value"), i = N(), n = [], r = [], a = 0, o = t.count(); o > a; a++) {
- var s = t.getName(a);
- i.set(s, !0), n.push({
- name: s,
- value: t.get(e, a),
- selected: Ns(t, a, "selected")
- });
- }
- var l = oI.load(this.getMapType(), this.option.nameMap);
- return f(l.regions, function (t) {
- var e = t.name;
- i.get(e) || (n.push({
- name: e
- }), r.push(e));
- }), this.updateSelectedMap(n), t.appendValues([], r), t;
- },
- getHostGeoModel: function () {
- var t = this.option.geoIndex;
- return null != t ? this.dependentModels.geo[t] : null;
- },
- getMapType: function () {
- return (this.getHostGeoModel() || this).option.map;
- },
- getRawValue: function (t) {
- var e = this.getData();
- return e.get(e.mapDimension("value"), t);
- },
- getRegionModel: function (t) {
- var e = this.getData();
- return e.getItemModel(e.indexOfName(t));
- },
- formatTooltip: function (t) {
- for (var e = this.getData(), i = Mo(this.getRawValue(t)), n = e.getName(t), r = this.seriesGroup, a = [], o = 0; o < r.length; o++) {
- var s = r[o].originalData.indexOfName(n),
- l = e.mapDimension("value");
- isNaN(r[o].originalData.get(l, s)) || a.push(To(r[o].name));
- }
- return a.join(", ") + "<br />" + To(n + " : " + i);
- },
- getTooltipPosition: function (t) {
- if (null != t) {
- var e = this.getData().getName(t),
- i = this.coordinateSystem,
- n = i.getRegion(e);
- return n && i.dataToPoint(n.center);
- }
- },
- setZoom: function (t) {
- this.option.zoom = t;
- },
- setCenter: function (t) {
- this.option.center = t;
- },
- defaultOption: {
- zlevel: 0,
- z: 2,
- coordinateSystem: "geo",
- map: "",
- left: "center",
- top: "center",
- aspectScale: .75,
- showLegendSymbol: !0,
- dataRangeHoverLink: !0,
- boundingCoords: null,
- center: null,
- zoom: 1,
- scaleLimit: null,
- label: {
- show: !1,
- color: "#000"
- },
- itemStyle: {
- borderWidth: .5,
- borderColor: "#444",
- areaColor: "#eee"
- },
- emphasis: {
- label: {
- show: !0,
- color: "rgb(100,0,0)"
- },
- itemStyle: {
- areaColor: "rgba(255,215,0,0.8)"
- }
- }
- }
- });
- c(sI, OM);
- var lI = "\x00_ec_interaction_mutex";
- uu({
- type: "takeGlobalCursor",
- event: "globalCursorTaken",
- update: "update"
- }, function () {}), c(kd, Yg);
- var uI = {
- axisPointer: 1,
- tooltip: 1,
- brush: 1
- };
- Xd.prototype = {
- constructor: Xd,
- draw: function (t, e, i, n) {
- var r = "geo" === t.mainType,
- a = t.getData && t.getData();
- r && e.eachComponent({
- mainType: "series",
- subType: "map"
- }, function (e) {
- a || e.getHostGeoModel() !== t || (a = e.getData());
- });
- var o = t.coordinateSystem;
- this._updateBackground(o);
- var s = this._regionsGroup,
- l = this.group;
- o._roamTransformable.transform && (l.transform = o._roamTransformable.transform.slice(), l.decomposeTransform());
- var u = o._rawTransformable.scale,
- h = o._rawTransformable.position;
- s.removeAll();
- var c = ["itemStyle"],
- d = ["emphasis", "itemStyle"],
- p = ["label"],
- g = ["emphasis", "label"],
- m = N();
- f(o.regions, function (e) {
- var i = m.get(e.name) || m.set(e.name, new Bm()),
- n = new g_({
- segmentIgnoreThreshold: 1,
- shape: {
- paths: []
- }
- });
- i.add(n);
- var o,
- v = t.getRegionModel(e.name) || t,
- y = v.getModel(c),
- _ = v.getModel(d),
- x = Hd(y),
- w = Hd(_),
- b = v.getModel(p),
- S = v.getModel(g);
- if (a) {
- o = a.indexOfName(e.name);
- var M = a.getItemVisual(o, "color", !0);
- M && (x.fill = M);
- }
- var I = function (t) {
- return [t[0] * u[0] + h[0], t[1] * u[1] + h[1]];
- };
- f(e.geometries, function (t) {
- if ("polygon" === t.type) {
- for (var e = [], i = 0; i < t.exterior.length; ++i) e.push(I(t.exterior[i]));
- n.shape.paths.push(new a_({
- segmentIgnoreThreshold: 1,
- shape: {
- points: e
- }
- }));
- for (var i = 0; i < (t.interiors ? t.interiors.length : 0); ++i) {
- for (var r = t.interiors[i], e = [], a = 0; a < r.length; ++a) e.push(I(r[a]));
- n.shape.paths.push(new a_({
- segmentIgnoreThreshold: 1,
- shape: {
- points: e
- }
- }));
- }
- }
- }), n.setStyle(x), n.style.strokeNoScale = !0, n.culling = !0;
- var T = b.get("show"),
- C = S.get("show"),
- D = a && isNaN(a.get(a.mapDimension("value"), o)),
- A = a && a.getItemLayout(o);
- if (r || D && (T || C) || A && A.showLabel) {
- var k,
- P = r ? e.name : o;
- (!a || o >= 0) && (k = t);
- var L = new $y({
- position: I(e.center.slice()),
- scale: [1 / l.scale[0], 1 / l.scale[1]],
- z2: 10,
- silent: !0
- });
- Da(L.style, L.hoverStyle = {}, b, S, {
- labelFetcher: k,
- labelDataIndex: P,
- defaultText: e.name,
- useInsideStyle: !1
- }, {
- textAlign: "center",
- textVerticalAlign: "middle"
- }), i.add(L);
- }
- if (a) a.setItemGraphicEl(o, i);else {
- var v = t.getRegionModel(e.name);
- n.eventData = {
- componentType: "geo",
- componentIndex: t.componentIndex,
- geoIndex: t.componentIndex,
- name: e.name,
- region: v && v.option || {}
- };
- }
- var O = i.__regions || (i.__regions = []);
- O.push(e), i.highDownSilentOnTouch = !!t.get("selectedMode"), Ma(i, w), s.add(i);
- }), this._updateController(t, e, i), Wd(this, t, s, i, n), Ud(t, s);
- },
- remove: function () {
- this._regionsGroup.removeAll(), this._backgroundGroup.removeAll(), this._controller.dispose(), this._mapName && oI.removeGraphic(this._mapName, this.uid), this._mapName = null, this._controllerHost = {};
- },
- _updateBackground: function (t) {
- var e = t.map;
- this._mapName !== e && f(oI.makeGraphic(e, this.uid), function (t) {
- this._backgroundGroup.add(t);
- }, this), this._mapName = e;
- },
- _updateController: function (t, e, i) {
- function n() {
- var e = {
- type: "geoRoam",
- componentType: l
- };
- return e[l + "Id"] = t.id, e;
- }
- var r = t.coordinateSystem,
- a = this._controller,
- s = this._controllerHost;
- s.zoomLimit = t.get("scaleLimit"), s.zoom = r.getZoom(), a.enable(t.get("roam") || !1);
- var l = t.mainType;
- a.off("pan").on("pan", function (t) {
- this._mouseDownFlag = !1, Fd(s, t.dx, t.dy), i.dispatchAction(o(n(), {
- dx: t.dx,
- dy: t.dy
- }));
- }, this), a.off("zoom").on("zoom", function (t) {
- if (this._mouseDownFlag = !1, Gd(s, t.scale, t.originX, t.originY), i.dispatchAction(o(n(), {
- zoom: t.scale,
- originX: t.originX,
- originY: t.originY
- })), this._updateGroup) {
- var e = this.group.scale;
- this._regionsGroup.traverse(function (t) {
- "text" === t.type && t.attr("scale", [1 / e[0], 1 / e[1]]);
- });
- }
- }, this), a.setPointerChecker(function (e, n, a) {
- return r.getViewRectAfterRoam().contain(n, a) && !Vd(e, i, t);
- });
- }
- };
- var hI = "__seriesMapHighDown",
- cI = "__seriesMapCallKey";
- _u({
- type: "map",
- render: function (t, e, i, n) {
- if (!n || "mapToggleSelect" !== n.type || n.from !== this.uid) {
- var r = this.group;
- if (r.removeAll(), !t.getHostGeoModel()) {
- if (n && "geoRoam" === n.type && "series" === n.componentType && n.seriesId === t.id) {
- var a = this._mapDraw;
- a && r.add(a.group);
- } else if (t.needsDrawMap) {
- var a = this._mapDraw || new Xd(i, !0);
- r.add(a.group), a.draw(t, e, i, this, n), this._mapDraw = a;
- } else this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
- t.get("showLegendSymbol") && e.getComponent("legend") && this._renderSymbols(t, e, i);
- }
- }
- },
- remove: function () {
- this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll();
- },
- dispose: function () {
- this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
- },
- _renderSymbols: function (t) {
- var e = t.originalData,
- i = this.group;
- e.each(e.mapDimension("value"), function (n, r) {
- if (!isNaN(n)) {
- var a = e.getItemLayout(r);
- if (a && a.point) {
- var s = a.point,
- l = a.offset,
- u = new Qy({
- style: {
- fill: t.getData().getVisual("color")
- },
- shape: {
- cx: s[0] + 9 * l,
- cy: s[1],
- r: 3
- },
- silent: !0,
- z2: 8 + (l ? 0 : S_ + 1)
- });
- if (!l) {
- var h = t.mainSeries.getData(),
- c = e.getName(r),
- d = h.indexOfName(c),
- f = e.getItemModel(r),
- p = f.getModel("label"),
- g = f.getModel("emphasis.label"),
- m = h.getItemGraphicEl(d),
- v = A(t.getFormattedLabel(d, "normal"), c),
- y = A(t.getFormattedLabel(d, "emphasis"), v),
- x = m[hI],
- w = Math.random();
- if (!x) {
- x = m[hI] = {};
- var b = _(Yd, !0),
- S = _(Yd, !1);
- m.on("mouseover", b).on("mouseout", S).on("emphasis", b).on("normal", S);
- }
- m[cI] = w, o(x, {
- recordVersion: w,
- circle: u,
- labelModel: p,
- hoverLabelModel: g,
- emphasisText: y,
- normalText: v
- }), jd(x, !1);
- }
- i.add(u);
- }
- }
- });
- }
- }), uu({
- type: "geoRoam",
- event: "geoRoam",
- update: "updateTransform"
- }, function (t, e) {
- var i = t.componentType || "series";
- e.eachComponent({
- mainType: i,
- query: t
- }, function (e) {
- var n = e.coordinateSystem;
- if ("geo" === n.type) {
- var r = qd(n, t, e.get("scaleLimit"));
- e.setCenter && e.setCenter(r.center), e.setZoom && e.setZoom(r.zoom), "series" === i && f(e.seriesGroup, function (t) {
- t.setCenter(r.center), t.setZoom(r.zoom);
- });
- }
- });
- });
- var dI = ae;
- c(Zd, lm), Kd.prototype = {
- constructor: Kd,
- type: "view",
- dimensions: ["x", "y"],
- setBoundingRect: function (t, e, i, n) {
- return this._rect = new wi(t, e, i, n), this._rect;
- },
- getBoundingRect: function () {
- return this._rect;
- },
- setViewRect: function (t, e, i, n) {
- this.transformTo(t, e, i, n), this._viewRect = new wi(t, e, i, n);
- },
- transformTo: function (t, e, i, n) {
- var r = this.getBoundingRect(),
- a = this._rawTransformable;
- a.transform = r.calculateTransform(new wi(t, e, i, n)), a.decomposeTransform(), this._updateTransform();
- },
- setCenter: function (t) {
- t && (this._center = t, this._updateCenterAndZoom());
- },
- setZoom: function (t) {
- t = t || 1;
- var e = this.zoomLimit;
- e && (null != e.max && (t = Math.min(e.max, t)), null != e.min && (t = Math.max(e.min, t))), this._zoom = t, this._updateCenterAndZoom();
- },
- getDefaultCenter: function () {
- var t = this.getBoundingRect(),
- e = t.x + t.width / 2,
- i = t.y + t.height / 2;
- return [e, i];
- },
- getCenter: function () {
- return this._center || this.getDefaultCenter();
- },
- getZoom: function () {
- return this._zoom || 1;
- },
- getRoamTransform: function () {
- return this._roamTransformable.getLocalTransform();
- },
- _updateCenterAndZoom: function () {
- var t = this._rawTransformable.getLocalTransform(),
- e = this._roamTransformable,
- i = this.getDefaultCenter(),
- n = this.getCenter(),
- r = this.getZoom();
- n = ae([], n, t), i = ae([], i, t), e.origin = n, e.position = [i[0] - n[0], i[1] - n[1]], e.scale = [r, r], this._updateTransform();
- },
- _updateTransform: function () {
- var t = this._roamTransformable,
- e = this._rawTransformable;
- e.parent = t, t.updateTransform(), e.updateTransform(), ke(this.transform || (this.transform = []), e.transform || De()), this._rawTransform = e.getLocalTransform(), this.invTransform = this.invTransform || [], Ee(this.invTransform, this.transform), this.decomposeTransform();
- },
- getViewRect: function () {
- return this._viewRect;
- },
- getViewRectAfterRoam: function () {
- var t = this.getBoundingRect().clone();
- return t.applyTransform(this.transform), t;
- },
- dataToPoint: function (t, e, i) {
- var n = e ? this._rawTransform : this.transform;
- return i = i || [], n ? dI(i, t, n) : H(i, t);
- },
- pointToData: function (t) {
- var e = this.invTransform;
- return e ? dI([], t, e) : [t[0], t[1]];
- },
- convertToPixel: _($d, "dataToPoint"),
- convertFromPixel: _($d, "pointToData"),
- containPoint: function (t) {
- return this.getViewRectAfterRoam().contain(t[0], t[1]);
- }
- }, c(Kd, lm), Qd.prototype = {
- constructor: Qd,
- type: "geo",
- dimensions: ["lng", "lat"],
- containCoord: function (t) {
- for (var e = this.regions, i = 0; i < e.length; i++) if (e[i].contain(t)) return !0;
- return !1;
- },
- transformTo: function (t, e, i, n) {
- var r = this.getBoundingRect(),
- a = this._invertLongitute;
- r = r.clone(), a && (r.y = -r.y - r.height);
- var o = this._rawTransformable;
- if (o.transform = r.calculateTransform(new wi(t, e, i, n)), o.decomposeTransform(), a) {
- var s = o.scale;
- s[1] = -s[1];
- }
- o.updateTransform(), this._updateTransform();
- },
- getRegion: function (t) {
- return this._regionsMap.get(t);
- },
- getRegionByCoord: function (t) {
- for (var e = this.regions, i = 0; i < e.length; i++) if (e[i].contain(t)) return e[i];
- },
- addGeoCoord: function (t, e) {
- this._nameCoordMap.set(t, e);
- },
- getGeoCoord: function (t) {
- return this._nameCoordMap.get(t);
- },
- getBoundingRect: function () {
- return this._rect;
- },
- dataToPoint: function (t, e, i) {
- return "string" == typeof t && (t = this.getGeoCoord(t)), t ? Kd.prototype.dataToPoint.call(this, t, e, i) : void 0;
- },
- convertToPixel: _(Jd, "dataToPoint"),
- convertFromPixel: _(Jd, "pointToData")
- }, c(Qd, Kd);
- var fI = {
- dimensions: Qd.prototype.dimensions,
- create: function (t, e) {
- var i = [];
- t.eachComponent("geo", function (t, n) {
- var r = t.get("map"),
- a = t.get("aspectScale"),
- o = !0,
- s = kw.retrieveMap(r);
- s && s[0] && "svg" === s[0].type ? (null == a && (a = 1), o = !1) : null == a && (a = .75);
- var l = new Qd(r + n, r, t.get("nameMap"), o);
- l.aspectScale = a, l.zoomLimit = t.get("scaleLimit"), i.push(l), ef(l, t), t.coordinateSystem = l, l.model = t, l.resize = tf, l.resize(t, e);
- }), t.eachSeries(function (t) {
- var e = t.get("coordinateSystem");
- if ("geo" === e) {
- var n = t.get("geoIndex") || 0;
- t.coordinateSystem = i[n];
- }
- });
- var n = {};
- return t.eachSeriesByType("map", function (t) {
- if (!t.getHostGeoModel()) {
- var e = t.getMapType();
- n[e] = n[e] || [], n[e].push(t);
- }
- }), f(n, function (t, n) {
- var r = p(t, function (t) {
- return t.get("nameMap");
- }),
- o = new Qd(n, n, a(r));
- o.zoomLimit = D.apply(null, p(t, function (t) {
- return t.get("scaleLimit");
- })), i.push(o), o.resize = tf, o.aspectScale = t[0].get("aspectScale"), o.resize(t[0], e), f(t, function (t) {
- t.coordinateSystem = o, ef(o, t);
- });
- }), i;
- },
- getFilledRegions: function (t, e, i) {
- for (var n = (t || []).slice(), r = N(), a = 0; a < n.length; a++) r.set(n[a].name, n[a]);
- var o = oI.load(e, i);
- return f(o.regions, function (t) {
- var e = t.name;
- !r.get(e) && n.push({
- name: e
- });
- }), n;
- }
- };
- hu("geo", fI);
- var pI = function (t) {
- var e = {};
- t.eachSeriesByType("map", function (i) {
- var n = i.getMapType();
- if (!i.getHostGeoModel() && !e[n]) {
- var r = {};
- f(i.seriesGroup, function (e) {
- var i = e.coordinateSystem,
- n = e.originalData;
- e.get("showLegendSymbol") && t.getComponent("legend") && n.each(n.mapDimension("value"), function (t, e) {
- var a = n.getName(e),
- o = i.getRegion(a);
- if (o && !isNaN(t)) {
- var s = r[a] || 0,
- l = i.dataToPoint(o.center);
- r[a] = s + 1, n.setItemLayout(e, {
- point: l,
- offset: s
- });
- }
- });
- });
- var a = i.getData();
- a.each(function (t) {
- var e = a.getName(t),
- i = a.getItemLayout(t) || {};
- i.showLabel = !r[e], a.setItemLayout(t, i);
- }), e[n] = !0;
- }
- });
- },
- gI = function (t) {
- t.eachSeriesByType("map", function (t) {
- var e = t.get("color"),
- i = t.getModel("itemStyle"),
- n = i.get("areaColor"),
- r = i.get("color") || e[t.seriesIndex % e.length];
- t.getData().setVisual({
- areaColor: n,
- color: r
- });
- });
- },
- mI = function (t) {
- var e = {};
- t.eachSeriesByType("map", function (t) {
- var i = t.getHostGeoModel(),
- n = i ? "o" + i.id : "i" + t.getMapType();
- (e[n] = e[n] || []).push(t);
- }), f(e, function (t) {
- for (var e = nf(p(t, function (t) {
- return t.getData();
- }), t[0].get("mapValueCalculation")), i = 0; i < t.length; i++) t[i].originalData = t[i].getData();
- for (var i = 0; i < t.length; i++) t[i].seriesGroup = t, t[i].needsDrawMap = 0 === i && !t[i].getHostGeoModel(), t[i].setData(e.cloneShallow()), t[i].mainSeries = t[0];
- });
- },
- vI = function (t) {
- var e = [];
- f(t.series, function (t) {
- t && "map" === t.type && (e.push(t), t.map = t.map || t.mapType, s(t, t.mapLocation));
- });
- };
- du(pI), fu(gI), su($w.PROCESSOR.STATISTIC, mI), ou(vI), RM("map", [{
- type: "mapToggleSelect",
- event: "mapselectchanged",
- method: "toggleSelected"
- }, {
- type: "mapSelect",
- event: "mapselected",
- method: "select"
- }, {
- type: "mapUnSelect",
- event: "mapunselected",
- method: "unSelect"
- }]);
- var yI = (jx.extend({
- type: "series.gauge",
- getInitialData: function () {
- return LM(this, ["value"]);
- },
- defaultOption: {
- zlevel: 0,
- z: 2,
- center: ["50%", "50%"],
- legendHoverLink: !0,
- radius: "75%",
- startAngle: 225,
- endAngle: -45,
- clockwise: !0,
- min: 0,
- max: 100,
- splitNumber: 10,
- axisLine: {
- show: !0,
- lineStyle: {
- color: [[.2, "#91c7ae"], [.8, "#63869e"], [1, "#c23531"]],
- width: 30
- }
- },
- splitLine: {
- show: !0,
- length: 30,
- lineStyle: {
- color: "#eee",
- width: 2,
- type: "solid"
- }
- },
- axisTick: {
- show: !0,
- splitNumber: 5,
- length: 8,
- lineStyle: {
- color: "#eee",
- width: 1,
- type: "solid"
- }
- },
- axisLabel: {
- show: !0,
- distance: 5,
- color: "auto"
- },
- pointer: {
- show: !0,
- length: "80%",
- width: 8
- },
- itemStyle: {
- color: "auto"
- },
- title: {
- show: !0,
- offsetCenter: [0, "-40%"],
- color: "#333",
- fontSize: 15
- },
- detail: {
- show: !0,
- backgroundColor: "rgba(0,0,0,0)",
- borderWidth: 0,
- borderColor: "#ccc",
- width: 100,
- height: null,
- padding: [5, 10],
- offsetCenter: [0, "40%"],
- color: "auto",
- fontSize: 30
- }
- }
- }), Vr.extend({
- type: "echartsGaugePointer",
- shape: {
- angle: 0,
- width: 10,
- r: 10,
- x: 0,
- y: 0
- },
- buildPath: function (t, e) {
- var i = Math.cos,
- n = Math.sin,
- r = e.r,
- a = e.width,
- o = e.angle,
- s = e.x - i(o) * a * (a >= r / 3 ? 1 : 2),
- l = e.y - n(o) * a * (a >= r / 3 ? 1 : 2);
- o = e.angle - Math.PI / 2, t.moveTo(s, l), t.lineTo(e.x + i(o) * a, e.y + n(o) * a), t.lineTo(e.x + i(e.angle) * r, e.y + n(e.angle) * r), t.lineTo(e.x - i(o) * a, e.y - n(o) * a), t.lineTo(s, l);
- }
- })),
- _I = 2 * Math.PI,
- xI = ($s.extend({
- type: "gauge",
- render: function (t, e, i) {
- this.group.removeAll();
- var n = t.get("axisLine.lineStyle.color"),
- r = rf(t, i);
- this._renderMain(t, e, i, n, r);
- },
- dispose: function () {},
- _renderMain: function (t, e, i, n, r) {
- for (var a = this.group, o = t.getModel("axisLine"), s = o.getModel("lineStyle"), l = t.get("clockwise"), u = -t.get("startAngle") / 180 * Math.PI, h = -t.get("endAngle") / 180 * Math.PI, c = (h - u) % _I, d = u, f = s.get("width"), p = o.get("show"), g = 0; p && g < n.length; g++) {
- var m = Math.min(Math.max(n[g][0], 0), 1),
- h = u + c * m,
- v = new e_({
- shape: {
- startAngle: d,
- endAngle: h,
- cx: r.cx,
- cy: r.cy,
- clockwise: l,
- r0: r.r - f,
- r: r.r
- },
- silent: !0
- });
- v.setStyle({
- fill: n[g][1]
- }), v.setStyle(s.getLineStyle(["color", "borderWidth", "borderColor"])), a.add(v), d = h;
- }
- var y = function (t) {
- if (0 >= t) return n[0][1];
- for (var e = 0; e < n.length; e++) if (n[e][0] >= t && (0 === e ? 0 : n[e - 1][0]) < t) return n[e][1];
- return n[e - 1][1];
- };
- if (!l) {
- var _ = u;
- u = h, h = _;
- }
- this._renderTicks(t, e, i, y, r, u, h, l), this._renderPointer(t, e, i, y, r, u, h, l), this._renderTitle(t, e, i, y, r), this._renderDetail(t, e, i, y, r);
- },
- _renderTicks: function (t, e, i, n, r, a, o) {
- for (var s = this.group, l = r.cx, u = r.cy, h = r.r, c = +t.get("min"), d = +t.get("max"), f = t.getModel("splitLine"), p = t.getModel("axisTick"), g = t.getModel("axisLabel"), m = t.get("splitNumber"), v = p.get("splitNumber"), y = so(f.get("length"), h), _ = so(p.get("length"), h), x = a, w = (o - a) / m, b = w / v, S = f.getModel("lineStyle").getLineStyle(), M = p.getModel("lineStyle").getLineStyle(), I = 0; m >= I; I++) {
- var T = Math.cos(x),
- C = Math.sin(x);
- if (f.get("show")) {
- var D = new c_({
- shape: {
- x1: T * h + l,
- y1: C * h + u,
- x2: T * (h - y) + l,
- y2: C * (h - y) + u
- },
- style: S,
- silent: !0
- });
- "auto" === S.stroke && D.setStyle({
- stroke: n(I / m)
- }), s.add(D);
- }
- if (g.get("show")) {
- var A = af(lo(I / m * (d - c) + c), g.get("formatter")),
- k = g.get("distance"),
- P = n(I / m);
- s.add(new $y({
- style: ka({}, g, {
- text: A,
- x: T * (h - y - k) + l,
- y: C * (h - y - k) + u,
- textVerticalAlign: -.4 > C ? "top" : C > .4 ? "bottom" : "middle",
- textAlign: -.4 > T ? "left" : T > .4 ? "right" : "center"
- }, {
- autoColor: P
- }),
- silent: !0
- }));
- }
- if (p.get("show") && I !== m) {
- for (var L = 0; v >= L; L++) {
- var T = Math.cos(x),
- C = Math.sin(x),
- O = new c_({
- shape: {
- x1: T * h + l,
- y1: C * h + u,
- x2: T * (h - _) + l,
- y2: C * (h - _) + u
- },
- silent: !0,
- style: M
- });
- "auto" === M.stroke && O.setStyle({
- stroke: n((I + L / v) / m)
- }), s.add(O), x += b;
- }
- x -= b;
- } else x += w;
- }
- },
- _renderPointer: function (t, e, i, n, r, a, o) {
- var s = this.group,
- l = this._data;
- if (!t.get("pointer.show")) return void (l && l.eachItemGraphicEl(function (t) {
- s.remove(t);
- }));
- var u = [+t.get("min"), +t.get("max")],
- h = [a, o],
- c = t.getData(),
- d = c.mapDimension("value");
- c.diff(l).add(function (e) {
- var i = new yI({
- shape: {
- angle: a
- }
- });
- Va(i, {
- shape: {
- angle: oo(c.get(d, e), u, h, !0)
- }
- }, t), s.add(i), c.setItemGraphicEl(e, i);
- }).update(function (e, i) {
- var n = l.getItemGraphicEl(i);
- Ga(n, {
- shape: {
- angle: oo(c.get(d, e), u, h, !0)
- }
- }, t), s.add(n), c.setItemGraphicEl(e, n);
- }).remove(function (t) {
- var e = l.getItemGraphicEl(t);
- s.remove(e);
- }).execute(), c.eachItemGraphicEl(function (t, e) {
- var i = c.getItemModel(e),
- a = i.getModel("pointer");
- t.setShape({
- x: r.cx,
- y: r.cy,
- width: so(a.get("width"), r.r),
- r: so(a.get("length"), r.r)
- }), t.useStyle(i.getModel("itemStyle").getItemStyle()), "auto" === t.style.fill && t.setStyle("fill", n(oo(c.get(d, e), u, [0, 1], !0))), Ma(t, i.getModel("emphasis.itemStyle").getItemStyle());
- }), this._data = c;
- },
- _renderTitle: function (t, e, i, n, r) {
- var a = t.getData(),
- o = a.mapDimension("value"),
- s = t.getModel("title");
- if (s.get("show")) {
- var l = s.get("offsetCenter"),
- u = r.cx + so(l[0], r.r),
- h = r.cy + so(l[1], r.r),
- c = +t.get("min"),
- d = +t.get("max"),
- f = t.getData().get(o, 0),
- p = n(oo(f, [c, d], [0, 1], !0));
- this.group.add(new $y({
- silent: !0,
- style: ka({}, s, {
- x: u,
- y: h,
- text: a.getName(0),
- textAlign: "center",
- textVerticalAlign: "middle"
- }, {
- autoColor: p,
- forceRich: !0
- })
- }));
- }
- },
- _renderDetail: function (t, e, i, n, r) {
- var a = t.getModel("detail"),
- o = +t.get("min"),
- s = +t.get("max");
- if (a.get("show")) {
- var l = a.get("offsetCenter"),
- u = r.cx + so(l[0], r.r),
- h = r.cy + so(l[1], r.r),
- c = so(a.get("width"), r.r),
- d = so(a.get("height"), r.r),
- f = t.getData(),
- p = f.get(f.mapDimension("value"), 0),
- g = n(oo(p, [o, s], [0, 1], !0));
- this.group.add(new $y({
- silent: !0,
- style: ka({}, a, {
- x: u,
- y: h,
- text: af(p, a.get("formatter")),
- textWidth: isNaN(c) ? null : c,
- textHeight: isNaN(d) ? null : d,
- textAlign: "center",
- textVerticalAlign: "middle"
- }, {
- autoColor: g,
- forceRich: !0
- })
- }));
- }
- }
- }), ax.extend({
- type: "geo",
- coordinateSystem: null,
- layoutMode: "box",
- init: function (t) {
- ax.prototype.init.apply(this, arguments), Vn(t, "label", ["show"]);
- },
- optionUpdated: function () {
- var t = this.option,
- e = this;
- t.regions = fI.getFilledRegions(t.regions, t.map, t.nameMap), this._optionModelMap = g(t.regions || [], function (t, i) {
- return i.name && t.set(i.name, new Ja(i, e)), t;
- }, N()), this.updateSelectedMap(t.regions);
- },
- defaultOption: {
- zlevel: 0,
- z: 0,
- show: !0,
- left: "center",
- top: "center",
- aspectScale: null,
- silent: !1,
- map: "",
- boundingCoords: null,
- center: null,
- zoom: 1,
- scaleLimit: null,
- label: {
- show: !1,
- color: "#000"
- },
- itemStyle: {
- borderWidth: .5,
- borderColor: "#444",
- color: "#eee"
- },
- emphasis: {
- label: {
- show: !0,
- color: "rgb(100,0,0)"
- },
- itemStyle: {
- color: "rgba(255,215,0,0.8)"
- }
- },
- regions: []
- },
- getRegionModel: function (t) {
- return this._optionModelMap.get(t) || new Ja(null, this, this.ecModel);
- },
- getFormattedLabel: function (t, e) {
- var i = this.getRegionModel(t),
- n = i.get("label" + ("normal" === e ? "." : e + ".") + "formatter"),
- r = {
- name: t
- };
- return "function" == typeof n ? (r.status = e, n(r)) : "string" == typeof n ? n.replace("{a}", null != t ? t : "") : void 0;
- },
- setZoom: function (t) {
- this.option.zoom = t;
- },
- setCenter: function (t) {
- this.option.center = t;
- }
- }));
- c(xI, OM), vu({
- type: "geo",
- init: function (t, e) {
- var i = new Xd(e, !0);
- this._mapDraw = i, this.group.add(i.group);
- },
- render: function (t, e, i, n) {
- if (!n || "geoToggleSelect" !== n.type || n.from !== this.uid) {
- var r = this._mapDraw;
- t.get("show") ? r.draw(t, e, i, this, n) : this._mapDraw.group.removeAll(), this.group.silent = t.get("silent");
- }
- },
- dispose: function () {
- this._mapDraw && this._mapDraw.remove();
- }
- }), of("toggleSelected", {
- type: "geoToggleSelect",
- event: "geoselectchanged"
- }), of("select", {
- type: "geoSelect",
- event: "geoselected"
- }), of("unSelect", {
- type: "geoUnSelect",
- event: "geounselected"
- });
- var wI = function (t, e, i, n, r) {
- MS.call(this, t, e, i), this.type = n || "value", this.position = r || "bottom", this.orient = null;
- };
- wI.prototype = {
- constructor: wI,
- model: null,
- isHorizontal: function () {
- var t = this.position;
- return "top" === t || "bottom" === t;
- },
- pointToData: function (t, e) {
- return this.coordinateSystem.pointToData(t, e)[0];
- },
- toGlobalCoord: null,
- toLocalCoord: null
- }, h(wI, MS), sf.prototype = {
- type: "singleAxis",
- axisPointerEnabled: !0,
- constructor: sf,
- _init: function (t) {
- var e = this.dimension,
- i = new wI(e, bh(t), [0, 0], t.get("type"), t.get("position")),
- n = "category" === i.type;
- i.onBand = n && t.get("boundaryGap"), i.inverse = t.get("inverse"), i.orient = t.get("orient"), t.axis = i, i.model = t, i.coordinateSystem = this, this._axis = i;
- },
- update: function (t) {
- t.eachSeries(function (t) {
- if (t.coordinateSystem === this) {
- var e = t.getData();
- f(e.mapDimension(this.dimension, !0), function (t) {
- this._axis.scale.unionExtentFromData(e, t);
- }, this), wh(this._axis.scale, this._axis.model);
- }
- }, this);
- },
- resize: function (t, e) {
- this._rect = Ro({
- left: t.get("left"),
- top: t.get("top"),
- right: t.get("right"),
- bottom: t.get("bottom"),
- width: t.get("width"),
- height: t.get("height")
- }, {
- width: e.getWidth(),
- height: e.getHeight()
- }), this._adjustAxis();
- },
- getRect: function () {
- return this._rect;
- },
- _adjustAxis: function () {
- var t = this._rect,
- e = this._axis,
- i = e.isHorizontal(),
- n = i ? [0, t.width] : [0, t.height],
- r = e.reverse ? 1 : 0;
- e.setExtent(n[r], n[1 - r]), this._updateAxisTransform(e, i ? t.x : t.y);
- },
- _updateAxisTransform: function (t, e) {
- var i = t.getExtent(),
- n = i[0] + i[1],
- r = t.isHorizontal();
- t.toGlobalCoord = r ? function (t) {
- return t + e;
- } : function (t) {
- return n - t + e;
- }, t.toLocalCoord = r ? function (t) {
- return t - e;
- } : function (t) {
- return n - t + e;
- };
- },
- getAxis: function () {
- return this._axis;
- },
- getBaseAxis: function () {
- return this._axis;
- },
- getAxes: function () {
- return [this._axis];
- },
- getTooltipAxes: function () {
- return {
- baseAxes: [this.getAxis()]
- };
- },
- containPoint: function (t) {
- var e = this.getRect(),
- i = this.getAxis(),
- n = i.orient;
- return "horizontal" === n ? i.contain(i.toLocalCoord(t[0])) && t[1] >= e.y && t[1] <= e.y + e.height : i.contain(i.toLocalCoord(t[1])) && t[0] >= e.y && t[0] <= e.y + e.height;
- },
- pointToData: function (t) {
- var e = this.getAxis();
- return [e.coordToData(e.toLocalCoord(t["horizontal" === e.orient ? 0 : 1]))];
- },
- dataToPoint: function (t) {
- var e = this.getAxis(),
- i = this.getRect(),
- n = [],
- r = "horizontal" === e.orient ? 0 : 1;
- return t instanceof Array && (t = t[0]), n[r] = e.toGlobalCoord(e.dataToCoord(+t)), n[1 - r] = 0 === r ? i.y + i.height / 2 : i.x + i.width / 2, n;
- }
- }, cs.register("single", {
- create: lf,
- dimensions: sf.prototype.dimensions
- });
- var bI = ["axisLine", "axisTickLabel", "axisName"],
- SI = "splitLine",
- MI = aM.extend({
- type: "singleAxis",
- axisPointerClass: "SingleAxisPointer",
- render: function (t, e, i, n) {
- var r = this.group;
- r.removeAll();
- var a = uf(t),
- o = new QS(t, a);
- f(bI, o.add, o), r.add(o.getGroup()), t.get(SI + ".show") && this["_" + SI](t), MI.superCall(this, "render", t, e, i, n);
- },
- _splitLine: function (t) {
- var e = t.axis;
- if (!e.scale.isBlank()) {
- var i = t.getModel("splitLine"),
- n = i.getModel("lineStyle"),
- r = n.get("width"),
- a = n.get("color");
- a = a instanceof Array ? a : [a];
- for (var o = t.coordinateSystem.getRect(), s = e.isHorizontal(), l = [], u = 0, h = e.getTicksCoords({
- tickModel: i
- }), c = [], d = [], f = 0; f < h.length; ++f) {
- var p = e.toGlobalCoord(h[f].coord);
- s ? (c[0] = p, c[1] = o.y, d[0] = p, d[1] = o.y + o.height) : (c[0] = o.x, c[1] = p, d[0] = o.x + o.width, d[1] = p);
- var g = u++ % a.length;
- l[g] = l[g] || [], l[g].push(new c_({
- subPixelOptimize: !0,
- shape: {
- x1: c[0],
- y1: c[1],
- x2: d[0],
- y2: d[1]
- },
- style: {
- lineWidth: r
- },
- silent: !0
- }));
- }
- for (var f = 0; f < l.length; ++f) this.group.add(k_(l[f], {
- style: {
- stroke: a[f % a.length],
- lineDash: n.getLineDash(r),
- lineWidth: r
- },
- silent: !0
- }));
- }
- }
- }),
- II = ax.extend({
- type: "singleAxis",
- layoutMode: "box",
- axis: null,
- coordinateSystem: null,
- getCoordSysModel: function () {
- return this;
- }
- }),
- TI = {
- left: "5%",
- top: "5%",
- right: "5%",
- bottom: "5%",
- type: "value",
- position: "bottom",
- orient: "horizontal",
- axisLine: {
- show: !0,
- lineStyle: {
- width: 1,
- type: "solid"
- }
- },
- tooltip: {
- show: !0
- },
- axisTick: {
- show: !0,
- length: 6,
- lineStyle: {
- width: 1
- }
- },
- axisLabel: {
- show: !0,
- interval: "auto"
- },
- splitLine: {
- show: !0,
- lineStyle: {
- type: "dashed",
- opacity: .2
- }
- }
- };
- r(II.prototype, uS), OS("single", II, hf, TI);
- var CI = function (t, e) {
- var i,
- n = [],
- r = t.seriesIndex;
- if (null == r || !(i = e.getSeriesByIndex(r))) return {
- point: []
- };
- var a = i.getData(),
- o = qn(a, t);
- if (null == o || 0 > o || x(o)) return {
- point: []
- };
- var s = a.getItemGraphicEl(o),
- l = i.coordinateSystem;
- if (i.getTooltipPosition) n = i.getTooltipPosition(o) || [];else if (l && l.dataToPoint) n = l.dataToPoint(a.getValues(p(l.dimensions, function (t) {
- return a.mapDimension(t);
- }), o, !0)) || [];else if (s) {
- var u = s.getBoundingRect().clone();
- u.applyTransform(s.transform), n = [u.x + u.width / 2, u.y + u.height / 2];
- }
- return {
- point: n,
- el: s
- };
- },
- DI = f,
- AI = _,
- kI = Zn(),
- PI = function (t, e, i) {
- var n = t.currTrigger,
- r = [t.x, t.y],
- a = t,
- o = t.dispatchAction || y(i.dispatchAction, i),
- s = e.getComponent("axisPointer").coordSysAxesInfo;
- if (s) {
- xf(r) && (r = CI({
- seriesIndex: a.seriesIndex,
- dataIndex: a.dataIndex
- }, e).point);
- var l = xf(r),
- u = a.axesInfo,
- h = s.axesInfo,
- c = "leave" === n || xf(r),
- d = {},
- f = {},
- p = {
- list: [],
- map: {}
- },
- g = {
- showPointer: AI(ff, f),
- showTooltip: AI(pf, p)
- };
- DI(s.coordSysMap, function (t, e) {
- var i = l || t.containPoint(r);
- DI(s.coordSysAxesInfo[e], function (t) {
- var e = t.axis,
- n = yf(u, t);
- if (!c && i && (!u || n)) {
- var a = n && n.value;
- null != a || l || (a = e.pointToData(r)), null != a && cf(t, a, g, !1, d);
- }
- });
- });
- var m = {};
- return DI(h, function (t, e) {
- var i = t.linkGroup;
- i && !f[e] && DI(i.axesInfo, function (e, n) {
- var r = f[n];
- if (e !== t && r) {
- var a = r.value;
- i.mapper && (a = t.axis.scale.parse(i.mapper(a, _f(e), _f(t)))), m[t.key] = a;
- }
- });
- }), DI(m, function (t, e) {
- cf(h[e], t, g, !0, d);
- }), gf(f, h, d), mf(p, r, t, o), vf(h, o, i), d;
- }
- },
- LI = (mu({
- type: "axisPointer",
- coordSysAxesInfo: null,
- defaultOption: {
- show: "auto",
- triggerOn: null,
- zlevel: 0,
- z: 50,
- type: "line",
- snap: !1,
- triggerTooltip: !0,
- value: null,
- status: null,
- link: [],
- animation: null,
- animationDurationUpdate: 200,
- lineStyle: {
- color: "#aaa",
- width: 1,
- type: "solid"
- },
- shadowStyle: {
- color: "rgba(150,150,150,0.3)"
- },
- label: {
- show: !0,
- formatter: null,
- precision: "auto",
- margin: 3,
- color: "#fff",
- padding: [5, 7, 5, 7],
- backgroundColor: "auto",
- borderColor: null,
- borderWidth: 0,
- shadowBlur: 3,
- shadowColor: "#aaa"
- },
- handle: {
- show: !1,
- icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
- size: 45,
- margin: 50,
- color: "#333",
- shadowBlur: 3,
- shadowColor: "#aaa",
- shadowOffsetX: 0,
- shadowOffsetY: 2,
- throttle: 40
- }
- }
- }), Zn()),
- OI = f,
- zI = vu({
- type: "axisPointer",
- render: function (t, e, i) {
- var n = e.getComponent("tooltip"),
- r = t.get("triggerOn") || n && n.get("triggerOn") || "mousemove|click";
- wf("axisPointer", i, function (t, e, i) {
- "none" !== r && ("leave" === t || r.indexOf(t) >= 0) && i({
- type: "updateAxisPointer",
- currTrigger: t,
- x: e && e.offsetX,
- y: e && e.offsetY
- });
- });
- },
- remove: function (t, e) {
- Cf(e.getZr(), "axisPointer"), zI.superApply(this._model, "remove", arguments);
- },
- dispose: function (t, e) {
- Cf("axisPointer", e), zI.superApply(this._model, "dispose", arguments);
- }
- }),
- EI = Zn(),
- RI = n,
- BI = y;
- Df.prototype = {
- _group: null,
- _lastGraphicKey: null,
- _handle: null,
- _dragging: !1,
- _lastValue: null,
- _lastStatus: null,
- _payloadInfo: null,
- animationThreshold: 15,
- render: function (t, e, i, n) {
- var r = e.get("value"),
- a = e.get("status");
- if (this._axisModel = t, this._axisPointerModel = e, this._api = i, n || this._lastValue !== r || this._lastStatus !== a) {
- this._lastValue = r, this._lastStatus = a;
- var o = this._group,
- s = this._handle;
- if (!a || "hide" === a) return o && o.hide(), void (s && s.hide());
- o && o.show(), s && s.show();
- var l = {};
- this.makeElOption(l, r, t, e, i);
- var u = l.graphicKey;
- u !== this._lastGraphicKey && this.clear(i), this._lastGraphicKey = u;
- var h = this._moveAnimation = this.determineAnimation(t, e);
- if (o) {
- var c = _(Af, e, h);
- this.updatePointerEl(o, l, c, e), this.updateLabelEl(o, l, c, e);
- } else o = this._group = new Bm(), this.createPointerEl(o, l, t, e), this.createLabelEl(o, l, t, e), i.getZr().add(o);
- Of(o, e, !0), this._renderHandle(r);
- }
- },
- remove: function (t) {
- this.clear(t);
- },
- dispose: function (t) {
- this.clear(t);
- },
- determineAnimation: function (t, e) {
- var i = e.get("animation"),
- n = t.axis,
- r = "category" === n.type,
- a = e.get("snap");
- if (!a && !r) return !1;
- if ("auto" === i || null == i) {
- var o = this.animationThreshold;
- if (r && n.getBandWidth() > o) return !0;
- if (a) {
- var s = Gc(t).seriesDataCount,
- l = n.getExtent();
- return Math.abs(l[0] - l[1]) / s > o;
- }
- return !1;
- }
- return i === !0;
- },
- makeElOption: function () {},
- createPointerEl: function (t, e) {
- var i = e.pointer;
- if (i) {
- var n = EI(t).pointerEl = new z_[i.type](RI(e.pointer));
- t.add(n);
- }
- },
- createLabelEl: function (t, e, i, n) {
- if (e.label) {
- var r = EI(t).labelEl = new u_(RI(e.label));
- t.add(r), Pf(r, n);
- }
- },
- updatePointerEl: function (t, e, i) {
- var n = EI(t).pointerEl;
- n && e.pointer && (n.setStyle(e.pointer.style), i(n, {
- shape: e.pointer.shape
- }));
- },
- updateLabelEl: function (t, e, i, n) {
- var r = EI(t).labelEl;
- r && (r.setStyle(e.label.style), i(r, {
- shape: e.label.shape,
- position: e.label.position
- }), Pf(r, n));
- },
- _renderHandle: function (t) {
- if (!this._dragging && this.updateHandleTransform) {
- var e = this._axisPointerModel,
- i = this._api.getZr(),
- n = this._handle,
- r = e.getModel("handle"),
- a = e.get("status");
- if (!r.get("show") || !a || "hide" === a) return n && i.remove(n), void (this._handle = null);
- var o;
- this._handle || (o = !0, n = this._handle = qa(r.get("icon"), {
- cursor: "move",
- draggable: !0,
- onmousemove: function (t) {
- Qg(t.event);
- },
- onmousedown: BI(this._onHandleDragMove, this, 0, 0),
- drift: BI(this._onHandleDragMove, this),
- ondragend: BI(this._onHandleDragEnd, this)
- }), i.add(n)), Of(n, e, !1);
- var s = ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
- n.setStyle(r.getItemStyle(null, s));
- var l = r.get("size");
- x(l) || (l = [l, l]), n.attr("scale", [l[0] / 2, l[1] / 2]), nl(this, "_doDispatchAxisPointer", r.get("throttle") || 0, "fixRate"), this._moveHandleToValue(t, o);
- }
- },
- _moveHandleToValue: function (t, e) {
- Af(this._axisPointerModel, !e && this._moveAnimation, this._handle, Lf(this.getHandleTransform(t, this._axisModel, this._axisPointerModel)));
- },
- _onHandleDragMove: function (t, e) {
- var i = this._handle;
- if (i) {
- this._dragging = !0;
- var n = this.updateHandleTransform(Lf(i), [t, e], this._axisModel, this._axisPointerModel);
- this._payloadInfo = n, i.stopAnimation(), i.attr(Lf(n)), EI(i).lastProp = null, this._doDispatchAxisPointer();
- }
- },
- _doDispatchAxisPointer: function () {
- var t = this._handle;
- if (t) {
- var e = this._payloadInfo,
- i = this._axisModel;
- this._api.dispatchAction({
- type: "updateAxisPointer",
- x: e.cursorPoint[0],
- y: e.cursorPoint[1],
- tooltipOption: e.tooltipOption,
- axesInfo: [{
- axisDim: i.axis.dim,
- axisIndex: i.componentIndex
- }]
- });
- }
- },
- _onHandleDragEnd: function () {
- this._dragging = !1;
- var t = this._handle;
- if (t) {
- var e = this._axisPointerModel.get("value");
- this._moveHandleToValue(e), this._api.dispatchAction({
- type: "hideTip"
- });
- }
- },
- getHandleTransform: null,
- updateHandleTransform: null,
- clear: function (t) {
- this._lastValue = null, this._lastStatus = null;
- var e = t.getZr(),
- i = this._group,
- n = this._handle;
- e && i && (this._lastGraphicKey = null, i && e.remove(i), n && e.remove(n), this._group = null, this._handle = null, this._payloadInfo = null);
- },
- doClear: function () {},
- buildLabel: function (t, e, i) {
- return i = i || 0, {
- x: t[i],
- y: t[1 - i],
- width: e[i],
- height: e[1 - i]
- };
- }
- }, Df.prototype.constructor = Df, nr(Df);
- var NI = Df.extend({
- makeElOption: function (t, e, i, n, r) {
- var a = i.axis,
- o = a.grid,
- s = n.get("type"),
- l = Hf(o, a).getOtherAxis(a).getGlobalExtent(),
- u = a.toGlobalCoord(a.dataToCoord(e, !0));
- if (s && "none" !== s) {
- var h = zf(n),
- c = FI[s](a, u, l);
- c.style = h, t.graphicKey = c.type, t.pointer = c;
- }
- var d = Yc(o.model, i);
- Ff(e, t, d, i, n, r);
- },
- getHandleTransform: function (t, e, i) {
- var n = Yc(e.axis.grid.model, e, {
- labelInside: !1
- });
- return n.labelMargin = i.get("handle.margin"), {
- position: Nf(e.axis, t, n),
- rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
- };
- },
- updateHandleTransform: function (t, e, i) {
- var n = i.axis,
- r = n.grid,
- a = n.getGlobalExtent(!0),
- o = Hf(r, n).getOtherAxis(n).getGlobalExtent(),
- s = "x" === n.dim ? 0 : 1,
- l = t.position;
- l[s] += e[s], l[s] = Math.min(a[1], l[s]), l[s] = Math.max(a[0], l[s]);
- var u = (o[1] + o[0]) / 2,
- h = [u, u];
- h[s] = l[s];
- var c = [{
- verticalAlign: "middle"
- }, {
- align: "center"
- }];
- return {
- position: l,
- rotation: t.rotation,
- cursorPoint: h,
- tooltipOption: c[s]
- };
- }
- }),
- FI = {
- line: function (t, e, i) {
- var n = Gf([e, i[0]], [e, i[1]], Wf(t));
- return {
- type: "Line",
- subPixelOptimize: !0,
- shape: n
- };
- },
- shadow: function (t, e, i) {
- var n = Math.max(1, t.getBandWidth()),
- r = i[1] - i[0];
- return {
- type: "Rect",
- shape: Vf([e - n / 2, i[0]], [n, r], Wf(t))
- };
- }
- };
- aM.registerAxisPointerClass("CartesianAxisPointer", NI), ou(function (t) {
- if (t) {
- (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {});
- var e = t.axisPointer.link;
- e && !x(e) && (t.axisPointer.link = [e]);
- }
- }), su($w.PROCESSOR.STATISTIC, function (t, e) {
- t.getComponent("axisPointer").coordSysAxesInfo = Oc(t, e);
- }), uu({
- type: "updateAxisPointer",
- event: "updateAxisPointer",
- update: ":updateAxisPointer"
- }, PI);
- var GI = ["x", "y"],
- VI = ["width", "height"],
- HI = Df.extend({
- makeElOption: function (t, e, i, n, r) {
- var a = i.axis,
- o = a.coordinateSystem,
- s = Xf(o, 1 - Uf(a)),
- l = o.dataToPoint(e)[0],
- u = n.get("type");
- if (u && "none" !== u) {
- var h = zf(n),
- c = WI[u](a, l, s);
- c.style = h, t.graphicKey = c.type, t.pointer = c;
- }
- var d = uf(i);
- Ff(e, t, d, i, n, r);
- },
- getHandleTransform: function (t, e, i) {
- var n = uf(e, {
- labelInside: !1
- });
- return n.labelMargin = i.get("handle.margin"), {
- position: Nf(e.axis, t, n),
- rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
- };
- },
- updateHandleTransform: function (t, e, i) {
- var n = i.axis,
- r = n.coordinateSystem,
- a = Uf(n),
- o = Xf(r, a),
- s = t.position;
- s[a] += e[a], s[a] = Math.min(o[1], s[a]), s[a] = Math.max(o[0], s[a]);
- var l = Xf(r, 1 - a),
- u = (l[1] + l[0]) / 2,
- h = [u, u];
- return h[a] = s[a], {
- position: s,
- rotation: t.rotation,
- cursorPoint: h,
- tooltipOption: {
- verticalAlign: "middle"
- }
- };
- }
- }),
- WI = {
- line: function (t, e, i) {
- var n = Gf([e, i[0]], [e, i[1]], Uf(t));
- return {
- type: "Line",
- subPixelOptimize: !0,
- shape: n
- };
- },
- shadow: function (t, e, i) {
- var n = t.getBandWidth(),
- r = i[1] - i[0];
- return {
- type: "Rect",
- shape: Vf([e - n / 2, i[0]], [n, r], Uf(t))
- };
- }
- };
- aM.registerAxisPointerClass("SingleAxisPointer", HI), vu({
- type: "single"
- }), mu({
- type: "title",
- layoutMode: {
- type: "box",
- ignoreSize: !0
- },
- defaultOption: {
- zlevel: 0,
- z: 6,
- show: !0,
- text: "",
- target: "blank",
- subtext: "",
- subtarget: "blank",
- left: 0,
- top: 0,
- backgroundColor: "rgba(0,0,0,0)",
- borderColor: "#ccc",
- borderWidth: 0,
- padding: 5,
- itemGap: 10,
- textStyle: {
- fontSize: 18,
- fontWeight: "bolder",
- color: "#333"
- },
- subtextStyle: {
- color: "#aaa"
- }
- }
- }), vu({
- type: "title",
- render: function (t, e, i) {
- if (this.group.removeAll(), t.get("show")) {
- var n = this.group,
- r = t.getModel("textStyle"),
- a = t.getModel("subtextStyle"),
- o = t.get("textAlign"),
- s = A(t.get("textBaseline"), t.get("textVerticalAlign")),
- l = new $y({
- style: ka({}, r, {
- text: t.get("text"),
- textFill: r.getTextColor()
- }, {
- disableBox: !0
- }),
- z2: 10
- }),
- u = l.getBoundingRect(),
- h = t.get("subtext"),
- c = new $y({
- style: ka({}, a, {
- text: h,
- textFill: a.getTextColor(),
- y: u.height + t.get("itemGap"),
- textVerticalAlign: "top"
- }, {
- disableBox: !0
- }),
- z2: 10
- }),
- d = t.get("link"),
- f = t.get("sublink"),
- p = t.get("triggerEvent", !0);
- l.silent = !d && !p, c.silent = !f && !p, d && l.on("click", function () {
- window.open(d, "_" + t.get("target"));
- }), f && c.on("click", function () {
- window.open(f, "_" + t.get("subtarget"));
- }), l.eventData = c.eventData = p ? {
- componentType: "title",
- componentIndex: t.componentIndex
- } : null, n.add(l), h && n.add(c);
- var g = n.getBoundingRect(),
- m = t.getBoxLayoutParams();
- m.width = g.width, m.height = g.height;
- var v = Ro(m, {
- width: i.getWidth(),
- height: i.getHeight()
- }, t.get("padding"));
- o || (o = t.get("left") || t.get("right"), "middle" === o && (o = "center"), "right" === o ? v.x += v.width : "center" === o && (v.x += v.width / 2)), s || (s = t.get("top") || t.get("bottom"), "center" === s && (s = "middle"), "bottom" === s ? v.y += v.height : "middle" === s && (v.y += v.height / 2), s = s || "top"), n.attr("position", [v.x, v.y]);
- var y = {
- textAlign: o,
- textVerticalAlign: s
- };
- l.setStyle(y), c.setStyle(y), g = n.getBoundingRect();
- var _ = v.margin,
- x = t.getItemStyle(["color", "opacity"]);
- x.fill = t.get("backgroundColor");
- var w = new u_({
- shape: {
- x: g.x - _[3],
- y: g.y - _[0],
- width: g.width + _[1] + _[3],
- height: g.height + _[0] + _[2],
- r: t.get("borderRadius")
- },
- style: x,
- subPixelOptimize: !0,
- silent: !0
- });
- n.add(w);
- }
- }
- });
- var UI = aw.legend.selector,
- XI = {
- all: {
- type: "all",
- title: n(UI.all)
- },
- inverse: {
- type: "inverse",
- title: n(UI.inverse)
- }
- },
- YI = mu({
- type: "legend.plain",
- dependencies: ["series"],
- layoutMode: {
- type: "box",
- ignoreSize: !0
- },
- init: function (t, e, i) {
- this.mergeDefaultAndTheme(t, i), t.selected = t.selected || {}, this._updateSelector(t);
- },
- mergeOption: function (t) {
- YI.superCall(this, "mergeOption", t), this._updateSelector(t);
- },
- _updateSelector: function (t) {
- var e = t.selector;
- e === !0 && (e = t.selector = ["all", "inverse"]), x(e) && f(e, function (t, i) {
- b(t) && (t = {
- type: t
- }), e[i] = r(t, XI[t.type]);
- });
- },
- optionUpdated: function () {
- this._updateData(this.ecModel);
- var t = this._data;
- if (t[0] && "single" === this.get("selectedMode")) {
- for (var e = !1, i = 0; i < t.length; i++) {
- var n = t[i].get("name");
- if (this.isSelected(n)) {
- this.select(n), e = !0;
- break;
- }
- }
- !e && this.select(t[0].get("name"));
- }
- },
- _updateData: function (t) {
- var e = [],
- i = [];
- t.eachRawSeries(function (n) {
- var r = n.name;
- i.push(r);
- var a;
- if (n.legendDataProvider) {
- var o = n.legendDataProvider(),
- s = o.mapArray(o.getName);
- t.isSeriesFiltered(n) || (i = i.concat(s)), s.length ? e = e.concat(s) : a = !0;
- } else a = !0;
- a && Yn(n) && e.push(n.name);
- }), this._availableNames = i;
- var n = this.get("data") || e,
- r = p(n, function (t) {
- return ("string" == typeof t || "number" == typeof t) && (t = {
- name: t
- }), new Ja(t, this, this.ecModel);
- }, this);
- this._data = r;
- },
- getData: function () {
- return this._data;
- },
- select: function (t) {
- var e = this.option.selected,
- i = this.get("selectedMode");
- if ("single" === i) {
- var n = this._data;
- f(n, function (t) {
- e[t.get("name")] = !1;
- });
- }
- e[t] = !0;
- },
- unSelect: function (t) {
- "single" !== this.get("selectedMode") && (this.option.selected[t] = !1);
- },
- toggleSelected: function (t) {
- var e = this.option.selected;
- e.hasOwnProperty(t) || (e[t] = !0), this[e[t] ? "unSelect" : "select"](t);
- },
- allSelect: function () {
- var t = this._data,
- e = this.option.selected;
- f(t, function (t) {
- e[t.get("name", !0)] = !0;
- });
- },
- inverseSelect: function () {
- var t = this._data,
- e = this.option.selected;
- f(t, function (t) {
- var i = t.get("name", !0);
- e.hasOwnProperty(i) || (e[i] = !0), e[i] = !e[i];
- });
- },
- isSelected: function (t) {
- var e = this.option.selected;
- return !(e.hasOwnProperty(t) && !e[t]) && u(this._availableNames, t) >= 0;
- },
- getOrient: function () {
- return "vertical" === this.get("orient") ? {
- index: 1,
- name: "vertical"
- } : {
- index: 0,
- name: "horizontal"
- };
- },
- defaultOption: {
- zlevel: 0,
- z: 4,
- show: !0,
- orient: "horizontal",
- left: "center",
- top: 0,
- align: "auto",
- backgroundColor: "rgba(0,0,0,0)",
- borderColor: "#ccc",
- borderRadius: 0,
- borderWidth: 0,
- padding: 5,
- itemGap: 10,
- itemWidth: 25,
- itemHeight: 14,
- inactiveColor: "#ccc",
- inactiveBorderColor: "#ccc",
- itemStyle: {
- borderWidth: 0
- },
- textStyle: {
- color: "#333"
- },
- selectedMode: !0,
- selector: !1,
- selectorLabel: {
- show: !0,
- borderRadius: 10,
- padding: [3, 5, 3, 5],
- fontSize: 12,
- fontFamily: " sans-serif",
- color: "#666",
- borderWidth: 1,
- borderColor: "#666"
- },
- emphasis: {
- selectorLabel: {
- show: !0,
- color: "#eee",
- backgroundColor: "#666"
- }
- },
- selectorPosition: "auto",
- selectorItemGap: 7,
- selectorButtonGap: 10,
- tooltip: {
- show: !1
- }
- }
- });
- uu("legendToggleSelect", "legendselectchanged", _(Yf, "toggleSelected")), uu("legendAllSelect", "legendselectall", _(Yf, "allSelect")), uu("legendInverseSelect", "legendinverseselect", _(Yf, "inverseSelect")), uu("legendSelect", "legendselected", _(Yf, "select")), uu("legendUnSelect", "legendunselected", _(Yf, "unSelect"));
- var jI = _,
- qI = f,
- ZI = Bm,
- KI = vu({
- type: "legend.plain",
- newlineDisabled: !1,
- init: function () {
- this.group.add(this._contentGroup = new ZI()), this._backgroundEl, this.group.add(this._selectorGroup = new ZI()), this._isFirstRender = !0;
- },
- getContentGroup: function () {
- return this._contentGroup;
- },
- getSelectorGroup: function () {
- return this._selectorGroup;
- },
- render: function (t, e, i) {
- var n = this._isFirstRender;
- if (this._isFirstRender = !1, this.resetInner(), t.get("show", !0)) {
- var r = t.get("align"),
- a = t.get("orient");
- r && "auto" !== r || (r = "right" === t.get("left") && "vertical" === a ? "right" : "left");
- var o = t.get("selector", !0),
- l = t.get("selectorPosition", !0);
- !o || l && "auto" !== l || (l = "horizontal" === a ? "end" : "start"), this.renderInner(r, t, e, i, o, a, l);
- var u = t.getBoxLayoutParams(),
- h = {
- width: i.getWidth(),
- height: i.getHeight()
- },
- c = t.get("padding"),
- d = Ro(u, h, c),
- f = this.layoutInner(t, r, d, n, o, l),
- p = Ro(s({
- width: f.width,
- height: f.height
- }, u), h, c);
- this.group.attr("position", [p.x - f.x, p.y - f.y]), this.group.add(this._backgroundEl = jf(f, t));
- }
- },
- resetInner: function () {
- this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
- },
- renderInner: function (t, e, i, n, r, a, o) {
- var s = this.getContentGroup(),
- l = N(),
- u = e.get("selectedMode"),
- h = [];
- i.eachRawSeries(function (t) {
- !t.get("legendHoverLink") && h.push(t.id);
- }), qI(e.getData(), function (r, a) {
- var o = r.get("name");
- if (!this.newlineDisabled && ("" === o || "\n" === o)) return void s.add(new ZI({
- newline: !0
- }));
- var c = i.getSeriesByName(o)[0];
- if (!l.get(o)) if (c) {
- var d = c.getData(),
- f = d.getVisual("color"),
- p = d.getVisual("borderColor");
- "function" == typeof f && (f = f(c.getDataParams(0))), "function" == typeof p && (p = p(c.getDataParams(0)));
- var g = d.getVisual("legendSymbol") || "roundRect",
- m = d.getVisual("symbol"),
- v = this._createItem(o, a, r, e, g, m, t, f, p, u);
- v.on("click", jI(Zf, o, n)).on("mouseover", jI(Kf, c.name, null, n, h)).on("mouseout", jI($f, c.name, null, n, h)), l.set(o, !0);
- } else i.eachRawSeries(function (i) {
- if (!l.get(o) && i.legendDataProvider) {
- var s = i.legendDataProvider(),
- c = s.indexOfName(o);
- if (0 > c) return;
- var d = s.getItemVisual(c, "color"),
- f = s.getItemVisual(c, "borderColor"),
- p = "roundRect",
- g = this._createItem(o, a, r, e, p, null, t, d, f, u);
- g.on("click", jI(Zf, o, n)).on("mouseover", jI(Kf, null, o, n, h)).on("mouseout", jI($f, null, o, n, h)), l.set(o, !0);
- }
- }, this);
- }, this), r && this._createSelector(r, e, n, a, o);
- },
- _createSelector: function (t, e, i) {
- function n(t) {
- var n = t.type,
- a = new $y({
- style: {
- x: 0,
- y: 0,
- align: "center",
- verticalAlign: "middle"
- },
- onclick: function () {
- i.dispatchAction({
- type: "all" === n ? "legendAllSelect" : "legendInverseSelect"
- });
- }
- });
- r.add(a);
- var o = e.getModel("selectorLabel"),
- s = e.getModel("emphasis.selectorLabel");
- Da(a.style, a.hoverStyle = {}, o, s, {
- defaultText: t.title,
- isRectText: !1
- }), Ma(a);
- }
- var r = this.getSelectorGroup();
- qI(t, function (t) {
- n(t);
- });
- },
- _createItem: function (t, e, i, n, r, a, s, l, u, h) {
- var c = n.get("itemWidth"),
- d = n.get("itemHeight"),
- f = n.get("inactiveColor"),
- p = n.get("inactiveBorderColor"),
- g = n.get("symbolKeepAspect"),
- m = n.getModel("itemStyle"),
- v = n.isSelected(t),
- y = new ZI(),
- _ = i.getModel("textStyle"),
- x = i.get("icon"),
- w = i.getModel("tooltip"),
- b = w.parentModel;
- r = x || r;
- var S = Ph(r, 0, 0, c, d, v ? l : f, null == g ? !0 : g);
- if (y.add(qf(S, r, m, u, p, v)), !x && a && (a !== r || "none" === a)) {
- var M = .8 * d;
- "none" === a && (a = "circle");
- var I = Ph(a, (c - M) / 2, (d - M) / 2, M, M, v ? l : f, null == g ? !0 : g);
- y.add(qf(I, a, m, u, p, v));
- }
- var T = "left" === s ? c + 5 : -5,
- C = s,
- D = n.get("formatter"),
- A = t;
- "string" == typeof D && D ? A = D.replace("{name}", null != t ? t : "") : "function" == typeof D && (A = D(t)), y.add(new $y({
- style: ka({}, _, {
- text: A,
- x: T,
- y: d / 2,
- textFill: v ? _.getTextColor() : f,
- textAlign: C,
- textVerticalAlign: "middle"
- })
- }));
- var k = new u_({
- shape: y.getBoundingRect(),
- invisible: !0,
- tooltip: w.get("show") ? o({
- content: t,
- formatter: b.get("formatter", !0) || function () {
- return t;
- },
- formatterParams: {
- componentType: "legend",
- legendIndex: n.componentIndex,
- name: t,
- $vars: ["name"]
- }
- }, w.option) : null
- });
- return y.add(k), y.eachChild(function (t) {
- t.silent = !0;
- }), k.silent = !h, this.getContentGroup().add(y), Ma(y), y.__legendDataIndex = e, y;
- },
- layoutInner: function (t, e, i, n, r, a) {
- var o = this.getContentGroup(),
- s = this.getSelectorGroup();
- ix(t.get("orient"), o, t.get("itemGap"), i.width, i.height);
- var l = o.getBoundingRect(),
- u = [-l.x, -l.y];
- if (r) {
- ix("horizontal", s, t.get("selectorItemGap", !0));
- var h = s.getBoundingRect(),
- c = [-h.x, -h.y],
- d = t.get("selectorButtonGap", !0),
- f = t.getOrient().index,
- p = 0 === f ? "width" : "height",
- g = 0 === f ? "height" : "width",
- m = 0 === f ? "y" : "x";
- "end" === a ? c[f] += l[p] + d : u[f] += h[p] + d, c[1 - f] += l[g] / 2 - h[g] / 2, s.attr("position", c), o.attr("position", u);
- var v = {
- x: 0,
- y: 0
- };
- return v[p] = l[p] + d + h[p], v[g] = Math.max(l[g], h[g]), v[m] = Math.min(0, h[m] + c[1 - f]), v;
- }
- return o.attr("position", u), this.group.getBoundingRect();
- },
- remove: function () {
- this.getContentGroup().removeAll(), this._isFirstRender = !0;
- }
- }),
- $I = function (t) {
- var e = t.findComponents({
- mainType: "legend"
- });
- e && e.length && t.filterSeries(function (t) {
- for (var i = 0; i < e.length; i++) if (!e[i].isSelected(t.name)) return !1;
- return !0;
- });
- };
- su($w.PROCESSOR.SERIES_FILTER, $I), ax.registerSubTypeDefaulter("legend", function () {
- return "plain";
- });
- var QI = YI.extend({
- type: "legend.scroll",
- setScrollDataIndex: function (t) {
- this.option.scrollDataIndex = t;
- },
- defaultOption: {
- scrollDataIndex: 0,
- pageButtonItemGap: 5,
- pageButtonGap: null,
- pageButtonPosition: "end",
- pageFormatter: "{current}/{total}",
- pageIcons: {
- horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
- vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
- },
- pageIconColor: "#2f4554",
- pageIconInactiveColor: "#aaa",
- pageIconSize: 15,
- pageTextStyle: {
- color: "#333"
- },
- animationDurationUpdate: 800
- },
- init: function (t, e, i, n) {
- var r = No(t);
- QI.superCall(this, "init", t, e, i, n), Qf(this, t, r);
- },
- mergeOption: function (t, e) {
- QI.superCall(this, "mergeOption", t, e), Qf(this, this.option, t);
- }
- }),
- JI = Bm,
- tT = ["width", "height"],
- eT = ["x", "y"],
- iT = KI.extend({
- type: "legend.scroll",
- newlineDisabled: !0,
- init: function () {
- iT.superCall(this, "init"), this._currentIndex = 0, this.group.add(this._containerGroup = new JI()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new JI()), this._showController;
- },
- resetInner: function () {
- iT.superCall(this, "resetInner"), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
- },
- renderInner: function (t, e, i, n, r, a, o) {
- function s(t, i) {
- var r = t + "DataIndex",
- a = qa(e.get("pageIcons", !0)[e.getOrient().name][i], {
- onclick: y(l._pageGo, l, r, e, n)
- }, {
- x: -h[0] / 2,
- y: -h[1] / 2,
- width: h[0],
- height: h[1]
- });
- a.name = t, u.add(a);
- }
- var l = this;
- iT.superCall(this, "renderInner", t, e, i, n, r, a, o);
- var u = this._controllerGroup,
- h = e.get("pageIconSize", !0);
- x(h) || (h = [h, h]), s("pagePrev", 0);
- var c = e.getModel("pageTextStyle");
- u.add(new $y({
- name: "pageText",
- style: {
- textFill: c.getTextColor(),
- font: c.getFont(),
- textVerticalAlign: "middle",
- textAlign: "center"
- },
- silent: !0
- })), s("pageNext", 1);
- },
- layoutInner: function (t, e, i, r, a, o) {
- var s = this.getSelectorGroup(),
- l = t.getOrient().index,
- u = tT[l],
- h = eT[l],
- c = tT[1 - l],
- d = eT[1 - l];
- a && ix("horizontal", s, t.get("selectorItemGap", !0));
- var f = t.get("selectorButtonGap", !0),
- p = s.getBoundingRect(),
- g = [-p.x, -p.y],
- m = n(i);
- a && (m[u] = i[u] - p[u] - f);
- var v = this._layoutContentAndController(t, r, m, l, u, c, d);
- if (a) {
- if ("end" === o) g[l] += v[u] + f;else {
- var y = p[u] + f;
- g[l] -= y, v[h] -= y;
- }
- v[u] += p[u] + f, g[1 - l] += v[d] + v[c] / 2 - p[c] / 2, v[c] = Math.max(v[c], p[c]), v[d] = Math.min(v[d], p[d] + g[1 - l]), s.attr("position", g);
- }
- return v;
- },
- _layoutContentAndController: function (t, e, i, n, r, a, o) {
- var s = this.getContentGroup(),
- l = this._containerGroup,
- u = this._controllerGroup;
- ix(t.get("orient"), s, t.get("itemGap"), n ? i.width : null, n ? null : i.height), ix("horizontal", u, t.get("pageButtonItemGap", !0));
- var h = s.getBoundingRect(),
- c = u.getBoundingRect(),
- d = this._showController = h[r] > i[r],
- f = [-h.x, -h.y];
- e || (f[n] = s.position[n]);
- var p = [0, 0],
- g = [-c.x, -c.y],
- m = A(t.get("pageButtonGap", !0), t.get("itemGap", !0));
- if (d) {
- var v = t.get("pageButtonPosition", !0);
- "end" === v ? g[n] += i[r] - c[r] : p[n] += c[r] + m;
- }
- g[1 - n] += h[a] / 2 - c[a] / 2, s.attr("position", f), l.attr("position", p), u.attr("position", g);
- var y = {
- x: 0,
- y: 0
- };
- if (y[r] = d ? i[r] : h[r], y[a] = Math.max(h[a], c[a]), y[o] = Math.min(0, c[o] + g[1 - n]), l.__rectSize = i[r], d) {
- var _ = {
- x: 0,
- y: 0
- };
- _[r] = Math.max(i[r] - c[r] - m, 0), _[a] = y[a], l.setClipPath(new u_({
- shape: _
- })), l.__rectSize = _[r];
- } else u.eachChild(function (t) {
- t.attr({
- invisible: !0,
- silent: !0
- });
- });
- var x = this._getPageInfo(t);
- return null != x.pageIndex && Ga(s, {
- position: x.contentPosition
- }, d ? t : !1), this._updatePageInfoView(t, x), y;
- },
- _pageGo: function (t, e, i) {
- var n = this._getPageInfo(e)[t];
- null != n && i.dispatchAction({
- type: "legendScroll",
- scrollDataIndex: n,
- legendId: e.id
- });
- },
- _updatePageInfoView: function (t, e) {
- var i = this._controllerGroup;
- f(["pagePrev", "pageNext"], function (n) {
- var r = null != e[n + "DataIndex"],
- a = i.childOfName(n);
- a && (a.setStyle("fill", r ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), a.cursor = r ? "pointer" : "default");
- });
- var n = i.childOfName("pageText"),
- r = t.get("pageFormatter"),
- a = e.pageIndex,
- o = null != a ? a + 1 : 0,
- s = e.pageCount;
- n && r && n.setStyle("text", b(r) ? r.replace("{current}", o).replace("{total}", s) : r({
- current: o,
- total: s
- }));
- },
- _getPageInfo: function (t) {
- function e(t) {
- if (t) {
- var e = t.getBoundingRect(),
- i = e[l] + t.position[o];
- return {
- s: i,
- e: i + e[s],
- i: t.__legendDataIndex
- };
- }
- }
- function i(t, e) {
- return t.e >= e && t.s <= e + a;
- }
- var n = t.get("scrollDataIndex", !0),
- r = this.getContentGroup(),
- a = this._containerGroup.__rectSize,
- o = t.getOrient().index,
- s = tT[o],
- l = eT[o],
- u = this._findTargetItemIndex(n),
- h = r.children(),
- c = h[u],
- d = h.length,
- f = d ? 1 : 0,
- p = {
- contentPosition: r.position.slice(),
- pageCount: f,
- pageIndex: f - 1,
- pagePrevDataIndex: null,
- pageNextDataIndex: null
- };
- if (!c) return p;
- var g = e(c);
- p.contentPosition[o] = -g.s;
- for (var m = u + 1, v = g, y = g, _ = null; d >= m; ++m) _ = e(h[m]), (!_ && y.e > v.s + a || _ && !i(_, v.s)) && (v = y.i > v.i ? y : _, v && (null == p.pageNextDataIndex && (p.pageNextDataIndex = v.i), ++p.pageCount)), y = _;
- for (var m = u - 1, v = g, y = g, _ = null; m >= -1; --m) _ = e(h[m]), _ && i(y, _.s) || !(v.i < y.i) || (y = v, null == p.pagePrevDataIndex && (p.pagePrevDataIndex = v.i), ++p.pageCount, ++p.pageIndex), v = _;
- return p;
- },
- _findTargetItemIndex: function (t) {
- var e,
- i,
- n = this.getContentGroup();
- return this._showController && n.eachChild(function (n, r) {
- var a = n.__legendDataIndex;
- null == i && null != a && (i = r), a === t && (e = r);
- }), null != e ? e : i;
- }
- });
- uu("legendScroll", "legendscroll", function (t, e) {
- var i = t.scrollDataIndex;
- null != i && e.eachComponent({
- mainType: "legend",
- subType: "scroll",
- query: t
- }, function (t) {
- t.setScrollDataIndex(i);
- });
- }), mu({
- type: "tooltip",
- dependencies: ["axisPointer"],
- defaultOption: {
- zlevel: 0,
- z: 60,
- show: !0,
- showContent: !0,
- trigger: "item",
- triggerOn: "mousemove|click",
- alwaysShowContent: !1,
- displayMode: "single",
- renderMode: "auto",
- confine: !1,
- showDelay: 0,
- hideDelay: 100,
- transitionDuration: .4,
- enterable: !1,
- backgroundColor: "rgba(50,50,50,0.7)",
- borderColor: "#333",
- borderRadius: 4,
- borderWidth: 0,
- padding: 5,
- extraCssText: "",
- axisPointer: {
- type: "line",
- axis: "auto",
- animation: "auto",
- animationDurationUpdate: 200,
- animationEasingUpdate: "exponentialOut",
- crossStyle: {
- color: "#999",
- width: 1,
- type: "dashed",
- textStyle: {}
- }
- },
- textStyle: {
- color: "#fff",
- fontSize: 14
- }
- }
- });
- var nT = f,
- rT = Io,
- aT = ["", "-webkit-", "-moz-", "-o-"],
- oT = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";
- ip.prototype = {
- constructor: ip,
- _enterable: !0,
- update: function () {
- var t = this._container,
- e = t.currentStyle || document.defaultView.getComputedStyle(t),
- i = t.style;
- "absolute" !== i.position && "absolute" !== e.position && (i.position = "relative");
- },
- show: function (t) {
- clearTimeout(this._hideTimeout);
- var e = this.el;
- e.style.cssText = oT + ep(t) + ";left:" + this._x + "px;top:" + this._y + "px;" + (t.get("extraCssText") || ""), e.style.display = e.innerHTML ? "block" : "none", e.style.pointerEvents = this._enterable ? "auto" : "none", this._show = !0;
- },
- setContent: function (t) {
- this.el.innerHTML = null == t ? "" : t;
- },
- setEnterable: function (t) {
- this._enterable = t;
- },
- getSize: function () {
- var t = this.el;
- return [t.clientWidth, t.clientHeight];
- },
- moveTo: function (t, e) {
- var i,
- n = this._zr;
- n && n.painter && (i = n.painter.getViewportRootOffset()) && (t += i.offsetLeft, e += i.offsetTop);
- var r = this.el.style;
- r.left = t + "px", r.top = e + "px", this._x = t, this._y = e;
- },
- hide: function () {
- this.el.style.display = "none", this._show = !1;
- },
- hideLater: function (t) {
- !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(y(this.hide, this), t)) : this.hide());
- },
- isShow: function () {
- return this._show;
- },
- getOuterSize: function () {
- var t = this.el.clientWidth,
- e = this.el.clientHeight;
- if (document.defaultView && document.defaultView.getComputedStyle) {
- var i = document.defaultView.getComputedStyle(this.el);
- i && (t += parseInt(i.borderLeftWidth, 10) + parseInt(i.borderRightWidth, 10), e += parseInt(i.borderTopWidth, 10) + parseInt(i.borderBottomWidth, 10));
- }
- return {
- width: t,
- height: e
- };
- }
- }, np.prototype = {
- constructor: np,
- _enterable: !0,
- update: function () {},
- show: function () {
- this._hideTimeout && clearTimeout(this._hideTimeout), this.el.attr("show", !0), this._show = !0;
- },
- setContent: function (t, e, i) {
- this.el && this._zr.remove(this.el);
- for (var n = {}, r = t, a = "{marker", o = "|}", s = r.indexOf(a); s >= 0;) {
- var l = r.indexOf(o),
- u = r.substr(s + a.length, l - s - a.length);
- n["marker" + u] = u.indexOf("sub") > -1 ? {
- textWidth: 4,
- textHeight: 4,
- textBorderRadius: 2,
- textBackgroundColor: e[u],
- textOffset: [3, 0]
- } : {
- textWidth: 10,
- textHeight: 10,
- textBorderRadius: 5,
- textBackgroundColor: e[u]
- }, r = r.substr(l + 1), s = r.indexOf("{marker");
- }
- this.el = new $y({
- style: {
- rich: n,
- text: t,
- textLineHeight: 20,
- textBackgroundColor: i.get("backgroundColor"),
- textBorderRadius: i.get("borderRadius"),
- textFill: i.get("textStyle.color"),
- textPadding: i.get("padding")
- },
- z: i.get("z")
- }), this._zr.add(this.el);
- var h = this;
- this.el.on("mouseover", function () {
- h._enterable && (clearTimeout(h._hideTimeout), h._show = !0), h._inContent = !0;
- }), this.el.on("mouseout", function () {
- h._enterable && h._show && h.hideLater(h._hideDelay), h._inContent = !1;
- });
- },
- setEnterable: function (t) {
- this._enterable = t;
- },
- getSize: function () {
- var t = this.el.getBoundingRect();
- return [t.width, t.height];
- },
- moveTo: function (t, e) {
- this.el && this.el.attr("position", [t, e]);
- },
- hide: function () {
- this.el && this.el.hide(), this._show = !1;
- },
- hideLater: function (t) {
- !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(y(this.hide, this), t)) : this.hide());
- },
- isShow: function () {
- return this._show;
- },
- getOuterSize: function () {
- var t = this.getSize();
- return {
- width: t[0],
- height: t[1]
- };
- }
- };
- var sT = y,
- lT = f,
- uT = so,
- hT = new u_({
- shape: {
- x: -1,
- y: -1,
- width: 2,
- height: 2
- }
- });
- vu({
- type: "tooltip",
- init: function (t, e) {
- if (!Mg.node) {
- var i = t.getComponent("tooltip"),
- n = i.get("renderMode");
- this._renderMode = tr(n);
- var r;
- "html" === this._renderMode ? (r = new ip(e.getDom(), e), this._newLine = "<br/>") : (r = new np(e), this._newLine = "\n"), this._tooltipContent = r;
- }
- },
- render: function (t, e, i) {
- if (!Mg.node) {
- this.group.removeAll(), this._tooltipModel = t, this._ecModel = e, this._api = i, this._lastDataByCoordSys = null, this._alwaysShowContent = t.get("alwaysShowContent");
- var n = this._tooltipContent;
- n.update(), n.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow();
- }
- },
- _initGlobalListener: function () {
- var t = this._tooltipModel,
- e = t.get("triggerOn");
- wf("itemTooltip", this._api, sT(function (t, i, n) {
- "none" !== e && (e.indexOf(t) >= 0 ? this._tryShow(i, n) : "leave" === t && this._hide(n));
- }, this));
- },
- _keepShow: function () {
- var t = this._tooltipModel,
- e = this._ecModel,
- i = this._api;
- if (null != this._lastX && null != this._lastY && "none" !== t.get("triggerOn")) {
- var n = this;
- clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function () {
- !i.isDisposed() && n.manuallyShowTip(t, e, i, {
- x: n._lastX,
- y: n._lastY
- });
- });
- }
- },
- manuallyShowTip: function (t, e, i, n) {
- if (n.from !== this.uid && !Mg.node) {
- var r = ap(n, i);
- this._ticket = "";
- var a = n.dataByCoordSys;
- if (n.tooltip && null != n.x && null != n.y) {
- var o = hT;
- o.position = [n.x, n.y], o.update(), o.tooltip = n.tooltip, this._tryShow({
- offsetX: n.x,
- offsetY: n.y,
- target: o
- }, r);
- } else if (a) this._tryShow({
- offsetX: n.x,
- offsetY: n.y,
- position: n.position,
- event: {},
- dataByCoordSys: n.dataByCoordSys,
- tooltipOption: n.tooltipOption
- }, r);else if (null != n.seriesIndex) {
- if (this._manuallyAxisShowTip(t, e, i, n)) return;
- var s = CI(n, e),
- l = s.point[0],
- u = s.point[1];
- null != l && null != u && this._tryShow({
- offsetX: l,
- offsetY: u,
- position: n.position,
- target: s.el,
- event: {}
- }, r);
- } else null != n.x && null != n.y && (i.dispatchAction({
- type: "updateAxisPointer",
- x: n.x,
- y: n.y
- }), this._tryShow({
- offsetX: n.x,
- offsetY: n.y,
- position: n.position,
- target: i.getZr().findHover(n.x, n.y).target,
- event: {}
- }, r));
- }
- },
- manuallyHideTip: function (t, e, i, n) {
- var r = this._tooltipContent;
- !this._alwaysShowContent && this._tooltipModel && r.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = null, n.from !== this.uid && this._hide(ap(n, i));
- },
- _manuallyAxisShowTip: function (t, e, i, n) {
- var r = n.seriesIndex,
- a = n.dataIndex,
- o = e.getComponent("axisPointer").coordSysAxesInfo;
- if (null != r && null != a && null != o) {
- var s = e.getSeriesByIndex(r);
- if (s) {
- var l = s.getData(),
- t = rp([l.getItemModel(a), s, (s.coordinateSystem || {}).model, t]);
- if ("axis" === t.get("trigger")) return i.dispatchAction({
- type: "updateAxisPointer",
- seriesIndex: r,
- dataIndex: a,
- position: n.position
- }), !0;
- }
- }
- },
- _tryShow: function (t, e) {
- var i = t.target,
- n = this._tooltipModel;
- if (n) {
- this._lastX = t.offsetX, this._lastY = t.offsetY;
- var r = t.dataByCoordSys;
- r && r.length ? this._showAxisTooltip(r, t) : i && null != i.dataIndex ? (this._lastDataByCoordSys = null, this._showSeriesItemTooltip(t, i, e)) : i && i.tooltip ? (this._lastDataByCoordSys = null, this._showComponentItemTooltip(t, i, e)) : (this._lastDataByCoordSys = null, this._hide(e));
- }
- },
- _showOrMove: function (t, e) {
- var i = t.get("showDelay");
- e = y(e, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(e, i) : e();
- },
- _showAxisTooltip: function (t, e) {
- var i = this._ecModel,
- n = this._tooltipModel,
- a = [e.offsetX, e.offsetY],
- o = [],
- s = [],
- l = rp([e.tooltipOption, n]),
- u = this._renderMode,
- h = this._newLine,
- c = {};
- lT(t, function (t) {
- lT(t.dataByAxis, function (t) {
- var e = i.getComponent(t.axisDim + "Axis", t.axisIndex),
- n = t.value,
- a = [];
- if (e && null != n) {
- var l = Bf(n, e.axis, i, t.seriesDataIndices, t.valueLabelOpt);
- f(t.seriesDataIndices, function (o) {
- var h = i.getSeriesByIndex(o.seriesIndex),
- d = o.dataIndexInside,
- f = h && h.getDataParams(d);
- if (f.axisDim = t.axisDim, f.axisIndex = t.axisIndex, f.axisType = t.axisType, f.axisId = t.axisId, f.axisValue = Ih(e.axis, n), f.axisValueLabel = l, f) {
- s.push(f);
- var p,
- g = h.formatTooltip(d, !0, null, u);
- if (S(g)) {
- p = g.html;
- var m = g.markers;
- r(c, m);
- } else p = g;
- a.push(p);
- }
- });
- var d = l;
- o.push("html" !== u ? a.join(h) : (d ? To(d) + h : "") + a.join(h));
- }
- });
- }, this), o.reverse(), o = o.join(this._newLine + this._newLine);
- var d = e.position;
- this._showOrMove(l, function () {
- this._updateContentNotChangedOnAxis(t) ? this._updatePosition(l, d, a[0], a[1], this._tooltipContent, s) : this._showTooltipContent(l, o, s, Math.random(), a[0], a[1], d, void 0, c);
- });
- },
- _showSeriesItemTooltip: function (t, e, i) {
- var n = this._ecModel,
- r = e.seriesIndex,
- a = n.getSeriesByIndex(r),
- o = e.dataModel || a,
- s = e.dataIndex,
- l = e.dataType,
- u = o.getData(),
- h = rp([u.getItemModel(s), o, a && (a.coordinateSystem || {}).model, this._tooltipModel]),
- c = h.get("trigger");
- if (null == c || "item" === c) {
- var d,
- f,
- p = o.getDataParams(s, l),
- g = o.formatTooltip(s, !1, l, this._renderMode);
- S(g) ? (d = g.html, f = g.markers) : (d = g, f = null);
- var m = "item_" + o.name + "_" + s;
- this._showOrMove(h, function () {
- this._showTooltipContent(h, d, p, m, t.offsetX, t.offsetY, t.position, t.target, f);
- }), i({
- type: "showTip",
- dataIndexInside: s,
- dataIndex: u.getRawIndex(s),
- seriesIndex: r,
- from: this.uid
- });
- }
- },
- _showComponentItemTooltip: function (t, e, i) {
- var n = e.tooltip;
- if ("string" == typeof n) {
- var r = n;
- n = {
- content: r,
- formatter: r
- };
- }
- var a = new Ja(n, this._tooltipModel, this._ecModel),
- o = a.get("content"),
- s = Math.random();
- this._showOrMove(a, function () {
- this._showTooltipContent(a, o, a.get("formatterParams") || {}, s, t.offsetX, t.offsetY, t.position, e);
- }), i({
- type: "showTip",
- from: this.uid
- });
- },
- _showTooltipContent: function (t, e, i, n, r, a, o, s, l) {
- if (this._ticket = "", t.get("showContent") && t.get("show")) {
- var u = this._tooltipContent,
- h = t.get("formatter");
- o = o || t.get("position");
- var c = e;
- if (h && "string" == typeof h) c = Co(h, i, !0);else if ("function" == typeof h) {
- var d = sT(function (e, n) {
- e === this._ticket && (u.setContent(n, l, t), this._updatePosition(t, o, r, a, u, i, s));
- }, this);
- this._ticket = n, c = h(i, n, d);
- }
- u.setContent(c, l, t), u.show(t), this._updatePosition(t, o, r, a, u, i, s);
- }
- },
- _updatePosition: function (t, e, i, n, r, a, o) {
- var s = this._api.getWidth(),
- l = this._api.getHeight();
- e = e || t.get("position");
- var u = r.getSize(),
- h = t.get("align"),
- c = t.get("verticalAlign"),
- d = o && o.getBoundingRect().clone();
- if (o && d.applyTransform(o.transform), "function" == typeof e && (e = e([i, n], a, r.el, d, {
- viewSize: [s, l],
- contentSize: u.slice()
- })), x(e)) i = uT(e[0], s), n = uT(e[1], l);else if (S(e)) {
- e.width = u[0], e.height = u[1];
- var f = Ro(e, {
- width: s,
- height: l
- });
- i = f.x, n = f.y, h = null, c = null;
- } else if ("string" == typeof e && o) {
- var p = lp(e, d, u);
- i = p[0], n = p[1];
- } else {
- var p = op(i, n, r, s, l, h ? null : 20, c ? null : 20);
- i = p[0], n = p[1];
- }
- if (h && (i -= up(h) ? u[0] / 2 : "right" === h ? u[0] : 0), c && (n -= up(c) ? u[1] / 2 : "bottom" === c ? u[1] : 0), t.get("confine")) {
- var p = sp(i, n, r, s, l);
- i = p[0], n = p[1];
- }
- r.moveTo(i, n);
- },
- _updateContentNotChangedOnAxis: function (t) {
- var e = this._lastDataByCoordSys,
- i = !!e && e.length === t.length;
- return i && lT(e, function (e, n) {
- var r = e.dataByAxis || {},
- a = t[n] || {},
- o = a.dataByAxis || [];
- i &= r.length === o.length, i && lT(r, function (t, e) {
- var n = o[e] || {},
- r = t.seriesDataIndices || [],
- a = n.seriesDataIndices || [];
- i &= t.value === n.value && t.axisType === n.axisType && t.axisId === n.axisId && r.length === a.length, i && lT(r, function (t, e) {
- var n = a[e];
- i &= t.seriesIndex === n.seriesIndex && t.dataIndex === n.dataIndex;
- });
- });
- }), this._lastDataByCoordSys = t, !!i;
- },
- _hide: function (t) {
- this._lastDataByCoordSys = null, t({
- type: "hideTip",
- from: this.uid
- });
- },
- dispose: function (t, e) {
- Mg.node || (this._tooltipContent.hide(), Cf("itemTooltip", e));
- }
- }), uu({
- type: "showTip",
- event: "showTip",
- update: "tooltip:manuallyShowTip"
- }, function () {}), uu({
- type: "hideTip",
- event: "hideTip",
- update: "tooltip:manuallyHideTip"
- }, function () {});
- var cT = Mo,
- dT = To,
- fT = mu({
- type: "marker",
- dependencies: ["series", "grid", "polar", "geo"],
- init: function (t, e, i) {
- this.mergeDefaultAndTheme(t, i), this._mergeOption(t, i, !1, !0);
- },
- isAnimationEnabled: function () {
- if (Mg.node) return !1;
- var t = this.__hostSeries;
- return this.getShallow("animation") && t && t.isAnimationEnabled();
- },
- mergeOption: function (t, e) {
- this._mergeOption(t, e, !1, !1);
- },
- _mergeOption: function (t, e, i, n) {
- var r = this.constructor,
- a = this.mainType + "Model";
- i || e.eachSeries(function (t) {
- var i = t.get(this.mainType, !0),
- s = t[a];
- return i && i.data ? (s ? s._mergeOption(i, e, !0) : (n && hp(i), f(i.data, function (t) {
- t instanceof Array ? (hp(t[0]), hp(t[1])) : hp(t);
- }), s = new r(i, this, e), o(s, {
- mainType: this.mainType,
- seriesIndex: t.seriesIndex,
- name: t.name,
- createdBySelf: !0
- }), s.__hostSeries = t), void (t[a] = s)) : void (t[a] = null);
- }, this);
- },
- formatTooltip: function (t) {
- var e = this.getData(),
- i = this.getRawValue(t),
- n = x(i) ? p(i, cT).join(", ") : cT(i),
- r = e.getName(t),
- a = dT(this.name);
- return (null != i || r) && (a += "<br />"), r && (a += dT(r), null != i && (a += " : ")), null != i && (a += dT(n)), a;
- },
- getData: function () {
- return this._data;
- },
- setData: function (t) {
- this._data = t;
- }
- });
- c(fT, Wx), fT.extend({
- type: "markPoint",
- defaultOption: {
- zlevel: 0,
- z: 5,
- symbol: "pin",
- symbolSize: 50,
- tooltip: {
- trigger: "item"
- },
- label: {
- show: !0,
- position: "inside"
- },
- itemStyle: {
- borderWidth: 2
- },
- emphasis: {
- label: {
- show: !0
- }
- }
- }
- });
- var pT = u,
- gT = _,
- mT = {
- min: gT(fp, "min"),
- max: gT(fp, "max"),
- average: gT(fp, "average")
- },
- vT = vu({
- type: "marker",
- init: function () {
- this.markerGroupMap = N();
- },
- render: function (t, e, i) {
- var n = this.markerGroupMap;
- n.each(function (t) {
- t.__keep = !1;
- });
- var r = this.type + "Model";
- e.eachSeries(function (t) {
- var n = t[r];
- n && this.renderSeries(t, n, e, i);
- }, this), n.each(function (t) {
- !t.__keep && this.group.remove(t.group);
- }, this);
- },
- renderSeries: function () {}
- });
- vT.extend({
- type: "markPoint",
- updateTransform: function (t, e, i) {
- e.eachSeries(function (t) {
- var e = t.markPointModel;
- e && (xp(e.getData(), t, i), this.markerGroupMap.get(t.id).updateLayout(e));
- }, this);
- },
- renderSeries: function (t, e, i, n) {
- var r = t.coordinateSystem,
- a = t.id,
- o = t.getData(),
- s = this.markerGroupMap,
- l = s.get(a) || s.set(a, new $c()),
- u = wp(r, t, e);
- e.setData(u), xp(e.getData(), t, n), u.each(function (t) {
- var i = u.getItemModel(t),
- n = i.getShallow("symbol"),
- r = i.getShallow("symbolSize"),
- a = w(n),
- s = w(r);
- if (a || s) {
- var l = e.getRawValue(t),
- h = e.getDataParams(t);
- a && (n = n(l, h)), s && (r = r(l, h));
- }
- u.setItemVisual(t, {
- symbol: n,
- symbolSize: r,
- color: i.get("itemStyle.color") || o.getVisual("color")
- });
- }), l.updateData(u), this.group.add(l.group), u.eachItemGraphicEl(function (t) {
- t.traverse(function (t) {
- t.dataModel = e;
- });
- }), l.__keep = !0, l.group.silent = e.get("silent") || t.get("silent");
- }
- }), ou(function (t) {
- t.markPoint = t.markPoint || {};
- }), fT.extend({
- type: "markLine",
- defaultOption: {
- zlevel: 0,
- z: 5,
- symbol: ["circle", "arrow"],
- symbolSize: [8, 16],
- precision: 2,
- tooltip: {
- trigger: "item"
- },
- label: {
- show: !0,
- position: "end"
- },
- lineStyle: {
- type: "dashed"
- },
- emphasis: {
- label: {
- show: !0
- },
- lineStyle: {
- width: 3
- }
- },
- animationEasing: "linear"
- }
- });
- var yT = c_.prototype,
- _T = f_.prototype,
- xT = ea({
- type: "ec-line",
- style: {
- stroke: "#000",
- fill: null
- },
- shape: {
- x1: 0,
- y1: 0,
- x2: 0,
- y2: 0,
- percent: 1,
- cpx1: null,
- cpy1: null
- },
- buildPath: function (t, e) {
- this[bp(e) ? "_buildPathLine" : "_buildPathCurve"](t, e);
- },
- _buildPathLine: yT.buildPath,
- _buildPathCurve: _T.buildPath,
- pointAt: function (t) {
- return this[bp(this.shape) ? "_pointAtLine" : "_pointAtCurve"](t);
- },
- _pointAtLine: yT.pointAt,
- _pointAtCurve: _T.pointAt,
- tangentAt: function (t) {
- var e = this.shape,
- i = bp(e) ? [e.x2 - e.x1, e.y2 - e.y1] : this._tangentAtCurve(t);
- return te(i, i);
- },
- _tangentAtCurve: _T.tangentAt
- }),
- wT = ["fromSymbol", "toSymbol"],
- bT = Dp.prototype;
- bT.beforeUpdate = Cp, bT._createLine = function (t, e, i) {
- var n = t.hostModel,
- r = t.getItemLayout(e),
- a = Ip(r);
- a.shape.percent = 0, Va(a, {
- shape: {
- percent: 1
- }
- }, n, e), this.add(a);
- var o = new $y({
- name: "label",
- lineLabelOriginalOpacity: 1
- });
- this.add(o), f(wT, function (i) {
- var n = Mp(i, t, e);
- this.add(n), this[Sp(i)] = t.getItemVisual(e, i);
- }, this), this._updateCommonStl(t, e, i);
- }, bT.updateData = function (t, e, i) {
- var n = t.hostModel,
- r = this.childOfName("line"),
- a = t.getItemLayout(e),
- o = {
- shape: {}
- };
- Tp(o.shape, a), Ga(r, o, n, e), f(wT, function (i) {
- var n = t.getItemVisual(e, i),
- r = Sp(i);
- if (this[r] !== n) {
- this.remove(this.childOfName(i));
- var a = Mp(i, t, e);
- this.add(a);
- }
- this[r] = n;
- }, this), this._updateCommonStl(t, e, i);
- }, bT._updateCommonStl = function (t, e, i) {
- var n = t.hostModel,
- r = this.childOfName("line"),
- a = i && i.lineStyle,
- o = i && i.hoverLineStyle,
- l = i && i.labelModel,
- u = i && i.hoverLabelModel;
- if (!i || t.hasItemOption) {
- var h = t.getItemModel(e);
- a = h.getModel("lineStyle").getLineStyle(), o = h.getModel("emphasis.lineStyle").getLineStyle(), l = h.getModel("label"), u = h.getModel("emphasis.label");
- }
- var c = t.getItemVisual(e, "color"),
- d = k(t.getItemVisual(e, "opacity"), a.opacity, 1);
- r.useStyle(s({
- strokeNoScale: !0,
- fill: "none",
- stroke: c,
- opacity: d
- }, a)), r.hoverStyle = o, f(wT, function (t) {
- var e = this.childOfName(t);
- e && (e.setColor(c), e.setStyle({
- opacity: d
- }));
- }, this);
- var p,
- g,
- m = l.getShallow("show"),
- v = u.getShallow("show"),
- y = this.childOfName("label");
- if ((m || v) && (p = c || "#000", g = n.getFormattedLabel(e, "normal", t.dataType), null == g)) {
- var _ = n.getRawValue(e);
- g = null == _ ? t.getName(e) : isFinite(_) ? lo(_) : _;
- }
- var x = m ? g : null,
- w = v ? A(n.getFormattedLabel(e, "emphasis", t.dataType), g) : null,
- b = y.style;
- (null != x || null != w) && (ka(y.style, l, {
- text: x
- }, {
- autoColor: p
- }), y.__textAlign = b.textAlign, y.__verticalAlign = b.textVerticalAlign, y.__position = l.get("position") || "middle"), y.hoverStyle = null != w ? {
- text: w,
- textFill: u.getTextColor(!0),
- fontStyle: u.getShallow("fontStyle"),
- fontWeight: u.getShallow("fontWeight"),
- fontSize: u.getShallow("fontSize"),
- fontFamily: u.getShallow("fontFamily")
- } : {
- text: null
- }, y.ignore = !m && !v, Ma(this);
- }, bT.highlight = function () {
- this.trigger("emphasis");
- }, bT.downplay = function () {
- this.trigger("normal");
- }, bT.updateLayout = function (t, e) {
- this.setLinePoints(t.getItemLayout(e));
- }, bT.setLinePoints = function (t) {
- var e = this.childOfName("line");
- Tp(e.shape, t), e.dirty();
- }, h(Dp, Bm);
- var ST = Ap.prototype;
- ST.isPersistent = function () {
- return !0;
- }, ST.updateData = function (t) {
- var e = this,
- i = e.group,
- n = e._lineData;
- e._lineData = t, n || i.removeAll();
- var r = Lp(t);
- t.diff(n).add(function (i) {
- kp(e, t, i, r);
- }).update(function (i, a) {
- Pp(e, n, t, a, i, r);
- }).remove(function (t) {
- i.remove(n.getItemGraphicEl(t));
- }).execute();
- }, ST.updateLayout = function () {
- var t = this._lineData;
- t && t.eachItemGraphicEl(function (e, i) {
- e.updateLayout(t, i);
- }, this);
- }, ST.incrementalPrepareUpdate = function (t) {
- this._seriesScope = Lp(t), this._lineData = null, this.group.removeAll();
- }, ST.incrementalUpdate = function (t, e) {
- function i(t) {
- t.isGroup || (t.incremental = t.useHoverLayer = !0);
- }
- for (var n = t.start; n < t.end; n++) {
- var r = e.getItemLayout(n);
- if (zp(r)) {
- var a = new this._ctor(e, n, this._seriesScope);
- a.traverse(i), this.group.add(a), e.setItemGraphicEl(n, a);
- }
- }
- }, ST.remove = function () {
- this._clearIncremental(), this._incremental = null, this.group.removeAll();
- }, ST._clearIncremental = function () {
- var t = this._incremental;
- t && t.clearDisplaybles();
- };
- var MT = function (t, e, i, a) {
- var s = t.getData(),
- l = a.type;
- if (!x(a) && ("min" === l || "max" === l || "average" === l || "median" === l || null != a.xAxis || null != a.yAxis)) {
- var u, h;
- if (null != a.yAxis || null != a.xAxis) u = e.getAxis(null != a.yAxis ? "y" : "x"), h = D(a.yAxis, a.xAxis);else {
- var c = gp(a, s, e, t);
- u = c.valueAxis;
- var d = qu(s, c.valueDataDim);
- h = _p(s, d, l);
- }
- var f = "x" === u.dim ? 0 : 1,
- p = 1 - f,
- g = n(a),
- m = {};
- g.type = null, g.coord = [], m.coord = [], g.coord[p] = -1 / 0, m.coord[p] = 1 / 0;
- var v = i.get("precision");
- v >= 0 && "number" == typeof h && (h = +h.toFixed(Math.min(v, 20))), g.coord[f] = m.coord[f] = h, a = [g, m, {
- type: l,
- valueIndex: a.valueIndex,
- value: h
- }];
- }
- return a = [pp(t, a[0]), pp(t, a[1]), o({}, a[2])], a[2].type = a[2].type || "", r(a[2], a[0]), r(a[2], a[1]), a;
- };
- vT.extend({
- type: "markLine",
- updateTransform: function (t, e, i) {
- e.eachSeries(function (t) {
- var e = t.markLineModel;
- if (e) {
- var n = e.getData(),
- r = e.__from,
- a = e.__to;
- r.each(function (e) {
- Np(r, e, !0, t, i), Np(a, e, !1, t, i);
- }), n.each(function (t) {
- n.setItemLayout(t, [r.getItemLayout(t), a.getItemLayout(t)]);
- }), this.markerGroupMap.get(t.id).updateLayout();
- }
- }, this);
- },
- renderSeries: function (t, e, i, n) {
- function r(e, i, r) {
- var a = e.getItemModel(i);
- Np(e, i, r, t, n), e.setItemVisual(i, {
- symbolSize: a.get("symbolSize") || g[r ? 0 : 1],
- symbol: a.get("symbol", !0) || p[r ? 0 : 1],
- color: a.get("itemStyle.color") || s.getVisual("color")
- });
- }
- var a = t.coordinateSystem,
- o = t.id,
- s = t.getData(),
- l = this.markerGroupMap,
- u = l.get(o) || l.set(o, new Ap());
- this.group.add(u.group);
- var h = Fp(a, t, e),
- c = h.from,
- d = h.to,
- f = h.line;
- e.__from = c, e.__to = d, e.setData(f);
- var p = e.get("symbol"),
- g = e.get("symbolSize");
- x(p) || (p = [p, p]), "number" == typeof g && (g = [g, g]), h.from.each(function (t) {
- r(c, t, !0), r(d, t, !1);
- }), f.each(function (t) {
- var e = f.getItemModel(t).get("lineStyle.color");
- f.setItemVisual(t, {
- color: e || c.getItemVisual(t, "color")
- }), f.setItemLayout(t, [c.getItemLayout(t), d.getItemLayout(t)]), f.setItemVisual(t, {
- fromSymbolSize: c.getItemVisual(t, "symbolSize"),
- fromSymbol: c.getItemVisual(t, "symbol"),
- toSymbolSize: d.getItemVisual(t, "symbolSize"),
- toSymbol: d.getItemVisual(t, "symbol")
- });
- }), u.updateData(f), h.line.eachItemGraphicEl(function (t) {
- t.traverse(function (t) {
- t.dataModel = e;
- });
- }), u.__keep = !0, u.group.silent = e.get("silent") || t.get("silent");
- }
- }), ou(function (t) {
- t.markLine = t.markLine || {};
- }), fT.extend({
- type: "markArea",
- defaultOption: {
- zlevel: 0,
- z: 1,
- tooltip: {
- trigger: "item"
- },
- animation: !1,
- label: {
- show: !0,
- position: "top"
- },
- itemStyle: {
- borderWidth: 0
- },
- emphasis: {
- label: {
- show: !0,
- position: "top"
- }
- }
- }
- });
- var IT = function (t, e, i, n) {
- var r = pp(t, n[0]),
- o = pp(t, n[1]),
- s = D,
- l = r.coord,
- u = o.coord;
- l[0] = s(l[0], -1 / 0), l[1] = s(l[1], -1 / 0), u[0] = s(u[0], 1 / 0), u[1] = s(u[1], 1 / 0);
- var h = a([{}, r, o]);
- return h.coord = [r.coord, o.coord], h.x0 = r.x, h.y0 = r.y, h.x1 = o.x, h.y1 = o.y, h;
- },
- TT = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]];
- vT.extend({
- type: "markArea",
- updateTransform: function (t, e, i) {
- e.eachSeries(function (t) {
- var e = t.markAreaModel;
- if (e) {
- var n = e.getData();
- n.each(function (e) {
- var r = p(TT, function (r) {
- return Wp(n, e, r, t, i);
- });
- n.setItemLayout(e, r);
- var a = n.getItemGraphicEl(e);
- a.setShape("points", r);
- });
- }
- }, this);
- },
- renderSeries: function (t, e, i, n) {
- var r = t.coordinateSystem,
- a = t.id,
- o = t.getData(),
- l = this.markerGroupMap,
- u = l.get(a) || l.set(a, {
- group: new Bm()
- });
- this.group.add(u.group), u.__keep = !0;
- var h = Up(r, t, e);
- e.setData(h), h.each(function (e) {
- h.setItemLayout(e, p(TT, function (i) {
- return Wp(h, e, i, t, n);
- })), h.setItemVisual(e, {
- color: o.getVisual("color")
- });
- }), h.diff(u.__data).add(function (t) {
- var e = new a_({
- shape: {
- points: h.getItemLayout(t)
- }
- });
- h.setItemGraphicEl(t, e), u.group.add(e);
- }).update(function (t, i) {
- var n = u.__data.getItemGraphicEl(i);
- Ga(n, {
- shape: {
- points: h.getItemLayout(t)
- }
- }, e, t), u.group.add(n), h.setItemGraphicEl(t, n);
- }).remove(function (t) {
- var e = u.__data.getItemGraphicEl(t);
- u.group.remove(e);
- }).execute(), h.eachItemGraphicEl(function (t, i) {
- var n = h.getItemModel(i),
- r = n.getModel("label"),
- a = n.getModel("emphasis.label"),
- o = h.getItemVisual(i, "color");
- t.useStyle(s(n.getModel("itemStyle").getItemStyle(), {
- fill: ni(o, .4),
- stroke: o
- })), t.hoverStyle = n.getModel("emphasis.itemStyle").getItemStyle(), Da(t.style, t.hoverStyle, r, a, {
- labelFetcher: e,
- labelDataIndex: i,
- defaultText: h.getName(i) || "",
- isRectText: !0,
- autoColor: o
- }), Ma(t, {}), t.dataModel = e;
- }), u.__data = h, u.group.silent = e.get("silent") || t.get("silent");
- }
- }), ou(function (t) {
- t.markArea = t.markArea || {};
- });
- var CT = "http://www.w3.org/2000/svg",
- DT = Ty.CMD,
- AT = Array.prototype.join,
- kT = "none",
- PT = Math.round,
- LT = Math.sin,
- OT = Math.cos,
- zT = Math.PI,
- ET = 2 * Math.PI,
- RT = 180 / zT,
- BT = 1e-4,
- NT = {};
- NT.brush = function (t) {
- var e = t.style,
- i = t.__svgEl;
- i || (i = Xp("path"), t.__svgEl = i), t.path || t.createPathProxy();
- var n = t.path;
- if (t.__dirtyPath) {
- n.beginPath(), n.subPixelOptimize = !1, t.buildPath(n, t.shape), t.__dirtyPath = !1;
- var r = tg(n);
- r.indexOf("NaN") < 0 && $p(i, "d", r);
- }
- Jp(i, e, !1, t), Kp(i, t.transform), null != e.text && XT(t, t.getBoundingRect());
- };
- var FT = {};
- FT.brush = function (t) {
- var e = t.style,
- i = e.image;
- if (i instanceof HTMLImageElement) {
- var n = i.src;
- i = n;
- }
- if (i) {
- var r = e.x || 0,
- a = e.y || 0,
- o = e.width,
- s = e.height,
- l = t.__svgEl;
- l || (l = Xp("image"), t.__svgEl = l), i !== t.__imageSrc && (Qp(l, "href", i), t.__imageSrc = i), $p(l, "width", o), $p(l, "height", s), $p(l, "x", r), $p(l, "y", a), Kp(l, t.transform), null != e.text && XT(t, t.getBoundingRect());
- }
- };
- var GT = {},
- VT = new wi(),
- HT = {},
- WT = [],
- UT = {
- left: "start",
- right: "end",
- center: "middle",
- middle: "middle"
- },
- XT = function (t, e) {
- var i = t.style,
- n = t.transform,
- r = t instanceof $y || i.transformText;
- t.__dirty && rn(i, !0);
- var a = i.text;
- if (null != a && (a += ""), wn(a, i)) {
- null == a && (a = ""), !r && n && (VT.copy(e), VT.applyTransform(n), e = VT);
- var o = t.__textSvgEl;
- o || (o = Xp("text"), t.__textSvgEl = o);
- var s = o.style,
- l = i.font || rv,
- u = o.__computedFont;
- l !== o.__styleFont && (s.font = o.__styleFont = l, u = o.__computedFont = s.font);
- var h = i.textPadding,
- c = i.textLineHeight,
- d = t.__textCotentBlock;
- (!d || t.__dirtyText) && (d = t.__textCotentBlock = Qi(a, u, h, c, i.truncate));
- var f = d.outerHeight,
- p = d.lineHeight;
- gn(HT, t, i, e);
- var g = HT.baseX,
- m = HT.baseY,
- v = HT.textAlign || "left",
- y = HT.textVerticalAlign;
- eg(o, r, n, i, e, g, m);
- var _ = Ui(m, f, y),
- x = g,
- w = _;
- h && (x = ig(g, v, h), w += h[0]), w += p / 2, Jp(o, i, !0, t);
- var b = d.canCacheByTextString,
- S = t.__tspanList || (t.__tspanList = []),
- M = S.length;
- if (b && t.__canCacheByTextString && t.__text === a) {
- if (t.__dirtyText && M) for (var I = 0; M > I; ++I) ng(S[I], v, x, w + I * p);
- } else {
- t.__text = a, t.__canCacheByTextString = b;
- for (var T = d.lines, C = T.length, I = 0; C > I; I++) {
- var D = S[I],
- A = T[I];
- D ? D.__zrText !== A && (D.innerHTML = "", D.appendChild(document.createTextNode(A))) : (D = S[I] = Xp("tspan"), o.appendChild(D), D.appendChild(document.createTextNode(A))), ng(D, v, x, w + I * p);
- }
- if (M > C) {
- for (; M > I; I++) o.removeChild(S[I]);
- S.length = C;
- }
- }
- }
- };
- GT.drawRectText = XT, GT.brush = function (t) {
- var e = t.style;
- null != e.text && XT(t, !1);
- }, rg.prototype = {
- diff: function (t, e, i) {
- function n() {
- for (var i = -1 * s; s >= i; i += 2) {
- var n,
- l = u[i - 1],
- h = u[i + 1],
- c = (h ? h.newPos : 0) - i;
- l && (u[i - 1] = void 0);
- var d = l && l.newPos + 1 < a,
- f = h && c >= 0 && o > c;
- if (d || f) {
- if (!d || f && l.newPos < h.newPos ? (n = og(h), r.pushComponent(n.components, void 0, !0)) : (n = l, n.newPos++, r.pushComponent(n.components, !0, void 0)), c = r.extractCommon(n, e, t, i), n.newPos + 1 >= a && c + 1 >= o) return ag(r, n.components, e, t);
- u[i] = n;
- } else u[i] = void 0;
- }
- s++;
- }
- i || (i = function (t, e) {
- return t === e;
- }), this.equals = i;
- var r = this;
- t = t.slice(), e = e.slice();
- var a = e.length,
- o = t.length,
- s = 1,
- l = a + o,
- u = [{
- newPos: -1,
- components: []
- }],
- h = this.extractCommon(u[0], e, t, 0);
- if (u[0].newPos + 1 >= a && h + 1 >= o) {
- for (var c = [], d = 0; d < e.length; d++) c.push(d);
- return [{
- indices: c,
- count: e.length
- }];
- }
- for (; l >= s;) {
- var f = n();
- if (f) return f;
- }
- },
- pushComponent: function (t, e, i) {
- var n = t[t.length - 1];
- n && n.added === e && n.removed === i ? t[t.length - 1] = {
- count: n.count + 1,
- added: e,
- removed: i
- } : t.push({
- count: 1,
- added: e,
- removed: i
- });
- },
- extractCommon: function (t, e, i, n) {
- for (var r = e.length, a = i.length, o = t.newPos, s = o - n, l = 0; r > o + 1 && a > s + 1 && this.equals(e[o + 1], i[s + 1]);) o++, s++, l++;
- return l && t.components.push({
- count: l
- }), t.newPos = o, s;
- },
- tokenize: function (t) {
- return t.slice();
- },
- join: function (t) {
- return t.slice();
- }
- };
- var YT = new rg(),
- jT = function (t, e, i) {
- return YT.diff(t, e, i);
- },
- qT = "0",
- ZT = "1";
- sg.prototype.createElement = Xp, sg.prototype.getDefs = function (t) {
- var e = this._svgRoot,
- i = this._svgRoot.getElementsByTagName("defs");
- return 0 === i.length ? t ? (i = e.insertBefore(this.createElement("defs"), e.firstChild), i.contains || (i.contains = function (t) {
- var e = i.children;
- if (!e) return !1;
- for (var n = e.length - 1; n >= 0; --n) if (e[n] === t) return !0;
- return !1;
- }), i) : null : i[0];
- }, sg.prototype.update = function (t, e) {
- if (t) {
- var i = this.getDefs(!1);
- if (t[this._domName] && i.contains(t[this._domName])) "function" == typeof e && e(t);else {
- var n = this.add(t);
- n && (t[this._domName] = n);
- }
- }
- }, sg.prototype.addDom = function (t) {
- var e = this.getDefs(!0);
- e.appendChild(t);
- }, sg.prototype.removeDom = function (t) {
- var e = this.getDefs(!1);
- e && t[this._domName] && (e.removeChild(t[this._domName]), t[this._domName] = null);
- }, sg.prototype.getDoms = function () {
- var t = this.getDefs(!1);
- if (!t) return [];
- var e = [];
- return f(this._tagNames, function (i) {
- var n = t.getElementsByTagName(i);
- e = e.concat([].slice.call(n));
- }), e;
- }, sg.prototype.markAllUnused = function () {
- var t = this.getDoms(),
- e = this;
- f(t, function (t) {
- t[e._markLabel] = qT;
- });
- }, sg.prototype.markUsed = function (t) {
- t && (t[this._markLabel] = ZT);
- }, sg.prototype.removeUnused = function () {
- var t = this.getDefs(!1);
- if (t) {
- var e = this.getDoms(),
- i = this;
- f(e, function (e) {
- e[i._markLabel] !== ZT && t.removeChild(e);
- });
- }
- }, sg.prototype.getSvgProxy = function (t) {
- return t instanceof Vr ? NT : t instanceof Sn ? FT : t instanceof $y ? GT : NT;
- }, sg.prototype.getTextSvgElement = function (t) {
- return t.__textSvgEl;
- }, sg.prototype.getSvgElement = function (t) {
- return t.__svgEl;
- }, h(lg, sg), lg.prototype.addWithoutUpdate = function (t, e) {
- if (e && e.style) {
- var i = this;
- f(["fill", "stroke"], function (n) {
- if (e.style[n] && ("linear" === e.style[n].type || "radial" === e.style[n].type)) {
- var r,
- a = e.style[n],
- o = i.getDefs(!0);
- a._dom ? (r = a._dom, o.contains(a._dom) || i.addDom(r)) : r = i.add(a), i.markUsed(e);
- var s = r.getAttribute("id");
- t.setAttribute(n, "url(#" + s + ")");
- }
- });
- }
- }, lg.prototype.add = function (t) {
- var e;
- if ("linear" === t.type) e = this.createElement("linearGradient");else {
- if ("radial" !== t.type) return Pm("Illegal gradient type."), null;
- e = this.createElement("radialGradient");
- }
- return t.id = t.id || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-gradient-" + t.id), this.updateDom(t, e), this.addDom(e), e;
- }, lg.prototype.update = function (t) {
- var e = this;
- sg.prototype.update.call(this, t, function () {
- var i = t.type,
- n = t._dom.tagName;
- "linear" === i && "linearGradient" === n || "radial" === i && "radialGradient" === n ? e.updateDom(t, t._dom) : (e.removeDom(t), e.add(t));
- });
- }, lg.prototype.updateDom = function (t, e) {
- if ("linear" === t.type) e.setAttribute("x1", t.x), e.setAttribute("y1", t.y), e.setAttribute("x2", t.x2), e.setAttribute("y2", t.y2);else {
- if ("radial" !== t.type) return void Pm("Illegal gradient type.");
- e.setAttribute("cx", t.x), e.setAttribute("cy", t.y), e.setAttribute("r", t.r);
- }
- t.global ? e.setAttribute("gradientUnits", "userSpaceOnUse") : e.setAttribute("gradientUnits", "objectBoundingBox"), e.innerHTML = "";
- for (var i = t.colorStops, n = 0, r = i.length; r > n; ++n) {
- var a = this.createElement("stop");
- a.setAttribute("offset", 100 * i[n].offset + "%");
- var o = i[n].color;
- if (o.indexOf(!1)) {
- var s = Ze(o)[3],
- l = Je(o);
- a.setAttribute("stop-color", "#" + l), a.setAttribute("stop-opacity", s);
- } else a.setAttribute("stop-color", i[n].color);
- e.appendChild(a);
- }
- t._dom = e;
- }, lg.prototype.markUsed = function (t) {
- if (t.style) {
- var e = t.style.fill;
- e && e._dom && sg.prototype.markUsed.call(this, e._dom), e = t.style.stroke, e && e._dom && sg.prototype.markUsed.call(this, e._dom);
- }
- }, h(ug, sg), ug.prototype.update = function (t) {
- var e = this.getSvgElement(t);
- e && this.updateDom(e, t.__clipPaths, !1);
- var i = this.getTextSvgElement(t);
- i && this.updateDom(i, t.__clipPaths, !0), this.markUsed(t);
- }, ug.prototype.updateDom = function (t, e, i) {
- if (e && e.length > 0) {
- var n,
- r,
- a = this.getDefs(!0),
- o = e[0],
- s = i ? "_textDom" : "_dom";
- o[s] ? (r = o[s].getAttribute("id"), n = o[s], a.contains(n) || a.appendChild(n)) : (r = "zr" + this._zrId + "-clip-" + this.nextId, ++this.nextId, n = this.createElement("clipPath"), n.setAttribute("id", r), a.appendChild(n), o[s] = n);
- var l = this.getSvgProxy(o);
- if (o.transform && o.parent.invTransform && !i) {
- var u = Array.prototype.slice.call(o.transform);
- Pe(o.transform, o.parent.invTransform, o.transform), l.brush(o), o.transform = u;
- } else l.brush(o);
- var h = this.getSvgElement(o);
- n.innerHTML = "", n.appendChild(h.cloneNode()), t.setAttribute("clip-path", "url(#" + r + ")"), e.length > 1 && this.updateDom(n, e.slice(1), i);
- } else t && t.setAttribute("clip-path", "none");
- }, ug.prototype.markUsed = function (t) {
- var e = this;
- t.__clipPaths && f(t.__clipPaths, function (t) {
- t._dom && sg.prototype.markUsed.call(e, t._dom), t._textDom && sg.prototype.markUsed.call(e, t._textDom);
- });
- }, h(hg, sg), hg.prototype.addWithoutUpdate = function (t, e) {
- if (e && cg(e.style)) {
- var i;
- if (e._shadowDom) {
- i = e._shadowDom;
- var n = this.getDefs(!0);
- n.contains(e._shadowDom) || this.addDom(i);
- } else i = this.add(e);
- this.markUsed(e);
- var r = i.getAttribute("id");
- t.style.filter = "url(#" + r + ")";
- }
- }, hg.prototype.add = function (t) {
- var e = this.createElement("filter");
- return t._shadowDomId = t._shadowDomId || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-shadow-" + t._shadowDomId), this.updateDom(t, e), this.addDom(e), e;
- }, hg.prototype.update = function (t, e) {
- var i = e.style;
- if (cg(i)) {
- var n = this;
- sg.prototype.update.call(this, e, function () {
- n.updateDom(e, e._shadowDom);
- });
- } else this.remove(t, e);
- }, hg.prototype.remove = function (t, e) {
- null != e._shadowDomId && (this.removeDom(t), t.style.filter = "");
- }, hg.prototype.updateDom = function (t, e) {
- var i = e.getElementsByTagName("feDropShadow");
- i = 0 === i.length ? this.createElement("feDropShadow") : i[0];
- var n,
- r,
- a,
- o,
- s = t.style,
- l = t.scale ? t.scale[0] || 1 : 1,
- u = t.scale ? t.scale[1] || 1 : 1;
- if (s.shadowBlur || s.shadowOffsetX || s.shadowOffsetY) n = s.shadowOffsetX || 0, r = s.shadowOffsetY || 0, a = s.shadowBlur, o = s.shadowColor;else {
- if (!s.textShadowBlur) return void this.removeDom(e, s);
- n = s.textShadowOffsetX || 0, r = s.textShadowOffsetY || 0, a = s.textShadowBlur, o = s.textShadowColor;
- }
- i.setAttribute("dx", n / l), i.setAttribute("dy", r / u), i.setAttribute("flood-color", o);
- var h = a / 2 / l,
- c = a / 2 / u,
- d = h + " " + c;
- i.setAttribute("stdDeviation", d), e.setAttribute("x", "-100%"), e.setAttribute("y", "-100%"), e.setAttribute("width", Math.ceil(a / 2 * 200) + "%"), e.setAttribute("height", Math.ceil(a / 2 * 200) + "%"), e.appendChild(i), t._shadowDom = e;
- }, hg.prototype.markUsed = function (t) {
- t._shadowDom && sg.prototype.markUsed.call(this, t._shadowDom);
- };
- var KT = function (t, e, i, n) {
- this.root = t, this.storage = e, this._opts = i = o({}, i || {});
- var r = Xp("svg");
- r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("version", "1.1"), r.setAttribute("baseProfile", "full"), r.style.cssText = "user-select:none;position:absolute;left:0;top:0;", this.gradientManager = new lg(n, r), this.clipPathManager = new ug(n, r), this.shadowManager = new hg(n, r);
- var a = document.createElement("div");
- a.style.cssText = "overflow:hidden;position:relative", this._svgRoot = r, this._viewport = a, t.appendChild(a), a.appendChild(r), this.resize(i.width, i.height), this._visibleList = [];
- };
- KT.prototype = {
- constructor: KT,
- getType: function () {
- return "svg";
- },
- getViewportRoot: function () {
- return this._viewport;
- },
- getViewportRootOffset: function () {
- var t = this.getViewportRoot();
- return t ? {
- offsetLeft: t.offsetLeft || 0,
- offsetTop: t.offsetTop || 0
- } : void 0;
- },
- refresh: function () {
- var t = this.storage.getDisplayList(!0);
- this._paintList(t);
- },
- setBackgroundColor: function (t) {
- this._viewport.style.background = t;
- },
- _paintList: function (t) {
- this.gradientManager.markAllUnused(), this.clipPathManager.markAllUnused(), this.shadowManager.markAllUnused();
- var e,
- i = this._svgRoot,
- n = this._visibleList,
- r = t.length,
- a = [];
- for (e = 0; r > e; e++) {
- var o = t[e],
- s = fg(o),
- l = _g(o) || yg(o);
- o.invisible || (o.__dirty && (s && s.brush(o), this.clipPathManager.update(o), o.style && (this.gradientManager.update(o.style.fill), this.gradientManager.update(o.style.stroke), this.shadowManager.update(l, o)), o.__dirty = !1), a.push(o));
- }
- var u,
- h = jT(n, a);
- for (e = 0; e < h.length; e++) {
- var c = h[e];
- if (c.removed) for (var d = 0; d < c.count; d++) {
- var o = n[c.indices[d]],
- l = _g(o),
- f = yg(o);
- vg(i, l), vg(i, f);
- }
- }
- for (e = 0; e < h.length; e++) {
- var c = h[e];
- if (c.added) for (var d = 0; d < c.count; d++) {
- var o = a[c.indices[d]],
- l = _g(o),
- f = yg(o);
- u ? gg(i, l, u) : mg(i, l), l ? gg(i, f, l) : u ? gg(i, f, u) : mg(i, f), gg(i, f, l), u = f || l || u, this.gradientManager.addWithoutUpdate(l || f, o), this.shadowManager.addWithoutUpdate(l || f, o), this.clipPathManager.markUsed(o);
- } else if (!c.removed) for (var d = 0; d < c.count; d++) {
- var o = a[c.indices[d]];
- u = yg(o) || _g(o) || u;
- var l = _g(o),
- f = yg(o);
- this.gradientManager.markUsed(o), this.gradientManager.addWithoutUpdate(l || f, o), this.shadowManager.markUsed(o), this.shadowManager.addWithoutUpdate(l || f, o), this.clipPathManager.markUsed(o);
- }
- }
- this.gradientManager.removeUnused(), this.clipPathManager.removeUnused(), this.shadowManager.removeUnused(), this._visibleList = a;
- },
- _getDefs: function (t) {
- var e = this._svgRoot,
- i = this._svgRoot.getElementsByTagName("defs");
- if (0 === i.length) {
- if (t) {
- var i = e.insertBefore(Xp("defs"), e.firstChild);
- return i.contains || (i.contains = function (t) {
- var e = i.children;
- if (!e) return !1;
- for (var n = e.length - 1; n >= 0; --n) if (e[n] === t) return !0;
- return !1;
- }), i;
- }
- return null;
- }
- return i[0];
- },
- resize: function (t, e) {
- var i = this._viewport;
- i.style.display = "none";
- var n = this._opts;
- if (null != t && (n.width = t), null != e && (n.height = e), t = this._getSize(0), e = this._getSize(1), i.style.display = "", this._width !== t || this._height !== e) {
- this._width = t, this._height = e;
- var r = i.style;
- r.width = t + "px", r.height = e + "px";
- var a = this._svgRoot;
- a.setAttribute("width", t), a.setAttribute("height", e);
- }
- },
- getWidth: function () {
- return this._width;
- },
- getHeight: function () {
- return this._height;
- },
- _getSize: function (t) {
- var e = this._opts,
- i = ["width", "height"][t],
- n = ["clientWidth", "clientHeight"][t],
- r = ["paddingLeft", "paddingTop"][t],
- a = ["paddingRight", "paddingBottom"][t];
- if (null != e[i] && "auto" !== e[i]) return parseFloat(e[i]);
- var o = this.root,
- s = document.defaultView.getComputedStyle(o);
- return (o[n] || dg(s[i]) || dg(o.style[i])) - (dg(s[r]) || 0) - (dg(s[a]) || 0) | 0;
- },
- dispose: function () {
- this.root.innerHTML = "", this._svgRoot = this._viewport = this.storage = null;
- },
- clear: function () {
- this._viewport && this.root.removeChild(this._viewport);
- },
- pathToDataUrl: function () {
- this.refresh();
- var t = this._svgRoot.outerHTML;
- return "data:image/svg+xml;charset=UTF-8," + t;
- }
- }, f(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function (t) {
- KT.prototype[t] = xg(t);
- }), Nn("svg", KT), t.version = Bw, t.dependencies = Nw, t.PRIORITY = $w, t.init = Jl, t.connect = tu, t.disConnect = eu, t.disconnect = vb, t.dispose = iu, t.getInstanceByDom = nu, t.getInstanceById = ru, t.registerTheme = au, t.registerPreprocessor = ou, t.registerProcessor = su, t.registerPostUpdate = lu, t.registerAction = uu, t.registerCoordinateSystem = hu, t.getCoordinateSystemDimensions = cu, t.registerLayout = du, t.registerVisual = fu, t.registerLoading = gu, t.extendComponentModel = mu, t.extendComponentView = vu, t.extendSeriesModel = yu, t.extendChartView = _u, t.setCanvasCreator = xu, t.registerMap = wu, t.getMap = bu, t.dataTool = yb, t.zrender = zv, t.number = X_, t.format = Q_, t.throttle = il, t.helper = _S, t.matrix = am, t.vector = Ug, t.color = Mm, t.parseGeoJSON = wS, t.parseGeoJson = IS, t.util = TS, t.graphic = CS, t.List = kb, t.Model = Ja, t.Axis = MS, t.env = Mg;
- });
|