echarts.min.js 1.9 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. ! function (t, e) {
  20. "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).echarts = {})
  21. }(this, (function (t) {
  22. "use strict";
  23. /*! *****************************************************************************
  24. Copyright (c) Microsoft Corporation.
  25. Permission to use, copy, modify, and/or distribute this software for any
  26. purpose with or without fee is hereby granted.
  27. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  28. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  29. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  30. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  31. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  32. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  33. PERFORMANCE OF THIS SOFTWARE.
  34. ***************************************************************************** */
  35. var e = function (t, n) {
  36. return e = Object.setPrototypeOf || {
  37. __proto__: []
  38. }
  39. instanceof Array && function (t, e) {
  40. t.__proto__ = e
  41. } || function (t, e) {
  42. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
  43. }, e(t, n)
  44. };
  45. function n(t, n) {
  46. if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
  47. function i() {
  48. this.constructor = t
  49. }
  50. e(t, n), t.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i)
  51. }
  52. var i = function () {
  53. this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1
  54. },
  55. r = new function () {
  56. this.browser = new i, this.node = !1, this.wxa = !1, this.worker = !1, this.svgSupported = !1, this.touchEventsSupported = !1, this.pointerEventsSupported = !1, this.domSupported = !1, this.transformSupported = !1, this.transform3dSupported = !1, this.hasGlobalWindow = "undefined" != typeof window
  57. };
  58. "object" == typeof wx && "function" == typeof wx.getSystemInfoSync ? (r.wxa = !0, r.touchEventsSupported = !0) : "undefined" == typeof document && "undefined" != typeof self ? r.worker = !0 : "undefined" == typeof navigator ? (r.node = !0, r.svgSupported = !0) : function (t, e) {
  59. var n = e.browser,
  60. i = t.match(/Firefox\/([\d.]+)/),
  61. r = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/),
  62. o = t.match(/Edge?\/([\d.]+)/),
  63. a = /micromessenger/i.test(t);
  64. i && (n.firefox = !0, n.version = i[1]);
  65. r && (n.ie = !0, n.version = r[1]);
  66. o && (n.edge = !0, n.version = o[1], n.newEdge = +o[1].split(".")[0] > 18);
  67. a && (n.weChat = !0);
  68. e.svgSupported = "undefined" != typeof SVGRect, e.touchEventsSupported = "ontouchstart" in window && !n.ie && !n.edge, e.pointerEventsSupported = "onpointerdown" in window && (n.edge || n.ie && +n.version >= 11), e.domSupported = "undefined" != typeof document;
  69. var s = document.documentElement.style;
  70. e.transform3dSupported = (n.ie && "transition" in s || n.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix || "MozPerspective" in s) && !("OTransition" in s), e.transformSupported = e.transform3dSupported || n.ie && +n.version >= 9
  71. }(navigator.userAgent, r);
  72. var o = "sans-serif",
  73. a = "12px " + o;
  74. var s, l, u = function (t) {
  75. var e = {};
  76. if ("undefined" == typeof JSON) return e;
  77. for (var n = 0; n < t.length; n++) {
  78. var i = String.fromCharCode(n + 32),
  79. r = (t.charCodeAt(n) - 20) / 100;
  80. e[i] = r
  81. }
  82. return e
  83. }("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),
  84. h = {
  85. createCanvas: function () {
  86. return "undefined" != typeof document && document.createElement("canvas")
  87. },
  88. measureText: function (t, e) {
  89. if (!s) {
  90. var n = h.createCanvas();
  91. s = n && n.getContext("2d")
  92. }
  93. if (s) return l !== e && (l = s.font = e || a), s.measureText(t);
  94. t = t || "";
  95. var i = /(\d+)px/.exec(e = e || a),
  96. r = i && +i[1] || 12,
  97. o = 0;
  98. if (e.indexOf("mono") >= 0) o = r * t.length;
  99. else
  100. for (var c = 0; c < t.length; c++) {
  101. var p = u[t[c]];
  102. o += null == p ? r : p * r
  103. }
  104. return {
  105. width: o
  106. }
  107. },
  108. loadImage: function (t, e, n) {
  109. var i = new Image;
  110. return i.onload = e, i.onerror = n, i.src = t, i
  111. }
  112. };
  113. function c(t) {
  114. for (var e in h) t[e] && (h[e] = t[e])
  115. }
  116. var p = V(["Function", "RegExp", "Date", "Error", "CanvasGradient", "CanvasPattern", "Image", "Canvas"], (function (t, e) {
  117. return t["[object " + e + "]"] = !0, t
  118. }), {}),
  119. d = V(["Int8", "Uint8", "Uint8Clamped", "Int16", "Uint16", "Int32", "Uint32", "Float32", "Float64"], (function (t, e) {
  120. return t["[object " + e + "Array]"] = !0, t
  121. }), {}),
  122. f = Object.prototype.toString,
  123. g = Array.prototype,
  124. y = g.forEach,
  125. v = g.filter,
  126. m = g.slice,
  127. x = g.map,
  128. _ = function () {}.constructor,
  129. b = _ ? _.prototype : null,
  130. w = "__proto__",
  131. S = 2311;
  132. function M() {
  133. return S++
  134. }
  135. function I() {
  136. for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
  137. "undefined" != typeof console && console.error.apply(console, t)
  138. }
  139. function T(t) {
  140. if (null == t || "object" != typeof t) return t;
  141. var e = t,
  142. n = f.call(t);
  143. if ("[object Array]" === n) {
  144. if (!pt(t)) {
  145. e = [];
  146. for (var i = 0, r = t.length; i < r; i++) e[i] = T(t[i])
  147. }
  148. } else if (d[n]) {
  149. if (!pt(t)) {
  150. var o = t.constructor;
  151. if (o.from) e = o.from(t);
  152. else {
  153. e = new o(t.length);
  154. for (i = 0, r = t.length; i < r; i++) e[i] = t[i]
  155. }
  156. }
  157. } else if (!p[n] && !pt(t) && !J(t))
  158. for (var a in e = {}, t) t.hasOwnProperty(a) && a !== w && (e[a] = T(t[a]));
  159. return e
  160. }
  161. function C(t, e, n) {
  162. if (!q(e) || !q(t)) return n ? T(e) : t;
  163. for (var i in e)
  164. if (e.hasOwnProperty(i) && i !== w) {
  165. var r = t[i],
  166. o = e[i];
  167. !q(o) || !q(r) || Y(o) || Y(r) || J(o) || J(r) || K(o) || K(r) || pt(o) || pt(r) ? !n && i in t || (t[i] = T(e[i])) : C(r, o, n)
  168. } return t
  169. }
  170. function D(t, e) {
  171. for (var n = t[0], i = 1, r = t.length; i < r; i++) n = C(n, t[i], e);
  172. return n
  173. }
  174. function A(t, e) {
  175. if (Object.assign) Object.assign(t, e);
  176. else
  177. for (var n in e) e.hasOwnProperty(n) && n !== w && (t[n] = e[n]);
  178. return t
  179. }
  180. function k(t, e, n) {
  181. for (var i = G(e), r = 0; r < i.length; r++) {
  182. var o = i[r];
  183. (n ? null != e[o] : null == t[o]) && (t[o] = e[o])
  184. }
  185. return t
  186. }
  187. var L = h.createCanvas;
  188. function P(t, e) {
  189. if (t) {
  190. if (t.indexOf) return t.indexOf(e);
  191. for (var n = 0, i = t.length; n < i; n++)
  192. if (t[n] === e) return n
  193. }
  194. return -1
  195. }
  196. function O(t, e) {
  197. var n = t.prototype;
  198. function i() {}
  199. for (var r in i.prototype = e.prototype, t.prototype = new i, n) n.hasOwnProperty(r) && (t.prototype[r] = n[r]);
  200. t.prototype.constructor = t, t.superClass = e
  201. }
  202. function R(t, e, n) {
  203. if (t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
  204. for (var i = Object.getOwnPropertyNames(e), r = 0; r < i.length; r++) {
  205. var o = i[r];
  206. "constructor" !== o && (n ? null != e[o] : null == t[o]) && (t[o] = e[o])
  207. } else k(t, e, n)
  208. }
  209. function N(t) {
  210. return !!t && ("string" != typeof t && "number" == typeof t.length)
  211. }
  212. function E(t, e, n) {
  213. if (t && e)
  214. if (t.forEach && t.forEach === y) t.forEach(e, n);
  215. else if (t.length === +t.length)
  216. for (var i = 0, r = t.length; i < r; i++) e.call(n, t[i], i, t);
  217. else
  218. for (var o in t) t.hasOwnProperty(o) && e.call(n, t[o], o, t)
  219. }
  220. function z(t, e, n) {
  221. if (!t) return [];
  222. if (!e) return at(t);
  223. if (t.map && t.map === x) return t.map(e, n);
  224. for (var i = [], r = 0, o = t.length; r < o; r++) i.push(e.call(n, t[r], r, t));
  225. return i
  226. }
  227. function V(t, e, n, i) {
  228. if (t && e) {
  229. for (var r = 0, o = t.length; r < o; r++) n = e.call(i, n, t[r], r, t);
  230. return n
  231. }
  232. }
  233. function B(t, e, n) {
  234. if (!t) return [];
  235. if (!e) return at(t);
  236. if (t.filter && t.filter === v) return t.filter(e, n);
  237. for (var i = [], r = 0, o = t.length; r < o; r++) e.call(n, t[r], r, t) && i.push(t[r]);
  238. return i
  239. }
  240. function F(t, e, n) {
  241. if (t && e)
  242. for (var i = 0, r = t.length; i < r; i++)
  243. if (e.call(n, t[i], i, t)) return t[i]
  244. }
  245. function G(t) {
  246. if (!t) return [];
  247. if (Object.keys) return Object.keys(t);
  248. var e = [];
  249. for (var n in t) t.hasOwnProperty(n) && e.push(n);
  250. return e
  251. }
  252. var W = b && X(b.bind) ? b.call.bind(b.bind) : function (t, e) {
  253. for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
  254. return function () {
  255. return t.apply(e, n.concat(m.call(arguments)))
  256. }
  257. };
  258. function H(t) {
  259. for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
  260. return function () {
  261. return t.apply(this, e.concat(m.call(arguments)))
  262. }
  263. }
  264. function Y(t) {
  265. return Array.isArray ? Array.isArray(t) : "[object Array]" === f.call(t)
  266. }
  267. function X(t) {
  268. return "function" == typeof t
  269. }
  270. function U(t) {
  271. return "string" == typeof t
  272. }
  273. function Z(t) {
  274. return "[object String]" === f.call(t)
  275. }
  276. function j(t) {
  277. return "number" == typeof t
  278. }
  279. function q(t) {
  280. var e = typeof t;
  281. return "function" === e || !!t && "object" === e
  282. }
  283. function K(t) {
  284. return !!p[f.call(t)]
  285. }
  286. function $(t) {
  287. return !!d[f.call(t)]
  288. }
  289. function J(t) {
  290. return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument
  291. }
  292. function Q(t) {
  293. return null != t.colorStops
  294. }
  295. function tt(t) {
  296. return null != t.image
  297. }
  298. function et(t) {
  299. return "[object RegExp]" === f.call(t)
  300. }
  301. function nt(t) {
  302. return t != t
  303. }
  304. function it() {
  305. for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
  306. for (var n = 0, i = t.length; n < i; n++)
  307. if (null != t[n]) return t[n]
  308. }
  309. function rt(t, e) {
  310. return null != t ? t : e
  311. }
  312. function ot(t, e, n) {
  313. return null != t ? t : null != e ? e : n
  314. }
  315. function at(t) {
  316. for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
  317. return m.apply(t, e)
  318. }
  319. function st(t) {
  320. if ("number" == typeof t) return [t, t, t, t];
  321. var e = t.length;
  322. return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t
  323. }
  324. function lt(t, e) {
  325. if (!t) throw new Error(e)
  326. }
  327. function ut(t) {
  328. return null == t ? null : "function" == typeof t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
  329. }
  330. var ht = "__ec_primitive__";
  331. function ct(t) {
  332. t[ht] = !0
  333. }
  334. function pt(t) {
  335. return t[ht]
  336. }
  337. var dt = function () {
  338. function t() {
  339. this.data = {}
  340. }
  341. return t.prototype.delete = function (t) {
  342. var e = this.has(t);
  343. return e && delete this.data[t], e
  344. }, t.prototype.has = function (t) {
  345. return this.data.hasOwnProperty(t)
  346. }, t.prototype.get = function (t) {
  347. return this.data[t]
  348. }, t.prototype.set = function (t, e) {
  349. return this.data[t] = e, this
  350. }, t.prototype.keys = function () {
  351. return G(this.data)
  352. }, t.prototype.forEach = function (t) {
  353. var e = this.data;
  354. for (var n in e) e.hasOwnProperty(n) && t(e[n], n)
  355. }, t
  356. }(),
  357. ft = "function" == typeof Map;
  358. var gt = function () {
  359. function t(e) {
  360. var n = Y(e);
  361. this.data = ft ? new Map : new dt;
  362. var i = this;
  363. function r(t, e) {
  364. n ? i.set(t, e) : i.set(e, t)
  365. }
  366. e instanceof t ? e.each(r) : e && E(e, r)
  367. }
  368. return t.prototype.hasKey = function (t) {
  369. return this.data.has(t)
  370. }, t.prototype.get = function (t) {
  371. return this.data.get(t)
  372. }, t.prototype.set = function (t, e) {
  373. return this.data.set(t, e), e
  374. }, t.prototype.each = function (t, e) {
  375. this.data.forEach((function (n, i) {
  376. t.call(e, n, i)
  377. }))
  378. }, t.prototype.keys = function () {
  379. var t = this.data.keys();
  380. return ft ? Array.from(t) : t
  381. }, t.prototype.removeKey = function (t) {
  382. this.data.delete(t)
  383. }, t
  384. }();
  385. function yt(t) {
  386. return new gt(t)
  387. }
  388. function vt(t, e) {
  389. for (var n = new t.constructor(t.length + e.length), i = 0; i < t.length; i++) n[i] = t[i];
  390. var r = t.length;
  391. for (i = 0; i < e.length; i++) n[i + r] = e[i];
  392. return n
  393. }
  394. function mt(t, e) {
  395. var n;
  396. if (Object.create) n = Object.create(t);
  397. else {
  398. var i = function () {};
  399. i.prototype = t, n = new i
  400. }
  401. return e && A(n, e), n
  402. }
  403. function xt(t) {
  404. var e = t.style;
  405. e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none"
  406. }
  407. function _t(t, e) {
  408. return t.hasOwnProperty(e)
  409. }
  410. function bt() {}
  411. var wt = 180 / Math.PI,
  412. St = Object.freeze({
  413. __proto__: null,
  414. guid: M,
  415. logError: I,
  416. clone: T,
  417. merge: C,
  418. mergeAll: D,
  419. extend: A,
  420. defaults: k,
  421. createCanvas: L,
  422. indexOf: P,
  423. inherits: O,
  424. mixin: R,
  425. isArrayLike: N,
  426. each: E,
  427. map: z,
  428. reduce: V,
  429. filter: B,
  430. find: F,
  431. keys: G,
  432. bind: W,
  433. curry: H,
  434. isArray: Y,
  435. isFunction: X,
  436. isString: U,
  437. isStringSafe: Z,
  438. isNumber: j,
  439. isObject: q,
  440. isBuiltInObject: K,
  441. isTypedArray: $,
  442. isDom: J,
  443. isGradientObject: Q,
  444. isImagePatternObject: tt,
  445. isRegExp: et,
  446. eqNaN: nt,
  447. retrieve: it,
  448. retrieve2: rt,
  449. retrieve3: ot,
  450. slice: at,
  451. normalizeCssArray: st,
  452. assert: lt,
  453. trim: ut,
  454. setAsPrimitive: ct,
  455. isPrimitive: pt,
  456. HashMap: gt,
  457. createHashMap: yt,
  458. concatArray: vt,
  459. createObject: mt,
  460. disableUserSelect: xt,
  461. hasOwn: _t,
  462. noop: bt,
  463. RADIAN_TO_DEGREE: wt
  464. });
  465. function Mt(t, e) {
  466. return null == t && (t = 0), null == e && (e = 0), [t, e]
  467. }
  468. function It(t, e) {
  469. return t[0] = e[0], t[1] = e[1], t
  470. }
  471. function Tt(t) {
  472. return [t[0], t[1]]
  473. }
  474. function Ct(t, e, n) {
  475. return t[0] = e, t[1] = n, t
  476. }
  477. function Dt(t, e, n) {
  478. return t[0] = e[0] + n[0], t[1] = e[1] + n[1], t
  479. }
  480. function At(t, e, n, i) {
  481. return t[0] = e[0] + n[0] * i, t[1] = e[1] + n[1] * i, t
  482. }
  483. function kt(t, e, n) {
  484. return t[0] = e[0] - n[0], t[1] = e[1] - n[1], t
  485. }
  486. function Lt(t) {
  487. return Math.sqrt(Ot(t))
  488. }
  489. var Pt = Lt;
  490. function Ot(t) {
  491. return t[0] * t[0] + t[1] * t[1]
  492. }
  493. var Rt = Ot;
  494. function Nt(t, e, n) {
  495. return t[0] = e[0] * n, t[1] = e[1] * n, t
  496. }
  497. function Et(t, e) {
  498. var n = Lt(e);
  499. return 0 === n ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / n, t[1] = e[1] / n), t
  500. }
  501. function zt(t, e) {
  502. return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]))
  503. }
  504. var Vt = zt;
  505. function Bt(t, e) {
  506. return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1])
  507. }
  508. var Ft = Bt;
  509. function Gt(t, e, n, i) {
  510. return t[0] = e[0] + i * (n[0] - e[0]), t[1] = e[1] + i * (n[1] - e[1]), t
  511. }
  512. function Wt(t, e, n) {
  513. var i = e[0],
  514. r = e[1];
  515. return t[0] = n[0] * i + n[2] * r + n[4], t[1] = n[1] * i + n[3] * r + n[5], t
  516. }
  517. function Ht(t, e, n) {
  518. return t[0] = Math.min(e[0], n[0]), t[1] = Math.min(e[1], n[1]), t
  519. }
  520. function Yt(t, e, n) {
  521. return t[0] = Math.max(e[0], n[0]), t[1] = Math.max(e[1], n[1]), t
  522. }
  523. var Xt = Object.freeze({
  524. __proto__: null,
  525. create: Mt,
  526. copy: It,
  527. clone: Tt,
  528. set: Ct,
  529. add: Dt,
  530. scaleAndAdd: At,
  531. sub: kt,
  532. len: Lt,
  533. length: Pt,
  534. lenSquare: Ot,
  535. lengthSquare: Rt,
  536. mul: function (t, e, n) {
  537. return t[0] = e[0] * n[0], t[1] = e[1] * n[1], t
  538. },
  539. div: function (t, e, n) {
  540. return t[0] = e[0] / n[0], t[1] = e[1] / n[1], t
  541. },
  542. dot: function (t, e) {
  543. return t[0] * e[0] + t[1] * e[1]
  544. },
  545. scale: Nt,
  546. normalize: Et,
  547. distance: zt,
  548. dist: Vt,
  549. distanceSquare: Bt,
  550. distSquare: Ft,
  551. negate: function (t, e) {
  552. return t[0] = -e[0], t[1] = -e[1], t
  553. },
  554. lerp: Gt,
  555. applyTransform: Wt,
  556. min: Ht,
  557. max: Yt
  558. }),
  559. Ut = function (t, e) {
  560. this.target = t, this.topTarget = e && e.topTarget
  561. },
  562. Zt = function () {
  563. function t(t) {
  564. this.handler = t, t.on("mousedown", this._dragStart, this), t.on("mousemove", this._drag, this), t.on("mouseup", this._dragEnd, this)
  565. }
  566. return t.prototype._dragStart = function (t) {
  567. for (var e = t.target; e && !e.draggable;) e = e.parent || e.__hostTarget;
  568. e && (this._draggingTarget = e, e.dragging = !0, this._x = t.offsetX, this._y = t.offsetY, this.handler.dispatchToElement(new Ut(e, t), "dragstart", t.event))
  569. }, t.prototype._drag = function (t) {
  570. var e = this._draggingTarget;
  571. if (e) {
  572. var n = t.offsetX,
  573. i = t.offsetY,
  574. r = n - this._x,
  575. o = i - this._y;
  576. this._x = n, this._y = i, e.drift(r, o, t), this.handler.dispatchToElement(new Ut(e, t), "drag", t.event);
  577. var a = this.handler.findHover(n, i, e).target,
  578. s = this._dropTarget;
  579. this._dropTarget = a, e !== a && (s && a !== s && this.handler.dispatchToElement(new Ut(s, t), "dragleave", t.event), a && a !== s && this.handler.dispatchToElement(new Ut(a, t), "dragenter", t.event))
  580. }
  581. }, t.prototype._dragEnd = function (t) {
  582. var e = this._draggingTarget;
  583. e && (e.dragging = !1), this.handler.dispatchToElement(new Ut(e, t), "dragend", t.event), this._dropTarget && this.handler.dispatchToElement(new Ut(this._dropTarget, t), "drop", t.event), this._draggingTarget = null, this._dropTarget = null
  584. }, t
  585. }(),
  586. jt = function () {
  587. function t(t) {
  588. t && (this._$eventProcessor = t)
  589. }
  590. return t.prototype.on = function (t, e, n, i) {
  591. this._$handlers || (this._$handlers = {});
  592. var r = this._$handlers;
  593. if ("function" == typeof e && (i = n, n = e, e = null), !n || !t) return this;
  594. var o = this._$eventProcessor;
  595. null != e && o && o.normalizeQuery && (e = o.normalizeQuery(e)), r[t] || (r[t] = []);
  596. for (var a = 0; a < r[t].length; a++)
  597. if (r[t][a].h === n) return this;
  598. var s = {
  599. h: n,
  600. query: e,
  601. ctx: i || this,
  602. callAtLast: n.zrEventfulCallAtLast
  603. },
  604. l = r[t].length - 1,
  605. u = r[t][l];
  606. return u && u.callAtLast ? r[t].splice(l, 0, s) : r[t].push(s), this
  607. }, t.prototype.isSilent = function (t) {
  608. var e = this._$handlers;
  609. return !e || !e[t] || !e[t].length
  610. }, t.prototype.off = function (t, e) {
  611. var n = this._$handlers;
  612. if (!n) return this;
  613. if (!t) return this._$handlers = {}, this;
  614. if (e) {
  615. if (n[t]) {
  616. for (var i = [], r = 0, o = n[t].length; r < o; r++) n[t][r].h !== e && i.push(n[t][r]);
  617. n[t] = i
  618. }
  619. n[t] && 0 === n[t].length && delete n[t]
  620. } else delete n[t];
  621. return this
  622. }, t.prototype.trigger = function (t) {
  623. for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
  624. if (!this._$handlers) return this;
  625. var i = this._$handlers[t],
  626. r = this._$eventProcessor;
  627. if (i)
  628. for (var o = e.length, a = i.length, s = 0; s < a; s++) {
  629. var l = i[s];
  630. if (!r || !r.filter || null == l.query || r.filter(t, l.query)) switch (o) {
  631. case 0:
  632. l.h.call(l.ctx);
  633. break;
  634. case 1:
  635. l.h.call(l.ctx, e[0]);
  636. break;
  637. case 2:
  638. l.h.call(l.ctx, e[0], e[1]);
  639. break;
  640. default:
  641. l.h.apply(l.ctx, e)
  642. }
  643. }
  644. return r && r.afterTrigger && r.afterTrigger(t), this
  645. }, t.prototype.triggerWithContext = function (t) {
  646. for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
  647. if (!this._$handlers) return this;
  648. var i = this._$handlers[t],
  649. r = this._$eventProcessor;
  650. if (i)
  651. for (var o = e.length, a = e[o - 1], s = i.length, l = 0; l < s; l++) {
  652. var u = i[l];
  653. if (!r || !r.filter || null == u.query || r.filter(t, u.query)) switch (o) {
  654. case 0:
  655. u.h.call(a);
  656. break;
  657. case 1:
  658. u.h.call(a, e[0]);
  659. break;
  660. case 2:
  661. u.h.call(a, e[0], e[1]);
  662. break;
  663. default:
  664. u.h.apply(a, e.slice(1, o - 1))
  665. }
  666. }
  667. return r && r.afterTrigger && r.afterTrigger(t), this
  668. }, t
  669. }(),
  670. qt = Math.log(2);
  671. function Kt(t, e, n, i, r, o) {
  672. var a = i + "-" + r,
  673. s = t.length;
  674. if (o.hasOwnProperty(a)) return o[a];
  675. if (1 === e) {
  676. var l = Math.round(Math.log((1 << s) - 1 & ~r) / qt);
  677. return t[n][l]
  678. }
  679. for (var u = i | 1 << n, h = n + 1; i & 1 << h;) h++;
  680. for (var c = 0, p = 0, d = 0; p < s; p++) {
  681. var f = 1 << p;
  682. f & r || (c += (d % 2 ? -1 : 1) * t[n][p] * Kt(t, e - 1, h, u, r | f, o), d++)
  683. }
  684. return o[a] = c, c
  685. }
  686. function $t(t, e) {
  687. var n = [
  688. [t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]],
  689. [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]],
  690. [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]],
  691. [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]],
  692. [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]],
  693. [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]],
  694. [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]],
  695. [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]
  696. ],
  697. i = {},
  698. r = Kt(n, 8, 0, 0, 0, i);
  699. if (0 !== r) {
  700. for (var o = [], a = 0; a < 8; a++)
  701. for (var s = 0; s < 8; s++) null == o[s] && (o[s] = 0), o[s] += ((a + s) % 2 ? -1 : 1) * Kt(n, 7, 0 === a ? 1 : 0, 1 << a, 1 << s, i) / r * e[a];
  702. return function (t, e, n) {
  703. var i = e * o[6] + n * o[7] + 1;
  704. t[0] = (e * o[0] + n * o[1] + o[2]) / i, t[1] = (e * o[3] + n * o[4] + o[5]) / i
  705. }
  706. }
  707. }
  708. var Jt = "___zrEVENTSAVED",
  709. Qt = [];
  710. function te(t, e, n, i, o) {
  711. if (e.getBoundingClientRect && r.domSupported && !ee(e)) {
  712. var a = e[Jt] || (e[Jt] = {}),
  713. s = function (t, e) {
  714. var n = e.markers;
  715. if (n) return n;
  716. n = e.markers = [];
  717. for (var i = ["left", "right"], r = ["top", "bottom"], o = 0; o < 4; o++) {
  718. var a = document.createElement("div"),
  719. s = o % 2,
  720. l = (o >> 1) % 2;
  721. a.style.cssText = ["position: absolute", "visibility: hidden", "padding: 0", "margin: 0", "border-width: 0", "user-select: none", "width:0", "height:0", i[s] + ":0", r[l] + ":0", i[1 - s] + ":auto", r[1 - l] + ":auto", ""].join("!important;"), t.appendChild(a), n.push(a)
  722. }
  723. return n
  724. }(e, a),
  725. l = function (t, e, n) {
  726. for (var i = n ? "invTrans" : "trans", r = e[i], o = e.srcCoords, a = [], s = [], l = !0, u = 0; u < 4; u++) {
  727. var h = t[u].getBoundingClientRect(),
  728. c = 2 * u,
  729. p = h.left,
  730. d = h.top;
  731. a.push(p, d), l = l && o && p === o[c] && d === o[c + 1], s.push(t[u].offsetLeft, t[u].offsetTop)
  732. }
  733. return l && r ? r : (e.srcCoords = a, e[i] = n ? $t(s, a) : $t(a, s))
  734. }(s, a, o);
  735. if (l) return l(t, n, i), !0
  736. }
  737. return !1
  738. }
  739. function ee(t) {
  740. return "CANVAS" === t.nodeName.toUpperCase()
  741. }
  742. var ne = /([&<>"'])/g,
  743. ie = {
  744. "&": "&amp;",
  745. "<": "&lt;",
  746. ">": "&gt;",
  747. '"': "&quot;",
  748. "'": "&#39;"
  749. };
  750. function re(t) {
  751. return null == t ? "" : (t + "").replace(ne, (function (t, e) {
  752. return ie[e]
  753. }))
  754. }
  755. var oe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
  756. ae = [],
  757. se = r.browser.firefox && +r.browser.version.split(".")[0] < 39;
  758. function le(t, e, n, i) {
  759. return n = n || {}, i ? ue(t, e, n) : se && null != e.layerX && e.layerX !== e.offsetX ? (n.zrX = e.layerX, n.zrY = e.layerY) : null != e.offsetX ? (n.zrX = e.offsetX, n.zrY = e.offsetY) : ue(t, e, n), n
  760. }
  761. function ue(t, e, n) {
  762. if (r.domSupported && t.getBoundingClientRect) {
  763. var i = e.clientX,
  764. o = e.clientY;
  765. if (ee(t)) {
  766. var a = t.getBoundingClientRect();
  767. return n.zrX = i - a.left, void(n.zrY = o - a.top)
  768. }
  769. if (te(ae, t, i, o)) return n.zrX = ae[0], void(n.zrY = ae[1])
  770. }
  771. n.zrX = n.zrY = 0
  772. }
  773. function he(t) {
  774. return t || window.event
  775. }
  776. function ce(t, e, n) {
  777. if (null != (e = he(e)).zrX) return e;
  778. var i = e.type;
  779. if (i && i.indexOf("touch") >= 0) {
  780. var r = "touchend" !== i ? e.targetTouches[0] : e.changedTouches[0];
  781. r && le(t, r, e, n)
  782. } else {
  783. le(t, e, e, n);
  784. var o = function (t) {
  785. var e = t.wheelDelta;
  786. if (e) return e;
  787. var n = t.deltaX,
  788. i = t.deltaY;
  789. if (null == n || null == i) return e;
  790. return 3 * (0 !== i ? Math.abs(i) : Math.abs(n)) * (i > 0 ? -1 : i < 0 ? 1 : n > 0 ? -1 : 1)
  791. }(e);
  792. e.zrDelta = o ? o / 120 : -(e.detail || 0) / 3
  793. }
  794. var a = e.button;
  795. return null == e.which && void 0 !== a && oe.test(e.type) && (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), e
  796. }
  797. function pe(t, e, n, i) {
  798. t.addEventListener(e, n, i)
  799. }
  800. var de = function (t) {
  801. t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0
  802. };
  803. function fe(t) {
  804. return 2 === t.which || 3 === t.which
  805. }
  806. var ge = function () {
  807. function t() {
  808. this._track = []
  809. }
  810. return t.prototype.recognize = function (t, e, n) {
  811. return this._doTrack(t, e, n), this._recognize(t)
  812. }, t.prototype.clear = function () {
  813. return this._track.length = 0, this
  814. }, t.prototype._doTrack = function (t, e, n) {
  815. var i = t.touches;
  816. if (i) {
  817. for (var r = {
  818. points: [],
  819. touches: [],
  820. target: e,
  821. event: t
  822. }, o = 0, a = i.length; o < a; o++) {
  823. var s = i[o],
  824. l = le(n, s, {});
  825. r.points.push([l.zrX, l.zrY]), r.touches.push(s)
  826. }
  827. this._track.push(r)
  828. }
  829. }, t.prototype._recognize = function (t) {
  830. for (var e in ve)
  831. if (ve.hasOwnProperty(e)) {
  832. var n = ve[e](this._track, t);
  833. if (n) return n
  834. }
  835. }, t
  836. }();
  837. function ye(t) {
  838. var e = t[1][0] - t[0][0],
  839. n = t[1][1] - t[0][1];
  840. return Math.sqrt(e * e + n * n)
  841. }
  842. var ve = {
  843. pinch: function (t, e) {
  844. var n = t.length;
  845. if (n) {
  846. var i, r = (t[n - 1] || {}).points,
  847. o = (t[n - 2] || {}).points || r;
  848. if (o && o.length > 1 && r && r.length > 1) {
  849. var a = ye(r) / ye(o);
  850. !isFinite(a) && (a = 1), e.pinchScale = a;
  851. var s = [((i = r)[0][0] + i[1][0]) / 2, (i[0][1] + i[1][1]) / 2];
  852. return e.pinchX = s[0], e.pinchY = s[1], {
  853. type: "pinch",
  854. target: t[0].target,
  855. event: e
  856. }
  857. }
  858. }
  859. }
  860. };
  861. function me() {
  862. return [1, 0, 0, 1, 0, 0]
  863. }
  864. function xe(t) {
  865. return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t
  866. }
  867. function _e(t, e) {
  868. 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
  869. }
  870. function be(t, e, n) {
  871. var i = e[0] * n[0] + e[2] * n[1],
  872. r = e[1] * n[0] + e[3] * n[1],
  873. o = e[0] * n[2] + e[2] * n[3],
  874. a = e[1] * n[2] + e[3] * n[3],
  875. s = e[0] * n[4] + e[2] * n[5] + e[4],
  876. l = e[1] * n[4] + e[3] * n[5] + e[5];
  877. return t[0] = i, t[1] = r, t[2] = o, t[3] = a, t[4] = s, t[5] = l, t
  878. }
  879. function we(t, e, n) {
  880. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4] + n[0], t[5] = e[5] + n[1], t
  881. }
  882. function Se(t, e, n) {
  883. var i = e[0],
  884. r = e[2],
  885. o = e[4],
  886. a = e[1],
  887. s = e[3],
  888. l = e[5],
  889. u = Math.sin(n),
  890. h = Math.cos(n);
  891. return t[0] = i * h + a * u, t[1] = -i * u + a * h, t[2] = r * h + s * u, t[3] = -r * u + h * s, t[4] = h * o + u * l, t[5] = h * l - u * o, t
  892. }
  893. function Me(t, e, n) {
  894. var i = n[0],
  895. r = n[1];
  896. return t[0] = e[0] * i, t[1] = e[1] * r, t[2] = e[2] * i, t[3] = e[3] * r, t[4] = e[4] * i, t[5] = e[5] * r, t
  897. }
  898. function Ie(t, e) {
  899. var n = e[0],
  900. i = e[2],
  901. r = e[4],
  902. o = e[1],
  903. a = e[3],
  904. s = e[5],
  905. l = n * a - o * i;
  906. return l ? (l = 1 / l, t[0] = a * l, t[1] = -o * l, t[2] = -i * l, t[3] = n * l, t[4] = (i * s - a * r) * l, t[5] = (o * r - n * s) * l, t) : null
  907. }
  908. function Te(t) {
  909. var e = [1, 0, 0, 1, 0, 0];
  910. return _e(e, t), e
  911. }
  912. var Ce = Object.freeze({
  913. __proto__: null,
  914. create: me,
  915. identity: xe,
  916. copy: _e,
  917. mul: be,
  918. translate: we,
  919. rotate: Se,
  920. scale: Me,
  921. invert: Ie,
  922. clone: Te
  923. }),
  924. De = function () {
  925. function t(t, e) {
  926. this.x = t || 0, this.y = e || 0
  927. }
  928. return t.prototype.copy = function (t) {
  929. return this.x = t.x, this.y = t.y, this
  930. }, t.prototype.clone = function () {
  931. return new t(this.x, this.y)
  932. }, t.prototype.set = function (t, e) {
  933. return this.x = t, this.y = e, this
  934. }, t.prototype.equal = function (t) {
  935. return t.x === this.x && t.y === this.y
  936. }, t.prototype.add = function (t) {
  937. return this.x += t.x, this.y += t.y, this
  938. }, t.prototype.scale = function (t) {
  939. this.x *= t, this.y *= t
  940. }, t.prototype.scaleAndAdd = function (t, e) {
  941. this.x += t.x * e, this.y += t.y * e
  942. }, t.prototype.sub = function (t) {
  943. return this.x -= t.x, this.y -= t.y, this
  944. }, t.prototype.dot = function (t) {
  945. return this.x * t.x + this.y * t.y
  946. }, t.prototype.len = function () {
  947. return Math.sqrt(this.x * this.x + this.y * this.y)
  948. }, t.prototype.lenSquare = function () {
  949. return this.x * this.x + this.y * this.y
  950. }, t.prototype.normalize = function () {
  951. var t = this.len();
  952. return this.x /= t, this.y /= t, this
  953. }, t.prototype.distance = function (t) {
  954. var e = this.x - t.x,
  955. n = this.y - t.y;
  956. return Math.sqrt(e * e + n * n)
  957. }, t.prototype.distanceSquare = function (t) {
  958. var e = this.x - t.x,
  959. n = this.y - t.y;
  960. return e * e + n * n
  961. }, t.prototype.negate = function () {
  962. return this.x = -this.x, this.y = -this.y, this
  963. }, t.prototype.transform = function (t) {
  964. if (t) {
  965. var e = this.x,
  966. n = this.y;
  967. return this.x = t[0] * e + t[2] * n + t[4], this.y = t[1] * e + t[3] * n + t[5], this
  968. }
  969. }, t.prototype.toArray = function (t) {
  970. return t[0] = this.x, t[1] = this.y, t
  971. }, t.prototype.fromArray = function (t) {
  972. this.x = t[0], this.y = t[1]
  973. }, t.set = function (t, e, n) {
  974. t.x = e, t.y = n
  975. }, t.copy = function (t, e) {
  976. t.x = e.x, t.y = e.y
  977. }, t.len = function (t) {
  978. return Math.sqrt(t.x * t.x + t.y * t.y)
  979. }, t.lenSquare = function (t) {
  980. return t.x * t.x + t.y * t.y
  981. }, t.dot = function (t, e) {
  982. return t.x * e.x + t.y * e.y
  983. }, t.add = function (t, e, n) {
  984. t.x = e.x + n.x, t.y = e.y + n.y
  985. }, t.sub = function (t, e, n) {
  986. t.x = e.x - n.x, t.y = e.y - n.y
  987. }, t.scale = function (t, e, n) {
  988. t.x = e.x * n, t.y = e.y * n
  989. }, t.scaleAndAdd = function (t, e, n, i) {
  990. t.x = e.x + n.x * i, t.y = e.y + n.y * i
  991. }, t.lerp = function (t, e, n, i) {
  992. var r = 1 - i;
  993. t.x = r * e.x + i * n.x, t.y = r * e.y + i * n.y
  994. }, t
  995. }(),
  996. Ae = Math.min,
  997. ke = Math.max,
  998. Le = new De,
  999. Pe = new De,
  1000. Oe = new De,
  1001. Re = new De,
  1002. Ne = new De,
  1003. Ee = new De,
  1004. ze = function () {
  1005. function t(t, e, n, i) {
  1006. n < 0 && (t += n, n = -n), i < 0 && (e += i, i = -i), this.x = t, this.y = e, this.width = n, this.height = i
  1007. }
  1008. return t.prototype.union = function (t) {
  1009. var e = Ae(t.x, this.x),
  1010. n = Ae(t.y, this.y);
  1011. isFinite(this.x) && isFinite(this.width) ? this.width = ke(t.x + t.width, this.x + this.width) - e : this.width = t.width, isFinite(this.y) && isFinite(this.height) ? this.height = ke(t.y + t.height, this.y + this.height) - n : this.height = t.height, this.x = e, this.y = n
  1012. }, t.prototype.applyTransform = function (e) {
  1013. t.applyTransform(this, this, e)
  1014. }, t.prototype.calculateTransform = function (t) {
  1015. var e = this,
  1016. n = t.width / e.width,
  1017. i = t.height / e.height,
  1018. r = [1, 0, 0, 1, 0, 0];
  1019. return we(r, r, [-e.x, -e.y]), Me(r, r, [n, i]), we(r, r, [t.x, t.y]), r
  1020. }, t.prototype.intersect = function (e, n) {
  1021. if (!e) return !1;
  1022. e instanceof t || (e = t.create(e));
  1023. var i = this,
  1024. r = i.x,
  1025. o = i.x + i.width,
  1026. a = i.y,
  1027. s = i.y + i.height,
  1028. l = e.x,
  1029. u = e.x + e.width,
  1030. h = e.y,
  1031. c = e.y + e.height,
  1032. p = !(o < l || u < r || s < h || c < a);
  1033. if (n) {
  1034. var d = 1 / 0,
  1035. f = 0,
  1036. g = Math.abs(o - l),
  1037. y = Math.abs(u - r),
  1038. v = Math.abs(s - h),
  1039. m = Math.abs(c - a),
  1040. x = Math.min(g, y),
  1041. _ = Math.min(v, m);
  1042. o < l || u < r ? x > f && (f = x, g < y ? De.set(Ee, -g, 0) : De.set(Ee, y, 0)) : x < d && (d = x, g < y ? De.set(Ne, g, 0) : De.set(Ne, -y, 0)), s < h || c < a ? _ > f && (f = _, v < m ? De.set(Ee, 0, -v) : De.set(Ee, 0, m)) : x < d && (d = x, v < m ? De.set(Ne, 0, v) : De.set(Ne, 0, -m))
  1043. }
  1044. return n && De.copy(n, p ? Ne : Ee), p
  1045. }, t.prototype.contain = function (t, e) {
  1046. var n = this;
  1047. return t >= n.x && t <= n.x + n.width && e >= n.y && e <= n.y + n.height
  1048. }, t.prototype.clone = function () {
  1049. return new t(this.x, this.y, this.width, this.height)
  1050. }, t.prototype.copy = function (e) {
  1051. t.copy(this, e)
  1052. }, t.prototype.plain = function () {
  1053. return {
  1054. x: this.x,
  1055. y: this.y,
  1056. width: this.width,
  1057. height: this.height
  1058. }
  1059. }, t.prototype.isFinite = function () {
  1060. return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height)
  1061. }, t.prototype.isZero = function () {
  1062. return 0 === this.width || 0 === this.height
  1063. }, t.create = function (e) {
  1064. return new t(e.x, e.y, e.width, e.height)
  1065. }, t.copy = function (t, e) {
  1066. t.x = e.x, t.y = e.y, t.width = e.width, t.height = e.height
  1067. }, t.applyTransform = function (e, n, i) {
  1068. if (i) {
  1069. if (i[1] < 1e-5 && i[1] > -1e-5 && i[2] < 1e-5 && i[2] > -1e-5) {
  1070. var r = i[0],
  1071. o = i[3],
  1072. a = i[4],
  1073. s = i[5];
  1074. return e.x = n.x * r + a, e.y = n.y * o + s, e.width = n.width * r, e.height = n.height * o, e.width < 0 && (e.x += e.width, e.width = -e.width), void(e.height < 0 && (e.y += e.height, e.height = -e.height))
  1075. }
  1076. Le.x = Oe.x = n.x, Le.y = Re.y = n.y, Pe.x = Re.x = n.x + n.width, Pe.y = Oe.y = n.y + n.height, Le.transform(i), Re.transform(i), Pe.transform(i), Oe.transform(i), e.x = Ae(Le.x, Pe.x, Oe.x, Re.x), e.y = Ae(Le.y, Pe.y, Oe.y, Re.y);
  1077. var l = ke(Le.x, Pe.x, Oe.x, Re.x),
  1078. u = ke(Le.y, Pe.y, Oe.y, Re.y);
  1079. e.width = l - e.x, e.height = u - e.y
  1080. } else e !== n && t.copy(e, n)
  1081. }, t
  1082. }(),
  1083. Ve = "silent";
  1084. function Be() {
  1085. de(this.event)
  1086. }
  1087. var Fe = function (t) {
  1088. function e() {
  1089. var e = null !== t && t.apply(this, arguments) || this;
  1090. return e.handler = null, e
  1091. }
  1092. return n(e, t), e.prototype.dispose = function () {}, e.prototype.setCursor = function () {}, e
  1093. }(jt),
  1094. Ge = function (t, e) {
  1095. this.x = t, this.y = e
  1096. },
  1097. We = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
  1098. He = new ze(0, 0, 0, 0),
  1099. Ye = function (t) {
  1100. function e(e, n, i, r, o) {
  1101. var a = t.call(this) || this;
  1102. return a._hovered = new Ge(0, 0), a.storage = e, a.painter = n, a.painterRoot = r, a._pointerSize = o, i = i || new Fe, a.proxy = null, a.setHandlerProxy(i), a._draggingMgr = new Zt(a), a
  1103. }
  1104. return n(e, t), e.prototype.setHandlerProxy = function (t) {
  1105. this.proxy && this.proxy.dispose(), t && (E(We, (function (e) {
  1106. t.on && t.on(e, this[e], this)
  1107. }), this), t.handler = this), this.proxy = t
  1108. }, e.prototype.mousemove = function (t) {
  1109. var e = t.zrX,
  1110. n = t.zrY,
  1111. i = Ze(this, e, n),
  1112. r = this._hovered,
  1113. o = r.target;
  1114. o && !o.__zr && (o = (r = this.findHover(r.x, r.y)).target);
  1115. var a = this._hovered = i ? new Ge(e, n) : this.findHover(e, n),
  1116. s = a.target,
  1117. l = this.proxy;
  1118. l.setCursor && l.setCursor(s ? s.cursor : "default"), o && s !== o && this.dispatchToElement(r, "mouseout", t), this.dispatchToElement(a, "mousemove", t), s && s !== o && this.dispatchToElement(a, "mouseover", t)
  1119. }, e.prototype.mouseout = function (t) {
  1120. var e = t.zrEventControl;
  1121. "only_globalout" !== e && this.dispatchToElement(this._hovered, "mouseout", t), "no_globalout" !== e && this.trigger("globalout", {
  1122. type: "globalout",
  1123. event: t
  1124. })
  1125. }, e.prototype.resize = function () {
  1126. this._hovered = new Ge(0, 0)
  1127. }, e.prototype.dispatch = function (t, e) {
  1128. var n = this[t];
  1129. n && n.call(this, e)
  1130. }, e.prototype.dispose = function () {
  1131. this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null
  1132. }, e.prototype.setCursorStyle = function (t) {
  1133. var e = this.proxy;
  1134. e.setCursor && e.setCursor(t)
  1135. }, e.prototype.dispatchToElement = function (t, e, n) {
  1136. var i = (t = t || {}).target;
  1137. if (!i || !i.silent) {
  1138. for (var r = "on" + e, o = function (t, e, n) {
  1139. return {
  1140. type: t,
  1141. event: n,
  1142. target: e.target,
  1143. topTarget: e.topTarget,
  1144. cancelBubble: !1,
  1145. offsetX: n.zrX,
  1146. offsetY: n.zrY,
  1147. gestureEvent: n.gestureEvent,
  1148. pinchX: n.pinchX,
  1149. pinchY: n.pinchY,
  1150. pinchScale: n.pinchScale,
  1151. wheelDelta: n.zrDelta,
  1152. zrByTouch: n.zrByTouch,
  1153. which: n.which,
  1154. stop: Be
  1155. }
  1156. }(e, t, n); i && (i[r] && (o.cancelBubble = !!i[r].call(i, o)), i.trigger(e, o), i = i.__hostTarget ? i.__hostTarget : i.parent, !o.cancelBubble););
  1157. o.cancelBubble || (this.trigger(e, o), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer((function (t) {
  1158. "function" == typeof t[r] && t[r].call(t, o), t.trigger && t.trigger(e, o)
  1159. })))
  1160. }
  1161. }, e.prototype.findHover = function (t, e, n) {
  1162. var i = this.storage.getDisplayList(),
  1163. r = new Ge(t, e);
  1164. if (Ue(i, r, t, e, n), this._pointerSize && !r.target) {
  1165. for (var o = [], a = this._pointerSize, s = a / 2, l = new ze(t - s, e - s, a, a), u = i.length - 1; u >= 0; u--) {
  1166. var h = i[u];
  1167. h === n || h.ignore || h.ignoreCoarsePointer || h.parent && h.parent.ignoreCoarsePointer || (He.copy(h.getBoundingRect()), h.transform && He.applyTransform(h.transform), He.intersect(l) && o.push(h))
  1168. }
  1169. if (o.length)
  1170. for (var c = Math.PI / 12, p = 2 * Math.PI, d = 0; d < s; d += 4)
  1171. for (var f = 0; f < p; f += c) {
  1172. if (Ue(o, r, t + d * Math.cos(f), e + d * Math.sin(f), n), r.target) return r
  1173. }
  1174. }
  1175. return r
  1176. }, e.prototype.processGesture = function (t, e) {
  1177. this._gestureMgr || (this._gestureMgr = new ge);
  1178. var n = this._gestureMgr;
  1179. "start" === e && n.clear();
  1180. var i = n.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom);
  1181. if ("end" === e && n.clear(), i) {
  1182. var r = i.type;
  1183. t.gestureEvent = r;
  1184. var o = new Ge;
  1185. o.target = i.target, this.dispatchToElement(o, r, i.event)
  1186. }
  1187. }, e
  1188. }(jt);
  1189. function Xe(t, e, n) {
  1190. if (t[t.rectHover ? "rectContain" : "contain"](e, n)) {
  1191. for (var i = t, r = void 0, o = !1; i;) {
  1192. if (i.ignoreClip && (o = !0), !o) {
  1193. var a = i.getClipPath();
  1194. if (a && !a.contain(e, n)) return !1;
  1195. i.silent && (r = !0)
  1196. }
  1197. var s = i.__hostTarget;
  1198. i = s || i.parent
  1199. }
  1200. return !r || Ve
  1201. }
  1202. return !1
  1203. }
  1204. function Ue(t, e, n, i, r) {
  1205. for (var o = t.length - 1; o >= 0; o--) {
  1206. var a = t[o],
  1207. s = void 0;
  1208. if (a !== r && !a.ignore && (s = Xe(a, n, i)) && (!e.topTarget && (e.topTarget = a), s !== Ve)) {
  1209. e.target = a;
  1210. break
  1211. }
  1212. }
  1213. }
  1214. function Ze(t, e, n) {
  1215. var i = t.painter;
  1216. return e < 0 || e > i.getWidth() || n < 0 || n > i.getHeight()
  1217. }
  1218. E(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], (function (t) {
  1219. Ye.prototype[t] = function (e) {
  1220. var n, i, r = e.zrX,
  1221. o = e.zrY,
  1222. a = Ze(this, r, o);
  1223. if ("mouseup" === t && a || (i = (n = this.findHover(r, o)).target), "mousedown" === t) this._downEl = i, this._downPoint = [e.zrX, e.zrY], this._upEl = i;
  1224. else if ("mouseup" === t) this._upEl = i;
  1225. else if ("click" === t) {
  1226. if (this._downEl !== this._upEl || !this._downPoint || Vt(this._downPoint, [e.zrX, e.zrY]) > 4) return;
  1227. this._downPoint = null
  1228. }
  1229. this.dispatchToElement(n, t, e)
  1230. }
  1231. }));
  1232. function je(t, e, n, i) {
  1233. var r = e + 1;
  1234. if (r === n) return 1;
  1235. if (i(t[r++], t[e]) < 0) {
  1236. for (; r < n && i(t[r], t[r - 1]) < 0;) r++;
  1237. ! function (t, e, n) {
  1238. n--;
  1239. for (; e < n;) {
  1240. var i = t[e];
  1241. t[e++] = t[n], t[n--] = i
  1242. }
  1243. }(t, e, r)
  1244. } else
  1245. for (; r < n && i(t[r], t[r - 1]) >= 0;) r++;
  1246. return r - e
  1247. }
  1248. function qe(t, e, n, i, r) {
  1249. for (i === e && i++; i < n; i++) {
  1250. for (var o, a = t[i], s = e, l = i; s < l;) r(a, t[o = s + l >>> 1]) < 0 ? l = o : s = o + 1;
  1251. var u = i - s;
  1252. switch (u) {
  1253. case 3:
  1254. t[s + 3] = t[s + 2];
  1255. case 2:
  1256. t[s + 2] = t[s + 1];
  1257. case 1:
  1258. t[s + 1] = t[s];
  1259. break;
  1260. default:
  1261. for (; u > 0;) t[s + u] = t[s + u - 1], u--
  1262. }
  1263. t[s] = a
  1264. }
  1265. }
  1266. function Ke(t, e, n, i, r, o) {
  1267. var a = 0,
  1268. s = 0,
  1269. l = 1;
  1270. if (o(t, e[n + r]) > 0) {
  1271. for (s = i - r; l < s && o(t, e[n + r + l]) > 0;) a = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  1272. l > s && (l = s), a += r, l += r
  1273. } else {
  1274. for (s = r + 1; l < s && o(t, e[n + r - l]) <= 0;) a = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  1275. l > s && (l = s);
  1276. var u = a;
  1277. a = r - l, l = r - u
  1278. }
  1279. for (a++; a < l;) {
  1280. var h = a + (l - a >>> 1);
  1281. o(t, e[n + h]) > 0 ? a = h + 1 : l = h
  1282. }
  1283. return l
  1284. }
  1285. function $e(t, e, n, i, r, o) {
  1286. var a = 0,
  1287. s = 0,
  1288. l = 1;
  1289. if (o(t, e[n + r]) < 0) {
  1290. for (s = r + 1; l < s && o(t, e[n + r - l]) < 0;) a = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  1291. l > s && (l = s);
  1292. var u = a;
  1293. a = r - l, l = r - u
  1294. } else {
  1295. for (s = i - r; l < s && o(t, e[n + r + l]) >= 0;) a = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  1296. l > s && (l = s), a += r, l += r
  1297. }
  1298. for (a++; a < l;) {
  1299. var h = a + (l - a >>> 1);
  1300. o(t, e[n + h]) < 0 ? l = h : a = h + 1
  1301. }
  1302. return l
  1303. }
  1304. function Je(t, e) {
  1305. var n, i, r = 7,
  1306. o = 0;
  1307. t.length;
  1308. var a = [];
  1309. function s(s) {
  1310. var l = n[s],
  1311. u = i[s],
  1312. h = n[s + 1],
  1313. c = i[s + 1];
  1314. i[s] = u + c, s === o - 3 && (n[s + 1] = n[s + 2], i[s + 1] = i[s + 2]), o--;
  1315. var p = $e(t[h], t, l, u, 0, e);
  1316. l += p, 0 !== (u -= p) && 0 !== (c = Ke(t[l + u - 1], t, h, c, c - 1, e)) && (u <= c ? function (n, i, o, s) {
  1317. var l = 0;
  1318. for (l = 0; l < i; l++) a[l] = t[n + l];
  1319. var u = 0,
  1320. h = o,
  1321. c = n;
  1322. if (t[c++] = t[h++], 0 == --s) {
  1323. for (l = 0; l < i; l++) t[c + l] = a[u + l];
  1324. return
  1325. }
  1326. if (1 === i) {
  1327. for (l = 0; l < s; l++) t[c + l] = t[h + l];
  1328. return void(t[c + s] = a[u])
  1329. }
  1330. var p, d, f, g = r;
  1331. for (;;) {
  1332. p = 0, d = 0, f = !1;
  1333. do {
  1334. if (e(t[h], a[u]) < 0) {
  1335. if (t[c++] = t[h++], d++, p = 0, 0 == --s) {
  1336. f = !0;
  1337. break
  1338. }
  1339. } else if (t[c++] = a[u++], p++, d = 0, 1 == --i) {
  1340. f = !0;
  1341. break
  1342. }
  1343. } while ((p | d) < g);
  1344. if (f) break;
  1345. do {
  1346. if (0 !== (p = $e(t[h], a, u, i, 0, e))) {
  1347. for (l = 0; l < p; l++) t[c + l] = a[u + l];
  1348. if (c += p, u += p, (i -= p) <= 1) {
  1349. f = !0;
  1350. break
  1351. }
  1352. }
  1353. if (t[c++] = t[h++], 0 == --s) {
  1354. f = !0;
  1355. break
  1356. }
  1357. if (0 !== (d = Ke(a[u], t, h, s, 0, e))) {
  1358. for (l = 0; l < d; l++) t[c + l] = t[h + l];
  1359. if (c += d, h += d, 0 === (s -= d)) {
  1360. f = !0;
  1361. break
  1362. }
  1363. }
  1364. if (t[c++] = a[u++], 1 == --i) {
  1365. f = !0;
  1366. break
  1367. }
  1368. g--
  1369. } while (p >= 7 || d >= 7);
  1370. if (f) break;
  1371. g < 0 && (g = 0), g += 2
  1372. }
  1373. if ((r = g) < 1 && (r = 1), 1 === i) {
  1374. for (l = 0; l < s; l++) t[c + l] = t[h + l];
  1375. t[c + s] = a[u]
  1376. } else {
  1377. if (0 === i) throw new Error;
  1378. for (l = 0; l < i; l++) t[c + l] = a[u + l]
  1379. }
  1380. }(l, u, h, c) : function (n, i, o, s) {
  1381. var l = 0;
  1382. for (l = 0; l < s; l++) a[l] = t[o + l];
  1383. var u = n + i - 1,
  1384. h = s - 1,
  1385. c = o + s - 1,
  1386. p = 0,
  1387. d = 0;
  1388. if (t[c--] = t[u--], 0 == --i) {
  1389. for (p = c - (s - 1), l = 0; l < s; l++) t[p + l] = a[l];
  1390. return
  1391. }
  1392. if (1 === s) {
  1393. for (d = (c -= i) + 1, p = (u -= i) + 1, l = i - 1; l >= 0; l--) t[d + l] = t[p + l];
  1394. return void(t[c] = a[h])
  1395. }
  1396. var f = r;
  1397. for (;;) {
  1398. var g = 0,
  1399. y = 0,
  1400. v = !1;
  1401. do {
  1402. if (e(a[h], t[u]) < 0) {
  1403. if (t[c--] = t[u--], g++, y = 0, 0 == --i) {
  1404. v = !0;
  1405. break
  1406. }
  1407. } else if (t[c--] = a[h--], y++, g = 0, 1 == --s) {
  1408. v = !0;
  1409. break
  1410. }
  1411. } while ((g | y) < f);
  1412. if (v) break;
  1413. do {
  1414. if (0 !== (g = i - $e(a[h], t, n, i, i - 1, e))) {
  1415. for (i -= g, d = (c -= g) + 1, p = (u -= g) + 1, l = g - 1; l >= 0; l--) t[d + l] = t[p + l];
  1416. if (0 === i) {
  1417. v = !0;
  1418. break
  1419. }
  1420. }
  1421. if (t[c--] = a[h--], 1 == --s) {
  1422. v = !0;
  1423. break
  1424. }
  1425. if (0 !== (y = s - Ke(t[u], a, 0, s, s - 1, e))) {
  1426. for (s -= y, d = (c -= y) + 1, p = (h -= y) + 1, l = 0; l < y; l++) t[d + l] = a[p + l];
  1427. if (s <= 1) {
  1428. v = !0;
  1429. break
  1430. }
  1431. }
  1432. if (t[c--] = t[u--], 0 == --i) {
  1433. v = !0;
  1434. break
  1435. }
  1436. f--
  1437. } while (g >= 7 || y >= 7);
  1438. if (v) break;
  1439. f < 0 && (f = 0), f += 2
  1440. }(r = f) < 1 && (r = 1);
  1441. if (1 === s) {
  1442. for (d = (c -= i) + 1, p = (u -= i) + 1, l = i - 1; l >= 0; l--) t[d + l] = t[p + l];
  1443. t[c] = a[h]
  1444. } else {
  1445. if (0 === s) throw new Error;
  1446. for (p = c - (s - 1), l = 0; l < s; l++) t[p + l] = a[l]
  1447. }
  1448. }(l, u, h, c))
  1449. }
  1450. return n = [], i = [], {
  1451. mergeRuns: function () {
  1452. for (; o > 1;) {
  1453. var t = o - 2;
  1454. if (t >= 1 && i[t - 1] <= i[t] + i[t + 1] || t >= 2 && i[t - 2] <= i[t] + i[t - 1]) i[t - 1] < i[t + 1] && t--;
  1455. else if (i[t] > i[t + 1]) break;
  1456. s(t)
  1457. }
  1458. },
  1459. forceMergeRuns: function () {
  1460. for (; o > 1;) {
  1461. var t = o - 2;
  1462. t > 0 && i[t - 1] < i[t + 1] && t--, s(t)
  1463. }
  1464. },
  1465. pushRun: function (t, e) {
  1466. n[o] = t, i[o] = e, o += 1
  1467. }
  1468. }
  1469. }
  1470. function Qe(t, e, n, i) {
  1471. n || (n = 0), i || (i = t.length);
  1472. var r = i - n;
  1473. if (!(r < 2)) {
  1474. var o = 0;
  1475. if (r < 32) qe(t, n, i, n + (o = je(t, n, i, e)), e);
  1476. else {
  1477. var a = Je(t, e),
  1478. s = function (t) {
  1479. for (var e = 0; t >= 32;) e |= 1 & t, t >>= 1;
  1480. return t + e
  1481. }(r);
  1482. do {
  1483. if ((o = je(t, n, i, e)) < s) {
  1484. var l = r;
  1485. l > s && (l = s), qe(t, n, n + l, n + o, e), o = l
  1486. }
  1487. a.pushRun(n, o), a.mergeRuns(), r -= o, n += o
  1488. } while (0 !== r);
  1489. a.forceMergeRuns()
  1490. }
  1491. }
  1492. }
  1493. var tn = !1;
  1494. function en() {
  1495. tn || (tn = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))
  1496. }
  1497. function nn(t, e) {
  1498. return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel
  1499. }
  1500. var rn = function () {
  1501. function t() {
  1502. this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = nn
  1503. }
  1504. return t.prototype.traverse = function (t, e) {
  1505. for (var n = 0; n < this._roots.length; n++) this._roots[n].traverse(t, e)
  1506. }, t.prototype.getDisplayList = function (t, e) {
  1507. e = e || !1;
  1508. var n = this._displayList;
  1509. return !t && n.length || this.updateDisplayList(e), n
  1510. }, t.prototype.updateDisplayList = function (t) {
  1511. this._displayListLen = 0;
  1512. for (var e = this._roots, n = this._displayList, i = 0, r = e.length; i < r; i++) this._updateAndAddDisplayable(e[i], null, t);
  1513. n.length = this._displayListLen, Qe(n, nn)
  1514. }, t.prototype._updateAndAddDisplayable = function (t, e, n) {
  1515. if (!t.ignore || n) {
  1516. t.beforeUpdate(), t.update(), t.afterUpdate();
  1517. var i = t.getClipPath();
  1518. if (t.ignoreClip) e = null;
  1519. else if (i) {
  1520. e = e ? e.slice() : [];
  1521. for (var r = i, o = t; r;) r.parent = o, r.updateTransform(), e.push(r), o = r, r = r.getClipPath()
  1522. }
  1523. if (t.childrenRef) {
  1524. for (var a = t.childrenRef(), s = 0; s < a.length; s++) {
  1525. var l = a[s];
  1526. t.__dirty && (l.__dirty |= 1), this._updateAndAddDisplayable(l, e, n)
  1527. }
  1528. t.__dirty = 0
  1529. } else {
  1530. var u = t;
  1531. e && e.length ? u.__clipPaths = e : u.__clipPaths && u.__clipPaths.length > 0 && (u.__clipPaths = []), isNaN(u.z) && (en(), u.z = 0), isNaN(u.z2) && (en(), u.z2 = 0), isNaN(u.zlevel) && (en(), u.zlevel = 0), this._displayList[this._displayListLen++] = u
  1532. }
  1533. var h = t.getDecalElement && t.getDecalElement();
  1534. h && this._updateAndAddDisplayable(h, e, n);
  1535. var c = t.getTextGuideLine();
  1536. c && this._updateAndAddDisplayable(c, e, n);
  1537. var p = t.getTextContent();
  1538. p && this._updateAndAddDisplayable(p, e, n)
  1539. }
  1540. }, t.prototype.addRoot = function (t) {
  1541. t.__zr && t.__zr.storage === this || this._roots.push(t)
  1542. }, t.prototype.delRoot = function (t) {
  1543. if (t instanceof Array)
  1544. for (var e = 0, n = t.length; e < n; e++) this.delRoot(t[e]);
  1545. else {
  1546. var i = P(this._roots, t);
  1547. i >= 0 && this._roots.splice(i, 1)
  1548. }
  1549. }, t.prototype.delAllRoots = function () {
  1550. this._roots = [], this._displayList = [], this._displayListLen = 0
  1551. }, t.prototype.getRoots = function () {
  1552. return this._roots
  1553. }, t.prototype.dispose = function () {
  1554. this._displayList = null, this._roots = null
  1555. }, t
  1556. }(),
  1557. on = r.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function (t) {
  1558. return setTimeout(t, 16)
  1559. },
  1560. an = {
  1561. linear: function (t) {
  1562. return t
  1563. },
  1564. quadraticIn: function (t) {
  1565. return t * t
  1566. },
  1567. quadraticOut: function (t) {
  1568. return t * (2 - t)
  1569. },
  1570. quadraticInOut: function (t) {
  1571. return (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1)
  1572. },
  1573. cubicIn: function (t) {
  1574. return t * t * t
  1575. },
  1576. cubicOut: function (t) {
  1577. return --t * t * t + 1
  1578. },
  1579. cubicInOut: function (t) {
  1580. return (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2)
  1581. },
  1582. quarticIn: function (t) {
  1583. return t * t * t * t
  1584. },
  1585. quarticOut: function (t) {
  1586. return 1 - --t * t * t * t
  1587. },
  1588. quarticInOut: function (t) {
  1589. return (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2)
  1590. },
  1591. quinticIn: function (t) {
  1592. return t * t * t * t * t
  1593. },
  1594. quinticOut: function (t) {
  1595. return --t * t * t * t * t + 1
  1596. },
  1597. quinticInOut: function (t) {
  1598. return (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2)
  1599. },
  1600. sinusoidalIn: function (t) {
  1601. return 1 - Math.cos(t * Math.PI / 2)
  1602. },
  1603. sinusoidalOut: function (t) {
  1604. return Math.sin(t * Math.PI / 2)
  1605. },
  1606. sinusoidalInOut: function (t) {
  1607. return .5 * (1 - Math.cos(Math.PI * t))
  1608. },
  1609. exponentialIn: function (t) {
  1610. return 0 === t ? 0 : Math.pow(1024, t - 1)
  1611. },
  1612. exponentialOut: function (t) {
  1613. return 1 === t ? 1 : 1 - Math.pow(2, -10 * t)
  1614. },
  1615. exponentialInOut: function (t) {
  1616. return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * Math.pow(1024, t - 1) : .5 * (2 - Math.pow(2, -10 * (t - 1)))
  1617. },
  1618. circularIn: function (t) {
  1619. return 1 - Math.sqrt(1 - t * t)
  1620. },
  1621. circularOut: function (t) {
  1622. return Math.sqrt(1 - --t * t)
  1623. },
  1624. circularInOut: function (t) {
  1625. return (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1)
  1626. },
  1627. elasticIn: function (t) {
  1628. var e, n = .1;
  1629. return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1, e = .1) : e = .4 * Math.asin(1 / n) / (2 * Math.PI), -n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4))
  1630. },
  1631. elasticOut: function (t) {
  1632. var e, n = .1;
  1633. return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1, e = .1) : e = .4 * Math.asin(1 / n) / (2 * Math.PI), n * Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / .4) + 1)
  1634. },
  1635. elasticInOut: function (t) {
  1636. var e, n = .1,
  1637. i = .4;
  1638. return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1, e = .1) : e = i * Math.asin(1 / n) / (2 * Math.PI), (t *= 2) < 1 ? n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / i) * -.5 : n * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / i) * .5 + 1)
  1639. },
  1640. backIn: function (t) {
  1641. var e = 1.70158;
  1642. return t * t * ((e + 1) * t - e)
  1643. },
  1644. backOut: function (t) {
  1645. var e = 1.70158;
  1646. return --t * t * ((e + 1) * t + e) + 1
  1647. },
  1648. backInOut: function (t) {
  1649. var e = 2.5949095;
  1650. return (t *= 2) < 1 ? t * t * ((e + 1) * t - e) * .5 : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2)
  1651. },
  1652. bounceIn: function (t) {
  1653. return 1 - an.bounceOut(1 - t)
  1654. },
  1655. bounceOut: function (t) {
  1656. return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375
  1657. },
  1658. bounceInOut: function (t) {
  1659. return t < .5 ? .5 * an.bounceIn(2 * t) : .5 * an.bounceOut(2 * t - 1) + .5
  1660. }
  1661. },
  1662. sn = Math.pow,
  1663. ln = Math.sqrt,
  1664. un = 1e-8,
  1665. hn = 1e-4,
  1666. cn = ln(3),
  1667. pn = 1 / 3,
  1668. dn = Mt(),
  1669. fn = Mt(),
  1670. gn = Mt();
  1671. function yn(t) {
  1672. return t > -1e-8 && t < un
  1673. }
  1674. function vn(t) {
  1675. return t > un || t < -1e-8
  1676. }
  1677. function mn(t, e, n, i, r) {
  1678. var o = 1 - r;
  1679. return o * o * (o * t + 3 * r * e) + r * r * (r * i + 3 * o * n)
  1680. }
  1681. function xn(t, e, n, i, r) {
  1682. var o = 1 - r;
  1683. return 3 * (((e - t) * o + 2 * (n - e) * r) * o + (i - n) * r * r)
  1684. }
  1685. function _n(t, e, n, i, r, o) {
  1686. var a = i + 3 * (e - n) - t,
  1687. s = 3 * (n - 2 * e + t),
  1688. l = 3 * (e - t),
  1689. u = t - r,
  1690. h = s * s - 3 * a * l,
  1691. c = s * l - 9 * a * u,
  1692. p = l * l - 3 * s * u,
  1693. d = 0;
  1694. if (yn(h) && yn(c)) {
  1695. if (yn(s)) o[0] = 0;
  1696. else(M = -l / s) >= 0 && M <= 1 && (o[d++] = M)
  1697. } else {
  1698. var f = c * c - 4 * h * p;
  1699. if (yn(f)) {
  1700. var g = c / h,
  1701. y = -g / 2;
  1702. (M = -s / a + g) >= 0 && M <= 1 && (o[d++] = M), y >= 0 && y <= 1 && (o[d++] = y)
  1703. } else if (f > 0) {
  1704. var v = ln(f),
  1705. m = h * s + 1.5 * a * (-c + v),
  1706. x = h * s + 1.5 * a * (-c - v);
  1707. (M = (-s - ((m = m < 0 ? -sn(-m, pn) : sn(m, pn)) + (x = x < 0 ? -sn(-x, pn) : sn(x, pn)))) / (3 * a)) >= 0 && M <= 1 && (o[d++] = M)
  1708. } else {
  1709. var _ = (2 * h * s - 3 * a * c) / (2 * ln(h * h * h)),
  1710. b = Math.acos(_) / 3,
  1711. w = ln(h),
  1712. S = Math.cos(b),
  1713. M = (-s - 2 * w * S) / (3 * a),
  1714. I = (y = (-s + w * (S + cn * Math.sin(b))) / (3 * a), (-s + w * (S - cn * Math.sin(b))) / (3 * a));
  1715. M >= 0 && M <= 1 && (o[d++] = M), y >= 0 && y <= 1 && (o[d++] = y), I >= 0 && I <= 1 && (o[d++] = I)
  1716. }
  1717. }
  1718. return d
  1719. }
  1720. function bn(t, e, n, i, r) {
  1721. var o = 6 * n - 12 * e + 6 * t,
  1722. a = 9 * e + 3 * i - 3 * t - 9 * n,
  1723. s = 3 * e - 3 * t,
  1724. l = 0;
  1725. if (yn(a)) {
  1726. if (vn(o))(h = -s / o) >= 0 && h <= 1 && (r[l++] = h)
  1727. } else {
  1728. var u = o * o - 4 * a * s;
  1729. if (yn(u)) r[0] = -o / (2 * a);
  1730. else if (u > 0) {
  1731. var h, c = ln(u),
  1732. p = (-o - c) / (2 * a);
  1733. (h = (-o + c) / (2 * a)) >= 0 && h <= 1 && (r[l++] = h), p >= 0 && p <= 1 && (r[l++] = p)
  1734. }
  1735. }
  1736. return l
  1737. }
  1738. function wn(t, e, n, i, r, o) {
  1739. var a = (e - t) * r + t,
  1740. s = (n - e) * r + e,
  1741. l = (i - n) * r + n,
  1742. u = (s - a) * r + a,
  1743. h = (l - s) * r + s,
  1744. c = (h - u) * r + u;
  1745. o[0] = t, o[1] = a, o[2] = u, o[3] = c, o[4] = c, o[5] = h, o[6] = l, o[7] = i
  1746. }
  1747. function Sn(t, e, n, i, r, o, a, s, l, u, h) {
  1748. var c, p, d, f, g, y = .005,
  1749. v = 1 / 0;
  1750. dn[0] = l, dn[1] = u;
  1751. for (var m = 0; m < 1; m += .05) fn[0] = mn(t, n, r, a, m), fn[1] = mn(e, i, o, s, m), (f = Ft(dn, fn)) < v && (c = m, v = f);
  1752. v = 1 / 0;
  1753. for (var x = 0; x < 32 && !(y < hn); x++) p = c - y, d = c + y, fn[0] = mn(t, n, r, a, p), fn[1] = mn(e, i, o, s, p), f = Ft(fn, dn), p >= 0 && f < v ? (c = p, v = f) : (gn[0] = mn(t, n, r, a, d), gn[1] = mn(e, i, o, s, d), g = Ft(gn, dn), d <= 1 && g < v ? (c = d, v = g) : y *= .5);
  1754. return h && (h[0] = mn(t, n, r, a, c), h[1] = mn(e, i, o, s, c)), ln(v)
  1755. }
  1756. function Mn(t, e, n, i, r, o, a, s, l) {
  1757. for (var u = t, h = e, c = 0, p = 1 / l, d = 1; d <= l; d++) {
  1758. var f = d * p,
  1759. g = mn(t, n, r, a, f),
  1760. y = mn(e, i, o, s, f),
  1761. v = g - u,
  1762. m = y - h;
  1763. c += Math.sqrt(v * v + m * m), u = g, h = y
  1764. }
  1765. return c
  1766. }
  1767. function In(t, e, n, i) {
  1768. var r = 1 - i;
  1769. return r * (r * t + 2 * i * e) + i * i * n
  1770. }
  1771. function Tn(t, e, n, i) {
  1772. return 2 * ((1 - i) * (e - t) + i * (n - e))
  1773. }
  1774. function Cn(t, e, n) {
  1775. var i = t + n - 2 * e;
  1776. return 0 === i ? .5 : (t - e) / i
  1777. }
  1778. function Dn(t, e, n, i, r) {
  1779. var o = (e - t) * i + t,
  1780. a = (n - e) * i + e,
  1781. s = (a - o) * i + o;
  1782. r[0] = t, r[1] = o, r[2] = s, r[3] = s, r[4] = a, r[5] = n
  1783. }
  1784. function An(t, e, n, i, r, o, a, s, l) {
  1785. var u, h = .005,
  1786. c = 1 / 0;
  1787. dn[0] = a, dn[1] = s;
  1788. for (var p = 0; p < 1; p += .05) {
  1789. fn[0] = In(t, n, r, p), fn[1] = In(e, i, o, p), (y = Ft(dn, fn)) < c && (u = p, c = y)
  1790. }
  1791. c = 1 / 0;
  1792. for (var d = 0; d < 32 && !(h < hn); d++) {
  1793. var f = u - h,
  1794. g = u + h;
  1795. fn[0] = In(t, n, r, f), fn[1] = In(e, i, o, f);
  1796. var y = Ft(fn, dn);
  1797. if (f >= 0 && y < c) u = f, c = y;
  1798. else {
  1799. gn[0] = In(t, n, r, g), gn[1] = In(e, i, o, g);
  1800. var v = Ft(gn, dn);
  1801. g <= 1 && v < c ? (u = g, c = v) : h *= .5
  1802. }
  1803. }
  1804. return l && (l[0] = In(t, n, r, u), l[1] = In(e, i, o, u)), ln(c)
  1805. }
  1806. function kn(t, e, n, i, r, o, a) {
  1807. for (var s = t, l = e, u = 0, h = 1 / a, c = 1; c <= a; c++) {
  1808. var p = c * h,
  1809. d = In(t, n, r, p),
  1810. f = In(e, i, o, p),
  1811. g = d - s,
  1812. y = f - l;
  1813. u += Math.sqrt(g * g + y * y), s = d, l = f
  1814. }
  1815. return u
  1816. }
  1817. var Ln = /cubic-bezier\(([0-9,\.e ]+)\)/;
  1818. function Pn(t) {
  1819. var e = t && Ln.exec(t);
  1820. if (e) {
  1821. var n = e[1].split(","),
  1822. i = +ut(n[0]),
  1823. r = +ut(n[1]),
  1824. o = +ut(n[2]),
  1825. a = +ut(n[3]);
  1826. if (isNaN(i + r + o + a)) return;
  1827. var s = [];
  1828. return function (t) {
  1829. return t <= 0 ? 0 : t >= 1 ? 1 : _n(0, i, o, 1, t, s) && mn(0, r, a, 1, s[0])
  1830. }
  1831. }
  1832. }
  1833. var On = function () {
  1834. function t(t) {
  1835. this._inited = !1, this._startTime = 0, this._pausedTime = 0, this._paused = !1, this._life = t.life || 1e3, this._delay = t.delay || 0, this.loop = t.loop || !1, this.onframe = t.onframe || bt, this.ondestroy = t.ondestroy || bt, this.onrestart = t.onrestart || bt, t.easing && this.setEasing(t.easing)
  1836. }
  1837. return t.prototype.step = function (t, e) {
  1838. if (this._inited || (this._startTime = t + this._delay, this._inited = !0), !this._paused) {
  1839. var n = this._life,
  1840. i = t - this._startTime - this._pausedTime,
  1841. r = i / n;
  1842. r < 0 && (r = 0), r = Math.min(r, 1);
  1843. var o = this.easingFunc,
  1844. a = o ? o(r) : r;
  1845. if (this.onframe(a), 1 === r) {
  1846. if (!this.loop) return !0;
  1847. var s = i % n;
  1848. this._startTime = t - s, this._pausedTime = 0, this.onrestart()
  1849. }
  1850. return !1
  1851. }
  1852. this._pausedTime += e
  1853. }, t.prototype.pause = function () {
  1854. this._paused = !0
  1855. }, t.prototype.resume = function () {
  1856. this._paused = !1
  1857. }, t.prototype.setEasing = function (t) {
  1858. this.easing = t, this.easingFunc = X(t) ? t : an[t] || Pn(t)
  1859. }, t
  1860. }(),
  1861. Rn = function (t) {
  1862. this.value = t
  1863. },
  1864. Nn = function () {
  1865. function t() {
  1866. this._len = 0
  1867. }
  1868. return t.prototype.insert = function (t) {
  1869. var e = new Rn(t);
  1870. return this.insertEntry(e), e
  1871. }, t.prototype.insertEntry = function (t) {
  1872. this.head ? (this.tail.next = t, t.prev = this.tail, t.next = null, this.tail = t) : this.head = this.tail = t, this._len++
  1873. }, t.prototype.remove = function (t) {
  1874. var e = t.prev,
  1875. n = t.next;
  1876. e ? e.next = n : this.head = n, n ? n.prev = e : this.tail = e, t.next = t.prev = null, this._len--
  1877. }, t.prototype.len = function () {
  1878. return this._len
  1879. }, t.prototype.clear = function () {
  1880. this.head = this.tail = null, this._len = 0
  1881. }, t
  1882. }(),
  1883. En = function () {
  1884. function t(t) {
  1885. this._list = new Nn, this._maxSize = 10, this._map = {}, this._maxSize = t
  1886. }
  1887. return t.prototype.put = function (t, e) {
  1888. var n = this._list,
  1889. i = this._map,
  1890. r = null;
  1891. if (null == i[t]) {
  1892. var o = n.len(),
  1893. a = this._lastRemovedEntry;
  1894. if (o >= this._maxSize && o > 0) {
  1895. var s = n.head;
  1896. n.remove(s), delete i[s.key], r = s.value, this._lastRemovedEntry = s
  1897. }
  1898. a ? a.value = e : a = new Rn(e), a.key = t, n.insertEntry(a), i[t] = a
  1899. }
  1900. return r
  1901. }, t.prototype.get = function (t) {
  1902. var e = this._map[t],
  1903. n = this._list;
  1904. if (null != e) return e !== n.tail && (n.remove(e), n.insertEntry(e)), e.value
  1905. }, t.prototype.clear = function () {
  1906. this._list.clear(), this._map = {}
  1907. }, t.prototype.len = function () {
  1908. return this._list.len()
  1909. }, t
  1910. }(),
  1911. zn = {
  1912. transparent: [0, 0, 0, 0],
  1913. aliceblue: [240, 248, 255, 1],
  1914. antiquewhite: [250, 235, 215, 1],
  1915. aqua: [0, 255, 255, 1],
  1916. aquamarine: [127, 255, 212, 1],
  1917. azure: [240, 255, 255, 1],
  1918. beige: [245, 245, 220, 1],
  1919. bisque: [255, 228, 196, 1],
  1920. black: [0, 0, 0, 1],
  1921. blanchedalmond: [255, 235, 205, 1],
  1922. blue: [0, 0, 255, 1],
  1923. blueviolet: [138, 43, 226, 1],
  1924. brown: [165, 42, 42, 1],
  1925. burlywood: [222, 184, 135, 1],
  1926. cadetblue: [95, 158, 160, 1],
  1927. chartreuse: [127, 255, 0, 1],
  1928. chocolate: [210, 105, 30, 1],
  1929. coral: [255, 127, 80, 1],
  1930. cornflowerblue: [100, 149, 237, 1],
  1931. cornsilk: [255, 248, 220, 1],
  1932. crimson: [220, 20, 60, 1],
  1933. cyan: [0, 255, 255, 1],
  1934. darkblue: [0, 0, 139, 1],
  1935. darkcyan: [0, 139, 139, 1],
  1936. darkgoldenrod: [184, 134, 11, 1],
  1937. darkgray: [169, 169, 169, 1],
  1938. darkgreen: [0, 100, 0, 1],
  1939. darkgrey: [169, 169, 169, 1],
  1940. darkkhaki: [189, 183, 107, 1],
  1941. darkmagenta: [139, 0, 139, 1],
  1942. darkolivegreen: [85, 107, 47, 1],
  1943. darkorange: [255, 140, 0, 1],
  1944. darkorchid: [153, 50, 204, 1],
  1945. darkred: [139, 0, 0, 1],
  1946. darksalmon: [233, 150, 122, 1],
  1947. darkseagreen: [143, 188, 143, 1],
  1948. darkslateblue: [72, 61, 139, 1],
  1949. darkslategray: [47, 79, 79, 1],
  1950. darkslategrey: [47, 79, 79, 1],
  1951. darkturquoise: [0, 206, 209, 1],
  1952. darkviolet: [148, 0, 211, 1],
  1953. deeppink: [255, 20, 147, 1],
  1954. deepskyblue: [0, 191, 255, 1],
  1955. dimgray: [105, 105, 105, 1],
  1956. dimgrey: [105, 105, 105, 1],
  1957. dodgerblue: [30, 144, 255, 1],
  1958. firebrick: [178, 34, 34, 1],
  1959. floralwhite: [255, 250, 240, 1],
  1960. forestgreen: [34, 139, 34, 1],
  1961. fuchsia: [255, 0, 255, 1],
  1962. gainsboro: [220, 220, 220, 1],
  1963. ghostwhite: [248, 248, 255, 1],
  1964. gold: [255, 215, 0, 1],
  1965. goldenrod: [218, 165, 32, 1],
  1966. gray: [128, 128, 128, 1],
  1967. green: [0, 128, 0, 1],
  1968. greenyellow: [173, 255, 47, 1],
  1969. grey: [128, 128, 128, 1],
  1970. honeydew: [240, 255, 240, 1],
  1971. hotpink: [255, 105, 180, 1],
  1972. indianred: [205, 92, 92, 1],
  1973. indigo: [75, 0, 130, 1],
  1974. ivory: [255, 255, 240, 1],
  1975. khaki: [240, 230, 140, 1],
  1976. lavender: [230, 230, 250, 1],
  1977. lavenderblush: [255, 240, 245, 1],
  1978. lawngreen: [124, 252, 0, 1],
  1979. lemonchiffon: [255, 250, 205, 1],
  1980. lightblue: [173, 216, 230, 1],
  1981. lightcoral: [240, 128, 128, 1],
  1982. lightcyan: [224, 255, 255, 1],
  1983. lightgoldenrodyellow: [250, 250, 210, 1],
  1984. lightgray: [211, 211, 211, 1],
  1985. lightgreen: [144, 238, 144, 1],
  1986. lightgrey: [211, 211, 211, 1],
  1987. lightpink: [255, 182, 193, 1],
  1988. lightsalmon: [255, 160, 122, 1],
  1989. lightseagreen: [32, 178, 170, 1],
  1990. lightskyblue: [135, 206, 250, 1],
  1991. lightslategray: [119, 136, 153, 1],
  1992. lightslategrey: [119, 136, 153, 1],
  1993. lightsteelblue: [176, 196, 222, 1],
  1994. lightyellow: [255, 255, 224, 1],
  1995. lime: [0, 255, 0, 1],
  1996. limegreen: [50, 205, 50, 1],
  1997. linen: [250, 240, 230, 1],
  1998. magenta: [255, 0, 255, 1],
  1999. maroon: [128, 0, 0, 1],
  2000. mediumaquamarine: [102, 205, 170, 1],
  2001. mediumblue: [0, 0, 205, 1],
  2002. mediumorchid: [186, 85, 211, 1],
  2003. mediumpurple: [147, 112, 219, 1],
  2004. mediumseagreen: [60, 179, 113, 1],
  2005. mediumslateblue: [123, 104, 238, 1],
  2006. mediumspringgreen: [0, 250, 154, 1],
  2007. mediumturquoise: [72, 209, 204, 1],
  2008. mediumvioletred: [199, 21, 133, 1],
  2009. midnightblue: [25, 25, 112, 1],
  2010. mintcream: [245, 255, 250, 1],
  2011. mistyrose: [255, 228, 225, 1],
  2012. moccasin: [255, 228, 181, 1],
  2013. navajowhite: [255, 222, 173, 1],
  2014. navy: [0, 0, 128, 1],
  2015. oldlace: [253, 245, 230, 1],
  2016. olive: [128, 128, 0, 1],
  2017. olivedrab: [107, 142, 35, 1],
  2018. orange: [255, 165, 0, 1],
  2019. orangered: [255, 69, 0, 1],
  2020. orchid: [218, 112, 214, 1],
  2021. palegoldenrod: [238, 232, 170, 1],
  2022. palegreen: [152, 251, 152, 1],
  2023. paleturquoise: [175, 238, 238, 1],
  2024. palevioletred: [219, 112, 147, 1],
  2025. papayawhip: [255, 239, 213, 1],
  2026. peachpuff: [255, 218, 185, 1],
  2027. peru: [205, 133, 63, 1],
  2028. pink: [255, 192, 203, 1],
  2029. plum: [221, 160, 221, 1],
  2030. powderblue: [176, 224, 230, 1],
  2031. purple: [128, 0, 128, 1],
  2032. red: [255, 0, 0, 1],
  2033. rosybrown: [188, 143, 143, 1],
  2034. royalblue: [65, 105, 225, 1],
  2035. saddlebrown: [139, 69, 19, 1],
  2036. salmon: [250, 128, 114, 1],
  2037. sandybrown: [244, 164, 96, 1],
  2038. seagreen: [46, 139, 87, 1],
  2039. seashell: [255, 245, 238, 1],
  2040. sienna: [160, 82, 45, 1],
  2041. silver: [192, 192, 192, 1],
  2042. skyblue: [135, 206, 235, 1],
  2043. slateblue: [106, 90, 205, 1],
  2044. slategray: [112, 128, 144, 1],
  2045. slategrey: [112, 128, 144, 1],
  2046. snow: [255, 250, 250, 1],
  2047. springgreen: [0, 255, 127, 1],
  2048. steelblue: [70, 130, 180, 1],
  2049. tan: [210, 180, 140, 1],
  2050. teal: [0, 128, 128, 1],
  2051. thistle: [216, 191, 216, 1],
  2052. tomato: [255, 99, 71, 1],
  2053. turquoise: [64, 224, 208, 1],
  2054. violet: [238, 130, 238, 1],
  2055. wheat: [245, 222, 179, 1],
  2056. white: [255, 255, 255, 1],
  2057. whitesmoke: [245, 245, 245, 1],
  2058. yellow: [255, 255, 0, 1],
  2059. yellowgreen: [154, 205, 50, 1]
  2060. };
  2061. function Vn(t) {
  2062. return (t = Math.round(t)) < 0 ? 0 : t > 255 ? 255 : t
  2063. }
  2064. function Bn(t) {
  2065. return t < 0 ? 0 : t > 1 ? 1 : t
  2066. }
  2067. function Fn(t) {
  2068. var e = t;
  2069. return e.length && "%" === e.charAt(e.length - 1) ? Vn(parseFloat(e) / 100 * 255) : Vn(parseInt(e, 10))
  2070. }
  2071. function Gn(t) {
  2072. var e = t;
  2073. return e.length && "%" === e.charAt(e.length - 1) ? Bn(parseFloat(e) / 100) : Bn(parseFloat(e))
  2074. }
  2075. function Wn(t, e, n) {
  2076. return n < 0 ? n += 1 : n > 1 && (n -= 1), 6 * n < 1 ? t + (e - t) * n * 6 : 2 * n < 1 ? e : 3 * n < 2 ? t + (e - t) * (2 / 3 - n) * 6 : t
  2077. }
  2078. function Hn(t, e, n) {
  2079. return t + (e - t) * n
  2080. }
  2081. function Yn(t, e, n, i, r) {
  2082. return t[0] = e, t[1] = n, t[2] = i, t[3] = r, t
  2083. }
  2084. function Xn(t, e) {
  2085. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t
  2086. }
  2087. var Un = new En(20),
  2088. Zn = null;
  2089. function jn(t, e) {
  2090. Zn && Xn(Zn, e), Zn = Un.put(t, Zn || e.slice())
  2091. }
  2092. function qn(t, e) {
  2093. if (t) {
  2094. e = e || [];
  2095. var n = Un.get(t);
  2096. if (n) return Xn(e, n);
  2097. var i = (t += "").replace(/ /g, "").toLowerCase();
  2098. if (i in zn) return Xn(e, zn[i]), jn(t, e), e;
  2099. var r, o = i.length;
  2100. if ("#" === i.charAt(0)) return 4 === o || 5 === o ? (r = parseInt(i.slice(1, 4), 16)) >= 0 && r <= 4095 ? (Yn(e, (3840 & r) >> 4 | (3840 & r) >> 8, 240 & r | (240 & r) >> 4, 15 & r | (15 & r) << 4, 5 === o ? parseInt(i.slice(4), 16) / 15 : 1), jn(t, e), e) : void Yn(e, 0, 0, 0, 1) : 7 === o || 9 === o ? (r = parseInt(i.slice(1, 7), 16)) >= 0 && r <= 16777215 ? (Yn(e, (16711680 & r) >> 16, (65280 & r) >> 8, 255 & r, 9 === o ? parseInt(i.slice(7), 16) / 255 : 1), jn(t, e), e) : void Yn(e, 0, 0, 0, 1) : void 0;
  2101. var a = i.indexOf("("),
  2102. s = i.indexOf(")");
  2103. if (-1 !== a && s + 1 === o) {
  2104. var l = i.substr(0, a),
  2105. u = i.substr(a + 1, s - (a + 1)).split(","),
  2106. h = 1;
  2107. switch (l) {
  2108. case "rgba":
  2109. if (4 !== u.length) return 3 === u.length ? Yn(e, +u[0], +u[1], +u[2], 1) : Yn(e, 0, 0, 0, 1);
  2110. h = Gn(u.pop());
  2111. case "rgb":
  2112. return u.length >= 3 ? (Yn(e, Fn(u[0]), Fn(u[1]), Fn(u[2]), 3 === u.length ? h : Gn(u[3])), jn(t, e), e) : void Yn(e, 0, 0, 0, 1);
  2113. case "hsla":
  2114. return 4 !== u.length ? void Yn(e, 0, 0, 0, 1) : (u[3] = Gn(u[3]), Kn(u, e), jn(t, e), e);
  2115. case "hsl":
  2116. return 3 !== u.length ? void Yn(e, 0, 0, 0, 1) : (Kn(u, e), jn(t, e), e);
  2117. default:
  2118. return
  2119. }
  2120. }
  2121. Yn(e, 0, 0, 0, 1)
  2122. }
  2123. }
  2124. function Kn(t, e) {
  2125. var n = (parseFloat(t[0]) % 360 + 360) % 360 / 360,
  2126. i = Gn(t[1]),
  2127. r = Gn(t[2]),
  2128. o = r <= .5 ? r * (i + 1) : r + i - r * i,
  2129. a = 2 * r - o;
  2130. return Yn(e = e || [], Vn(255 * Wn(a, o, n + 1 / 3)), Vn(255 * Wn(a, o, n)), Vn(255 * Wn(a, o, n - 1 / 3)), 1), 4 === t.length && (e[3] = t[3]), e
  2131. }
  2132. function $n(t, e) {
  2133. var n = qn(t);
  2134. if (n) {
  2135. for (var i = 0; i < 3; i++) n[i] = e < 0 ? n[i] * (1 - e) | 0 : (255 - n[i]) * e + n[i] | 0, n[i] > 255 ? n[i] = 255 : n[i] < 0 && (n[i] = 0);
  2136. return ri(n, 4 === n.length ? "rgba" : "rgb")
  2137. }
  2138. }
  2139. function Jn(t, e, n) {
  2140. if (e && e.length && t >= 0 && t <= 1) {
  2141. n = n || [];
  2142. var i = t * (e.length - 1),
  2143. r = Math.floor(i),
  2144. o = Math.ceil(i),
  2145. a = e[r],
  2146. s = e[o],
  2147. l = i - r;
  2148. return n[0] = Vn(Hn(a[0], s[0], l)), n[1] = Vn(Hn(a[1], s[1], l)), n[2] = Vn(Hn(a[2], s[2], l)), n[3] = Bn(Hn(a[3], s[3], l)), n
  2149. }
  2150. }
  2151. var Qn = Jn;
  2152. function ti(t, e, n) {
  2153. if (e && e.length && t >= 0 && t <= 1) {
  2154. var i = t * (e.length - 1),
  2155. r = Math.floor(i),
  2156. o = Math.ceil(i),
  2157. a = qn(e[r]),
  2158. s = qn(e[o]),
  2159. l = i - r,
  2160. u = ri([Vn(Hn(a[0], s[0], l)), Vn(Hn(a[1], s[1], l)), Vn(Hn(a[2], s[2], l)), Bn(Hn(a[3], s[3], l))], "rgba");
  2161. return n ? {
  2162. color: u,
  2163. leftIndex: r,
  2164. rightIndex: o,
  2165. value: i
  2166. } : u
  2167. }
  2168. }
  2169. var ei = ti;
  2170. function ni(t, e, n, i) {
  2171. var r = qn(t);
  2172. if (t) return r = function (t) {
  2173. if (t) {
  2174. var e, n, i = t[0] / 255,
  2175. r = t[1] / 255,
  2176. o = t[2] / 255,
  2177. a = Math.min(i, r, o),
  2178. s = Math.max(i, r, o),
  2179. l = s - a,
  2180. u = (s + a) / 2;
  2181. if (0 === l) e = 0, n = 0;
  2182. else {
  2183. n = u < .5 ? l / (s + a) : l / (2 - s - a);
  2184. var h = ((s - i) / 6 + l / 2) / l,
  2185. c = ((s - r) / 6 + l / 2) / l,
  2186. p = ((s - o) / 6 + l / 2) / l;
  2187. i === s ? e = p - c : r === s ? e = 1 / 3 + h - p : o === s && (e = 2 / 3 + c - h), e < 0 && (e += 1), e > 1 && (e -= 1)
  2188. }
  2189. var d = [360 * e, n, u];
  2190. return null != t[3] && d.push(t[3]), d
  2191. }
  2192. }(r), null != e && (r[0] = function (t) {
  2193. return (t = Math.round(t)) < 0 ? 0 : t > 360 ? 360 : t
  2194. }(e)), null != n && (r[1] = Gn(n)), null != i && (r[2] = Gn(i)), ri(Kn(r), "rgba")
  2195. }
  2196. function ii(t, e) {
  2197. var n = qn(t);
  2198. if (n && null != e) return n[3] = Bn(e), ri(n, "rgba")
  2199. }
  2200. function ri(t, e) {
  2201. if (t && t.length) {
  2202. var n = t[0] + "," + t[1] + "," + t[2];
  2203. return "rgba" !== e && "hsva" !== e && "hsla" !== e || (n += "," + t[3]), e + "(" + n + ")"
  2204. }
  2205. }
  2206. function oi(t, e) {
  2207. var n = qn(t);
  2208. return n ? (.299 * n[0] + .587 * n[1] + .114 * n[2]) * n[3] / 255 + (1 - n[3]) * e : 0
  2209. }
  2210. var ai = Object.freeze({
  2211. __proto__: null,
  2212. parse: qn,
  2213. lift: $n,
  2214. toHex: function (t) {
  2215. var e = qn(t);
  2216. if (e) return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1)
  2217. },
  2218. fastLerp: Jn,
  2219. fastMapToColor: Qn,
  2220. lerp: ti,
  2221. mapToColor: ei,
  2222. modifyHSL: ni,
  2223. modifyAlpha: ii,
  2224. stringify: ri,
  2225. lum: oi,
  2226. random: function () {
  2227. return ri([Math.round(255 * Math.random()), Math.round(255 * Math.random()), Math.round(255 * Math.random())], "rgb")
  2228. }
  2229. }),
  2230. si = Math.round;
  2231. function li(t) {
  2232. var e;
  2233. if (t && "transparent" !== t) {
  2234. if ("string" == typeof t && t.indexOf("rgba") > -1) {
  2235. var n = qn(t);
  2236. n && (t = "rgb(" + n[0] + "," + n[1] + "," + n[2] + ")", e = n[3])
  2237. }
  2238. } else t = "none";
  2239. return {
  2240. color: t,
  2241. opacity: null == e ? 1 : e
  2242. }
  2243. }
  2244. var ui = 1e-4;
  2245. function hi(t) {
  2246. return t < ui && t > -1e-4
  2247. }
  2248. function ci(t) {
  2249. return si(1e3 * t) / 1e3
  2250. }
  2251. function pi(t) {
  2252. return si(1e4 * t) / 1e4
  2253. }
  2254. var di = {
  2255. left: "start",
  2256. right: "end",
  2257. center: "middle",
  2258. middle: "middle"
  2259. };
  2260. function fi(t) {
  2261. return t && !!t.image
  2262. }
  2263. function gi(t) {
  2264. return fi(t) || function (t) {
  2265. return t && !!t.svgElement
  2266. }(t)
  2267. }
  2268. function yi(t) {
  2269. return "linear" === t.type
  2270. }
  2271. function vi(t) {
  2272. return "radial" === t.type
  2273. }
  2274. function mi(t) {
  2275. return t && ("linear" === t.type || "radial" === t.type)
  2276. }
  2277. function xi(t) {
  2278. return "url(#" + t + ")"
  2279. }
  2280. function _i(t) {
  2281. var e = t.getGlobalScale(),
  2282. n = Math.max(e[0], e[1]);
  2283. return Math.max(Math.ceil(Math.log(n) / Math.log(10)), 1)
  2284. }
  2285. function bi(t) {
  2286. var e = t.x || 0,
  2287. n = t.y || 0,
  2288. i = (t.rotation || 0) * wt,
  2289. r = rt(t.scaleX, 1),
  2290. o = rt(t.scaleY, 1),
  2291. a = t.skewX || 0,
  2292. s = t.skewY || 0,
  2293. l = [];
  2294. return (e || n) && l.push("translate(" + e + "px," + n + "px)"), i && l.push("rotate(" + i + ")"), 1 === r && 1 === o || l.push("scale(" + r + "," + o + ")"), (a || s) && l.push("skew(" + si(a * wt) + "deg, " + si(s * wt) + "deg)"), l.join(" ")
  2295. }
  2296. var wi = r.hasGlobalWindow && X(window.btoa) ? function (t) {
  2297. return window.btoa(unescape(encodeURIComponent(t)))
  2298. } : "undefined" != typeof Buffer ? function (t) {
  2299. return Buffer.from(t).toString("base64")
  2300. } : function (t) {
  2301. return null
  2302. },
  2303. Si = Array.prototype.slice;
  2304. function Mi(t, e, n) {
  2305. return (e - t) * n + t
  2306. }
  2307. function Ii(t, e, n, i) {
  2308. for (var r = e.length, o = 0; o < r; o++) t[o] = Mi(e[o], n[o], i);
  2309. return t
  2310. }
  2311. function Ti(t, e, n, i) {
  2312. for (var r = e.length, o = 0; o < r; o++) t[o] = e[o] + n[o] * i;
  2313. return t
  2314. }
  2315. function Ci(t, e, n, i) {
  2316. for (var r = e.length, o = r && e[0].length, a = 0; a < r; a++) {
  2317. t[a] || (t[a] = []);
  2318. for (var s = 0; s < o; s++) t[a][s] = e[a][s] + n[a][s] * i
  2319. }
  2320. return t
  2321. }
  2322. function Di(t, e) {
  2323. for (var n = t.length, i = e.length, r = n > i ? e : t, o = Math.min(n, i), a = r[o - 1] || {
  2324. color: [0, 0, 0, 0],
  2325. offset: 0
  2326. }, s = o; s < Math.max(n, i); s++) r.push({
  2327. offset: a.offset,
  2328. color: a.color.slice()
  2329. })
  2330. }
  2331. function Ai(t, e, n) {
  2332. var i = t,
  2333. r = e;
  2334. if (i.push && r.push) {
  2335. var o = i.length,
  2336. a = r.length;
  2337. if (o !== a)
  2338. if (o > a) i.length = a;
  2339. else
  2340. for (var s = o; s < a; s++) i.push(1 === n ? r[s] : Si.call(r[s]));
  2341. var l = i[0] && i[0].length;
  2342. for (s = 0; s < i.length; s++)
  2343. if (1 === n) isNaN(i[s]) && (i[s] = r[s]);
  2344. else
  2345. for (var u = 0; u < l; u++) isNaN(i[s][u]) && (i[s][u] = r[s][u])
  2346. }
  2347. }
  2348. function ki(t) {
  2349. if (N(t)) {
  2350. var e = t.length;
  2351. if (N(t[0])) {
  2352. for (var n = [], i = 0; i < e; i++) n.push(Si.call(t[i]));
  2353. return n
  2354. }
  2355. return Si.call(t)
  2356. }
  2357. return t
  2358. }
  2359. function Li(t) {
  2360. return t[0] = Math.floor(t[0]) || 0, t[1] = Math.floor(t[1]) || 0, t[2] = Math.floor(t[2]) || 0, t[3] = null == t[3] ? 1 : t[3], "rgba(" + t.join(",") + ")"
  2361. }
  2362. function Pi(t) {
  2363. return 4 === t || 5 === t
  2364. }
  2365. function Oi(t) {
  2366. return 1 === t || 2 === t
  2367. }
  2368. var Ri = [0, 0, 0, 0],
  2369. Ni = function () {
  2370. function t(t) {
  2371. this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = t
  2372. }
  2373. return t.prototype.isFinished = function () {
  2374. return this._finished
  2375. }, t.prototype.setFinished = function () {
  2376. this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished()
  2377. }, t.prototype.needsAnimate = function () {
  2378. return this.keyframes.length >= 1
  2379. }, t.prototype.getAdditiveTrack = function () {
  2380. return this._additiveTrack
  2381. }, t.prototype.addKeyframe = function (t, e, n) {
  2382. this._needsSort = !0;
  2383. var i = this.keyframes,
  2384. r = i.length,
  2385. o = !1,
  2386. a = 6,
  2387. s = e;
  2388. if (N(e)) {
  2389. var l = function (t) {
  2390. return N(t && t[0]) ? 2 : 1
  2391. }(e);
  2392. a = l, (1 === l && !j(e[0]) || 2 === l && !j(e[0][0])) && (o = !0)
  2393. } else if (j(e) && !nt(e)) a = 0;
  2394. else if (U(e))
  2395. if (isNaN(+e)) {
  2396. var u = qn(e);
  2397. u && (s = u, a = 3)
  2398. } else a = 0;
  2399. else if (Q(e)) {
  2400. var h = A({}, s);
  2401. h.colorStops = z(e.colorStops, (function (t) {
  2402. return {
  2403. offset: t.offset,
  2404. color: qn(t.color)
  2405. }
  2406. })), yi(e) ? a = 4 : vi(e) && (a = 5), s = h
  2407. }
  2408. 0 === r ? this.valType = a : a === this.valType && 6 !== a || (o = !0), this.discrete = this.discrete || o;
  2409. var c = {
  2410. time: t,
  2411. value: s,
  2412. rawValue: e,
  2413. percent: 0
  2414. };
  2415. return n && (c.easing = n, c.easingFunc = X(n) ? n : an[n] || Pn(n)), i.push(c), c
  2416. }, t.prototype.prepare = function (t, e) {
  2417. var n = this.keyframes;
  2418. this._needsSort && n.sort((function (t, e) {
  2419. return t.time - e.time
  2420. }));
  2421. for (var i = this.valType, r = n.length, o = n[r - 1], a = this.discrete, s = Oi(i), l = Pi(i), u = 0; u < r; u++) {
  2422. var h = n[u],
  2423. c = h.value,
  2424. p = o.value;
  2425. h.percent = h.time / t, a || (s && u !== r - 1 ? Ai(c, p, i) : l && Di(c.colorStops, p.colorStops))
  2426. }
  2427. if (!a && 5 !== i && e && this.needsAnimate() && e.needsAnimate() && i === e.valType && !e._finished) {
  2428. this._additiveTrack = e;
  2429. var d = n[0].value;
  2430. for (u = 0; u < r; u++) 0 === i ? n[u].additiveValue = n[u].value - d : 3 === i ? n[u].additiveValue = Ti([], n[u].value, d, -1) : Oi(i) && (n[u].additiveValue = 1 === i ? Ti([], n[u].value, d, -1) : Ci([], n[u].value, d, -1))
  2431. }
  2432. }, t.prototype.step = function (t, e) {
  2433. if (!this._finished) {
  2434. this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
  2435. var n, i, r, o = null != this._additiveTrack,
  2436. a = o ? "additiveValue" : "value",
  2437. s = this.valType,
  2438. l = this.keyframes,
  2439. u = l.length,
  2440. h = this.propName,
  2441. c = 3 === s,
  2442. p = this._lastFr,
  2443. d = Math.min;
  2444. if (1 === u) i = r = l[0];
  2445. else {
  2446. if (e < 0) n = 0;
  2447. else if (e < this._lastFrP) {
  2448. for (n = d(p + 1, u - 1); n >= 0 && !(l[n].percent <= e); n--);
  2449. n = d(n, u - 2)
  2450. } else {
  2451. for (n = p; n < u && !(l[n].percent > e); n++);
  2452. n = d(n - 1, u - 2)
  2453. }
  2454. r = l[n + 1], i = l[n]
  2455. }
  2456. if (i && r) {
  2457. this._lastFr = n, this._lastFrP = e;
  2458. var f = r.percent - i.percent,
  2459. g = 0 === f ? 1 : d((e - i.percent) / f, 1);
  2460. r.easingFunc && (g = r.easingFunc(g));
  2461. var y = o ? this._additiveValue : c ? Ri : t[h];
  2462. if (!Oi(s) && !c || y || (y = this._additiveValue = []), this.discrete) t[h] = g < 1 ? i.rawValue : r.rawValue;
  2463. else if (Oi(s)) 1 === s ? Ii(y, i[a], r[a], g) : function (t, e, n, i) {
  2464. for (var r = e.length, o = r && e[0].length, a = 0; a < r; a++) {
  2465. t[a] || (t[a] = []);
  2466. for (var s = 0; s < o; s++) t[a][s] = Mi(e[a][s], n[a][s], i)
  2467. }
  2468. }(y, i[a], r[a], g);
  2469. else if (Pi(s)) {
  2470. var v = i[a],
  2471. m = r[a],
  2472. x = 4 === s;
  2473. t[h] = {
  2474. type: x ? "linear" : "radial",
  2475. x: Mi(v.x, m.x, g),
  2476. y: Mi(v.y, m.y, g),
  2477. colorStops: z(v.colorStops, (function (t, e) {
  2478. var n = m.colorStops[e];
  2479. return {
  2480. offset: Mi(t.offset, n.offset, g),
  2481. color: Li(Ii([], t.color, n.color, g))
  2482. }
  2483. })),
  2484. global: m.global
  2485. }, x ? (t[h].x2 = Mi(v.x2, m.x2, g), t[h].y2 = Mi(v.y2, m.y2, g)) : t[h].r = Mi(v.r, m.r, g)
  2486. } else if (c) Ii(y, i[a], r[a], g), o || (t[h] = Li(y));
  2487. else {
  2488. var _ = Mi(i[a], r[a], g);
  2489. o ? this._additiveValue = _ : t[h] = _
  2490. }
  2491. o && this._addToTarget(t)
  2492. }
  2493. }
  2494. }, t.prototype._addToTarget = function (t) {
  2495. var e = this.valType,
  2496. n = this.propName,
  2497. i = this._additiveValue;
  2498. 0 === e ? t[n] = t[n] + i : 3 === e ? (qn(t[n], Ri), Ti(Ri, Ri, i, 1), t[n] = Li(Ri)) : 1 === e ? Ti(t[n], t[n], i, 1) : 2 === e && Ci(t[n], t[n], i, 1)
  2499. }, t
  2500. }(),
  2501. Ei = function () {
  2502. function t(t, e, n, i) {
  2503. this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = t, this._loop = e, e && i ? I("Can' use additive animation on looped animation.") : (this._additiveAnimators = i, this._allowDiscrete = n)
  2504. }
  2505. return t.prototype.getMaxTime = function () {
  2506. return this._maxTime
  2507. }, t.prototype.getDelay = function () {
  2508. return this._delay
  2509. }, t.prototype.getLoop = function () {
  2510. return this._loop
  2511. }, t.prototype.getTarget = function () {
  2512. return this._target
  2513. }, t.prototype.changeTarget = function (t) {
  2514. this._target = t
  2515. }, t.prototype.when = function (t, e, n) {
  2516. return this.whenWithKeys(t, e, G(e), n)
  2517. }, t.prototype.whenWithKeys = function (t, e, n, i) {
  2518. for (var r = this._tracks, o = 0; o < n.length; o++) {
  2519. var a = n[o],
  2520. s = r[a];
  2521. if (!s) {
  2522. s = r[a] = new Ni(a);
  2523. var l = void 0,
  2524. u = this._getAdditiveTrack(a);
  2525. if (u) {
  2526. var h = u.keyframes,
  2527. c = h[h.length - 1];
  2528. l = c && c.value, 3 === u.valType && l && (l = Li(l))
  2529. } else l = this._target[a];
  2530. if (null == l) continue;
  2531. t > 0 && s.addKeyframe(0, ki(l), i), this._trackKeys.push(a)
  2532. }
  2533. s.addKeyframe(t, ki(e[a]), i)
  2534. }
  2535. return this._maxTime = Math.max(this._maxTime, t), this
  2536. }, t.prototype.pause = function () {
  2537. this._clip.pause(), this._paused = !0
  2538. }, t.prototype.resume = function () {
  2539. this._clip.resume(), this._paused = !1
  2540. }, t.prototype.isPaused = function () {
  2541. return !!this._paused
  2542. }, t.prototype.duration = function (t) {
  2543. return this._maxTime = t, this._force = !0, this
  2544. }, t.prototype._doneCallback = function () {
  2545. this._setTracksFinished(), this._clip = null;
  2546. var t = this._doneCbs;
  2547. if (t)
  2548. for (var e = t.length, n = 0; n < e; n++) t[n].call(this)
  2549. }, t.prototype._abortedCallback = function () {
  2550. this._setTracksFinished();
  2551. var t = this.animation,
  2552. e = this._abortedCbs;
  2553. if (t && t.removeClip(this._clip), this._clip = null, e)
  2554. for (var n = 0; n < e.length; n++) e[n].call(this)
  2555. }, t.prototype._setTracksFinished = function () {
  2556. for (var t = this._tracks, e = this._trackKeys, n = 0; n < e.length; n++) t[e[n]].setFinished()
  2557. }, t.prototype._getAdditiveTrack = function (t) {
  2558. var e, n = this._additiveAnimators;
  2559. if (n)
  2560. for (var i = 0; i < n.length; i++) {
  2561. var r = n[i].getTrack(t);
  2562. r && (e = r)
  2563. }
  2564. return e
  2565. }, t.prototype.start = function (t) {
  2566. if (!(this._started > 0)) {
  2567. this._started = 1;
  2568. for (var e = this, n = [], i = this._maxTime || 0, r = 0; r < this._trackKeys.length; r++) {
  2569. var o = this._trackKeys[r],
  2570. a = this._tracks[o],
  2571. s = this._getAdditiveTrack(o),
  2572. l = a.keyframes,
  2573. u = l.length;
  2574. if (a.prepare(i, s), a.needsAnimate())
  2575. if (!this._allowDiscrete && a.discrete) {
  2576. var h = l[u - 1];
  2577. h && (e._target[a.propName] = h.rawValue), a.setFinished()
  2578. } else n.push(a)
  2579. }
  2580. if (n.length || this._force) {
  2581. var c = new On({
  2582. life: i,
  2583. loop: this._loop,
  2584. delay: this._delay || 0,
  2585. onframe: function (t) {
  2586. e._started = 2;
  2587. var i = e._additiveAnimators;
  2588. if (i) {
  2589. for (var r = !1, o = 0; o < i.length; o++)
  2590. if (i[o]._clip) {
  2591. r = !0;
  2592. break
  2593. } r || (e._additiveAnimators = null)
  2594. }
  2595. for (o = 0; o < n.length; o++) n[o].step(e._target, t);
  2596. var a = e._onframeCbs;
  2597. if (a)
  2598. for (o = 0; o < a.length; o++) a[o](e._target, t)
  2599. },
  2600. ondestroy: function () {
  2601. e._doneCallback()
  2602. }
  2603. });
  2604. this._clip = c, this.animation && this.animation.addClip(c), t && c.setEasing(t)
  2605. } else this._doneCallback();
  2606. return this
  2607. }
  2608. }, t.prototype.stop = function (t) {
  2609. if (this._clip) {
  2610. var e = this._clip;
  2611. t && e.onframe(1), this._abortedCallback()
  2612. }
  2613. }, t.prototype.delay = function (t) {
  2614. return this._delay = t, this
  2615. }, t.prototype.during = function (t) {
  2616. return t && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(t)), this
  2617. }, t.prototype.done = function (t) {
  2618. return t && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(t)), this
  2619. }, t.prototype.aborted = function (t) {
  2620. return t && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(t)), this
  2621. }, t.prototype.getClip = function () {
  2622. return this._clip
  2623. }, t.prototype.getTrack = function (t) {
  2624. return this._tracks[t]
  2625. }, t.prototype.getTracks = function () {
  2626. var t = this;
  2627. return z(this._trackKeys, (function (e) {
  2628. return t._tracks[e]
  2629. }))
  2630. }, t.prototype.stopTracks = function (t, e) {
  2631. if (!t.length || !this._clip) return !0;
  2632. for (var n = this._tracks, i = this._trackKeys, r = 0; r < t.length; r++) {
  2633. var o = n[t[r]];
  2634. o && !o.isFinished() && (e ? o.step(this._target, 1) : 1 === this._started && o.step(this._target, 0), o.setFinished())
  2635. }
  2636. var a = !0;
  2637. for (r = 0; r < i.length; r++)
  2638. if (!n[i[r]].isFinished()) {
  2639. a = !1;
  2640. break
  2641. } return a && this._abortedCallback(), a
  2642. }, t.prototype.saveTo = function (t, e, n) {
  2643. if (t) {
  2644. e = e || this._trackKeys;
  2645. for (var i = 0; i < e.length; i++) {
  2646. var r = e[i],
  2647. o = this._tracks[r];
  2648. if (o && !o.isFinished()) {
  2649. var a = o.keyframes,
  2650. s = a[n ? 0 : a.length - 1];
  2651. s && (t[r] = ki(s.rawValue))
  2652. }
  2653. }
  2654. }
  2655. }, t.prototype.__changeFinalValue = function (t, e) {
  2656. e = e || G(t);
  2657. for (var n = 0; n < e.length; n++) {
  2658. var i = e[n],
  2659. r = this._tracks[i];
  2660. if (r) {
  2661. var o = r.keyframes;
  2662. if (o.length > 1) {
  2663. var a = o.pop();
  2664. r.addKeyframe(a.time, t[i]), r.prepare(this._maxTime, r.getAdditiveTrack())
  2665. }
  2666. }
  2667. }
  2668. }, t
  2669. }();
  2670. function zi() {
  2671. return (new Date).getTime()
  2672. }
  2673. var Vi, Bi, Fi = function (t) {
  2674. function e(e) {
  2675. var n = t.call(this) || this;
  2676. return n._running = !1, n._time = 0, n._pausedTime = 0, n._pauseStart = 0, n._paused = !1, e = e || {}, n.stage = e.stage || {}, n
  2677. }
  2678. return n(e, t), e.prototype.addClip = function (t) {
  2679. t.animation && this.removeClip(t), this._head ? (this._tail.next = t, t.prev = this._tail, t.next = null, this._tail = t) : this._head = this._tail = t, t.animation = this
  2680. }, e.prototype.addAnimator = function (t) {
  2681. t.animation = this;
  2682. var e = t.getClip();
  2683. e && this.addClip(e)
  2684. }, e.prototype.removeClip = function (t) {
  2685. if (t.animation) {
  2686. var e = t.prev,
  2687. n = t.next;
  2688. e ? e.next = n : this._head = n, n ? n.prev = e : this._tail = e, t.next = t.prev = t.animation = null
  2689. }
  2690. }, e.prototype.removeAnimator = function (t) {
  2691. var e = t.getClip();
  2692. e && this.removeClip(e), t.animation = null
  2693. }, e.prototype.update = function (t) {
  2694. for (var e = zi() - this._pausedTime, n = e - this._time, i = this._head; i;) {
  2695. var r = i.next;
  2696. i.step(e, n) ? (i.ondestroy(), this.removeClip(i), i = r) : i = r
  2697. }
  2698. this._time = e, t || (this.trigger("frame", n), this.stage.update && this.stage.update())
  2699. }, e.prototype._startLoop = function () {
  2700. var t = this;
  2701. this._running = !0, on((function e() {
  2702. t._running && (on(e), !t._paused && t.update())
  2703. }))
  2704. }, e.prototype.start = function () {
  2705. this._running || (this._time = zi(), this._pausedTime = 0, this._startLoop())
  2706. }, e.prototype.stop = function () {
  2707. this._running = !1
  2708. }, e.prototype.pause = function () {
  2709. this._paused || (this._pauseStart = zi(), this._paused = !0)
  2710. }, e.prototype.resume = function () {
  2711. this._paused && (this._pausedTime += zi() - this._pauseStart, this._paused = !1)
  2712. }, e.prototype.clear = function () {
  2713. for (var t = this._head; t;) {
  2714. var e = t.next;
  2715. t.prev = t.next = t.animation = null, t = e
  2716. }
  2717. this._head = this._tail = null
  2718. }, e.prototype.isFinished = function () {
  2719. return null == this._head
  2720. }, e.prototype.animate = function (t, e) {
  2721. e = e || {}, this.start();
  2722. var n = new Ei(t, e.loop);
  2723. return this.addAnimator(n), n
  2724. }, e
  2725. }(jt),
  2726. Gi = r.domSupported,
  2727. Wi = (Bi = {
  2728. pointerdown: 1,
  2729. pointerup: 1,
  2730. pointermove: 1,
  2731. pointerout: 1
  2732. }, {
  2733. mouse: Vi = ["click", "dblclick", "mousewheel", "wheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
  2734. touch: ["touchstart", "touchend", "touchmove"],
  2735. pointer: z(Vi, (function (t) {
  2736. var e = t.replace("mouse", "pointer");
  2737. return Bi.hasOwnProperty(e) ? e : t
  2738. }))
  2739. }),
  2740. Hi = ["mousemove", "mouseup"],
  2741. Yi = ["pointermove", "pointerup"],
  2742. Xi = !1;
  2743. function Ui(t) {
  2744. var e = t.pointerType;
  2745. return "pen" === e || "touch" === e
  2746. }
  2747. function Zi(t) {
  2748. t && (t.zrByTouch = !0)
  2749. }
  2750. function ji(t, e) {
  2751. for (var n = e, i = !1; n && 9 !== n.nodeType && !(i = n.domBelongToZr || n !== e && n === t.painterRoot);) n = n.parentNode;
  2752. return i
  2753. }
  2754. var qi = function (t, e) {
  2755. this.stopPropagation = bt, this.stopImmediatePropagation = bt, this.preventDefault = bt, this.type = e.type, this.target = this.currentTarget = t.dom, this.pointerType = e.pointerType, this.clientX = e.clientX, this.clientY = e.clientY
  2756. },
  2757. Ki = {
  2758. mousedown: function (t) {
  2759. t = ce(this.dom, t), this.__mayPointerCapture = [t.zrX, t.zrY], this.trigger("mousedown", t)
  2760. },
  2761. mousemove: function (t) {
  2762. t = ce(this.dom, t);
  2763. var e = this.__mayPointerCapture;
  2764. !e || t.zrX === e[0] && t.zrY === e[1] || this.__togglePointerCapture(!0), this.trigger("mousemove", t)
  2765. },
  2766. mouseup: function (t) {
  2767. t = ce(this.dom, t), this.__togglePointerCapture(!1), this.trigger("mouseup", t)
  2768. },
  2769. mouseout: function (t) {
  2770. ji(this, (t = ce(this.dom, t)).toElement || t.relatedTarget) || (this.__pointerCapturing && (t.zrEventControl = "no_globalout"), this.trigger("mouseout", t))
  2771. },
  2772. wheel: function (t) {
  2773. Xi = !0, t = ce(this.dom, t), this.trigger("mousewheel", t)
  2774. },
  2775. mousewheel: function (t) {
  2776. Xi || (t = ce(this.dom, t), this.trigger("mousewheel", t))
  2777. },
  2778. touchstart: function (t) {
  2779. Zi(t = ce(this.dom, t)), this.__lastTouchMoment = new Date, this.handler.processGesture(t, "start"), Ki.mousemove.call(this, t), Ki.mousedown.call(this, t)
  2780. },
  2781. touchmove: function (t) {
  2782. Zi(t = ce(this.dom, t)), this.handler.processGesture(t, "change"), Ki.mousemove.call(this, t)
  2783. },
  2784. touchend: function (t) {
  2785. Zi(t = ce(this.dom, t)), this.handler.processGesture(t, "end"), Ki.mouseup.call(this, t), +new Date - +this.__lastTouchMoment < 300 && Ki.click.call(this, t)
  2786. },
  2787. pointerdown: function (t) {
  2788. Ki.mousedown.call(this, t)
  2789. },
  2790. pointermove: function (t) {
  2791. Ui(t) || Ki.mousemove.call(this, t)
  2792. },
  2793. pointerup: function (t) {
  2794. Ki.mouseup.call(this, t)
  2795. },
  2796. pointerout: function (t) {
  2797. Ui(t) || Ki.mouseout.call(this, t)
  2798. }
  2799. };
  2800. E(["click", "dblclick", "contextmenu"], (function (t) {
  2801. Ki[t] = function (e) {
  2802. e = ce(this.dom, e), this.trigger(t, e)
  2803. }
  2804. }));
  2805. var $i = {
  2806. pointermove: function (t) {
  2807. Ui(t) || $i.mousemove.call(this, t)
  2808. },
  2809. pointerup: function (t) {
  2810. $i.mouseup.call(this, t)
  2811. },
  2812. mousemove: function (t) {
  2813. this.trigger("mousemove", t)
  2814. },
  2815. mouseup: function (t) {
  2816. var e = this.__pointerCapturing;
  2817. this.__togglePointerCapture(!1), this.trigger("mouseup", t), e && (t.zrEventControl = "only_globalout", this.trigger("mouseout", t))
  2818. }
  2819. };
  2820. function Ji(t, e) {
  2821. var n = e.domHandlers;
  2822. r.pointerEventsSupported ? E(Wi.pointer, (function (i) {
  2823. tr(e, i, (function (e) {
  2824. n[i].call(t, e)
  2825. }))
  2826. })) : (r.touchEventsSupported && E(Wi.touch, (function (i) {
  2827. tr(e, i, (function (r) {
  2828. n[i].call(t, r),
  2829. function (t) {
  2830. t.touching = !0, null != t.touchTimer && (clearTimeout(t.touchTimer), t.touchTimer = null), t.touchTimer = setTimeout((function () {
  2831. t.touching = !1, t.touchTimer = null
  2832. }), 700)
  2833. }(e)
  2834. }))
  2835. })), E(Wi.mouse, (function (i) {
  2836. tr(e, i, (function (r) {
  2837. r = he(r), e.touching || n[i].call(t, r)
  2838. }))
  2839. })))
  2840. }
  2841. function Qi(t, e) {
  2842. function n(n) {
  2843. tr(e, n, (function (i) {
  2844. i = he(i), ji(t, i.target) || (i = function (t, e) {
  2845. return ce(t.dom, new qi(t, e), !0)
  2846. }(t, i), e.domHandlers[n].call(t, i))
  2847. }), {
  2848. capture: !0
  2849. })
  2850. }
  2851. r.pointerEventsSupported ? E(Yi, n) : r.touchEventsSupported || E(Hi, n)
  2852. }
  2853. function tr(t, e, n, i) {
  2854. t.mounted[e] = n, t.listenerOpts[e] = i, pe(t.domTarget, e, n, i)
  2855. }
  2856. function er(t) {
  2857. var e, n, i, r, o = t.mounted;
  2858. for (var a in o) o.hasOwnProperty(a) && (e = t.domTarget, n = a, i = o[a], r = t.listenerOpts[a], e.removeEventListener(n, i, r));
  2859. t.mounted = {}
  2860. }
  2861. var nr = function (t, e) {
  2862. this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = t, this.domHandlers = e
  2863. },
  2864. ir = function (t) {
  2865. function e(e, n) {
  2866. var i = t.call(this) || this;
  2867. return i.__pointerCapturing = !1, i.dom = e, i.painterRoot = n, i._localHandlerScope = new nr(e, Ki), Gi && (i._globalHandlerScope = new nr(document, $i)), Ji(i, i._localHandlerScope), i
  2868. }
  2869. return n(e, t), e.prototype.dispose = function () {
  2870. er(this._localHandlerScope), Gi && er(this._globalHandlerScope)
  2871. }, e.prototype.setCursor = function (t) {
  2872. this.dom.style && (this.dom.style.cursor = t || "default")
  2873. }, e.prototype.__togglePointerCapture = function (t) {
  2874. if (this.__mayPointerCapture = null, Gi && +this.__pointerCapturing ^ +t) {
  2875. this.__pointerCapturing = t;
  2876. var e = this._globalHandlerScope;
  2877. t ? Qi(this, e) : er(e)
  2878. }
  2879. }, e
  2880. }(jt),
  2881. rr = 1;
  2882. r.hasGlobalWindow && (rr = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
  2883. var or = rr,
  2884. ar = "#333",
  2885. sr = "#ccc",
  2886. lr = xe,
  2887. ur = 5e-5;
  2888. function hr(t) {
  2889. return t > ur || t < -5e-5
  2890. }
  2891. var cr = [],
  2892. pr = [],
  2893. dr = [1, 0, 0, 1, 0, 0],
  2894. fr = Math.abs,
  2895. gr = function () {
  2896. function t() {}
  2897. return t.prototype.getLocalTransform = function (e) {
  2898. return t.getLocalTransform(this, e)
  2899. }, t.prototype.setPosition = function (t) {
  2900. this.x = t[0], this.y = t[1]
  2901. }, t.prototype.setScale = function (t) {
  2902. this.scaleX = t[0], this.scaleY = t[1]
  2903. }, t.prototype.setSkew = function (t) {
  2904. this.skewX = t[0], this.skewY = t[1]
  2905. }, t.prototype.setOrigin = function (t) {
  2906. this.originX = t[0], this.originY = t[1]
  2907. }, t.prototype.needLocalTransform = function () {
  2908. return hr(this.rotation) || hr(this.x) || hr(this.y) || hr(this.scaleX - 1) || hr(this.scaleY - 1) || hr(this.skewX) || hr(this.skewY)
  2909. }, t.prototype.updateTransform = function () {
  2910. var t = this.parent && this.parent.transform,
  2911. e = this.needLocalTransform(),
  2912. n = this.transform;
  2913. e || t ? (n = n || [1, 0, 0, 1, 0, 0], e ? this.getLocalTransform(n) : lr(n), t && (e ? be(n, t, n) : _e(n, t)), this.transform = n, this._resolveGlobalScaleRatio(n)) : n && lr(n)
  2914. }, t.prototype._resolveGlobalScaleRatio = function (t) {
  2915. var e = this.globalScaleRatio;
  2916. if (null != e && 1 !== e) {
  2917. this.getGlobalScale(cr);
  2918. var n = cr[0] < 0 ? -1 : 1,
  2919. i = cr[1] < 0 ? -1 : 1,
  2920. r = ((cr[0] - n) * e + n) / cr[0] || 0,
  2921. o = ((cr[1] - i) * e + i) / cr[1] || 0;
  2922. t[0] *= r, t[1] *= r, t[2] *= o, t[3] *= o
  2923. }
  2924. this.invTransform = this.invTransform || [1, 0, 0, 1, 0, 0], Ie(this.invTransform, t)
  2925. }, t.prototype.getComputedTransform = function () {
  2926. for (var t = this, e = []; t;) e.push(t), t = t.parent;
  2927. for (; t = e.pop();) t.updateTransform();
  2928. return this.transform
  2929. }, t.prototype.setLocalTransform = function (t) {
  2930. if (t) {
  2931. var e = t[0] * t[0] + t[1] * t[1],
  2932. n = t[2] * t[2] + t[3] * t[3],
  2933. i = Math.atan2(t[1], t[0]),
  2934. r = Math.PI / 2 + i - Math.atan2(t[3], t[2]);
  2935. n = Math.sqrt(n) * Math.cos(r), e = Math.sqrt(e), this.skewX = r, this.skewY = 0, this.rotation = -i, this.x = +t[4], this.y = +t[5], this.scaleX = e, this.scaleY = n, this.originX = 0, this.originY = 0
  2936. }
  2937. }, t.prototype.decomposeTransform = function () {
  2938. if (this.transform) {
  2939. var t = this.parent,
  2940. e = this.transform;
  2941. t && t.transform && (be(pr, t.invTransform, e), e = pr);
  2942. var n = this.originX,
  2943. i = this.originY;
  2944. (n || i) && (dr[4] = n, dr[5] = i, be(pr, e, dr), pr[4] -= n, pr[5] -= i, e = pr), this.setLocalTransform(e)
  2945. }
  2946. }, t.prototype.getGlobalScale = function (t) {
  2947. var e = this.transform;
  2948. 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)
  2949. }, t.prototype.transformCoordToLocal = function (t, e) {
  2950. var n = [t, e],
  2951. i = this.invTransform;
  2952. return i && Wt(n, n, i), n
  2953. }, t.prototype.transformCoordToGlobal = function (t, e) {
  2954. var n = [t, e],
  2955. i = this.transform;
  2956. return i && Wt(n, n, i), n
  2957. }, t.prototype.getLineScale = function () {
  2958. var t = this.transform;
  2959. return t && fr(t[0] - 1) > 1e-10 && fr(t[3] - 1) > 1e-10 ? Math.sqrt(fr(t[0] * t[3] - t[2] * t[1])) : 1
  2960. }, t.prototype.copyTransform = function (t) {
  2961. vr(this, t)
  2962. }, t.getLocalTransform = function (t, e) {
  2963. e = e || [];
  2964. var n = t.originX || 0,
  2965. i = t.originY || 0,
  2966. r = t.scaleX,
  2967. o = t.scaleY,
  2968. a = t.anchorX,
  2969. s = t.anchorY,
  2970. l = t.rotation || 0,
  2971. u = t.x,
  2972. h = t.y,
  2973. c = t.skewX ? Math.tan(t.skewX) : 0,
  2974. p = t.skewY ? Math.tan(-t.skewY) : 0;
  2975. if (n || i || a || s) {
  2976. var d = n + a,
  2977. f = i + s;
  2978. e[4] = -d * r - c * f * o, e[5] = -f * o - p * d * r
  2979. } else e[4] = e[5] = 0;
  2980. return e[0] = r, e[3] = o, e[1] = p * r, e[2] = c * o, l && Se(e, e, l), e[4] += n + u, e[5] += i + h, e
  2981. }, t.initDefaultProps = function () {
  2982. var e = t.prototype;
  2983. e.scaleX = e.scaleY = e.globalScaleRatio = 1, e.x = e.y = e.originX = e.originY = e.skewX = e.skewY = e.rotation = e.anchorX = e.anchorY = 0
  2984. }(), t
  2985. }(),
  2986. yr = ["x", "y", "originX", "originY", "anchorX", "anchorY", "rotation", "scaleX", "scaleY", "skewX", "skewY"];
  2987. function vr(t, e) {
  2988. for (var n = 0; n < yr.length; n++) {
  2989. var i = yr[n];
  2990. t[i] = e[i]
  2991. }
  2992. }
  2993. var mr = {};
  2994. function xr(t, e) {
  2995. var n = mr[e = e || a];
  2996. n || (n = mr[e] = new En(500));
  2997. var i = n.get(t);
  2998. return null == i && (i = h.measureText(t, e).width, n.put(t, i)), i
  2999. }
  3000. function _r(t, e, n, i) {
  3001. var r = xr(t, e),
  3002. o = Mr(e),
  3003. a = wr(0, r, n),
  3004. s = Sr(0, o, i);
  3005. return new ze(a, s, r, o)
  3006. }
  3007. function br(t, e, n, i) {
  3008. var r = ((t || "") + "").split("\n");
  3009. if (1 === r.length) return _r(r[0], e, n, i);
  3010. for (var o = new ze(0, 0, 0, 0), a = 0; a < r.length; a++) {
  3011. var s = _r(r[a], e, n, i);
  3012. 0 === a ? o.copy(s) : o.union(s)
  3013. }
  3014. return o
  3015. }
  3016. function wr(t, e, n) {
  3017. return "right" === n ? t -= e : "center" === n && (t -= e / 2), t
  3018. }
  3019. function Sr(t, e, n) {
  3020. return "middle" === n ? t -= e / 2 : "bottom" === n && (t -= e), t
  3021. }
  3022. function Mr(t) {
  3023. return xr("国", t)
  3024. }
  3025. function Ir(t, e) {
  3026. return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t
  3027. }
  3028. function Tr(t, e, n) {
  3029. var i = e.position || "inside",
  3030. r = null != e.distance ? e.distance : 5,
  3031. o = n.height,
  3032. a = n.width,
  3033. s = o / 2,
  3034. l = n.x,
  3035. u = n.y,
  3036. h = "left",
  3037. c = "top";
  3038. if (i instanceof Array) l += Ir(i[0], n.width), u += Ir(i[1], n.height), h = null, c = null;
  3039. else switch (i) {
  3040. case "left":
  3041. l -= r, u += s, h = "right", c = "middle";
  3042. break;
  3043. case "right":
  3044. l += r + a, u += s, c = "middle";
  3045. break;
  3046. case "top":
  3047. l += a / 2, u -= r, h = "center", c = "bottom";
  3048. break;
  3049. case "bottom":
  3050. l += a / 2, u += o + r, h = "center";
  3051. break;
  3052. case "inside":
  3053. l += a / 2, u += s, h = "center", c = "middle";
  3054. break;
  3055. case "insideLeft":
  3056. l += r, u += s, c = "middle";
  3057. break;
  3058. case "insideRight":
  3059. l += a - r, u += s, h = "right", c = "middle";
  3060. break;
  3061. case "insideTop":
  3062. l += a / 2, u += r, h = "center";
  3063. break;
  3064. case "insideBottom":
  3065. l += a / 2, u += o - r, h = "center", c = "bottom";
  3066. break;
  3067. case "insideTopLeft":
  3068. l += r, u += r;
  3069. break;
  3070. case "insideTopRight":
  3071. l += a - r, u += r, h = "right";
  3072. break;
  3073. case "insideBottomLeft":
  3074. l += r, u += o - r, c = "bottom";
  3075. break;
  3076. case "insideBottomRight":
  3077. l += a - r, u += o - r, h = "right", c = "bottom"
  3078. }
  3079. return (t = t || {}).x = l, t.y = u, t.align = h, t.verticalAlign = c, t
  3080. }
  3081. var Cr = "__zr_normal__",
  3082. Dr = yr.concat(["ignore"]),
  3083. Ar = V(yr, (function (t, e) {
  3084. return t[e] = !0, t
  3085. }), {
  3086. ignore: !1
  3087. }),
  3088. kr = {},
  3089. Lr = new ze(0, 0, 0, 0),
  3090. Pr = function () {
  3091. function t(t) {
  3092. this.id = M(), this.animators = [], this.currentStates = [], this.states = {}, this._init(t)
  3093. }
  3094. return t.prototype._init = function (t) {
  3095. this.attr(t)
  3096. }, t.prototype.drift = function (t, e, n) {
  3097. switch (this.draggable) {
  3098. case "horizontal":
  3099. e = 0;
  3100. break;
  3101. case "vertical":
  3102. t = 0
  3103. }
  3104. var i = this.transform;
  3105. i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += t, i[5] += e, this.decomposeTransform(), this.markRedraw()
  3106. }, t.prototype.beforeUpdate = function () {}, t.prototype.afterUpdate = function () {}, t.prototype.update = function () {
  3107. this.updateTransform(), this.__dirty && this.updateInnerText()
  3108. }, t.prototype.updateInnerText = function (t) {
  3109. var e = this._textContent;
  3110. if (e && (!e.ignore || t)) {
  3111. this.textConfig || (this.textConfig = {});
  3112. var n = this.textConfig,
  3113. i = n.local,
  3114. r = e.innerTransformable,
  3115. o = void 0,
  3116. a = void 0,
  3117. s = !1;
  3118. r.parent = i ? this : null;
  3119. var l = !1;
  3120. if (r.copyTransform(e), null != n.position) {
  3121. var u = Lr;
  3122. n.layoutRect ? u.copy(n.layoutRect) : u.copy(this.getBoundingRect()), i || u.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(kr, n, u) : Tr(kr, n, u), r.x = kr.x, r.y = kr.y, o = kr.align, a = kr.verticalAlign;
  3123. var h = n.origin;
  3124. if (h && null != n.rotation) {
  3125. var c = void 0,
  3126. p = void 0;
  3127. "center" === h ? (c = .5 * u.width, p = .5 * u.height) : (c = Ir(h[0], u.width), p = Ir(h[1], u.height)), l = !0, r.originX = -r.x + c + (i ? 0 : u.x), r.originY = -r.y + p + (i ? 0 : u.y)
  3128. }
  3129. }
  3130. null != n.rotation && (r.rotation = n.rotation);
  3131. var d = n.offset;
  3132. d && (r.x += d[0], r.y += d[1], l || (r.originX = -d[0], r.originY = -d[1]));
  3133. var f = null == n.inside ? "string" == typeof n.position && n.position.indexOf("inside") >= 0 : n.inside,
  3134. g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}),
  3135. y = void 0,
  3136. v = void 0,
  3137. m = void 0;
  3138. f && this.canBeInsideText() ? (y = n.insideFill, v = n.insideStroke, null != y && "auto" !== y || (y = this.getInsideTextFill()), null != v && "auto" !== v || (v = this.getInsideTextStroke(y), m = !0)) : (y = n.outsideFill, v = n.outsideStroke, null != y && "auto" !== y || (y = this.getOutsideFill()), null != v && "auto" !== v || (v = this.getOutsideStroke(y), m = !0)), (y = y || "#000") === g.fill && v === g.stroke && m === g.autoStroke && o === g.align && a === g.verticalAlign || (s = !0, g.fill = y, g.stroke = v, g.autoStroke = m, g.align = o, g.verticalAlign = a, e.setDefaultTextStyle(g)), e.__dirty |= 1, s && e.dirtyStyle(!0)
  3139. }
  3140. }, t.prototype.canBeInsideText = function () {
  3141. return !0
  3142. }, t.prototype.getInsideTextFill = function () {
  3143. return "#fff"
  3144. }, t.prototype.getInsideTextStroke = function (t) {
  3145. return "#000"
  3146. }, t.prototype.getOutsideFill = function () {
  3147. return this.__zr && this.__zr.isDarkMode() ? sr : ar
  3148. }, t.prototype.getOutsideStroke = function (t) {
  3149. var e = this.__zr && this.__zr.getBackgroundColor(),
  3150. n = "string" == typeof e && qn(e);
  3151. n || (n = [255, 255, 255, 1]);
  3152. for (var i = n[3], r = this.__zr.isDarkMode(), o = 0; o < 3; o++) n[o] = n[o] * i + (r ? 0 : 255) * (1 - i);
  3153. return n[3] = 1, ri(n, "rgba")
  3154. }, t.prototype.traverse = function (t, e) {}, t.prototype.attrKV = function (t, e) {
  3155. "textConfig" === t ? this.setTextConfig(e) : "textContent" === t ? this.setTextContent(e) : "clipPath" === t ? this.setClipPath(e) : "extra" === t ? (this.extra = this.extra || {}, A(this.extra, e)) : this[t] = e
  3156. }, t.prototype.hide = function () {
  3157. this.ignore = !0, this.markRedraw()
  3158. }, t.prototype.show = function () {
  3159. this.ignore = !1, this.markRedraw()
  3160. }, t.prototype.attr = function (t, e) {
  3161. if ("string" == typeof t) this.attrKV(t, e);
  3162. else if (q(t))
  3163. for (var n = G(t), i = 0; i < n.length; i++) {
  3164. var r = n[i];
  3165. this.attrKV(r, t[r])
  3166. }
  3167. return this.markRedraw(), this
  3168. }, t.prototype.saveCurrentToNormalState = function (t) {
  3169. this._innerSaveToNormal(t);
  3170. for (var e = this._normalState, n = 0; n < this.animators.length; n++) {
  3171. var i = this.animators[n],
  3172. r = i.__fromStateTransition;
  3173. if (!(i.getLoop() || r && r !== Cr)) {
  3174. var o = i.targetName,
  3175. a = o ? e[o] : e;
  3176. i.saveTo(a)
  3177. }
  3178. }
  3179. }, t.prototype._innerSaveToNormal = function (t) {
  3180. var e = this._normalState;
  3181. e || (e = this._normalState = {}), t.textConfig && !e.textConfig && (e.textConfig = this.textConfig), this._savePrimaryToNormal(t, e, Dr)
  3182. }, t.prototype._savePrimaryToNormal = function (t, e, n) {
  3183. for (var i = 0; i < n.length; i++) {
  3184. var r = n[i];
  3185. null == t[r] || r in e || (e[r] = this[r])
  3186. }
  3187. }, t.prototype.hasState = function () {
  3188. return this.currentStates.length > 0
  3189. }, t.prototype.getState = function (t) {
  3190. return this.states[t]
  3191. }, t.prototype.ensureState = function (t) {
  3192. var e = this.states;
  3193. return e[t] || (e[t] = {}), e[t]
  3194. }, t.prototype.clearStates = function (t) {
  3195. this.useState(Cr, !1, t)
  3196. }, t.prototype.useState = function (t, e, n, i) {
  3197. var r = t === Cr;
  3198. if (this.hasState() || !r) {
  3199. var o = this.currentStates,
  3200. a = this.stateTransition;
  3201. if (!(P(o, t) >= 0) || !e && 1 !== o.length) {
  3202. var s;
  3203. if (this.stateProxy && !r && (s = this.stateProxy(t)), s || (s = this.states && this.states[t]), s || r) {
  3204. r || this.saveCurrentToNormalState(s);
  3205. var l = !!(s && s.hoverLayer || i);
  3206. l && this._toggleHoverLayerFlag(!0), this._applyStateObj(t, s, this._normalState, e, !n && !this.__inHover && a && a.duration > 0, a);
  3207. var u = this._textContent,
  3208. h = this._textGuide;
  3209. return u && u.useState(t, e, n, l), h && h.useState(t, e, n, l), r ? (this.currentStates = [], this._normalState = {}) : e ? this.currentStates.push(t) : this.currentStates = [t], this._updateAnimationTargets(), this.markRedraw(), !l && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= -2), s
  3210. }
  3211. I("State " + t + " not exists.")
  3212. }
  3213. }
  3214. }, t.prototype.useStates = function (t, e, n) {
  3215. if (t.length) {
  3216. var i = [],
  3217. r = this.currentStates,
  3218. o = t.length,
  3219. a = o === r.length;
  3220. if (a)
  3221. for (var s = 0; s < o; s++)
  3222. if (t[s] !== r[s]) {
  3223. a = !1;
  3224. break
  3225. } if (a) return;
  3226. for (s = 0; s < o; s++) {
  3227. var l = t[s],
  3228. u = void 0;
  3229. this.stateProxy && (u = this.stateProxy(l, t)), u || (u = this.states[l]), u && i.push(u)
  3230. }
  3231. var h = i[o - 1],
  3232. c = !!(h && h.hoverLayer || n);
  3233. c && this._toggleHoverLayerFlag(!0);
  3234. var p = this._mergeStates(i),
  3235. d = this.stateTransition;
  3236. this.saveCurrentToNormalState(p), this._applyStateObj(t.join(","), p, this._normalState, !1, !e && !this.__inHover && d && d.duration > 0, d);
  3237. var f = this._textContent,
  3238. g = this._textGuide;
  3239. f && f.useStates(t, e, c), g && g.useStates(t, e, c), this._updateAnimationTargets(), this.currentStates = t.slice(), this.markRedraw(), !c && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= -2)
  3240. } else this.clearStates()
  3241. }, t.prototype._updateAnimationTargets = function () {
  3242. for (var t = 0; t < this.animators.length; t++) {
  3243. var e = this.animators[t];
  3244. e.targetName && e.changeTarget(this[e.targetName])
  3245. }
  3246. }, t.prototype.removeState = function (t) {
  3247. var e = P(this.currentStates, t);
  3248. if (e >= 0) {
  3249. var n = this.currentStates.slice();
  3250. n.splice(e, 1), this.useStates(n)
  3251. }
  3252. }, t.prototype.replaceState = function (t, e, n) {
  3253. var i = this.currentStates.slice(),
  3254. r = P(i, t),
  3255. o = P(i, e) >= 0;
  3256. r >= 0 ? o ? i.splice(r, 1) : i[r] = e : n && !o && i.push(e), this.useStates(i)
  3257. }, t.prototype.toggleState = function (t, e) {
  3258. e ? this.useState(t, !0) : this.removeState(t)
  3259. }, t.prototype._mergeStates = function (t) {
  3260. for (var e, n = {}, i = 0; i < t.length; i++) {
  3261. var r = t[i];
  3262. A(n, r), r.textConfig && A(e = e || {}, r.textConfig)
  3263. }
  3264. return e && (n.textConfig = e), n
  3265. }, t.prototype._applyStateObj = function (t, e, n, i, r, o) {
  3266. var a = !(e && i);
  3267. e && e.textConfig ? (this.textConfig = A({}, i ? this.textConfig : n.textConfig), A(this.textConfig, e.textConfig)) : a && n.textConfig && (this.textConfig = n.textConfig);
  3268. for (var s = {}, l = !1, u = 0; u < Dr.length; u++) {
  3269. var h = Dr[u],
  3270. c = r && Ar[h];
  3271. e && null != e[h] ? c ? (l = !0, s[h] = e[h]) : this[h] = e[h] : a && null != n[h] && (c ? (l = !0, s[h] = n[h]) : this[h] = n[h])
  3272. }
  3273. if (!r)
  3274. for (u = 0; u < this.animators.length; u++) {
  3275. var p = this.animators[u],
  3276. d = p.targetName;
  3277. p.getLoop() || p.__changeFinalValue(d ? (e || n)[d] : e || n)
  3278. }
  3279. l && this._transitionState(t, s, o)
  3280. }, t.prototype._attachComponent = function (t) {
  3281. if ((!t.__zr || t.__hostTarget) && t !== this) {
  3282. var e = this.__zr;
  3283. e && t.addSelfToZr(e), t.__zr = e, t.__hostTarget = this
  3284. }
  3285. }, t.prototype._detachComponent = function (t) {
  3286. t.__zr && t.removeSelfFromZr(t.__zr), t.__zr = null, t.__hostTarget = null
  3287. }, t.prototype.getClipPath = function () {
  3288. return this._clipPath
  3289. }, t.prototype.setClipPath = function (t) {
  3290. this._clipPath && this._clipPath !== t && this.removeClipPath(), this._attachComponent(t), this._clipPath = t, this.markRedraw()
  3291. }, t.prototype.removeClipPath = function () {
  3292. var t = this._clipPath;
  3293. t && (this._detachComponent(t), this._clipPath = null, this.markRedraw())
  3294. }, t.prototype.getTextContent = function () {
  3295. return this._textContent
  3296. }, t.prototype.setTextContent = function (t) {
  3297. var e = this._textContent;
  3298. e !== t && (e && e !== t && this.removeTextContent(), t.innerTransformable = new gr, this._attachComponent(t), this._textContent = t, this.markRedraw())
  3299. }, t.prototype.setTextConfig = function (t) {
  3300. this.textConfig || (this.textConfig = {}), A(this.textConfig, t), this.markRedraw()
  3301. }, t.prototype.removeTextConfig = function () {
  3302. this.textConfig = null, this.markRedraw()
  3303. }, t.prototype.removeTextContent = function () {
  3304. var t = this._textContent;
  3305. t && (t.innerTransformable = null, this._detachComponent(t), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw())
  3306. }, t.prototype.getTextGuideLine = function () {
  3307. return this._textGuide
  3308. }, t.prototype.setTextGuideLine = function (t) {
  3309. this._textGuide && this._textGuide !== t && this.removeTextGuideLine(), this._attachComponent(t), this._textGuide = t, this.markRedraw()
  3310. }, t.prototype.removeTextGuideLine = function () {
  3311. var t = this._textGuide;
  3312. t && (this._detachComponent(t), this._textGuide = null, this.markRedraw())
  3313. }, t.prototype.markRedraw = function () {
  3314. this.__dirty |= 1;
  3315. var t = this.__zr;
  3316. t && (this.__inHover ? t.refreshHover() : t.refresh()), this.__hostTarget && this.__hostTarget.markRedraw()
  3317. }, t.prototype.dirty = function () {
  3318. this.markRedraw()
  3319. }, t.prototype._toggleHoverLayerFlag = function (t) {
  3320. this.__inHover = t;
  3321. var e = this._textContent,
  3322. n = this._textGuide;
  3323. e && (e.__inHover = t), n && (n.__inHover = t)
  3324. }, t.prototype.addSelfToZr = function (t) {
  3325. if (this.__zr !== t) {
  3326. this.__zr = t;
  3327. var e = this.animators;
  3328. if (e)
  3329. for (var n = 0; n < e.length; n++) t.animation.addAnimator(e[n]);
  3330. this._clipPath && this._clipPath.addSelfToZr(t), this._textContent && this._textContent.addSelfToZr(t), this._textGuide && this._textGuide.addSelfToZr(t)
  3331. }
  3332. }, t.prototype.removeSelfFromZr = function (t) {
  3333. if (this.__zr) {
  3334. this.__zr = null;
  3335. var e = this.animators;
  3336. if (e)
  3337. for (var n = 0; n < e.length; n++) t.animation.removeAnimator(e[n]);
  3338. this._clipPath && this._clipPath.removeSelfFromZr(t), this._textContent && this._textContent.removeSelfFromZr(t), this._textGuide && this._textGuide.removeSelfFromZr(t)
  3339. }
  3340. }, t.prototype.animate = function (t, e, n) {
  3341. var i = t ? this[t] : this;
  3342. var r = new Ei(i, e, n);
  3343. return t && (r.targetName = t), this.addAnimator(r, t), r
  3344. }, t.prototype.addAnimator = function (t, e) {
  3345. var n = this.__zr,
  3346. i = this;
  3347. t.during((function () {
  3348. i.updateDuringAnimation(e)
  3349. })).done((function () {
  3350. var e = i.animators,
  3351. n = P(e, t);
  3352. n >= 0 && e.splice(n, 1)
  3353. })), this.animators.push(t), n && n.animation.addAnimator(t), n && n.wakeUp()
  3354. }, t.prototype.updateDuringAnimation = function (t) {
  3355. this.markRedraw()
  3356. }, t.prototype.stopAnimation = function (t, e) {
  3357. for (var n = this.animators, i = n.length, r = [], o = 0; o < i; o++) {
  3358. var a = n[o];
  3359. t && t !== a.scope ? r.push(a) : a.stop(e)
  3360. }
  3361. return this.animators = r, this
  3362. }, t.prototype.animateTo = function (t, e, n) {
  3363. Or(this, t, e, n)
  3364. }, t.prototype.animateFrom = function (t, e, n) {
  3365. Or(this, t, e, n, !0)
  3366. }, t.prototype._transitionState = function (t, e, n, i) {
  3367. for (var r = Or(this, e, n, i), o = 0; o < r.length; o++) r[o].__fromStateTransition = t
  3368. }, t.prototype.getBoundingRect = function () {
  3369. return null
  3370. }, t.prototype.getPaintRect = function () {
  3371. return null
  3372. }, t.initDefaultProps = function () {
  3373. var e = t.prototype;
  3374. e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = 1;
  3375. function n(t, n, i, r) {
  3376. function o(t, e) {
  3377. Object.defineProperty(e, 0, {
  3378. get: function () {
  3379. return t[i]
  3380. },
  3381. set: function (e) {
  3382. t[i] = e
  3383. }
  3384. }), Object.defineProperty(e, 1, {
  3385. get: function () {
  3386. return t[r]
  3387. },
  3388. set: function (e) {
  3389. t[r] = e
  3390. }
  3391. })
  3392. }
  3393. Object.defineProperty(e, t, {
  3394. get: function () {
  3395. this[n] || o(this, this[n] = []);
  3396. return this[n]
  3397. },
  3398. set: function (t) {
  3399. this[i] = t[0], this[r] = t[1], this[n] = t, o(this, t)
  3400. }
  3401. })
  3402. }
  3403. Object.defineProperty && (n("position", "_legacyPos", "x", "y"), n("scale", "_legacyScale", "scaleX", "scaleY"), n("origin", "_legacyOrigin", "originX", "originY"))
  3404. }(), t
  3405. }();
  3406. function Or(t, e, n, i, r) {
  3407. var o = [];
  3408. Er(t, "", t, e, n = n || {}, i, o, r);
  3409. var a = o.length,
  3410. s = !1,
  3411. l = n.done,
  3412. u = n.aborted,
  3413. h = function () {
  3414. s = !0, --a <= 0 && (s ? l && l() : u && u())
  3415. },
  3416. c = function () {
  3417. --a <= 0 && (s ? l && l() : u && u())
  3418. };
  3419. a || l && l(), o.length > 0 && n.during && o[0].during((function (t, e) {
  3420. n.during(e)
  3421. }));
  3422. for (var p = 0; p < o.length; p++) {
  3423. var d = o[p];
  3424. h && d.done(h), c && d.aborted(c), n.force && d.duration(n.duration), d.start(n.easing)
  3425. }
  3426. return o
  3427. }
  3428. function Rr(t, e, n) {
  3429. for (var i = 0; i < n; i++) t[i] = e[i]
  3430. }
  3431. function Nr(t, e, n) {
  3432. if (N(e[n]))
  3433. if (N(t[n]) || (t[n] = []), $(e[n])) {
  3434. var i = e[n].length;
  3435. t[n].length !== i && (t[n] = new e[n].constructor(i), Rr(t[n], e[n], i))
  3436. } else {
  3437. var r = e[n],
  3438. o = t[n],
  3439. a = r.length;
  3440. if (N(r[0]))
  3441. for (var s = r[0].length, l = 0; l < a; l++) o[l] ? Rr(o[l], r[l], s) : o[l] = Array.prototype.slice.call(r[l]);
  3442. else Rr(o, r, a);
  3443. o.length = r.length
  3444. }
  3445. else t[n] = e[n]
  3446. }
  3447. function Er(t, e, n, i, r, o, a, s) {
  3448. for (var l = G(i), u = r.duration, h = r.delay, c = r.additive, p = r.setToFinal, d = !q(o), f = t.animators, g = [], y = 0; y < l.length; y++) {
  3449. var v = l[y],
  3450. m = i[v];
  3451. if (null != m && null != n[v] && (d || o[v]))
  3452. if (!q(m) || N(m) || Q(m)) g.push(v);
  3453. else {
  3454. if (e) {
  3455. s || (n[v] = m, t.updateDuringAnimation(e));
  3456. continue
  3457. }
  3458. Er(t, v, n[v], m, r, o && o[v], a, s)
  3459. }
  3460. else s || (n[v] = m, t.updateDuringAnimation(e), g.push(v))
  3461. }
  3462. var x = g.length;
  3463. if (!c && x)
  3464. for (var _ = 0; _ < f.length; _++) {
  3465. if ((w = f[_]).targetName === e)
  3466. if (w.stopTracks(g)) {
  3467. var b = P(f, w);
  3468. f.splice(b, 1)
  3469. }
  3470. }
  3471. if (r.force || (g = B(g, (function (t) {
  3472. return e = i[t], r = n[t], !(e === r || N(e) && N(r) && function (t, e) {
  3473. var n = t.length;
  3474. if (n !== e.length) return !1;
  3475. for (var i = 0; i < n; i++)
  3476. if (t[i] !== e[i]) return !1;
  3477. return !0
  3478. }(e, r));
  3479. var e, r
  3480. })), x = g.length), x > 0 || r.force && !a.length) {
  3481. var w, S = void 0,
  3482. M = void 0,
  3483. I = void 0;
  3484. if (s) {
  3485. M = {}, p && (S = {});
  3486. for (_ = 0; _ < x; _++) {
  3487. M[v = g[_]] = n[v], p ? S[v] = i[v] : n[v] = i[v]
  3488. }
  3489. } else if (p) {
  3490. I = {};
  3491. for (_ = 0; _ < x; _++) {
  3492. I[v = g[_]] = ki(n[v]), Nr(n, i, v)
  3493. }
  3494. }(w = new Ei(n, !1, !1, c ? B(f, (function (t) {
  3495. return t.targetName === e
  3496. })) : null)).targetName = e, r.scope && (w.scope = r.scope), p && S && w.whenWithKeys(0, S, g), I && w.whenWithKeys(0, I, g), w.whenWithKeys(null == u ? 500 : u, s ? M : i, g).delay(h || 0), t.addAnimator(w, e), a.push(w)
  3497. }
  3498. }
  3499. R(Pr, jt), R(Pr, gr);
  3500. var zr = function (t) {
  3501. function e(e) {
  3502. var n = t.call(this) || this;
  3503. return n.isGroup = !0, n._children = [], n.attr(e), n
  3504. }
  3505. return n(e, t), e.prototype.childrenRef = function () {
  3506. return this._children
  3507. }, e.prototype.children = function () {
  3508. return this._children.slice()
  3509. }, e.prototype.childAt = function (t) {
  3510. return this._children[t]
  3511. }, e.prototype.childOfName = function (t) {
  3512. for (var e = this._children, n = 0; n < e.length; n++)
  3513. if (e[n].name === t) return e[n]
  3514. }, e.prototype.childCount = function () {
  3515. return this._children.length
  3516. }, e.prototype.add = function (t) {
  3517. return t && t !== this && t.parent !== this && (this._children.push(t), this._doAdd(t)), this
  3518. }, e.prototype.addBefore = function (t, e) {
  3519. if (t && t !== this && t.parent !== this && e && e.parent === this) {
  3520. var n = this._children,
  3521. i = n.indexOf(e);
  3522. i >= 0 && (n.splice(i, 0, t), this._doAdd(t))
  3523. }
  3524. return this
  3525. }, e.prototype.replace = function (t, e) {
  3526. var n = P(this._children, t);
  3527. return n >= 0 && this.replaceAt(e, n), this
  3528. }, e.prototype.replaceAt = function (t, e) {
  3529. var n = this._children,
  3530. i = n[e];
  3531. if (t && t !== this && t.parent !== this && t !== i) {
  3532. n[e] = t, i.parent = null;
  3533. var r = this.__zr;
  3534. r && i.removeSelfFromZr(r), this._doAdd(t)
  3535. }
  3536. return this
  3537. }, e.prototype._doAdd = function (t) {
  3538. t.parent && t.parent.remove(t), t.parent = this;
  3539. var e = this.__zr;
  3540. e && e !== t.__zr && t.addSelfToZr(e), e && e.refresh()
  3541. }, e.prototype.remove = function (t) {
  3542. var e = this.__zr,
  3543. n = this._children,
  3544. i = P(n, t);
  3545. return i < 0 || (n.splice(i, 1), t.parent = null, e && t.removeSelfFromZr(e), e && e.refresh()), this
  3546. }, e.prototype.removeAll = function () {
  3547. for (var t = this._children, e = this.__zr, n = 0; n < t.length; n++) {
  3548. var i = t[n];
  3549. e && i.removeSelfFromZr(e), i.parent = null
  3550. }
  3551. return t.length = 0, this
  3552. }, e.prototype.eachChild = function (t, e) {
  3553. for (var n = this._children, i = 0; i < n.length; i++) {
  3554. var r = n[i];
  3555. t.call(e, r, i)
  3556. }
  3557. return this
  3558. }, e.prototype.traverse = function (t, e) {
  3559. for (var n = 0; n < this._children.length; n++) {
  3560. var i = this._children[n],
  3561. r = t.call(e, i);
  3562. i.isGroup && !r && i.traverse(t, e)
  3563. }
  3564. return this
  3565. }, e.prototype.addSelfToZr = function (e) {
  3566. t.prototype.addSelfToZr.call(this, e);
  3567. for (var n = 0; n < this._children.length; n++) {
  3568. this._children[n].addSelfToZr(e)
  3569. }
  3570. }, e.prototype.removeSelfFromZr = function (e) {
  3571. t.prototype.removeSelfFromZr.call(this, e);
  3572. for (var n = 0; n < this._children.length; n++) {
  3573. this._children[n].removeSelfFromZr(e)
  3574. }
  3575. }, e.prototype.getBoundingRect = function (t) {
  3576. for (var e = new ze(0, 0, 0, 0), n = t || this._children, i = [], r = null, o = 0; o < n.length; o++) {
  3577. var a = n[o];
  3578. if (!a.ignore && !a.invisible) {
  3579. var s = a.getBoundingRect(),
  3580. l = a.getLocalTransform(i);
  3581. l ? (ze.applyTransform(e, s, l), (r = r || e.clone()).union(e)) : (r = r || s.clone()).union(s)
  3582. }
  3583. }
  3584. return r || e
  3585. }, e
  3586. }(Pr);
  3587. zr.prototype.type = "group";
  3588. /*!
  3589. * ZRender, a high performance 2d drawing library.
  3590. *
  3591. * Copyright (c) 2013, Baidu Inc.
  3592. * All rights reserved.
  3593. *
  3594. * LICENSE
  3595. * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
  3596. */
  3597. var Vr = {},
  3598. Br = {};
  3599. var Fr = function () {
  3600. function t(t, e, n) {
  3601. var i = this;
  3602. this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, n = n || {}, this.dom = e, this.id = t;
  3603. var o = new rn,
  3604. a = n.renderer || "canvas";
  3605. Vr[a] || (a = G(Vr)[0]), n.useDirtyRect = null != n.useDirtyRect && n.useDirtyRect;
  3606. var s = new Vr[a](e, o, n, t),
  3607. l = n.ssr || s.ssrOnly;
  3608. this.storage = o, this.painter = s;
  3609. var u, h = r.node || r.worker || l ? null : new ir(s.getViewportRoot(), s.root),
  3610. c = n.useCoarsePointer;
  3611. (null == c || "auto" === c ? r.touchEventsSupported : !!c) && (u = rt(n.pointerSize, 44)), this.handler = new Ye(o, s, h, s.root, u), this.animation = new Fi({
  3612. stage: {
  3613. update: l ? null : function () {
  3614. return i._flush(!0)
  3615. }
  3616. }
  3617. }), l || this.animation.start()
  3618. }
  3619. return t.prototype.add = function (t) {
  3620. t && (this.storage.addRoot(t), t.addSelfToZr(this), this.refresh())
  3621. }, t.prototype.remove = function (t) {
  3622. t && (this.storage.delRoot(t), t.removeSelfFromZr(this), this.refresh())
  3623. }, t.prototype.configLayer = function (t, e) {
  3624. this.painter.configLayer && this.painter.configLayer(t, e), this.refresh()
  3625. }, t.prototype.setBackgroundColor = function (t) {
  3626. this.painter.setBackgroundColor && this.painter.setBackgroundColor(t), this.refresh(), this._backgroundColor = t, this._darkMode = function (t) {
  3627. if (!t) return !1;
  3628. if ("string" == typeof t) return oi(t, 1) < .4;
  3629. if (t.colorStops) {
  3630. for (var e = t.colorStops, n = 0, i = e.length, r = 0; r < i; r++) n += oi(e[r].color, 1);
  3631. return (n /= i) < .4
  3632. }
  3633. return !1
  3634. }(t)
  3635. }, t.prototype.getBackgroundColor = function () {
  3636. return this._backgroundColor
  3637. }, t.prototype.setDarkMode = function (t) {
  3638. this._darkMode = t
  3639. }, t.prototype.isDarkMode = function () {
  3640. return this._darkMode
  3641. }, t.prototype.refreshImmediately = function (t) {
  3642. t || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1
  3643. }, t.prototype.refresh = function () {
  3644. this._needsRefresh = !0, this.animation.start()
  3645. }, t.prototype.flush = function () {
  3646. this._flush(!1)
  3647. }, t.prototype._flush = function (t) {
  3648. var e, n = zi();
  3649. this._needsRefresh && (e = !0, this.refreshImmediately(t)), this._needsRefreshHover && (e = !0, this.refreshHoverImmediately());
  3650. var i = zi();
  3651. e ? (this._stillFrameAccum = 0, this.trigger("rendered", {
  3652. elapsedTime: i - n
  3653. })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop())
  3654. }, t.prototype.setSleepAfterStill = function (t) {
  3655. this._sleepAfterStill = t
  3656. }, t.prototype.wakeUp = function () {
  3657. this.animation.start(), this._stillFrameAccum = 0
  3658. }, t.prototype.refreshHover = function () {
  3659. this._needsRefreshHover = !0
  3660. }, t.prototype.refreshHoverImmediately = function () {
  3661. this._needsRefreshHover = !1, this.painter.refreshHover && "canvas" === this.painter.getType() && this.painter.refreshHover()
  3662. }, t.prototype.resize = function (t) {
  3663. t = t || {}, this.painter.resize(t.width, t.height), this.handler.resize()
  3664. }, t.prototype.clearAnimation = function () {
  3665. this.animation.clear()
  3666. }, t.prototype.getWidth = function () {
  3667. return this.painter.getWidth()
  3668. }, t.prototype.getHeight = function () {
  3669. return this.painter.getHeight()
  3670. }, t.prototype.setCursorStyle = function (t) {
  3671. this.handler.setCursorStyle(t)
  3672. }, t.prototype.findHover = function (t, e) {
  3673. return this.handler.findHover(t, e)
  3674. }, t.prototype.on = function (t, e, n) {
  3675. return this.handler.on(t, e, n), this
  3676. }, t.prototype.off = function (t, e) {
  3677. this.handler.off(t, e)
  3678. }, t.prototype.trigger = function (t, e) {
  3679. this.handler.trigger(t, e)
  3680. }, t.prototype.clear = function () {
  3681. for (var t = this.storage.getRoots(), e = 0; e < t.length; e++) t[e] instanceof zr && t[e].removeSelfFromZr(this);
  3682. this.storage.delAllRoots(), this.painter.clear()
  3683. }, t.prototype.dispose = function () {
  3684. var t;
  3685. this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, t = this.id, delete Br[t]
  3686. }, t
  3687. }();
  3688. function Gr(t, e) {
  3689. var n = new Fr(M(), t, e);
  3690. return Br[n.id] = n, n
  3691. }
  3692. function Wr(t, e) {
  3693. Vr[t] = e
  3694. }
  3695. var Hr = Object.freeze({
  3696. __proto__: null,
  3697. init: Gr,
  3698. dispose: function (t) {
  3699. t.dispose()
  3700. },
  3701. disposeAll: function () {
  3702. for (var t in Br) Br.hasOwnProperty(t) && Br[t].dispose();
  3703. Br = {}
  3704. },
  3705. getInstance: function (t) {
  3706. return Br[t]
  3707. },
  3708. registerPainter: Wr,
  3709. version: "5.4.3"
  3710. }),
  3711. Yr = 1e-4;
  3712. function Xr(t, e, n, i) {
  3713. var r = e[0],
  3714. o = e[1],
  3715. a = n[0],
  3716. s = n[1],
  3717. l = o - r,
  3718. u = s - a;
  3719. if (0 === l) return 0 === u ? a : (a + s) / 2;
  3720. if (i)
  3721. if (l > 0) {
  3722. if (t <= r) return a;
  3723. if (t >= o) return s
  3724. } else {
  3725. if (t >= r) return a;
  3726. if (t <= o) return s
  3727. }
  3728. else {
  3729. if (t === r) return a;
  3730. if (t === o) return s
  3731. }
  3732. return (t - r) / l * u + a
  3733. }
  3734. function Ur(t, e) {
  3735. switch (t) {
  3736. case "center":
  3737. case "middle":
  3738. t = "50%";
  3739. break;
  3740. case "left":
  3741. case "top":
  3742. t = "0%";
  3743. break;
  3744. case "right":
  3745. case "bottom":
  3746. t = "100%"
  3747. }
  3748. return U(t) ? (n = t, n.replace(/^\s+|\s+$/g, "")).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? NaN : +t;
  3749. var n
  3750. }
  3751. function Zr(t, e, n) {
  3752. return null == e && (e = 10), e = Math.min(Math.max(0, e), 20), t = (+t).toFixed(e), n ? t : +t
  3753. }
  3754. function jr(t) {
  3755. return t.sort((function (t, e) {
  3756. return t - e
  3757. })), t
  3758. }
  3759. function qr(t) {
  3760. if (t = +t, isNaN(t)) return 0;
  3761. if (t > 1e-14)
  3762. for (var e = 1, n = 0; n < 15; n++, e *= 10)
  3763. if (Math.round(t * e) / e === t) return n;
  3764. return Kr(t)
  3765. }
  3766. function Kr(t) {
  3767. var e = t.toString().toLowerCase(),
  3768. n = e.indexOf("e"),
  3769. i = n > 0 ? +e.slice(n + 1) : 0,
  3770. r = n > 0 ? n : e.length,
  3771. o = e.indexOf("."),
  3772. a = o < 0 ? 0 : r - 1 - o;
  3773. return Math.max(0, a - i)
  3774. }
  3775. function $r(t, e) {
  3776. var n = Math.log,
  3777. i = Math.LN10,
  3778. r = Math.floor(n(t[1] - t[0]) / i),
  3779. o = Math.round(n(Math.abs(e[1] - e[0])) / i),
  3780. a = Math.min(Math.max(-r + o, 0), 20);
  3781. return isFinite(a) ? a : 20
  3782. }
  3783. function Jr(t, e) {
  3784. var n = V(t, (function (t, e) {
  3785. return t + (isNaN(e) ? 0 : e)
  3786. }), 0);
  3787. if (0 === n) return [];
  3788. for (var i = Math.pow(10, e), r = z(t, (function (t) {
  3789. return (isNaN(t) ? 0 : t) / n * i * 100
  3790. })), o = 100 * i, a = z(r, (function (t) {
  3791. return Math.floor(t)
  3792. })), s = V(a, (function (t, e) {
  3793. return t + e
  3794. }), 0), l = z(r, (function (t, e) {
  3795. return t - a[e]
  3796. })); s < o;) {
  3797. for (var u = Number.NEGATIVE_INFINITY, h = null, c = 0, p = l.length; c < p; ++c) l[c] > u && (u = l[c], h = c);
  3798. ++a[h], l[h] = 0, ++s
  3799. }
  3800. return z(a, (function (t) {
  3801. return t / i
  3802. }))
  3803. }
  3804. function Qr(t, e) {
  3805. var n = Math.max(qr(t), qr(e)),
  3806. i = t + e;
  3807. return n > 20 ? i : Zr(i, n)
  3808. }
  3809. var to = 9007199254740991;
  3810. function eo(t) {
  3811. var e = 2 * Math.PI;
  3812. return (t % e + e) % e
  3813. }
  3814. function no(t) {
  3815. return t > -1e-4 && t < Yr
  3816. }
  3817. var io = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;
  3818. function ro(t) {
  3819. if (t instanceof Date) return t;
  3820. if (U(t)) {
  3821. var e = io.exec(t);
  3822. if (!e) return new Date(NaN);
  3823. if (e[8]) {
  3824. var n = +e[4] || 0;
  3825. return "Z" !== e[8].toUpperCase() && (n -= +e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, n, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0))
  3826. }
  3827. return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0)
  3828. }
  3829. return null == t ? new Date(NaN) : new Date(Math.round(t))
  3830. }
  3831. function oo(t) {
  3832. return Math.pow(10, ao(t))
  3833. }
  3834. function ao(t) {
  3835. if (0 === t) return 0;
  3836. var e = Math.floor(Math.log(t) / Math.LN10);
  3837. return t / Math.pow(10, e) >= 10 && e++, e
  3838. }
  3839. function so(t, e) {
  3840. var n = ao(t),
  3841. i = Math.pow(10, n),
  3842. r = t / i;
  3843. return t = (e ? r < 1.5 ? 1 : r < 2.5 ? 2 : r < 4 ? 3 : r < 7 ? 5 : 10 : r < 1 ? 1 : r < 2 ? 2 : r < 3 ? 3 : r < 5 ? 5 : 10) * i, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t
  3844. }
  3845. function lo(t, e) {
  3846. var n = (t.length - 1) * e + 1,
  3847. i = Math.floor(n),
  3848. r = +t[i - 1],
  3849. o = n - i;
  3850. return o ? r + o * (t[i] - r) : r
  3851. }
  3852. function uo(t) {
  3853. t.sort((function (t, e) {
  3854. return s(t, e, 0) ? -1 : 1
  3855. }));
  3856. for (var e = -1 / 0, n = 1, i = 0; i < t.length;) {
  3857. for (var r = t[i].interval, o = t[i].close, a = 0; a < 2; a++) r[a] <= e && (r[a] = e, o[a] = a ? 1 : 1 - n), e = r[a], n = o[a];
  3858. r[0] === r[1] && o[0] * o[1] != 1 ? t.splice(i, 1) : i++
  3859. }
  3860. return t;
  3861. function s(t, e, n) {
  3862. return t.interval[n] < e.interval[n] || t.interval[n] === e.interval[n] && (t.close[n] - e.close[n] == (n ? -1 : 1) || !n && s(t, e, 1))
  3863. }
  3864. }
  3865. function ho(t) {
  3866. var e = parseFloat(t);
  3867. return e == t && (0 !== e || !U(t) || t.indexOf("x") <= 0) ? e : NaN
  3868. }
  3869. function co(t) {
  3870. return !isNaN(ho(t))
  3871. }
  3872. function po() {
  3873. return Math.round(9 * Math.random())
  3874. }
  3875. function fo(t, e) {
  3876. return 0 === e ? t : fo(e, t % e)
  3877. }
  3878. function go(t, e) {
  3879. return null == t ? e : null == e ? t : t * e / fo(t, e)
  3880. }
  3881. "undefined" != typeof console && console.warn && console.log;
  3882. function yo(t) {
  3883. 0
  3884. }
  3885. function vo(t) {
  3886. throw new Error(t)
  3887. }
  3888. function mo(t, e, n) {
  3889. return (e - t) * n + t
  3890. }
  3891. var xo = "series\0",
  3892. _o = "\0_ec_\0";
  3893. function bo(t) {
  3894. return t instanceof Array ? t : null == t ? [] : [t]
  3895. }
  3896. function wo(t, e, n) {
  3897. if (t) {
  3898. t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
  3899. for (var i = 0, r = n.length; i < r; i++) {
  3900. var o = n[i];
  3901. !t.emphasis[e].hasOwnProperty(o) && t[e].hasOwnProperty(o) && (t.emphasis[e][o] = t[e][o])
  3902. }
  3903. }
  3904. }
  3905. var So = ["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"];
  3906. function Mo(t) {
  3907. return !q(t) || Y(t) || t instanceof Date ? t : t.value
  3908. }
  3909. function Io(t) {
  3910. return q(t) && !(t instanceof Array)
  3911. }
  3912. function To(t, e, n) {
  3913. var i = "normalMerge" === n,
  3914. r = "replaceMerge" === n,
  3915. o = "replaceAll" === n;
  3916. t = t || [], e = (e || []).slice();
  3917. var a = yt();
  3918. E(e, (function (t, n) {
  3919. q(t) || (e[n] = null)
  3920. }));
  3921. var s, l, u = function (t, e, n) {
  3922. var i = [];
  3923. if ("replaceAll" === n) return i;
  3924. for (var r = 0; r < t.length; r++) {
  3925. var o = t[r];
  3926. o && null != o.id && e.set(o.id, r), i.push({
  3927. existing: "replaceMerge" === n || Lo(o) ? null : o,
  3928. newOption: null,
  3929. keyInfo: null,
  3930. brandNew: null
  3931. })
  3932. }
  3933. return i
  3934. }(t, a, n);
  3935. return (i || r) && function (t, e, n, i) {
  3936. E(i, (function (r, o) {
  3937. if (r && null != r.id) {
  3938. var a = Do(r.id),
  3939. s = n.get(a);
  3940. if (null != s) {
  3941. var l = t[s];
  3942. lt(!l.newOption, 'Duplicated option on id "' + a + '".'), l.newOption = r, l.existing = e[s], i[o] = null
  3943. }
  3944. }
  3945. }))
  3946. }(u, t, a, e), i && function (t, e) {
  3947. E(e, (function (n, i) {
  3948. if (n && null != n.name)
  3949. for (var r = 0; r < t.length; r++) {
  3950. var o = t[r].existing;
  3951. if (!t[r].newOption && o && (null == o.id || null == n.id) && !Lo(n) && !Lo(o) && Co("name", o, n)) return t[r].newOption = n, void(e[i] = null)
  3952. }
  3953. }))
  3954. }(u, e), i || r ? function (t, e, n) {
  3955. E(e, (function (e) {
  3956. if (e) {
  3957. for (var i, r = 0;
  3958. (i = t[r]) && (i.newOption || Lo(i.existing) || i.existing && null != e.id && !Co("id", e, i.existing));) r++;
  3959. i ? (i.newOption = e, i.brandNew = n) : t.push({
  3960. newOption: e,
  3961. brandNew: n,
  3962. existing: null,
  3963. keyInfo: null
  3964. }), r++
  3965. }
  3966. }))
  3967. }(u, e, r) : o && function (t, e) {
  3968. E(e, (function (e) {
  3969. t.push({
  3970. newOption: e,
  3971. brandNew: !0,
  3972. existing: null,
  3973. keyInfo: null
  3974. })
  3975. }))
  3976. }(u, e), s = u, l = yt(), E(s, (function (t) {
  3977. var e = t.existing;
  3978. e && l.set(e.id, t)
  3979. })), E(s, (function (t) {
  3980. var e = t.newOption;
  3981. lt(!e || null == e.id || !l.get(e.id) || l.get(e.id) === t, "id duplicates: " + (e && e.id)), e && null != e.id && l.set(e.id, t), !t.keyInfo && (t.keyInfo = {})
  3982. })), E(s, (function (t, e) {
  3983. var n = t.existing,
  3984. i = t.newOption,
  3985. r = t.keyInfo;
  3986. if (q(i)) {
  3987. if (r.name = null != i.name ? Do(i.name) : n ? n.name : xo + e, n) r.id = Do(n.id);
  3988. else if (null != i.id) r.id = Do(i.id);
  3989. else {
  3990. var o = 0;
  3991. do {
  3992. r.id = "\0" + r.name + "\0" + o++
  3993. } while (l.get(r.id))
  3994. }
  3995. l.set(r.id, t)
  3996. }
  3997. })), u
  3998. }
  3999. function Co(t, e, n) {
  4000. var i = Ao(e[t], null),
  4001. r = Ao(n[t], null);
  4002. return null != i && null != r && i === r
  4003. }
  4004. function Do(t) {
  4005. return Ao(t, "")
  4006. }
  4007. function Ao(t, e) {
  4008. return null == t ? e : U(t) ? t : j(t) || Z(t) ? t + "" : e
  4009. }
  4010. function ko(t) {
  4011. var e = t.name;
  4012. return !(!e || !e.indexOf(xo))
  4013. }
  4014. function Lo(t) {
  4015. return t && null != t.id && 0 === Do(t.id).indexOf(_o)
  4016. }
  4017. function Po(t, e) {
  4018. return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? Y(e.dataIndex) ? z(e.dataIndex, (function (e) {
  4019. return t.indexOfRawIndex(e)
  4020. })) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? Y(e.name) ? z(e.name, (function (e) {
  4021. return t.indexOfName(e)
  4022. })) : t.indexOfName(e.name) : void 0
  4023. }
  4024. function Oo() {
  4025. var t = "__ec_inner_" + Ro++;
  4026. return function (e) {
  4027. return e[t] || (e[t] = {})
  4028. }
  4029. }
  4030. var Ro = po();
  4031. function No(t, e, n) {
  4032. var i = Eo(e, n),
  4033. r = i.mainTypeSpecified,
  4034. o = i.queryOptionMap,
  4035. a = i.others,
  4036. s = n ? n.defaultMainType : null;
  4037. return !r && s && o.set(s, {}), o.each((function (e, i) {
  4038. var r = Bo(t, i, e, {
  4039. useDefault: s === i,
  4040. enableAll: !n || null == n.enableAll || n.enableAll,
  4041. enableNone: !n || null == n.enableNone || n.enableNone
  4042. });
  4043. a[i + "Models"] = r.models, a[i + "Model"] = r.models[0]
  4044. })), a
  4045. }
  4046. function Eo(t, e) {
  4047. var n;
  4048. if (U(t)) {
  4049. var i = {};
  4050. i[t + "Index"] = 0, n = i
  4051. } else n = t;
  4052. var r = yt(),
  4053. o = {},
  4054. a = !1;
  4055. return E(n, (function (t, n) {
  4056. if ("dataIndex" !== n && "dataIndexInside" !== n) {
  4057. var i = n.match(/^(\w+)(Index|Id|Name)$/) || [],
  4058. s = i[1],
  4059. l = (i[2] || "").toLowerCase();
  4060. if (s && l && !(e && e.includeMainTypes && P(e.includeMainTypes, s) < 0)) a = a || !!s, (r.get(s) || r.set(s, {}))[l] = t
  4061. } else o[n] = t
  4062. })), {
  4063. mainTypeSpecified: a,
  4064. queryOptionMap: r,
  4065. others: o
  4066. }
  4067. }
  4068. var zo = {
  4069. useDefault: !0,
  4070. enableAll: !1,
  4071. enableNone: !1
  4072. },
  4073. Vo = {
  4074. useDefault: !1,
  4075. enableAll: !0,
  4076. enableNone: !0
  4077. };
  4078. function Bo(t, e, n, i) {
  4079. i = i || zo;
  4080. var r = n.index,
  4081. o = n.id,
  4082. a = n.name,
  4083. s = {
  4084. models: null,
  4085. specified: null != r || null != o || null != a
  4086. };
  4087. if (!s.specified) {
  4088. var l = void 0;
  4089. return s.models = i.useDefault && (l = t.getComponent(e)) ? [l] : [], s
  4090. }
  4091. return "none" === r || !1 === r ? (lt(i.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : ("all" === r && (lt(i.enableAll, '`"all"` is not a valid value on index option.'), r = o = a = null), s.models = t.queryComponents({
  4092. mainType: e,
  4093. index: r,
  4094. id: o,
  4095. name: a
  4096. }), s)
  4097. }
  4098. function Fo(t, e, n) {
  4099. t.setAttribute ? t.setAttribute(e, n) : t[e] = n
  4100. }
  4101. function Go(t, e) {
  4102. var n = yt(),
  4103. i = [];
  4104. return E(t, (function (t) {
  4105. var r = e(t);
  4106. (n.get(r) || (i.push(r), n.set(r, []))).push(t)
  4107. })), {
  4108. keys: i,
  4109. buckets: n
  4110. }
  4111. }
  4112. function Wo(t, e, n, i, r) {
  4113. var o = null == e || "auto" === e;
  4114. if (null == i) return i;
  4115. if (j(i)) return Zr(f = mo(n || 0, i, r), o ? Math.max(qr(n || 0), qr(i)) : e);
  4116. if (U(i)) return r < 1 ? n : i;
  4117. for (var a = [], s = n, l = i, u = Math.max(s ? s.length : 0, l.length), h = 0; h < u; ++h) {
  4118. var c = t.getDimensionInfo(h);
  4119. if (c && "ordinal" === c.type) a[h] = (r < 1 && s ? s : l)[h];
  4120. else {
  4121. var p = s && s[h] ? s[h] : 0,
  4122. d = l[h],
  4123. f = mo(p, d, r);
  4124. a[h] = Zr(f, o ? Math.max(qr(p), qr(d)) : e)
  4125. }
  4126. }
  4127. return a
  4128. }
  4129. var Ho = "___EC__COMPONENT__CONTAINER___",
  4130. Yo = "___EC__EXTENDED_CLASS___";
  4131. function Xo(t) {
  4132. var e = {
  4133. main: "",
  4134. sub: ""
  4135. };
  4136. if (t) {
  4137. var n = t.split(".");
  4138. e.main = n[0] || "", e.sub = n[1] || ""
  4139. }
  4140. return e
  4141. }
  4142. function Uo(t, e) {
  4143. t.$constructor = t, t.extend = function (t) {
  4144. var e, i, r = this;
  4145. return X(i = r) && /^class\s/.test(Function.prototype.toString.call(i)) ? e = function (t) {
  4146. function e() {
  4147. return t.apply(this, arguments) || this
  4148. }
  4149. return n(e, t), e
  4150. }(r) : (e = function () {
  4151. (t.$constructor || r).apply(this, arguments)
  4152. }, O(e, this)), A(e.prototype, t), e[Yo] = !0, e.extend = this.extend, e.superCall = qo, e.superApply = Ko, e.superClass = r, e
  4153. }
  4154. }
  4155. function Zo(t, e) {
  4156. t.extend = e.extend
  4157. }
  4158. var jo = Math.round(10 * Math.random());
  4159. function qo(t, e) {
  4160. for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
  4161. return this.superClass.prototype[e].apply(t, n)
  4162. }
  4163. function Ko(t, e, n) {
  4164. return this.superClass.prototype[e].apply(t, n)
  4165. }
  4166. function $o(t) {
  4167. var e = {};
  4168. t.registerClass = function (t) {
  4169. var n, i = t.type || t.prototype.type;
  4170. if (i) {
  4171. lt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n = i), 'componentType "' + n + '" illegal'), t.prototype.type = i;
  4172. var r = Xo(i);
  4173. if (r.sub) {
  4174. if (r.sub !== Ho) {
  4175. var o = function (t) {
  4176. var n = e[t.main];
  4177. n && n[Ho] || ((n = e[t.main] = {})[Ho] = !0);
  4178. return n
  4179. }(r);
  4180. o[r.sub] = t
  4181. }
  4182. } else e[r.main] = t
  4183. }
  4184. return t
  4185. }, t.getClass = function (t, n, i) {
  4186. var r = e[t];
  4187. if (r && r[Ho] && (r = n ? r[n] : null), i && !r) throw new Error(n ? "Component " + t + "." + (n || "") + " is used but not imported." : t + ".type should be specified.");
  4188. return r
  4189. }, t.getClassesByMainType = function (t) {
  4190. var n = Xo(t),
  4191. i = [],
  4192. r = e[n.main];
  4193. return r && r[Ho] ? E(r, (function (t, e) {
  4194. e !== Ho && i.push(t)
  4195. })) : i.push(r), i
  4196. }, t.hasClass = function (t) {
  4197. var n = Xo(t);
  4198. return !!e[n.main]
  4199. }, t.getAllClassMainTypes = function () {
  4200. var t = [];
  4201. return E(e, (function (e, n) {
  4202. t.push(n)
  4203. })), t
  4204. }, t.hasSubTypes = function (t) {
  4205. var n = Xo(t),
  4206. i = e[n.main];
  4207. return i && i[Ho]
  4208. }
  4209. }
  4210. function Jo(t, e) {
  4211. for (var n = 0; n < t.length; n++) t[n][1] || (t[n][1] = t[n][0]);
  4212. return e = e || !1,
  4213. function (n, i, r) {
  4214. for (var o = {}, a = 0; a < t.length; a++) {
  4215. var s = t[a][1];
  4216. if (!(i && P(i, s) >= 0 || r && P(r, s) < 0)) {
  4217. var l = n.getShallow(s, e);
  4218. null != l && (o[t[a][0]] = l)
  4219. }
  4220. }
  4221. return o
  4222. }
  4223. }
  4224. var Qo = Jo([
  4225. ["fill", "color"],
  4226. ["shadowBlur"],
  4227. ["shadowOffsetX"],
  4228. ["shadowOffsetY"],
  4229. ["opacity"],
  4230. ["shadowColor"]
  4231. ]),
  4232. ta = function () {
  4233. function t() {}
  4234. return t.prototype.getAreaStyle = function (t, e) {
  4235. return Qo(this, t, e)
  4236. }, t
  4237. }(),
  4238. ea = new En(50);
  4239. function na(t) {
  4240. if ("string" == typeof t) {
  4241. var e = ea.get(t);
  4242. return e && e.image
  4243. }
  4244. return t
  4245. }
  4246. function ia(t, e, n, i, r) {
  4247. if (t) {
  4248. if ("string" == typeof t) {
  4249. if (e && e.__zrImageSrc === t || !n) return e;
  4250. var o = ea.get(t),
  4251. a = {
  4252. hostEl: n,
  4253. cb: i,
  4254. cbPayload: r
  4255. };
  4256. return o ? !oa(e = o.image) && o.pending.push(a) : ((e = h.loadImage(t, ra, ra)).__zrImageSrc = t, ea.put(t, e.__cachedImgObj = {
  4257. image: e,
  4258. pending: [a]
  4259. })), e
  4260. }
  4261. return t
  4262. }
  4263. return e
  4264. }
  4265. function ra() {
  4266. var t = this.__cachedImgObj;
  4267. this.onload = this.onerror = this.__cachedImgObj = null;
  4268. for (var e = 0; e < t.pending.length; e++) {
  4269. var n = t.pending[e],
  4270. i = n.cb;
  4271. i && i(this, n.cbPayload), n.hostEl.dirty()
  4272. }
  4273. t.pending.length = 0
  4274. }
  4275. function oa(t) {
  4276. return t && t.width && t.height
  4277. }
  4278. var aa = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
  4279. function sa(t, e, n, i, r) {
  4280. if (!e) return "";
  4281. var o = (t + "").split("\n");
  4282. r = la(e, n, i, r);
  4283. for (var a = 0, s = o.length; a < s; a++) o[a] = ua(o[a], r);
  4284. return o.join("\n")
  4285. }
  4286. function la(t, e, n, i) {
  4287. var r = A({}, i = i || {});
  4288. r.font = e, n = rt(n, "..."), r.maxIterations = rt(i.maxIterations, 2);
  4289. var o = r.minChar = rt(i.minChar, 0);
  4290. r.cnCharWidth = xr("国", e);
  4291. var a = r.ascCharWidth = xr("a", e);
  4292. r.placeholder = rt(i.placeholder, "");
  4293. for (var s = t = Math.max(0, t - 1), l = 0; l < o && s >= a; l++) s -= a;
  4294. var u = xr(n, e);
  4295. return u > s && (n = "", u = 0), s = t - u, r.ellipsis = n, r.ellipsisWidth = u, r.contentWidth = s, r.containerWidth = t, r
  4296. }
  4297. function ua(t, e) {
  4298. var n = e.containerWidth,
  4299. i = e.font,
  4300. r = e.contentWidth;
  4301. if (!n) return "";
  4302. var o = xr(t, i);
  4303. if (o <= n) return t;
  4304. for (var a = 0;; a++) {
  4305. if (o <= r || a >= e.maxIterations) {
  4306. t += e.ellipsis;
  4307. break
  4308. }
  4309. var s = 0 === a ? ha(t, r, e.ascCharWidth, e.cnCharWidth) : o > 0 ? Math.floor(t.length * r / o) : 0;
  4310. o = xr(t = t.substr(0, s), i)
  4311. }
  4312. return "" === t && (t = e.placeholder), t
  4313. }
  4314. function ha(t, e, n, i) {
  4315. for (var r = 0, o = 0, a = t.length; o < a && r < e; o++) {
  4316. var s = t.charCodeAt(o);
  4317. r += 0 <= s && s <= 127 ? n : i
  4318. }
  4319. return o
  4320. }
  4321. var ca = function () {},
  4322. pa = function (t) {
  4323. this.tokens = [], t && (this.tokens = t)
  4324. },
  4325. da = function () {
  4326. this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = []
  4327. };
  4328. function fa(t, e, n, i, r) {
  4329. var o, a, s = "" === e,
  4330. l = r && n.rich[r] || {},
  4331. u = t.lines,
  4332. h = l.font || n.font,
  4333. c = !1;
  4334. if (i) {
  4335. var p = l.padding,
  4336. d = p ? p[1] + p[3] : 0;
  4337. if (null != l.width && "auto" !== l.width) {
  4338. var f = Ir(l.width, i.width) + d;
  4339. u.length > 0 && f + i.accumWidth > i.width && (o = e.split("\n"), c = !0), i.accumWidth = f
  4340. } else {
  4341. var g = va(e, h, i.width, i.breakAll, i.accumWidth);
  4342. i.accumWidth = g.accumWidth + d, a = g.linesWidths, o = g.lines
  4343. }
  4344. } else o = e.split("\n");
  4345. for (var y = 0; y < o.length; y++) {
  4346. var v = o[y],
  4347. m = new ca;
  4348. if (m.styleName = r, m.text = v, m.isLineHolder = !v && !s, "number" == typeof l.width ? m.width = l.width : m.width = a ? a[y] : xr(v, h), y || c) u.push(new pa([m]));
  4349. else {
  4350. var x = (u[u.length - 1] || (u[0] = new pa)).tokens,
  4351. _ = x.length;
  4352. 1 === _ && x[0].isLineHolder ? x[0] = m : (v || !_ || s) && x.push(m)
  4353. }
  4354. }
  4355. }
  4356. var ga = V(",&?/;] ".split(""), (function (t, e) {
  4357. return t[e] = !0, t
  4358. }), {});
  4359. function ya(t) {
  4360. return ! function (t) {
  4361. var e = t.charCodeAt(0);
  4362. return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303
  4363. }(t) || !!ga[t]
  4364. }
  4365. function va(t, e, n, i, r) {
  4366. for (var o = [], a = [], s = "", l = "", u = 0, h = 0, c = 0; c < t.length; c++) {
  4367. var p = t.charAt(c);
  4368. if ("\n" !== p) {
  4369. var d = xr(p, e),
  4370. f = !i && !ya(p);
  4371. (o.length ? h + d > n : r + h + d > n) ? h ? (s || l) && (f ? (s || (s = l, l = "", h = u = 0), o.push(s), a.push(h - u), l += p, s = "", h = u += d) : (l && (s += l, l = "", u = 0), o.push(s), a.push(h), s = p, h = d)) : f ? (o.push(l), a.push(u), l = p, u = d) : (o.push(p), a.push(d)): (h += d, f ? (l += p, u += d) : (l && (s += l, l = "", u = 0), s += p))
  4372. } else l && (s += l, h += u), o.push(s), a.push(h), s = "", l = "", u = 0, h = 0
  4373. }
  4374. return o.length || s || (s = t, l = "", u = 0), l && (s += l), s && (o.push(s), a.push(h)), 1 === o.length && (h += r), {
  4375. accumWidth: h,
  4376. lines: o,
  4377. linesWidths: a
  4378. }
  4379. }
  4380. var ma = "__zr_style_" + Math.round(10 * Math.random()),
  4381. xa = {
  4382. shadowBlur: 0,
  4383. shadowOffsetX: 0,
  4384. shadowOffsetY: 0,
  4385. shadowColor: "#000",
  4386. opacity: 1,
  4387. blend: "source-over"
  4388. },
  4389. _a = {
  4390. style: {
  4391. shadowBlur: !0,
  4392. shadowOffsetX: !0,
  4393. shadowOffsetY: !0,
  4394. shadowColor: !0,
  4395. opacity: !0
  4396. }
  4397. };
  4398. xa[ma] = !0;
  4399. var ba = ["z", "z2", "invisible"],
  4400. wa = ["invisible"],
  4401. Sa = function (t) {
  4402. function e(e) {
  4403. return t.call(this, e) || this
  4404. }
  4405. var i;
  4406. return n(e, t), e.prototype._init = function (e) {
  4407. for (var n = G(e), i = 0; i < n.length; i++) {
  4408. var r = n[i];
  4409. "style" === r ? this.useStyle(e[r]) : t.prototype.attrKV.call(this, r, e[r])
  4410. }
  4411. this.style || this.useStyle({})
  4412. }, e.prototype.beforeBrush = function () {}, e.prototype.afterBrush = function () {}, e.prototype.innerBeforeBrush = function () {}, e.prototype.innerAfterBrush = function () {}, e.prototype.shouldBePainted = function (t, e, n, i) {
  4413. var r = this.transform;
  4414. if (this.ignore || this.invisible || 0 === this.style.opacity || this.culling && function (t, e, n) {
  4415. Ma.copy(t.getBoundingRect()), t.transform && Ma.applyTransform(t.transform);
  4416. return Ia.width = e, Ia.height = n, !Ma.intersect(Ia)
  4417. }(this, t, e) || r && !r[0] && !r[3]) return !1;
  4418. if (n && this.__clipPaths)
  4419. for (var o = 0; o < this.__clipPaths.length; ++o)
  4420. if (this.__clipPaths[o].isZeroArea()) return !1;
  4421. if (i && this.parent)
  4422. for (var a = this.parent; a;) {
  4423. if (a.ignore) return !1;
  4424. a = a.parent
  4425. }
  4426. return !0
  4427. }, e.prototype.contain = function (t, e) {
  4428. return this.rectContain(t, e)
  4429. }, e.prototype.traverse = function (t, e) {
  4430. t.call(e, this)
  4431. }, e.prototype.rectContain = function (t, e) {
  4432. var n = this.transformCoordToLocal(t, e);
  4433. return this.getBoundingRect().contain(n[0], n[1])
  4434. }, e.prototype.getPaintRect = function () {
  4435. var t = this._paintRect;
  4436. if (!this._paintRect || this.__dirty) {
  4437. var e = this.transform,
  4438. n = this.getBoundingRect(),
  4439. i = this.style,
  4440. r = i.shadowBlur || 0,
  4441. o = i.shadowOffsetX || 0,
  4442. a = i.shadowOffsetY || 0;
  4443. t = this._paintRect || (this._paintRect = new ze(0, 0, 0, 0)), e ? ze.applyTransform(t, n, e) : t.copy(n), (r || o || a) && (t.width += 2 * r + Math.abs(o), t.height += 2 * r + Math.abs(a), t.x = Math.min(t.x, t.x + o - r), t.y = Math.min(t.y, t.y + a - r));
  4444. var s = this.dirtyRectTolerance;
  4445. t.isZero() || (t.x = Math.floor(t.x - s), t.y = Math.floor(t.y - s), t.width = Math.ceil(t.width + 1 + 2 * s), t.height = Math.ceil(t.height + 1 + 2 * s))
  4446. }
  4447. return t
  4448. }, e.prototype.setPrevPaintRect = function (t) {
  4449. t ? (this._prevPaintRect = this._prevPaintRect || new ze(0, 0, 0, 0), this._prevPaintRect.copy(t)) : this._prevPaintRect = null
  4450. }, e.prototype.getPrevPaintRect = function () {
  4451. return this._prevPaintRect
  4452. }, e.prototype.animateStyle = function (t) {
  4453. return this.animate("style", t)
  4454. }, e.prototype.updateDuringAnimation = function (t) {
  4455. "style" === t ? this.dirtyStyle() : this.markRedraw()
  4456. }, e.prototype.attrKV = function (e, n) {
  4457. "style" !== e ? t.prototype.attrKV.call(this, e, n) : this.style ? this.setStyle(n) : this.useStyle(n)
  4458. }, e.prototype.setStyle = function (t, e) {
  4459. return "string" == typeof t ? this.style[t] = e : A(this.style, t), this.dirtyStyle(), this
  4460. }, e.prototype.dirtyStyle = function (t) {
  4461. t || this.markRedraw(), this.__dirty |= 2, this._rect && (this._rect = null)
  4462. }, e.prototype.dirty = function () {
  4463. this.dirtyStyle()
  4464. }, e.prototype.styleChanged = function () {
  4465. return !!(2 & this.__dirty)
  4466. }, e.prototype.styleUpdated = function () {
  4467. this.__dirty &= -3
  4468. }, e.prototype.createStyle = function (t) {
  4469. return mt(xa, t)
  4470. }, e.prototype.useStyle = function (t) {
  4471. t[ma] || (t = this.createStyle(t)), this.__inHover ? this.__hoverStyle = t : this.style = t, this.dirtyStyle()
  4472. }, e.prototype.isStyleObject = function (t) {
  4473. return t[ma]
  4474. }, e.prototype._innerSaveToNormal = function (e) {
  4475. t.prototype._innerSaveToNormal.call(this, e);
  4476. var n = this._normalState;
  4477. e.style && !n.style && (n.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(e, n, ba)
  4478. }, e.prototype._applyStateObj = function (e, n, i, r, o, a) {
  4479. t.prototype._applyStateObj.call(this, e, n, i, r, o, a);
  4480. var s, l = !(n && r);
  4481. if (n && n.style ? o ? r ? s = n.style : (s = this._mergeStyle(this.createStyle(), i.style), this._mergeStyle(s, n.style)) : (s = this._mergeStyle(this.createStyle(), r ? this.style : i.style), this._mergeStyle(s, n.style)) : l && (s = i.style), s)
  4482. if (o) {
  4483. var u = this.style;
  4484. if (this.style = this.createStyle(l ? {} : u), l)
  4485. for (var h = G(u), c = 0; c < h.length; c++) {
  4486. (d = h[c]) in s && (s[d] = s[d], this.style[d] = u[d])
  4487. }
  4488. var p = G(s);
  4489. for (c = 0; c < p.length; c++) {
  4490. var d = p[c];
  4491. this.style[d] = this.style[d]
  4492. }
  4493. this._transitionState(e, {
  4494. style: s
  4495. }, a, this.getAnimationStyleProps())
  4496. } else this.useStyle(s);
  4497. var f = this.__inHover ? wa : ba;
  4498. for (c = 0; c < f.length; c++) {
  4499. d = f[c];
  4500. n && null != n[d] ? this[d] = n[d] : l && null != i[d] && (this[d] = i[d])
  4501. }
  4502. }, e.prototype._mergeStates = function (e) {
  4503. for (var n, i = t.prototype._mergeStates.call(this, e), r = 0; r < e.length; r++) {
  4504. var o = e[r];
  4505. o.style && (n = n || {}, this._mergeStyle(n, o.style))
  4506. }
  4507. return n && (i.style = n), i
  4508. }, e.prototype._mergeStyle = function (t, e) {
  4509. return A(t, e), t
  4510. }, e.prototype.getAnimationStyleProps = function () {
  4511. return _a
  4512. }, e.initDefaultProps = ((i = e.prototype).type = "displayable", i.invisible = !1, i.z = 0, i.z2 = 0, i.zlevel = 0, i.culling = !1, i.cursor = "pointer", i.rectHover = !1, i.incremental = !1, i._rect = null, i.dirtyRectTolerance = 0, void(i.__dirty = 3)), e
  4513. }(Pr),
  4514. Ma = new ze(0, 0, 0, 0),
  4515. Ia = new ze(0, 0, 0, 0);
  4516. var Ta = Math.min,
  4517. Ca = Math.max,
  4518. Da = Math.sin,
  4519. Aa = Math.cos,
  4520. ka = 2 * Math.PI,
  4521. La = Mt(),
  4522. Pa = Mt(),
  4523. Oa = Mt();
  4524. function Ra(t, e, n) {
  4525. if (0 !== t.length) {
  4526. for (var i = t[0], r = i[0], o = i[0], a = i[1], s = i[1], l = 1; l < t.length; l++) i = t[l], r = Ta(r, i[0]), o = Ca(o, i[0]), a = Ta(a, i[1]), s = Ca(s, i[1]);
  4527. e[0] = r, e[1] = a, n[0] = o, n[1] = s
  4528. }
  4529. }
  4530. function Na(t, e, n, i, r, o) {
  4531. r[0] = Ta(t, n), r[1] = Ta(e, i), o[0] = Ca(t, n), o[1] = Ca(e, i)
  4532. }
  4533. var Ea = [],
  4534. za = [];
  4535. function Va(t, e, n, i, r, o, a, s, l, u) {
  4536. var h = bn,
  4537. c = mn,
  4538. p = h(t, n, r, a, Ea);
  4539. l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
  4540. for (var d = 0; d < p; d++) {
  4541. var f = c(t, n, r, a, Ea[d]);
  4542. l[0] = Ta(f, l[0]), u[0] = Ca(f, u[0])
  4543. }
  4544. p = h(e, i, o, s, za);
  4545. for (d = 0; d < p; d++) {
  4546. var g = c(e, i, o, s, za[d]);
  4547. l[1] = Ta(g, l[1]), u[1] = Ca(g, u[1])
  4548. }
  4549. l[0] = Ta(t, l[0]), u[0] = Ca(t, u[0]), l[0] = Ta(a, l[0]), u[0] = Ca(a, u[0]), l[1] = Ta(e, l[1]), u[1] = Ca(e, u[1]), l[1] = Ta(s, l[1]), u[1] = Ca(s, u[1])
  4550. }
  4551. function Ba(t, e, n, i, r, o, a, s) {
  4552. var l = Cn,
  4553. u = In,
  4554. h = Ca(Ta(l(t, n, r), 1), 0),
  4555. c = Ca(Ta(l(e, i, o), 1), 0),
  4556. p = u(t, n, r, h),
  4557. d = u(e, i, o, c);
  4558. a[0] = Ta(t, r, p), a[1] = Ta(e, o, d), s[0] = Ca(t, r, p), s[1] = Ca(e, o, d)
  4559. }
  4560. function Fa(t, e, n, i, r, o, a, s, l) {
  4561. var u = Ht,
  4562. h = Yt,
  4563. c = Math.abs(r - o);
  4564. if (c % ka < 1e-4 && c > 1e-4) return s[0] = t - n, s[1] = e - i, l[0] = t + n, void(l[1] = e + i);
  4565. if (La[0] = Aa(r) * n + t, La[1] = Da(r) * i + e, Pa[0] = Aa(o) * n + t, Pa[1] = Da(o) * i + e, u(s, La, Pa), h(l, La, Pa), (r %= ka) < 0 && (r += ka), (o %= ka) < 0 && (o += ka), r > o && !a ? o += ka : r < o && a && (r += ka), a) {
  4566. var p = o;
  4567. o = r, r = p
  4568. }
  4569. for (var d = 0; d < o; d += Math.PI / 2) d > r && (Oa[0] = Aa(d) * n + t, Oa[1] = Da(d) * i + e, u(s, Oa, s), h(l, Oa, l))
  4570. }
  4571. var Ga = {
  4572. M: 1,
  4573. L: 2,
  4574. C: 3,
  4575. Q: 4,
  4576. A: 5,
  4577. Z: 6,
  4578. R: 7
  4579. },
  4580. Wa = [],
  4581. Ha = [],
  4582. Ya = [],
  4583. Xa = [],
  4584. Ua = [],
  4585. Za = [],
  4586. ja = Math.min,
  4587. qa = Math.max,
  4588. Ka = Math.cos,
  4589. $a = Math.sin,
  4590. Ja = Math.abs,
  4591. Qa = Math.PI,
  4592. ts = 2 * Qa,
  4593. es = "undefined" != typeof Float32Array,
  4594. ns = [];
  4595. function is(t) {
  4596. return Math.round(t / Qa * 1e8) / 1e8 % 2 * Qa
  4597. }
  4598. function rs(t, e) {
  4599. var n = is(t[0]);
  4600. n < 0 && (n += ts);
  4601. var i = n - t[0],
  4602. r = t[1];
  4603. r += i, !e && r - n >= ts ? r = n + ts : e && n - r >= ts ? r = n - ts : !e && n > r ? r = n + (ts - is(n - r)) : e && n < r && (r = n - (ts - is(r - n))), t[0] = n, t[1] = r
  4604. }
  4605. var os = function () {
  4606. function t(t) {
  4607. this.dpr = 1, this._xi = 0, this._yi = 0, this._x0 = 0, this._y0 = 0, this._len = 0, t && (this._saveData = !1), this._saveData && (this.data = [])
  4608. }
  4609. return t.prototype.increaseVersion = function () {
  4610. this._version++
  4611. }, t.prototype.getVersion = function () {
  4612. return this._version
  4613. }, t.prototype.setScale = function (t, e, n) {
  4614. (n = n || 0) > 0 && (this._ux = Ja(n / or / t) || 0, this._uy = Ja(n / or / e) || 0)
  4615. }, t.prototype.setDPR = function (t) {
  4616. this.dpr = t
  4617. }, t.prototype.setContext = function (t) {
  4618. this._ctx = t
  4619. }, t.prototype.getContext = function () {
  4620. return this._ctx
  4621. }, t.prototype.beginPath = function () {
  4622. return this._ctx && this._ctx.beginPath(), this.reset(), this
  4623. }, t.prototype.reset = function () {
  4624. this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++
  4625. }, t.prototype.moveTo = function (t, e) {
  4626. return this._drawPendingPt(), this.addData(Ga.M, t, e), this._ctx && this._ctx.moveTo(t, e), this._x0 = t, this._y0 = e, this._xi = t, this._yi = e, this
  4627. }, t.prototype.lineTo = function (t, e) {
  4628. var n = Ja(t - this._xi),
  4629. i = Ja(e - this._yi),
  4630. r = n > this._ux || i > this._uy;
  4631. if (this.addData(Ga.L, t, e), this._ctx && r && this._ctx.lineTo(t, e), r) this._xi = t, this._yi = e, this._pendingPtDist = 0;
  4632. else {
  4633. var o = n * n + i * i;
  4634. o > this._pendingPtDist && (this._pendingPtX = t, this._pendingPtY = e, this._pendingPtDist = o)
  4635. }
  4636. return this
  4637. }, t.prototype.bezierCurveTo = function (t, e, n, i, r, o) {
  4638. return this._drawPendingPt(), this.addData(Ga.C, t, e, n, i, r, o), this._ctx && this._ctx.bezierCurveTo(t, e, n, i, r, o), this._xi = r, this._yi = o, this
  4639. }, t.prototype.quadraticCurveTo = function (t, e, n, i) {
  4640. return this._drawPendingPt(), this.addData(Ga.Q, t, e, n, i), this._ctx && this._ctx.quadraticCurveTo(t, e, n, i), this._xi = n, this._yi = i, this
  4641. }, t.prototype.arc = function (t, e, n, i, r, o) {
  4642. this._drawPendingPt(), ns[0] = i, ns[1] = r, rs(ns, o), i = ns[0];
  4643. var a = (r = ns[1]) - i;
  4644. return this.addData(Ga.A, t, e, n, n, i, a, 0, o ? 0 : 1), this._ctx && this._ctx.arc(t, e, n, i, r, o), this._xi = Ka(r) * n + t, this._yi = $a(r) * n + e, this
  4645. }, t.prototype.arcTo = function (t, e, n, i, r) {
  4646. return this._drawPendingPt(), this._ctx && this._ctx.arcTo(t, e, n, i, r), this
  4647. }, t.prototype.rect = function (t, e, n, i) {
  4648. return this._drawPendingPt(), this._ctx && this._ctx.rect(t, e, n, i), this.addData(Ga.R, t, e, n, i), this
  4649. }, t.prototype.closePath = function () {
  4650. this._drawPendingPt(), this.addData(Ga.Z);
  4651. var t = this._ctx,
  4652. e = this._x0,
  4653. n = this._y0;
  4654. return t && t.closePath(), this._xi = e, this._yi = n, this
  4655. }, t.prototype.fill = function (t) {
  4656. t && t.fill(), this.toStatic()
  4657. }, t.prototype.stroke = function (t) {
  4658. t && t.stroke(), this.toStatic()
  4659. }, t.prototype.len = function () {
  4660. return this._len
  4661. }, t.prototype.setData = function (t) {
  4662. var e = t.length;
  4663. this.data && this.data.length === e || !es || (this.data = new Float32Array(e));
  4664. for (var n = 0; n < e; n++) this.data[n] = t[n];
  4665. this._len = e
  4666. }, t.prototype.appendPath = function (t) {
  4667. t instanceof Array || (t = [t]);
  4668. for (var e = t.length, n = 0, i = this._len, r = 0; r < e; r++) n += t[r].len();
  4669. es && this.data instanceof Float32Array && (this.data = new Float32Array(i + n));
  4670. for (r = 0; r < e; r++)
  4671. for (var o = t[r].data, a = 0; a < o.length; a++) this.data[i++] = o[a];
  4672. this._len = i
  4673. }, t.prototype.addData = function (t, e, n, i, r, o, a, s, l) {
  4674. if (this._saveData) {
  4675. var u = this.data;
  4676. this._len + arguments.length > u.length && (this._expandData(), u = this.data);
  4677. for (var h = 0; h < arguments.length; h++) u[this._len++] = arguments[h]
  4678. }
  4679. }, t.prototype._drawPendingPt = function () {
  4680. this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0)
  4681. }, t.prototype._expandData = function () {
  4682. if (!(this.data instanceof Array)) {
  4683. for (var t = [], e = 0; e < this._len; e++) t[e] = this.data[e];
  4684. this.data = t
  4685. }
  4686. }, t.prototype.toStatic = function () {
  4687. if (this._saveData) {
  4688. this._drawPendingPt();
  4689. var t = this.data;
  4690. t instanceof Array && (t.length = this._len, es && this._len > 11 && (this.data = new Float32Array(t)))
  4691. }
  4692. }, t.prototype.getBoundingRect = function () {
  4693. Ya[0] = Ya[1] = Ua[0] = Ua[1] = Number.MAX_VALUE, Xa[0] = Xa[1] = Za[0] = Za[1] = -Number.MAX_VALUE;
  4694. var t, e = this.data,
  4695. n = 0,
  4696. i = 0,
  4697. r = 0,
  4698. o = 0;
  4699. for (t = 0; t < this._len;) {
  4700. var a = e[t++],
  4701. s = 1 === t;
  4702. switch (s && (r = n = e[t], o = i = e[t + 1]), a) {
  4703. case Ga.M:
  4704. n = r = e[t++], i = o = e[t++], Ua[0] = r, Ua[1] = o, Za[0] = r, Za[1] = o;
  4705. break;
  4706. case Ga.L:
  4707. Na(n, i, e[t], e[t + 1], Ua, Za), n = e[t++], i = e[t++];
  4708. break;
  4709. case Ga.C:
  4710. Va(n, i, e[t++], e[t++], e[t++], e[t++], e[t], e[t + 1], Ua, Za), n = e[t++], i = e[t++];
  4711. break;
  4712. case Ga.Q:
  4713. Ba(n, i, e[t++], e[t++], e[t], e[t + 1], Ua, Za), n = e[t++], i = e[t++];
  4714. break;
  4715. case Ga.A:
  4716. var l = e[t++],
  4717. u = e[t++],
  4718. h = e[t++],
  4719. c = e[t++],
  4720. p = e[t++],
  4721. d = e[t++] + p;
  4722. t += 1;
  4723. var f = !e[t++];
  4724. s && (r = Ka(p) * h + l, o = $a(p) * c + u), Fa(l, u, h, c, p, d, f, Ua, Za), n = Ka(d) * h + l, i = $a(d) * c + u;
  4725. break;
  4726. case Ga.R:
  4727. Na(r = n = e[t++], o = i = e[t++], r + e[t++], o + e[t++], Ua, Za);
  4728. break;
  4729. case Ga.Z:
  4730. n = r, i = o
  4731. }
  4732. Ht(Ya, Ya, Ua), Yt(Xa, Xa, Za)
  4733. }
  4734. return 0 === t && (Ya[0] = Ya[1] = Xa[0] = Xa[1] = 0), new ze(Ya[0], Ya[1], Xa[0] - Ya[0], Xa[1] - Ya[1])
  4735. }, t.prototype._calculateLength = function () {
  4736. var t = this.data,
  4737. e = this._len,
  4738. n = this._ux,
  4739. i = this._uy,
  4740. r = 0,
  4741. o = 0,
  4742. a = 0,
  4743. s = 0;
  4744. this._pathSegLen || (this._pathSegLen = []);
  4745. for (var l = this._pathSegLen, u = 0, h = 0, c = 0; c < e;) {
  4746. var p = t[c++],
  4747. d = 1 === c;
  4748. d && (a = r = t[c], s = o = t[c + 1]);
  4749. var f = -1;
  4750. switch (p) {
  4751. case Ga.M:
  4752. r = a = t[c++], o = s = t[c++];
  4753. break;
  4754. case Ga.L:
  4755. var g = t[c++],
  4756. y = (x = t[c++]) - o;
  4757. (Ja(A = g - r) > n || Ja(y) > i || c === e - 1) && (f = Math.sqrt(A * A + y * y), r = g, o = x);
  4758. break;
  4759. case Ga.C:
  4760. var v = t[c++],
  4761. m = t[c++],
  4762. x = (g = t[c++], t[c++]),
  4763. _ = t[c++],
  4764. b = t[c++];
  4765. f = Mn(r, o, v, m, g, x, _, b, 10), r = _, o = b;
  4766. break;
  4767. case Ga.Q:
  4768. f = kn(r, o, v = t[c++], m = t[c++], g = t[c++], x = t[c++], 10), r = g, o = x;
  4769. break;
  4770. case Ga.A:
  4771. var w = t[c++],
  4772. S = t[c++],
  4773. M = t[c++],
  4774. I = t[c++],
  4775. T = t[c++],
  4776. C = t[c++],
  4777. D = C + T;
  4778. c += 1;
  4779. t[c++];
  4780. d && (a = Ka(T) * M + w, s = $a(T) * I + S), f = qa(M, I) * ja(ts, Math.abs(C)), r = Ka(D) * M + w, o = $a(D) * I + S;
  4781. break;
  4782. case Ga.R:
  4783. a = r = t[c++], s = o = t[c++], f = 2 * t[c++] + 2 * t[c++];
  4784. break;
  4785. case Ga.Z:
  4786. var A = a - r;
  4787. y = s - o;
  4788. f = Math.sqrt(A * A + y * y), r = a, o = s
  4789. }
  4790. f >= 0 && (l[h++] = f, u += f)
  4791. }
  4792. return this._pathLen = u, u
  4793. }, t.prototype.rebuildPath = function (t, e) {
  4794. var n, i, r, o, a, s, l, u, h, c, p = this.data,
  4795. d = this._ux,
  4796. f = this._uy,
  4797. g = this._len,
  4798. y = e < 1,
  4799. v = 0,
  4800. m = 0,
  4801. x = 0;
  4802. if (!y || (this._pathSegLen || this._calculateLength(), l = this._pathSegLen, u = e * this._pathLen)) t: for (var _ = 0; _ < g;) {
  4803. var b = p[_++],
  4804. w = 1 === _;
  4805. switch (w && (n = r = p[_], i = o = p[_ + 1]), b !== Ga.L && x > 0 && (t.lineTo(h, c), x = 0), b) {
  4806. case Ga.M:
  4807. n = r = p[_++], i = o = p[_++], t.moveTo(r, o);
  4808. break;
  4809. case Ga.L:
  4810. a = p[_++], s = p[_++];
  4811. var S = Ja(a - r),
  4812. M = Ja(s - o);
  4813. if (S > d || M > f) {
  4814. if (y) {
  4815. if (v + (j = l[m++]) > u) {
  4816. var I = (u - v) / j;
  4817. t.lineTo(r * (1 - I) + a * I, o * (1 - I) + s * I);
  4818. break t
  4819. }
  4820. v += j
  4821. }
  4822. t.lineTo(a, s), r = a, o = s, x = 0
  4823. } else {
  4824. var T = S * S + M * M;
  4825. T > x && (h = a, c = s, x = T)
  4826. }
  4827. break;
  4828. case Ga.C:
  4829. var C = p[_++],
  4830. D = p[_++],
  4831. A = p[_++],
  4832. k = p[_++],
  4833. L = p[_++],
  4834. P = p[_++];
  4835. if (y) {
  4836. if (v + (j = l[m++]) > u) {
  4837. wn(r, C, A, L, I = (u - v) / j, Wa), wn(o, D, k, P, I, Ha), t.bezierCurveTo(Wa[1], Ha[1], Wa[2], Ha[2], Wa[3], Ha[3]);
  4838. break t
  4839. }
  4840. v += j
  4841. }
  4842. t.bezierCurveTo(C, D, A, k, L, P), r = L, o = P;
  4843. break;
  4844. case Ga.Q:
  4845. C = p[_++], D = p[_++], A = p[_++], k = p[_++];
  4846. if (y) {
  4847. if (v + (j = l[m++]) > u) {
  4848. Dn(r, C, A, I = (u - v) / j, Wa), Dn(o, D, k, I, Ha), t.quadraticCurveTo(Wa[1], Ha[1], Wa[2], Ha[2]);
  4849. break t
  4850. }
  4851. v += j
  4852. }
  4853. t.quadraticCurveTo(C, D, A, k), r = A, o = k;
  4854. break;
  4855. case Ga.A:
  4856. var O = p[_++],
  4857. R = p[_++],
  4858. N = p[_++],
  4859. E = p[_++],
  4860. z = p[_++],
  4861. V = p[_++],
  4862. B = p[_++],
  4863. F = !p[_++],
  4864. G = N > E ? N : E,
  4865. W = Ja(N - E) > .001,
  4866. H = z + V,
  4867. Y = !1;
  4868. if (y) v + (j = l[m++]) > u && (H = z + V * (u - v) / j, Y = !0), v += j;
  4869. if (W && t.ellipse ? t.ellipse(O, R, N, E, B, z, H, F) : t.arc(O, R, G, z, H, F), Y) break t;
  4870. w && (n = Ka(z) * N + O, i = $a(z) * E + R), r = Ka(H) * N + O, o = $a(H) * E + R;
  4871. break;
  4872. case Ga.R:
  4873. n = r = p[_], i = o = p[_ + 1], a = p[_++], s = p[_++];
  4874. var X = p[_++],
  4875. U = p[_++];
  4876. if (y) {
  4877. if (v + (j = l[m++]) > u) {
  4878. var Z = u - v;
  4879. t.moveTo(a, s), t.lineTo(a + ja(Z, X), s), (Z -= X) > 0 && t.lineTo(a + X, s + ja(Z, U)), (Z -= U) > 0 && t.lineTo(a + qa(X - Z, 0), s + U), (Z -= X) > 0 && t.lineTo(a, s + qa(U - Z, 0));
  4880. break t
  4881. }
  4882. v += j
  4883. }
  4884. t.rect(a, s, X, U);
  4885. break;
  4886. case Ga.Z:
  4887. if (y) {
  4888. var j;
  4889. if (v + (j = l[m++]) > u) {
  4890. I = (u - v) / j;
  4891. t.lineTo(r * (1 - I) + n * I, o * (1 - I) + i * I);
  4892. break t
  4893. }
  4894. v += j
  4895. }
  4896. t.closePath(), r = n, o = i
  4897. }
  4898. }
  4899. }, t.prototype.clone = function () {
  4900. var e = new t,
  4901. n = this.data;
  4902. return e.data = n.slice ? n.slice() : Array.prototype.slice.call(n), e._len = this._len, e
  4903. }, t.CMD = Ga, t.initDefaultProps = function () {
  4904. var e = t.prototype;
  4905. e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0
  4906. }(), t
  4907. }();
  4908. function as(t, e, n, i, r, o, a) {
  4909. if (0 === r) return !1;
  4910. var s = r,
  4911. l = 0;
  4912. if (a > e + s && a > i + s || a < e - s && a < i - s || o > t + s && o > n + s || o < t - s && o < n - s) return !1;
  4913. if (t === n) return Math.abs(o - t) <= s / 2;
  4914. var u = (l = (e - i) / (t - n)) * o - a + (t * i - n * e) / (t - n);
  4915. return u * u / (l * l + 1) <= s / 2 * s / 2
  4916. }
  4917. function ss(t, e, n, i, r, o, a, s, l, u, h) {
  4918. if (0 === l) return !1;
  4919. var c = l;
  4920. return !(h > e + c && h > i + c && h > o + c && h > s + c || h < e - c && h < i - c && h < o - c && h < s - c || u > t + c && u > n + c && u > r + c && u > a + c || u < t - c && u < n - c && u < r - c && u < a - c) && Sn(t, e, n, i, r, o, a, s, u, h, null) <= c / 2
  4921. }
  4922. function ls(t, e, n, i, r, o, a, s, l) {
  4923. if (0 === a) return !1;
  4924. var u = a;
  4925. return !(l > e + u && l > i + u && l > o + u || l < e - u && l < i - u && l < o - u || s > t + u && s > n + u && s > r + u || s < t - u && s < n - u && s < r - u) && An(t, e, n, i, r, o, s, l, null) <= u / 2
  4926. }
  4927. var us = 2 * Math.PI;
  4928. function hs(t) {
  4929. return (t %= us) < 0 && (t += us), t
  4930. }
  4931. var cs = 2 * Math.PI;
  4932. function ps(t, e, n, i, r, o, a, s, l) {
  4933. if (0 === a) return !1;
  4934. var u = a;
  4935. s -= t, l -= e;
  4936. var h = Math.sqrt(s * s + l * l);
  4937. if (h - u > n || h + u < n) return !1;
  4938. if (Math.abs(i - r) % cs < 1e-4) return !0;
  4939. if (o) {
  4940. var c = i;
  4941. i = hs(r), r = hs(c)
  4942. } else i = hs(i), r = hs(r);
  4943. i > r && (r += cs);
  4944. var p = Math.atan2(l, s);
  4945. return p < 0 && (p += cs), p >= i && p <= r || p + cs >= i && p + cs <= r
  4946. }
  4947. function ds(t, e, n, i, r, o) {
  4948. if (o > e && o > i || o < e && o < i) return 0;
  4949. if (i === e) return 0;
  4950. var a = (o - e) / (i - e),
  4951. s = i < e ? 1 : -1;
  4952. 1 !== a && 0 !== a || (s = i < e ? .5 : -.5);
  4953. var l = a * (n - t) + t;
  4954. return l === r ? 1 / 0 : l > r ? s : 0
  4955. }
  4956. var fs = os.CMD,
  4957. gs = 2 * Math.PI;
  4958. var ys = [-1, -1, -1],
  4959. vs = [-1, -1];
  4960. function ms(t, e, n, i, r, o, a, s, l, u) {
  4961. if (u > e && u > i && u > o && u > s || u < e && u < i && u < o && u < s) return 0;
  4962. var h, c = _n(e, i, o, s, u, ys);
  4963. if (0 === c) return 0;
  4964. for (var p = 0, d = -1, f = void 0, g = void 0, y = 0; y < c; y++) {
  4965. var v = ys[y],
  4966. m = 0 === v || 1 === v ? .5 : 1;
  4967. mn(t, n, r, a, v) < l || (d < 0 && (d = bn(e, i, o, s, vs), vs[1] < vs[0] && d > 1 && (h = void 0, h = vs[0], vs[0] = vs[1], vs[1] = h), f = mn(e, i, o, s, vs[0]), d > 1 && (g = mn(e, i, o, s, vs[1]))), 2 === d ? v < vs[0] ? p += f < e ? m : -m : v < vs[1] ? p += g < f ? m : -m : p += s < g ? m : -m : v < vs[0] ? p += f < e ? m : -m : p += s < f ? m : -m)
  4968. }
  4969. return p
  4970. }
  4971. function xs(t, e, n, i, r, o, a, s) {
  4972. if (s > e && s > i && s > o || s < e && s < i && s < o) return 0;
  4973. var l = function (t, e, n, i, r) {
  4974. var o = t - 2 * e + n,
  4975. a = 2 * (e - t),
  4976. s = t - i,
  4977. l = 0;
  4978. if (yn(o)) vn(a) && (h = -s / a) >= 0 && h <= 1 && (r[l++] = h);
  4979. else {
  4980. var u = a * a - 4 * o * s;
  4981. if (yn(u))(h = -a / (2 * o)) >= 0 && h <= 1 && (r[l++] = h);
  4982. else if (u > 0) {
  4983. var h, c = ln(u),
  4984. p = (-a - c) / (2 * o);
  4985. (h = (-a + c) / (2 * o)) >= 0 && h <= 1 && (r[l++] = h), p >= 0 && p <= 1 && (r[l++] = p)
  4986. }
  4987. }
  4988. return l
  4989. }(e, i, o, s, ys);
  4990. if (0 === l) return 0;
  4991. var u = Cn(e, i, o);
  4992. if (u >= 0 && u <= 1) {
  4993. for (var h = 0, c = In(e, i, o, u), p = 0; p < l; p++) {
  4994. var d = 0 === ys[p] || 1 === ys[p] ? .5 : 1;
  4995. In(t, n, r, ys[p]) < a || (ys[p] < u ? h += c < e ? d : -d : h += o < c ? d : -d)
  4996. }
  4997. return h
  4998. }
  4999. d = 0 === ys[0] || 1 === ys[0] ? .5 : 1;
  5000. return In(t, n, r, ys[0]) < a ? 0 : o < e ? d : -d
  5001. }
  5002. function _s(t, e, n, i, r, o, a, s) {
  5003. if ((s -= e) > n || s < -n) return 0;
  5004. var l = Math.sqrt(n * n - s * s);
  5005. ys[0] = -l, ys[1] = l;
  5006. var u = Math.abs(i - r);
  5007. if (u < 1e-4) return 0;
  5008. if (u >= gs - 1e-4) {
  5009. i = 0, r = gs;
  5010. var h = o ? 1 : -1;
  5011. return a >= ys[0] + t && a <= ys[1] + t ? h : 0
  5012. }
  5013. if (i > r) {
  5014. var c = i;
  5015. i = r, r = c
  5016. }
  5017. i < 0 && (i += gs, r += gs);
  5018. for (var p = 0, d = 0; d < 2; d++) {
  5019. var f = ys[d];
  5020. if (f + t > a) {
  5021. var g = Math.atan2(s, f);
  5022. h = o ? 1 : -1;
  5023. g < 0 && (g = gs + g), (g >= i && g <= r || g + gs >= i && g + gs <= r) && (g > Math.PI / 2 && g < 1.5 * Math.PI && (h = -h), p += h)
  5024. }
  5025. }
  5026. return p
  5027. }
  5028. function bs(t, e, n, i, r) {
  5029. for (var o, a, s, l, u = t.data, h = t.len(), c = 0, p = 0, d = 0, f = 0, g = 0, y = 0; y < h;) {
  5030. var v = u[y++],
  5031. m = 1 === y;
  5032. switch (v === fs.M && y > 1 && (n || (c += ds(p, d, f, g, i, r))), m && (f = p = u[y], g = d = u[y + 1]), v) {
  5033. case fs.M:
  5034. p = f = u[y++], d = g = u[y++];
  5035. break;
  5036. case fs.L:
  5037. if (n) {
  5038. if (as(p, d, u[y], u[y + 1], e, i, r)) return !0
  5039. } else c += ds(p, d, u[y], u[y + 1], i, r) || 0;
  5040. p = u[y++], d = u[y++];
  5041. break;
  5042. case fs.C:
  5043. if (n) {
  5044. if (ss(p, d, u[y++], u[y++], u[y++], u[y++], u[y], u[y + 1], e, i, r)) return !0
  5045. } else c += ms(p, d, u[y++], u[y++], u[y++], u[y++], u[y], u[y + 1], i, r) || 0;
  5046. p = u[y++], d = u[y++];
  5047. break;
  5048. case fs.Q:
  5049. if (n) {
  5050. if (ls(p, d, u[y++], u[y++], u[y], u[y + 1], e, i, r)) return !0
  5051. } else c += xs(p, d, u[y++], u[y++], u[y], u[y + 1], i, r) || 0;
  5052. p = u[y++], d = u[y++];
  5053. break;
  5054. case fs.A:
  5055. var x = u[y++],
  5056. _ = u[y++],
  5057. b = u[y++],
  5058. w = u[y++],
  5059. S = u[y++],
  5060. M = u[y++];
  5061. y += 1;
  5062. var I = !!(1 - u[y++]);
  5063. o = Math.cos(S) * b + x, a = Math.sin(S) * w + _, m ? (f = o, g = a) : c += ds(p, d, o, a, i, r);
  5064. var T = (i - x) * w / b + x;
  5065. if (n) {
  5066. if (ps(x, _, w, S, S + M, I, e, T, r)) return !0
  5067. } else c += _s(x, _, w, S, S + M, I, T, r);
  5068. p = Math.cos(S + M) * b + x, d = Math.sin(S + M) * w + _;
  5069. break;
  5070. case fs.R:
  5071. if (f = p = u[y++], g = d = u[y++], o = f + u[y++], a = g + u[y++], n) {
  5072. if (as(f, g, o, g, e, i, r) || as(o, g, o, a, e, i, r) || as(o, a, f, a, e, i, r) || as(f, a, f, g, e, i, r)) return !0
  5073. } else c += ds(o, g, o, a, i, r), c += ds(f, a, f, g, i, r);
  5074. break;
  5075. case fs.Z:
  5076. if (n) {
  5077. if (as(p, d, f, g, e, i, r)) return !0
  5078. } else c += ds(p, d, f, g, i, r);
  5079. p = f, d = g
  5080. }
  5081. }
  5082. return n || (s = d, l = g, Math.abs(s - l) < 1e-4) || (c += ds(p, d, f, g, i, r) || 0), 0 !== c
  5083. }
  5084. var ws = k({
  5085. fill: "#000",
  5086. stroke: null,
  5087. strokePercent: 1,
  5088. fillOpacity: 1,
  5089. strokeOpacity: 1,
  5090. lineDashOffset: 0,
  5091. lineWidth: 1,
  5092. lineCap: "butt",
  5093. miterLimit: 10,
  5094. strokeNoScale: !1,
  5095. strokeFirst: !1
  5096. }, xa),
  5097. Ss = {
  5098. style: k({
  5099. fill: !0,
  5100. stroke: !0,
  5101. strokePercent: !0,
  5102. fillOpacity: !0,
  5103. strokeOpacity: !0,
  5104. lineDashOffset: !0,
  5105. lineWidth: !0,
  5106. miterLimit: !0
  5107. }, _a.style)
  5108. },
  5109. Ms = yr.concat(["invisible", "culling", "z", "z2", "zlevel", "parent"]),
  5110. Is = function (t) {
  5111. function e(e) {
  5112. return t.call(this, e) || this
  5113. }
  5114. var i;
  5115. return n(e, t), e.prototype.update = function () {
  5116. var n = this;
  5117. t.prototype.update.call(this);
  5118. var i = this.style;
  5119. if (i.decal) {
  5120. var r = this._decalEl = this._decalEl || new e;
  5121. r.buildPath === e.prototype.buildPath && (r.buildPath = function (t) {
  5122. n.buildPath(t, n.shape)
  5123. }), r.silent = !0;
  5124. var o = r.style;
  5125. for (var a in i) o[a] !== i[a] && (o[a] = i[a]);
  5126. o.fill = i.fill ? i.decal : null, o.decal = null, o.shadowColor = null, i.strokeFirst && (o.stroke = null);
  5127. for (var s = 0; s < Ms.length; ++s) r[Ms[s]] = this[Ms[s]];
  5128. r.__dirty |= 1
  5129. } else this._decalEl && (this._decalEl = null)
  5130. }, e.prototype.getDecalElement = function () {
  5131. return this._decalEl
  5132. }, e.prototype._init = function (e) {
  5133. var n = G(e);
  5134. this.shape = this.getDefaultShape();
  5135. var i = this.getDefaultStyle();
  5136. i && this.useStyle(i);
  5137. for (var r = 0; r < n.length; r++) {
  5138. var o = n[r],
  5139. a = e[o];
  5140. "style" === o ? this.style ? A(this.style, a) : this.useStyle(a) : "shape" === o ? A(this.shape, a) : t.prototype.attrKV.call(this, o, a)
  5141. }
  5142. this.style || this.useStyle({})
  5143. }, e.prototype.getDefaultStyle = function () {
  5144. return null
  5145. }, e.prototype.getDefaultShape = function () {
  5146. return {}
  5147. }, e.prototype.canBeInsideText = function () {
  5148. return this.hasFill()
  5149. }, e.prototype.getInsideTextFill = function () {
  5150. var t = this.style.fill;
  5151. if ("none" !== t) {
  5152. if (U(t)) {
  5153. var e = oi(t, 0);
  5154. return e > .5 ? ar : e > .2 ? "#eee" : sr
  5155. }
  5156. if (t) return sr
  5157. }
  5158. return ar
  5159. }, e.prototype.getInsideTextStroke = function (t) {
  5160. var e = this.style.fill;
  5161. if (U(e)) {
  5162. var n = this.__zr;
  5163. if (!(!n || !n.isDarkMode()) === oi(t, 0) < .4) return e
  5164. }
  5165. }, e.prototype.buildPath = function (t, e, n) {}, e.prototype.pathUpdated = function () {
  5166. this.__dirty &= -5
  5167. }, e.prototype.getUpdatedPathProxy = function (t) {
  5168. return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, t), this.path
  5169. }, e.prototype.createPathProxy = function () {
  5170. this.path = new os(!1)
  5171. }, e.prototype.hasStroke = function () {
  5172. var t = this.style,
  5173. e = t.stroke;
  5174. return !(null == e || "none" === e || !(t.lineWidth > 0))
  5175. }, e.prototype.hasFill = function () {
  5176. var t = this.style.fill;
  5177. return null != t && "none" !== t
  5178. }, e.prototype.getBoundingRect = function () {
  5179. var t = this._rect,
  5180. e = this.style,
  5181. n = !t;
  5182. if (n) {
  5183. var i = !1;
  5184. this.path || (i = !0, this.createPathProxy());
  5185. var r = this.path;
  5186. (i || 4 & this.__dirty) && (r.beginPath(), this.buildPath(r, this.shape, !1), this.pathUpdated()), t = r.getBoundingRect()
  5187. }
  5188. if (this._rect = t, this.hasStroke() && this.path && this.path.len() > 0) {
  5189. var o = this._rectStroke || (this._rectStroke = t.clone());
  5190. if (this.__dirty || n) {
  5191. o.copy(t);
  5192. var a = e.strokeNoScale ? this.getLineScale() : 1,
  5193. s = e.lineWidth;
  5194. if (!this.hasFill()) {
  5195. var l = this.strokeContainThreshold;
  5196. s = Math.max(s, null == l ? 4 : l)
  5197. }
  5198. a > 1e-10 && (o.width += s / a, o.height += s / a, o.x -= s / a / 2, o.y -= s / a / 2)
  5199. }
  5200. return o
  5201. }
  5202. return t
  5203. }, e.prototype.contain = function (t, e) {
  5204. var n = this.transformCoordToLocal(t, e),
  5205. i = this.getBoundingRect(),
  5206. r = this.style;
  5207. if (t = n[0], e = n[1], i.contain(t, e)) {
  5208. var o = this.path;
  5209. if (this.hasStroke()) {
  5210. var a = r.lineWidth,
  5211. s = r.strokeNoScale ? this.getLineScale() : 1;
  5212. if (s > 1e-10 && (this.hasFill() || (a = Math.max(a, this.strokeContainThreshold)), function (t, e, n, i) {
  5213. return bs(t, e, !0, n, i)
  5214. }(o, a / s, t, e))) return !0
  5215. }
  5216. if (this.hasFill()) return function (t, e, n) {
  5217. return bs(t, 0, !1, e, n)
  5218. }(o, t, e)
  5219. }
  5220. return !1
  5221. }, e.prototype.dirtyShape = function () {
  5222. this.__dirty |= 4, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw()
  5223. }, e.prototype.dirty = function () {
  5224. this.dirtyStyle(), this.dirtyShape()
  5225. }, e.prototype.animateShape = function (t) {
  5226. return this.animate("shape", t)
  5227. }, e.prototype.updateDuringAnimation = function (t) {
  5228. "style" === t ? this.dirtyStyle() : "shape" === t ? this.dirtyShape() : this.markRedraw()
  5229. }, e.prototype.attrKV = function (e, n) {
  5230. "shape" === e ? this.setShape(n) : t.prototype.attrKV.call(this, e, n)
  5231. }, e.prototype.setShape = function (t, e) {
  5232. var n = this.shape;
  5233. return n || (n = this.shape = {}), "string" == typeof t ? n[t] = e : A(n, t), this.dirtyShape(), this
  5234. }, e.prototype.shapeChanged = function () {
  5235. return !!(4 & this.__dirty)
  5236. }, e.prototype.createStyle = function (t) {
  5237. return mt(ws, t)
  5238. }, e.prototype._innerSaveToNormal = function (e) {
  5239. t.prototype._innerSaveToNormal.call(this, e);
  5240. var n = this._normalState;
  5241. e.shape && !n.shape && (n.shape = A({}, this.shape))
  5242. }, e.prototype._applyStateObj = function (e, n, i, r, o, a) {
  5243. t.prototype._applyStateObj.call(this, e, n, i, r, o, a);
  5244. var s, l = !(n && r);
  5245. if (n && n.shape ? o ? r ? s = n.shape : (s = A({}, i.shape), A(s, n.shape)) : (s = A({}, r ? this.shape : i.shape), A(s, n.shape)) : l && (s = i.shape), s)
  5246. if (o) {
  5247. this.shape = A({}, this.shape);
  5248. for (var u = {}, h = G(s), c = 0; c < h.length; c++) {
  5249. var p = h[c];
  5250. "object" == typeof s[p] ? this.shape[p] = s[p] : u[p] = s[p]
  5251. }
  5252. this._transitionState(e, {
  5253. shape: u
  5254. }, a)
  5255. } else this.shape = s, this.dirtyShape()
  5256. }, e.prototype._mergeStates = function (e) {
  5257. for (var n, i = t.prototype._mergeStates.call(this, e), r = 0; r < e.length; r++) {
  5258. var o = e[r];
  5259. o.shape && (n = n || {}, this._mergeStyle(n, o.shape))
  5260. }
  5261. return n && (i.shape = n), i
  5262. }, e.prototype.getAnimationStyleProps = function () {
  5263. return Ss
  5264. }, e.prototype.isZeroArea = function () {
  5265. return !1
  5266. }, e.extend = function (t) {
  5267. var i = function (e) {
  5268. function i(n) {
  5269. var i = e.call(this, n) || this;
  5270. return t.init && t.init.call(i, n), i
  5271. }
  5272. return n(i, e), i.prototype.getDefaultStyle = function () {
  5273. return T(t.style)
  5274. }, i.prototype.getDefaultShape = function () {
  5275. return T(t.shape)
  5276. }, i
  5277. }(e);
  5278. for (var r in t) "function" == typeof t[r] && (i.prototype[r] = t[r]);
  5279. return i
  5280. }, e.initDefaultProps = ((i = e.prototype).type = "path", i.strokeContainThreshold = 5, i.segmentIgnoreThreshold = 0, i.subPixelOptimize = !1, i.autoBatch = !1, void(i.__dirty = 7)), e
  5281. }(Sa),
  5282. Ts = k({
  5283. strokeFirst: !0,
  5284. font: a,
  5285. x: 0,
  5286. y: 0,
  5287. textAlign: "left",
  5288. textBaseline: "top",
  5289. miterLimit: 2
  5290. }, ws),
  5291. Cs = function (t) {
  5292. function e() {
  5293. return null !== t && t.apply(this, arguments) || this
  5294. }
  5295. return n(e, t), e.prototype.hasStroke = function () {
  5296. var t = this.style,
  5297. e = t.stroke;
  5298. return null != e && "none" !== e && t.lineWidth > 0
  5299. }, e.prototype.hasFill = function () {
  5300. var t = this.style.fill;
  5301. return null != t && "none" !== t
  5302. }, e.prototype.createStyle = function (t) {
  5303. return mt(Ts, t)
  5304. }, e.prototype.setBoundingRect = function (t) {
  5305. this._rect = t
  5306. }, e.prototype.getBoundingRect = function () {
  5307. var t = this.style;
  5308. if (!this._rect) {
  5309. var e = t.text;
  5310. null != e ? e += "" : e = "";
  5311. var n = br(e, t.font, t.textAlign, t.textBaseline);
  5312. if (n.x += t.x || 0, n.y += t.y || 0, this.hasStroke()) {
  5313. var i = t.lineWidth;
  5314. n.x -= i / 2, n.y -= i / 2, n.width += i, n.height += i
  5315. }
  5316. this._rect = n
  5317. }
  5318. return this._rect
  5319. }, e.initDefaultProps = void(e.prototype.dirtyRectTolerance = 10), e
  5320. }(Sa);
  5321. Cs.prototype.type = "tspan";
  5322. var Ds = k({
  5323. x: 0,
  5324. y: 0
  5325. }, xa),
  5326. As = {
  5327. style: k({
  5328. x: !0,
  5329. y: !0,
  5330. width: !0,
  5331. height: !0,
  5332. sx: !0,
  5333. sy: !0,
  5334. sWidth: !0,
  5335. sHeight: !0
  5336. }, _a.style)
  5337. };
  5338. var ks = function (t) {
  5339. function e() {
  5340. return null !== t && t.apply(this, arguments) || this
  5341. }
  5342. return n(e, t), e.prototype.createStyle = function (t) {
  5343. return mt(Ds, t)
  5344. }, e.prototype._getSize = function (t) {
  5345. var e = this.style,
  5346. n = e[t];
  5347. if (null != n) return n;
  5348. var i, r = (i = e.image) && "string" != typeof i && i.width && i.height ? e.image : this.__image;
  5349. if (!r) return 0;
  5350. var o = "width" === t ? "height" : "width",
  5351. a = e[o];
  5352. return null == a ? r[t] : r[t] / r[o] * a
  5353. }, e.prototype.getWidth = function () {
  5354. return this._getSize("width")
  5355. }, e.prototype.getHeight = function () {
  5356. return this._getSize("height")
  5357. }, e.prototype.getAnimationStyleProps = function () {
  5358. return As
  5359. }, e.prototype.getBoundingRect = function () {
  5360. var t = this.style;
  5361. return this._rect || (this._rect = new ze(t.x || 0, t.y || 0, this.getWidth(), this.getHeight())), this._rect
  5362. }, e
  5363. }(Sa);
  5364. ks.prototype.type = "image";
  5365. var Ls = Math.round;
  5366. function Ps(t, e, n) {
  5367. if (e) {
  5368. var i = e.x1,
  5369. r = e.x2,
  5370. o = e.y1,
  5371. a = e.y2;
  5372. t.x1 = i, t.x2 = r, t.y1 = o, t.y2 = a;
  5373. var s = n && n.lineWidth;
  5374. return s ? (Ls(2 * i) === Ls(2 * r) && (t.x1 = t.x2 = Rs(i, s, !0)), Ls(2 * o) === Ls(2 * a) && (t.y1 = t.y2 = Rs(o, s, !0)), t) : t
  5375. }
  5376. }
  5377. function Os(t, e, n) {
  5378. if (e) {
  5379. var i = e.x,
  5380. r = e.y,
  5381. o = e.width,
  5382. a = e.height;
  5383. t.x = i, t.y = r, t.width = o, t.height = a;
  5384. var s = n && n.lineWidth;
  5385. return s ? (t.x = Rs(i, s, !0), t.y = Rs(r, s, !0), t.width = Math.max(Rs(i + o, s, !1) - t.x, 0 === o ? 0 : 1), t.height = Math.max(Rs(r + a, s, !1) - t.y, 0 === a ? 0 : 1), t) : t
  5386. }
  5387. }
  5388. function Rs(t, e, n) {
  5389. if (!e) return t;
  5390. var i = Ls(2 * t);
  5391. return (i + Ls(e)) % 2 == 0 ? i / 2 : (i + (n ? 1 : -1)) / 2
  5392. }
  5393. var Ns = function () {
  5394. this.x = 0, this.y = 0, this.width = 0, this.height = 0
  5395. },
  5396. Es = {},
  5397. zs = function (t) {
  5398. function e(e) {
  5399. return t.call(this, e) || this
  5400. }
  5401. return n(e, t), e.prototype.getDefaultShape = function () {
  5402. return new Ns
  5403. }, e.prototype.buildPath = function (t, e) {
  5404. var n, i, r, o;
  5405. if (this.subPixelOptimize) {
  5406. var a = Os(Es, e, this.style);
  5407. n = a.x, i = a.y, r = a.width, o = a.height, a.r = e.r, e = a
  5408. } else n = e.x, i = e.y, r = e.width, o = e.height;
  5409. e.r ? function (t, e) {
  5410. var n, i, r, o, a, s = e.x,
  5411. l = e.y,
  5412. u = e.width,
  5413. h = e.height,
  5414. c = e.r;
  5415. u < 0 && (s += u, u = -u), h < 0 && (l += h, h = -h), "number" == typeof c ? n = i = r = o = c : c instanceof Array ? 1 === c.length ? n = i = r = o = c[0] : 2 === c.length ? (n = r = c[0], i = o = c[1]) : 3 === c.length ? (n = c[0], i = o = c[1], r = c[2]) : (n = c[0], i = c[1], r = c[2], o = c[3]) : n = i = r = o = 0, n + i > u && (n *= u / (a = n + i), i *= u / a), r + o > u && (r *= u / (a = r + o), o *= u / a), i + r > h && (i *= h / (a = i + r), r *= h / a), n + o > h && (n *= h / (a = n + o), o *= h / a), t.moveTo(s + n, l), t.lineTo(s + u - i, l), 0 !== i && t.arc(s + u - i, l + i, i, -Math.PI / 2, 0), t.lineTo(s + u, l + h - r), 0 !== r && t.arc(s + u - r, l + h - r, r, 0, Math.PI / 2), t.lineTo(s + o, l + h), 0 !== o && t.arc(s + o, l + h - o, o, Math.PI / 2, Math.PI), t.lineTo(s, l + n), 0 !== n && t.arc(s + n, l + n, n, Math.PI, 1.5 * Math.PI)
  5416. }(t, e) : t.rect(n, i, r, o)
  5417. }, e.prototype.isZeroArea = function () {
  5418. return !this.shape.width || !this.shape.height
  5419. }, e
  5420. }(Is);
  5421. zs.prototype.type = "rect";
  5422. var Vs = {
  5423. fill: "#000"
  5424. },
  5425. Bs = {
  5426. style: k({
  5427. fill: !0,
  5428. stroke: !0,
  5429. fillOpacity: !0,
  5430. strokeOpacity: !0,
  5431. lineWidth: !0,
  5432. fontSize: !0,
  5433. lineHeight: !0,
  5434. width: !0,
  5435. height: !0,
  5436. textShadowColor: !0,
  5437. textShadowBlur: !0,
  5438. textShadowOffsetX: !0,
  5439. textShadowOffsetY: !0,
  5440. backgroundColor: !0,
  5441. padding: !0,
  5442. borderColor: !0,
  5443. borderWidth: !0,
  5444. borderRadius: !0
  5445. }, _a.style)
  5446. },
  5447. Fs = function (t) {
  5448. function e(e) {
  5449. var n = t.call(this) || this;
  5450. return n.type = "text", n._children = [], n._defaultStyle = Vs, n.attr(e), n
  5451. }
  5452. return n(e, t), e.prototype.childrenRef = function () {
  5453. return this._children
  5454. }, e.prototype.update = function () {
  5455. t.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
  5456. for (var e = 0; e < this._children.length; e++) {
  5457. var n = this._children[e];
  5458. n.zlevel = this.zlevel, n.z = this.z, n.z2 = this.z2, n.culling = this.culling, n.cursor = this.cursor, n.invisible = this.invisible
  5459. }
  5460. }, e.prototype.updateTransform = function () {
  5461. var e = this.innerTransformable;
  5462. e ? (e.updateTransform(), e.transform && (this.transform = e.transform)) : t.prototype.updateTransform.call(this)
  5463. }, e.prototype.getLocalTransform = function (e) {
  5464. var n = this.innerTransformable;
  5465. return n ? n.getLocalTransform(e) : t.prototype.getLocalTransform.call(this, e)
  5466. }, e.prototype.getComputedTransform = function () {
  5467. return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), t.prototype.getComputedTransform.call(this)
  5468. }, e.prototype._updateSubTexts = function () {
  5469. var t;
  5470. this._childCursor = 0, Zs(t = this.style), E(t.rich, Zs), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated()
  5471. }, e.prototype.addSelfToZr = function (e) {
  5472. t.prototype.addSelfToZr.call(this, e);
  5473. for (var n = 0; n < this._children.length; n++) this._children[n].__zr = e
  5474. }, e.prototype.removeSelfFromZr = function (e) {
  5475. t.prototype.removeSelfFromZr.call(this, e);
  5476. for (var n = 0; n < this._children.length; n++) this._children[n].__zr = null
  5477. }, e.prototype.getBoundingRect = function () {
  5478. if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
  5479. for (var t = new ze(0, 0, 0, 0), e = this._children, n = [], i = null, r = 0; r < e.length; r++) {
  5480. var o = e[r],
  5481. a = o.getBoundingRect(),
  5482. s = o.getLocalTransform(n);
  5483. s ? (t.copy(a), t.applyTransform(s), (i = i || t.clone()).union(t)) : (i = i || a.clone()).union(a)
  5484. }
  5485. this._rect = i || t
  5486. }
  5487. return this._rect
  5488. }, e.prototype.setDefaultTextStyle = function (t) {
  5489. this._defaultStyle = t || Vs
  5490. }, e.prototype.setTextContent = function (t) {
  5491. 0
  5492. }, e.prototype._mergeStyle = function (t, e) {
  5493. if (!e) return t;
  5494. var n = e.rich,
  5495. i = t.rich || n && {};
  5496. return A(t, e), n && i ? (this._mergeRich(i, n), t.rich = i) : i && (t.rich = i), t
  5497. }, e.prototype._mergeRich = function (t, e) {
  5498. for (var n = G(e), i = 0; i < n.length; i++) {
  5499. var r = n[i];
  5500. t[r] = t[r] || {}, A(t[r], e[r])
  5501. }
  5502. }, e.prototype.getAnimationStyleProps = function () {
  5503. return Bs
  5504. }, e.prototype._getOrCreateChild = function (t) {
  5505. var e = this._children[this._childCursor];
  5506. return e && e instanceof t || (e = new t), this._children[this._childCursor++] = e, e.__zr = this.__zr, e.parent = this, e
  5507. }, e.prototype._updatePlainTexts = function () {
  5508. var t = this.style,
  5509. e = t.font || a,
  5510. n = t.padding,
  5511. i = function (t, e) {
  5512. null != t && (t += "");
  5513. var n, i = e.overflow,
  5514. r = e.padding,
  5515. o = e.font,
  5516. a = "truncate" === i,
  5517. s = Mr(o),
  5518. l = rt(e.lineHeight, s),
  5519. u = !!e.backgroundColor,
  5520. h = "truncate" === e.lineOverflow,
  5521. c = e.width,
  5522. p = (n = null == c || "break" !== i && "breakAll" !== i ? t ? t.split("\n") : [] : t ? va(t, e.font, c, "breakAll" === i, 0).lines : []).length * l,
  5523. d = rt(e.height, p);
  5524. if (p > d && h) {
  5525. var f = Math.floor(d / l);
  5526. n = n.slice(0, f)
  5527. }
  5528. if (t && a && null != c)
  5529. for (var g = la(c, o, e.ellipsis, {
  5530. minChar: e.truncateMinChar,
  5531. placeholder: e.placeholder
  5532. }), y = 0; y < n.length; y++) n[y] = ua(n[y], g);
  5533. var v = d,
  5534. m = 0;
  5535. for (y = 0; y < n.length; y++) m = Math.max(xr(n[y], o), m);
  5536. null == c && (c = m);
  5537. var x = m;
  5538. return r && (v += r[0] + r[2], x += r[1] + r[3], c += r[1] + r[3]), u && (x = c), {
  5539. lines: n,
  5540. height: d,
  5541. outerWidth: x,
  5542. outerHeight: v,
  5543. lineHeight: l,
  5544. calculatedLineHeight: s,
  5545. contentWidth: m,
  5546. contentHeight: p,
  5547. width: c
  5548. }
  5549. }($s(t), t),
  5550. r = Js(t),
  5551. o = !!t.backgroundColor,
  5552. s = i.outerHeight,
  5553. l = i.outerWidth,
  5554. u = i.contentWidth,
  5555. h = i.lines,
  5556. c = i.lineHeight,
  5557. p = this._defaultStyle,
  5558. d = t.x || 0,
  5559. f = t.y || 0,
  5560. g = t.align || p.align || "left",
  5561. y = t.verticalAlign || p.verticalAlign || "top",
  5562. v = d,
  5563. m = Sr(f, i.contentHeight, y);
  5564. if (r || n) {
  5565. var x = wr(d, l, g),
  5566. _ = Sr(f, s, y);
  5567. r && this._renderBackground(t, t, x, _, l, s)
  5568. }
  5569. m += c / 2, n && (v = Ks(d, g, n), "top" === y ? m += n[0] : "bottom" === y && (m -= n[2]));
  5570. for (var b = 0, w = !1, S = (qs("fill" in t ? t.fill : (w = !0, p.fill))), M = (js("stroke" in t ? t.stroke : o || p.autoStroke && !w ? null : (b = 2, p.stroke))), I = t.textShadowBlur > 0, T = null != t.width && ("truncate" === t.overflow || "break" === t.overflow || "breakAll" === t.overflow), C = i.calculatedLineHeight, D = 0; D < h.length; D++) {
  5571. var A = this._getOrCreateChild(Cs),
  5572. k = A.createStyle();
  5573. A.useStyle(k), k.text = h[D], k.x = v, k.y = m, g && (k.textAlign = g), k.textBaseline = "middle", k.opacity = t.opacity, k.strokeFirst = !0, I && (k.shadowBlur = t.textShadowBlur || 0, k.shadowColor = t.textShadowColor || "transparent", k.shadowOffsetX = t.textShadowOffsetX || 0, k.shadowOffsetY = t.textShadowOffsetY || 0), k.stroke = M, k.fill = S, M && (k.lineWidth = t.lineWidth || b, k.lineDash = t.lineDash, k.lineDashOffset = t.lineDashOffset || 0), k.font = e, Xs(k, t), m += c, T && A.setBoundingRect(new ze(wr(k.x, t.width, k.textAlign), Sr(k.y, C, k.textBaseline), u, C))
  5574. }
  5575. }, e.prototype._updateRichTexts = function () {
  5576. var t = this.style,
  5577. e = function (t, e) {
  5578. var n = new da;
  5579. if (null != t && (t += ""), !t) return n;
  5580. for (var i, r = e.width, o = e.height, a = e.overflow, s = "break" !== a && "breakAll" !== a || null == r ? null : {
  5581. width: r,
  5582. accumWidth: 0,
  5583. breakAll: "breakAll" === a
  5584. }, l = aa.lastIndex = 0; null != (i = aa.exec(t));) {
  5585. var u = i.index;
  5586. u > l && fa(n, t.substring(l, u), e, s), fa(n, i[2], e, s, i[1]), l = aa.lastIndex
  5587. }
  5588. l < t.length && fa(n, t.substring(l, t.length), e, s);
  5589. var h = [],
  5590. c = 0,
  5591. p = 0,
  5592. d = e.padding,
  5593. f = "truncate" === a,
  5594. g = "truncate" === e.lineOverflow;
  5595. function y(t, e, n) {
  5596. t.width = e, t.lineHeight = n, c += n, p = Math.max(p, e)
  5597. }
  5598. t: for (var v = 0; v < n.lines.length; v++) {
  5599. for (var m = n.lines[v], x = 0, _ = 0, b = 0; b < m.tokens.length; b++) {
  5600. var w = (P = m.tokens[b]).styleName && e.rich[P.styleName] || {},
  5601. S = P.textPadding = w.padding,
  5602. M = S ? S[1] + S[3] : 0,
  5603. I = P.font = w.font || e.font;
  5604. P.contentHeight = Mr(I);
  5605. var T = rt(w.height, P.contentHeight);
  5606. if (P.innerHeight = T, S && (T += S[0] + S[2]), P.height = T, P.lineHeight = ot(w.lineHeight, e.lineHeight, T), P.align = w && w.align || e.align, P.verticalAlign = w && w.verticalAlign || "middle", g && null != o && c + P.lineHeight > o) {
  5607. b > 0 ? (m.tokens = m.tokens.slice(0, b), y(m, _, x), n.lines = n.lines.slice(0, v + 1)) : n.lines = n.lines.slice(0, v);
  5608. break t
  5609. }
  5610. var C = w.width,
  5611. D = null == C || "auto" === C;
  5612. if ("string" == typeof C && "%" === C.charAt(C.length - 1)) P.percentWidth = C, h.push(P), P.contentWidth = xr(P.text, I);
  5613. else {
  5614. if (D) {
  5615. var A = w.backgroundColor,
  5616. k = A && A.image;
  5617. k && oa(k = na(k)) && (P.width = Math.max(P.width, k.width * T / k.height))
  5618. }
  5619. var L = f && null != r ? r - _ : null;
  5620. null != L && L < P.width ? !D || L < M ? (P.text = "", P.width = P.contentWidth = 0) : (P.text = sa(P.text, L - M, I, e.ellipsis, {
  5621. minChar: e.truncateMinChar
  5622. }), P.width = P.contentWidth = xr(P.text, I)) : P.contentWidth = xr(P.text, I)
  5623. }
  5624. P.width += M, _ += P.width, w && (x = Math.max(x, P.lineHeight))
  5625. }
  5626. y(m, _, x)
  5627. }
  5628. for (n.outerWidth = n.width = rt(r, p), n.outerHeight = n.height = rt(o, c), n.contentHeight = c, n.contentWidth = p, d && (n.outerWidth += d[1] + d[3], n.outerHeight += d[0] + d[2]), v = 0; v < h.length; v++) {
  5629. var P, O = (P = h[v]).percentWidth;
  5630. P.width = parseInt(O, 10) / 100 * n.width
  5631. }
  5632. return n
  5633. }($s(t), t),
  5634. n = e.width,
  5635. i = e.outerWidth,
  5636. r = e.outerHeight,
  5637. o = t.padding,
  5638. a = t.x || 0,
  5639. s = t.y || 0,
  5640. l = this._defaultStyle,
  5641. u = t.align || l.align,
  5642. h = t.verticalAlign || l.verticalAlign,
  5643. c = wr(a, i, u),
  5644. p = Sr(s, r, h),
  5645. d = c,
  5646. f = p;
  5647. o && (d += o[3], f += o[0]);
  5648. var g = d + n;
  5649. Js(t) && this._renderBackground(t, t, c, p, i, r);
  5650. for (var y = !!t.backgroundColor, v = 0; v < e.lines.length; v++) {
  5651. for (var m = e.lines[v], x = m.tokens, _ = x.length, b = m.lineHeight, w = m.width, S = 0, M = d, I = g, T = _ - 1, C = void 0; S < _ && (!(C = x[S]).align || "left" === C.align);) this._placeToken(C, t, b, f, M, "left", y), w -= C.width, M += C.width, S++;
  5652. for (; T >= 0 && "right" === (C = x[T]).align;) this._placeToken(C, t, b, f, I, "right", y), w -= C.width, I -= C.width, T--;
  5653. for (M += (n - (M - d) - (g - I) - w) / 2; S <= T;) C = x[S], this._placeToken(C, t, b, f, M + C.width / 2, "center", y), M += C.width, S++;
  5654. f += b
  5655. }
  5656. }, e.prototype._placeToken = function (t, e, n, i, r, o, s) {
  5657. var l = e.rich[t.styleName] || {};
  5658. l.text = t.text;
  5659. var u = t.verticalAlign,
  5660. h = i + n / 2;
  5661. "top" === u ? h = i + t.height / 2 : "bottom" === u && (h = i + n - t.height / 2), !t.isLineHolder && Js(l) && this._renderBackground(l, e, "right" === o ? r - t.width : "center" === o ? r - t.width / 2 : r, h - t.height / 2, t.width, t.height);
  5662. var c = !!l.backgroundColor,
  5663. p = t.textPadding;
  5664. p && (r = Ks(r, o, p), h -= t.height / 2 - p[0] - t.innerHeight / 2);
  5665. var d = this._getOrCreateChild(Cs),
  5666. f = d.createStyle();
  5667. d.useStyle(f);
  5668. var g = this._defaultStyle,
  5669. y = !1,
  5670. v = 0,
  5671. m = qs("fill" in l ? l.fill : "fill" in e ? e.fill : (y = !0, g.fill)),
  5672. x = js("stroke" in l ? l.stroke : "stroke" in e ? e.stroke : c || s || g.autoStroke && !y ? null : (v = 2, g.stroke)),
  5673. _ = l.textShadowBlur > 0 || e.textShadowBlur > 0;
  5674. f.text = t.text, f.x = r, f.y = h, _ && (f.shadowBlur = l.textShadowBlur || e.textShadowBlur || 0, f.shadowColor = l.textShadowColor || e.textShadowColor || "transparent", f.shadowOffsetX = l.textShadowOffsetX || e.textShadowOffsetX || 0, f.shadowOffsetY = l.textShadowOffsetY || e.textShadowOffsetY || 0), f.textAlign = o, f.textBaseline = "middle", f.font = t.font || a, f.opacity = ot(l.opacity, e.opacity, 1), Xs(f, l), x && (f.lineWidth = ot(l.lineWidth, e.lineWidth, v), f.lineDash = rt(l.lineDash, e.lineDash), f.lineDashOffset = e.lineDashOffset || 0, f.stroke = x), m && (f.fill = m);
  5675. var b = t.contentWidth,
  5676. w = t.contentHeight;
  5677. d.setBoundingRect(new ze(wr(f.x, b, f.textAlign), Sr(f.y, w, f.textBaseline), b, w))
  5678. }, e.prototype._renderBackground = function (t, e, n, i, r, o) {
  5679. var a, s, l, u = t.backgroundColor,
  5680. h = t.borderWidth,
  5681. c = t.borderColor,
  5682. p = u && u.image,
  5683. d = u && !p,
  5684. f = t.borderRadius,
  5685. g = this;
  5686. if (d || t.lineHeight || h && c) {
  5687. (a = this._getOrCreateChild(zs)).useStyle(a.createStyle()), a.style.fill = null;
  5688. var y = a.shape;
  5689. y.x = n, y.y = i, y.width = r, y.height = o, y.r = f, a.dirtyShape()
  5690. }
  5691. if (d)(l = a.style).fill = u || null, l.fillOpacity = rt(t.fillOpacity, 1);
  5692. else if (p) {
  5693. (s = this._getOrCreateChild(ks)).onload = function () {
  5694. g.dirtyStyle()
  5695. };
  5696. var v = s.style;
  5697. v.image = u.image, v.x = n, v.y = i, v.width = r, v.height = o
  5698. }
  5699. h && c && ((l = a.style).lineWidth = h, l.stroke = c, l.strokeOpacity = rt(t.strokeOpacity, 1), l.lineDash = t.borderDash, l.lineDashOffset = t.borderDashOffset || 0, a.strokeContainThreshold = 0, a.hasFill() && a.hasStroke() && (l.strokeFirst = !0, l.lineWidth *= 2));
  5700. var m = (a || s).style;
  5701. m.shadowBlur = t.shadowBlur || 0, m.shadowColor = t.shadowColor || "transparent", m.shadowOffsetX = t.shadowOffsetX || 0, m.shadowOffsetY = t.shadowOffsetY || 0, m.opacity = ot(t.opacity, e.opacity, 1)
  5702. }, e.makeFont = function (t) {
  5703. var e = "";
  5704. return Us(t) && (e = [t.fontStyle, t.fontWeight, Ys(t.fontSize), t.fontFamily || "sans-serif"].join(" ")), e && ut(e) || t.textFont || t.font
  5705. }, e
  5706. }(Sa),
  5707. Gs = {
  5708. left: !0,
  5709. right: 1,
  5710. center: 1
  5711. },
  5712. Ws = {
  5713. top: 1,
  5714. bottom: 1,
  5715. middle: 1
  5716. },
  5717. Hs = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
  5718. function Ys(t) {
  5719. return "string" != typeof t || -1 === t.indexOf("px") && -1 === t.indexOf("rem") && -1 === t.indexOf("em") ? isNaN(+t) ? "12px" : t + "px" : t
  5720. }
  5721. function Xs(t, e) {
  5722. for (var n = 0; n < Hs.length; n++) {
  5723. var i = Hs[n],
  5724. r = e[i];
  5725. null != r && (t[i] = r)
  5726. }
  5727. }
  5728. function Us(t) {
  5729. return null != t.fontSize || t.fontFamily || t.fontWeight
  5730. }
  5731. function Zs(t) {
  5732. if (t) {
  5733. t.font = Fs.makeFont(t);
  5734. var e = t.align;
  5735. "middle" === e && (e = "center"), t.align = null == e || Gs[e] ? e : "left";
  5736. var n = t.verticalAlign;
  5737. "center" === n && (n = "middle"), t.verticalAlign = null == n || Ws[n] ? n : "top", t.padding && (t.padding = st(t.padding))
  5738. }
  5739. }
  5740. function js(t, e) {
  5741. return null == t || e <= 0 || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  5742. }
  5743. function qs(t) {
  5744. return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  5745. }
  5746. function Ks(t, e, n) {
  5747. return "right" === e ? t - n[1] : "center" === e ? t + n[3] / 2 - n[1] / 2 : t + n[3]
  5748. }
  5749. function $s(t) {
  5750. var e = t.text;
  5751. return null != e && (e += ""), e
  5752. }
  5753. function Js(t) {
  5754. return !!(t.backgroundColor || t.lineHeight || t.borderWidth && t.borderColor)
  5755. }
  5756. var Qs = Oo(),
  5757. tl = function (t, e, n, i) {
  5758. if (i) {
  5759. var r = Qs(i);
  5760. r.dataIndex = n, r.dataType = e, r.seriesIndex = t, "group" === i.type && i.traverse((function (i) {
  5761. var r = Qs(i);
  5762. r.seriesIndex = t, r.dataIndex = n, r.dataType = e
  5763. }))
  5764. }
  5765. },
  5766. el = 1,
  5767. nl = {},
  5768. il = Oo(),
  5769. rl = Oo(),
  5770. ol = ["emphasis", "blur", "select"],
  5771. al = ["normal", "emphasis", "blur", "select"],
  5772. sl = 10,
  5773. ll = "highlight",
  5774. ul = "downplay",
  5775. hl = "select",
  5776. cl = "unselect",
  5777. pl = "toggleSelect";
  5778. function dl(t) {
  5779. return null != t && "none" !== t
  5780. }
  5781. var fl = new En(100);
  5782. function gl(t) {
  5783. if (U(t)) {
  5784. var e = fl.get(t);
  5785. return e || (e = $n(t, -.1), fl.put(t, e)), e
  5786. }
  5787. if (Q(t)) {
  5788. var n = A({}, t);
  5789. return n.colorStops = z(t.colorStops, (function (t) {
  5790. return {
  5791. offset: t.offset,
  5792. color: $n(t.color, -.1)
  5793. }
  5794. })), n
  5795. }
  5796. return t
  5797. }
  5798. function yl(t, e, n) {
  5799. t.onHoverStateChange && (t.hoverState || 0) !== n && t.onHoverStateChange(e), t.hoverState = n
  5800. }
  5801. function vl(t) {
  5802. yl(t, "emphasis", 2)
  5803. }
  5804. function ml(t) {
  5805. 2 === t.hoverState && yl(t, "normal", 0)
  5806. }
  5807. function xl(t) {
  5808. yl(t, "blur", 1)
  5809. }
  5810. function _l(t) {
  5811. 1 === t.hoverState && yl(t, "normal", 0)
  5812. }
  5813. function bl(t) {
  5814. t.selected = !0
  5815. }
  5816. function wl(t) {
  5817. t.selected = !1
  5818. }
  5819. function Sl(t, e, n) {
  5820. e(t, n)
  5821. }
  5822. function Ml(t, e, n) {
  5823. Sl(t, e, n), t.isGroup && t.traverse((function (t) {
  5824. Sl(t, e, n)
  5825. }))
  5826. }
  5827. function Il(t, e) {
  5828. switch (e) {
  5829. case "emphasis":
  5830. t.hoverState = 2;
  5831. break;
  5832. case "normal":
  5833. t.hoverState = 0;
  5834. break;
  5835. case "blur":
  5836. t.hoverState = 1;
  5837. break;
  5838. case "select":
  5839. t.selected = !0
  5840. }
  5841. }
  5842. function Tl(t, e) {
  5843. var n = this.states[t];
  5844. if (this.style) {
  5845. if ("emphasis" === t) return function (t, e, n, i) {
  5846. var r = n && P(n, "select") >= 0,
  5847. o = !1;
  5848. if (t instanceof Is) {
  5849. var a = il(t),
  5850. s = r && a.selectFill || a.normalFill,
  5851. l = r && a.selectStroke || a.normalStroke;
  5852. if (dl(s) || dl(l)) {
  5853. var u = (i = i || {}).style || {};
  5854. "inherit" === u.fill ? (o = !0, i = A({}, i), (u = A({}, u)).fill = s) : !dl(u.fill) && dl(s) ? (o = !0, i = A({}, i), (u = A({}, u)).fill = gl(s)) : !dl(u.stroke) && dl(l) && (o || (i = A({}, i), u = A({}, u)), u.stroke = gl(l)), i.style = u
  5855. }
  5856. }
  5857. if (i && null == i.z2) {
  5858. o || (i = A({}, i));
  5859. var h = t.z2EmphasisLift;
  5860. i.z2 = t.z2 + (null != h ? h : sl)
  5861. }
  5862. return i
  5863. }(this, 0, e, n);
  5864. if ("blur" === t) return function (t, e, n) {
  5865. var i = P(t.currentStates, e) >= 0,
  5866. r = t.style.opacity,
  5867. o = i ? null : function (t, e, n, i) {
  5868. for (var r = t.style, o = {}, a = 0; a < e.length; a++) {
  5869. var s = e[a],
  5870. l = r[s];
  5871. o[s] = null == l ? i && i[s] : l
  5872. }
  5873. for (a = 0; a < t.animators.length; a++) {
  5874. var u = t.animators[a];
  5875. u.__fromStateTransition && u.__fromStateTransition.indexOf(n) < 0 && "style" === u.targetName && u.saveTo(o, e)
  5876. }
  5877. return o
  5878. }(t, ["opacity"], e, {
  5879. opacity: 1
  5880. }),
  5881. a = (n = n || {}).style || {};
  5882. return null == a.opacity && (n = A({}, n), a = A({
  5883. opacity: i ? r : .1 * o.opacity
  5884. }, a), n.style = a), n
  5885. }(this, t, n);
  5886. if ("select" === t) return function (t, e, n) {
  5887. if (n && null == n.z2) {
  5888. n = A({}, n);
  5889. var i = t.z2SelectLift;
  5890. n.z2 = t.z2 + (null != i ? i : 9)
  5891. }
  5892. return n
  5893. }(this, 0, n)
  5894. }
  5895. return n
  5896. }
  5897. function Cl(t) {
  5898. t.stateProxy = Tl;
  5899. var e = t.getTextContent(),
  5900. n = t.getTextGuideLine();
  5901. e && (e.stateProxy = Tl), n && (n.stateProxy = Tl)
  5902. }
  5903. function Dl(t, e) {
  5904. !El(t, e) && !t.__highByOuter && Ml(t, vl)
  5905. }
  5906. function Al(t, e) {
  5907. !El(t, e) && !t.__highByOuter && Ml(t, ml)
  5908. }
  5909. function kl(t, e) {
  5910. t.__highByOuter |= 1 << (e || 0), Ml(t, vl)
  5911. }
  5912. function Ll(t, e) {
  5913. !(t.__highByOuter &= ~(1 << (e || 0))) && Ml(t, ml)
  5914. }
  5915. function Pl(t) {
  5916. Ml(t, xl)
  5917. }
  5918. function Ol(t) {
  5919. Ml(t, _l)
  5920. }
  5921. function Rl(t) {
  5922. Ml(t, bl)
  5923. }
  5924. function Nl(t) {
  5925. Ml(t, wl)
  5926. }
  5927. function El(t, e) {
  5928. return t.__highDownSilentOnTouch && e.zrByTouch
  5929. }
  5930. function zl(t) {
  5931. var e = t.getModel(),
  5932. n = [],
  5933. i = [];
  5934. e.eachComponent((function (e, r) {
  5935. var o = rl(r),
  5936. a = "series" === e,
  5937. s = a ? t.getViewOfSeriesModel(r) : t.getViewOfComponentModel(r);
  5938. !a && i.push(s), o.isBlured && (s.group.traverse((function (t) {
  5939. _l(t)
  5940. })), a && n.push(r)), o.isBlured = !1
  5941. })), E(i, (function (t) {
  5942. t && t.toggleBlurSeries && t.toggleBlurSeries(n, !1, e)
  5943. }))
  5944. }
  5945. function Vl(t, e, n, i) {
  5946. var r = i.getModel();
  5947. function o(t, e) {
  5948. for (var n = 0; n < e.length; n++) {
  5949. var i = t.getItemGraphicEl(e[n]);
  5950. i && Ol(i)
  5951. }
  5952. }
  5953. if (n = n || "coordinateSystem", null != t && e && "none" !== e) {
  5954. var a = r.getSeriesByIndex(t),
  5955. s = a.coordinateSystem;
  5956. s && s.master && (s = s.master);
  5957. var l = [];
  5958. r.eachSeries((function (t) {
  5959. var r = a === t,
  5960. u = t.coordinateSystem;
  5961. if (u && u.master && (u = u.master), !("series" === n && !r || "coordinateSystem" === n && !(u && s ? u === s : r) || "series" === e && r)) {
  5962. if (i.getViewOfSeriesModel(t).group.traverse((function (t) {
  5963. xl(t)
  5964. })), N(e)) o(t.getData(), e);
  5965. else if (q(e))
  5966. for (var h = G(e), c = 0; c < h.length; c++) o(t.getData(h[c]), e[h[c]]);
  5967. l.push(t), rl(t).isBlured = !0
  5968. }
  5969. })), r.eachComponent((function (t, e) {
  5970. if ("series" !== t) {
  5971. var n = i.getViewOfComponentModel(e);
  5972. n && n.toggleBlurSeries && n.toggleBlurSeries(l, !0, r)
  5973. }
  5974. }))
  5975. }
  5976. }
  5977. function Bl(t, e, n) {
  5978. if (null != t && null != e) {
  5979. var i = n.getModel().getComponent(t, e);
  5980. if (i) {
  5981. rl(i).isBlured = !0;
  5982. var r = n.getViewOfComponentModel(i);
  5983. r && r.focusBlurEnabled && r.group.traverse((function (t) {
  5984. xl(t)
  5985. }))
  5986. }
  5987. }
  5988. }
  5989. function Fl(t, e, n, i) {
  5990. var r = {
  5991. focusSelf: !1,
  5992. dispatchers: null
  5993. };
  5994. if (null == t || "series" === t || null == e || null == n) return r;
  5995. var o = i.getModel().getComponent(t, e);
  5996. if (!o) return r;
  5997. var a = i.getViewOfComponentModel(o);
  5998. if (!a || !a.findHighDownDispatchers) return r;
  5999. for (var s, l = a.findHighDownDispatchers(n), u = 0; u < l.length; u++)
  6000. if ("self" === Qs(l[u]).focus) {
  6001. s = !0;
  6002. break
  6003. } return {
  6004. focusSelf: s,
  6005. dispatchers: l
  6006. }
  6007. }
  6008. function Gl(t) {
  6009. E(t.getAllData(), (function (e) {
  6010. var n = e.data,
  6011. i = e.type;
  6012. n.eachItemGraphicEl((function (e, n) {
  6013. t.isSelected(n, i) ? Rl(e) : Nl(e)
  6014. }))
  6015. }))
  6016. }
  6017. function Wl(t) {
  6018. var e = [];
  6019. return t.eachSeries((function (t) {
  6020. E(t.getAllData(), (function (n) {
  6021. n.data;
  6022. var i = n.type,
  6023. r = t.getSelectedDataIndices();
  6024. if (r.length > 0) {
  6025. var o = {
  6026. dataIndex: r,
  6027. seriesIndex: t.seriesIndex
  6028. };
  6029. null != i && (o.dataType = i), e.push(o)
  6030. }
  6031. }))
  6032. })), e
  6033. }
  6034. function Hl(t, e, n) {
  6035. ql(t, !0), Ml(t, Cl), Xl(t, e, n)
  6036. }
  6037. function Yl(t, e, n, i) {
  6038. i ? function (t) {
  6039. ql(t, !1)
  6040. }(t) : Hl(t, e, n)
  6041. }
  6042. function Xl(t, e, n) {
  6043. var i = Qs(t);
  6044. null != e ? (i.focus = e, i.blurScope = n) : i.focus && (i.focus = null)
  6045. }
  6046. var Ul = ["emphasis", "blur", "select"],
  6047. Zl = {
  6048. itemStyle: "getItemStyle",
  6049. lineStyle: "getLineStyle",
  6050. areaStyle: "getAreaStyle"
  6051. };
  6052. function jl(t, e, n, i) {
  6053. n = n || "itemStyle";
  6054. for (var r = 0; r < Ul.length; r++) {
  6055. var o = Ul[r],
  6056. a = e.getModel([o, n]);
  6057. t.ensureState(o).style = i ? i(a) : a[Zl[n]]()
  6058. }
  6059. }
  6060. function ql(t, e) {
  6061. var n = !1 === e,
  6062. i = t;
  6063. t.highDownSilentOnTouch && (i.__highDownSilentOnTouch = t.highDownSilentOnTouch), n && !i.__highDownDispatcher || (i.__highByOuter = i.__highByOuter || 0, i.__highDownDispatcher = !n)
  6064. }
  6065. function Kl(t) {
  6066. return !(!t || !t.__highDownDispatcher)
  6067. }
  6068. function $l(t) {
  6069. var e = t.type;
  6070. return e === hl || e === cl || e === pl
  6071. }
  6072. function Jl(t) {
  6073. var e = t.type;
  6074. return e === ll || e === ul
  6075. }
  6076. var Ql = os.CMD,
  6077. tu = [
  6078. [],
  6079. [],
  6080. []
  6081. ],
  6082. eu = Math.sqrt,
  6083. nu = Math.atan2;
  6084. function iu(t, e) {
  6085. if (e) {
  6086. var n, i, r, o, a, s, l = t.data,
  6087. u = t.len(),
  6088. h = Ql.M,
  6089. c = Ql.C,
  6090. p = Ql.L,
  6091. d = Ql.R,
  6092. f = Ql.A,
  6093. g = Ql.Q;
  6094. for (r = 0, o = 0; r < u;) {
  6095. switch (n = l[r++], o = r, i = 0, n) {
  6096. case h:
  6097. case p:
  6098. i = 1;
  6099. break;
  6100. case c:
  6101. i = 3;
  6102. break;
  6103. case g:
  6104. i = 2;
  6105. break;
  6106. case f:
  6107. var y = e[4],
  6108. v = e[5],
  6109. m = eu(e[0] * e[0] + e[1] * e[1]),
  6110. x = eu(e[2] * e[2] + e[3] * e[3]),
  6111. _ = nu(-e[1] / x, e[0] / m);
  6112. l[r] *= m, l[r++] += y, l[r] *= x, l[r++] += v, l[r++] *= m, l[r++] *= x, l[r++] += _, l[r++] += _, o = r += 2;
  6113. break;
  6114. case d:
  6115. s[0] = l[r++], s[1] = l[r++], Wt(s, s, e), l[o++] = s[0], l[o++] = s[1], s[0] += l[r++], s[1] += l[r++], Wt(s, s, e), l[o++] = s[0], l[o++] = s[1]
  6116. }
  6117. for (a = 0; a < i; a++) {
  6118. var b = tu[a];
  6119. b[0] = l[r++], b[1] = l[r++], Wt(b, b, e), l[o++] = b[0], l[o++] = b[1]
  6120. }
  6121. }
  6122. t.increaseVersion()
  6123. }
  6124. }
  6125. var ru = Math.sqrt,
  6126. ou = Math.sin,
  6127. au = Math.cos,
  6128. su = Math.PI;
  6129. function lu(t) {
  6130. return Math.sqrt(t[0] * t[0] + t[1] * t[1])
  6131. }
  6132. function uu(t, e) {
  6133. return (t[0] * e[0] + t[1] * e[1]) / (lu(t) * lu(e))
  6134. }
  6135. function hu(t, e) {
  6136. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(uu(t, e))
  6137. }
  6138. function cu(t, e, n, i, r, o, a, s, l, u, h) {
  6139. var c = l * (su / 180),
  6140. p = au(c) * (t - n) / 2 + ou(c) * (e - i) / 2,
  6141. d = -1 * ou(c) * (t - n) / 2 + au(c) * (e - i) / 2,
  6142. f = p * p / (a * a) + d * d / (s * s);
  6143. f > 1 && (a *= ru(f), s *= ru(f));
  6144. var g = (r === o ? -1 : 1) * ru((a * a * (s * s) - a * a * (d * d) - s * s * (p * p)) / (a * a * (d * d) + s * s * (p * p))) || 0,
  6145. y = g * a * d / s,
  6146. v = g * -s * p / a,
  6147. m = (t + n) / 2 + au(c) * y - ou(c) * v,
  6148. x = (e + i) / 2 + ou(c) * y + au(c) * v,
  6149. _ = hu([1, 0], [(p - y) / a, (d - v) / s]),
  6150. b = [(p - y) / a, (d - v) / s],
  6151. w = [(-1 * p - y) / a, (-1 * d - v) / s],
  6152. S = hu(b, w);
  6153. if (uu(b, w) <= -1 && (S = su), uu(b, w) >= 1 && (S = 0), S < 0) {
  6154. var M = Math.round(S / su * 1e6) / 1e6;
  6155. S = 2 * su + M % 2 * su
  6156. }
  6157. h.addData(u, m, x, a, s, _, S, c, o)
  6158. }
  6159. var pu = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,
  6160. du = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  6161. var fu = function (t) {
  6162. function e() {
  6163. return null !== t && t.apply(this, arguments) || this
  6164. }
  6165. return n(e, t), e.prototype.applyTransform = function (t) {}, e
  6166. }(Is);
  6167. function gu(t) {
  6168. return null != t.setData
  6169. }
  6170. function yu(t, e) {
  6171. var n = function (t) {
  6172. var e = new os;
  6173. if (!t) return e;
  6174. var n, i = 0,
  6175. r = 0,
  6176. o = i,
  6177. a = r,
  6178. s = os.CMD,
  6179. l = t.match(pu);
  6180. if (!l) return e;
  6181. for (var u = 0; u < l.length; u++) {
  6182. for (var h = l[u], c = h.charAt(0), p = void 0, d = h.match(du) || [], f = d.length, g = 0; g < f; g++) d[g] = parseFloat(d[g]);
  6183. for (var y = 0; y < f;) {
  6184. var v = void 0,
  6185. m = void 0,
  6186. x = void 0,
  6187. _ = void 0,
  6188. b = void 0,
  6189. w = void 0,
  6190. S = void 0,
  6191. M = i,
  6192. I = r,
  6193. T = void 0,
  6194. C = void 0;
  6195. switch (c) {
  6196. case "l":
  6197. i += d[y++], r += d[y++], p = s.L, e.addData(p, i, r);
  6198. break;
  6199. case "L":
  6200. i = d[y++], r = d[y++], p = s.L, e.addData(p, i, r);
  6201. break;
  6202. case "m":
  6203. i += d[y++], r += d[y++], p = s.M, e.addData(p, i, r), o = i, a = r, c = "l";
  6204. break;
  6205. case "M":
  6206. i = d[y++], r = d[y++], p = s.M, e.addData(p, i, r), o = i, a = r, c = "L";
  6207. break;
  6208. case "h":
  6209. i += d[y++], p = s.L, e.addData(p, i, r);
  6210. break;
  6211. case "H":
  6212. i = d[y++], p = s.L, e.addData(p, i, r);
  6213. break;
  6214. case "v":
  6215. r += d[y++], p = s.L, e.addData(p, i, r);
  6216. break;
  6217. case "V":
  6218. r = d[y++], p = s.L, e.addData(p, i, r);
  6219. break;
  6220. case "C":
  6221. p = s.C, e.addData(p, d[y++], d[y++], d[y++], d[y++], d[y++], d[y++]), i = d[y - 2], r = d[y - 1];
  6222. break;
  6223. case "c":
  6224. p = s.C, e.addData(p, d[y++] + i, d[y++] + r, d[y++] + i, d[y++] + r, d[y++] + i, d[y++] + r), i += d[y - 2], r += d[y - 1];
  6225. break;
  6226. case "S":
  6227. v = i, m = r, T = e.len(), C = e.data, n === s.C && (v += i - C[T - 4], m += r - C[T - 3]), p = s.C, M = d[y++], I = d[y++], i = d[y++], r = d[y++], e.addData(p, v, m, M, I, i, r);
  6228. break;
  6229. case "s":
  6230. v = i, m = r, T = e.len(), C = e.data, n === s.C && (v += i - C[T - 4], m += r - C[T - 3]), p = s.C, M = i + d[y++], I = r + d[y++], i += d[y++], r += d[y++], e.addData(p, v, m, M, I, i, r);
  6231. break;
  6232. case "Q":
  6233. M = d[y++], I = d[y++], i = d[y++], r = d[y++], p = s.Q, e.addData(p, M, I, i, r);
  6234. break;
  6235. case "q":
  6236. M = d[y++] + i, I = d[y++] + r, i += d[y++], r += d[y++], p = s.Q, e.addData(p, M, I, i, r);
  6237. break;
  6238. case "T":
  6239. v = i, m = r, T = e.len(), C = e.data, n === s.Q && (v += i - C[T - 4], m += r - C[T - 3]), i = d[y++], r = d[y++], p = s.Q, e.addData(p, v, m, i, r);
  6240. break;
  6241. case "t":
  6242. v = i, m = r, T = e.len(), C = e.data, n === s.Q && (v += i - C[T - 4], m += r - C[T - 3]), i += d[y++], r += d[y++], p = s.Q, e.addData(p, v, m, i, r);
  6243. break;
  6244. case "A":
  6245. x = d[y++], _ = d[y++], b = d[y++], w = d[y++], S = d[y++], cu(M = i, I = r, i = d[y++], r = d[y++], w, S, x, _, b, p = s.A, e);
  6246. break;
  6247. case "a":
  6248. x = d[y++], _ = d[y++], b = d[y++], w = d[y++], S = d[y++], cu(M = i, I = r, i += d[y++], r += d[y++], w, S, x, _, b, p = s.A, e)
  6249. }
  6250. }
  6251. "z" !== c && "Z" !== c || (p = s.Z, e.addData(p), i = o, r = a), n = p
  6252. }
  6253. return e.toStatic(), e
  6254. }(t),
  6255. i = A({}, e);
  6256. return i.buildPath = function (t) {
  6257. if (gu(t)) {
  6258. t.setData(n.data), (e = t.getContext()) && t.rebuildPath(e, 1)
  6259. } else {
  6260. var e = t;
  6261. n.rebuildPath(e, 1)
  6262. }
  6263. }, i.applyTransform = function (t) {
  6264. iu(n, t), this.dirtyShape()
  6265. }, i
  6266. }
  6267. function vu(t, e) {
  6268. return new fu(yu(t, e))
  6269. }
  6270. function mu(t, e) {
  6271. e = e || {};
  6272. var n = new Is;
  6273. return t.shape && n.setShape(t.shape), n.setStyle(t.style), e.bakeTransform ? iu(n.path, t.getComputedTransform()) : e.toLocal ? n.setLocalTransform(t.getComputedTransform()) : n.copyTransform(t), n.buildPath = t.buildPath, n.applyTransform = n.applyTransform, n.z = t.z, n.z2 = t.z2, n.zlevel = t.zlevel, n
  6274. }
  6275. var xu = function () {
  6276. this.cx = 0, this.cy = 0, this.r = 0
  6277. },
  6278. _u = function (t) {
  6279. function e(e) {
  6280. return t.call(this, e) || this
  6281. }
  6282. return n(e, t), e.prototype.getDefaultShape = function () {
  6283. return new xu
  6284. }, e.prototype.buildPath = function (t, e) {
  6285. t.moveTo(e.cx + e.r, e.cy), t.arc(e.cx, e.cy, e.r, 0, 2 * Math.PI)
  6286. }, e
  6287. }(Is);
  6288. _u.prototype.type = "circle";
  6289. var bu = function () {
  6290. this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0
  6291. },
  6292. wu = function (t) {
  6293. function e(e) {
  6294. return t.call(this, e) || this
  6295. }
  6296. return n(e, t), e.prototype.getDefaultShape = function () {
  6297. return new bu
  6298. }, e.prototype.buildPath = function (t, e) {
  6299. var n = .5522848,
  6300. i = e.cx,
  6301. r = e.cy,
  6302. o = e.rx,
  6303. a = e.ry,
  6304. s = o * n,
  6305. l = a * n;
  6306. t.moveTo(i - o, r), t.bezierCurveTo(i - o, r - l, i - s, r - a, i, r - a), t.bezierCurveTo(i + s, r - a, i + o, r - l, i + o, r), t.bezierCurveTo(i + o, r + l, i + s, r + a, i, r + a), t.bezierCurveTo(i - s, r + a, i - o, r + l, i - o, r), t.closePath()
  6307. }, e
  6308. }(Is);
  6309. wu.prototype.type = "ellipse";
  6310. var Su = Math.PI,
  6311. Mu = 2 * Su,
  6312. Iu = Math.sin,
  6313. Tu = Math.cos,
  6314. Cu = Math.acos,
  6315. Du = Math.atan2,
  6316. Au = Math.abs,
  6317. ku = Math.sqrt,
  6318. Lu = Math.max,
  6319. Pu = Math.min,
  6320. Ou = 1e-4;
  6321. function Ru(t, e, n, i, r, o, a) {
  6322. var s = t - n,
  6323. l = e - i,
  6324. u = (a ? o : -o) / ku(s * s + l * l),
  6325. h = u * l,
  6326. c = -u * s,
  6327. p = t + h,
  6328. d = e + c,
  6329. f = n + h,
  6330. g = i + c,
  6331. y = (p + f) / 2,
  6332. v = (d + g) / 2,
  6333. m = f - p,
  6334. x = g - d,
  6335. _ = m * m + x * x,
  6336. b = r - o,
  6337. w = p * g - f * d,
  6338. S = (x < 0 ? -1 : 1) * ku(Lu(0, b * b * _ - w * w)),
  6339. M = (w * x - m * S) / _,
  6340. I = (-w * m - x * S) / _,
  6341. T = (w * x + m * S) / _,
  6342. C = (-w * m + x * S) / _,
  6343. D = M - y,
  6344. A = I - v,
  6345. k = T - y,
  6346. L = C - v;
  6347. return D * D + A * A > k * k + L * L && (M = T, I = C), {
  6348. cx: M,
  6349. cy: I,
  6350. x0: -h,
  6351. y0: -c,
  6352. x1: M * (r / b - 1),
  6353. y1: I * (r / b - 1)
  6354. }
  6355. }
  6356. function Nu(t, e) {
  6357. var n, i = Lu(e.r, 0),
  6358. r = Lu(e.r0 || 0, 0),
  6359. o = i > 0;
  6360. if (o || r > 0) {
  6361. if (o || (i = r, r = 0), r > i) {
  6362. var a = i;
  6363. i = r, r = a
  6364. }
  6365. var s = e.startAngle,
  6366. l = e.endAngle;
  6367. if (!isNaN(s) && !isNaN(l)) {
  6368. var u = e.cx,
  6369. h = e.cy,
  6370. c = !!e.clockwise,
  6371. p = Au(l - s),
  6372. d = p > Mu && p % Mu;
  6373. if (d > Ou && (p = d), i > Ou)
  6374. if (p > Mu - Ou) t.moveTo(u + i * Tu(s), h + i * Iu(s)), t.arc(u, h, i, s, l, !c), r > Ou && (t.moveTo(u + r * Tu(l), h + r * Iu(l)), t.arc(u, h, r, l, s, c));
  6375. else {
  6376. var f = void 0,
  6377. g = void 0,
  6378. y = void 0,
  6379. v = void 0,
  6380. m = void 0,
  6381. x = void 0,
  6382. _ = void 0,
  6383. b = void 0,
  6384. w = void 0,
  6385. S = void 0,
  6386. M = void 0,
  6387. I = void 0,
  6388. T = void 0,
  6389. C = void 0,
  6390. D = void 0,
  6391. A = void 0,
  6392. k = i * Tu(s),
  6393. L = i * Iu(s),
  6394. P = r * Tu(l),
  6395. O = r * Iu(l),
  6396. R = p > Ou;
  6397. if (R) {
  6398. var N = e.cornerRadius;
  6399. N && (n = function (t) {
  6400. var e;
  6401. if (Y(t)) {
  6402. var n = t.length;
  6403. if (!n) return t;
  6404. e = 1 === n ? [t[0], t[0], 0, 0] : 2 === n ? [t[0], t[0], t[1], t[1]] : 3 === n ? t.concat(t[2]) : t
  6405. } else e = [t, t, t, t];
  6406. return e
  6407. }(N), f = n[0], g = n[1], y = n[2], v = n[3]);
  6408. var E = Au(i - r) / 2;
  6409. if (m = Pu(E, y), x = Pu(E, v), _ = Pu(E, f), b = Pu(E, g), M = w = Lu(m, x), I = S = Lu(_, b), (w > Ou || S > Ou) && (T = i * Tu(l), C = i * Iu(l), D = r * Tu(s), A = r * Iu(s), p < Su)) {
  6410. var z = function (t, e, n, i, r, o, a, s) {
  6411. var l = n - t,
  6412. u = i - e,
  6413. h = a - r,
  6414. c = s - o,
  6415. p = c * l - h * u;
  6416. if (!(p * p < Ou)) return [t + (p = (h * (e - o) - c * (t - r)) / p) * l, e + p * u]
  6417. }(k, L, D, A, T, C, P, O);
  6418. if (z) {
  6419. var V = k - z[0],
  6420. B = L - z[1],
  6421. F = T - z[0],
  6422. G = C - z[1],
  6423. W = 1 / Iu(Cu((V * F + B * G) / (ku(V * V + B * B) * ku(F * F + G * G))) / 2),
  6424. H = ku(z[0] * z[0] + z[1] * z[1]);
  6425. M = Pu(w, (i - H) / (W + 1)), I = Pu(S, (r - H) / (W - 1))
  6426. }
  6427. }
  6428. }
  6429. if (R)
  6430. if (M > Ou) {
  6431. var X = Pu(y, M),
  6432. U = Pu(v, M),
  6433. Z = Ru(D, A, k, L, i, X, c),
  6434. j = Ru(T, C, P, O, i, U, c);
  6435. t.moveTo(u + Z.cx + Z.x0, h + Z.cy + Z.y0), M < w && X === U ? t.arc(u + Z.cx, h + Z.cy, M, Du(Z.y0, Z.x0), Du(j.y0, j.x0), !c) : (X > 0 && t.arc(u + Z.cx, h + Z.cy, X, Du(Z.y0, Z.x0), Du(Z.y1, Z.x1), !c), t.arc(u, h, i, Du(Z.cy + Z.y1, Z.cx + Z.x1), Du(j.cy + j.y1, j.cx + j.x1), !c), U > 0 && t.arc(u + j.cx, h + j.cy, U, Du(j.y1, j.x1), Du(j.y0, j.x0), !c))
  6436. } else t.moveTo(u + k, h + L), t.arc(u, h, i, s, l, !c);
  6437. else t.moveTo(u + k, h + L);
  6438. if (r > Ou && R)
  6439. if (I > Ou) {
  6440. X = Pu(f, I), Z = Ru(P, O, T, C, r, -(U = Pu(g, I)), c), j = Ru(k, L, D, A, r, -X, c);
  6441. t.lineTo(u + Z.cx + Z.x0, h + Z.cy + Z.y0), I < S && X === U ? t.arc(u + Z.cx, h + Z.cy, I, Du(Z.y0, Z.x0), Du(j.y0, j.x0), !c) : (U > 0 && t.arc(u + Z.cx, h + Z.cy, U, Du(Z.y0, Z.x0), Du(Z.y1, Z.x1), !c), t.arc(u, h, r, Du(Z.cy + Z.y1, Z.cx + Z.x1), Du(j.cy + j.y1, j.cx + j.x1), c), X > 0 && t.arc(u + j.cx, h + j.cy, X, Du(j.y1, j.x1), Du(j.y0, j.x0), !c))
  6442. } else t.lineTo(u + P, h + O), t.arc(u, h, r, l, s, c);
  6443. else t.lineTo(u + P, h + O)
  6444. }
  6445. else t.moveTo(u, h);
  6446. t.closePath()
  6447. }
  6448. }
  6449. }
  6450. var Eu = function () {
  6451. this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = 2 * Math.PI, this.clockwise = !0, this.cornerRadius = 0
  6452. },
  6453. zu = function (t) {
  6454. function e(e) {
  6455. return t.call(this, e) || this
  6456. }
  6457. return n(e, t), e.prototype.getDefaultShape = function () {
  6458. return new Eu
  6459. }, e.prototype.buildPath = function (t, e) {
  6460. Nu(t, e)
  6461. }, e.prototype.isZeroArea = function () {
  6462. return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0
  6463. }, e
  6464. }(Is);
  6465. zu.prototype.type = "sector";
  6466. var Vu = function () {
  6467. this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0
  6468. },
  6469. Bu = function (t) {
  6470. function e(e) {
  6471. return t.call(this, e) || this
  6472. }
  6473. return n(e, t), e.prototype.getDefaultShape = function () {
  6474. return new Vu
  6475. }, e.prototype.buildPath = function (t, e) {
  6476. var n = e.cx,
  6477. i = e.cy,
  6478. r = 2 * Math.PI;
  6479. t.moveTo(n + e.r, i), t.arc(n, i, e.r, 0, r, !1), t.moveTo(n + e.r0, i), t.arc(n, i, e.r0, 0, r, !0)
  6480. }, e
  6481. }(Is);
  6482. function Fu(t, e, n) {
  6483. var i = e.smooth,
  6484. r = e.points;
  6485. if (r && r.length >= 2) {
  6486. if (i) {
  6487. var o = function (t, e, n, i) {
  6488. var r, o, a, s, l = [],
  6489. u = [],
  6490. h = [],
  6491. c = [];
  6492. if (i) {
  6493. a = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0];
  6494. for (var p = 0, d = t.length; p < d; p++) Ht(a, a, t[p]), Yt(s, s, t[p]);
  6495. Ht(a, a, i[0]), Yt(s, s, i[1])
  6496. }
  6497. for (p = 0, d = t.length; p < d; p++) {
  6498. var f = t[p];
  6499. if (n) r = t[p ? p - 1 : d - 1], o = t[(p + 1) % d];
  6500. else {
  6501. if (0 === p || p === d - 1) {
  6502. l.push(Tt(t[p]));
  6503. continue
  6504. }
  6505. r = t[p - 1], o = t[p + 1]
  6506. }
  6507. kt(u, o, r), Nt(u, u, e);
  6508. var g = zt(f, r),
  6509. y = zt(f, o),
  6510. v = g + y;
  6511. 0 !== v && (g /= v, y /= v), Nt(h, u, -g), Nt(c, u, y);
  6512. var m = Dt([], f, h),
  6513. x = Dt([], f, c);
  6514. i && (Yt(m, m, a), Ht(m, m, s), Yt(x, x, a), Ht(x, x, s)), l.push(m), l.push(x)
  6515. }
  6516. return n && l.push(l.shift()), l
  6517. }(r, i, n, e.smoothConstraint);
  6518. t.moveTo(r[0][0], r[0][1]);
  6519. for (var a = r.length, s = 0; s < (n ? a : a - 1); s++) {
  6520. var l = o[2 * s],
  6521. u = o[2 * s + 1],
  6522. h = r[(s + 1) % a];
  6523. t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1])
  6524. }
  6525. } else {
  6526. t.moveTo(r[0][0], r[0][1]);
  6527. s = 1;
  6528. for (var c = r.length; s < c; s++) t.lineTo(r[s][0], r[s][1])
  6529. }
  6530. n && t.closePath()
  6531. }
  6532. }
  6533. Bu.prototype.type = "ring";
  6534. var Gu = function () {
  6535. this.points = null, this.smooth = 0, this.smoothConstraint = null
  6536. },
  6537. Wu = function (t) {
  6538. function e(e) {
  6539. return t.call(this, e) || this
  6540. }
  6541. return n(e, t), e.prototype.getDefaultShape = function () {
  6542. return new Gu
  6543. }, e.prototype.buildPath = function (t, e) {
  6544. Fu(t, e, !0)
  6545. }, e
  6546. }(Is);
  6547. Wu.prototype.type = "polygon";
  6548. var Hu = function () {
  6549. this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null
  6550. },
  6551. Yu = function (t) {
  6552. function e(e) {
  6553. return t.call(this, e) || this
  6554. }
  6555. return n(e, t), e.prototype.getDefaultStyle = function () {
  6556. return {
  6557. stroke: "#000",
  6558. fill: null
  6559. }
  6560. }, e.prototype.getDefaultShape = function () {
  6561. return new Hu
  6562. }, e.prototype.buildPath = function (t, e) {
  6563. Fu(t, e, !1)
  6564. }, e
  6565. }(Is);
  6566. Yu.prototype.type = "polyline";
  6567. var Xu = {},
  6568. Uu = function () {
  6569. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1
  6570. },
  6571. Zu = function (t) {
  6572. function e(e) {
  6573. return t.call(this, e) || this
  6574. }
  6575. return n(e, t), e.prototype.getDefaultStyle = function () {
  6576. return {
  6577. stroke: "#000",
  6578. fill: null
  6579. }
  6580. }, e.prototype.getDefaultShape = function () {
  6581. return new Uu
  6582. }, e.prototype.buildPath = function (t, e) {
  6583. var n, i, r, o;
  6584. if (this.subPixelOptimize) {
  6585. var a = Ps(Xu, e, this.style);
  6586. n = a.x1, i = a.y1, r = a.x2, o = a.y2
  6587. } else n = e.x1, i = e.y1, r = e.x2, o = e.y2;
  6588. var s = e.percent;
  6589. 0 !== s && (t.moveTo(n, i), s < 1 && (r = n * (1 - s) + r * s, o = i * (1 - s) + o * s), t.lineTo(r, o))
  6590. }, e.prototype.pointAt = function (t) {
  6591. var e = this.shape;
  6592. return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t]
  6593. }, e
  6594. }(Is);
  6595. Zu.prototype.type = "line";
  6596. var ju = [],
  6597. qu = function () {
  6598. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1
  6599. };
  6600. function Ku(t, e, n) {
  6601. var i = t.cpx2,
  6602. r = t.cpy2;
  6603. return null != i || null != r ? [(n ? xn : mn)(t.x1, t.cpx1, t.cpx2, t.x2, e), (n ? xn : mn)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(n ? Tn : In)(t.x1, t.cpx1, t.x2, e), (n ? Tn : In)(t.y1, t.cpy1, t.y2, e)]
  6604. }
  6605. var $u = function (t) {
  6606. function e(e) {
  6607. return t.call(this, e) || this
  6608. }
  6609. return n(e, t), e.prototype.getDefaultStyle = function () {
  6610. return {
  6611. stroke: "#000",
  6612. fill: null
  6613. }
  6614. }, e.prototype.getDefaultShape = function () {
  6615. return new qu
  6616. }, e.prototype.buildPath = function (t, e) {
  6617. var n = e.x1,
  6618. i = e.y1,
  6619. r = e.x2,
  6620. o = e.y2,
  6621. a = e.cpx1,
  6622. s = e.cpy1,
  6623. l = e.cpx2,
  6624. u = e.cpy2,
  6625. h = e.percent;
  6626. 0 !== h && (t.moveTo(n, i), null == l || null == u ? (h < 1 && (Dn(n, a, r, h, ju), a = ju[1], r = ju[2], Dn(i, s, o, h, ju), s = ju[1], o = ju[2]), t.quadraticCurveTo(a, s, r, o)) : (h < 1 && (wn(n, a, l, r, h, ju), a = ju[1], l = ju[2], r = ju[3], wn(i, s, u, o, h, ju), s = ju[1], u = ju[2], o = ju[3]), t.bezierCurveTo(a, s, l, u, r, o)))
  6627. }, e.prototype.pointAt = function (t) {
  6628. return Ku(this.shape, t, !1)
  6629. }, e.prototype.tangentAt = function (t) {
  6630. var e = Ku(this.shape, t, !0);
  6631. return Et(e, e)
  6632. }, e
  6633. }(Is);
  6634. $u.prototype.type = "bezier-curve";
  6635. var Ju = function () {
  6636. this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = 2 * Math.PI, this.clockwise = !0
  6637. },
  6638. Qu = function (t) {
  6639. function e(e) {
  6640. return t.call(this, e) || this
  6641. }
  6642. return n(e, t), e.prototype.getDefaultStyle = function () {
  6643. return {
  6644. stroke: "#000",
  6645. fill: null
  6646. }
  6647. }, e.prototype.getDefaultShape = function () {
  6648. return new Ju
  6649. }, e.prototype.buildPath = function (t, e) {
  6650. var n = e.cx,
  6651. i = e.cy,
  6652. r = Math.max(e.r, 0),
  6653. o = e.startAngle,
  6654. a = e.endAngle,
  6655. s = e.clockwise,
  6656. l = Math.cos(o),
  6657. u = Math.sin(o);
  6658. t.moveTo(l * r + n, u * r + i), t.arc(n, i, r, o, a, !s)
  6659. }, e
  6660. }(Is);
  6661. Qu.prototype.type = "arc";
  6662. var th = function (t) {
  6663. function e() {
  6664. var e = null !== t && t.apply(this, arguments) || this;
  6665. return e.type = "compound", e
  6666. }
  6667. return n(e, t), e.prototype._updatePathDirty = function () {
  6668. for (var t = this.shape.paths, e = this.shapeChanged(), n = 0; n < t.length; n++) e = e || t[n].shapeChanged();
  6669. e && this.dirtyShape()
  6670. }, e.prototype.beforeBrush = function () {
  6671. this._updatePathDirty();
  6672. for (var t = this.shape.paths || [], e = this.getGlobalScale(), n = 0; n < t.length; n++) t[n].path || t[n].createPathProxy(), t[n].path.setScale(e[0], e[1], t[n].segmentIgnoreThreshold)
  6673. }, e.prototype.buildPath = function (t, e) {
  6674. for (var n = e.paths || [], i = 0; i < n.length; i++) n[i].buildPath(t, n[i].shape, !0)
  6675. }, e.prototype.afterBrush = function () {
  6676. for (var t = this.shape.paths || [], e = 0; e < t.length; e++) t[e].pathUpdated()
  6677. }, e.prototype.getBoundingRect = function () {
  6678. return this._updatePathDirty.call(this), Is.prototype.getBoundingRect.call(this)
  6679. }, e
  6680. }(Is),
  6681. eh = function () {
  6682. function t(t) {
  6683. this.colorStops = t || []
  6684. }
  6685. return t.prototype.addColorStop = function (t, e) {
  6686. this.colorStops.push({
  6687. offset: t,
  6688. color: e
  6689. })
  6690. }, t
  6691. }(),
  6692. nh = function (t) {
  6693. function e(e, n, i, r, o, a) {
  6694. var s = t.call(this, o) || this;
  6695. return s.x = null == e ? 0 : e, s.y = null == n ? 0 : n, s.x2 = null == i ? 1 : i, s.y2 = null == r ? 0 : r, s.type = "linear", s.global = a || !1, s
  6696. }
  6697. return n(e, t), e
  6698. }(eh),
  6699. ih = function (t) {
  6700. function e(e, n, i, r, o) {
  6701. var a = t.call(this, r) || this;
  6702. return a.x = null == e ? .5 : e, a.y = null == n ? .5 : n, a.r = null == i ? .5 : i, a.type = "radial", a.global = o || !1, a
  6703. }
  6704. return n(e, t), e
  6705. }(eh),
  6706. rh = [0, 0],
  6707. oh = [0, 0],
  6708. ah = new De,
  6709. sh = new De,
  6710. lh = function () {
  6711. function t(t, e) {
  6712. this._corners = [], this._axes = [], this._origin = [0, 0];
  6713. for (var n = 0; n < 4; n++) this._corners[n] = new De;
  6714. for (n = 0; n < 2; n++) this._axes[n] = new De;
  6715. t && this.fromBoundingRect(t, e)
  6716. }
  6717. return t.prototype.fromBoundingRect = function (t, e) {
  6718. var n = this._corners,
  6719. i = this._axes,
  6720. r = t.x,
  6721. o = t.y,
  6722. a = r + t.width,
  6723. s = o + t.height;
  6724. if (n[0].set(r, o), n[1].set(a, o), n[2].set(a, s), n[3].set(r, s), e)
  6725. for (var l = 0; l < 4; l++) n[l].transform(e);
  6726. De.sub(i[0], n[1], n[0]), De.sub(i[1], n[3], n[0]), i[0].normalize(), i[1].normalize();
  6727. for (l = 0; l < 2; l++) this._origin[l] = i[l].dot(n[0])
  6728. }, t.prototype.intersect = function (t, e) {
  6729. var n = !0,
  6730. i = !e;
  6731. return ah.set(1 / 0, 1 / 0), sh.set(0, 0), !this._intersectCheckOneSide(this, t, ah, sh, i, 1) && (n = !1, i) || !this._intersectCheckOneSide(t, this, ah, sh, i, -1) && (n = !1, i) || i || De.copy(e, n ? ah : sh), n
  6732. }, t.prototype._intersectCheckOneSide = function (t, e, n, i, r, o) {
  6733. for (var a = !0, s = 0; s < 2; s++) {
  6734. var l = this._axes[s];
  6735. if (this._getProjMinMaxOnAxis(s, t._corners, rh), this._getProjMinMaxOnAxis(s, e._corners, oh), rh[1] < oh[0] || rh[0] > oh[1]) {
  6736. if (a = !1, r) return a;
  6737. var u = Math.abs(oh[0] - rh[1]),
  6738. h = Math.abs(rh[0] - oh[1]);
  6739. Math.min(u, h) > i.len() && (u < h ? De.scale(i, l, -u * o) : De.scale(i, l, h * o))
  6740. } else if (n) {
  6741. u = Math.abs(oh[0] - rh[1]), h = Math.abs(rh[0] - oh[1]);
  6742. Math.min(u, h) < n.len() && (u < h ? De.scale(n, l, u * o) : De.scale(n, l, -h * o))
  6743. }
  6744. }
  6745. return a
  6746. }, t.prototype._getProjMinMaxOnAxis = function (t, e, n) {
  6747. for (var i = this._axes[t], r = this._origin, o = e[0].dot(i) + r[t], a = o, s = o, l = 1; l < e.length; l++) {
  6748. var u = e[l].dot(i) + r[t];
  6749. a = Math.min(u, a), s = Math.max(u, s)
  6750. }
  6751. n[0] = a, n[1] = s
  6752. }, t
  6753. }(),
  6754. uh = [],
  6755. hh = function (t) {
  6756. function e() {
  6757. var e = null !== t && t.apply(this, arguments) || this;
  6758. return e.notClear = !0, e.incremental = !0, e._displayables = [], e._temporaryDisplayables = [], e._cursor = 0, e
  6759. }
  6760. return n(e, t), e.prototype.traverse = function (t, e) {
  6761. t.call(e, this)
  6762. }, e.prototype.useStyle = function () {
  6763. this.style = {}
  6764. }, e.prototype.getCursor = function () {
  6765. return this._cursor
  6766. }, e.prototype.innerAfterBrush = function () {
  6767. this._cursor = this._displayables.length
  6768. }, e.prototype.clearDisplaybles = function () {
  6769. this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1
  6770. }, e.prototype.clearTemporalDisplayables = function () {
  6771. this._temporaryDisplayables = []
  6772. }, e.prototype.addDisplayable = function (t, e) {
  6773. e ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.markRedraw()
  6774. }, e.prototype.addDisplayables = function (t, e) {
  6775. e = e || !1;
  6776. for (var n = 0; n < t.length; n++) this.addDisplayable(t[n], e)
  6777. }, e.prototype.getDisplayables = function () {
  6778. return this._displayables
  6779. }, e.prototype.getTemporalDisplayables = function () {
  6780. return this._temporaryDisplayables
  6781. }, e.prototype.eachPendingDisplayable = function (t) {
  6782. for (var e = this._cursor; e < this._displayables.length; e++) t && t(this._displayables[e]);
  6783. for (e = 0; e < this._temporaryDisplayables.length; e++) t && t(this._temporaryDisplayables[e])
  6784. }, e.prototype.update = function () {
  6785. this.updateTransform();
  6786. for (var t = this._cursor; t < this._displayables.length; t++) {
  6787. (e = this._displayables[t]).parent = this, e.update(), e.parent = null
  6788. }
  6789. for (t = 0; t < this._temporaryDisplayables.length; t++) {
  6790. var e;
  6791. (e = this._temporaryDisplayables[t]).parent = this, e.update(), e.parent = null
  6792. }
  6793. }, e.prototype.getBoundingRect = function () {
  6794. if (!this._rect) {
  6795. for (var t = new ze(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0; e < this._displayables.length; e++) {
  6796. var n = this._displayables[e],
  6797. i = n.getBoundingRect().clone();
  6798. n.needLocalTransform() && i.applyTransform(n.getLocalTransform(uh)), t.union(i)
  6799. }
  6800. this._rect = t
  6801. }
  6802. return this._rect
  6803. }, e.prototype.contain = function (t, e) {
  6804. var n = this.transformCoordToLocal(t, e);
  6805. if (this.getBoundingRect().contain(n[0], n[1]))
  6806. for (var i = 0; i < this._displayables.length; i++) {
  6807. if (this._displayables[i].contain(t, e)) return !0
  6808. }
  6809. return !1
  6810. }, e
  6811. }(Sa),
  6812. ch = Oo();
  6813. function ph(t, e, n, i, r) {
  6814. var o;
  6815. if (e && e.ecModel) {
  6816. var a = e.ecModel.getUpdatePayload();
  6817. o = a && a.animation
  6818. }
  6819. var s = "update" === t;
  6820. if (e && e.isAnimationEnabled()) {
  6821. var l = void 0,
  6822. u = void 0,
  6823. h = void 0;
  6824. return i ? (l = rt(i.duration, 200), u = rt(i.easing, "cubicOut"), h = 0) : (l = e.getShallow(s ? "animationDurationUpdate" : "animationDuration"), u = e.getShallow(s ? "animationEasingUpdate" : "animationEasing"), h = e.getShallow(s ? "animationDelayUpdate" : "animationDelay")), o && (null != o.duration && (l = o.duration), null != o.easing && (u = o.easing), null != o.delay && (h = o.delay)), X(h) && (h = h(n, r)), X(l) && (l = l(n)), {
  6825. duration: l || 0,
  6826. delay: h,
  6827. easing: u
  6828. }
  6829. }
  6830. return null
  6831. }
  6832. function dh(t, e, n, i, r, o, a) {
  6833. var s, l = !1;
  6834. X(r) ? (a = o, o = r, r = null) : q(r) && (o = r.cb, a = r.during, l = r.isFrom, s = r.removeOpt, r = r.dataIndex);
  6835. var u = "leave" === t;
  6836. u || e.stopAnimation("leave");
  6837. var h = ph(t, i, r, u ? s || {} : null, i && i.getAnimationDelayParams ? i.getAnimationDelayParams(e, r) : null);
  6838. if (h && h.duration > 0) {
  6839. var c = {
  6840. duration: h.duration,
  6841. delay: h.delay || 0,
  6842. easing: h.easing,
  6843. done: o,
  6844. force: !!o || !!a,
  6845. setToFinal: !u,
  6846. scope: t,
  6847. during: a
  6848. };
  6849. l ? e.animateFrom(n, c) : e.animateTo(n, c)
  6850. } else e.stopAnimation(), !l && e.attr(n), a && a(1), o && o()
  6851. }
  6852. function fh(t, e, n, i, r, o) {
  6853. dh("update", t, e, n, i, r, o)
  6854. }
  6855. function gh(t, e, n, i, r, o) {
  6856. dh("enter", t, e, n, i, r, o)
  6857. }
  6858. function yh(t) {
  6859. if (!t.__zr) return !0;
  6860. for (var e = 0; e < t.animators.length; e++) {
  6861. if ("leave" === t.animators[e].scope) return !0
  6862. }
  6863. return !1
  6864. }
  6865. function vh(t, e, n, i, r, o) {
  6866. yh(t) || dh("leave", t, e, n, i, r, o)
  6867. }
  6868. function mh(t, e, n, i) {
  6869. t.removeTextContent(), t.removeTextGuideLine(), vh(t, {
  6870. style: {
  6871. opacity: 0
  6872. }
  6873. }, e, n, i)
  6874. }
  6875. function xh(t, e, n) {
  6876. function i() {
  6877. t.parent && t.parent.remove(t)
  6878. }
  6879. t.isGroup ? t.traverse((function (t) {
  6880. t.isGroup || mh(t, e, n, i)
  6881. })) : mh(t, e, n, i)
  6882. }
  6883. function _h(t) {
  6884. ch(t).oldStyle = t.style
  6885. }
  6886. var bh = Math.max,
  6887. wh = Math.min,
  6888. Sh = {};
  6889. function Mh(t) {
  6890. return Is.extend(t)
  6891. }
  6892. var Ih = function (t, e) {
  6893. var i = yu(t, e);
  6894. return function (t) {
  6895. function e(e) {
  6896. var n = t.call(this, e) || this;
  6897. return n.applyTransform = i.applyTransform, n.buildPath = i.buildPath, n
  6898. }
  6899. return n(e, t), e
  6900. }(fu)
  6901. };
  6902. function Th(t, e) {
  6903. return Ih(t, e)
  6904. }
  6905. function Ch(t, e) {
  6906. Sh[t] = e
  6907. }
  6908. function Dh(t) {
  6909. if (Sh.hasOwnProperty(t)) return Sh[t]
  6910. }
  6911. function Ah(t, e, n, i) {
  6912. var r = vu(t, e);
  6913. return n && ("center" === i && (n = Lh(n, r.getBoundingRect())), Oh(r, n)), r
  6914. }
  6915. function kh(t, e, n) {
  6916. var i = new ks({
  6917. style: {
  6918. image: t,
  6919. x: e.x,
  6920. y: e.y,
  6921. width: e.width,
  6922. height: e.height
  6923. },
  6924. onload: function (t) {
  6925. if ("center" === n) {
  6926. var r = {
  6927. width: t.width,
  6928. height: t.height
  6929. };
  6930. i.setStyle(Lh(e, r))
  6931. }
  6932. }
  6933. });
  6934. return i
  6935. }
  6936. function Lh(t, e) {
  6937. var n, i = e.width / e.height,
  6938. r = t.height * i;
  6939. return n = r <= t.width ? t.height : (r = t.width) / i, {
  6940. x: t.x + t.width / 2 - r / 2,
  6941. y: t.y + t.height / 2 - n / 2,
  6942. width: r,
  6943. height: n
  6944. }
  6945. }
  6946. var Ph = function (t, e) {
  6947. for (var n = [], i = t.length, r = 0; r < i; r++) {
  6948. var o = t[r];
  6949. n.push(o.getUpdatedPathProxy(!0))
  6950. }
  6951. var a = new Is(e);
  6952. return a.createPathProxy(), a.buildPath = function (t) {
  6953. if (gu(t)) {
  6954. t.appendPath(n);
  6955. var e = t.getContext();
  6956. e && t.rebuildPath(e, 1)
  6957. }
  6958. }, a
  6959. };
  6960. function Oh(t, e) {
  6961. if (t.applyTransform) {
  6962. var n = t.getBoundingRect().calculateTransform(e);
  6963. t.applyTransform(n)
  6964. }
  6965. }
  6966. function Rh(t, e) {
  6967. return Ps(t, t, {
  6968. lineWidth: e
  6969. }), t
  6970. }
  6971. var Nh = Rs;
  6972. function Eh(t, e) {
  6973. for (var n = xe([]); t && t !== e;) be(n, t.getLocalTransform(), n), t = t.parent;
  6974. return n
  6975. }
  6976. function zh(t, e, n) {
  6977. return e && !N(e) && (e = gr.getLocalTransform(e)), n && (e = Ie([], e)), Wt([], t, e)
  6978. }
  6979. function Vh(t, e, n) {
  6980. var i = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0]),
  6981. r = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2]),
  6982. o = ["left" === t ? -i : "right" === t ? i : 0, "top" === t ? -r : "bottom" === t ? r : 0];
  6983. return o = zh(o, e, n), Math.abs(o[0]) > Math.abs(o[1]) ? o[0] > 0 ? "right" : "left" : o[1] > 0 ? "bottom" : "top"
  6984. }
  6985. function Bh(t) {
  6986. return !t.isGroup
  6987. }
  6988. function Fh(t, e, n) {
  6989. if (t && e) {
  6990. var i, r = (i = {}, t.traverse((function (t) {
  6991. Bh(t) && t.anid && (i[t.anid] = t)
  6992. })), i);
  6993. e.traverse((function (t) {
  6994. if (Bh(t) && t.anid) {
  6995. var e = r[t.anid];
  6996. if (e) {
  6997. var i = o(t);
  6998. t.attr(o(e)), fh(t, i, n, Qs(t).dataIndex)
  6999. }
  7000. }
  7001. }))
  7002. }
  7003. function o(t) {
  7004. var e = {
  7005. x: t.x,
  7006. y: t.y,
  7007. rotation: t.rotation
  7008. };
  7009. return function (t) {
  7010. return null != t.shape
  7011. }(t) && (e.shape = A({}, t.shape)), e
  7012. }
  7013. }
  7014. function Gh(t, e) {
  7015. return z(t, (function (t) {
  7016. var n = t[0];
  7017. n = bh(n, e.x), n = wh(n, e.x + e.width);
  7018. var i = t[1];
  7019. return i = bh(i, e.y), [n, i = wh(i, e.y + e.height)]
  7020. }))
  7021. }
  7022. function Wh(t, e) {
  7023. var n = bh(t.x, e.x),
  7024. i = wh(t.x + t.width, e.x + e.width),
  7025. r = bh(t.y, e.y),
  7026. o = wh(t.y + t.height, e.y + e.height);
  7027. if (i >= n && o >= r) return {
  7028. x: n,
  7029. y: r,
  7030. width: i - n,
  7031. height: o - r
  7032. }
  7033. }
  7034. function Hh(t, e, n) {
  7035. var i = A({
  7036. rectHover: !0
  7037. }, e),
  7038. r = i.style = {
  7039. strokeNoScale: !0
  7040. };
  7041. if (n = n || {
  7042. x: -1,
  7043. y: -1,
  7044. width: 2,
  7045. height: 2
  7046. }, t) return 0 === t.indexOf("image://") ? (r.image = t.slice(8), k(r, n), new ks(i)) : Ah(t.replace("path://", ""), i, n, "center")
  7047. }
  7048. function Yh(t, e, n, i, r) {
  7049. for (var o = 0, a = r[r.length - 1]; o < r.length; o++) {
  7050. var s = r[o];
  7051. if (Xh(t, e, n, i, s[0], s[1], a[0], a[1])) return !0;
  7052. a = s
  7053. }
  7054. }
  7055. function Xh(t, e, n, i, r, o, a, s) {
  7056. var l, u = n - t,
  7057. h = i - e,
  7058. c = a - r,
  7059. p = s - o,
  7060. d = Uh(c, p, u, h);
  7061. if ((l = d) <= 1e-6 && l >= -1e-6) return !1;
  7062. var f = t - r,
  7063. g = e - o,
  7064. y = Uh(f, g, u, h) / d;
  7065. if (y < 0 || y > 1) return !1;
  7066. var v = Uh(f, g, c, p) / d;
  7067. return !(v < 0 || v > 1)
  7068. }
  7069. function Uh(t, e, n, i) {
  7070. return t * i - n * e
  7071. }
  7072. function Zh(t) {
  7073. var e = t.itemTooltipOption,
  7074. n = t.componentModel,
  7075. i = t.itemName,
  7076. r = U(e) ? {
  7077. formatter: e
  7078. } : e,
  7079. o = n.mainType,
  7080. a = n.componentIndex,
  7081. s = {
  7082. componentType: o,
  7083. name: i,
  7084. $vars: ["name"]
  7085. };
  7086. s[o + "Index"] = a;
  7087. var l = t.formatterParamsExtra;
  7088. l && E(G(l), (function (t) {
  7089. _t(s, t) || (s[t] = l[t], s.$vars.push(t))
  7090. }));
  7091. var u = Qs(t.el);
  7092. u.componentMainType = o, u.componentIndex = a, u.tooltipConfig = {
  7093. name: i,
  7094. option: k({
  7095. content: i,
  7096. formatterParams: s
  7097. }, r)
  7098. }
  7099. }
  7100. function jh(t, e) {
  7101. var n;
  7102. t.isGroup && (n = e(t)), n || t.traverse(e)
  7103. }
  7104. function qh(t, e) {
  7105. if (t)
  7106. if (Y(t))
  7107. for (var n = 0; n < t.length; n++) jh(t[n], e);
  7108. else jh(t, e)
  7109. }
  7110. Ch("circle", _u), Ch("ellipse", wu), Ch("sector", zu), Ch("ring", Bu), Ch("polygon", Wu), Ch("polyline", Yu), Ch("rect", zs), Ch("line", Zu), Ch("bezierCurve", $u), Ch("arc", Qu);
  7111. var Kh = Object.freeze({
  7112. __proto__: null,
  7113. updateProps: fh,
  7114. initProps: gh,
  7115. removeElement: vh,
  7116. removeElementWithFadeOut: xh,
  7117. isElementRemoved: yh,
  7118. extendShape: Mh,
  7119. extendPath: Th,
  7120. registerShape: Ch,
  7121. getShapeClass: Dh,
  7122. makePath: Ah,
  7123. makeImage: kh,
  7124. mergePath: Ph,
  7125. resizePath: Oh,
  7126. subPixelOptimizeLine: Rh,
  7127. subPixelOptimizeRect: function (t) {
  7128. return Os(t.shape, t.shape, t.style), t
  7129. },
  7130. subPixelOptimize: Nh,
  7131. getTransform: Eh,
  7132. applyTransform: zh,
  7133. transformDirection: Vh,
  7134. groupTransition: Fh,
  7135. clipPointsByRect: Gh,
  7136. clipRectByRect: Wh,
  7137. createIcon: Hh,
  7138. linePolygonIntersect: Yh,
  7139. lineLineIntersect: Xh,
  7140. setTooltipConfig: Zh,
  7141. traverseElements: qh,
  7142. Group: zr,
  7143. Image: ks,
  7144. Text: Fs,
  7145. Circle: _u,
  7146. Ellipse: wu,
  7147. Sector: zu,
  7148. Ring: Bu,
  7149. Polygon: Wu,
  7150. Polyline: Yu,
  7151. Rect: zs,
  7152. Line: Zu,
  7153. BezierCurve: $u,
  7154. Arc: Qu,
  7155. IncrementalDisplayable: hh,
  7156. CompoundPath: th,
  7157. LinearGradient: nh,
  7158. RadialGradient: ih,
  7159. BoundingRect: ze,
  7160. OrientedBoundingRect: lh,
  7161. Point: De,
  7162. Path: Is
  7163. }),
  7164. $h = {};
  7165. function Jh(t, e) {
  7166. for (var n = 0; n < ol.length; n++) {
  7167. var i = ol[n],
  7168. r = e[i],
  7169. o = t.ensureState(i);
  7170. o.style = o.style || {}, o.style.text = r
  7171. }
  7172. var a = t.currentStates.slice();
  7173. t.clearStates(!0), t.setStyle({
  7174. text: e.normal
  7175. }), t.useStates(a, !0)
  7176. }
  7177. function Qh(t, e, n) {
  7178. var i, r = t.labelFetcher,
  7179. o = t.labelDataIndex,
  7180. a = t.labelDimIndex,
  7181. s = e.normal;
  7182. r && (i = r.getFormattedLabel(o, "normal", null, a, s && s.get("formatter"), null != n ? {
  7183. interpolatedValue: n
  7184. } : null)), null == i && (i = X(t.defaultText) ? t.defaultText(o, t, n) : t.defaultText);
  7185. for (var l = {
  7186. normal: i
  7187. }, u = 0; u < ol.length; u++) {
  7188. var h = ol[u],
  7189. c = e[h];
  7190. l[h] = rt(r ? r.getFormattedLabel(o, h, null, a, c && c.get("formatter")) : null, i)
  7191. }
  7192. return l
  7193. }
  7194. function tc(t, e, n, i) {
  7195. n = n || $h;
  7196. for (var r = t instanceof Fs, o = !1, a = 0; a < al.length; a++) {
  7197. if ((p = e[al[a]]) && p.getShallow("show")) {
  7198. o = !0;
  7199. break
  7200. }
  7201. }
  7202. var s = r ? t : t.getTextContent();
  7203. if (o) {
  7204. r || (s || (s = new Fs, t.setTextContent(s)), t.stateProxy && (s.stateProxy = t.stateProxy));
  7205. var l = Qh(n, e),
  7206. u = e.normal,
  7207. h = !!u.getShallow("show"),
  7208. c = nc(u, i && i.normal, n, !1, !r);
  7209. c.text = l.normal, r || t.setTextConfig(ic(u, n, !1));
  7210. for (a = 0; a < ol.length; a++) {
  7211. var p, d = ol[a];
  7212. if (p = e[d]) {
  7213. var f = s.ensureState(d),
  7214. g = !!rt(p.getShallow("show"), h);
  7215. if (g !== h && (f.ignore = !g), f.style = nc(p, i && i[d], n, !0, !r), f.style.text = l[d], !r) t.ensureState(d).textConfig = ic(p, n, !0)
  7216. }
  7217. }
  7218. s.silent = !!u.getShallow("silent"), null != s.style.x && (c.x = s.style.x), null != s.style.y && (c.y = s.style.y), s.ignore = !h, s.useStyle(c), s.dirty(), n.enableTextSetter && (uc(s).setLabelText = function (t) {
  7219. var i = Qh(n, e, t);
  7220. Jh(s, i)
  7221. })
  7222. } else s && (s.ignore = !0);
  7223. t.dirty()
  7224. }
  7225. function ec(t, e) {
  7226. e = e || "label";
  7227. for (var n = {
  7228. normal: t.getModel(e)
  7229. }, i = 0; i < ol.length; i++) {
  7230. var r = ol[i];
  7231. n[r] = t.getModel([r, e])
  7232. }
  7233. return n
  7234. }
  7235. function nc(t, e, n, i, r) {
  7236. var o = {};
  7237. return function (t, e, n, i, r) {
  7238. n = n || $h;
  7239. var o, a = e.ecModel,
  7240. s = a && a.option.textStyle,
  7241. l = function (t) {
  7242. var e;
  7243. for (; t && t !== t.ecModel;) {
  7244. var n = (t.option || $h).rich;
  7245. if (n) {
  7246. e = e || {};
  7247. for (var i = G(n), r = 0; r < i.length; r++) {
  7248. e[i[r]] = 1
  7249. }
  7250. }
  7251. t = t.parentModel
  7252. }
  7253. return e
  7254. }(e);
  7255. if (l)
  7256. for (var u in o = {}, l)
  7257. if (l.hasOwnProperty(u)) {
  7258. var h = e.getModel(["rich", u]);
  7259. sc(o[u] = {}, h, s, n, i, r, !1, !0)
  7260. } o && (t.rich = o);
  7261. var c = e.get("overflow");
  7262. c && (t.overflow = c);
  7263. var p = e.get("minMargin");
  7264. null != p && (t.margin = p);
  7265. sc(t, e, s, n, i, r, !0, !1)
  7266. }(o, t, n, i, r), e && A(o, e), o
  7267. }
  7268. function ic(t, e, n) {
  7269. e = e || {};
  7270. var i, r = {},
  7271. o = t.getShallow("rotate"),
  7272. a = rt(t.getShallow("distance"), n ? null : 5),
  7273. s = t.getShallow("offset");
  7274. return "outside" === (i = t.getShallow("position") || (n ? null : "inside")) && (i = e.defaultOutsidePosition || "top"), null != i && (r.position = i), null != s && (r.offset = s), null != o && (o *= Math.PI / 180, r.rotation = o), null != a && (r.distance = a), r.outsideFill = "inherit" === t.get("color") ? e.inheritColor || null : "auto", r
  7275. }
  7276. var rc = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"],
  7277. oc = ["align", "lineHeight", "width", "height", "tag", "verticalAlign"],
  7278. ac = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
  7279. function sc(t, e, n, i, r, o, a, s) {
  7280. n = !r && n || $h;
  7281. var l = i && i.inheritColor,
  7282. u = e.getShallow("color"),
  7283. h = e.getShallow("textBorderColor"),
  7284. c = rt(e.getShallow("opacity"), n.opacity);
  7285. "inherit" !== u && "auto" !== u || (u = l || null), "inherit" !== h && "auto" !== h || (h = l || null), o || (u = u || n.color, h = h || n.textBorderColor), null != u && (t.fill = u), null != h && (t.stroke = h);
  7286. var p = rt(e.getShallow("textBorderWidth"), n.textBorderWidth);
  7287. null != p && (t.lineWidth = p);
  7288. var d = rt(e.getShallow("textBorderType"), n.textBorderType);
  7289. null != d && (t.lineDash = d);
  7290. var f = rt(e.getShallow("textBorderDashOffset"), n.textBorderDashOffset);
  7291. null != f && (t.lineDashOffset = f), r || null != c || s || (c = i && i.defaultOpacity), null != c && (t.opacity = c), r || o || null == t.fill && i.inheritColor && (t.fill = i.inheritColor);
  7292. for (var g = 0; g < rc.length; g++) {
  7293. var y = rc[g];
  7294. null != (m = rt(e.getShallow(y), n[y])) && (t[y] = m)
  7295. }
  7296. for (g = 0; g < oc.length; g++) {
  7297. y = oc[g];
  7298. null != (m = e.getShallow(y)) && (t[y] = m)
  7299. }
  7300. if (null == t.verticalAlign) {
  7301. var v = e.getShallow("baseline");
  7302. null != v && (t.verticalAlign = v)
  7303. }
  7304. if (!a || !i.disableBox) {
  7305. for (g = 0; g < ac.length; g++) {
  7306. var m;
  7307. y = ac[g];
  7308. null != (m = e.getShallow(y)) && (t[y] = m)
  7309. }
  7310. var x = e.getShallow("borderType");
  7311. null != x && (t.borderDash = x), "auto" !== t.backgroundColor && "inherit" !== t.backgroundColor || !l || (t.backgroundColor = l), "auto" !== t.borderColor && "inherit" !== t.borderColor || !l || (t.borderColor = l)
  7312. }
  7313. }
  7314. function lc(t, e) {
  7315. var n = e && e.getModel("textStyle");
  7316. return ut([t.fontStyle || n && n.getShallow("fontStyle") || "", t.fontWeight || n && n.getShallow("fontWeight") || "", (t.fontSize || n && n.getShallow("fontSize") || 12) + "px", t.fontFamily || n && n.getShallow("fontFamily") || "sans-serif"].join(" "))
  7317. }
  7318. var uc = Oo();
  7319. function hc(t, e, n, i) {
  7320. if (t) {
  7321. var r = uc(t);
  7322. r.prevValue = r.value, r.value = n;
  7323. var o = e.normal;
  7324. r.valueAnimation = o.get("valueAnimation"), r.valueAnimation && (r.precision = o.get("precision"), r.defaultInterpolatedText = i, r.statesModels = e)
  7325. }
  7326. }
  7327. function cc(t, e, n, i, r) {
  7328. var o = uc(t);
  7329. if (o.valueAnimation && o.prevValue !== o.value) {
  7330. var a = o.defaultInterpolatedText,
  7331. s = rt(o.interpolatedValue, o.prevValue),
  7332. l = o.value;
  7333. t.percent = 0, (null == o.prevValue ? gh : fh)(t, {
  7334. percent: 1
  7335. }, i, e, null, (function (i) {
  7336. var u = Wo(n, o.precision, s, l, i);
  7337. o.interpolatedValue = 1 === i ? null : u;
  7338. var h = Qh({
  7339. labelDataIndex: e,
  7340. labelFetcher: r,
  7341. defaultText: a ? a(u) : u + ""
  7342. }, o.statesModels, u);
  7343. Jh(t, h)
  7344. }))
  7345. }
  7346. }
  7347. var pc, dc, fc = ["textStyle", "color"],
  7348. gc = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"],
  7349. yc = new Fs,
  7350. vc = function () {
  7351. function t() {}
  7352. return t.prototype.getTextColor = function (t) {
  7353. var e = this.ecModel;
  7354. return this.getShallow("color") || (!t && e ? e.get(fc) : null)
  7355. }, t.prototype.getFont = function () {
  7356. return lc({
  7357. fontStyle: this.getShallow("fontStyle"),
  7358. fontWeight: this.getShallow("fontWeight"),
  7359. fontSize: this.getShallow("fontSize"),
  7360. fontFamily: this.getShallow("fontFamily")
  7361. }, this.ecModel)
  7362. }, t.prototype.getTextRect = function (t) {
  7363. for (var e = {
  7364. text: t,
  7365. verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
  7366. }, n = 0; n < gc.length; n++) e[gc[n]] = this.getShallow(gc[n]);
  7367. return yc.useStyle(e), yc.update(), yc.getBoundingRect()
  7368. }, t
  7369. }(),
  7370. mc = [
  7371. ["lineWidth", "width"],
  7372. ["stroke", "color"],
  7373. ["opacity"],
  7374. ["shadowBlur"],
  7375. ["shadowOffsetX"],
  7376. ["shadowOffsetY"],
  7377. ["shadowColor"],
  7378. ["lineDash", "type"],
  7379. ["lineDashOffset", "dashOffset"],
  7380. ["lineCap", "cap"],
  7381. ["lineJoin", "join"],
  7382. ["miterLimit"]
  7383. ],
  7384. xc = Jo(mc),
  7385. _c = function () {
  7386. function t() {}
  7387. return t.prototype.getLineStyle = function (t) {
  7388. return xc(this, t)
  7389. }, t
  7390. }(),
  7391. bc = [
  7392. ["fill", "color"],
  7393. ["stroke", "borderColor"],
  7394. ["lineWidth", "borderWidth"],
  7395. ["opacity"],
  7396. ["shadowBlur"],
  7397. ["shadowOffsetX"],
  7398. ["shadowOffsetY"],
  7399. ["shadowColor"],
  7400. ["lineDash", "borderType"],
  7401. ["lineDashOffset", "borderDashOffset"],
  7402. ["lineCap", "borderCap"],
  7403. ["lineJoin", "borderJoin"],
  7404. ["miterLimit", "borderMiterLimit"]
  7405. ],
  7406. wc = Jo(bc),
  7407. Sc = function () {
  7408. function t() {}
  7409. return t.prototype.getItemStyle = function (t, e) {
  7410. return wc(this, t, e)
  7411. }, t
  7412. }(),
  7413. Mc = function () {
  7414. function t(t, e, n) {
  7415. this.parentModel = e, this.ecModel = n, this.option = t
  7416. }
  7417. return t.prototype.init = function (t, e, n) {
  7418. for (var i = [], r = 3; r < arguments.length; r++) i[r - 3] = arguments[r]
  7419. }, t.prototype.mergeOption = function (t, e) {
  7420. C(this.option, t, !0)
  7421. }, t.prototype.get = function (t, e) {
  7422. return null == t ? this.option : this._doGet(this.parsePath(t), !e && this.parentModel)
  7423. }, t.prototype.getShallow = function (t, e) {
  7424. var n = this.option,
  7425. i = null == n ? n : n[t];
  7426. if (null == i && !e) {
  7427. var r = this.parentModel;
  7428. r && (i = r.getShallow(t))
  7429. }
  7430. return i
  7431. }, t.prototype.getModel = function (e, n) {
  7432. var i = null != e,
  7433. r = i ? this.parsePath(e) : null;
  7434. return new t(i ? this._doGet(r) : this.option, n = n || this.parentModel && this.parentModel.getModel(this.resolveParentPath(r)), this.ecModel)
  7435. }, t.prototype.isEmpty = function () {
  7436. return null == this.option
  7437. }, t.prototype.restoreData = function () {}, t.prototype.clone = function () {
  7438. return new(0, this.constructor)(T(this.option))
  7439. }, t.prototype.parsePath = function (t) {
  7440. return "string" == typeof t ? t.split(".") : t
  7441. }, t.prototype.resolveParentPath = function (t) {
  7442. return t
  7443. }, t.prototype.isAnimationEnabled = function () {
  7444. if (!r.node && this.option) {
  7445. if (null != this.option.animation) return !!this.option.animation;
  7446. if (this.parentModel) return this.parentModel.isAnimationEnabled()
  7447. }
  7448. }, t.prototype._doGet = function (t, e) {
  7449. var n = this.option;
  7450. if (!t) return n;
  7451. for (var i = 0; i < t.length && (!t[i] || null != (n = n && "object" == typeof n ? n[t[i]] : null)); i++);
  7452. return null == n && e && (n = e._doGet(this.resolveParentPath(t), e.parentModel)), n
  7453. }, t
  7454. }();
  7455. Uo(Mc), pc = Mc, dc = ["__\0is_clz", jo++].join("_"), pc.prototype[dc] = !0, pc.isInstance = function (t) {
  7456. return !(!t || !t[dc])
  7457. }, R(Mc, _c), R(Mc, Sc), R(Mc, ta), R(Mc, vc);
  7458. var Ic = Math.round(10 * Math.random());
  7459. function Tc(t) {
  7460. return [t || "", Ic++].join("_")
  7461. }
  7462. function Cc(t, e) {
  7463. return C(C({}, t, !0), e, !0)
  7464. }
  7465. var Dc = "ZH",
  7466. Ac = "EN",
  7467. kc = Ac,
  7468. Lc = {},
  7469. Pc = {},
  7470. Oc = r.domSupported && (document.documentElement.lang || navigator.language || navigator.browserLanguage).toUpperCase().indexOf(Dc) > -1 ? Dc : kc;
  7471. function Rc(t, e) {
  7472. t = t.toUpperCase(), Pc[t] = new Mc(e), Lc[t] = e
  7473. }
  7474. function Nc(t) {
  7475. return Pc[t]
  7476. }
  7477. Rc(Ac, {
  7478. time: {
  7479. month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  7480. monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  7481. dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  7482. dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
  7483. },
  7484. legend: {
  7485. selector: {
  7486. all: "All",
  7487. inverse: "Inv"
  7488. }
  7489. },
  7490. toolbox: {
  7491. brush: {
  7492. title: {
  7493. rect: "Box Select",
  7494. polygon: "Lasso Select",
  7495. lineX: "Horizontally Select",
  7496. lineY: "Vertically Select",
  7497. keep: "Keep Selections",
  7498. clear: "Clear Selections"
  7499. }
  7500. },
  7501. dataView: {
  7502. title: "Data View",
  7503. lang: ["Data View", "Close", "Refresh"]
  7504. },
  7505. dataZoom: {
  7506. title: {
  7507. zoom: "Zoom",
  7508. back: "Zoom Reset"
  7509. }
  7510. },
  7511. magicType: {
  7512. title: {
  7513. line: "Switch to Line Chart",
  7514. bar: "Switch to Bar Chart",
  7515. stack: "Stack",
  7516. tiled: "Tile"
  7517. }
  7518. },
  7519. restore: {
  7520. title: "Restore"
  7521. },
  7522. saveAsImage: {
  7523. title: "Save as Image",
  7524. lang: ["Right Click to Save Image"]
  7525. }
  7526. },
  7527. series: {
  7528. typeNames: {
  7529. pie: "Pie chart",
  7530. bar: "Bar chart",
  7531. line: "Line chart",
  7532. scatter: "Scatter plot",
  7533. effectScatter: "Ripple scatter plot",
  7534. radar: "Radar chart",
  7535. tree: "Tree",
  7536. treemap: "Treemap",
  7537. boxplot: "Boxplot",
  7538. candlestick: "Candlestick",
  7539. k: "K line chart",
  7540. heatmap: "Heat map",
  7541. map: "Map",
  7542. parallel: "Parallel coordinate map",
  7543. lines: "Line graph",
  7544. graph: "Relationship graph",
  7545. sankey: "Sankey diagram",
  7546. funnel: "Funnel chart",
  7547. gauge: "Gauge",
  7548. pictorialBar: "Pictorial bar",
  7549. themeRiver: "Theme River Map",
  7550. sunburst: "Sunburst"
  7551. }
  7552. },
  7553. aria: {
  7554. general: {
  7555. withTitle: 'This is a chart about "{title}"',
  7556. withoutTitle: "This is a chart"
  7557. },
  7558. series: {
  7559. single: {
  7560. prefix: "",
  7561. withName: " with type {seriesType} named {seriesName}.",
  7562. withoutName: " with type {seriesType}."
  7563. },
  7564. multiple: {
  7565. prefix: ". It consists of {seriesCount} series count.",
  7566. withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
  7567. withoutName: " The {seriesId} series is a {seriesType}.",
  7568. separator: {
  7569. middle: "",
  7570. end: ""
  7571. }
  7572. }
  7573. },
  7574. data: {
  7575. allData: "The data is as follows: ",
  7576. partialData: "The first {displayCnt} items are: ",
  7577. withName: "the data for {name} is {value}",
  7578. withoutName: "{value}",
  7579. separator: {
  7580. middle: ", ",
  7581. end: ". "
  7582. }
  7583. }
  7584. }
  7585. }), Rc(Dc, {
  7586. time: {
  7587. month: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  7588. monthAbbr: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  7589. dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  7590. dayOfWeekAbbr: ["日", "一", "二", "三", "四", "五", "六"]
  7591. },
  7592. legend: {
  7593. selector: {
  7594. all: "全选",
  7595. inverse: "反选"
  7596. }
  7597. },
  7598. toolbox: {
  7599. brush: {
  7600. title: {
  7601. rect: "矩形选择",
  7602. polygon: "圈选",
  7603. lineX: "横向选择",
  7604. lineY: "纵向选择",
  7605. keep: "保持选择",
  7606. clear: "清除选择"
  7607. }
  7608. },
  7609. dataView: {
  7610. title: "数据视图",
  7611. lang: ["数据视图", "关闭", "刷新"]
  7612. },
  7613. dataZoom: {
  7614. title: {
  7615. zoom: "区域缩放",
  7616. back: "区域缩放还原"
  7617. }
  7618. },
  7619. magicType: {
  7620. title: {
  7621. line: "切换为折线图",
  7622. bar: "切换为柱状图",
  7623. stack: "切换为堆叠",
  7624. tiled: "切换为平铺"
  7625. }
  7626. },
  7627. restore: {
  7628. title: "还原"
  7629. },
  7630. saveAsImage: {
  7631. title: "保存为图片",
  7632. lang: ["右键另存为图片"]
  7633. }
  7634. },
  7635. series: {
  7636. typeNames: {
  7637. pie: "饼图",
  7638. bar: "柱状图",
  7639. line: "折线图",
  7640. scatter: "散点图",
  7641. effectScatter: "涟漪散点图",
  7642. radar: "雷达图",
  7643. tree: "树图",
  7644. treemap: "矩形树图",
  7645. boxplot: "箱型图",
  7646. candlestick: "K线图",
  7647. k: "K线图",
  7648. heatmap: "热力图",
  7649. map: "地图",
  7650. parallel: "平行坐标图",
  7651. lines: "线图",
  7652. graph: "关系图",
  7653. sankey: "桑基图",
  7654. funnel: "漏斗图",
  7655. gauge: "仪表盘图",
  7656. pictorialBar: "象形柱图",
  7657. themeRiver: "主题河流图",
  7658. sunburst: "旭日图"
  7659. }
  7660. },
  7661. aria: {
  7662. general: {
  7663. withTitle: "这是一个关于“{title}”的图表。",
  7664. withoutTitle: "这是一个图表,"
  7665. },
  7666. series: {
  7667. single: {
  7668. prefix: "",
  7669. withName: "图表类型是{seriesType},表示{seriesName}。",
  7670. withoutName: "图表类型是{seriesType}。"
  7671. },
  7672. multiple: {
  7673. prefix: "它由{seriesCount}个图表系列组成。",
  7674. withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
  7675. withoutName: "第{seriesId}个系列是一个{seriesType},",
  7676. separator: {
  7677. middle: ";",
  7678. end: "。"
  7679. }
  7680. }
  7681. },
  7682. data: {
  7683. allData: "其数据是——",
  7684. partialData: "其中,前{displayCnt}项是——",
  7685. withName: "{name}的数据是{value}",
  7686. withoutName: "{value}",
  7687. separator: {
  7688. middle: ",",
  7689. end: ""
  7690. }
  7691. }
  7692. }
  7693. });
  7694. var Ec = 1e3,
  7695. zc = 6e4,
  7696. Vc = 36e5,
  7697. Bc = 864e5,
  7698. Fc = 31536e6,
  7699. Gc = {
  7700. year: "{yyyy}",
  7701. month: "{MMM}",
  7702. day: "{d}",
  7703. hour: "{HH}:{mm}",
  7704. minute: "{HH}:{mm}",
  7705. second: "{HH}:{mm}:{ss}",
  7706. millisecond: "{HH}:{mm}:{ss} {SSS}",
  7707. none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"
  7708. },
  7709. Wc = "{yyyy}-{MM}-{dd}",
  7710. Hc = {
  7711. year: "{yyyy}",
  7712. month: "{yyyy}-{MM}",
  7713. day: Wc,
  7714. hour: Wc + " " + Gc.hour,
  7715. minute: Wc + " " + Gc.minute,
  7716. second: Wc + " " + Gc.second,
  7717. millisecond: Gc.none
  7718. },
  7719. Yc = ["year", "month", "day", "hour", "minute", "second", "millisecond"],
  7720. Xc = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
  7721. function Uc(t, e) {
  7722. return "0000".substr(0, e - (t += "").length) + t
  7723. }
  7724. function Zc(t) {
  7725. switch (t) {
  7726. case "half-year":
  7727. case "quarter":
  7728. return "month";
  7729. case "week":
  7730. case "half-week":
  7731. return "day";
  7732. case "half-day":
  7733. case "quarter-day":
  7734. return "hour";
  7735. default:
  7736. return t
  7737. }
  7738. }
  7739. function jc(t) {
  7740. return t === Zc(t)
  7741. }
  7742. function qc(t, e, n, i) {
  7743. var r = ro(t),
  7744. o = r[Jc(n)](),
  7745. a = r[Qc(n)]() + 1,
  7746. s = Math.floor((a - 1) / 3) + 1,
  7747. l = r[tp(n)](),
  7748. u = r["get" + (n ? "UTC" : "") + "Day"](),
  7749. h = r[ep(n)](),
  7750. c = (h - 1) % 12 + 1,
  7751. p = r[np(n)](),
  7752. d = r[ip(n)](),
  7753. f = r[rp(n)](),
  7754. g = (i instanceof Mc ? i : Nc(i || Oc) || Pc[kc]).getModel("time"),
  7755. y = g.get("month"),
  7756. v = g.get("monthAbbr"),
  7757. m = g.get("dayOfWeek"),
  7758. x = g.get("dayOfWeekAbbr");
  7759. return (e || "").replace(/{yyyy}/g, o + "").replace(/{yy}/g, o % 100 + "").replace(/{Q}/g, s + "").replace(/{MMMM}/g, y[a - 1]).replace(/{MMM}/g, v[a - 1]).replace(/{MM}/g, Uc(a, 2)).replace(/{M}/g, a + "").replace(/{dd}/g, Uc(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, m[u]).replace(/{ee}/g, x[u]).replace(/{e}/g, u + "").replace(/{HH}/g, Uc(h, 2)).replace(/{H}/g, h + "").replace(/{hh}/g, Uc(c + "", 2)).replace(/{h}/g, c + "").replace(/{mm}/g, Uc(p, 2)).replace(/{m}/g, p + "").replace(/{ss}/g, Uc(d, 2)).replace(/{s}/g, d + "").replace(/{SSS}/g, Uc(f, 3)).replace(/{S}/g, f + "")
  7760. }
  7761. function Kc(t, e) {
  7762. var n = ro(t),
  7763. i = n[Qc(e)]() + 1,
  7764. r = n[tp(e)](),
  7765. o = n[ep(e)](),
  7766. a = n[np(e)](),
  7767. s = n[ip(e)](),
  7768. l = 0 === n[rp(e)](),
  7769. u = l && 0 === s,
  7770. h = u && 0 === a,
  7771. c = h && 0 === o,
  7772. p = c && 1 === r;
  7773. return p && 1 === i ? "year" : p ? "month" : c ? "day" : h ? "hour" : u ? "minute" : l ? "second" : "millisecond"
  7774. }
  7775. function $c(t, e, n) {
  7776. var i = j(t) ? ro(t) : t;
  7777. switch (e = e || Kc(t, n)) {
  7778. case "year":
  7779. return i[Jc(n)]();
  7780. case "half-year":
  7781. return i[Qc(n)]() >= 6 ? 1 : 0;
  7782. case "quarter":
  7783. return Math.floor((i[Qc(n)]() + 1) / 4);
  7784. case "month":
  7785. return i[Qc(n)]();
  7786. case "day":
  7787. return i[tp(n)]();
  7788. case "half-day":
  7789. return i[ep(n)]() / 24;
  7790. case "hour":
  7791. return i[ep(n)]();
  7792. case "minute":
  7793. return i[np(n)]();
  7794. case "second":
  7795. return i[ip(n)]();
  7796. case "millisecond":
  7797. return i[rp(n)]()
  7798. }
  7799. }
  7800. function Jc(t) {
  7801. return t ? "getUTCFullYear" : "getFullYear"
  7802. }
  7803. function Qc(t) {
  7804. return t ? "getUTCMonth" : "getMonth"
  7805. }
  7806. function tp(t) {
  7807. return t ? "getUTCDate" : "getDate"
  7808. }
  7809. function ep(t) {
  7810. return t ? "getUTCHours" : "getHours"
  7811. }
  7812. function np(t) {
  7813. return t ? "getUTCMinutes" : "getMinutes"
  7814. }
  7815. function ip(t) {
  7816. return t ? "getUTCSeconds" : "getSeconds"
  7817. }
  7818. function rp(t) {
  7819. return t ? "getUTCMilliseconds" : "getMilliseconds"
  7820. }
  7821. function op(t) {
  7822. return t ? "setUTCFullYear" : "setFullYear"
  7823. }
  7824. function ap(t) {
  7825. return t ? "setUTCMonth" : "setMonth"
  7826. }
  7827. function sp(t) {
  7828. return t ? "setUTCDate" : "setDate"
  7829. }
  7830. function lp(t) {
  7831. return t ? "setUTCHours" : "setHours"
  7832. }
  7833. function up(t) {
  7834. return t ? "setUTCMinutes" : "setMinutes"
  7835. }
  7836. function hp(t) {
  7837. return t ? "setUTCSeconds" : "setSeconds"
  7838. }
  7839. function cp(t) {
  7840. return t ? "setUTCMilliseconds" : "setMilliseconds"
  7841. }
  7842. function pp(t) {
  7843. if (!co(t)) return U(t) ? t : "-";
  7844. var e = (t + "").split(".");
  7845. return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "")
  7846. }
  7847. function dp(t, e) {
  7848. return t = (t || "").toLowerCase().replace(/-(.)/g, (function (t, e) {
  7849. return e.toUpperCase()
  7850. })), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t
  7851. }
  7852. var fp = st;
  7853. function gp(t, e, n) {
  7854. function i(t) {
  7855. return t && ut(t) ? t : "-"
  7856. }
  7857. function r(t) {
  7858. return !(null == t || isNaN(t) || !isFinite(t))
  7859. }
  7860. var o = "time" === e,
  7861. a = t instanceof Date;
  7862. if (o || a) {
  7863. var s = o ? ro(t) : t;
  7864. if (!isNaN(+s)) return qc(s, "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}", n);
  7865. if (a) return "-"
  7866. }
  7867. if ("ordinal" === e) return Z(t) ? i(t) : j(t) && r(t) ? t + "" : "-";
  7868. var l = ho(t);
  7869. return r(l) ? pp(l) : Z(t) ? i(t) : "boolean" == typeof t ? t + "" : "-"
  7870. }
  7871. var yp = ["a", "b", "c", "d", "e", "f", "g"],
  7872. vp = function (t, e) {
  7873. return "{" + t + (null == e ? "" : e) + "}"
  7874. };
  7875. function mp(t, e, n) {
  7876. Y(e) || (e = [e]);
  7877. var i = e.length;
  7878. if (!i) return "";
  7879. for (var r = e[0].$vars || [], o = 0; o < r.length; o++) {
  7880. var a = yp[o];
  7881. t = t.replace(vp(a), vp(a, 0))
  7882. }
  7883. for (var s = 0; s < i; s++)
  7884. for (var l = 0; l < r.length; l++) {
  7885. var u = e[s][r[l]];
  7886. t = t.replace(vp(yp[l], s), n ? re(u) : u)
  7887. }
  7888. return t
  7889. }
  7890. function xp(t, e) {
  7891. var n = U(t) ? {
  7892. color: t,
  7893. extraCssText: e
  7894. } : t || {},
  7895. i = n.color,
  7896. r = n.type;
  7897. e = n.extraCssText;
  7898. var o = n.renderMode || "html";
  7899. return i ? "html" === o ? "subItem" === r ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + re(i) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:' + re(i) + ";" + (e || "") + '"></span>' : {
  7900. renderMode: o,
  7901. content: "{" + (n.markerId || "markerX") + "|} ",
  7902. style: "subItem" === r ? {
  7903. width: 4,
  7904. height: 4,
  7905. borderRadius: 2,
  7906. backgroundColor: i
  7907. } : {
  7908. width: 10,
  7909. height: 10,
  7910. borderRadius: 5,
  7911. backgroundColor: i
  7912. }
  7913. } : ""
  7914. }
  7915. function _p(t, e) {
  7916. return e = e || "transparent", U(t) ? t : q(t) && t.colorStops && (t.colorStops[0] || {}).color || e
  7917. }
  7918. function bp(t, e) {
  7919. if ("_blank" === e || "blank" === e) {
  7920. var n = window.open();
  7921. n.opener = null, n.location.href = t
  7922. } else window.open(t, e)
  7923. }
  7924. var wp = E,
  7925. Sp = ["left", "right", "top", "bottom", "width", "height"],
  7926. Mp = [
  7927. ["width", "left", "right"],
  7928. ["height", "top", "bottom"]
  7929. ];
  7930. function Ip(t, e, n, i, r) {
  7931. var o = 0,
  7932. a = 0;
  7933. null == i && (i = 1 / 0), null == r && (r = 1 / 0);
  7934. var s = 0;
  7935. e.eachChild((function (l, u) {
  7936. var h, c, p = l.getBoundingRect(),
  7937. d = e.childAt(u + 1),
  7938. f = d && d.getBoundingRect();
  7939. if ("horizontal" === t) {
  7940. var g = p.width + (f ? -f.x + p.x : 0);
  7941. (h = o + g) > i || l.newline ? (o = 0, h = g, a += s + n, s = p.height) : s = Math.max(s, p.height)
  7942. } else {
  7943. var y = p.height + (f ? -f.y + p.y : 0);
  7944. (c = a + y) > r || l.newline ? (o += s + n, a = 0, c = y, s = p.width) : s = Math.max(s, p.width)
  7945. }
  7946. l.newline || (l.x = o, l.y = a, l.markRedraw(), "horizontal" === t ? o = h + n : a = c + n)
  7947. }))
  7948. }
  7949. var Tp = Ip;
  7950. H(Ip, "vertical"), H(Ip, "horizontal");
  7951. function Cp(t, e, n) {
  7952. n = fp(n || 0);
  7953. var i = e.width,
  7954. r = e.height,
  7955. o = Ur(t.left, i),
  7956. a = Ur(t.top, r),
  7957. s = Ur(t.right, i),
  7958. l = Ur(t.bottom, r),
  7959. u = Ur(t.width, i),
  7960. h = Ur(t.height, r),
  7961. c = n[2] + n[0],
  7962. p = n[1] + n[3],
  7963. d = t.aspect;
  7964. switch (isNaN(u) && (u = i - s - p - o), isNaN(h) && (h = r - l - c - a), null != d && (isNaN(u) && isNaN(h) && (d > i / r ? u = .8 * i : h = .8 * r), isNaN(u) && (u = d * h), isNaN(h) && (h = u / d)), isNaN(o) && (o = i - s - u - p), isNaN(a) && (a = r - l - h - c), t.left || t.right) {
  7965. case "center":
  7966. o = i / 2 - u / 2 - n[3];
  7967. break;
  7968. case "right":
  7969. o = i - u - p
  7970. }
  7971. switch (t.top || t.bottom) {
  7972. case "middle":
  7973. case "center":
  7974. a = r / 2 - h / 2 - n[0];
  7975. break;
  7976. case "bottom":
  7977. a = r - h - c
  7978. }
  7979. o = o || 0, a = a || 0, isNaN(u) && (u = i - p - o - (s || 0)), isNaN(h) && (h = r - c - a - (l || 0));
  7980. var f = new ze(o + n[3], a + n[0], u, h);
  7981. return f.margin = n, f
  7982. }
  7983. function Dp(t, e, n, i, r, o) {
  7984. var a, s = !r || !r.hv || r.hv[0],
  7985. l = !r || !r.hv || r.hv[1],
  7986. u = r && r.boundingMode || "all";
  7987. if ((o = o || t).x = t.x, o.y = t.y, !s && !l) return !1;
  7988. if ("raw" === u) a = "group" === t.type ? new ze(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect();
  7989. else if (a = t.getBoundingRect(), t.needLocalTransform()) {
  7990. var h = t.getLocalTransform();
  7991. (a = a.clone()).applyTransform(h)
  7992. }
  7993. var c = Cp(k({
  7994. width: a.width,
  7995. height: a.height
  7996. }, e), n, i),
  7997. p = s ? c.x - a.x : 0,
  7998. d = l ? c.y - a.y : 0;
  7999. return "raw" === u ? (o.x = p, o.y = d) : (o.x += p, o.y += d), o === t && t.markRedraw(), !0
  8000. }
  8001. function Ap(t) {
  8002. var e = t.layoutMode || t.constructor.layoutMode;
  8003. return q(e) ? e : e ? {
  8004. type: e
  8005. } : null
  8006. }
  8007. function kp(t, e, n) {
  8008. var i = n && n.ignoreSize;
  8009. !Y(i) && (i = [i, i]);
  8010. var r = a(Mp[0], 0),
  8011. o = a(Mp[1], 1);
  8012. function a(n, r) {
  8013. var o = {},
  8014. a = 0,
  8015. u = {},
  8016. h = 0;
  8017. if (wp(n, (function (e) {
  8018. u[e] = t[e]
  8019. })), wp(n, (function (t) {
  8020. s(e, t) && (o[t] = u[t] = e[t]), l(o, t) && a++, l(u, t) && h++
  8021. })), i[r]) return l(e, n[1]) ? u[n[2]] = null : l(e, n[2]) && (u[n[1]] = null), u;
  8022. if (2 !== h && a) {
  8023. if (a >= 2) return o;
  8024. for (var c = 0; c < n.length; c++) {
  8025. var p = n[c];
  8026. if (!s(o, p) && s(t, p)) {
  8027. o[p] = t[p];
  8028. break
  8029. }
  8030. }
  8031. return o
  8032. }
  8033. return u
  8034. }
  8035. function s(t, e) {
  8036. return t.hasOwnProperty(e)
  8037. }
  8038. function l(t, e) {
  8039. return null != t[e] && "auto" !== t[e]
  8040. }
  8041. function u(t, e, n) {
  8042. wp(t, (function (t) {
  8043. e[t] = n[t]
  8044. }))
  8045. }
  8046. u(Mp[0], t, r), u(Mp[1], t, o)
  8047. }
  8048. function Lp(t) {
  8049. return Pp({}, t)
  8050. }
  8051. function Pp(t, e) {
  8052. return e && t && wp(Sp, (function (n) {
  8053. e.hasOwnProperty(n) && (t[n] = e[n])
  8054. })), t
  8055. }
  8056. var Op = Oo(),
  8057. Rp = function (t) {
  8058. function e(e, n, i) {
  8059. var r = t.call(this, e, n, i) || this;
  8060. return r.uid = Tc("ec_cpt_model"), r
  8061. }
  8062. return n(e, t), e.prototype.init = function (t, e, n) {
  8063. this.mergeDefaultAndTheme(t, n)
  8064. }, e.prototype.mergeDefaultAndTheme = function (t, e) {
  8065. var n = Ap(this),
  8066. i = n ? Lp(t) : {};
  8067. C(t, e.getTheme().get(this.mainType)), C(t, this.getDefaultOption()), n && kp(t, i, n)
  8068. }, e.prototype.mergeOption = function (t, e) {
  8069. C(this.option, t, !0);
  8070. var n = Ap(this);
  8071. n && kp(this.option, t, n)
  8072. }, e.prototype.optionUpdated = function (t, e) {}, e.prototype.getDefaultOption = function () {
  8073. var t = this.constructor;
  8074. if (! function (t) {
  8075. return !(!t || !t[Yo])
  8076. }(t)) return t.defaultOption;
  8077. var e = Op(this);
  8078. if (!e.defaultOption) {
  8079. for (var n = [], i = t; i;) {
  8080. var r = i.prototype.defaultOption;
  8081. r && n.push(r), i = i.superClass
  8082. }
  8083. for (var o = {}, a = n.length - 1; a >= 0; a--) o = C(o, n[a], !0);
  8084. e.defaultOption = o
  8085. }
  8086. return e.defaultOption
  8087. }, e.prototype.getReferringComponents = function (t, e) {
  8088. var n = t + "Index",
  8089. i = t + "Id";
  8090. return Bo(this.ecModel, t, {
  8091. index: this.get(n, !0),
  8092. id: this.get(i, !0)
  8093. }, e)
  8094. }, e.prototype.getBoxLayoutParams = function () {
  8095. var t = this;
  8096. return {
  8097. left: t.get("left"),
  8098. top: t.get("top"),
  8099. right: t.get("right"),
  8100. bottom: t.get("bottom"),
  8101. width: t.get("width"),
  8102. height: t.get("height")
  8103. }
  8104. }, e.prototype.getZLevelKey = function () {
  8105. return ""
  8106. }, e.prototype.setZLevel = function (t) {
  8107. this.option.zlevel = t
  8108. }, e.protoInitialize = function () {
  8109. var t = e.prototype;
  8110. t.type = "component", t.id = "", t.name = "", t.mainType = "", t.subType = "", t.componentIndex = 0
  8111. }(), e
  8112. }(Mc);
  8113. Zo(Rp, Mc), $o(Rp),
  8114. function (t) {
  8115. var e = {};
  8116. t.registerSubTypeDefaulter = function (t, n) {
  8117. var i = Xo(t);
  8118. e[i.main] = n
  8119. }, t.determineSubType = function (n, i) {
  8120. var r = i.type;
  8121. if (!r) {
  8122. var o = Xo(n).main;
  8123. t.hasSubTypes(n) && e[o] && (r = e[o](i))
  8124. }
  8125. return r
  8126. }
  8127. }(Rp),
  8128. function (t, e) {
  8129. function n(t, e) {
  8130. return t[e] || (t[e] = {
  8131. predecessor: [],
  8132. successor: []
  8133. }), t[e]
  8134. }
  8135. t.topologicalTravel = function (t, i, r, o) {
  8136. if (t.length) {
  8137. var a = function (t) {
  8138. var i = {},
  8139. r = [];
  8140. return E(t, (function (o) {
  8141. var a = n(i, o),
  8142. s = function (t, e) {
  8143. var n = [];
  8144. return E(t, (function (t) {
  8145. P(e, t) >= 0 && n.push(t)
  8146. })), n
  8147. }(a.originalDeps = e(o), t);
  8148. a.entryCount = s.length, 0 === a.entryCount && r.push(o), E(s, (function (t) {
  8149. P(a.predecessor, t) < 0 && a.predecessor.push(t);
  8150. var e = n(i, t);
  8151. P(e.successor, t) < 0 && e.successor.push(o)
  8152. }))
  8153. })), {
  8154. graph: i,
  8155. noEntryList: r
  8156. }
  8157. }(i),
  8158. s = a.graph,
  8159. l = a.noEntryList,
  8160. u = {};
  8161. for (E(t, (function (t) {
  8162. u[t] = !0
  8163. })); l.length;) {
  8164. var h = l.pop(),
  8165. c = s[h],
  8166. p = !!u[h];
  8167. p && (r.call(o, h, c.originalDeps.slice()), delete u[h]), E(c.successor, p ? f : d)
  8168. }
  8169. E(u, (function () {
  8170. var t = "";
  8171. throw new Error(t)
  8172. }))
  8173. }
  8174. function d(t) {
  8175. s[t].entryCount--, 0 === s[t].entryCount && l.push(t)
  8176. }
  8177. function f(t) {
  8178. u[t] = !0, d(t)
  8179. }
  8180. }
  8181. }(Rp, (function (t) {
  8182. var e = [];
  8183. E(Rp.getClassesByMainType(t), (function (t) {
  8184. e = e.concat(t.dependencies || t.prototype.dependencies || [])
  8185. })), e = z(e, (function (t) {
  8186. return Xo(t).main
  8187. })), "dataset" !== t && P(e, "dataset") <= 0 && e.unshift("dataset");
  8188. return e
  8189. }));
  8190. var Np = "";
  8191. "undefined" != typeof navigator && (Np = navigator.platform || "");
  8192. var Ep = "rgba(0, 0, 0, 0.2)",
  8193. zp = {
  8194. darkMode: "auto",
  8195. colorBy: "series",
  8196. color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
  8197. gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
  8198. aria: {
  8199. decal: {
  8200. decals: [{
  8201. color: Ep,
  8202. dashArrayX: [1, 0],
  8203. dashArrayY: [2, 5],
  8204. symbolSize: 1,
  8205. rotation: Math.PI / 6
  8206. }, {
  8207. color: Ep,
  8208. symbol: "circle",
  8209. dashArrayX: [
  8210. [8, 8],
  8211. [0, 8, 8, 0]
  8212. ],
  8213. dashArrayY: [6, 0],
  8214. symbolSize: .8
  8215. }, {
  8216. color: Ep,
  8217. dashArrayX: [1, 0],
  8218. dashArrayY: [4, 3],
  8219. rotation: -Math.PI / 4
  8220. }, {
  8221. color: Ep,
  8222. dashArrayX: [
  8223. [6, 6],
  8224. [0, 6, 6, 0]
  8225. ],
  8226. dashArrayY: [6, 0]
  8227. }, {
  8228. color: Ep,
  8229. dashArrayX: [
  8230. [1, 0],
  8231. [1, 6]
  8232. ],
  8233. dashArrayY: [1, 0, 6, 0],
  8234. rotation: Math.PI / 4
  8235. }, {
  8236. color: Ep,
  8237. symbol: "triangle",
  8238. dashArrayX: [
  8239. [9, 9],
  8240. [0, 9, 9, 0]
  8241. ],
  8242. dashArrayY: [7, 2],
  8243. symbolSize: .75
  8244. }]
  8245. }
  8246. },
  8247. textStyle: {
  8248. fontFamily: Np.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
  8249. fontSize: 12,
  8250. fontStyle: "normal",
  8251. fontWeight: "normal"
  8252. },
  8253. blendMode: null,
  8254. stateAnimation: {
  8255. duration: 300,
  8256. easing: "cubicOut"
  8257. },
  8258. animation: "auto",
  8259. animationDuration: 1e3,
  8260. animationDurationUpdate: 500,
  8261. animationEasing: "cubicInOut",
  8262. animationEasingUpdate: "cubicInOut",
  8263. animationThreshold: 2e3,
  8264. progressiveThreshold: 3e3,
  8265. progressive: 400,
  8266. hoverLayerThreshold: 3e3,
  8267. useUTC: !1
  8268. },
  8269. Vp = yt(["tooltip", "label", "itemName", "itemId", "itemGroupId", "seriesName"]),
  8270. Bp = "original",
  8271. Fp = "arrayRows",
  8272. Gp = "objectRows",
  8273. Wp = "keyedColumns",
  8274. Hp = "typedArray",
  8275. Yp = "unknown",
  8276. Xp = "column",
  8277. Up = "row",
  8278. Zp = 1,
  8279. jp = 2,
  8280. qp = 3,
  8281. Kp = Oo();
  8282. function $p(t, e, n) {
  8283. var i = {},
  8284. r = Qp(e);
  8285. if (!r || !t) return i;
  8286. var o, a, s = [],
  8287. l = [],
  8288. u = e.ecModel,
  8289. h = Kp(u).datasetMap,
  8290. c = r.uid + "_" + n.seriesLayoutBy;
  8291. E(t = t.slice(), (function (e, n) {
  8292. var r = q(e) ? e : t[n] = {
  8293. name: e
  8294. };
  8295. "ordinal" === r.type && null == o && (o = n, a = f(r)), i[r.name] = []
  8296. }));
  8297. var p = h.get(c) || h.set(c, {
  8298. categoryWayDim: a,
  8299. valueWayDim: 0
  8300. });
  8301. function d(t, e, n) {
  8302. for (var i = 0; i < n; i++) t.push(e + i)
  8303. }
  8304. function f(t) {
  8305. var e = t.dimsDef;
  8306. return e ? e.length : 1
  8307. }
  8308. return E(t, (function (t, e) {
  8309. var n = t.name,
  8310. r = f(t);
  8311. if (null == o) {
  8312. var a = p.valueWayDim;
  8313. d(i[n], a, r), d(l, a, r), p.valueWayDim += r
  8314. } else if (o === e) d(i[n], 0, r), d(s, 0, r);
  8315. else {
  8316. a = p.categoryWayDim;
  8317. d(i[n], a, r), d(l, a, r), p.categoryWayDim += r
  8318. }
  8319. })), s.length && (i.itemName = s), l.length && (i.seriesName = l), i
  8320. }
  8321. function Jp(t, e, n) {
  8322. var i = {};
  8323. if (!Qp(t)) return i;
  8324. var r, o = e.sourceFormat,
  8325. a = e.dimensionsDefine;
  8326. o !== Gp && o !== Wp || E(a, (function (t, e) {
  8327. "name" === (q(t) ? t.name : t) && (r = e)
  8328. }));
  8329. var s = function () {
  8330. for (var t = {}, i = {}, s = [], l = 0, u = Math.min(5, n); l < u; l++) {
  8331. var h = ed(e.data, o, e.seriesLayoutBy, a, e.startIndex, l);
  8332. s.push(h);
  8333. var c = h === qp;
  8334. if (c && null == t.v && l !== r && (t.v = l), (null == t.n || t.n === t.v || !c && s[t.n] === qp) && (t.n = l), p(t) && s[t.n] !== qp) return t;
  8335. c || (h === jp && null == i.v && l !== r && (i.v = l), null != i.n && i.n !== i.v || (i.n = l))
  8336. }
  8337. function p(t) {
  8338. return null != t.v && null != t.n
  8339. }
  8340. return p(t) ? t : p(i) ? i : null
  8341. }();
  8342. if (s) {
  8343. i.value = [s.v];
  8344. var l = null != r ? r : s.n;
  8345. i.itemName = [l], i.seriesName = [l]
  8346. }
  8347. return i
  8348. }
  8349. function Qp(t) {
  8350. if (!t.get("data", !0)) return Bo(t.ecModel, "dataset", {
  8351. index: t.get("datasetIndex", !0),
  8352. id: t.get("datasetId", !0)
  8353. }, zo).models[0]
  8354. }
  8355. function td(t, e) {
  8356. return ed(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e)
  8357. }
  8358. function ed(t, e, n, i, r, o) {
  8359. var a, s, l;
  8360. if ($(t)) return qp;
  8361. if (i) {
  8362. var u = i[o];
  8363. q(u) ? (s = u.name, l = u.type) : U(u) && (s = u)
  8364. }
  8365. if (null != l) return "ordinal" === l ? Zp : qp;
  8366. if (e === Fp) {
  8367. var h = t;
  8368. if (n === Up) {
  8369. for (var c = h[o], p = 0; p < (c || []).length && p < 5; p++)
  8370. if (null != (a = m(c[r + p]))) return a
  8371. } else
  8372. for (p = 0; p < h.length && p < 5; p++) {
  8373. var d = h[r + p];
  8374. if (d && null != (a = m(d[o]))) return a
  8375. }
  8376. } else if (e === Gp) {
  8377. var f = t;
  8378. if (!s) return qp;
  8379. for (p = 0; p < f.length && p < 5; p++) {
  8380. if ((y = f[p]) && null != (a = m(y[s]))) return a
  8381. }
  8382. } else if (e === Wp) {
  8383. if (!s) return qp;
  8384. if (!(c = t[s]) || $(c)) return qp;
  8385. for (p = 0; p < c.length && p < 5; p++)
  8386. if (null != (a = m(c[p]))) return a
  8387. } else if (e === Bp) {
  8388. var g = t;
  8389. for (p = 0; p < g.length && p < 5; p++) {
  8390. var y, v = Mo(y = g[p]);
  8391. if (!Y(v)) return qp;
  8392. if (null != (a = m(v[o]))) return a
  8393. }
  8394. }
  8395. function m(t) {
  8396. var e = U(t);
  8397. return null != t && isFinite(t) && "" !== t ? e ? jp : qp : e && "-" !== t ? Zp : void 0
  8398. }
  8399. return qp
  8400. }
  8401. var nd = yt();
  8402. var id, rd, od, ad = Oo(),
  8403. sd = Oo(),
  8404. ld = function () {
  8405. function t() {}
  8406. return t.prototype.getColorFromPalette = function (t, e, n) {
  8407. var i = bo(this.get("color", !0)),
  8408. r = this.get("colorLayer", !0);
  8409. return hd(this, ad, i, r, t, e, n)
  8410. }, t.prototype.clearColorPalette = function () {
  8411. ! function (t, e) {
  8412. e(t).paletteIdx = 0, e(t).paletteNameMap = {}
  8413. }(this, ad)
  8414. }, t
  8415. }();
  8416. function ud(t, e, n, i) {
  8417. var r = bo(t.get(["aria", "decal", "decals"]));
  8418. return hd(t, sd, r, null, e, n, i)
  8419. }
  8420. function hd(t, e, n, i, r, o, a) {
  8421. var s = e(o = o || t),
  8422. l = s.paletteIdx || 0,
  8423. u = s.paletteNameMap = s.paletteNameMap || {};
  8424. if (u.hasOwnProperty(r)) return u[r];
  8425. var h = null != a && i ? function (t, e) {
  8426. for (var n = t.length, i = 0; i < n; i++)
  8427. if (t[i].length > e) return t[i];
  8428. return t[n - 1]
  8429. }(i, a) : n;
  8430. if ((h = h || n) && h.length) {
  8431. var c = h[l];
  8432. return r && (u[r] = c), s.paletteIdx = (l + 1) % h.length, c
  8433. }
  8434. }
  8435. var cd = "\0_ec_inner";
  8436. var pd = function (t) {
  8437. function e() {
  8438. return null !== t && t.apply(this, arguments) || this
  8439. }
  8440. return n(e, t), e.prototype.init = function (t, e, n, i, r, o) {
  8441. i = i || {}, this.option = null, this._theme = new Mc(i), this._locale = new Mc(r), this._optionManager = o
  8442. }, e.prototype.setOption = function (t, e, n) {
  8443. var i = gd(e);
  8444. this._optionManager.setOption(t, n, i), this._resetOption(null, i)
  8445. }, e.prototype.resetOption = function (t, e) {
  8446. return this._resetOption(t, gd(e))
  8447. }, e.prototype._resetOption = function (t, e) {
  8448. var n = !1,
  8449. i = this._optionManager;
  8450. if (!t || "recreate" === t) {
  8451. var r = i.mountOption("recreate" === t);
  8452. 0, this.option && "recreate" !== t ? (this.restoreData(), this._mergeOption(r, e)) : od(this, r), n = !0
  8453. }
  8454. if ("timeline" !== t && "media" !== t || this.restoreData(), !t || "recreate" === t || "timeline" === t) {
  8455. var o = i.getTimelineOption(this);
  8456. o && (n = !0, this._mergeOption(o, e))
  8457. }
  8458. if (!t || "recreate" === t || "media" === t) {
  8459. var a = i.getMediaOption(this);
  8460. a.length && E(a, (function (t) {
  8461. n = !0, this._mergeOption(t, e)
  8462. }), this)
  8463. }
  8464. return n
  8465. }, e.prototype.mergeOption = function (t) {
  8466. this._mergeOption(t, null)
  8467. }, e.prototype._mergeOption = function (t, e) {
  8468. var n = this.option,
  8469. i = this._componentsMap,
  8470. r = this._componentsCount,
  8471. o = [],
  8472. a = yt(),
  8473. s = e && e.replaceMergeMainTypeMap;
  8474. Kp(this).datasetMap = yt(), E(t, (function (t, e) {
  8475. null != t && (Rp.hasClass(e) ? e && (o.push(e), a.set(e, !0)) : n[e] = null == n[e] ? T(t) : C(n[e], t, !0))
  8476. })), s && s.each((function (t, e) {
  8477. Rp.hasClass(e) && !a.get(e) && (o.push(e), a.set(e, !0))
  8478. })), Rp.topologicalTravel(o, Rp.getAllClassMainTypes(), (function (e) {
  8479. var o = function (t, e, n) {
  8480. var i = nd.get(e);
  8481. if (!i) return n;
  8482. var r = i(t);
  8483. return r ? n.concat(r) : n
  8484. }(this, e, bo(t[e])),
  8485. a = i.get(e),
  8486. l = a ? s && s.get(e) ? "replaceMerge" : "normalMerge" : "replaceAll",
  8487. u = To(a, o, l);
  8488. (function (t, e, n) {
  8489. E(t, (function (t) {
  8490. var i = t.newOption;
  8491. q(i) && (t.keyInfo.mainType = e, t.keyInfo.subType = function (t, e, n, i) {
  8492. return e.type ? e.type : n ? n.subType : i.determineSubType(t, e)
  8493. }(e, i, t.existing, n))
  8494. }))
  8495. })(u, e, Rp), n[e] = null, i.set(e, null), r.set(e, 0);
  8496. var h, c = [],
  8497. p = [],
  8498. d = 0;
  8499. E(u, (function (t, n) {
  8500. var i = t.existing,
  8501. r = t.newOption;
  8502. if (r) {
  8503. var o = "series" === e,
  8504. a = Rp.getClass(e, t.keyInfo.subType, !o);
  8505. if (!a) return;
  8506. if ("tooltip" === e) {
  8507. if (h) return void 0;
  8508. h = !0
  8509. }
  8510. if (i && i.constructor === a) i.name = t.keyInfo.name, i.mergeOption(r, this), i.optionUpdated(r, !1);
  8511. else {
  8512. var s = A({
  8513. componentIndex: n
  8514. }, t.keyInfo);
  8515. A(i = new a(r, this, this, s), s), t.brandNew && (i.__requireNewView = !0), i.init(r, this, this), i.optionUpdated(null, !0)
  8516. }
  8517. } else i && (i.mergeOption({}, this), i.optionUpdated({}, !1));
  8518. i ? (c.push(i.option), p.push(i), d++) : (c.push(void 0), p.push(void 0))
  8519. }), this), n[e] = c, i.set(e, p), r.set(e, d), "series" === e && id(this)
  8520. }), this), this._seriesIndices || id(this)
  8521. }, e.prototype.getOption = function () {
  8522. var t = T(this.option);
  8523. return E(t, (function (e, n) {
  8524. if (Rp.hasClass(n)) {
  8525. for (var i = bo(e), r = i.length, o = !1, a = r - 1; a >= 0; a--) i[a] && !Lo(i[a]) ? o = !0 : (i[a] = null, !o && r--);
  8526. i.length = r, t[n] = i
  8527. }
  8528. })), delete t[cd], t
  8529. }, e.prototype.getTheme = function () {
  8530. return this._theme
  8531. }, e.prototype.getLocaleModel = function () {
  8532. return this._locale
  8533. }, e.prototype.setUpdatePayload = function (t) {
  8534. this._payload = t
  8535. }, e.prototype.getUpdatePayload = function () {
  8536. return this._payload
  8537. }, e.prototype.getComponent = function (t, e) {
  8538. var n = this._componentsMap.get(t);
  8539. if (n) {
  8540. var i = n[e || 0];
  8541. if (i) return i;
  8542. if (null == e)
  8543. for (var r = 0; r < n.length; r++)
  8544. if (n[r]) return n[r]
  8545. }
  8546. }, e.prototype.queryComponents = function (t) {
  8547. var e = t.mainType;
  8548. if (!e) return [];
  8549. var n, i = t.index,
  8550. r = t.id,
  8551. o = t.name,
  8552. a = this._componentsMap.get(e);
  8553. return a && a.length ? (null != i ? (n = [], E(bo(i), (function (t) {
  8554. a[t] && n.push(a[t])
  8555. }))) : n = null != r ? dd("id", r, a) : null != o ? dd("name", o, a) : B(a, (function (t) {
  8556. return !!t
  8557. })), fd(n, t)) : []
  8558. }, e.prototype.findComponents = function (t) {
  8559. var e, n, i, r, o, a = t.query,
  8560. s = t.mainType,
  8561. l = (n = s + "Index", i = s + "Id", r = s + "Name", !(e = a) || null == e[n] && null == e[i] && null == e[r] ? null : {
  8562. mainType: s,
  8563. index: e[n],
  8564. id: e[i],
  8565. name: e[r]
  8566. }),
  8567. u = l ? this.queryComponents(l) : B(this._componentsMap.get(s), (function (t) {
  8568. return !!t
  8569. }));
  8570. return o = fd(u, t), t.filter ? B(o, t.filter) : o
  8571. }, e.prototype.eachComponent = function (t, e, n) {
  8572. var i = this._componentsMap;
  8573. if (X(t)) {
  8574. var r = e,
  8575. o = t;
  8576. i.each((function (t, e) {
  8577. for (var n = 0; t && n < t.length; n++) {
  8578. var i = t[n];
  8579. i && o.call(r, e, i, i.componentIndex)
  8580. }
  8581. }))
  8582. } else
  8583. for (var a = U(t) ? i.get(t) : q(t) ? this.findComponents(t) : null, s = 0; a && s < a.length; s++) {
  8584. var l = a[s];
  8585. l && e.call(n, l, l.componentIndex)
  8586. }
  8587. }, e.prototype.getSeriesByName = function (t) {
  8588. var e = Ao(t, null);
  8589. return B(this._componentsMap.get("series"), (function (t) {
  8590. return !!t && null != e && t.name === e
  8591. }))
  8592. }, e.prototype.getSeriesByIndex = function (t) {
  8593. return this._componentsMap.get("series")[t]
  8594. }, e.prototype.getSeriesByType = function (t) {
  8595. return B(this._componentsMap.get("series"), (function (e) {
  8596. return !!e && e.subType === t
  8597. }))
  8598. }, e.prototype.getSeries = function () {
  8599. return B(this._componentsMap.get("series"), (function (t) {
  8600. return !!t
  8601. }))
  8602. }, e.prototype.getSeriesCount = function () {
  8603. return this._componentsCount.get("series")
  8604. }, e.prototype.eachSeries = function (t, e) {
  8605. rd(this), E(this._seriesIndices, (function (n) {
  8606. var i = this._componentsMap.get("series")[n];
  8607. t.call(e, i, n)
  8608. }), this)
  8609. }, e.prototype.eachRawSeries = function (t, e) {
  8610. E(this._componentsMap.get("series"), (function (n) {
  8611. n && t.call(e, n, n.componentIndex)
  8612. }))
  8613. }, e.prototype.eachSeriesByType = function (t, e, n) {
  8614. rd(this), E(this._seriesIndices, (function (i) {
  8615. var r = this._componentsMap.get("series")[i];
  8616. r.subType === t && e.call(n, r, i)
  8617. }), this)
  8618. }, e.prototype.eachRawSeriesByType = function (t, e, n) {
  8619. return E(this.getSeriesByType(t), e, n)
  8620. }, e.prototype.isSeriesFiltered = function (t) {
  8621. return rd(this), null == this._seriesIndicesMap.get(t.componentIndex)
  8622. }, e.prototype.getCurrentSeriesIndices = function () {
  8623. return (this._seriesIndices || []).slice()
  8624. }, e.prototype.filterSeries = function (t, e) {
  8625. rd(this);
  8626. var n = [];
  8627. E(this._seriesIndices, (function (i) {
  8628. var r = this._componentsMap.get("series")[i];
  8629. t.call(e, r, i) && n.push(i)
  8630. }), this), this._seriesIndices = n, this._seriesIndicesMap = yt(n)
  8631. }, e.prototype.restoreData = function (t) {
  8632. id(this);
  8633. var e = this._componentsMap,
  8634. n = [];
  8635. e.each((function (t, e) {
  8636. Rp.hasClass(e) && n.push(e)
  8637. })), Rp.topologicalTravel(n, Rp.getAllClassMainTypes(), (function (n) {
  8638. E(e.get(n), (function (e) {
  8639. !e || "series" === n && function (t, e) {
  8640. if (e) {
  8641. var n = e.seriesIndex,
  8642. i = e.seriesId,
  8643. r = e.seriesName;
  8644. return null != n && t.componentIndex !== n || null != i && t.id !== i || null != r && t.name !== r
  8645. }
  8646. }(e, t) || e.restoreData()
  8647. }))
  8648. }))
  8649. }, e.internalField = (id = function (t) {
  8650. var e = t._seriesIndices = [];
  8651. E(t._componentsMap.get("series"), (function (t) {
  8652. t && e.push(t.componentIndex)
  8653. })), t._seriesIndicesMap = yt(e)
  8654. }, rd = function (t) {}, void(od = function (t, e) {
  8655. t.option = {}, t.option[cd] = 1, t._componentsMap = yt({
  8656. series: []
  8657. }), t._componentsCount = yt();
  8658. var n = e.aria;
  8659. q(n) && null == n.enabled && (n.enabled = !0),
  8660. function (t, e) {
  8661. var n = t.color && !t.colorLayer;
  8662. E(e, (function (e, i) {
  8663. "colorLayer" === i && n || Rp.hasClass(i) || ("object" == typeof e ? t[i] = t[i] ? C(t[i], e, !1) : T(e) : null == t[i] && (t[i] = e))
  8664. }))
  8665. }(e, t._theme.option), C(e, zp, !1), t._mergeOption(e, null)
  8666. })), e
  8667. }(Mc);
  8668. function dd(t, e, n) {
  8669. if (Y(e)) {
  8670. var i = yt();
  8671. return E(e, (function (t) {
  8672. null != t && (null != Ao(t, null) && i.set(t, !0))
  8673. })), B(n, (function (e) {
  8674. return e && i.get(e[t])
  8675. }))
  8676. }
  8677. var r = Ao(e, null);
  8678. return B(n, (function (e) {
  8679. return e && null != r && e[t] === r
  8680. }))
  8681. }
  8682. function fd(t, e) {
  8683. return e.hasOwnProperty("subType") ? B(t, (function (t) {
  8684. return t && t.subType === e.subType
  8685. })) : t
  8686. }
  8687. function gd(t) {
  8688. var e = yt();
  8689. return t && E(bo(t.replaceMerge), (function (t) {
  8690. e.set(t, !0)
  8691. })), {
  8692. replaceMergeMainTypeMap: e
  8693. }
  8694. }
  8695. R(pd, ld);
  8696. var yd = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isSSR", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getOption", "getId", "updateLabelLayout"],
  8697. vd = function (t) {
  8698. E(yd, (function (e) {
  8699. this[e] = W(t[e], t)
  8700. }), this)
  8701. },
  8702. md = {},
  8703. xd = function () {
  8704. function t() {
  8705. this._coordinateSystems = []
  8706. }
  8707. return t.prototype.create = function (t, e) {
  8708. var n = [];
  8709. E(md, (function (i, r) {
  8710. var o = i.create(t, e);
  8711. n = n.concat(o || [])
  8712. })), this._coordinateSystems = n
  8713. }, t.prototype.update = function (t, e) {
  8714. E(this._coordinateSystems, (function (n) {
  8715. n.update && n.update(t, e)
  8716. }))
  8717. }, t.prototype.getCoordinateSystems = function () {
  8718. return this._coordinateSystems.slice()
  8719. }, t.register = function (t, e) {
  8720. md[t] = e
  8721. }, t.get = function (t) {
  8722. return md[t]
  8723. }, t
  8724. }(),
  8725. _d = /^(min|max)?(.+)$/,
  8726. bd = function () {
  8727. function t(t) {
  8728. this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = t
  8729. }
  8730. return t.prototype.setOption = function (t, e, n) {
  8731. t && (E(bo(t.series), (function (t) {
  8732. t && t.data && $(t.data) && ct(t.data)
  8733. })), E(bo(t.dataset), (function (t) {
  8734. t && t.source && $(t.source) && ct(t.source)
  8735. }))), t = T(t);
  8736. var i = this._optionBackup,
  8737. r = function (t, e, n) {
  8738. var i, r, o = [],
  8739. a = t.baseOption,
  8740. s = t.timeline,
  8741. l = t.options,
  8742. u = t.media,
  8743. h = !!t.media,
  8744. c = !!(l || s || a && a.timeline);
  8745. a ? (r = a).timeline || (r.timeline = s) : ((c || h) && (t.options = t.media = null), r = t);
  8746. h && Y(u) && E(u, (function (t) {
  8747. t && t.option && (t.query ? o.push(t) : i || (i = t))
  8748. }));
  8749. function p(t) {
  8750. E(e, (function (e) {
  8751. e(t, n)
  8752. }))
  8753. }
  8754. return p(r), E(l, (function (t) {
  8755. return p(t)
  8756. })), E(o, (function (t) {
  8757. return p(t.option)
  8758. })), {
  8759. baseOption: r,
  8760. timelineOptions: l || [],
  8761. mediaDefault: i,
  8762. mediaList: o
  8763. }
  8764. }(t, e, !i);
  8765. this._newBaseOption = r.baseOption, i ? (r.timelineOptions.length && (i.timelineOptions = r.timelineOptions), r.mediaList.length && (i.mediaList = r.mediaList), r.mediaDefault && (i.mediaDefault = r.mediaDefault)) : this._optionBackup = r
  8766. }, t.prototype.mountOption = function (t) {
  8767. var e = this._optionBackup;
  8768. return this._timelineOptions = e.timelineOptions, this._mediaList = e.mediaList, this._mediaDefault = e.mediaDefault, this._currentMediaIndices = [], T(t ? e.baseOption : this._newBaseOption)
  8769. }, t.prototype.getTimelineOption = function (t) {
  8770. var e, n = this._timelineOptions;
  8771. if (n.length) {
  8772. var i = t.getComponent("timeline");
  8773. i && (e = T(n[i.getCurrentIndex()]))
  8774. }
  8775. return e
  8776. }, t.prototype.getMediaOption = function (t) {
  8777. var e, n, i = this._api.getWidth(),
  8778. r = this._api.getHeight(),
  8779. o = this._mediaList,
  8780. a = this._mediaDefault,
  8781. s = [],
  8782. l = [];
  8783. if (!o.length && !a) return l;
  8784. for (var u = 0, h = o.length; u < h; u++) wd(o[u].query, i, r) && s.push(u);
  8785. return !s.length && a && (s = [-1]), s.length && (e = s, n = this._currentMediaIndices, e.join(",") !== n.join(",")) && (l = z(s, (function (t) {
  8786. return T(-1 === t ? a.option : o[t].option)
  8787. }))), this._currentMediaIndices = s, l
  8788. }, t
  8789. }();
  8790. function wd(t, e, n) {
  8791. var i = {
  8792. width: e,
  8793. height: n,
  8794. aspectratio: e / n
  8795. },
  8796. r = !0;
  8797. return E(t, (function (t, e) {
  8798. var n = e.match(_d);
  8799. if (n && n[1] && n[2]) {
  8800. var o = n[1],
  8801. a = n[2].toLowerCase();
  8802. (function (t, e, n) {
  8803. return "min" === n ? t >= e : "max" === n ? t <= e : t === e
  8804. })(i[a], t, o) || (r = !1)
  8805. }
  8806. })), r
  8807. }
  8808. var Sd = E,
  8809. Md = q,
  8810. Id = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
  8811. function Td(t) {
  8812. var e = t && t.itemStyle;
  8813. if (e)
  8814. for (var n = 0, i = Id.length; n < i; n++) {
  8815. var r = Id[n],
  8816. o = e.normal,
  8817. a = e.emphasis;
  8818. o && o[r] && (t[r] = t[r] || {}, t[r].normal ? C(t[r].normal, o[r]) : t[r].normal = o[r], o[r] = null), a && a[r] && (t[r] = t[r] || {}, t[r].emphasis ? C(t[r].emphasis, a[r]) : t[r].emphasis = a[r], a[r] = null)
  8819. }
  8820. }
  8821. function Cd(t, e, n) {
  8822. if (t && t[e] && (t[e].normal || t[e].emphasis)) {
  8823. var i = t[e].normal,
  8824. r = t[e].emphasis;
  8825. i && (n ? (t[e].normal = t[e].emphasis = null, k(t[e], i)) : t[e] = i), r && (t.emphasis = t.emphasis || {}, t.emphasis[e] = r, r.focus && (t.emphasis.focus = r.focus), r.blurScope && (t.emphasis.blurScope = r.blurScope))
  8826. }
  8827. }
  8828. function Dd(t) {
  8829. Cd(t, "itemStyle"), Cd(t, "lineStyle"), Cd(t, "areaStyle"), Cd(t, "label"), Cd(t, "labelLine"), Cd(t, "upperLabel"), Cd(t, "edgeLabel")
  8830. }
  8831. function Ad(t, e) {
  8832. var n = Md(t) && t[e],
  8833. i = Md(n) && n.textStyle;
  8834. if (i) {
  8835. 0;
  8836. for (var r = 0, o = So.length; r < o; r++) {
  8837. var a = So[r];
  8838. i.hasOwnProperty(a) && (n[a] = i[a])
  8839. }
  8840. }
  8841. }
  8842. function kd(t) {
  8843. t && (Dd(t), Ad(t, "label"), t.emphasis && Ad(t.emphasis, "label"))
  8844. }
  8845. function Ld(t) {
  8846. return Y(t) ? t : t ? [t] : []
  8847. }
  8848. function Pd(t) {
  8849. return (Y(t) ? t[0] : t) || {}
  8850. }
  8851. function Od(t, e) {
  8852. Sd(Ld(t.series), (function (t) {
  8853. Md(t) && function (t) {
  8854. if (Md(t)) {
  8855. Td(t), Dd(t), Ad(t, "label"), Ad(t, "upperLabel"), Ad(t, "edgeLabel"), t.emphasis && (Ad(t.emphasis, "label"), Ad(t.emphasis, "upperLabel"), Ad(t.emphasis, "edgeLabel"));
  8856. var e = t.markPoint;
  8857. e && (Td(e), kd(e));
  8858. var n = t.markLine;
  8859. n && (Td(n), kd(n));
  8860. var i = t.markArea;
  8861. i && kd(i);
  8862. var r = t.data;
  8863. if ("graph" === t.type) {
  8864. r = r || t.nodes;
  8865. var o = t.links || t.edges;
  8866. if (o && !$(o))
  8867. for (var a = 0; a < o.length; a++) kd(o[a]);
  8868. E(t.categories, (function (t) {
  8869. Dd(t)
  8870. }))
  8871. }
  8872. if (r && !$(r))
  8873. for (a = 0; a < r.length; a++) kd(r[a]);
  8874. if ((e = t.markPoint) && e.data) {
  8875. var s = e.data;
  8876. for (a = 0; a < s.length; a++) kd(s[a])
  8877. }
  8878. if ((n = t.markLine) && n.data) {
  8879. var l = n.data;
  8880. for (a = 0; a < l.length; a++) Y(l[a]) ? (kd(l[a][0]), kd(l[a][1])) : kd(l[a])
  8881. }
  8882. "gauge" === t.type ? (Ad(t, "axisLabel"), Ad(t, "title"), Ad(t, "detail")) : "treemap" === t.type ? (Cd(t.breadcrumb, "itemStyle"), E(t.levels, (function (t) {
  8883. Dd(t)
  8884. }))) : "tree" === t.type && Dd(t.leaves)
  8885. }
  8886. }(t)
  8887. }));
  8888. var n = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  8889. e && n.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), Sd(n, (function (e) {
  8890. Sd(Ld(t[e]), (function (t) {
  8891. t && (Ad(t, "axisLabel"), Ad(t.axisPointer, "label"))
  8892. }))
  8893. })), Sd(Ld(t.parallel), (function (t) {
  8894. var e = t && t.parallelAxisDefault;
  8895. Ad(e, "axisLabel"), Ad(e && e.axisPointer, "label")
  8896. })), Sd(Ld(t.calendar), (function (t) {
  8897. Cd(t, "itemStyle"), Ad(t, "dayLabel"), Ad(t, "monthLabel"), Ad(t, "yearLabel")
  8898. })), Sd(Ld(t.radar), (function (t) {
  8899. Ad(t, "name"), t.name && null == t.axisName && (t.axisName = t.name, delete t.name), null != t.nameGap && null == t.axisNameGap && (t.axisNameGap = t.nameGap, delete t.nameGap)
  8900. })), Sd(Ld(t.geo), (function (t) {
  8901. Md(t) && (kd(t), Sd(Ld(t.regions), (function (t) {
  8902. kd(t)
  8903. })))
  8904. })), Sd(Ld(t.timeline), (function (t) {
  8905. kd(t), Cd(t, "label"), Cd(t, "itemStyle"), Cd(t, "controlStyle", !0);
  8906. var e = t.data;
  8907. Y(e) && E(e, (function (t) {
  8908. q(t) && (Cd(t, "label"), Cd(t, "itemStyle"))
  8909. }))
  8910. })), Sd(Ld(t.toolbox), (function (t) {
  8911. Cd(t, "iconStyle"), Sd(t.feature, (function (t) {
  8912. Cd(t, "iconStyle")
  8913. }))
  8914. })), Ad(Pd(t.axisPointer), "label"), Ad(Pd(t.tooltip).axisPointer, "label")
  8915. }
  8916. function Rd(t) {
  8917. t && E(Nd, (function (e) {
  8918. e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]])
  8919. }))
  8920. }
  8921. var Nd = [
  8922. ["x", "left"],
  8923. ["y", "top"],
  8924. ["x2", "right"],
  8925. ["y2", "bottom"]
  8926. ],
  8927. Ed = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"],
  8928. zd = [
  8929. ["borderRadius", "barBorderRadius"],
  8930. ["borderColor", "barBorderColor"],
  8931. ["borderWidth", "barBorderWidth"]
  8932. ];
  8933. function Vd(t) {
  8934. var e = t && t.itemStyle;
  8935. if (e)
  8936. for (var n = 0; n < zd.length; n++) {
  8937. var i = zd[n][1],
  8938. r = zd[n][0];
  8939. null != e[i] && (e[r] = e[i])
  8940. }
  8941. }
  8942. function Bd(t) {
  8943. t && "edge" === t.alignTo && null != t.margin && null == t.edgeDistance && (t.edgeDistance = t.margin)
  8944. }
  8945. function Fd(t) {
  8946. t && t.downplay && !t.blur && (t.blur = t.downplay)
  8947. }
  8948. function Gd(t, e) {
  8949. if (t)
  8950. for (var n = 0; n < t.length; n++) e(t[n]), t[n] && Gd(t[n].children, e)
  8951. }
  8952. function Wd(t, e) {
  8953. Od(t, e), t.series = bo(t.series), E(t.series, (function (t) {
  8954. if (q(t)) {
  8955. var e = t.type;
  8956. if ("line" === e) null != t.clipOverflow && (t.clip = t.clipOverflow);
  8957. else if ("pie" === e || "gauge" === e) {
  8958. if (null != t.clockWise && (t.clockwise = t.clockWise), Bd(t.label), (r = t.data) && !$(r))
  8959. for (var n = 0; n < r.length; n++) Bd(r[n]);
  8960. null != t.hoverOffset && (t.emphasis = t.emphasis || {}, (t.emphasis.scaleSize = null) && (t.emphasis.scaleSize = t.hoverOffset))
  8961. } else if ("gauge" === e) {
  8962. var i = function (t, e) {
  8963. for (var n = e.split(","), i = t, r = 0; r < n.length && null != (i = i && i[n[r]]); r++);
  8964. return i
  8965. }(t, "pointer.color");
  8966. null != i && function (t, e, n, i) {
  8967. for (var r, o = e.split(","), a = t, s = 0; s < o.length - 1; s++) null == a[r = o[s]] && (a[r] = {}), a = a[r];
  8968. (i || null == a[o[s]]) && (a[o[s]] = n)
  8969. }(t, "itemStyle.color", i)
  8970. } else if ("bar" === e) {
  8971. var r;
  8972. if (Vd(t), Vd(t.backgroundStyle), Vd(t.emphasis), (r = t.data) && !$(r))
  8973. for (n = 0; n < r.length; n++) "object" == typeof r[n] && (Vd(r[n]), Vd(r[n] && r[n].emphasis))
  8974. } else if ("sunburst" === e) {
  8975. var o = t.highlightPolicy;
  8976. o && (t.emphasis = t.emphasis || {}, t.emphasis.focus || (t.emphasis.focus = o)), Fd(t), Gd(t.data, Fd)
  8977. } else "graph" === e || "sankey" === e ? function (t) {
  8978. t && null != t.focusNodeAdjacency && (t.emphasis = t.emphasis || {}, null == t.emphasis.focus && (t.emphasis.focus = "adjacency"))
  8979. }(t) : "map" === e && (t.mapType && !t.map && (t.map = t.mapType), t.mapLocation && k(t, t.mapLocation));
  8980. null != t.hoverAnimation && (t.emphasis = t.emphasis || {}, t.emphasis && null == t.emphasis.scale && (t.emphasis.scale = t.hoverAnimation)), Rd(t)
  8981. }
  8982. })), t.dataRange && (t.visualMap = t.dataRange), E(Ed, (function (e) {
  8983. var n = t[e];
  8984. n && (Y(n) || (n = [n]), E(n, (function (t) {
  8985. Rd(t)
  8986. })))
  8987. }))
  8988. }
  8989. function Hd(t) {
  8990. E(t, (function (e, n) {
  8991. var i = [],
  8992. r = [NaN, NaN],
  8993. o = [e.stackResultDimension, e.stackedOverDimension],
  8994. a = e.data,
  8995. s = e.isStackedByIndex,
  8996. l = e.seriesModel.get("stackStrategy") || "samesign";
  8997. a.modify(o, (function (o, u, h) {
  8998. var c, p, d = a.get(e.stackedDimension, h);
  8999. if (isNaN(d)) return r;
  9000. s ? p = a.getRawIndex(h) : c = a.get(e.stackedByDimension, h);
  9001. for (var f = NaN, g = n - 1; g >= 0; g--) {
  9002. var y = t[g];
  9003. if (s || (p = y.data.rawIndexOf(y.stackedByDimension, c)), p >= 0) {
  9004. var v = y.data.getByRawIndex(y.stackResultDimension, p);
  9005. if ("all" === l || "positive" === l && v > 0 || "negative" === l && v < 0 || "samesign" === l && d >= 0 && v > 0 || "samesign" === l && d <= 0 && v < 0) {
  9006. d = Qr(d, v), f = v;
  9007. break
  9008. }
  9009. }
  9010. }
  9011. return i[0] = d, i[1] = f, i
  9012. }))
  9013. }))
  9014. }
  9015. var Yd, Xd, Ud, Zd, jd, qd = function (t) {
  9016. this.data = t.data || (t.sourceFormat === Wp ? {} : []), this.sourceFormat = t.sourceFormat || Yp, this.seriesLayoutBy = t.seriesLayoutBy || Xp, this.startIndex = t.startIndex || 0, this.dimensionsDetectedCount = t.dimensionsDetectedCount, this.metaRawOption = t.metaRawOption;
  9017. var e = this.dimensionsDefine = t.dimensionsDefine;
  9018. if (e)
  9019. for (var n = 0; n < e.length; n++) {
  9020. var i = e[n];
  9021. null == i.type && td(this, n) === Zp && (i.type = "ordinal")
  9022. }
  9023. };
  9024. function Kd(t) {
  9025. return t instanceof qd
  9026. }
  9027. function $d(t, e, n) {
  9028. n = n || Qd(t);
  9029. var i = e.seriesLayoutBy,
  9030. r = function (t, e, n, i, r) {
  9031. var o, a;
  9032. if (!t) return {
  9033. dimensionsDefine: tf(r),
  9034. startIndex: a,
  9035. dimensionsDetectedCount: o
  9036. };
  9037. if (e === Fp) {
  9038. var s = t;
  9039. "auto" === i || null == i ? ef((function (t) {
  9040. null != t && "-" !== t && (U(t) ? null == a && (a = 1) : a = 0)
  9041. }), n, s, 10) : a = j(i) ? i : i ? 1 : 0, r || 1 !== a || (r = [], ef((function (t, e) {
  9042. r[e] = null != t ? t + "" : ""
  9043. }), n, s, 1 / 0)), o = r ? r.length : n === Up ? s.length : s[0] ? s[0].length : null
  9044. } else if (e === Gp) r || (r = function (t) {
  9045. var e, n = 0;
  9046. for (; n < t.length && !(e = t[n++]););
  9047. if (e) return G(e)
  9048. }(t));
  9049. else if (e === Wp) r || (r = [], E(t, (function (t, e) {
  9050. r.push(e)
  9051. })));
  9052. else if (e === Bp) {
  9053. var l = Mo(t[0]);
  9054. o = Y(l) && l.length || 1
  9055. }
  9056. return {
  9057. startIndex: a,
  9058. dimensionsDefine: tf(r),
  9059. dimensionsDetectedCount: o
  9060. }
  9061. }(t, n, i, e.sourceHeader, e.dimensions);
  9062. return new qd({
  9063. data: t,
  9064. sourceFormat: n,
  9065. seriesLayoutBy: i,
  9066. dimensionsDefine: r.dimensionsDefine,
  9067. startIndex: r.startIndex,
  9068. dimensionsDetectedCount: r.dimensionsDetectedCount,
  9069. metaRawOption: T(e)
  9070. })
  9071. }
  9072. function Jd(t) {
  9073. return new qd({
  9074. data: t,
  9075. sourceFormat: $(t) ? Hp : Bp
  9076. })
  9077. }
  9078. function Qd(t) {
  9079. var e = Yp;
  9080. if ($(t)) e = Hp;
  9081. else if (Y(t)) {
  9082. 0 === t.length && (e = Fp);
  9083. for (var n = 0, i = t.length; n < i; n++) {
  9084. var r = t[n];
  9085. if (null != r) {
  9086. if (Y(r)) {
  9087. e = Fp;
  9088. break
  9089. }
  9090. if (q(r)) {
  9091. e = Gp;
  9092. break
  9093. }
  9094. }
  9095. }
  9096. } else if (q(t))
  9097. for (var o in t)
  9098. if (_t(t, o) && N(t[o])) {
  9099. e = Wp;
  9100. break
  9101. } return e
  9102. }
  9103. function tf(t) {
  9104. if (t) {
  9105. var e = yt();
  9106. return z(t, (function (t, n) {
  9107. var i = {
  9108. name: (t = q(t) ? t : {
  9109. name: t
  9110. }).name,
  9111. displayName: t.displayName,
  9112. type: t.type
  9113. };
  9114. if (null == i.name) return i;
  9115. i.name += "", null == i.displayName && (i.displayName = i.name);
  9116. var r = e.get(i.name);
  9117. return r ? i.name += "-" + r.count++ : e.set(i.name, {
  9118. count: 1
  9119. }), i
  9120. }))
  9121. }
  9122. }
  9123. function ef(t, e, n, i) {
  9124. if (e === Up)
  9125. for (var r = 0; r < n.length && r < i; r++) t(n[r] ? n[r][0] : null, r);
  9126. else {
  9127. var o = n[0] || [];
  9128. for (r = 0; r < o.length && r < i; r++) t(o[r], r)
  9129. }
  9130. }
  9131. function nf(t) {
  9132. var e = t.sourceFormat;
  9133. return e === Gp || e === Wp
  9134. }
  9135. var rf = function () {
  9136. function t(t, e) {
  9137. var n = Kd(t) ? t : Jd(t);
  9138. this._source = n;
  9139. var i = this._data = n.data;
  9140. n.sourceFormat === Hp && (this._offset = 0, this._dimSize = e, this._data = i), jd(this, i, n)
  9141. }
  9142. return t.prototype.getSource = function () {
  9143. return this._source
  9144. }, t.prototype.count = function () {
  9145. return 0
  9146. }, t.prototype.getItem = function (t, e) {}, t.prototype.appendData = function (t) {}, t.prototype.clean = function () {}, t.protoInitialize = function () {
  9147. var e = t.prototype;
  9148. e.pure = !1, e.persistent = !0
  9149. }(), t.internalField = function () {
  9150. var t;
  9151. jd = function (t, r, o) {
  9152. var a = o.sourceFormat,
  9153. s = o.seriesLayoutBy,
  9154. l = o.startIndex,
  9155. u = o.dimensionsDefine,
  9156. h = Zd[ff(a, s)];
  9157. if (A(t, h), a === Hp) t.getItem = e, t.count = i, t.fillStorage = n;
  9158. else {
  9159. var c = sf(a, s);
  9160. t.getItem = W(c, null, r, l, u);
  9161. var p = hf(a, s);
  9162. t.count = W(p, null, r, l, u)
  9163. }
  9164. };
  9165. var e = function (t, e) {
  9166. t -= this._offset, e = e || [];
  9167. for (var n = this._data, i = this._dimSize, r = i * t, o = 0; o < i; o++) e[o] = n[r + o];
  9168. return e
  9169. },
  9170. n = function (t, e, n, i) {
  9171. for (var r = this._data, o = this._dimSize, a = 0; a < o; a++) {
  9172. for (var s = i[a], l = null == s[0] ? 1 / 0 : s[0], u = null == s[1] ? -1 / 0 : s[1], h = e - t, c = n[a], p = 0; p < h; p++) {
  9173. var d = r[p * o + a];
  9174. c[t + p] = d, d < l && (l = d), d > u && (u = d)
  9175. }
  9176. s[0] = l, s[1] = u
  9177. }
  9178. },
  9179. i = function () {
  9180. return this._data ? this._data.length / this._dimSize : 0
  9181. };
  9182. function r(t) {
  9183. for (var e = 0; e < t.length; e++) this._data.push(t[e])
  9184. }(t = {})[Fp + "_" + Xp] = {
  9185. pure: !0,
  9186. appendData: r
  9187. }, t[Fp + "_" + Up] = {
  9188. pure: !0,
  9189. appendData: function () {
  9190. throw new Error('Do not support appendData when set seriesLayoutBy: "row".')
  9191. }
  9192. }, t[Gp] = {
  9193. pure: !0,
  9194. appendData: r
  9195. }, t[Wp] = {
  9196. pure: !0,
  9197. appendData: function (t) {
  9198. var e = this._data;
  9199. E(t, (function (t, n) {
  9200. for (var i = e[n] || (e[n] = []), r = 0; r < (t || []).length; r++) i.push(t[r])
  9201. }))
  9202. }
  9203. }, t[Bp] = {
  9204. appendData: r
  9205. }, t[Hp] = {
  9206. persistent: !1,
  9207. pure: !0,
  9208. appendData: function (t) {
  9209. this._data = t
  9210. },
  9211. clean: function () {
  9212. this._offset += this.count(), this._data = null
  9213. }
  9214. }, Zd = t
  9215. }(), t
  9216. }(),
  9217. of = function (t, e, n, i) {
  9218. return t[i]
  9219. },
  9220. af = ((Yd = {})[Fp + "_" + Xp] = function (t, e, n, i) {
  9221. return t[i + e]
  9222. }, Yd[Fp + "_" + Up] = function (t, e, n, i, r) {
  9223. i += e;
  9224. for (var o = r || [], a = t, s = 0; s < a.length; s++) {
  9225. var l = a[s];
  9226. o[s] = l ? l[i] : null
  9227. }
  9228. return o
  9229. }, Yd[Gp] = of , Yd[Wp] = function (t, e, n, i, r) {
  9230. for (var o = r || [], a = 0; a < n.length; a++) {
  9231. var s = n[a].name;
  9232. 0;
  9233. var l = t[s];
  9234. o[a] = l ? l[i] : null
  9235. }
  9236. return o
  9237. }, Yd[Bp] = of , Yd);
  9238. function sf(t, e) {
  9239. var n = af[ff(t, e)];
  9240. return n
  9241. }
  9242. var lf = function (t, e, n) {
  9243. return t.length
  9244. },
  9245. uf = ((Xd = {})[Fp + "_" + Xp] = function (t, e, n) {
  9246. return Math.max(0, t.length - e)
  9247. }, Xd[Fp + "_" + Up] = function (t, e, n) {
  9248. var i = t[0];
  9249. return i ? Math.max(0, i.length - e) : 0
  9250. }, Xd[Gp] = lf, Xd[Wp] = function (t, e, n) {
  9251. var i = n[0].name;
  9252. var r = t[i];
  9253. return r ? r.length : 0
  9254. }, Xd[Bp] = lf, Xd);
  9255. function hf(t, e) {
  9256. var n = uf[ff(t, e)];
  9257. return n
  9258. }
  9259. var cf = function (t, e, n) {
  9260. return t[e]
  9261. },
  9262. pf = ((Ud = {})[Fp] = cf, Ud[Gp] = function (t, e, n) {
  9263. return t[n]
  9264. }, Ud[Wp] = cf, Ud[Bp] = function (t, e, n) {
  9265. var i = Mo(t);
  9266. return i instanceof Array ? i[e] : i
  9267. }, Ud[Hp] = cf, Ud);
  9268. function df(t) {
  9269. var e = pf[t];
  9270. return e
  9271. }
  9272. function ff(t, e) {
  9273. return t === Fp ? t + "_" + e : t
  9274. }
  9275. function gf(t, e, n) {
  9276. if (t) {
  9277. var i = t.getRawDataItem(e);
  9278. if (null != i) {
  9279. var r = t.getStore(),
  9280. o = r.getSource().sourceFormat;
  9281. if (null != n) {
  9282. var a = t.getDimensionIndex(n),
  9283. s = r.getDimensionProperty(a);
  9284. return df(o)(i, a, s)
  9285. }
  9286. var l = i;
  9287. return o === Bp && (l = Mo(i)), l
  9288. }
  9289. }
  9290. }
  9291. var yf = /\{@(.+?)\}/g,
  9292. vf = function () {
  9293. function t() {}
  9294. return t.prototype.getDataParams = function (t, e) {
  9295. var n = this.getData(e),
  9296. i = this.getRawValue(t, e),
  9297. r = n.getRawIndex(t),
  9298. o = n.getName(t),
  9299. a = n.getRawDataItem(t),
  9300. s = n.getItemVisual(t, "style"),
  9301. l = s && s[n.getItemVisual(t, "drawType") || "fill"],
  9302. u = s && s.stroke,
  9303. h = this.mainType,
  9304. c = "series" === h,
  9305. p = n.userOutput && n.userOutput.get();
  9306. return {
  9307. componentType: h,
  9308. componentSubType: this.subType,
  9309. componentIndex: this.componentIndex,
  9310. seriesType: c ? this.subType : null,
  9311. seriesIndex: this.seriesIndex,
  9312. seriesId: c ? this.id : null,
  9313. seriesName: c ? this.name : null,
  9314. name: o,
  9315. dataIndex: r,
  9316. data: a,
  9317. dataType: e,
  9318. value: i,
  9319. color: l,
  9320. borderColor: u,
  9321. dimensionNames: p ? p.fullDimensions : null,
  9322. encode: p ? p.encode : null,
  9323. $vars: ["seriesName", "name", "value"]
  9324. }
  9325. }, t.prototype.getFormattedLabel = function (t, e, n, i, r, o) {
  9326. e = e || "normal";
  9327. var a = this.getData(n),
  9328. s = this.getDataParams(t, n);
  9329. (o && (s.value = o.interpolatedValue), null != i && Y(s.value) && (s.value = s.value[i]), r) || (r = a.getItemModel(t).get("normal" === e ? ["label", "formatter"] : [e, "label", "formatter"]));
  9330. return X(r) ? (s.status = e, s.dimensionIndex = i, r(s)) : U(r) ? mp(r, s).replace(yf, (function (e, n) {
  9331. var i = n.length,
  9332. r = n;
  9333. "[" === r.charAt(0) && "]" === r.charAt(i - 1) && (r = +r.slice(1, i - 1));
  9334. var s = gf(a, t, r);
  9335. if (o && Y(o.interpolatedValue)) {
  9336. var l = a.getDimensionIndex(r);
  9337. l >= 0 && (s = o.interpolatedValue[l])
  9338. }
  9339. return null != s ? s + "" : ""
  9340. })) : void 0
  9341. }, t.prototype.getRawValue = function (t, e) {
  9342. return gf(this.getData(e), t)
  9343. }, t.prototype.formatTooltip = function (t, e, n) {}, t
  9344. }();
  9345. function mf(t) {
  9346. var e, n;
  9347. return q(t) ? t.type && (n = t) : e = t, {
  9348. text: e,
  9349. frag: n
  9350. }
  9351. }
  9352. function xf(t) {
  9353. return new _f(t)
  9354. }
  9355. var _f = function () {
  9356. function t(t) {
  9357. t = t || {}, this._reset = t.reset, this._plan = t.plan, this._count = t.count, this._onDirty = t.onDirty, this._dirty = !0
  9358. }
  9359. return t.prototype.perform = function (t) {
  9360. var e, n = this._upstream,
  9361. i = t && t.skip;
  9362. if (this._dirty && n) {
  9363. var r = this.context;
  9364. r.data = r.outputData = n.context.outputData
  9365. }
  9366. this.__pipeline && (this.__pipeline.currentTask = this), this._plan && !i && (e = this._plan(this.context));
  9367. var o, a = h(this._modBy),
  9368. s = this._modDataCount || 0,
  9369. l = h(t && t.modBy),
  9370. u = t && t.modDataCount || 0;
  9371. function h(t) {
  9372. return !(t >= 1) && (t = 1), t
  9373. }
  9374. a === l && s === u || (e = "reset"), (this._dirty || "reset" === e) && (this._dirty = !1, o = this._doReset(i)), this._modBy = l, this._modDataCount = u;
  9375. var c = t && t.step;
  9376. if (this._dueEnd = n ? n._outputDueEnd : this._count ? this._count(this.context) : 1 / 0, this._progress) {
  9377. var p = this._dueIndex,
  9378. d = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd);
  9379. if (!i && (o || p < d)) {
  9380. var f = this._progress;
  9381. if (Y(f))
  9382. for (var g = 0; g < f.length; g++) this._doProgress(f[g], p, d, l, u);
  9383. else this._doProgress(f, p, d, l, u)
  9384. }
  9385. this._dueIndex = d;
  9386. var y = null != this._settedOutputEnd ? this._settedOutputEnd : d;
  9387. 0, this._outputDueEnd = y
  9388. } else this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd;
  9389. return this.unfinished()
  9390. }, t.prototype.dirty = function () {
  9391. this._dirty = !0, this._onDirty && this._onDirty(this.context)
  9392. }, t.prototype._doProgress = function (t, e, n, i, r) {
  9393. bf.reset(e, n, i, r), this._callingProgress = t, this._callingProgress({
  9394. start: e,
  9395. end: n,
  9396. count: n - e,
  9397. next: bf.next
  9398. }, this.context)
  9399. }, t.prototype._doReset = function (t) {
  9400. var e, n;
  9401. this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null, !t && this._reset && ((e = this._reset(this.context)) && e.progress && (n = e.forceFirstProgress, e = e.progress), Y(e) && !e.length && (e = null)), this._progress = e, this._modBy = this._modDataCount = null;
  9402. var i = this._downstream;
  9403. return i && i.dirty(), n
  9404. }, t.prototype.unfinished = function () {
  9405. return this._progress && this._dueIndex < this._dueEnd
  9406. }, t.prototype.pipe = function (t) {
  9407. (this._downstream !== t || this._dirty) && (this._downstream = t, t._upstream = this, t.dirty())
  9408. }, t.prototype.dispose = function () {
  9409. this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0)
  9410. }, t.prototype.getUpstream = function () {
  9411. return this._upstream
  9412. }, t.prototype.getDownstream = function () {
  9413. return this._downstream
  9414. }, t.prototype.setOutputEnd = function (t) {
  9415. this._outputDueEnd = this._settedOutputEnd = t
  9416. }, t
  9417. }(),
  9418. bf = function () {
  9419. var t, e, n, i, r, o = {
  9420. reset: function (l, u, h, c) {
  9421. e = l, t = u, n = h, i = c, r = Math.ceil(i / n), o.next = n > 1 && i > 0 ? s : a
  9422. }
  9423. };
  9424. return o;
  9425. function a() {
  9426. return e < t ? e++ : null
  9427. }
  9428. function s() {
  9429. var o = e % r * n + Math.ceil(e / r),
  9430. a = e >= t ? null : o < i ? o : e;
  9431. return e++, a
  9432. }
  9433. }();
  9434. function wf(t, e) {
  9435. var n = e && e.type;
  9436. return "ordinal" === n ? t : ("time" !== n || j(t) || null == t || "-" === t || (t = +ro(t)), null == t || "" === t ? NaN : +t)
  9437. }
  9438. var Sf = yt({
  9439. number: function (t) {
  9440. return parseFloat(t)
  9441. },
  9442. time: function (t) {
  9443. return +ro(t)
  9444. },
  9445. trim: function (t) {
  9446. return U(t) ? ut(t) : t
  9447. }
  9448. });
  9449. function Mf(t) {
  9450. return Sf.get(t)
  9451. }
  9452. var If = {
  9453. lt: function (t, e) {
  9454. return t < e
  9455. },
  9456. lte: function (t, e) {
  9457. return t <= e
  9458. },
  9459. gt: function (t, e) {
  9460. return t > e
  9461. },
  9462. gte: function (t, e) {
  9463. return t >= e
  9464. }
  9465. },
  9466. Tf = function () {
  9467. function t(t, e) {
  9468. if (!j(e)) {
  9469. var n = "";
  9470. 0, vo(n)
  9471. }
  9472. this._opFn = If[t], this._rvalFloat = ho(e)
  9473. }
  9474. return t.prototype.evaluate = function (t) {
  9475. return j(t) ? this._opFn(t, this._rvalFloat) : this._opFn(ho(t), this._rvalFloat)
  9476. }, t
  9477. }(),
  9478. Cf = function () {
  9479. function t(t, e) {
  9480. var n = "desc" === t;
  9481. this._resultLT = n ? 1 : -1, null == e && (e = n ? "min" : "max"), this._incomparable = "min" === e ? -1 / 0 : 1 / 0
  9482. }
  9483. return t.prototype.evaluate = function (t, e) {
  9484. var n = j(t) ? t : ho(t),
  9485. i = j(e) ? e : ho(e),
  9486. r = isNaN(n),
  9487. o = isNaN(i);
  9488. if (r && (n = this._incomparable), o && (i = this._incomparable), r && o) {
  9489. var a = U(t),
  9490. s = U(e);
  9491. a && (n = s ? t : 0), s && (i = a ? e : 0)
  9492. }
  9493. return n < i ? this._resultLT : n > i ? -this._resultLT : 0
  9494. }, t
  9495. }(),
  9496. Df = function () {
  9497. function t(t, e) {
  9498. this._rval = e, this._isEQ = t, this._rvalTypeof = typeof e, this._rvalFloat = ho(e)
  9499. }
  9500. return t.prototype.evaluate = function (t) {
  9501. var e = t === this._rval;
  9502. if (!e) {
  9503. var n = typeof t;
  9504. n === this._rvalTypeof || "number" !== n && "number" !== this._rvalTypeof || (e = ho(t) === this._rvalFloat)
  9505. }
  9506. return this._isEQ ? e : !e
  9507. }, t
  9508. }();
  9509. function Af(t, e) {
  9510. return "eq" === t || "ne" === t ? new Df("eq" === t, e) : _t(If, t) ? new Tf(t, e) : null
  9511. }
  9512. var kf = function () {
  9513. function t() {}
  9514. return t.prototype.getRawData = function () {
  9515. throw new Error("not supported")
  9516. }, t.prototype.getRawDataItem = function (t) {
  9517. throw new Error("not supported")
  9518. }, t.prototype.cloneRawData = function () {}, t.prototype.getDimensionInfo = function (t) {}, t.prototype.cloneAllDimensionInfo = function () {}, t.prototype.count = function () {}, t.prototype.retrieveValue = function (t, e) {}, t.prototype.retrieveValueFromItem = function (t, e) {}, t.prototype.convertValue = function (t, e) {
  9519. return wf(t, e)
  9520. }, t
  9521. }();
  9522. function Lf(t) {
  9523. var e = t.sourceFormat;
  9524. if (!zf(e)) {
  9525. var n = "";
  9526. 0, vo(n)
  9527. }
  9528. return t.data
  9529. }
  9530. function Pf(t) {
  9531. var e = t.sourceFormat,
  9532. n = t.data;
  9533. if (!zf(e)) {
  9534. var i = "";
  9535. 0, vo(i)
  9536. }
  9537. if (e === Fp) {
  9538. for (var r = [], o = 0, a = n.length; o < a; o++) r.push(n[o].slice());
  9539. return r
  9540. }
  9541. if (e === Gp) {
  9542. for (r = [], o = 0, a = n.length; o < a; o++) r.push(A({}, n[o]));
  9543. return r
  9544. }
  9545. }
  9546. function Of(t, e, n) {
  9547. if (null != n) return j(n) || !isNaN(n) && !_t(e, n) ? t[n] : _t(e, n) ? e[n] : void 0
  9548. }
  9549. function Rf(t) {
  9550. return T(t)
  9551. }
  9552. var Nf = yt();
  9553. function Ef(t, e, n, i) {
  9554. var r = "";
  9555. e.length || vo(r), q(t) || vo(r);
  9556. var o = t.type,
  9557. a = Nf.get(o);
  9558. a || vo(r);
  9559. var s = z(e, (function (t) {
  9560. return function (t, e) {
  9561. var n = new kf,
  9562. i = t.data,
  9563. r = n.sourceFormat = t.sourceFormat,
  9564. o = t.startIndex,
  9565. a = "";
  9566. t.seriesLayoutBy !== Xp && vo(a);
  9567. var s = [],
  9568. l = {},
  9569. u = t.dimensionsDefine;
  9570. if (u) E(u, (function (t, e) {
  9571. var n = t.name,
  9572. i = {
  9573. index: e,
  9574. name: n,
  9575. displayName: t.displayName
  9576. };
  9577. if (s.push(i), null != n) {
  9578. var r = "";
  9579. _t(l, n) && vo(r), l[n] = i
  9580. }
  9581. }));
  9582. else
  9583. for (var h = 0; h < t.dimensionsDetectedCount; h++) s.push({
  9584. index: h
  9585. });
  9586. var c = sf(r, Xp);
  9587. e.__isBuiltIn && (n.getRawDataItem = function (t) {
  9588. return c(i, o, s, t)
  9589. }, n.getRawData = W(Lf, null, t)), n.cloneRawData = W(Pf, null, t);
  9590. var p = hf(r, Xp);
  9591. n.count = W(p, null, i, o, s);
  9592. var d = df(r);
  9593. n.retrieveValue = function (t, e) {
  9594. var n = c(i, o, s, t);
  9595. return f(n, e)
  9596. };
  9597. var f = n.retrieveValueFromItem = function (t, e) {
  9598. if (null != t) {
  9599. var n = s[e];
  9600. return n ? d(t, e, n.name) : void 0
  9601. }
  9602. };
  9603. return n.getDimensionInfo = W(Of, null, s, l), n.cloneAllDimensionInfo = W(Rf, null, s), n
  9604. }(t, a)
  9605. })),
  9606. l = bo(a.transform({
  9607. upstream: s[0],
  9608. upstreamList: s,
  9609. config: T(t.config)
  9610. }));
  9611. return z(l, (function (t, n) {
  9612. var i, r = "";
  9613. q(t) || vo(r), t.data || vo(r), zf(Qd(t.data)) || vo(r);
  9614. var o = e[0];
  9615. if (o && 0 === n && !t.dimensions) {
  9616. var a = o.startIndex;
  9617. a && (t.data = o.data.slice(0, a).concat(t.data)), i = {
  9618. seriesLayoutBy: Xp,
  9619. sourceHeader: a,
  9620. dimensions: o.metaRawOption.dimensions
  9621. }
  9622. } else i = {
  9623. seriesLayoutBy: Xp,
  9624. sourceHeader: 0,
  9625. dimensions: t.dimensions
  9626. };
  9627. return $d(t.data, i, null)
  9628. }))
  9629. }
  9630. function zf(t) {
  9631. return t === Fp || t === Gp
  9632. }
  9633. var Vf, Bf = "undefined",
  9634. Ff = typeof Uint32Array === Bf ? Array : Uint32Array,
  9635. Gf = typeof Uint16Array === Bf ? Array : Uint16Array,
  9636. Wf = typeof Int32Array === Bf ? Array : Int32Array,
  9637. Hf = typeof Float64Array === Bf ? Array : Float64Array,
  9638. Yf = {
  9639. float: Hf,
  9640. int: Wf,
  9641. ordinal: Array,
  9642. number: Array,
  9643. time: Hf
  9644. };
  9645. function Xf(t) {
  9646. return t > 65535 ? Ff : Gf
  9647. }
  9648. function Uf(t, e, n, i, r) {
  9649. var o = Yf[n || "float"];
  9650. if (r) {
  9651. var a = t[e],
  9652. s = a && a.length;
  9653. if (s !== i) {
  9654. for (var l = new o(i), u = 0; u < s; u++) l[u] = a[u];
  9655. t[e] = l
  9656. }
  9657. } else t[e] = new o(i)
  9658. }
  9659. var Zf = function () {
  9660. function t() {
  9661. this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = yt()
  9662. }
  9663. return t.prototype.initData = function (t, e, n) {
  9664. this._provider = t, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity;
  9665. var i = t.getSource(),
  9666. r = this.defaultDimValueGetter = Vf[i.sourceFormat];
  9667. this._dimValueGetter = n || r, this._rawExtent = [];
  9668. nf(i);
  9669. this._dimensions = z(e, (function (t) {
  9670. return {
  9671. type: t.type,
  9672. property: t.property
  9673. }
  9674. })), this._initDataFromProvider(0, t.count())
  9675. }, t.prototype.getProvider = function () {
  9676. return this._provider
  9677. }, t.prototype.getSource = function () {
  9678. return this._provider.getSource()
  9679. }, t.prototype.ensureCalculationDimension = function (t, e) {
  9680. var n = this._calcDimNameToIdx,
  9681. i = this._dimensions,
  9682. r = n.get(t);
  9683. if (null != r) {
  9684. if (i[r].type === e) return r
  9685. } else r = i.length;
  9686. return i[r] = {
  9687. type: e
  9688. }, n.set(t, r), this._chunks[r] = new Yf[e || "float"](this._rawCount), this._rawExtent[r] = [1 / 0, -1 / 0], r
  9689. }, t.prototype.collectOrdinalMeta = function (t, e) {
  9690. var n = this._chunks[t],
  9691. i = this._dimensions[t],
  9692. r = this._rawExtent,
  9693. o = i.ordinalOffset || 0,
  9694. a = n.length;
  9695. 0 === o && (r[t] = [1 / 0, -1 / 0]);
  9696. for (var s = r[t], l = o; l < a; l++) {
  9697. var u = n[l] = e.parseAndCollect(n[l]);
  9698. isNaN(u) || (s[0] = Math.min(u, s[0]), s[1] = Math.max(u, s[1]))
  9699. }
  9700. i.ordinalMeta = e, i.ordinalOffset = a, i.type = "ordinal"
  9701. }, t.prototype.getOrdinalMeta = function (t) {
  9702. return this._dimensions[t].ordinalMeta
  9703. }, t.prototype.getDimensionProperty = function (t) {
  9704. var e = this._dimensions[t];
  9705. return e && e.property
  9706. }, t.prototype.appendData = function (t) {
  9707. var e = this._provider,
  9708. n = this.count();
  9709. e.appendData(t);
  9710. var i = e.count();
  9711. return e.persistent || (i += n), n < i && this._initDataFromProvider(n, i, !0), [n, i]
  9712. }, t.prototype.appendValues = function (t, e) {
  9713. for (var n = this._chunks, i = this._dimensions, r = i.length, o = this._rawExtent, a = this.count(), s = a + Math.max(t.length, e || 0), l = 0; l < r; l++) {
  9714. Uf(n, l, (d = i[l]).type, s, !0)
  9715. }
  9716. for (var u = [], h = a; h < s; h++)
  9717. for (var c = h - a, p = 0; p < r; p++) {
  9718. var d = i[p],
  9719. f = Vf.arrayRows.call(this, t[c] || u, d.property, c, p);
  9720. n[p][h] = f;
  9721. var g = o[p];
  9722. f < g[0] && (g[0] = f), f > g[1] && (g[1] = f)
  9723. }
  9724. return this._rawCount = this._count = s, {
  9725. start: a,
  9726. end: s
  9727. }
  9728. }, t.prototype._initDataFromProvider = function (t, e, n) {
  9729. for (var i = this._provider, r = this._chunks, o = this._dimensions, a = o.length, s = this._rawExtent, l = z(o, (function (t) {
  9730. return t.property
  9731. })), u = 0; u < a; u++) {
  9732. var h = o[u];
  9733. s[u] || (s[u] = [1 / 0, -1 / 0]), Uf(r, u, h.type, e, n)
  9734. }
  9735. if (i.fillStorage) i.fillStorage(t, e, r, s);
  9736. else
  9737. for (var c = [], p = t; p < e; p++) {
  9738. c = i.getItem(p, c);
  9739. for (var d = 0; d < a; d++) {
  9740. var f = r[d],
  9741. g = this._dimValueGetter(c, l[d], p, d);
  9742. f[p] = g;
  9743. var y = s[d];
  9744. g < y[0] && (y[0] = g), g > y[1] && (y[1] = g)
  9745. }
  9746. }!i.persistent && i.clean && i.clean(), this._rawCount = this._count = e, this._extent = []
  9747. }, t.prototype.count = function () {
  9748. return this._count
  9749. }, t.prototype.get = function (t, e) {
  9750. if (!(e >= 0 && e < this._count)) return NaN;
  9751. var n = this._chunks[t];
  9752. return n ? n[this.getRawIndex(e)] : NaN
  9753. }, t.prototype.getValues = function (t, e) {
  9754. var n = [],
  9755. i = [];
  9756. if (null == e) {
  9757. e = t, t = [];
  9758. for (var r = 0; r < this._dimensions.length; r++) i.push(r)
  9759. } else i = t;
  9760. r = 0;
  9761. for (var o = i.length; r < o; r++) n.push(this.get(i[r], e));
  9762. return n
  9763. }, t.prototype.getByRawIndex = function (t, e) {
  9764. if (!(e >= 0 && e < this._rawCount)) return NaN;
  9765. var n = this._chunks[t];
  9766. return n ? n[e] : NaN
  9767. }, t.prototype.getSum = function (t) {
  9768. var e = 0;
  9769. if (this._chunks[t])
  9770. for (var n = 0, i = this.count(); n < i; n++) {
  9771. var r = this.get(t, n);
  9772. isNaN(r) || (e += r)
  9773. }
  9774. return e
  9775. }, t.prototype.getMedian = function (t) {
  9776. var e = [];
  9777. this.each([t], (function (t) {
  9778. isNaN(t) || e.push(t)
  9779. }));
  9780. var n = e.sort((function (t, e) {
  9781. return t - e
  9782. })),
  9783. i = this.count();
  9784. return 0 === i ? 0 : i % 2 == 1 ? n[(i - 1) / 2] : (n[i / 2] + n[i / 2 - 1]) / 2
  9785. }, t.prototype.indexOfRawIndex = function (t) {
  9786. if (t >= this._rawCount || t < 0) return -1;
  9787. if (!this._indices) return t;
  9788. var e = this._indices,
  9789. n = e[t];
  9790. if (null != n && n < this._count && n === t) return t;
  9791. for (var i = 0, r = this._count - 1; i <= r;) {
  9792. var o = (i + r) / 2 | 0;
  9793. if (e[o] < t) i = o + 1;
  9794. else {
  9795. if (!(e[o] > t)) return o;
  9796. r = o - 1
  9797. }
  9798. }
  9799. return -1
  9800. }, t.prototype.indicesOfNearest = function (t, e, n) {
  9801. var i = this._chunks[t],
  9802. r = [];
  9803. if (!i) return r;
  9804. null == n && (n = 1 / 0);
  9805. for (var o = 1 / 0, a = -1, s = 0, l = 0, u = this.count(); l < u; l++) {
  9806. var h = e - i[this.getRawIndex(l)],
  9807. c = Math.abs(h);
  9808. c <= n && ((c < o || c === o && h >= 0 && a < 0) && (o = c, a = h, s = 0), h === a && (r[s++] = l))
  9809. }
  9810. return r.length = s, r
  9811. }, t.prototype.getIndices = function () {
  9812. var t, e = this._indices;
  9813. if (e) {
  9814. var n = e.constructor,
  9815. i = this._count;
  9816. if (n === Array) {
  9817. t = new n(i);
  9818. for (var r = 0; r < i; r++) t[r] = e[r]
  9819. } else t = new n(e.buffer, 0, i)
  9820. } else {
  9821. t = new(n = Xf(this._rawCount))(this.count());
  9822. for (r = 0; r < t.length; r++) t[r] = r
  9823. }
  9824. return t
  9825. }, t.prototype.filter = function (t, e) {
  9826. if (!this._count) return this;
  9827. for (var n = this.clone(), i = n.count(), r = new(Xf(n._rawCount))(i), o = [], a = t.length, s = 0, l = t[0], u = n._chunks, h = 0; h < i; h++) {
  9828. var c = void 0,
  9829. p = n.getRawIndex(h);
  9830. if (0 === a) c = e(h);
  9831. else if (1 === a) {
  9832. c = e(u[l][p], h)
  9833. } else {
  9834. for (var d = 0; d < a; d++) o[d] = u[t[d]][p];
  9835. o[d] = h, c = e.apply(null, o)
  9836. }
  9837. c && (r[s++] = p)
  9838. }
  9839. return s < i && (n._indices = r), n._count = s, n._extent = [], n._updateGetRawIdx(), n
  9840. }, t.prototype.selectRange = function (t) {
  9841. var e = this.clone(),
  9842. n = e._count;
  9843. if (!n) return this;
  9844. var i = G(t),
  9845. r = i.length;
  9846. if (!r) return this;
  9847. var o = e.count(),
  9848. a = new(Xf(e._rawCount))(o),
  9849. s = 0,
  9850. l = i[0],
  9851. u = t[l][0],
  9852. h = t[l][1],
  9853. c = e._chunks,
  9854. p = !1;
  9855. if (!e._indices) {
  9856. var d = 0;
  9857. if (1 === r) {
  9858. for (var f = c[i[0]], g = 0; g < n; g++) {
  9859. ((x = f[g]) >= u && x <= h || isNaN(x)) && (a[s++] = d), d++
  9860. }
  9861. p = !0
  9862. } else if (2 === r) {
  9863. f = c[i[0]];
  9864. var y = c[i[1]],
  9865. v = t[i[1]][0],
  9866. m = t[i[1]][1];
  9867. for (g = 0; g < n; g++) {
  9868. var x = f[g],
  9869. _ = y[g];
  9870. (x >= u && x <= h || isNaN(x)) && (_ >= v && _ <= m || isNaN(_)) && (a[s++] = d), d++
  9871. }
  9872. p = !0
  9873. }
  9874. }
  9875. if (!p)
  9876. if (1 === r)
  9877. for (g = 0; g < o; g++) {
  9878. var b = e.getRawIndex(g);
  9879. ((x = c[i[0]][b]) >= u && x <= h || isNaN(x)) && (a[s++] = b)
  9880. } else
  9881. for (g = 0; g < o; g++) {
  9882. for (var w = !0, S = (b = e.getRawIndex(g), 0); S < r; S++) {
  9883. var M = i[S];
  9884. ((x = c[M][b]) < t[M][0] || x > t[M][1]) && (w = !1)
  9885. }
  9886. w && (a[s++] = e.getRawIndex(g))
  9887. }
  9888. return s < o && (e._indices = a), e._count = s, e._extent = [], e._updateGetRawIdx(), e
  9889. }, t.prototype.map = function (t, e) {
  9890. var n = this.clone(t);
  9891. return this._updateDims(n, t, e), n
  9892. }, t.prototype.modify = function (t, e) {
  9893. this._updateDims(this, t, e)
  9894. }, t.prototype._updateDims = function (t, e, n) {
  9895. for (var i = t._chunks, r = [], o = e.length, a = t.count(), s = [], l = t._rawExtent, u = 0; u < e.length; u++) l[e[u]] = [1 / 0, -1 / 0];
  9896. for (var h = 0; h < a; h++) {
  9897. for (var c = t.getRawIndex(h), p = 0; p < o; p++) s[p] = i[e[p]][c];
  9898. s[o] = h;
  9899. var d = n && n.apply(null, s);
  9900. if (null != d) {
  9901. "object" != typeof d && (r[0] = d, d = r);
  9902. for (u = 0; u < d.length; u++) {
  9903. var f = e[u],
  9904. g = d[u],
  9905. y = l[f],
  9906. v = i[f];
  9907. v && (v[c] = g), g < y[0] && (y[0] = g), g > y[1] && (y[1] = g)
  9908. }
  9909. }
  9910. }
  9911. }, t.prototype.lttbDownSample = function (t, e) {
  9912. var n, i, r, o = this.clone([t], !0),
  9913. a = o._chunks[t],
  9914. s = this.count(),
  9915. l = 0,
  9916. u = Math.floor(1 / e),
  9917. h = this.getRawIndex(0),
  9918. c = new(Xf(this._rawCount))(Math.min(2 * (Math.ceil(s / u) + 2), s));
  9919. c[l++] = h;
  9920. for (var p = 1; p < s - 1; p += u) {
  9921. for (var d = Math.min(p + u, s - 1), f = Math.min(p + 2 * u, s), g = (f + d) / 2, y = 0, v = d; v < f; v++) {
  9922. var m = a[I = this.getRawIndex(v)];
  9923. isNaN(m) || (y += m)
  9924. }
  9925. y /= f - d;
  9926. var x = p,
  9927. _ = Math.min(p + u, s),
  9928. b = p - 1,
  9929. w = a[h];
  9930. n = -1, r = x;
  9931. var S = -1,
  9932. M = 0;
  9933. for (v = x; v < _; v++) {
  9934. var I;
  9935. m = a[I = this.getRawIndex(v)];
  9936. isNaN(m) ? (M++, S < 0 && (S = I)) : (i = Math.abs((b - g) * (m - w) - (b - v) * (y - w))) > n && (n = i, r = I)
  9937. }
  9938. M > 0 && M < _ - x && (c[l++] = Math.min(S, r), r = Math.max(S, r)), c[l++] = r, h = r
  9939. }
  9940. return c[l++] = this.getRawIndex(s - 1), o._count = l, o._indices = c, o.getRawIndex = this._getRawIdx, o
  9941. }, t.prototype.downSample = function (t, e, n, i) {
  9942. for (var r = this.clone([t], !0), o = r._chunks, a = [], s = Math.floor(1 / e), l = o[t], u = this.count(), h = r._rawExtent[t] = [1 / 0, -1 / 0], c = new(Xf(this._rawCount))(Math.ceil(u / s)), p = 0, d = 0; d < u; d += s) {
  9943. s > u - d && (s = u - d, a.length = s);
  9944. for (var f = 0; f < s; f++) {
  9945. var g = this.getRawIndex(d + f);
  9946. a[f] = l[g]
  9947. }
  9948. var y = n(a),
  9949. v = this.getRawIndex(Math.min(d + i(a, y) || 0, u - 1));
  9950. l[v] = y, y < h[0] && (h[0] = y), y > h[1] && (h[1] = y), c[p++] = v
  9951. }
  9952. return r._count = p, r._indices = c, r._updateGetRawIdx(), r
  9953. }, t.prototype.each = function (t, e) {
  9954. if (this._count)
  9955. for (var n = t.length, i = this._chunks, r = 0, o = this.count(); r < o; r++) {
  9956. var a = this.getRawIndex(r);
  9957. switch (n) {
  9958. case 0:
  9959. e(r);
  9960. break;
  9961. case 1:
  9962. e(i[t[0]][a], r);
  9963. break;
  9964. case 2:
  9965. e(i[t[0]][a], i[t[1]][a], r);
  9966. break;
  9967. default:
  9968. for (var s = 0, l = []; s < n; s++) l[s] = i[t[s]][a];
  9969. l[s] = r, e.apply(null, l)
  9970. }
  9971. }
  9972. }, t.prototype.getDataExtent = function (t) {
  9973. var e = this._chunks[t],
  9974. n = [1 / 0, -1 / 0];
  9975. if (!e) return n;
  9976. var i, r = this.count();
  9977. if (!this._indices) return this._rawExtent[t].slice();
  9978. if (i = this._extent[t]) return i.slice();
  9979. for (var o = (i = n)[0], a = i[1], s = 0; s < r; s++) {
  9980. var l = e[this.getRawIndex(s)];
  9981. l < o && (o = l), l > a && (a = l)
  9982. }
  9983. return i = [o, a], this._extent[t] = i, i
  9984. }, t.prototype.getRawDataItem = function (t) {
  9985. var e = this.getRawIndex(t);
  9986. if (this._provider.persistent) return this._provider.getItem(e);
  9987. for (var n = [], i = this._chunks, r = 0; r < i.length; r++) n.push(i[r][e]);
  9988. return n
  9989. }, t.prototype.clone = function (e, n) {
  9990. var i, r, o = new t,
  9991. a = this._chunks,
  9992. s = e && V(e, (function (t, e) {
  9993. return t[e] = !0, t
  9994. }), {});
  9995. if (s)
  9996. for (var l = 0; l < a.length; l++) o._chunks[l] = s[l] ? (i = a[l], r = void 0, (r = i.constructor) === Array ? i.slice() : new r(i)) : a[l];
  9997. else o._chunks = a;
  9998. return this._copyCommonProps(o), n || (o._indices = this._cloneIndices()), o._updateGetRawIdx(), o
  9999. }, t.prototype._copyCommonProps = function (t) {
  10000. t._count = this._count, t._rawCount = this._rawCount, t._provider = this._provider, t._dimensions = this._dimensions, t._extent = T(this._extent), t._rawExtent = T(this._rawExtent)
  10001. }, t.prototype._cloneIndices = function () {
  10002. if (this._indices) {
  10003. var t = this._indices.constructor,
  10004. e = void 0;
  10005. if (t === Array) {
  10006. var n = this._indices.length;
  10007. e = new t(n);
  10008. for (var i = 0; i < n; i++) e[i] = this._indices[i]
  10009. } else e = new t(this._indices);
  10010. return e
  10011. }
  10012. return null
  10013. }, t.prototype._getRawIdxIdentity = function (t) {
  10014. return t
  10015. }, t.prototype._getRawIdx = function (t) {
  10016. return t < this._count && t >= 0 ? this._indices[t] : -1
  10017. }, t.prototype._updateGetRawIdx = function () {
  10018. this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity
  10019. }, t.internalField = function () {
  10020. function t(t, e, n, i) {
  10021. return wf(t[i], this._dimensions[i])
  10022. }
  10023. Vf = {
  10024. arrayRows: t,
  10025. objectRows: function (t, e, n, i) {
  10026. return wf(t[e], this._dimensions[i])
  10027. },
  10028. keyedColumns: t,
  10029. original: function (t, e, n, i) {
  10030. var r = t && (null == t.value ? t : t.value);
  10031. return wf(r instanceof Array ? r[i] : r, this._dimensions[i])
  10032. },
  10033. typedArray: function (t, e, n, i) {
  10034. return t[i]
  10035. }
  10036. }
  10037. }(), t
  10038. }(),
  10039. jf = function () {
  10040. function t(t) {
  10041. this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = t
  10042. }
  10043. return t.prototype.dirty = function () {
  10044. this._setLocalSource([], []), this._storeList = [], this._dirty = !0
  10045. }, t.prototype._setLocalSource = function (t, e) {
  10046. this._sourceList = t, this._upstreamSignList = e, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0)
  10047. }, t.prototype._getVersionSign = function () {
  10048. return this._sourceHost.uid + "_" + this._versionSignBase
  10049. }, t.prototype.prepareSource = function () {
  10050. this._isDirty() && (this._createSource(), this._dirty = !1)
  10051. }, t.prototype._createSource = function () {
  10052. this._setLocalSource([], []);
  10053. var t, e, n = this._sourceHost,
  10054. i = this._getUpstreamSourceManagers(),
  10055. r = !!i.length;
  10056. if (Kf(n)) {
  10057. var o = n,
  10058. a = void 0,
  10059. s = void 0,
  10060. l = void 0;
  10061. if (r) {
  10062. var u = i[0];
  10063. u.prepareSource(), a = (l = u.getSource()).data, s = l.sourceFormat, e = [u._getVersionSign()]
  10064. } else s = $(a = o.get("data", !0)) ? Hp : Bp, e = [];
  10065. var h = this._getSourceMetaRawOption() || {},
  10066. c = l && l.metaRawOption || {},
  10067. p = rt(h.seriesLayoutBy, c.seriesLayoutBy) || null,
  10068. d = rt(h.sourceHeader, c.sourceHeader),
  10069. f = rt(h.dimensions, c.dimensions);
  10070. t = p !== c.seriesLayoutBy || !!d != !!c.sourceHeader || f ? [$d(a, {
  10071. seriesLayoutBy: p,
  10072. sourceHeader: d,
  10073. dimensions: f
  10074. }, s)] : []
  10075. } else {
  10076. var g = n;
  10077. if (r) {
  10078. var y = this._applyTransform(i);
  10079. t = y.sourceList, e = y.upstreamSignList
  10080. } else {
  10081. t = [$d(g.get("source", !0), this._getSourceMetaRawOption(), null)], e = []
  10082. }
  10083. }
  10084. this._setLocalSource(t, e)
  10085. }, t.prototype._applyTransform = function (t) {
  10086. var e, n = this._sourceHost,
  10087. i = n.get("transform", !0),
  10088. r = n.get("fromTransformResult", !0);
  10089. if (null != r) {
  10090. var o = "";
  10091. 1 !== t.length && $f(o)
  10092. }
  10093. var a, s = [],
  10094. l = [];
  10095. return E(t, (function (t) {
  10096. t.prepareSource();
  10097. var e = t.getSource(r || 0),
  10098. n = "";
  10099. null == r || e || $f(n), s.push(e), l.push(t._getVersionSign())
  10100. })), i ? e = function (t, e, n) {
  10101. var i = bo(t),
  10102. r = i.length,
  10103. o = "";
  10104. r || vo(o);
  10105. for (var a = 0, s = r; a < s; a++) e = Ef(i[a], e), a !== s - 1 && (e.length = Math.max(e.length, 1));
  10106. return e
  10107. }(i, s, n.componentIndex) : null != r && (e = [(a = s[0], new qd({
  10108. data: a.data,
  10109. sourceFormat: a.sourceFormat,
  10110. seriesLayoutBy: a.seriesLayoutBy,
  10111. dimensionsDefine: T(a.dimensionsDefine),
  10112. startIndex: a.startIndex,
  10113. dimensionsDetectedCount: a.dimensionsDetectedCount
  10114. }))]), {
  10115. sourceList: e,
  10116. upstreamSignList: l
  10117. }
  10118. }, t.prototype._isDirty = function () {
  10119. if (this._dirty) return !0;
  10120. for (var t = this._getUpstreamSourceManagers(), e = 0; e < t.length; e++) {
  10121. var n = t[e];
  10122. if (n._isDirty() || this._upstreamSignList[e] !== n._getVersionSign()) return !0
  10123. }
  10124. }, t.prototype.getSource = function (t) {
  10125. t = t || 0;
  10126. var e = this._sourceList[t];
  10127. if (!e) {
  10128. var n = this._getUpstreamSourceManagers();
  10129. return n[0] && n[0].getSource(t)
  10130. }
  10131. return e
  10132. }, t.prototype.getSharedDataStore = function (t) {
  10133. var e = t.makeStoreSchema();
  10134. return this._innerGetDataStore(e.dimensions, t.source, e.hash)
  10135. }, t.prototype._innerGetDataStore = function (t, e, n) {
  10136. var i = this._storeList,
  10137. r = i[0];
  10138. r || (r = i[0] = {});
  10139. var o = r[n];
  10140. if (!o) {
  10141. var a = this._getUpstreamSourceManagers()[0];
  10142. Kf(this._sourceHost) && a ? o = a._innerGetDataStore(t, e, n) : (o = new Zf).initData(new rf(e, t.length), t), r[n] = o
  10143. }
  10144. return o
  10145. }, t.prototype._getUpstreamSourceManagers = function () {
  10146. var t = this._sourceHost;
  10147. if (Kf(t)) {
  10148. var e = Qp(t);
  10149. return e ? [e.getSourceManager()] : []
  10150. }
  10151. return z(function (t) {
  10152. return t.get("transform", !0) || t.get("fromTransformResult", !0) ? Bo(t.ecModel, "dataset", {
  10153. index: t.get("fromDatasetIndex", !0),
  10154. id: t.get("fromDatasetId", !0)
  10155. }, zo).models : []
  10156. }(t), (function (t) {
  10157. return t.getSourceManager()
  10158. }))
  10159. }, t.prototype._getSourceMetaRawOption = function () {
  10160. var t, e, n, i = this._sourceHost;
  10161. if (Kf(i)) t = i.get("seriesLayoutBy", !0), e = i.get("sourceHeader", !0), n = i.get("dimensions", !0);
  10162. else if (!this._getUpstreamSourceManagers().length) {
  10163. var r = i;
  10164. t = r.get("seriesLayoutBy", !0), e = r.get("sourceHeader", !0), n = r.get("dimensions", !0)
  10165. }
  10166. return {
  10167. seriesLayoutBy: t,
  10168. sourceHeader: e,
  10169. dimensions: n
  10170. }
  10171. }, t
  10172. }();
  10173. function qf(t) {
  10174. t.option.transform && ct(t.option.transform)
  10175. }
  10176. function Kf(t) {
  10177. return "series" === t.mainType
  10178. }
  10179. function $f(t) {
  10180. throw new Error(t)
  10181. }
  10182. var Jf = "line-height:1";
  10183. function Qf(t, e) {
  10184. var n = t.color || "#6e7079",
  10185. i = t.fontSize || 12,
  10186. r = t.fontWeight || "400",
  10187. o = t.color || "#464646",
  10188. a = t.fontSize || 14,
  10189. s = t.fontWeight || "900";
  10190. return "html" === e ? {
  10191. nameStyle: "font-size:" + re(i + "") + "px;color:" + re(n) + ";font-weight:" + re(r + ""),
  10192. valueStyle: "font-size:" + re(a + "") + "px;color:" + re(o) + ";font-weight:" + re(s + "")
  10193. } : {
  10194. nameStyle: {
  10195. fontSize: i,
  10196. fill: n,
  10197. fontWeight: r
  10198. },
  10199. valueStyle: {
  10200. fontSize: a,
  10201. fill: o,
  10202. fontWeight: s
  10203. }
  10204. }
  10205. }
  10206. var tg = [0, 10, 20, 30],
  10207. eg = ["", "\n", "\n\n", "\n\n\n"];
  10208. function ng(t, e) {
  10209. return e.type = t, e
  10210. }
  10211. function ig(t) {
  10212. return "section" === t.type
  10213. }
  10214. function rg(t) {
  10215. return ig(t) ? ag : sg
  10216. }
  10217. function og(t) {
  10218. if (ig(t)) {
  10219. var e = 0,
  10220. n = t.blocks.length,
  10221. i = n > 1 || n > 0 && !t.noHeader;
  10222. return E(t.blocks, (function (t) {
  10223. var n = og(t);
  10224. n >= e && (e = n + +(i && (!n || ig(t) && !t.noHeader)))
  10225. })), e
  10226. }
  10227. return 0
  10228. }
  10229. function ag(t, e, n, i) {
  10230. var r, o = e.noHeader,
  10231. a = (r = og(e), {
  10232. html: tg[r],
  10233. richText: eg[r]
  10234. }),
  10235. s = [],
  10236. l = e.blocks || [];
  10237. lt(!l || Y(l)), l = l || [];
  10238. var u = t.orderMode;
  10239. if (e.sortBlocks && u) {
  10240. l = l.slice();
  10241. var h = {
  10242. valueAsc: "asc",
  10243. valueDesc: "desc"
  10244. };
  10245. if (_t(h, u)) {
  10246. var c = new Cf(h[u], null);
  10247. l.sort((function (t, e) {
  10248. return c.evaluate(t.sortParam, e.sortParam)
  10249. }))
  10250. } else "seriesDesc" === u && l.reverse()
  10251. }
  10252. E(l, (function (n, r) {
  10253. var o = e.valueFormatter,
  10254. l = rg(n)(o ? A(A({}, t), {
  10255. valueFormatter: o
  10256. }) : t, n, r > 0 ? a.html : 0, i);
  10257. null != l && s.push(l)
  10258. }));
  10259. var p = "richText" === t.renderMode ? s.join(a.richText) : ug(s.join(""), o ? n : a.html);
  10260. if (o) return p;
  10261. var d = gp(e.header, "ordinal", t.useUTC),
  10262. f = Qf(i, t.renderMode).nameStyle;
  10263. return "richText" === t.renderMode ? hg(t, d, f) + a.richText + p : ug('<div style="' + f + ";" + Jf + ';">' + re(d) + "</div>" + p, n)
  10264. }
  10265. function sg(t, e, n, i) {
  10266. var r = t.renderMode,
  10267. o = e.noName,
  10268. a = e.noValue,
  10269. s = !e.markerType,
  10270. l = e.name,
  10271. u = t.useUTC,
  10272. h = e.valueFormatter || t.valueFormatter || function (t) {
  10273. return z(t = Y(t) ? t : [t], (function (t, e) {
  10274. return gp(t, Y(d) ? d[e] : d, u)
  10275. }))
  10276. };
  10277. if (!o || !a) {
  10278. var c = s ? "" : t.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", r),
  10279. p = o ? "" : gp(l, "ordinal", u),
  10280. d = e.valueType,
  10281. f = a ? [] : h(e.value),
  10282. g = !s || !o,
  10283. y = !s && o,
  10284. v = Qf(i, r),
  10285. m = v.nameStyle,
  10286. x = v.valueStyle;
  10287. return "richText" === r ? (s ? "" : c) + (o ? "" : hg(t, p, m)) + (a ? "" : function (t, e, n, i, r) {
  10288. var o = [r],
  10289. a = i ? 10 : 20;
  10290. return n && o.push({
  10291. padding: [0, 0, 0, a],
  10292. align: "right"
  10293. }), t.markupStyleCreator.wrapRichTextStyle(Y(e) ? e.join(" ") : e, o)
  10294. }(t, f, g, y, x)) : ug((s ? "" : c) + (o ? "" : function (t, e, n) {
  10295. return '<span style="' + n + ";" + (e ? "margin-left:2px" : "") + '">' + re(t) + "</span>"
  10296. }(p, !s, m)) + (a ? "" : function (t, e, n, i) {
  10297. var r = n ? "10px" : "20px",
  10298. o = e ? "float:right;margin-left:" + r : "";
  10299. return t = Y(t) ? t : [t], '<span style="' + o + ";" + i + '">' + z(t, (function (t) {
  10300. return re(t)
  10301. })).join("&nbsp;&nbsp;") + "</span>"
  10302. }(f, g, y, x)), n)
  10303. }
  10304. }
  10305. function lg(t, e, n, i, r, o) {
  10306. if (t) return rg(t)({
  10307. useUTC: r,
  10308. renderMode: n,
  10309. orderMode: i,
  10310. markupStyleCreator: e,
  10311. valueFormatter: t.valueFormatter
  10312. }, t, 0, o)
  10313. }
  10314. function ug(t, e) {
  10315. return '<div style="' + ("margin: " + e + "px 0 0") + ";" + Jf + ';">' + t + '<div style="clear:both"></div></div>'
  10316. }
  10317. function hg(t, e, n) {
  10318. return t.markupStyleCreator.wrapRichTextStyle(e, n)
  10319. }
  10320. function cg(t, e) {
  10321. return _p(t.getData().getItemVisual(e, "style")[t.visualDrawType])
  10322. }
  10323. function pg(t, e) {
  10324. var n = t.get("padding");
  10325. return null != n ? n : "richText" === e ? [8, 10] : 10
  10326. }
  10327. var dg = function () {
  10328. function t() {
  10329. this.richTextStyles = {}, this._nextStyleNameId = po()
  10330. }
  10331. return t.prototype._generateStyleName = function () {
  10332. return "__EC_aUTo_" + this._nextStyleNameId++
  10333. }, t.prototype.makeTooltipMarker = function (t, e, n) {
  10334. var i = "richText" === n ? this._generateStyleName() : null,
  10335. r = xp({
  10336. color: e,
  10337. type: t,
  10338. renderMode: n,
  10339. markerId: i
  10340. });
  10341. return U(r) ? r : (this.richTextStyles[i] = r.style, r.content)
  10342. }, t.prototype.wrapRichTextStyle = function (t, e) {
  10343. var n = {};
  10344. Y(e) ? E(e, (function (t) {
  10345. return A(n, t)
  10346. })) : A(n, e);
  10347. var i = this._generateStyleName();
  10348. return this.richTextStyles[i] = n, "{" + i + "|" + t + "}"
  10349. }, t
  10350. }();
  10351. function fg(t) {
  10352. var e, n, i, r, o = t.series,
  10353. a = t.dataIndex,
  10354. s = t.multipleSeries,
  10355. l = o.getData(),
  10356. u = l.mapDimensionsAll("defaultedTooltip"),
  10357. h = u.length,
  10358. c = o.getRawValue(a),
  10359. p = Y(c),
  10360. d = cg(o, a);
  10361. if (h > 1 || p && !h) {
  10362. var f = function (t, e, n, i, r) {
  10363. var o = e.getData(),
  10364. a = V(t, (function (t, e, n) {
  10365. var i = o.getDimensionInfo(n);
  10366. return t || i && !1 !== i.tooltip && null != i.displayName
  10367. }), !1),
  10368. s = [],
  10369. l = [],
  10370. u = [];
  10371. function h(t, e) {
  10372. var n = o.getDimensionInfo(e);
  10373. n && !1 !== n.otherDims.tooltip && (a ? u.push(ng("nameValue", {
  10374. markerType: "subItem",
  10375. markerColor: r,
  10376. name: n.displayName,
  10377. value: t,
  10378. valueType: n.type
  10379. })) : (s.push(t), l.push(n.type)))
  10380. }
  10381. return i.length ? E(i, (function (t) {
  10382. h(gf(o, n, t), t)
  10383. })) : E(t, h), {
  10384. inlineValues: s,
  10385. inlineValueTypes: l,
  10386. blocks: u
  10387. }
  10388. }(c, o, a, u, d);
  10389. e = f.inlineValues, n = f.inlineValueTypes, i = f.blocks, r = f.inlineValues[0]
  10390. } else if (h) {
  10391. var g = l.getDimensionInfo(u[0]);
  10392. r = e = gf(l, a, u[0]), n = g.type
  10393. } else r = e = p ? c[0] : c;
  10394. var y = ko(o),
  10395. v = y && o.name || "",
  10396. m = l.getName(a),
  10397. x = s ? v : m;
  10398. return ng("section", {
  10399. header: v,
  10400. noHeader: s || !y,
  10401. sortParam: r,
  10402. blocks: [ng("nameValue", {
  10403. markerType: "item",
  10404. markerColor: d,
  10405. name: x,
  10406. noName: !ut(x),
  10407. value: e,
  10408. valueType: n
  10409. })].concat(i || [])
  10410. })
  10411. }
  10412. var gg = Oo();
  10413. function yg(t, e) {
  10414. return t.getName(e) || t.getId(e)
  10415. }
  10416. var vg = "__universalTransitionEnabled",
  10417. mg = function (t) {
  10418. function e() {
  10419. var e = null !== t && t.apply(this, arguments) || this;
  10420. return e._selectedDataIndicesMap = {}, e
  10421. }
  10422. return n(e, t), e.prototype.init = function (t, e, n) {
  10423. this.seriesIndex = this.componentIndex, this.dataTask = xf({
  10424. count: _g,
  10425. reset: bg
  10426. }), this.dataTask.context = {
  10427. model: this
  10428. }, this.mergeDefaultAndTheme(t, n), (gg(this).sourceManager = new jf(this)).prepareSource();
  10429. var i = this.getInitialData(t, n);
  10430. Sg(i, this), this.dataTask.context.data = i, gg(this).dataBeforeProcessed = i, xg(this), this._initSelectedMapFromData(i)
  10431. }, e.prototype.mergeDefaultAndTheme = function (t, e) {
  10432. var n = Ap(this),
  10433. i = n ? Lp(t) : {},
  10434. r = this.subType;
  10435. Rp.hasClass(r) && (r += "Series"), C(t, e.getTheme().get(this.subType)), C(t, this.getDefaultOption()), wo(t, "label", ["show"]), this.fillDataTextStyle(t.data), n && kp(t, i, n)
  10436. }, e.prototype.mergeOption = function (t, e) {
  10437. t = C(this.option, t, !0), this.fillDataTextStyle(t.data);
  10438. var n = Ap(this);
  10439. n && kp(this.option, t, n);
  10440. var i = gg(this).sourceManager;
  10441. i.dirty(), i.prepareSource();
  10442. var r = this.getInitialData(t, e);
  10443. Sg(r, this), this.dataTask.dirty(), this.dataTask.context.data = r, gg(this).dataBeforeProcessed = r, xg(this), this._initSelectedMapFromData(r)
  10444. }, e.prototype.fillDataTextStyle = function (t) {
  10445. if (t && !$(t))
  10446. for (var e = ["show"], n = 0; n < t.length; n++) t[n] && t[n].label && wo(t[n], "label", e)
  10447. }, e.prototype.getInitialData = function (t, e) {}, e.prototype.appendData = function (t) {
  10448. this.getRawData().appendData(t.data)
  10449. }, e.prototype.getData = function (t) {
  10450. var e = Ig(this);
  10451. if (e) {
  10452. var n = e.context.data;
  10453. return null == t ? n : n.getLinkedData(t)
  10454. }
  10455. return gg(this).data
  10456. }, e.prototype.getAllData = function () {
  10457. var t = this.getData();
  10458. return t && t.getLinkedDataAll ? t.getLinkedDataAll() : [{
  10459. data: t
  10460. }]
  10461. }, e.prototype.setData = function (t) {
  10462. var e = Ig(this);
  10463. if (e) {
  10464. var n = e.context;
  10465. n.outputData = t, e !== this.dataTask && (n.data = t)
  10466. }
  10467. gg(this).data = t
  10468. }, e.prototype.getEncode = function () {
  10469. var t = this.get("encode", !0);
  10470. if (t) return yt(t)
  10471. }, e.prototype.getSourceManager = function () {
  10472. return gg(this).sourceManager
  10473. }, e.prototype.getSource = function () {
  10474. return this.getSourceManager().getSource()
  10475. }, e.prototype.getRawData = function () {
  10476. return gg(this).dataBeforeProcessed
  10477. }, e.prototype.getColorBy = function () {
  10478. return this.get("colorBy") || "series"
  10479. }, e.prototype.isColorBySeries = function () {
  10480. return "series" === this.getColorBy()
  10481. }, e.prototype.getBaseAxis = function () {
  10482. var t = this.coordinateSystem;
  10483. return t && t.getBaseAxis && t.getBaseAxis()
  10484. }, e.prototype.formatTooltip = function (t, e, n) {
  10485. return fg({
  10486. series: this,
  10487. dataIndex: t,
  10488. multipleSeries: e
  10489. })
  10490. }, e.prototype.isAnimationEnabled = function () {
  10491. var t = this.ecModel;
  10492. if (r.node && (!t || !t.ssr)) return !1;
  10493. var e = this.getShallow("animation");
  10494. return e && this.getData().count() > this.getShallow("animationThreshold") && (e = !1), !!e
  10495. }, e.prototype.restoreData = function () {
  10496. this.dataTask.dirty()
  10497. }, e.prototype.getColorFromPalette = function (t, e, n) {
  10498. var i = this.ecModel,
  10499. r = ld.prototype.getColorFromPalette.call(this, t, e, n);
  10500. return r || (r = i.getColorFromPalette(t, e, n)), r
  10501. }, e.prototype.coordDimToDataDim = function (t) {
  10502. return this.getRawData().mapDimensionsAll(t)
  10503. }, e.prototype.getProgressive = function () {
  10504. return this.get("progressive")
  10505. }, e.prototype.getProgressiveThreshold = function () {
  10506. return this.get("progressiveThreshold")
  10507. }, e.prototype.select = function (t, e) {
  10508. this._innerSelect(this.getData(e), t)
  10509. }, e.prototype.unselect = function (t, e) {
  10510. var n = this.option.selectedMap;
  10511. if (n) {
  10512. var i = this.option.selectedMode,
  10513. r = this.getData(e);
  10514. if ("series" === i || "all" === n) return this.option.selectedMap = {}, void(this._selectedDataIndicesMap = {});
  10515. for (var o = 0; o < t.length; o++) {
  10516. var a = yg(r, t[o]);
  10517. n[a] = !1, this._selectedDataIndicesMap[a] = -1
  10518. }
  10519. }
  10520. }, e.prototype.toggleSelect = function (t, e) {
  10521. for (var n = [], i = 0; i < t.length; i++) n[0] = t[i], this.isSelected(t[i], e) ? this.unselect(n, e) : this.select(n, e)
  10522. }, e.prototype.getSelectedDataIndices = function () {
  10523. if ("all" === this.option.selectedMap) return [].slice.call(this.getData().getIndices());
  10524. for (var t = this._selectedDataIndicesMap, e = G(t), n = [], i = 0; i < e.length; i++) {
  10525. var r = t[e[i]];
  10526. r >= 0 && n.push(r)
  10527. }
  10528. return n
  10529. }, e.prototype.isSelected = function (t, e) {
  10530. var n = this.option.selectedMap;
  10531. if (!n) return !1;
  10532. var i = this.getData(e);
  10533. return ("all" === n || n[yg(i, t)]) && !i.getItemModel(t).get(["select", "disabled"])
  10534. }, e.prototype.isUniversalTransitionEnabled = function () {
  10535. if (this[vg]) return !0;
  10536. var t = this.option.universalTransition;
  10537. return !!t && (!0 === t || t && t.enabled)
  10538. }, e.prototype._innerSelect = function (t, e) {
  10539. var n, i, r = this.option,
  10540. o = r.selectedMode,
  10541. a = e.length;
  10542. if (o && a)
  10543. if ("series" === o) r.selectedMap = "all";
  10544. else if ("multiple" === o) {
  10545. q(r.selectedMap) || (r.selectedMap = {});
  10546. for (var s = r.selectedMap, l = 0; l < a; l++) {
  10547. var u = e[l];
  10548. s[c = yg(t, u)] = !0, this._selectedDataIndicesMap[c] = t.getRawIndex(u)
  10549. }
  10550. } else if ("single" === o || !0 === o) {
  10551. var h = e[a - 1],
  10552. c = yg(t, h);
  10553. r.selectedMap = ((n = {})[c] = !0, n), this._selectedDataIndicesMap = ((i = {})[c] = t.getRawIndex(h), i)
  10554. }
  10555. }, e.prototype._initSelectedMapFromData = function (t) {
  10556. if (!this.option.selectedMap) {
  10557. var e = [];
  10558. t.hasItemOption && t.each((function (n) {
  10559. var i = t.getRawDataItem(n);
  10560. i && i.selected && e.push(n)
  10561. })), e.length > 0 && this._innerSelect(t, e)
  10562. }
  10563. }, e.registerClass = function (t) {
  10564. return Rp.registerClass(t)
  10565. }, e.protoInitialize = function () {
  10566. var t = e.prototype;
  10567. t.type = "series.__base__", t.seriesIndex = 0, t.ignoreStyleOnData = !1, t.hasSymbolVisual = !1, t.defaultSymbol = "circle", t.visualStyleAccessPath = "itemStyle", t.visualDrawType = "fill"
  10568. }(), e
  10569. }(Rp);
  10570. function xg(t) {
  10571. var e = t.name;
  10572. ko(t) || (t.name = function (t) {
  10573. var e = t.getRawData(),
  10574. n = e.mapDimensionsAll("seriesName"),
  10575. i = [];
  10576. return E(n, (function (t) {
  10577. var n = e.getDimensionInfo(t);
  10578. n.displayName && i.push(n.displayName)
  10579. })), i.join(" ")
  10580. }(t) || e)
  10581. }
  10582. function _g(t) {
  10583. return t.model.getRawData().count()
  10584. }
  10585. function bg(t) {
  10586. var e = t.model;
  10587. return e.setData(e.getRawData().cloneShallow()), wg
  10588. }
  10589. function wg(t, e) {
  10590. e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData)
  10591. }
  10592. function Sg(t, e) {
  10593. E(vt(t.CHANGABLE_METHODS, t.DOWNSAMPLE_METHODS), (function (n) {
  10594. t.wrapMethod(n, H(Mg, e))
  10595. }))
  10596. }
  10597. function Mg(t, e) {
  10598. var n = Ig(t);
  10599. return n && n.setOutputEnd((e || this).count()), e
  10600. }
  10601. function Ig(t) {
  10602. var e = (t.ecModel || {}).scheduler,
  10603. n = e && e.getPipeline(t.uid);
  10604. if (n) {
  10605. var i = n.currentTask;
  10606. if (i) {
  10607. var r = i.agentStubMap;
  10608. r && (i = r.get(t.uid))
  10609. }
  10610. return i
  10611. }
  10612. }
  10613. R(mg, vf), R(mg, ld), Zo(mg, Rp);
  10614. var Tg = function () {
  10615. function t() {
  10616. this.group = new zr, this.uid = Tc("viewComponent")
  10617. }
  10618. return t.prototype.init = function (t, e) {}, t.prototype.render = function (t, e, n, i) {}, t.prototype.dispose = function (t, e) {}, t.prototype.updateView = function (t, e, n, i) {}, t.prototype.updateLayout = function (t, e, n, i) {}, t.prototype.updateVisual = function (t, e, n, i) {}, t.prototype.toggleBlurSeries = function (t, e, n) {}, t.prototype.eachRendered = function (t) {
  10619. var e = this.group;
  10620. e && e.traverse(t)
  10621. }, t
  10622. }();
  10623. function Cg() {
  10624. var t = Oo();
  10625. return function (e) {
  10626. var n = t(e),
  10627. i = e.pipelineContext,
  10628. r = !!n.large,
  10629. o = !!n.progressiveRender,
  10630. a = n.large = !(!i || !i.large),
  10631. s = n.progressiveRender = !(!i || !i.progressiveRender);
  10632. return !(r === a && o === s) && "reset"
  10633. }
  10634. }
  10635. Uo(Tg), $o(Tg);
  10636. var Dg = Oo(),
  10637. Ag = Cg(),
  10638. kg = function () {
  10639. function t() {
  10640. this.group = new zr, this.uid = Tc("viewChart"), this.renderTask = xf({
  10641. plan: Og,
  10642. reset: Rg
  10643. }), this.renderTask.context = {
  10644. view: this
  10645. }
  10646. }
  10647. return t.prototype.init = function (t, e) {}, t.prototype.render = function (t, e, n, i) {
  10648. 0
  10649. }, t.prototype.highlight = function (t, e, n, i) {
  10650. var r = t.getData(i && i.dataType);
  10651. r && Pg(r, i, "emphasis")
  10652. }, t.prototype.downplay = function (t, e, n, i) {
  10653. var r = t.getData(i && i.dataType);
  10654. r && Pg(r, i, "normal")
  10655. }, t.prototype.remove = function (t, e) {
  10656. this.group.removeAll()
  10657. }, t.prototype.dispose = function (t, e) {}, t.prototype.updateView = function (t, e, n, i) {
  10658. this.render(t, e, n, i)
  10659. }, t.prototype.updateLayout = function (t, e, n, i) {
  10660. this.render(t, e, n, i)
  10661. }, t.prototype.updateVisual = function (t, e, n, i) {
  10662. this.render(t, e, n, i)
  10663. }, t.prototype.eachRendered = function (t) {
  10664. qh(this.group, t)
  10665. }, t.markUpdateMethod = function (t, e) {
  10666. Dg(t).updateMethod = e
  10667. }, t.protoInitialize = void(t.prototype.type = "chart"), t
  10668. }();
  10669. function Lg(t, e, n) {
  10670. t && Kl(t) && ("emphasis" === e ? kl : Ll)(t, n)
  10671. }
  10672. function Pg(t, e, n) {
  10673. var i = Po(t, e),
  10674. r = e && null != e.highlightKey ? function (t) {
  10675. var e = nl[t];
  10676. return null == e && el <= 32 && (e = nl[t] = el++), e
  10677. }(e.highlightKey) : null;
  10678. null != i ? E(bo(i), (function (e) {
  10679. Lg(t.getItemGraphicEl(e), n, r)
  10680. })) : t.eachItemGraphicEl((function (t) {
  10681. Lg(t, n, r)
  10682. }))
  10683. }
  10684. function Og(t) {
  10685. return Ag(t.model)
  10686. }
  10687. function Rg(t) {
  10688. var e = t.model,
  10689. n = t.ecModel,
  10690. i = t.api,
  10691. r = t.payload,
  10692. o = e.pipelineContext.progressiveRender,
  10693. a = t.view,
  10694. s = r && Dg(r).updateMethod,
  10695. l = o ? "incrementalPrepareRender" : s && a[s] ? s : "render";
  10696. return "render" !== l && a[l](e, n, i, r), Ng[l]
  10697. }
  10698. Uo(kg), $o(kg);
  10699. var Ng = {
  10700. incrementalPrepareRender: {
  10701. progress: function (t, e) {
  10702. e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload)
  10703. }
  10704. },
  10705. render: {
  10706. forceFirstProgress: !0,
  10707. progress: function (t, e) {
  10708. e.view.render(e.model, e.ecModel, e.api, e.payload)
  10709. }
  10710. }
  10711. },
  10712. Eg = "\0__throttleOriginMethod",
  10713. zg = "\0__throttleRate",
  10714. Vg = "\0__throttleType";
  10715. function Bg(t, e, n) {
  10716. var i, r, o, a, s, l = 0,
  10717. u = 0,
  10718. h = null;
  10719. function c() {
  10720. u = (new Date).getTime(), h = null, t.apply(o, a || [])
  10721. }
  10722. e = e || 0;
  10723. var p = function () {
  10724. for (var t = [], p = 0; p < arguments.length; p++) t[p] = arguments[p];
  10725. i = (new Date).getTime(), o = this, a = t;
  10726. var d = s || e,
  10727. f = s || n;
  10728. s = null, r = i - (f ? l : u) - d, clearTimeout(h), f ? h = setTimeout(c, d) : r >= 0 ? c() : h = setTimeout(c, -r), l = i
  10729. };
  10730. return p.clear = function () {
  10731. h && (clearTimeout(h), h = null)
  10732. }, p.debounceNextCall = function (t) {
  10733. s = t
  10734. }, p
  10735. }
  10736. function Fg(t, e, n, i) {
  10737. var r = t[e];
  10738. if (r) {
  10739. var o = r[Eg] || r,
  10740. a = r[Vg];
  10741. if (r[zg] !== n || a !== i) {
  10742. if (null == n || !i) return t[e] = o;
  10743. (r = t[e] = Bg(o, n, "debounce" === i))[Eg] = o, r[Vg] = i, r[zg] = n
  10744. }
  10745. return r
  10746. }
  10747. }
  10748. function Gg(t, e) {
  10749. var n = t[e];
  10750. n && n[Eg] && (n.clear && n.clear(), t[e] = n[Eg])
  10751. }
  10752. var Wg = Oo(),
  10753. Hg = {
  10754. itemStyle: Jo(bc, !0),
  10755. lineStyle: Jo(mc, !0)
  10756. },
  10757. Yg = {
  10758. lineStyle: "stroke",
  10759. itemStyle: "fill"
  10760. };
  10761. function Xg(t, e) {
  10762. var n = t.visualStyleMapper || Hg[e];
  10763. return n || (console.warn("Unknown style type '" + e + "'."), Hg.itemStyle)
  10764. }
  10765. function Ug(t, e) {
  10766. var n = t.visualDrawType || Yg[e];
  10767. return n || (console.warn("Unknown style type '" + e + "'."), "fill")
  10768. }
  10769. var Zg = {
  10770. createOnAllSeries: !0,
  10771. performRawSeries: !0,
  10772. reset: function (t, e) {
  10773. var n = t.getData(),
  10774. i = t.visualStyleAccessPath || "itemStyle",
  10775. r = t.getModel(i),
  10776. o = Xg(t, i)(r),
  10777. a = r.getShallow("decal");
  10778. a && (n.setVisual("decal", a), a.dirty = !0);
  10779. var s = Ug(t, i),
  10780. l = o[s],
  10781. u = X(l) ? l : null,
  10782. h = "auto" === o.fill || "auto" === o.stroke;
  10783. if (!o[s] || u || h) {
  10784. var c = t.getColorFromPalette(t.name, null, e.getSeriesCount());
  10785. o[s] || (o[s] = c, n.setVisual("colorFromPalette", !0)), o.fill = "auto" === o.fill || X(o.fill) ? c : o.fill, o.stroke = "auto" === o.stroke || X(o.stroke) ? c : o.stroke
  10786. }
  10787. if (n.setVisual("style", o), n.setVisual("drawType", s), !e.isSeriesFiltered(t) && u) return n.setVisual("colorFromPalette", !1), {
  10788. dataEach: function (e, n) {
  10789. var i = t.getDataParams(n),
  10790. r = A({}, o);
  10791. r[s] = u(i), e.setItemVisual(n, "style", r)
  10792. }
  10793. }
  10794. }
  10795. },
  10796. jg = new Mc,
  10797. qg = {
  10798. createOnAllSeries: !0,
  10799. performRawSeries: !0,
  10800. reset: function (t, e) {
  10801. if (!t.ignoreStyleOnData && !e.isSeriesFiltered(t)) {
  10802. var n = t.getData(),
  10803. i = t.visualStyleAccessPath || "itemStyle",
  10804. r = Xg(t, i),
  10805. o = n.getVisual("drawType");
  10806. return {
  10807. dataEach: n.hasItemOption ? function (t, e) {
  10808. var n = t.getRawDataItem(e);
  10809. if (n && n[i]) {
  10810. jg.option = n[i];
  10811. var a = r(jg);
  10812. A(t.ensureUniqueItemVisual(e, "style"), a), jg.option.decal && (t.setItemVisual(e, "decal", jg.option.decal), jg.option.decal.dirty = !0), o in a && t.setItemVisual(e, "colorFromPalette", !1)
  10813. }
  10814. } : null
  10815. }
  10816. }
  10817. }
  10818. },
  10819. Kg = {
  10820. performRawSeries: !0,
  10821. overallReset: function (t) {
  10822. var e = yt();
  10823. t.eachSeries((function (t) {
  10824. var n = t.getColorBy();
  10825. if (!t.isColorBySeries()) {
  10826. var i = t.type + "-" + n,
  10827. r = e.get(i);
  10828. r || (r = {}, e.set(i, r)), Wg(t).scope = r
  10829. }
  10830. })), t.eachSeries((function (e) {
  10831. if (!e.isColorBySeries() && !t.isSeriesFiltered(e)) {
  10832. var n = e.getRawData(),
  10833. i = {},
  10834. r = e.getData(),
  10835. o = Wg(e).scope,
  10836. a = e.visualStyleAccessPath || "itemStyle",
  10837. s = Ug(e, a);
  10838. r.each((function (t) {
  10839. var e = r.getRawIndex(t);
  10840. i[e] = t
  10841. })), n.each((function (t) {
  10842. var a = i[t];
  10843. if (r.getItemVisual(a, "colorFromPalette")) {
  10844. var l = r.ensureUniqueItemVisual(a, "style"),
  10845. u = n.getName(t) || t + "",
  10846. h = n.count();
  10847. l[s] = e.getColorFromPalette(u, o, h)
  10848. }
  10849. }))
  10850. }
  10851. }))
  10852. }
  10853. },
  10854. $g = Math.PI;
  10855. var Jg = function () {
  10856. function t(t, e, n, i) {
  10857. this._stageTaskMap = yt(), this.ecInstance = t, this.api = e, n = this._dataProcessorHandlers = n.slice(), i = this._visualHandlers = i.slice(), this._allHandlers = n.concat(i)
  10858. }
  10859. return t.prototype.restoreData = function (t, e) {
  10860. t.restoreData(e), this._stageTaskMap.each((function (t) {
  10861. var e = t.overallTask;
  10862. e && e.dirty()
  10863. }))
  10864. }, t.prototype.getPerformArgs = function (t, e) {
  10865. if (t.__pipeline) {
  10866. var n = this._pipelineMap.get(t.__pipeline.id),
  10867. i = n.context,
  10868. r = !e && n.progressiveEnabled && (!i || i.progressiveRender) && t.__idxInPipeline > n.blockIndex ? n.step : null,
  10869. o = i && i.modDataCount;
  10870. return {
  10871. step: r,
  10872. modBy: null != o ? Math.ceil(o / r) : null,
  10873. modDataCount: o
  10874. }
  10875. }
  10876. }, t.prototype.getPipeline = function (t) {
  10877. return this._pipelineMap.get(t)
  10878. }, t.prototype.updateStreamModes = function (t, e) {
  10879. var n = this._pipelineMap.get(t.uid),
  10880. i = t.getData().count(),
  10881. r = n.progressiveEnabled && e.incrementalPrepareRender && i >= n.threshold,
  10882. o = t.get("large") && i >= t.get("largeThreshold"),
  10883. a = "mod" === t.get("progressiveChunkMode") ? i : null;
  10884. t.pipelineContext = n.context = {
  10885. progressiveRender: r,
  10886. modDataCount: a,
  10887. large: o
  10888. }
  10889. }, t.prototype.restorePipelines = function (t) {
  10890. var e = this,
  10891. n = e._pipelineMap = yt();
  10892. t.eachSeries((function (t) {
  10893. var i = t.getProgressive(),
  10894. r = t.uid;
  10895. n.set(r, {
  10896. id: r,
  10897. head: null,
  10898. tail: null,
  10899. threshold: t.getProgressiveThreshold(),
  10900. progressiveEnabled: i && !(t.preventIncremental && t.preventIncremental()),
  10901. blockIndex: -1,
  10902. step: Math.round(i || 700),
  10903. count: 0
  10904. }), e._pipe(t, t.dataTask)
  10905. }))
  10906. }, t.prototype.prepareStageTasks = function () {
  10907. var t = this._stageTaskMap,
  10908. e = this.api.getModel(),
  10909. n = this.api;
  10910. E(this._allHandlers, (function (i) {
  10911. var r = t.get(i.uid) || t.set(i.uid, {}),
  10912. o = "";
  10913. lt(!(i.reset && i.overallReset), o), i.reset && this._createSeriesStageTask(i, r, e, n), i.overallReset && this._createOverallStageTask(i, r, e, n)
  10914. }), this)
  10915. }, t.prototype.prepareView = function (t, e, n, i) {
  10916. var r = t.renderTask,
  10917. o = r.context;
  10918. o.model = e, o.ecModel = n, o.api = i, r.__block = !t.incrementalPrepareRender, this._pipe(e, r)
  10919. }, t.prototype.performDataProcessorTasks = function (t, e) {
  10920. this._performStageTasks(this._dataProcessorHandlers, t, e, {
  10921. block: !0
  10922. })
  10923. }, t.prototype.performVisualTasks = function (t, e, n) {
  10924. this._performStageTasks(this._visualHandlers, t, e, n)
  10925. }, t.prototype._performStageTasks = function (t, e, n, i) {
  10926. i = i || {};
  10927. var r = !1,
  10928. o = this;
  10929. function a(t, e) {
  10930. return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id))
  10931. }
  10932. E(t, (function (t, s) {
  10933. if (!i.visualType || i.visualType === t.visualType) {
  10934. var l = o._stageTaskMap.get(t.uid),
  10935. u = l.seriesTaskMap,
  10936. h = l.overallTask;
  10937. if (h) {
  10938. var c, p = h.agentStubMap;
  10939. p.each((function (t) {
  10940. a(i, t) && (t.dirty(), c = !0)
  10941. })), c && h.dirty(), o.updatePayload(h, n);
  10942. var d = o.getPerformArgs(h, i.block);
  10943. p.each((function (t) {
  10944. t.perform(d)
  10945. })), h.perform(d) && (r = !0)
  10946. } else u && u.each((function (s, l) {
  10947. a(i, s) && s.dirty();
  10948. var u = o.getPerformArgs(s, i.block);
  10949. u.skip = !t.performRawSeries && e.isSeriesFiltered(s.context.model), o.updatePayload(s, n), s.perform(u) && (r = !0)
  10950. }))
  10951. }
  10952. })), this.unfinished = r || this.unfinished
  10953. }, t.prototype.performSeriesTasks = function (t) {
  10954. var e;
  10955. t.eachSeries((function (t) {
  10956. e = t.dataTask.perform() || e
  10957. })), this.unfinished = e || this.unfinished
  10958. }, t.prototype.plan = function () {
  10959. this._pipelineMap.each((function (t) {
  10960. var e = t.tail;
  10961. do {
  10962. if (e.__block) {
  10963. t.blockIndex = e.__idxInPipeline;
  10964. break
  10965. }
  10966. e = e.getUpstream()
  10967. } while (e)
  10968. }))
  10969. }, t.prototype.updatePayload = function (t, e) {
  10970. "remain" !== e && (t.context.payload = e)
  10971. }, t.prototype._createSeriesStageTask = function (t, e, n, i) {
  10972. var r = this,
  10973. o = e.seriesTaskMap,
  10974. a = e.seriesTaskMap = yt(),
  10975. s = t.seriesType,
  10976. l = t.getTargetSeries;
  10977. function u(e) {
  10978. var s = e.uid,
  10979. l = a.set(s, o && o.get(s) || xf({
  10980. plan: iy,
  10981. reset: ry,
  10982. count: sy
  10983. }));
  10984. l.context = {
  10985. model: e,
  10986. ecModel: n,
  10987. api: i,
  10988. useClearVisual: t.isVisual && !t.isLayout,
  10989. plan: t.plan,
  10990. reset: t.reset,
  10991. scheduler: r
  10992. }, r._pipe(e, l)
  10993. }
  10994. t.createOnAllSeries ? n.eachRawSeries(u) : s ? n.eachRawSeriesByType(s, u) : l && l(n, i).each(u)
  10995. }, t.prototype._createOverallStageTask = function (t, e, n, i) {
  10996. var r = this,
  10997. o = e.overallTask = e.overallTask || xf({
  10998. reset: Qg
  10999. });
  11000. o.context = {
  11001. ecModel: n,
  11002. api: i,
  11003. overallReset: t.overallReset,
  11004. scheduler: r
  11005. };
  11006. var a = o.agentStubMap,
  11007. s = o.agentStubMap = yt(),
  11008. l = t.seriesType,
  11009. u = t.getTargetSeries,
  11010. h = !0,
  11011. c = !1,
  11012. p = "";
  11013. function d(t) {
  11014. var e = t.uid,
  11015. n = s.set(e, a && a.get(e) || (c = !0, xf({
  11016. reset: ty,
  11017. onDirty: ny
  11018. })));
  11019. n.context = {
  11020. model: t,
  11021. overallProgress: h
  11022. }, n.agent = o, n.__block = h, r._pipe(t, n)
  11023. }
  11024. lt(!t.createOnAllSeries, p), l ? n.eachRawSeriesByType(l, d) : u ? u(n, i).each(d) : (h = !1, E(n.getSeries(), d)), c && o.dirty()
  11025. }, t.prototype._pipe = function (t, e) {
  11026. var n = t.uid,
  11027. i = this._pipelineMap.get(n);
  11028. !i.head && (i.head = e), i.tail && i.tail.pipe(e), i.tail = e, e.__idxInPipeline = i.count++, e.__pipeline = i
  11029. }, t.wrapStageHandler = function (t, e) {
  11030. return X(t) && (t = {
  11031. overallReset: t,
  11032. seriesType: ly(t)
  11033. }), t.uid = Tc("stageHandler"), e && (t.visualType = e), t
  11034. }, t
  11035. }();
  11036. function Qg(t) {
  11037. t.overallReset(t.ecModel, t.api, t.payload)
  11038. }
  11039. function ty(t) {
  11040. return t.overallProgress && ey
  11041. }
  11042. function ey() {
  11043. this.agent.dirty(), this.getDownstream().dirty()
  11044. }
  11045. function ny() {
  11046. this.agent && this.agent.dirty()
  11047. }
  11048. function iy(t) {
  11049. return t.plan ? t.plan(t.model, t.ecModel, t.api, t.payload) : null
  11050. }
  11051. function ry(t) {
  11052. t.useClearVisual && t.data.clearAllVisual();
  11053. var e = t.resetDefines = bo(t.reset(t.model, t.ecModel, t.api, t.payload));
  11054. return e.length > 1 ? z(e, (function (t, e) {
  11055. return ay(e)
  11056. })) : oy
  11057. }
  11058. var oy = ay(0);
  11059. function ay(t) {
  11060. return function (e, n) {
  11061. var i = n.data,
  11062. r = n.resetDefines[t];
  11063. if (r && r.dataEach)
  11064. for (var o = e.start; o < e.end; o++) r.dataEach(i, o);
  11065. else r && r.progress && r.progress(e, i)
  11066. }
  11067. }
  11068. function sy(t) {
  11069. return t.data.count()
  11070. }
  11071. function ly(t) {
  11072. uy = null;
  11073. try {
  11074. t(hy, cy)
  11075. } catch (t) {}
  11076. return uy
  11077. }
  11078. var uy, hy = {},
  11079. cy = {};
  11080. function py(t, e) {
  11081. for (var n in e.prototype) t[n] = bt
  11082. }
  11083. py(hy, pd), py(cy, vd), hy.eachSeriesByType = hy.eachRawSeriesByType = function (t) {
  11084. uy = t
  11085. }, hy.eachComponent = function (t) {
  11086. "series" === t.mainType && t.subType && (uy = t.subType)
  11087. };
  11088. var dy = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"],
  11089. fy = {
  11090. color: dy,
  11091. colorLayer: [
  11092. ["#37A2DA", "#ffd85c", "#fd7b5f"],
  11093. ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"],
  11094. ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], dy
  11095. ]
  11096. },
  11097. gy = "#B9B8CE",
  11098. yy = "#100C2A",
  11099. vy = function () {
  11100. return {
  11101. axisLine: {
  11102. lineStyle: {
  11103. color: gy
  11104. }
  11105. },
  11106. splitLine: {
  11107. lineStyle: {
  11108. color: "#484753"
  11109. }
  11110. },
  11111. splitArea: {
  11112. areaStyle: {
  11113. color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
  11114. }
  11115. },
  11116. minorSplitLine: {
  11117. lineStyle: {
  11118. color: "#20203B"
  11119. }
  11120. }
  11121. }
  11122. },
  11123. my = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"],
  11124. xy = {
  11125. darkMode: !0,
  11126. color: my,
  11127. backgroundColor: yy,
  11128. axisPointer: {
  11129. lineStyle: {
  11130. color: "#817f91"
  11131. },
  11132. crossStyle: {
  11133. color: "#817f91"
  11134. },
  11135. label: {
  11136. color: "#fff"
  11137. }
  11138. },
  11139. legend: {
  11140. textStyle: {
  11141. color: gy
  11142. }
  11143. },
  11144. textStyle: {
  11145. color: gy
  11146. },
  11147. title: {
  11148. textStyle: {
  11149. color: "#EEF1FA"
  11150. },
  11151. subtextStyle: {
  11152. color: "#B9B8CE"
  11153. }
  11154. },
  11155. toolbox: {
  11156. iconStyle: {
  11157. borderColor: gy
  11158. }
  11159. },
  11160. dataZoom: {
  11161. borderColor: "#71708A",
  11162. textStyle: {
  11163. color: gy
  11164. },
  11165. brushStyle: {
  11166. color: "rgba(135,163,206,0.3)"
  11167. },
  11168. handleStyle: {
  11169. color: "#353450",
  11170. borderColor: "#C5CBE3"
  11171. },
  11172. moveHandleStyle: {
  11173. color: "#B0B6C3",
  11174. opacity: .3
  11175. },
  11176. fillerColor: "rgba(135,163,206,0.2)",
  11177. emphasis: {
  11178. handleStyle: {
  11179. borderColor: "#91B7F2",
  11180. color: "#4D587D"
  11181. },
  11182. moveHandleStyle: {
  11183. color: "#636D9A",
  11184. opacity: .7
  11185. }
  11186. },
  11187. dataBackground: {
  11188. lineStyle: {
  11189. color: "#71708A",
  11190. width: 1
  11191. },
  11192. areaStyle: {
  11193. color: "#71708A"
  11194. }
  11195. },
  11196. selectedDataBackground: {
  11197. lineStyle: {
  11198. color: "#87A3CE"
  11199. },
  11200. areaStyle: {
  11201. color: "#87A3CE"
  11202. }
  11203. }
  11204. },
  11205. visualMap: {
  11206. textStyle: {
  11207. color: gy
  11208. }
  11209. },
  11210. timeline: {
  11211. lineStyle: {
  11212. color: gy
  11213. },
  11214. label: {
  11215. color: gy
  11216. },
  11217. controlStyle: {
  11218. color: gy,
  11219. borderColor: gy
  11220. }
  11221. },
  11222. calendar: {
  11223. itemStyle: {
  11224. color: yy
  11225. },
  11226. dayLabel: {
  11227. color: gy
  11228. },
  11229. monthLabel: {
  11230. color: gy
  11231. },
  11232. yearLabel: {
  11233. color: gy
  11234. }
  11235. },
  11236. timeAxis: vy(),
  11237. logAxis: vy(),
  11238. valueAxis: vy(),
  11239. categoryAxis: vy(),
  11240. line: {
  11241. symbol: "circle"
  11242. },
  11243. graph: {
  11244. color: my
  11245. },
  11246. gauge: {
  11247. title: {
  11248. color: gy
  11249. },
  11250. axisLine: {
  11251. lineStyle: {
  11252. color: [
  11253. [1, "rgba(207,212,219,0.2)"]
  11254. ]
  11255. }
  11256. },
  11257. axisLabel: {
  11258. color: gy
  11259. },
  11260. detail: {
  11261. color: "#EEF1FA"
  11262. }
  11263. },
  11264. candlestick: {
  11265. itemStyle: {
  11266. color: "#f64e56",
  11267. color0: "#54ea92",
  11268. borderColor: "#f64e56",
  11269. borderColor0: "#54ea92"
  11270. }
  11271. }
  11272. };
  11273. xy.categoryAxis.splitLine.show = !1;
  11274. var _y = function () {
  11275. function t() {}
  11276. return t.prototype.normalizeQuery = function (t) {
  11277. var e = {},
  11278. n = {},
  11279. i = {};
  11280. if (U(t)) {
  11281. var r = Xo(t);
  11282. e.mainType = r.main || null, e.subType = r.sub || null
  11283. } else {
  11284. var o = ["Index", "Name", "Id"],
  11285. a = {
  11286. name: 1,
  11287. dataIndex: 1,
  11288. dataType: 1
  11289. };
  11290. E(t, (function (t, r) {
  11291. for (var s = !1, l = 0; l < o.length; l++) {
  11292. var u = o[l],
  11293. h = r.lastIndexOf(u);
  11294. if (h > 0 && h === r.length - u.length) {
  11295. var c = r.slice(0, h);
  11296. "data" !== c && (e.mainType = c, e[u.toLowerCase()] = t, s = !0)
  11297. }
  11298. }
  11299. a.hasOwnProperty(r) && (n[r] = t, s = !0), s || (i[r] = t)
  11300. }))
  11301. }
  11302. return {
  11303. cptQuery: e,
  11304. dataQuery: n,
  11305. otherQuery: i
  11306. }
  11307. }, t.prototype.filter = function (t, e) {
  11308. var n = this.eventInfo;
  11309. if (!n) return !0;
  11310. var i = n.targetEl,
  11311. r = n.packedEvent,
  11312. o = n.model,
  11313. a = n.view;
  11314. if (!o || !a) return !0;
  11315. var s = e.cptQuery,
  11316. l = e.dataQuery;
  11317. return u(s, o, "mainType") && u(s, o, "subType") && u(s, o, "index", "componentIndex") && u(s, o, "name") && u(s, o, "id") && u(l, r, "name") && u(l, r, "dataIndex") && u(l, r, "dataType") && (!a.filterForExposedEvent || a.filterForExposedEvent(t, e.otherQuery, i, r));
  11318. function u(t, e, n, i) {
  11319. return null == t[n] || e[i || n] === t[n]
  11320. }
  11321. }, t.prototype.afterTrigger = function () {
  11322. this.eventInfo = null
  11323. }, t
  11324. }(),
  11325. by = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"],
  11326. wy = by.concat(["symbolKeepAspect"]),
  11327. Sy = {
  11328. createOnAllSeries: !0,
  11329. performRawSeries: !0,
  11330. reset: function (t, e) {
  11331. var n = t.getData();
  11332. if (t.legendIcon && n.setVisual("legendIcon", t.legendIcon), t.hasSymbolVisual) {
  11333. for (var i = {}, r = {}, o = !1, a = 0; a < by.length; a++) {
  11334. var s = by[a],
  11335. l = t.get(s);
  11336. X(l) ? (o = !0, r[s] = l) : i[s] = l
  11337. }
  11338. if (i.symbol = i.symbol || t.defaultSymbol, n.setVisual(A({
  11339. legendIcon: t.legendIcon || i.symbol,
  11340. symbolKeepAspect: t.get("symbolKeepAspect")
  11341. }, i)), !e.isSeriesFiltered(t)) {
  11342. var u = G(r);
  11343. return {
  11344. dataEach: o ? function (e, n) {
  11345. for (var i = t.getRawValue(n), o = t.getDataParams(n), a = 0; a < u.length; a++) {
  11346. var s = u[a];
  11347. e.setItemVisual(n, s, r[s](i, o))
  11348. }
  11349. } : null
  11350. }
  11351. }
  11352. }
  11353. }
  11354. },
  11355. My = {
  11356. createOnAllSeries: !0,
  11357. performRawSeries: !0,
  11358. reset: function (t, e) {
  11359. if (t.hasSymbolVisual && !e.isSeriesFiltered(t)) return {
  11360. dataEach: t.getData().hasItemOption ? function (t, e) {
  11361. for (var n = t.getItemModel(e), i = 0; i < wy.length; i++) {
  11362. var r = wy[i],
  11363. o = n.getShallow(r, !0);
  11364. null != o && t.setItemVisual(e, r, o)
  11365. }
  11366. } : null
  11367. }
  11368. }
  11369. };
  11370. function Iy(t, e, n) {
  11371. switch (n) {
  11372. case "color":
  11373. return t.getItemVisual(e, "style")[t.getVisual("drawType")];
  11374. case "opacity":
  11375. return t.getItemVisual(e, "style").opacity;
  11376. case "symbol":
  11377. case "symbolSize":
  11378. case "liftZ":
  11379. return t.getItemVisual(e, n)
  11380. }
  11381. }
  11382. function Ty(t, e) {
  11383. switch (e) {
  11384. case "color":
  11385. return t.getVisual("style")[t.getVisual("drawType")];
  11386. case "opacity":
  11387. return t.getVisual("style").opacity;
  11388. case "symbol":
  11389. case "symbolSize":
  11390. case "liftZ":
  11391. return t.getVisual(e)
  11392. }
  11393. }
  11394. function Cy(t, e, n, i) {
  11395. switch (n) {
  11396. case "color":
  11397. t.ensureUniqueItemVisual(e, "style")[t.getVisual("drawType")] = i, t.setItemVisual(e, "colorFromPalette", !1);
  11398. break;
  11399. case "opacity":
  11400. t.ensureUniqueItemVisual(e, "style").opacity = i;
  11401. break;
  11402. case "symbol":
  11403. case "symbolSize":
  11404. case "liftZ":
  11405. t.setItemVisual(e, n, i)
  11406. }
  11407. }
  11408. function Dy(t, e) {
  11409. function n(e, n) {
  11410. var i = [];
  11411. return e.eachComponent({
  11412. mainType: "series",
  11413. subType: t,
  11414. query: n
  11415. }, (function (t) {
  11416. i.push(t.seriesIndex)
  11417. })), i
  11418. }
  11419. E([
  11420. [t + "ToggleSelect", "toggleSelect"],
  11421. [t + "Select", "select"],
  11422. [t + "UnSelect", "unselect"]
  11423. ], (function (t) {
  11424. e(t[0], (function (e, i, r) {
  11425. e = A({}, e), r.dispatchAction(A(e, {
  11426. type: t[1],
  11427. seriesIndex: n(i, e)
  11428. }))
  11429. }))
  11430. }))
  11431. }
  11432. function Ay(t, e, n, i, r) {
  11433. var o = t + e;
  11434. n.isSilent(o) || i.eachComponent({
  11435. mainType: "series",
  11436. subType: "pie"
  11437. }, (function (t) {
  11438. for (var e = t.seriesIndex, i = t.option.selectedMap, a = r.selected, s = 0; s < a.length; s++)
  11439. if (a[s].seriesIndex === e) {
  11440. var l = t.getData(),
  11441. u = Po(l, r.fromActionPayload);
  11442. n.trigger(o, {
  11443. type: o,
  11444. seriesId: t.id,
  11445. name: Y(u) ? l.getName(u[0]) : l.getName(u),
  11446. selected: U(i) ? i : A({}, i)
  11447. })
  11448. }
  11449. }))
  11450. }
  11451. function ky(t, e, n) {
  11452. for (var i; t && (!e(t) || (i = t, !n));) t = t.__hostTarget || t.parent;
  11453. return i
  11454. }
  11455. var Ly = Math.round(9 * Math.random()),
  11456. Py = "function" == typeof Object.defineProperty,
  11457. Oy = function () {
  11458. function t() {
  11459. this._id = "__ec_inner_" + Ly++
  11460. }
  11461. return t.prototype.get = function (t) {
  11462. return this._guard(t)[this._id]
  11463. }, t.prototype.set = function (t, e) {
  11464. var n = this._guard(t);
  11465. return Py ? Object.defineProperty(n, this._id, {
  11466. value: e,
  11467. enumerable: !1,
  11468. configurable: !0
  11469. }) : n[this._id] = e, this
  11470. }, t.prototype.delete = function (t) {
  11471. return !!this.has(t) && (delete this._guard(t)[this._id], !0)
  11472. }, t.prototype.has = function (t) {
  11473. return !!this._guard(t)[this._id]
  11474. }, t.prototype._guard = function (t) {
  11475. if (t !== Object(t)) throw TypeError("Value of WeakMap is not a non-null object.");
  11476. return t
  11477. }, t
  11478. }(),
  11479. Ry = Is.extend({
  11480. type: "triangle",
  11481. shape: {
  11482. cx: 0,
  11483. cy: 0,
  11484. width: 0,
  11485. height: 0
  11486. },
  11487. buildPath: function (t, e) {
  11488. var n = e.cx,
  11489. i = e.cy,
  11490. r = e.width / 2,
  11491. o = e.height / 2;
  11492. t.moveTo(n, i - o), t.lineTo(n + r, i + o), t.lineTo(n - r, i + o), t.closePath()
  11493. }
  11494. }),
  11495. Ny = Is.extend({
  11496. type: "diamond",
  11497. shape: {
  11498. cx: 0,
  11499. cy: 0,
  11500. width: 0,
  11501. height: 0
  11502. },
  11503. buildPath: function (t, e) {
  11504. var n = e.cx,
  11505. i = e.cy,
  11506. r = e.width / 2,
  11507. o = e.height / 2;
  11508. t.moveTo(n, i - o), t.lineTo(n + r, i), t.lineTo(n, i + o), t.lineTo(n - r, i), t.closePath()
  11509. }
  11510. }),
  11511. Ey = Is.extend({
  11512. type: "pin",
  11513. shape: {
  11514. x: 0,
  11515. y: 0,
  11516. width: 0,
  11517. height: 0
  11518. },
  11519. buildPath: function (t, e) {
  11520. var n = e.x,
  11521. i = e.y,
  11522. r = e.width / 5 * 3,
  11523. o = Math.max(r, e.height),
  11524. a = r / 2,
  11525. s = a * a / (o - a),
  11526. l = i - o + a + s,
  11527. u = Math.asin(s / a),
  11528. h = Math.cos(u) * a,
  11529. c = Math.sin(u),
  11530. p = Math.cos(u),
  11531. d = .6 * a,
  11532. f = .7 * a;
  11533. t.moveTo(n - h, l + s), t.arc(n, l, a, Math.PI - u, 2 * Math.PI + u), t.bezierCurveTo(n + h - c * d, l + s + p * d, n, i - f, n, i), t.bezierCurveTo(n, i - f, n - h + c * d, l + s + p * d, n - h, l + s), t.closePath()
  11534. }
  11535. }),
  11536. zy = Is.extend({
  11537. type: "arrow",
  11538. shape: {
  11539. x: 0,
  11540. y: 0,
  11541. width: 0,
  11542. height: 0
  11543. },
  11544. buildPath: function (t, e) {
  11545. var n = e.height,
  11546. i = e.width,
  11547. r = e.x,
  11548. o = e.y,
  11549. a = i / 3 * 2;
  11550. t.moveTo(r, o), t.lineTo(r + a, o + n), t.lineTo(r, o + n / 4 * 3), t.lineTo(r - a, o + n), t.lineTo(r, o), t.closePath()
  11551. }
  11552. }),
  11553. Vy = {
  11554. line: function (t, e, n, i, r) {
  11555. r.x1 = t, r.y1 = e + i / 2, r.x2 = t + n, r.y2 = e + i / 2
  11556. },
  11557. rect: function (t, e, n, i, r) {
  11558. r.x = t, r.y = e, r.width = n, r.height = i
  11559. },
  11560. roundRect: function (t, e, n, i, r) {
  11561. r.x = t, r.y = e, r.width = n, r.height = i, r.r = Math.min(n, i) / 4
  11562. },
  11563. square: function (t, e, n, i, r) {
  11564. var o = Math.min(n, i);
  11565. r.x = t, r.y = e, r.width = o, r.height = o
  11566. },
  11567. circle: function (t, e, n, i, r) {
  11568. r.cx = t + n / 2, r.cy = e + i / 2, r.r = Math.min(n, i) / 2
  11569. },
  11570. diamond: function (t, e, n, i, r) {
  11571. r.cx = t + n / 2, r.cy = e + i / 2, r.width = n, r.height = i
  11572. },
  11573. pin: function (t, e, n, i, r) {
  11574. r.x = t + n / 2, r.y = e + i / 2, r.width = n, r.height = i
  11575. },
  11576. arrow: function (t, e, n, i, r) {
  11577. r.x = t + n / 2, r.y = e + i / 2, r.width = n, r.height = i
  11578. },
  11579. triangle: function (t, e, n, i, r) {
  11580. r.cx = t + n / 2, r.cy = e + i / 2, r.width = n, r.height = i
  11581. }
  11582. },
  11583. By = {};
  11584. E({
  11585. line: Zu,
  11586. rect: zs,
  11587. roundRect: zs,
  11588. square: zs,
  11589. circle: _u,
  11590. diamond: Ny,
  11591. pin: Ey,
  11592. arrow: zy,
  11593. triangle: Ry
  11594. }, (function (t, e) {
  11595. By[e] = new t
  11596. }));
  11597. var Fy = Is.extend({
  11598. type: "symbol",
  11599. shape: {
  11600. symbolType: "",
  11601. x: 0,
  11602. y: 0,
  11603. width: 0,
  11604. height: 0
  11605. },
  11606. calculateTextPosition: function (t, e, n) {
  11607. var i = Tr(t, e, n),
  11608. r = this.shape;
  11609. return r && "pin" === r.symbolType && "inside" === e.position && (i.y = n.y + .4 * n.height), i
  11610. },
  11611. buildPath: function (t, e, n) {
  11612. var i = e.symbolType;
  11613. if ("none" !== i) {
  11614. var r = By[i];
  11615. r || (r = By[i = "rect"]), Vy[i](e.x, e.y, e.width, e.height, r.shape), r.buildPath(t, r.shape, n)
  11616. }
  11617. }
  11618. });
  11619. function Gy(t, e) {
  11620. if ("image" !== this.type) {
  11621. var n = this.style;
  11622. this.__isEmptyBrush ? (n.stroke = t, n.fill = e || "#fff", n.lineWidth = 2) : "line" === this.shape.symbolType ? n.stroke = t : n.fill = t, this.markRedraw()
  11623. }
  11624. }
  11625. function Wy(t, e, n, i, r, o, a) {
  11626. var s, l = 0 === t.indexOf("empty");
  11627. return l && (t = t.substr(5, 1).toLowerCase() + t.substr(6)), (s = 0 === t.indexOf("image://") ? kh(t.slice(8), new ze(e, n, i, r), a ? "center" : "cover") : 0 === t.indexOf("path://") ? Ah(t.slice(7), {}, new ze(e, n, i, r), a ? "center" : "cover") : new Fy({
  11628. shape: {
  11629. symbolType: t,
  11630. x: e,
  11631. y: n,
  11632. width: i,
  11633. height: r
  11634. }
  11635. })).__isEmptyBrush = l, s.setColor = Gy, o && s.setColor(o), s
  11636. }
  11637. function Hy(t) {
  11638. return Y(t) || (t = [+t, +t]), [t[0] || 0, t[1] || 0]
  11639. }
  11640. function Yy(t, e) {
  11641. if (null != t) return Y(t) || (t = [t, t]), [Ur(t[0], e[0]) || 0, Ur(rt(t[1], t[0]), e[1]) || 0]
  11642. }
  11643. function Xy(t) {
  11644. return isFinite(t)
  11645. }
  11646. function Uy(t, e, n) {
  11647. for (var i = "radial" === e.type ? function (t, e, n) {
  11648. var i = n.width,
  11649. r = n.height,
  11650. o = Math.min(i, r),
  11651. a = null == e.x ? .5 : e.x,
  11652. s = null == e.y ? .5 : e.y,
  11653. l = null == e.r ? .5 : e.r;
  11654. return e.global || (a = a * i + n.x, s = s * r + n.y, l *= o), a = Xy(a) ? a : .5, s = Xy(s) ? s : .5, l = l >= 0 && Xy(l) ? l : .5, t.createRadialGradient(a, s, 0, a, s, l)
  11655. }(t, e, n) : function (t, e, n) {
  11656. var i = null == e.x ? 0 : e.x,
  11657. r = null == e.x2 ? 1 : e.x2,
  11658. o = null == e.y ? 0 : e.y,
  11659. a = null == e.y2 ? 0 : e.y2;
  11660. return e.global || (i = i * n.width + n.x, r = r * n.width + n.x, o = o * n.height + n.y, a = a * n.height + n.y), i = Xy(i) ? i : 0, r = Xy(r) ? r : 1, o = Xy(o) ? o : 0, a = Xy(a) ? a : 0, t.createLinearGradient(i, o, r, a)
  11661. }(t, e, n), r = e.colorStops, o = 0; o < r.length; o++) i.addColorStop(r[o].offset, r[o].color);
  11662. return i
  11663. }
  11664. function Zy(t) {
  11665. return parseInt(t, 10)
  11666. }
  11667. function jy(t, e, n) {
  11668. var i = ["width", "height"][e],
  11669. r = ["clientWidth", "clientHeight"][e],
  11670. o = ["paddingLeft", "paddingTop"][e],
  11671. a = ["paddingRight", "paddingBottom"][e];
  11672. if (null != n[i] && "auto" !== n[i]) return parseFloat(n[i]);
  11673. var s = document.defaultView.getComputedStyle(t);
  11674. return (t[r] || Zy(s[i]) || Zy(t.style[i])) - (Zy(s[o]) || 0) - (Zy(s[a]) || 0) | 0
  11675. }
  11676. function qy(t) {
  11677. var e, n, i = t.style,
  11678. r = i.lineDash && i.lineWidth > 0 && (e = i.lineDash, n = i.lineWidth, e && "solid" !== e && n > 0 ? "dashed" === e ? [4 * n, 2 * n] : "dotted" === e ? [n] : j(e) ? [e] : Y(e) ? e : null : null),
  11679. o = i.lineDashOffset;
  11680. if (r) {
  11681. var a = i.strokeNoScale && t.getLineScale ? t.getLineScale() : 1;
  11682. a && 1 !== a && (r = z(r, (function (t) {
  11683. return t / a
  11684. })), o /= a)
  11685. }
  11686. return [r, o]
  11687. }
  11688. var Ky = new os(!0);
  11689. function $y(t) {
  11690. var e = t.stroke;
  11691. return !(null == e || "none" === e || !(t.lineWidth > 0))
  11692. }
  11693. function Jy(t) {
  11694. return "string" == typeof t && "none" !== t
  11695. }
  11696. function Qy(t) {
  11697. var e = t.fill;
  11698. return null != e && "none" !== e
  11699. }
  11700. function tv(t, e) {
  11701. if (null != e.fillOpacity && 1 !== e.fillOpacity) {
  11702. var n = t.globalAlpha;
  11703. t.globalAlpha = e.fillOpacity * e.opacity, t.fill(), t.globalAlpha = n
  11704. } else t.fill()
  11705. }
  11706. function ev(t, e) {
  11707. if (null != e.strokeOpacity && 1 !== e.strokeOpacity) {
  11708. var n = t.globalAlpha;
  11709. t.globalAlpha = e.strokeOpacity * e.opacity, t.stroke(), t.globalAlpha = n
  11710. } else t.stroke()
  11711. }
  11712. function nv(t, e, n) {
  11713. var i = ia(e.image, e.__image, n);
  11714. if (oa(i)) {
  11715. var r = t.createPattern(i, e.repeat || "repeat");
  11716. if ("function" == typeof DOMMatrix && r && r.setTransform) {
  11717. var o = new DOMMatrix;
  11718. o.translateSelf(e.x || 0, e.y || 0), o.rotateSelf(0, 0, (e.rotation || 0) * wt), o.scaleSelf(e.scaleX || 1, e.scaleY || 1), r.setTransform(o)
  11719. }
  11720. return r
  11721. }
  11722. }
  11723. var iv = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"],
  11724. rv = [
  11725. ["lineCap", "butt"],
  11726. ["lineJoin", "miter"],
  11727. ["miterLimit", 10]
  11728. ];
  11729. function ov(t, e, n, i, r) {
  11730. var o = !1;
  11731. if (!i && e === (n = n || {})) return !1;
  11732. if (i || e.opacity !== n.opacity) {
  11733. lv(t, r), o = !0;
  11734. var a = Math.max(Math.min(e.opacity, 1), 0);
  11735. t.globalAlpha = isNaN(a) ? xa.opacity : a
  11736. }(i || e.blend !== n.blend) && (o || (lv(t, r), o = !0), t.globalCompositeOperation = e.blend || xa.blend);
  11737. for (var s = 0; s < iv.length; s++) {
  11738. var l = iv[s];
  11739. (i || e[l] !== n[l]) && (o || (lv(t, r), o = !0), t[l] = t.dpr * (e[l] || 0))
  11740. }
  11741. return (i || e.shadowColor !== n.shadowColor) && (o || (lv(t, r), o = !0), t.shadowColor = e.shadowColor || xa.shadowColor), o
  11742. }
  11743. function av(t, e, n, i, r) {
  11744. var o = uv(e, r.inHover),
  11745. a = i ? null : n && uv(n, r.inHover) || {};
  11746. if (o === a) return !1;
  11747. var s = ov(t, o, a, i, r);
  11748. if ((i || o.fill !== a.fill) && (s || (lv(t, r), s = !0), Jy(o.fill) && (t.fillStyle = o.fill)), (i || o.stroke !== a.stroke) && (s || (lv(t, r), s = !0), Jy(o.stroke) && (t.strokeStyle = o.stroke)), (i || o.opacity !== a.opacity) && (s || (lv(t, r), s = !0), t.globalAlpha = null == o.opacity ? 1 : o.opacity), e.hasStroke()) {
  11749. var l = o.lineWidth / (o.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
  11750. t.lineWidth !== l && (s || (lv(t, r), s = !0), t.lineWidth = l)
  11751. }
  11752. for (var u = 0; u < rv.length; u++) {
  11753. var h = rv[u],
  11754. c = h[0];
  11755. (i || o[c] !== a[c]) && (s || (lv(t, r), s = !0), t[c] = o[c] || h[1])
  11756. }
  11757. return s
  11758. }
  11759. function sv(t, e) {
  11760. var n = e.transform,
  11761. i = t.dpr || 1;
  11762. n ? t.setTransform(i * n[0], i * n[1], i * n[2], i * n[3], i * n[4], i * n[5]) : t.setTransform(i, 0, 0, i, 0, 0)
  11763. }
  11764. function lv(t, e) {
  11765. e.batchFill && t.fill(), e.batchStroke && t.stroke(), e.batchFill = "", e.batchStroke = ""
  11766. }
  11767. function uv(t, e) {
  11768. return e && t.__hoverStyle || t.style
  11769. }
  11770. function hv(t, e) {
  11771. cv(t, e, {
  11772. inHover: !1,
  11773. viewWidth: 0,
  11774. viewHeight: 0
  11775. }, !0)
  11776. }
  11777. function cv(t, e, n, i) {
  11778. var r = e.transform;
  11779. if (!e.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1)) return e.__dirty &= -2, void(e.__isRendered = !1);
  11780. var o = e.__clipPaths,
  11781. s = n.prevElClipPaths,
  11782. l = !1,
  11783. u = !1;
  11784. if (s && ! function (t, e) {
  11785. if (t === e || !t && !e) return !1;
  11786. if (!t || !e || t.length !== e.length) return !0;
  11787. for (var n = 0; n < t.length; n++)
  11788. if (t[n] !== e[n]) return !0;
  11789. return !1
  11790. }(o, s) || (s && s.length && (lv(t, n), t.restore(), u = l = !0, n.prevElClipPaths = null, n.allClipped = !1, n.prevEl = null), o && o.length && (lv(t, n), t.save(), function (t, e, n) {
  11791. for (var i = !1, r = 0; r < t.length; r++) {
  11792. var o = t[r];
  11793. i = i || o.isZeroArea(), sv(e, o), e.beginPath(), o.buildPath(e, o.shape), e.clip()
  11794. }
  11795. n.allClipped = i
  11796. }(o, t, n), l = !0), n.prevElClipPaths = o), n.allClipped) e.__isRendered = !1;
  11797. else {
  11798. e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
  11799. var h = n.prevEl;
  11800. h || (u = l = !0);
  11801. var c, p, d = e instanceof Is && e.autoBatch && function (t) {
  11802. var e = Qy(t),
  11803. n = $y(t);
  11804. return !(t.lineDash || !(+e ^ +n) || e && "string" != typeof t.fill || n && "string" != typeof t.stroke || t.strokePercent < 1 || t.strokeOpacity < 1 || t.fillOpacity < 1)
  11805. }(e.style);
  11806. l || (c = r, p = h.transform, c && p ? c[0] !== p[0] || c[1] !== p[1] || c[2] !== p[2] || c[3] !== p[3] || c[4] !== p[4] || c[5] !== p[5] : c || p) ? (lv(t, n), sv(t, e)) : d || lv(t, n);
  11807. var f = uv(e, n.inHover);
  11808. e instanceof Is ? (1 !== n.lastDrawType && (u = !0, n.lastDrawType = 1), av(t, e, h, u, n), d && (n.batchFill || n.batchStroke) || t.beginPath(), function (t, e, n, i) {
  11809. var r, o = $y(n),
  11810. a = Qy(n),
  11811. s = n.strokePercent,
  11812. l = s < 1,
  11813. u = !e.path;
  11814. e.silent && !l || !u || e.createPathProxy();
  11815. var h = e.path || Ky,
  11816. c = e.__dirty;
  11817. if (!i) {
  11818. var p = n.fill,
  11819. d = n.stroke,
  11820. f = a && !!p.colorStops,
  11821. g = o && !!d.colorStops,
  11822. y = a && !!p.image,
  11823. v = o && !!d.image,
  11824. m = void 0,
  11825. x = void 0,
  11826. _ = void 0,
  11827. b = void 0,
  11828. w = void 0;
  11829. (f || g) && (w = e.getBoundingRect()), f && (m = c ? Uy(t, p, w) : e.__canvasFillGradient, e.__canvasFillGradient = m), g && (x = c ? Uy(t, d, w) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = x), y && (_ = c || !e.__canvasFillPattern ? nv(t, p, e) : e.__canvasFillPattern, e.__canvasFillPattern = _), v && (b = c || !e.__canvasStrokePattern ? nv(t, d, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = _), f ? t.fillStyle = m : y && (_ ? t.fillStyle = _ : a = !1), g ? t.strokeStyle = x : v && (b ? t.strokeStyle = b : o = !1)
  11830. }
  11831. var S, M, I = e.getGlobalScale();
  11832. h.setScale(I[0], I[1], e.segmentIgnoreThreshold), t.setLineDash && n.lineDash && (S = (r = qy(e))[0], M = r[1]);
  11833. var T = !0;
  11834. (u || 4 & c) && (h.setDPR(t.dpr), l ? h.setContext(null) : (h.setContext(t), T = !1), h.reset(), e.buildPath(h, e.shape, i), h.toStatic(), e.pathUpdated()), T && h.rebuildPath(t, l ? s : 1), S && (t.setLineDash(S), t.lineDashOffset = M), i || (n.strokeFirst ? (o && ev(t, n), a && tv(t, n)) : (a && tv(t, n), o && ev(t, n))), S && t.setLineDash([])
  11835. }(t, e, f, d), d && (n.batchFill = f.fill || "", n.batchStroke = f.stroke || "")) : e instanceof Cs ? (3 !== n.lastDrawType && (u = !0, n.lastDrawType = 3), av(t, e, h, u, n), function (t, e, n) {
  11836. var i, r = n.text;
  11837. if (null != r && (r += ""), r) {
  11838. t.font = n.font || a, t.textAlign = n.textAlign, t.textBaseline = n.textBaseline;
  11839. var o = void 0,
  11840. s = void 0;
  11841. t.setLineDash && n.lineDash && (o = (i = qy(e))[0], s = i[1]), o && (t.setLineDash(o), t.lineDashOffset = s), n.strokeFirst ? ($y(n) && t.strokeText(r, n.x, n.y), Qy(n) && t.fillText(r, n.x, n.y)) : (Qy(n) && t.fillText(r, n.x, n.y), $y(n) && t.strokeText(r, n.x, n.y)), o && t.setLineDash([])
  11842. }
  11843. }(t, e, f)) : e instanceof ks ? (2 !== n.lastDrawType && (u = !0, n.lastDrawType = 2), function (t, e, n, i, r) {
  11844. ov(t, uv(e, r.inHover), n && uv(n, r.inHover), i, r)
  11845. }(t, e, h, u, n), function (t, e, n) {
  11846. var i = e.__image = ia(n.image, e.__image, e, e.onload);
  11847. if (i && oa(i)) {
  11848. var r = n.x || 0,
  11849. o = n.y || 0,
  11850. a = e.getWidth(),
  11851. s = e.getHeight(),
  11852. l = i.width / i.height;
  11853. if (null == a && null != s ? a = s * l : null == s && null != a ? s = a / l : null == a && null == s && (a = i.width, s = i.height), n.sWidth && n.sHeight) {
  11854. var u = n.sx || 0,
  11855. h = n.sy || 0;
  11856. t.drawImage(i, u, h, n.sWidth, n.sHeight, r, o, a, s)
  11857. } else if (n.sx && n.sy) {
  11858. var c = a - (u = n.sx),
  11859. p = s - (h = n.sy);
  11860. t.drawImage(i, u, h, c, p, r, o, a, s)
  11861. } else t.drawImage(i, r, o, a, s)
  11862. }
  11863. }(t, e, f)) : e.getTemporalDisplayables && (4 !== n.lastDrawType && (u = !0, n.lastDrawType = 4), function (t, e, n) {
  11864. var i = e.getDisplayables(),
  11865. r = e.getTemporalDisplayables();
  11866. t.save();
  11867. var o, a, s = {
  11868. prevElClipPaths: null,
  11869. prevEl: null,
  11870. allClipped: !1,
  11871. viewWidth: n.viewWidth,
  11872. viewHeight: n.viewHeight,
  11873. inHover: n.inHover
  11874. };
  11875. for (o = e.getCursor(), a = i.length; o < a; o++) {
  11876. (h = i[o]).beforeBrush && h.beforeBrush(), h.innerBeforeBrush(), cv(t, h, s, o === a - 1), h.innerAfterBrush(), h.afterBrush && h.afterBrush(), s.prevEl = h
  11877. }
  11878. for (var l = 0, u = r.length; l < u; l++) {
  11879. var h;
  11880. (h = r[l]).beforeBrush && h.beforeBrush(), h.innerBeforeBrush(), cv(t, h, s, l === u - 1), h.innerAfterBrush(), h.afterBrush && h.afterBrush(), s.prevEl = h
  11881. }
  11882. e.clearTemporalDisplayables(), e.notClear = !0, t.restore()
  11883. }(t, e, n)), d && i && lv(t, n), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), n.prevEl = e, e.__dirty = 0, e.__isRendered = !0
  11884. }
  11885. }
  11886. var pv = new Oy,
  11887. dv = new En(100),
  11888. fv = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
  11889. function gv(t, e) {
  11890. if ("none" === t) return null;
  11891. var n = e.getDevicePixelRatio(),
  11892. i = e.getZr(),
  11893. r = "svg" === i.painter.type;
  11894. t.dirty && pv.delete(t);
  11895. var o = pv.get(t);
  11896. if (o) return o;
  11897. var a = k(t, {
  11898. symbol: "rect",
  11899. symbolSize: 1,
  11900. symbolKeepAspect: !0,
  11901. color: "rgba(0, 0, 0, 0.2)",
  11902. backgroundColor: null,
  11903. dashArrayX: 5,
  11904. dashArrayY: 5,
  11905. rotation: 0,
  11906. maxTileWidth: 512,
  11907. maxTileHeight: 512
  11908. });
  11909. "none" === a.backgroundColor && (a.backgroundColor = null);
  11910. var s = {
  11911. repeat: "repeat"
  11912. };
  11913. return function (t) {
  11914. for (var e, o = [n], s = !0, l = 0; l < fv.length; ++l) {
  11915. var u = a[fv[l]];
  11916. if (null != u && !Y(u) && !U(u) && !j(u) && "boolean" != typeof u) {
  11917. s = !1;
  11918. break
  11919. }
  11920. o.push(u)
  11921. }
  11922. if (s) {
  11923. e = o.join(",") + (r ? "-svg" : "");
  11924. var c = dv.get(e);
  11925. c && (r ? t.svgElement = c : t.image = c)
  11926. }
  11927. var p, d = vv(a.dashArrayX),
  11928. f = function (t) {
  11929. if (!t || "object" == typeof t && 0 === t.length) return [0, 0];
  11930. if (j(t)) {
  11931. var e = Math.ceil(t);
  11932. return [e, e]
  11933. }
  11934. var n = z(t, (function (t) {
  11935. return Math.ceil(t)
  11936. }));
  11937. return t.length % 2 ? n.concat(n) : n
  11938. }(a.dashArrayY),
  11939. g = yv(a.symbol),
  11940. y = (b = d, z(b, (function (t) {
  11941. return mv(t)
  11942. }))),
  11943. v = mv(f),
  11944. m = !r && h.createCanvas(),
  11945. x = r && {
  11946. tag: "g",
  11947. attrs: {},
  11948. key: "dcl",
  11949. children: []
  11950. },
  11951. _ = function () {
  11952. for (var t = 1, e = 0, n = y.length; e < n; ++e) t = go(t, y[e]);
  11953. var i = 1;
  11954. for (e = 0, n = g.length; e < n; ++e) i = go(i, g[e].length);
  11955. t *= i;
  11956. var r = v * y.length * g.length;
  11957. return {
  11958. width: Math.max(1, Math.min(t, a.maxTileWidth)),
  11959. height: Math.max(1, Math.min(r, a.maxTileHeight))
  11960. }
  11961. }();
  11962. var b;
  11963. m && (m.width = _.width * n, m.height = _.height * n, p = m.getContext("2d"));
  11964. (function () {
  11965. p && (p.clearRect(0, 0, m.width, m.height), a.backgroundColor && (p.fillStyle = a.backgroundColor, p.fillRect(0, 0, m.width, m.height)));
  11966. for (var t = 0, e = 0; e < f.length; ++e) t += f[e];
  11967. if (t <= 0) return;
  11968. var o = -v,
  11969. s = 0,
  11970. l = 0,
  11971. u = 0;
  11972. for (; o < _.height;) {
  11973. if (s % 2 == 0) {
  11974. for (var h = l / 2 % g.length, c = 0, y = 0, b = 0; c < 2 * _.width;) {
  11975. var w = 0;
  11976. for (e = 0; e < d[u].length; ++e) w += d[u][e];
  11977. if (w <= 0) break;
  11978. if (y % 2 == 0) {
  11979. var S = .5 * (1 - a.symbolSize),
  11980. M = c + d[u][y] * S,
  11981. I = o + f[s] * S,
  11982. T = d[u][y] * a.symbolSize,
  11983. C = f[s] * a.symbolSize,
  11984. D = b / 2 % g[h].length;
  11985. A(M, I, T, C, g[h][D])
  11986. }
  11987. c += d[u][y], ++b, ++y === d[u].length && (y = 0)
  11988. }++u === d.length && (u = 0)
  11989. }
  11990. o += f[s], ++l, ++s === f.length && (s = 0)
  11991. }
  11992. function A(t, e, o, s, l) {
  11993. var u = r ? 1 : n,
  11994. h = Wy(l, t * u, e * u, o * u, s * u, a.color, a.symbolKeepAspect);
  11995. if (r) {
  11996. var c = i.painter.renderOneToVNode(h);
  11997. c && x.children.push(c)
  11998. } else hv(p, h)
  11999. }
  12000. })(), s && dv.put(e, m || x);
  12001. t.image = m, t.svgElement = x, t.svgWidth = _.width, t.svgHeight = _.height
  12002. }(s), s.rotation = a.rotation, s.scaleX = s.scaleY = r ? 1 : 1 / n, pv.set(t, s), t.dirty = !1, s
  12003. }
  12004. function yv(t) {
  12005. if (!t || 0 === t.length) return [
  12006. ["rect"]
  12007. ];
  12008. if (U(t)) return [
  12009. [t]
  12010. ];
  12011. for (var e = !0, n = 0; n < t.length; ++n)
  12012. if (!U(t[n])) {
  12013. e = !1;
  12014. break
  12015. } if (e) return yv([t]);
  12016. var i = [];
  12017. for (n = 0; n < t.length; ++n) U(t[n]) ? i.push([t[n]]) : i.push(t[n]);
  12018. return i
  12019. }
  12020. function vv(t) {
  12021. if (!t || 0 === t.length) return [
  12022. [0, 0]
  12023. ];
  12024. if (j(t)) return [
  12025. [r = Math.ceil(t), r]
  12026. ];
  12027. for (var e = !0, n = 0; n < t.length; ++n)
  12028. if (!j(t[n])) {
  12029. e = !1;
  12030. break
  12031. } if (e) return vv([t]);
  12032. var i = [];
  12033. for (n = 0; n < t.length; ++n)
  12034. if (j(t[n])) {
  12035. var r = Math.ceil(t[n]);
  12036. i.push([r, r])
  12037. } else {
  12038. (r = z(t[n], (function (t) {
  12039. return Math.ceil(t)
  12040. }))).length % 2 == 1 ? i.push(r.concat(r)) : i.push(r)
  12041. } return i
  12042. }
  12043. function mv(t) {
  12044. for (var e = 0, n = 0; n < t.length; ++n) e += t[n];
  12045. return t.length % 2 == 1 ? 2 * e : e
  12046. }
  12047. var xv = new jt,
  12048. _v = {};
  12049. function bv(t) {
  12050. return _v[t]
  12051. }
  12052. var wv = 2e3,
  12053. Sv = 4500,
  12054. Mv = {
  12055. PROCESSOR: {
  12056. FILTER: 1e3,
  12057. SERIES_FILTER: 800,
  12058. STATISTIC: 5e3
  12059. },
  12060. VISUAL: {
  12061. LAYOUT: 1e3,
  12062. PROGRESSIVE_LAYOUT: 1100,
  12063. GLOBAL: wv,
  12064. CHART: 3e3,
  12065. POST_CHART_LAYOUT: 4600,
  12066. COMPONENT: 4e3,
  12067. BRUSH: 5e3,
  12068. CHART_ITEM: Sv,
  12069. ARIA: 6e3,
  12070. DECAL: 7e3
  12071. }
  12072. },
  12073. Iv = "__flagInMainProcess",
  12074. Tv = "__pendingUpdate",
  12075. Cv = "__needsUpdateStatus",
  12076. Dv = /^[a-zA-Z0-9_]+$/,
  12077. Av = "__connectUpdateStatus";
  12078. function kv(t) {
  12079. return function () {
  12080. for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
  12081. if (!this.isDisposed()) return Pv(this, t, e);
  12082. nm(this.id)
  12083. }
  12084. }
  12085. function Lv(t) {
  12086. return function () {
  12087. for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
  12088. return Pv(this, t, e)
  12089. }
  12090. }
  12091. function Pv(t, e, n) {
  12092. return n[0] = n[0] && n[0].toLowerCase(), jt.prototype[e].apply(t, n)
  12093. }
  12094. var Ov, Rv, Nv, Ev, zv, Vv, Bv, Fv, Gv, Wv, Hv, Yv, Xv, Uv, Zv, jv, qv, Kv, $v = function (t) {
  12095. function e() {
  12096. return null !== t && t.apply(this, arguments) || this
  12097. }
  12098. return n(e, t), e
  12099. }(jt),
  12100. Jv = $v.prototype;
  12101. Jv.on = Lv("on"), Jv.off = Lv("off");
  12102. var Qv = function (t) {
  12103. function e(e, n, i) {
  12104. var r = t.call(this, new _y) || this;
  12105. r._chartsViews = [], r._chartsMap = {}, r._componentsViews = [], r._componentsMap = {}, r._pendingActions = [], i = i || {}, U(n) && (n = lm[n]), r._dom = e;
  12106. var o = "canvas",
  12107. a = "auto",
  12108. s = !1,
  12109. l = r._zr = Gr(e, {
  12110. renderer: i.renderer || o,
  12111. devicePixelRatio: i.devicePixelRatio,
  12112. width: i.width,
  12113. height: i.height,
  12114. ssr: i.ssr,
  12115. useDirtyRect: rt(i.useDirtyRect, s),
  12116. useCoarsePointer: rt(i.useCoarsePointer, a),
  12117. pointerSize: i.pointerSize
  12118. });
  12119. r._ssr = i.ssr, r._throttledZrFlush = Bg(W(l.flush, l), 17), (n = T(n)) && Wd(n, !0), r._theme = n, r._locale = function (t) {
  12120. if (U(t)) {
  12121. var e = Lc[t.toUpperCase()] || {};
  12122. return t === Dc || t === Ac ? T(e) : C(T(e), T(Lc[kc]), !1)
  12123. }
  12124. return C(T(t), T(Lc[kc]), !1)
  12125. }(i.locale || Oc), r._coordSysMgr = new xd;
  12126. var u = r._api = Zv(r);
  12127. function h(t, e) {
  12128. return t.__prio - e.__prio
  12129. }
  12130. return Qe(sm, h), Qe(om, h), r._scheduler = new Jg(r, u, om, sm), r._messageCenter = new $v, r._initEvents(), r.resize = W(r.resize, r), l.animation.on("frame", r._onframe, r), Wv(l, r), Hv(l, r), ct(r), r
  12131. }
  12132. return n(e, t), e.prototype._onframe = function () {
  12133. if (!this._disposed) {
  12134. Kv(this);
  12135. var t = this._scheduler;
  12136. if (this[Tv]) {
  12137. var e = this[Tv].silent;
  12138. this[Iv] = !0;
  12139. try {
  12140. Ov(this), Ev.update.call(this, null, this[Tv].updateParams)
  12141. } catch (t) {
  12142. throw this[Iv] = !1, this[Tv] = null, t
  12143. }
  12144. this._zr.flush(), this[Iv] = !1, this[Tv] = null, Fv.call(this, e), Gv.call(this, e)
  12145. } else if (t.unfinished) {
  12146. var n = 1,
  12147. i = this._model,
  12148. r = this._api;
  12149. t.unfinished = !1;
  12150. do {
  12151. var o = +new Date;
  12152. t.performSeriesTasks(i), t.performDataProcessorTasks(i), Vv(this, i), t.performVisualTasks(i), Uv(this, this._model, r, "remain", {}), n -= +new Date - o
  12153. } while (n > 0 && t.unfinished);
  12154. t.unfinished || this._zr.flush()
  12155. }
  12156. }
  12157. }, e.prototype.getDom = function () {
  12158. return this._dom
  12159. }, e.prototype.getId = function () {
  12160. return this.id
  12161. }, e.prototype.getZr = function () {
  12162. return this._zr
  12163. }, e.prototype.isSSR = function () {
  12164. return this._ssr
  12165. }, e.prototype.setOption = function (t, e, n) {
  12166. if (!this[Iv])
  12167. if (this._disposed) nm(this.id);
  12168. else {
  12169. var i, r, o;
  12170. if (q(e) && (n = e.lazyUpdate, i = e.silent, r = e.replaceMerge, o = e.transition, e = e.notMerge), this[Iv] = !0, !this._model || e) {
  12171. var a = new bd(this._api),
  12172. s = this._theme,
  12173. l = this._model = new pd;
  12174. l.scheduler = this._scheduler, l.ssr = this._ssr, l.init(null, null, null, s, this._locale, a)
  12175. }
  12176. this._model.setOption(t, {
  12177. replaceMerge: r
  12178. }, am);
  12179. var u = {
  12180. seriesTransition: o,
  12181. optionChanged: !0
  12182. };
  12183. if (n) this[Tv] = {
  12184. silent: i,
  12185. updateParams: u
  12186. }, this[Iv] = !1, this.getZr().wakeUp();
  12187. else {
  12188. try {
  12189. Ov(this), Ev.update.call(this, null, u)
  12190. } catch (t) {
  12191. throw this[Tv] = null, this[Iv] = !1, t
  12192. }
  12193. this._ssr || this._zr.flush(), this[Tv] = null, this[Iv] = !1, Fv.call(this, i), Gv.call(this, i)
  12194. }
  12195. }
  12196. }, e.prototype.setTheme = function () {
  12197. yo()
  12198. }, e.prototype.getModel = function () {
  12199. return this._model
  12200. }, e.prototype.getOption = function () {
  12201. return this._model && this._model.getOption()
  12202. }, e.prototype.getWidth = function () {
  12203. return this._zr.getWidth()
  12204. }, e.prototype.getHeight = function () {
  12205. return this._zr.getHeight()
  12206. }, e.prototype.getDevicePixelRatio = function () {
  12207. return this._zr.painter.dpr || r.hasGlobalWindow && window.devicePixelRatio || 1
  12208. }, e.prototype.getRenderedCanvas = function (t) {
  12209. return this.renderToCanvas(t)
  12210. }, e.prototype.renderToCanvas = function (t) {
  12211. t = t || {};
  12212. var e = this._zr.painter;
  12213. return e.getRenderedCanvas({
  12214. backgroundColor: t.backgroundColor || this._model.get("backgroundColor"),
  12215. pixelRatio: t.pixelRatio || this.getDevicePixelRatio()
  12216. })
  12217. }, e.prototype.renderToSVGString = function (t) {
  12218. t = t || {};
  12219. var e = this._zr.painter;
  12220. return e.renderToString({
  12221. useViewBox: t.useViewBox
  12222. })
  12223. }, e.prototype.getSvgDataURL = function () {
  12224. if (r.svgSupported) {
  12225. var t = this._zr;
  12226. return E(t.storage.getDisplayList(), (function (t) {
  12227. t.stopAnimation(null, !0)
  12228. })), t.painter.toDataURL()
  12229. }
  12230. }, e.prototype.getDataURL = function (t) {
  12231. if (!this._disposed) {
  12232. var e = (t = t || {}).excludeComponents,
  12233. n = this._model,
  12234. i = [],
  12235. r = this;
  12236. E(e, (function (t) {
  12237. n.eachComponent({
  12238. mainType: t
  12239. }, (function (t) {
  12240. var e = r._componentsMap[t.__viewId];
  12241. e.group.ignore || (i.push(e), e.group.ignore = !0)
  12242. }))
  12243. }));
  12244. var o = "svg" === this._zr.painter.getType() ? this.getSvgDataURL() : this.renderToCanvas(t).toDataURL("image/" + (t && t.type || "png"));
  12245. return E(i, (function (t) {
  12246. t.group.ignore = !1
  12247. })), o
  12248. }
  12249. nm(this.id)
  12250. }, e.prototype.getConnectedDataURL = function (t) {
  12251. if (!this._disposed) {
  12252. var e = "svg" === t.type,
  12253. n = this.group,
  12254. i = Math.min,
  12255. r = Math.max,
  12256. o = 1 / 0;
  12257. if (cm[n]) {
  12258. var a = o,
  12259. s = o,
  12260. l = -1 / 0,
  12261. u = -1 / 0,
  12262. c = [],
  12263. p = t && t.pixelRatio || this.getDevicePixelRatio();
  12264. E(hm, (function (o, h) {
  12265. if (o.group === n) {
  12266. var p = e ? o.getZr().painter.getSvgDom().innerHTML : o.renderToCanvas(T(t)),
  12267. d = o.getDom().getBoundingClientRect();
  12268. a = i(d.left, a), s = i(d.top, s), l = r(d.right, l), u = r(d.bottom, u), c.push({
  12269. dom: p,
  12270. left: d.left,
  12271. top: d.top
  12272. })
  12273. }
  12274. }));
  12275. var d = (l *= p) - (a *= p),
  12276. f = (u *= p) - (s *= p),
  12277. g = h.createCanvas(),
  12278. y = Gr(g, {
  12279. renderer: e ? "svg" : "canvas"
  12280. });
  12281. if (y.resize({
  12282. width: d,
  12283. height: f
  12284. }), e) {
  12285. var v = "";
  12286. return E(c, (function (t) {
  12287. var e = t.left - a,
  12288. n = t.top - s;
  12289. v += '<g transform="translate(' + e + "," + n + ')">' + t.dom + "</g>"
  12290. })), y.painter.getSvgRoot().innerHTML = v, t.connectedBackgroundColor && y.painter.setBackgroundColor(t.connectedBackgroundColor), y.refreshImmediately(), y.painter.toDataURL()
  12291. }
  12292. return t.connectedBackgroundColor && y.add(new zs({
  12293. shape: {
  12294. x: 0,
  12295. y: 0,
  12296. width: d,
  12297. height: f
  12298. },
  12299. style: {
  12300. fill: t.connectedBackgroundColor
  12301. }
  12302. })), E(c, (function (t) {
  12303. var e = new ks({
  12304. style: {
  12305. x: t.left * p - a,
  12306. y: t.top * p - s,
  12307. image: t.dom
  12308. }
  12309. });
  12310. y.add(e)
  12311. })), y.refreshImmediately(), g.toDataURL("image/" + (t && t.type || "png"))
  12312. }
  12313. return this.getDataURL(t)
  12314. }
  12315. nm(this.id)
  12316. }, e.prototype.convertToPixel = function (t, e) {
  12317. return zv(this, "convertToPixel", t, e)
  12318. }, e.prototype.convertFromPixel = function (t, e) {
  12319. return zv(this, "convertFromPixel", t, e)
  12320. }, e.prototype.containPixel = function (t, e) {
  12321. var n;
  12322. if (!this._disposed) return E(No(this._model, t), (function (t, i) {
  12323. i.indexOf("Models") >= 0 && E(t, (function (t) {
  12324. var r = t.coordinateSystem;
  12325. if (r && r.containPoint) n = n || !!r.containPoint(e);
  12326. else if ("seriesModels" === i) {
  12327. var o = this._chartsMap[t.__viewId];
  12328. o && o.containPoint && (n = n || o.containPoint(e, t))
  12329. } else 0
  12330. }), this)
  12331. }), this), !!n;
  12332. nm(this.id)
  12333. }, e.prototype.getVisual = function (t, e) {
  12334. var n = No(this._model, t, {
  12335. defaultMainType: "series"
  12336. }),
  12337. i = n.seriesModel;
  12338. var r = i.getData(),
  12339. o = n.hasOwnProperty("dataIndexInside") ? n.dataIndexInside : n.hasOwnProperty("dataIndex") ? r.indexOfRawIndex(n.dataIndex) : null;
  12340. return null != o ? Iy(r, o, e) : Ty(r, e)
  12341. }, e.prototype.getViewOfComponentModel = function (t) {
  12342. return this._componentsMap[t.__viewId]
  12343. }, e.prototype.getViewOfSeriesModel = function (t) {
  12344. return this._chartsMap[t.__viewId]
  12345. }, e.prototype._initEvents = function () {
  12346. var t, e, n, i = this;
  12347. E(em, (function (t) {
  12348. var e = function (e) {
  12349. var n, r = i.getModel(),
  12350. o = e.target,
  12351. a = "globalout" === t;
  12352. if (a ? n = {} : o && ky(o, (function (t) {
  12353. var e = Qs(t);
  12354. if (e && null != e.dataIndex) {
  12355. var i = e.dataModel || r.getSeriesByIndex(e.seriesIndex);
  12356. return n = i && i.getDataParams(e.dataIndex, e.dataType) || {}, !0
  12357. }
  12358. if (e.eventData) return n = A({}, e.eventData), !0
  12359. }), !0), n) {
  12360. var s = n.componentType,
  12361. l = n.componentIndex;
  12362. "markLine" !== s && "markPoint" !== s && "markArea" !== s || (s = "series", l = n.seriesIndex);
  12363. var u = s && null != l && r.getComponent(s, l),
  12364. h = u && i["series" === u.mainType ? "_chartsMap" : "_componentsMap"][u.__viewId];
  12365. 0, n.event = e, n.type = t, i._$eventProcessor.eventInfo = {
  12366. targetEl: o,
  12367. packedEvent: n,
  12368. model: u,
  12369. view: h
  12370. }, i.trigger(t, n)
  12371. }
  12372. };
  12373. e.zrEventfulCallAtLast = !0, i._zr.on(t, e, i)
  12374. })), E(rm, (function (t, e) {
  12375. i._messageCenter.on(e, (function (t) {
  12376. this.trigger(e, t)
  12377. }), i)
  12378. })), E(["selectchanged"], (function (t) {
  12379. i._messageCenter.on(t, (function (e) {
  12380. this.trigger(t, e)
  12381. }), i)
  12382. })), t = this._messageCenter, e = this, n = this._api, t.on("selectchanged", (function (t) {
  12383. var i = n.getModel();
  12384. t.isFromClick ? (Ay("map", "selectchanged", e, i, t), Ay("pie", "selectchanged", e, i, t)) : "select" === t.fromAction ? (Ay("map", "selected", e, i, t), Ay("pie", "selected", e, i, t)) : "unselect" === t.fromAction && (Ay("map", "unselected", e, i, t), Ay("pie", "unselected", e, i, t))
  12385. }))
  12386. }, e.prototype.isDisposed = function () {
  12387. return this._disposed
  12388. }, e.prototype.clear = function () {
  12389. this._disposed ? nm(this.id) : this.setOption({
  12390. series: []
  12391. }, !0)
  12392. }, e.prototype.dispose = function () {
  12393. if (this._disposed) nm(this.id);
  12394. else {
  12395. this._disposed = !0, this.getDom() && Fo(this.getDom(), fm, "");
  12396. var t = this,
  12397. e = t._api,
  12398. n = t._model;
  12399. E(t._componentsViews, (function (t) {
  12400. t.dispose(n, e)
  12401. })), E(t._chartsViews, (function (t) {
  12402. t.dispose(n, e)
  12403. })), t._zr.dispose(), t._dom = t._model = t._chartsMap = t._componentsMap = t._chartsViews = t._componentsViews = t._scheduler = t._api = t._zr = t._throttledZrFlush = t._theme = t._coordSysMgr = t._messageCenter = null, delete hm[t.id]
  12404. }
  12405. }, e.prototype.resize = function (t) {
  12406. if (!this[Iv])
  12407. if (this._disposed) nm(this.id);
  12408. else {
  12409. this._zr.resize(t);
  12410. var e = this._model;
  12411. if (this._loadingFX && this._loadingFX.resize(), e) {
  12412. var n = e.resetOption("media"),
  12413. i = t && t.silent;
  12414. this[Tv] && (null == i && (i = this[Tv].silent), n = !0, this[Tv] = null), this[Iv] = !0;
  12415. try {
  12416. n && Ov(this), Ev.update.call(this, {
  12417. type: "resize",
  12418. animation: A({
  12419. duration: 0
  12420. }, t && t.animation)
  12421. })
  12422. } catch (t) {
  12423. throw this[Iv] = !1, t
  12424. }
  12425. this[Iv] = !1, Fv.call(this, i), Gv.call(this, i)
  12426. }
  12427. }
  12428. }, e.prototype.showLoading = function (t, e) {
  12429. if (this._disposed) nm(this.id);
  12430. else if (q(t) && (e = t, t = ""), t = t || "default", this.hideLoading(), um[t]) {
  12431. var n = um[t](this._api, e),
  12432. i = this._zr;
  12433. this._loadingFX = n, i.add(n)
  12434. }
  12435. }, e.prototype.hideLoading = function () {
  12436. this._disposed ? nm(this.id) : (this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null)
  12437. }, e.prototype.makeActionFromEvent = function (t) {
  12438. var e = A({}, t);
  12439. return e.type = rm[t.type], e
  12440. }, e.prototype.dispatchAction = function (t, e) {
  12441. if (this._disposed) nm(this.id);
  12442. else if (q(e) || (e = {
  12443. silent: !!e
  12444. }), im[t.type] && this._model)
  12445. if (this[Iv]) this._pendingActions.push(t);
  12446. else {
  12447. var n = e.silent;
  12448. Bv.call(this, t, n);
  12449. var i = e.flush;
  12450. i ? this._zr.flush() : !1 !== i && r.browser.weChat && this._throttledZrFlush(), Fv.call(this, n), Gv.call(this, n)
  12451. }
  12452. }, e.prototype.updateLabelLayout = function () {
  12453. xv.trigger("series:layoutlabels", this._model, this._api, {
  12454. updatedSeries: []
  12455. })
  12456. }, e.prototype.appendData = function (t) {
  12457. if (this._disposed) nm(this.id);
  12458. else {
  12459. var e = t.seriesIndex,
  12460. n = this.getModel().getSeriesByIndex(e);
  12461. 0, n.appendData(t), this._scheduler.unfinished = !0, this.getZr().wakeUp()
  12462. }
  12463. }, e.internalField = function () {
  12464. function t(t) {
  12465. t.clearColorPalette(), t.eachSeries((function (t) {
  12466. t.clearColorPalette()
  12467. }))
  12468. }
  12469. function e(t) {
  12470. for (var e = [], n = t.currentStates, i = 0; i < n.length; i++) {
  12471. var r = n[i];
  12472. "emphasis" !== r && "blur" !== r && "select" !== r && e.push(r)
  12473. }
  12474. t.selected && t.states.select && e.push("select"), 2 === t.hoverState && t.states.emphasis ? e.push("emphasis") : 1 === t.hoverState && t.states.blur && e.push("blur"), t.useStates(e)
  12475. }
  12476. function i(t, e) {
  12477. if (!t.preventAutoZ) {
  12478. var n = t.get("z") || 0,
  12479. i = t.get("zlevel") || 0;
  12480. e.eachRendered((function (t) {
  12481. return o(t, n, i, -1 / 0), !0
  12482. }))
  12483. }
  12484. }
  12485. function o(t, e, n, i) {
  12486. var r = t.getTextContent(),
  12487. a = t.getTextGuideLine();
  12488. if (t.isGroup)
  12489. for (var s = t.childrenRef(), l = 0; l < s.length; l++) i = Math.max(o(s[l], e, n, i), i);
  12490. else t.z = e, t.zlevel = n, i = Math.max(t.z2, i);
  12491. if (r && (r.z = e, r.zlevel = n, isFinite(i) && (r.z2 = i + 2)), a) {
  12492. var u = t.textGuideLineConfig;
  12493. a.z = e, a.zlevel = n, isFinite(i) && (a.z2 = i + (u && u.showAbove ? 1 : -1))
  12494. }
  12495. return i
  12496. }
  12497. function a(t, e) {
  12498. e.eachRendered((function (t) {
  12499. if (!yh(t)) {
  12500. var e = t.getTextContent(),
  12501. n = t.getTextGuideLine();
  12502. t.stateTransition && (t.stateTransition = null), e && e.stateTransition && (e.stateTransition = null), n && n.stateTransition && (n.stateTransition = null), t.hasState() ? (t.prevStates = t.currentStates, t.clearStates()) : t.prevStates && (t.prevStates = null)
  12503. }
  12504. }))
  12505. }
  12506. function s(t, n) {
  12507. var i = t.getModel("stateAnimation"),
  12508. r = t.isAnimationEnabled(),
  12509. o = i.get("duration"),
  12510. a = o > 0 ? {
  12511. duration: o,
  12512. delay: i.get("delay"),
  12513. easing: i.get("easing")
  12514. } : null;
  12515. n.eachRendered((function (t) {
  12516. if (t.states && t.states.emphasis) {
  12517. if (yh(t)) return;
  12518. if (t instanceof Is && function (t) {
  12519. var e = il(t);
  12520. e.normalFill = t.style.fill, e.normalStroke = t.style.stroke;
  12521. var n = t.states.select || {};
  12522. e.selectFill = n.style && n.style.fill || null, e.selectStroke = n.style && n.style.stroke || null
  12523. }(t), t.__dirty) {
  12524. var n = t.prevStates;
  12525. n && t.useStates(n)
  12526. }
  12527. if (r) {
  12528. t.stateTransition = a;
  12529. var i = t.getTextContent(),
  12530. o = t.getTextGuideLine();
  12531. i && (i.stateTransition = a), o && (o.stateTransition = a)
  12532. }
  12533. t.__dirty && e(t)
  12534. }
  12535. }))
  12536. }
  12537. Ov = function (t) {
  12538. var e = t._scheduler;
  12539. e.restorePipelines(t._model), e.prepareStageTasks(), Rv(t, !0), Rv(t, !1), e.plan()
  12540. }, Rv = function (t, e) {
  12541. for (var n = t._model, i = t._scheduler, r = e ? t._componentsViews : t._chartsViews, o = e ? t._componentsMap : t._chartsMap, a = t._zr, s = t._api, l = 0; l < r.length; l++) r[l].__alive = !1;
  12542. function u(t) {
  12543. var l = t.__requireNewView;
  12544. t.__requireNewView = !1;
  12545. var u = "_ec_" + t.id + "_" + t.type,
  12546. h = !l && o[u];
  12547. if (!h) {
  12548. var c = Xo(t.type),
  12549. p = e ? Tg.getClass(c.main, c.sub) : kg.getClass(c.sub);
  12550. 0, (h = new p).init(n, s), o[u] = h, r.push(h), a.add(h.group)
  12551. }
  12552. t.__viewId = h.__id = u, h.__alive = !0, h.__model = t, h.group.__ecComponentInfo = {
  12553. mainType: t.mainType,
  12554. index: t.componentIndex
  12555. }, !e && i.prepareView(h, t, n, s)
  12556. }
  12557. e ? n.eachComponent((function (t, e) {
  12558. "series" !== t && u(e)
  12559. })) : n.eachSeries(u);
  12560. for (l = 0; l < r.length;) {
  12561. var h = r[l];
  12562. h.__alive ? l++ : (!e && h.renderTask.dispose(), a.remove(h.group), h.dispose(n, s), r.splice(l, 1), o[h.__id] === h && delete o[h.__id], h.__id = h.group.__ecComponentInfo = null)
  12563. }
  12564. }, Nv = function (t, e, n, i, r) {
  12565. var o = t._model;
  12566. if (o.setUpdatePayload(n), i) {
  12567. var a = {};
  12568. a[i + "Id"] = n[i + "Id"], a[i + "Index"] = n[i + "Index"], a[i + "Name"] = n[i + "Name"];
  12569. var s = {
  12570. mainType: i,
  12571. query: a
  12572. };
  12573. r && (s.subType = r);
  12574. var l, u = n.excludeSeriesId;
  12575. null != u && (l = yt(), E(bo(u), (function (t) {
  12576. var e = Ao(t, null);
  12577. null != e && l.set(e, !0)
  12578. }))), o && o.eachComponent(s, (function (e) {
  12579. if (!(l && null != l.get(e.id)))
  12580. if (Jl(n))
  12581. if (e instanceof mg) n.type !== ll || n.notBlur || e.get(["emphasis", "disabled"]) || function (t, e, n) {
  12582. var i = t.seriesIndex,
  12583. r = t.getData(e.dataType);
  12584. if (r) {
  12585. var o = Po(r, e);
  12586. o = (Y(o) ? o[0] : o) || 0;
  12587. var a = r.getItemGraphicEl(o);
  12588. if (!a)
  12589. for (var s = r.count(), l = 0; !a && l < s;) a = r.getItemGraphicEl(l++);
  12590. if (a) {
  12591. var u = Qs(a);
  12592. Vl(i, u.focus, u.blurScope, n)
  12593. } else {
  12594. var h = t.get(["emphasis", "focus"]),
  12595. c = t.get(["emphasis", "blurScope"]);
  12596. null != h && Vl(i, h, c, n)
  12597. }
  12598. }
  12599. }(e, n, t._api);
  12600. else {
  12601. var i = Fl(e.mainType, e.componentIndex, n.name, t._api),
  12602. r = i.focusSelf,
  12603. o = i.dispatchers;
  12604. n.type === ll && r && !n.notBlur && Bl(e.mainType, e.componentIndex, t._api), o && E(o, (function (t) {
  12605. n.type === ll ? kl(t) : Ll(t)
  12606. }))
  12607. }
  12608. else $l(n) && e instanceof mg && (! function (t, e, n) {
  12609. if ($l(e)) {
  12610. var i = e.dataType,
  12611. r = Po(t.getData(i), e);
  12612. Y(r) || (r = [r]), t[e.type === pl ? "toggleSelect" : e.type === hl ? "select" : "unselect"](r, i)
  12613. }
  12614. }(e, n, t._api), Gl(e), qv(t))
  12615. }), t), o && o.eachComponent(s, (function (e) {
  12616. l && null != l.get(e.id) || h(t["series" === i ? "_chartsMap" : "_componentsMap"][e.__viewId])
  12617. }), t)
  12618. } else E([].concat(t._componentsViews).concat(t._chartsViews), h);
  12619. function h(i) {
  12620. i && i.__alive && i[e] && i[e](i.__model, o, t._api, n)
  12621. }
  12622. }, Ev = {
  12623. prepareAndUpdate: function (t) {
  12624. Ov(this), Ev.update.call(this, t, {
  12625. optionChanged: null != t.newOption
  12626. })
  12627. },
  12628. update: function (e, n) {
  12629. var i = this._model,
  12630. r = this._api,
  12631. o = this._zr,
  12632. a = this._coordSysMgr,
  12633. s = this._scheduler;
  12634. if (i) {
  12635. i.setUpdatePayload(e), s.restoreData(i, e), s.performSeriesTasks(i), a.create(i, r), s.performDataProcessorTasks(i, e), Vv(this, i), a.update(i, r), t(i), s.performVisualTasks(i, e), Yv(this, i, r, e, n);
  12636. var l = i.get("backgroundColor") || "transparent",
  12637. u = i.get("darkMode");
  12638. o.setBackgroundColor(l), null != u && "auto" !== u && o.setDarkMode(u), xv.trigger("afterupdate", i, r)
  12639. }
  12640. },
  12641. updateTransform: function (e) {
  12642. var n = this,
  12643. i = this._model,
  12644. r = this._api;
  12645. if (i) {
  12646. i.setUpdatePayload(e);
  12647. var o = [];
  12648. i.eachComponent((function (t, a) {
  12649. if ("series" !== t) {
  12650. var s = n.getViewOfComponentModel(a);
  12651. if (s && s.__alive)
  12652. if (s.updateTransform) {
  12653. var l = s.updateTransform(a, i, r, e);
  12654. l && l.update && o.push(s)
  12655. } else o.push(s)
  12656. }
  12657. }));
  12658. var a = yt();
  12659. i.eachSeries((function (t) {
  12660. var o = n._chartsMap[t.__viewId];
  12661. if (o.updateTransform) {
  12662. var s = o.updateTransform(t, i, r, e);
  12663. s && s.update && a.set(t.uid, 1)
  12664. } else a.set(t.uid, 1)
  12665. })), t(i), this._scheduler.performVisualTasks(i, e, {
  12666. setDirty: !0,
  12667. dirtyMap: a
  12668. }), Uv(this, i, r, e, {}, a), xv.trigger("afterupdate", i, r)
  12669. }
  12670. },
  12671. updateView: function (e) {
  12672. var n = this._model;
  12673. n && (n.setUpdatePayload(e), kg.markUpdateMethod(e, "updateView"), t(n), this._scheduler.performVisualTasks(n, e, {
  12674. setDirty: !0
  12675. }), Yv(this, n, this._api, e, {}), xv.trigger("afterupdate", n, this._api))
  12676. },
  12677. updateVisual: function (e) {
  12678. var n = this,
  12679. i = this._model;
  12680. i && (i.setUpdatePayload(e), i.eachSeries((function (t) {
  12681. t.getData().clearAllVisual()
  12682. })), kg.markUpdateMethod(e, "updateVisual"), t(i), this._scheduler.performVisualTasks(i, e, {
  12683. visualType: "visual",
  12684. setDirty: !0
  12685. }), i.eachComponent((function (t, r) {
  12686. if ("series" !== t) {
  12687. var o = n.getViewOfComponentModel(r);
  12688. o && o.__alive && o.updateVisual(r, i, n._api, e)
  12689. }
  12690. })), i.eachSeries((function (t) {
  12691. n._chartsMap[t.__viewId].updateVisual(t, i, n._api, e)
  12692. })), xv.trigger("afterupdate", i, this._api))
  12693. },
  12694. updateLayout: function (t) {
  12695. Ev.update.call(this, t)
  12696. }
  12697. }, zv = function (t, e, n, i) {
  12698. if (t._disposed) nm(t.id);
  12699. else {
  12700. for (var r, o = t._model, a = t._coordSysMgr.getCoordinateSystems(), s = No(o, n), l = 0; l < a.length; l++) {
  12701. var u = a[l];
  12702. if (u[e] && null != (r = u[e](o, s, i))) return r
  12703. }
  12704. 0
  12705. }
  12706. }, Vv = function (t, e) {
  12707. var n = t._chartsMap,
  12708. i = t._scheduler;
  12709. e.eachSeries((function (t) {
  12710. i.updateStreamModes(t, n[t.__viewId])
  12711. }))
  12712. }, Bv = function (t, e) {
  12713. var n = this,
  12714. i = this.getModel(),
  12715. r = t.type,
  12716. o = t.escapeConnect,
  12717. a = im[r],
  12718. s = a.actionInfo,
  12719. l = (s.update || "update").split(":"),
  12720. u = l.pop(),
  12721. h = null != l[0] && Xo(l[0]);
  12722. this[Iv] = !0;
  12723. var c = [t],
  12724. p = !1;
  12725. t.batch && (p = !0, c = z(t.batch, (function (e) {
  12726. return (e = k(A({}, e), t)).batch = null, e
  12727. })));
  12728. var d, f = [],
  12729. g = $l(t),
  12730. y = Jl(t);
  12731. if (y && zl(this._api), E(c, (function (e) {
  12732. if ((d = (d = a.action(e, n._model, n._api)) || A({}, e)).type = s.event || d.type, f.push(d), y) {
  12733. var i = Eo(t),
  12734. r = i.queryOptionMap,
  12735. o = i.mainTypeSpecified ? r.keys()[0] : "series";
  12736. Nv(n, u, e, o), qv(n)
  12737. } else g ? (Nv(n, u, e, "series"), qv(n)) : h && Nv(n, u, e, h.main, h.sub)
  12738. })), "none" !== u && !y && !g && !h) try {
  12739. this[Tv] ? (Ov(this), Ev.update.call(this, t), this[Tv] = null) : Ev[u].call(this, t)
  12740. } catch (t) {
  12741. throw this[Iv] = !1, t
  12742. }
  12743. if (d = p ? {
  12744. type: s.event || r,
  12745. escapeConnect: o,
  12746. batch: f
  12747. } : f[0], this[Iv] = !1, !e) {
  12748. var v = this._messageCenter;
  12749. if (v.trigger(d.type, d), g) {
  12750. var m = {
  12751. type: "selectchanged",
  12752. escapeConnect: o,
  12753. selected: Wl(i),
  12754. isFromClick: t.isFromClick || !1,
  12755. fromAction: t.type,
  12756. fromActionPayload: t
  12757. };
  12758. v.trigger(m.type, m)
  12759. }
  12760. }
  12761. }, Fv = function (t) {
  12762. for (var e = this._pendingActions; e.length;) {
  12763. var n = e.shift();
  12764. Bv.call(this, n, t)
  12765. }
  12766. }, Gv = function (t) {
  12767. !t && this.trigger("updated")
  12768. }, Wv = function (t, e) {
  12769. t.on("rendered", (function (n) {
  12770. e.trigger("rendered", n), !t.animation.isFinished() || e[Tv] || e._scheduler.unfinished || e._pendingActions.length || e.trigger("finished")
  12771. }))
  12772. }, Hv = function (t, e) {
  12773. t.on("mouseover", (function (t) {
  12774. var n = ky(t.target, Kl);
  12775. n && (! function (t, e, n) {
  12776. var i = Qs(t),
  12777. r = Fl(i.componentMainType, i.componentIndex, i.componentHighDownName, n),
  12778. o = r.dispatchers,
  12779. a = r.focusSelf;
  12780. o ? (a && Bl(i.componentMainType, i.componentIndex, n), E(o, (function (t) {
  12781. return Dl(t, e)
  12782. }))) : (Vl(i.seriesIndex, i.focus, i.blurScope, n), "self" === i.focus && Bl(i.componentMainType, i.componentIndex, n), Dl(t, e))
  12783. }(n, t, e._api), qv(e))
  12784. })).on("mouseout", (function (t) {
  12785. var n = ky(t.target, Kl);
  12786. n && (! function (t, e, n) {
  12787. zl(n);
  12788. var i = Qs(t),
  12789. r = Fl(i.componentMainType, i.componentIndex, i.componentHighDownName, n).dispatchers;
  12790. r ? E(r, (function (t) {
  12791. return Al(t, e)
  12792. })) : Al(t, e)
  12793. }(n, t, e._api), qv(e))
  12794. })).on("click", (function (t) {
  12795. var n = ky(t.target, (function (t) {
  12796. return null != Qs(t).dataIndex
  12797. }), !0);
  12798. if (n) {
  12799. var i = n.selected ? "unselect" : "select",
  12800. r = Qs(n);
  12801. e._api.dispatchAction({
  12802. type: i,
  12803. dataType: r.dataType,
  12804. dataIndexInside: r.dataIndex,
  12805. seriesIndex: r.seriesIndex,
  12806. isFromClick: !0
  12807. })
  12808. }
  12809. }))
  12810. }, Yv = function (t, e, n, i, r) {
  12811. ! function (t) {
  12812. var e = [],
  12813. n = [],
  12814. i = !1;
  12815. if (t.eachComponent((function (t, r) {
  12816. var o = r.get("zlevel") || 0,
  12817. a = r.get("z") || 0,
  12818. s = r.getZLevelKey();
  12819. i = i || !!s, ("series" === t ? n : e).push({
  12820. zlevel: o,
  12821. z: a,
  12822. idx: r.componentIndex,
  12823. type: t,
  12824. key: s
  12825. })
  12826. })), i) {
  12827. var r, o, a = e.concat(n);
  12828. Qe(a, (function (t, e) {
  12829. return t.zlevel === e.zlevel ? t.z - e.z : t.zlevel - e.zlevel
  12830. })), E(a, (function (e) {
  12831. var n = t.getComponent(e.type, e.idx),
  12832. i = e.zlevel,
  12833. a = e.key;
  12834. null != r && (i = Math.max(r, i)), a ? (i === r && a !== o && i++, o = a) : o && (i === r && i++, o = ""), r = i, n.setZLevel(i)
  12835. }))
  12836. }
  12837. }(e), Xv(t, e, n, i, r), E(t._chartsViews, (function (t) {
  12838. t.__alive = !1
  12839. })), Uv(t, e, n, i, r), E(t._chartsViews, (function (t) {
  12840. t.__alive || t.remove(e, n)
  12841. }))
  12842. }, Xv = function (t, e, n, r, o, l) {
  12843. E(l || t._componentsViews, (function (t) {
  12844. var o = t.__model;
  12845. a(o, t), t.render(o, e, n, r), i(o, t), s(o, t)
  12846. }))
  12847. }, Uv = function (t, e, n, o, l, u) {
  12848. var h = t._scheduler;
  12849. l = A(l || {}, {
  12850. updatedSeries: e.getSeries()
  12851. }), xv.trigger("series:beforeupdate", e, n, l);
  12852. var c = !1;
  12853. e.eachSeries((function (e) {
  12854. var n = t._chartsMap[e.__viewId];
  12855. n.__alive = !0;
  12856. var i = n.renderTask;
  12857. h.updatePayload(i, o), a(e, n), u && u.get(e.uid) && i.dirty(), i.perform(h.getPerformArgs(i)) && (c = !0), n.group.silent = !!e.get("silent"),
  12858. function (t, e) {
  12859. var n = t.get("blendMode") || null;
  12860. e.eachRendered((function (t) {
  12861. t.isGroup || (t.style.blend = n)
  12862. }))
  12863. }(e, n), Gl(e)
  12864. })), h.unfinished = c || h.unfinished, xv.trigger("series:layoutlabels", e, n, l), xv.trigger("series:transition", e, n, l), e.eachSeries((function (e) {
  12865. var n = t._chartsMap[e.__viewId];
  12866. i(e, n), s(e, n)
  12867. })),
  12868. function (t, e) {
  12869. var n = t._zr,
  12870. i = n.storage,
  12871. o = 0;
  12872. i.traverse((function (t) {
  12873. t.isGroup || o++
  12874. })), o > e.get("hoverLayerThreshold") && !r.node && !r.worker && e.eachSeries((function (e) {
  12875. if (!e.preventUsingHoverLayer) {
  12876. var n = t._chartsMap[e.__viewId];
  12877. n.__alive && n.eachRendered((function (t) {
  12878. t.states.emphasis && (t.states.emphasis.hoverLayer = !0)
  12879. }))
  12880. }
  12881. }))
  12882. }(t, e), xv.trigger("series:afterupdate", e, n, l)
  12883. }, qv = function (t) {
  12884. t[Cv] = !0, t.getZr().wakeUp()
  12885. }, Kv = function (t) {
  12886. t[Cv] && (t.getZr().storage.traverse((function (t) {
  12887. yh(t) || e(t)
  12888. })), t[Cv] = !1)
  12889. }, Zv = function (t) {
  12890. return new(function (e) {
  12891. function i() {
  12892. return null !== e && e.apply(this, arguments) || this
  12893. }
  12894. return n(i, e), i.prototype.getCoordinateSystems = function () {
  12895. return t._coordSysMgr.getCoordinateSystems()
  12896. }, i.prototype.getComponentByElement = function (e) {
  12897. for (; e;) {
  12898. var n = e.__ecComponentInfo;
  12899. if (null != n) return t._model.getComponent(n.mainType, n.index);
  12900. e = e.parent
  12901. }
  12902. }, i.prototype.enterEmphasis = function (e, n) {
  12903. kl(e, n), qv(t)
  12904. }, i.prototype.leaveEmphasis = function (e, n) {
  12905. Ll(e, n), qv(t)
  12906. }, i.prototype.enterBlur = function (e) {
  12907. Pl(e), qv(t)
  12908. }, i.prototype.leaveBlur = function (e) {
  12909. Ol(e), qv(t)
  12910. }, i.prototype.enterSelect = function (e) {
  12911. Rl(e), qv(t)
  12912. }, i.prototype.leaveSelect = function (e) {
  12913. Nl(e), qv(t)
  12914. }, i.prototype.getModel = function () {
  12915. return t.getModel()
  12916. }, i.prototype.getViewOfComponentModel = function (e) {
  12917. return t.getViewOfComponentModel(e)
  12918. }, i.prototype.getViewOfSeriesModel = function (e) {
  12919. return t.getViewOfSeriesModel(e)
  12920. }, i
  12921. }(vd))(t)
  12922. }, jv = function (t) {
  12923. function e(t, e) {
  12924. for (var n = 0; n < t.length; n++) {
  12925. t[n][Av] = e
  12926. }
  12927. }
  12928. E(rm, (function (n, i) {
  12929. t._messageCenter.on(i, (function (n) {
  12930. if (cm[t.group] && 0 !== t[Av]) {
  12931. if (n && n.escapeConnect) return;
  12932. var i = t.makeActionFromEvent(n),
  12933. r = [];
  12934. E(hm, (function (e) {
  12935. e !== t && e.group === t.group && r.push(e)
  12936. })), e(r, 0), E(r, (function (t) {
  12937. 1 !== t[Av] && t.dispatchAction(i)
  12938. })), e(r, 2)
  12939. }
  12940. }))
  12941. }))
  12942. }
  12943. }(), e
  12944. }(jt),
  12945. tm = Qv.prototype;
  12946. tm.on = kv("on"), tm.off = kv("off"), tm.one = function (t, e, n) {
  12947. var i = this;
  12948. yo(), this.on.call(this, t, (function n() {
  12949. for (var r = [], o = 0; o < arguments.length; o++) r[o] = arguments[o];
  12950. e && e.apply && e.apply(this, r), i.off(t, n)
  12951. }), n)
  12952. };
  12953. var em = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
  12954. function nm(t) {
  12955. 0
  12956. }
  12957. var im = {},
  12958. rm = {},
  12959. om = [],
  12960. am = [],
  12961. sm = [],
  12962. lm = {},
  12963. um = {},
  12964. hm = {},
  12965. cm = {},
  12966. pm = +new Date - 0,
  12967. dm = +new Date - 0,
  12968. fm = "_echarts_instance_";
  12969. function gm(t) {
  12970. cm[t] = !1
  12971. }
  12972. var ym = gm;
  12973. function vm(t) {
  12974. return hm[function (t, e) {
  12975. return t.getAttribute ? t.getAttribute(e) : t[e]
  12976. }(t, fm)]
  12977. }
  12978. function mm(t, e) {
  12979. lm[t] = e
  12980. }
  12981. function xm(t) {
  12982. P(am, t) < 0 && am.push(t)
  12983. }
  12984. function _m(t, e) {
  12985. Am(om, t, e, 2e3)
  12986. }
  12987. function bm(t) {
  12988. Sm("afterinit", t)
  12989. }
  12990. function wm(t) {
  12991. Sm("afterupdate", t)
  12992. }
  12993. function Sm(t, e) {
  12994. xv.on(t, e)
  12995. }
  12996. function Mm(t, e, n) {
  12997. X(e) && (n = e, e = "");
  12998. var i = q(t) ? t.type : [t, t = {
  12999. event: e
  13000. }][0];
  13001. t.event = (t.event || i).toLowerCase(), e = t.event, rm[e] || (lt(Dv.test(i) && Dv.test(e)), im[i] || (im[i] = {
  13002. action: n,
  13003. actionInfo: t
  13004. }), rm[e] = i)
  13005. }
  13006. function Im(t, e) {
  13007. xd.register(t, e)
  13008. }
  13009. function Tm(t, e) {
  13010. Am(sm, t, e, 1e3, "layout")
  13011. }
  13012. function Cm(t, e) {
  13013. Am(sm, t, e, 3e3, "visual")
  13014. }
  13015. var Dm = [];
  13016. function Am(t, e, n, i, r) {
  13017. if ((X(e) || q(e)) && (n = e, e = i), !(P(Dm, n) >= 0)) {
  13018. Dm.push(n);
  13019. var o = Jg.wrapStageHandler(n, r);
  13020. o.__prio = e, o.__raw = n, t.push(o)
  13021. }
  13022. }
  13023. function km(t, e) {
  13024. um[t] = e
  13025. }
  13026. function Lm(t, e, n) {
  13027. var i = bv("registerMap");
  13028. i && i(t, e, n)
  13029. }
  13030. var Pm = function (t) {
  13031. var e = (t = T(t)).type,
  13032. n = "";
  13033. e || vo(n);
  13034. var i = e.split(":");
  13035. 2 !== i.length && vo(n);
  13036. var r = !1;
  13037. "echarts" === i[0] && (e = i[1], r = !0), t.__isBuiltIn = r, Nf.set(e, t)
  13038. };
  13039. Cm(wv, Zg), Cm(Sv, qg), Cm(Sv, Kg), Cm(wv, Sy), Cm(Sv, My), Cm(7e3, (function (t, e) {
  13040. t.eachRawSeries((function (n) {
  13041. if (!t.isSeriesFiltered(n)) {
  13042. var i = n.getData();
  13043. i.hasItemVisual() && i.each((function (t) {
  13044. var n = i.getItemVisual(t, "decal");
  13045. n && (i.ensureUniqueItemVisual(t, "style").decal = gv(n, e))
  13046. }));
  13047. var r = i.getVisual("decal");
  13048. if (r) i.getVisual("style").decal = gv(r, e)
  13049. }
  13050. }))
  13051. })), xm(Wd), _m(900, (function (t) {
  13052. var e = yt();
  13053. t.eachSeries((function (t) {
  13054. var n = t.get("stack");
  13055. if (n) {
  13056. var i = e.get(n) || e.set(n, []),
  13057. r = t.getData(),
  13058. o = {
  13059. stackResultDimension: r.getCalculationInfo("stackResultDimension"),
  13060. stackedOverDimension: r.getCalculationInfo("stackedOverDimension"),
  13061. stackedDimension: r.getCalculationInfo("stackedDimension"),
  13062. stackedByDimension: r.getCalculationInfo("stackedByDimension"),
  13063. isStackedByIndex: r.getCalculationInfo("isStackedByIndex"),
  13064. data: r,
  13065. seriesModel: t
  13066. };
  13067. if (!o.stackedDimension || !o.isStackedByIndex && !o.stackedByDimension) return;
  13068. i.length && r.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel), i.push(o)
  13069. }
  13070. })), e.each(Hd)
  13071. })), km("default", (function (t, e) {
  13072. k(e = e || {}, {
  13073. text: "loading",
  13074. textColor: "#000",
  13075. fontSize: 12,
  13076. fontWeight: "normal",
  13077. fontStyle: "normal",
  13078. fontFamily: "sans-serif",
  13079. maskColor: "rgba(255, 255, 255, 0.8)",
  13080. showSpinner: !0,
  13081. color: "#5470c6",
  13082. spinnerRadius: 10,
  13083. lineWidth: 5,
  13084. zlevel: 0
  13085. });
  13086. var n = new zr,
  13087. i = new zs({
  13088. style: {
  13089. fill: e.maskColor
  13090. },
  13091. zlevel: e.zlevel,
  13092. z: 1e4
  13093. });
  13094. n.add(i);
  13095. var r, o = new Fs({
  13096. style: {
  13097. text: e.text,
  13098. fill: e.textColor,
  13099. fontSize: e.fontSize,
  13100. fontWeight: e.fontWeight,
  13101. fontStyle: e.fontStyle,
  13102. fontFamily: e.fontFamily
  13103. },
  13104. zlevel: e.zlevel,
  13105. z: 10001
  13106. }),
  13107. a = new zs({
  13108. style: {
  13109. fill: "none"
  13110. },
  13111. textContent: o,
  13112. textConfig: {
  13113. position: "right",
  13114. distance: 10
  13115. },
  13116. zlevel: e.zlevel,
  13117. z: 10001
  13118. });
  13119. return n.add(a), e.showSpinner && ((r = new Qu({
  13120. shape: {
  13121. startAngle: -$g / 2,
  13122. endAngle: -$g / 2 + .1,
  13123. r: e.spinnerRadius
  13124. },
  13125. style: {
  13126. stroke: e.color,
  13127. lineCap: "round",
  13128. lineWidth: e.lineWidth
  13129. },
  13130. zlevel: e.zlevel,
  13131. z: 10001
  13132. })).animateShape(!0).when(1e3, {
  13133. endAngle: 3 * $g / 2
  13134. }).start("circularInOut"), r.animateShape(!0).when(1e3, {
  13135. startAngle: 3 * $g / 2
  13136. }).delay(300).start("circularInOut"), n.add(r)), n.resize = function () {
  13137. var n = o.getBoundingRect().width,
  13138. s = e.showSpinner ? e.spinnerRadius : 0,
  13139. l = (t.getWidth() - 2 * s - (e.showSpinner && n ? 10 : 0) - n) / 2 - (e.showSpinner && n ? 0 : 5 + n / 2) + (e.showSpinner ? 0 : n / 2) + (n ? 0 : s),
  13140. u = t.getHeight() / 2;
  13141. e.showSpinner && r.setShape({
  13142. cx: l,
  13143. cy: u
  13144. }), a.setShape({
  13145. x: l - s,
  13146. y: u - s,
  13147. width: 2 * s,
  13148. height: 2 * s
  13149. }), i.setShape({
  13150. x: 0,
  13151. y: 0,
  13152. width: t.getWidth(),
  13153. height: t.getHeight()
  13154. })
  13155. }, n.resize(), n
  13156. })), Mm({
  13157. type: ll,
  13158. event: ll,
  13159. update: ll
  13160. }, bt), Mm({
  13161. type: ul,
  13162. event: ul,
  13163. update: ul
  13164. }, bt), Mm({
  13165. type: hl,
  13166. event: hl,
  13167. update: hl
  13168. }, bt), Mm({
  13169. type: cl,
  13170. event: cl,
  13171. update: cl
  13172. }, bt), Mm({
  13173. type: pl,
  13174. event: pl,
  13175. update: pl
  13176. }, bt), mm("light", fy), mm("dark", xy);
  13177. var Om = [],
  13178. Rm = {
  13179. registerPreprocessor: xm,
  13180. registerProcessor: _m,
  13181. registerPostInit: bm,
  13182. registerPostUpdate: wm,
  13183. registerUpdateLifecycle: Sm,
  13184. registerAction: Mm,
  13185. registerCoordinateSystem: Im,
  13186. registerLayout: Tm,
  13187. registerVisual: Cm,
  13188. registerTransform: Pm,
  13189. registerLoading: km,
  13190. registerMap: Lm,
  13191. registerImpl: function (t, e) {
  13192. _v[t] = e
  13193. },
  13194. PRIORITY: Mv,
  13195. ComponentModel: Rp,
  13196. ComponentView: Tg,
  13197. SeriesModel: mg,
  13198. ChartView: kg,
  13199. registerComponentModel: function (t) {
  13200. Rp.registerClass(t)
  13201. },
  13202. registerComponentView: function (t) {
  13203. Tg.registerClass(t)
  13204. },
  13205. registerSeriesModel: function (t) {
  13206. mg.registerClass(t)
  13207. },
  13208. registerChartView: function (t) {
  13209. kg.registerClass(t)
  13210. },
  13211. registerSubTypeDefaulter: function (t, e) {
  13212. Rp.registerSubTypeDefaulter(t, e)
  13213. },
  13214. registerPainter: function (t, e) {
  13215. Wr(t, e)
  13216. }
  13217. };
  13218. function Nm(t) {
  13219. Y(t) ? E(t, (function (t) {
  13220. Nm(t)
  13221. })) : P(Om, t) >= 0 || (Om.push(t), X(t) && (t = {
  13222. install: t
  13223. }), t.install(Rm))
  13224. }
  13225. function Em(t) {
  13226. return null == t ? 0 : t.length || 1
  13227. }
  13228. function zm(t) {
  13229. return t
  13230. }
  13231. var Vm = function () {
  13232. function t(t, e, n, i, r, o) {
  13233. this._old = t, this._new = e, this._oldKeyGetter = n || zm, this._newKeyGetter = i || zm, this.context = r, this._diffModeMultiple = "multiple" === o
  13234. }
  13235. return t.prototype.add = function (t) {
  13236. return this._add = t, this
  13237. }, t.prototype.update = function (t) {
  13238. return this._update = t, this
  13239. }, t.prototype.updateManyToOne = function (t) {
  13240. return this._updateManyToOne = t, this
  13241. }, t.prototype.updateOneToMany = function (t) {
  13242. return this._updateOneToMany = t, this
  13243. }, t.prototype.updateManyToMany = function (t) {
  13244. return this._updateManyToMany = t, this
  13245. }, t.prototype.remove = function (t) {
  13246. return this._remove = t, this
  13247. }, t.prototype.execute = function () {
  13248. this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]()
  13249. }, t.prototype._executeOneToOne = function () {
  13250. var t = this._old,
  13251. e = this._new,
  13252. n = {},
  13253. i = new Array(t.length),
  13254. r = new Array(e.length);
  13255. this._initIndexMap(t, null, i, "_oldKeyGetter"), this._initIndexMap(e, n, r, "_newKeyGetter");
  13256. for (var o = 0; o < t.length; o++) {
  13257. var a = i[o],
  13258. s = n[a],
  13259. l = Em(s);
  13260. if (l > 1) {
  13261. var u = s.shift();
  13262. 1 === s.length && (n[a] = s[0]), this._update && this._update(u, o)
  13263. } else 1 === l ? (n[a] = null, this._update && this._update(s, o)) : this._remove && this._remove(o)
  13264. }
  13265. this._performRestAdd(r, n)
  13266. }, t.prototype._executeMultiple = function () {
  13267. var t = this._old,
  13268. e = this._new,
  13269. n = {},
  13270. i = {},
  13271. r = [],
  13272. o = [];
  13273. this._initIndexMap(t, n, r, "_oldKeyGetter"), this._initIndexMap(e, i, o, "_newKeyGetter");
  13274. for (var a = 0; a < r.length; a++) {
  13275. var s = r[a],
  13276. l = n[s],
  13277. u = i[s],
  13278. h = Em(l),
  13279. c = Em(u);
  13280. if (h > 1 && 1 === c) this._updateManyToOne && this._updateManyToOne(u, l), i[s] = null;
  13281. else if (1 === h && c > 1) this._updateOneToMany && this._updateOneToMany(u, l), i[s] = null;
  13282. else if (1 === h && 1 === c) this._update && this._update(u, l), i[s] = null;
  13283. else if (h > 1 && c > 1) this._updateManyToMany && this._updateManyToMany(u, l), i[s] = null;
  13284. else if (h > 1)
  13285. for (var p = 0; p < h; p++) this._remove && this._remove(l[p]);
  13286. else this._remove && this._remove(l)
  13287. }
  13288. this._performRestAdd(o, i)
  13289. }, t.prototype._performRestAdd = function (t, e) {
  13290. for (var n = 0; n < t.length; n++) {
  13291. var i = t[n],
  13292. r = e[i],
  13293. o = Em(r);
  13294. if (o > 1)
  13295. for (var a = 0; a < o; a++) this._add && this._add(r[a]);
  13296. else 1 === o && this._add && this._add(r);
  13297. e[i] = null
  13298. }
  13299. }, t.prototype._initIndexMap = function (t, e, n, i) {
  13300. for (var r = this._diffModeMultiple, o = 0; o < t.length; o++) {
  13301. var a = "_ec_" + this[i](t[o], o);
  13302. if (r || (n[o] = a), e) {
  13303. var s = e[a],
  13304. l = Em(s);
  13305. 0 === l ? (e[a] = o, r && n.push(a)) : 1 === l ? e[a] = [s, o] : s.push(o)
  13306. }
  13307. }
  13308. }, t
  13309. }(),
  13310. Bm = function () {
  13311. function t(t, e) {
  13312. this._encode = t, this._schema = e
  13313. }
  13314. return t.prototype.get = function () {
  13315. return {
  13316. fullDimensions: this._getFullDimensionNames(),
  13317. encode: this._encode
  13318. }
  13319. }, t.prototype._getFullDimensionNames = function () {
  13320. return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames
  13321. }, t
  13322. }();
  13323. function Fm(t, e) {
  13324. return t.hasOwnProperty(e) || (t[e] = []), t[e]
  13325. }
  13326. function Gm(t) {
  13327. return "category" === t ? "ordinal" : "time" === t ? "time" : "float"
  13328. }
  13329. var Wm = function (t) {
  13330. this.otherDims = {}, null != t && A(this, t)
  13331. },
  13332. Hm = Oo(),
  13333. Ym = {
  13334. float: "f",
  13335. int: "i",
  13336. ordinal: "o",
  13337. number: "n",
  13338. time: "t"
  13339. },
  13340. Xm = function () {
  13341. function t(t) {
  13342. this.dimensions = t.dimensions, this._dimOmitted = t.dimensionOmitted, this.source = t.source, this._fullDimCount = t.fullDimensionCount, this._updateDimOmitted(t.dimensionOmitted)
  13343. }
  13344. return t.prototype.isDimensionOmitted = function () {
  13345. return this._dimOmitted
  13346. }, t.prototype._updateDimOmitted = function (t) {
  13347. this._dimOmitted = t, t && (this._dimNameMap || (this._dimNameMap = jm(this.source)))
  13348. }, t.prototype.getSourceDimensionIndex = function (t) {
  13349. return rt(this._dimNameMap.get(t), -1)
  13350. }, t.prototype.getSourceDimension = function (t) {
  13351. var e = this.source.dimensionsDefine;
  13352. if (e) return e[t]
  13353. }, t.prototype.makeStoreSchema = function () {
  13354. for (var t = this._fullDimCount, e = nf(this.source), n = !qm(t), i = "", r = [], o = 0, a = 0; o < t; o++) {
  13355. var s = void 0,
  13356. l = void 0,
  13357. u = void 0,
  13358. h = this.dimensions[a];
  13359. if (h && h.storeDimIndex === o) s = e ? h.name : null, l = h.type, u = h.ordinalMeta, a++;
  13360. else {
  13361. var c = this.getSourceDimension(o);
  13362. c && (s = e ? c.name : null, l = c.type)
  13363. }
  13364. r.push({
  13365. property: s,
  13366. type: l,
  13367. ordinalMeta: u
  13368. }), !e || null == s || h && h.isCalculationCoord || (i += n ? s.replace(/\`/g, "`1").replace(/\$/g, "`2") : s), i += "$", i += Ym[l] || "f", u && (i += u.uid), i += "$"
  13369. }
  13370. var p = this.source;
  13371. return {
  13372. dimensions: r,
  13373. hash: [p.seriesLayoutBy, p.startIndex, i].join("$$")
  13374. }
  13375. }, t.prototype.makeOutputDimensionNames = function () {
  13376. for (var t = [], e = 0, n = 0; e < this._fullDimCount; e++) {
  13377. var i = void 0,
  13378. r = this.dimensions[n];
  13379. if (r && r.storeDimIndex === e) r.isCalculationCoord || (i = r.name), n++;
  13380. else {
  13381. var o = this.getSourceDimension(e);
  13382. o && (i = o.name)
  13383. }
  13384. t.push(i)
  13385. }
  13386. return t
  13387. }, t.prototype.appendCalculationDimension = function (t) {
  13388. this.dimensions.push(t), t.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0)
  13389. }, t
  13390. }();
  13391. function Um(t) {
  13392. return t instanceof Xm
  13393. }
  13394. function Zm(t) {
  13395. for (var e = yt(), n = 0; n < (t || []).length; n++) {
  13396. var i = t[n],
  13397. r = q(i) ? i.name : i;
  13398. null != r && null == e.get(r) && e.set(r, n)
  13399. }
  13400. return e
  13401. }
  13402. function jm(t) {
  13403. var e = Hm(t);
  13404. return e.dimNameMap || (e.dimNameMap = Zm(t.dimensionsDefine))
  13405. }
  13406. function qm(t) {
  13407. return t > 30
  13408. }
  13409. var Km, $m, Jm, Qm, tx, ex, nx, ix = q,
  13410. rx = z,
  13411. ox = "undefined" == typeof Int32Array ? Array : Int32Array,
  13412. ax = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"],
  13413. sx = ["_approximateExtent"],
  13414. lx = function () {
  13415. function t(t, e) {
  13416. var n;
  13417. this.type = "list", this._dimOmitted = !1, this._nameList = [], this._idList = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this._itemLayouts = [], this._graphicEls = [], this._approximateExtent = {}, this._calculationInfo = {}, this.hasItemOption = !1, this.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "lttbDownSample", "map"], this.CHANGABLE_METHODS = ["filterSelf", "selectRange"], this.DOWNSAMPLE_METHODS = ["downSample", "lttbDownSample"];
  13418. var i = !1;
  13419. Um(t) ? (n = t.dimensions, this._dimOmitted = t.isDimensionOmitted(), this._schema = t) : (i = !0, n = t), n = n || ["x", "y"];
  13420. for (var r = {}, o = [], a = {}, s = !1, l = {}, u = 0; u < n.length; u++) {
  13421. var h = n[u],
  13422. c = U(h) ? new Wm({
  13423. name: h
  13424. }) : h instanceof Wm ? h : new Wm(h),
  13425. p = c.name;
  13426. c.type = c.type || "float", c.coordDim || (c.coordDim = p, c.coordDimIndex = 0);
  13427. var d = c.otherDims = c.otherDims || {};
  13428. o.push(p), r[p] = c, null != l[p] && (s = !0), c.createInvertedIndices && (a[p] = []), 0 === d.itemName && (this._nameDimIdx = u), 0 === d.itemId && (this._idDimIdx = u), i && (c.storeDimIndex = u)
  13429. }
  13430. if (this.dimensions = o, this._dimInfos = r, this._initGetDimensionInfo(s), this.hostModel = e, this._invertedIndicesMap = a, this._dimOmitted) {
  13431. var f = this._dimIdxToName = yt();
  13432. E(o, (function (t) {
  13433. f.set(r[t].storeDimIndex, t)
  13434. }))
  13435. }
  13436. }
  13437. return t.prototype.getDimension = function (t) {
  13438. var e = this._recognizeDimIndex(t);
  13439. if (null == e) return t;
  13440. if (e = t, !this._dimOmitted) return this.dimensions[e];
  13441. var n = this._dimIdxToName.get(e);
  13442. if (null != n) return n;
  13443. var i = this._schema.getSourceDimension(e);
  13444. return i ? i.name : void 0
  13445. }, t.prototype.getDimensionIndex = function (t) {
  13446. var e = this._recognizeDimIndex(t);
  13447. if (null != e) return e;
  13448. if (null == t) return -1;
  13449. var n = this._getDimInfo(t);
  13450. return n ? n.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(t) : -1
  13451. }, t.prototype._recognizeDimIndex = function (t) {
  13452. if (j(t) || null != t && !isNaN(t) && !this._getDimInfo(t) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(t) < 0)) return +t
  13453. }, t.prototype._getStoreDimIndex = function (t) {
  13454. var e = this.getDimensionIndex(t);
  13455. return e
  13456. }, t.prototype.getDimensionInfo = function (t) {
  13457. return this._getDimInfo(this.getDimension(t))
  13458. }, t.prototype._initGetDimensionInfo = function (t) {
  13459. var e = this._dimInfos;
  13460. this._getDimInfo = t ? function (t) {
  13461. return e.hasOwnProperty(t) ? e[t] : void 0
  13462. } : function (t) {
  13463. return e[t]
  13464. }
  13465. }, t.prototype.getDimensionsOnCoord = function () {
  13466. return this._dimSummary.dataDimsOnCoord.slice()
  13467. }, t.prototype.mapDimension = function (t, e) {
  13468. var n = this._dimSummary;
  13469. if (null == e) return n.encodeFirstDimNotExtra[t];
  13470. var i = n.encode[t];
  13471. return i ? i[e] : null
  13472. }, t.prototype.mapDimensionsAll = function (t) {
  13473. return (this._dimSummary.encode[t] || []).slice()
  13474. }, t.prototype.getStore = function () {
  13475. return this._store
  13476. }, t.prototype.initData = function (t, e, n) {
  13477. var i, r = this;
  13478. if (t instanceof Zf && (i = t), !i) {
  13479. var o = this.dimensions,
  13480. a = Kd(t) || N(t) ? new rf(t, o.length) : t;
  13481. i = new Zf;
  13482. var s = rx(o, (function (t) {
  13483. return {
  13484. type: r._dimInfos[t].type,
  13485. property: t
  13486. }
  13487. }));
  13488. i.initData(a, s, n)
  13489. }
  13490. this._store = i, this._nameList = (e || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, i.count()), this._dimSummary = function (t, e) {
  13491. var n = {},
  13492. i = n.encode = {},
  13493. r = yt(),
  13494. o = [],
  13495. a = [],
  13496. s = {};
  13497. E(t.dimensions, (function (e) {
  13498. var n, l = t.getDimensionInfo(e),
  13499. u = l.coordDim;
  13500. if (u) {
  13501. var h = l.coordDimIndex;
  13502. Fm(i, u)[h] = e, l.isExtraCoord || (r.set(u, 1), "ordinal" !== (n = l.type) && "time" !== n && (o[0] = e), Fm(s, u)[h] = t.getDimensionIndex(l.name)), l.defaultTooltip && a.push(e)
  13503. }
  13504. Vp.each((function (t, e) {
  13505. var n = Fm(i, e),
  13506. r = l.otherDims[e];
  13507. null != r && !1 !== r && (n[r] = l.name)
  13508. }))
  13509. }));
  13510. var l = [],
  13511. u = {};
  13512. r.each((function (t, e) {
  13513. var n = i[e];
  13514. u[e] = n[0], l = l.concat(n)
  13515. })), n.dataDimsOnCoord = l, n.dataDimIndicesOnCoord = z(l, (function (e) {
  13516. return t.getDimensionInfo(e).storeDimIndex
  13517. })), n.encodeFirstDimNotExtra = u;
  13518. var h = i.label;
  13519. h && h.length && (o = h.slice());
  13520. var c = i.tooltip;
  13521. return c && c.length ? a = c.slice() : a.length || (a = o.slice()), i.defaultedLabel = o, i.defaultedTooltip = a, n.userOutput = new Bm(s, e), n
  13522. }(this, this._schema), this.userOutput = this._dimSummary.userOutput
  13523. }, t.prototype.appendData = function (t) {
  13524. var e = this._store.appendData(t);
  13525. this._doInit(e[0], e[1])
  13526. }, t.prototype.appendValues = function (t, e) {
  13527. var n = this._store.appendValues(t, e.length),
  13528. i = n.start,
  13529. r = n.end,
  13530. o = this._shouldMakeIdFromName();
  13531. if (this._updateOrdinalMeta(), e)
  13532. for (var a = i; a < r; a++) {
  13533. var s = a - i;
  13534. this._nameList[a] = e[s], o && nx(this, a)
  13535. }
  13536. }, t.prototype._updateOrdinalMeta = function () {
  13537. for (var t = this._store, e = this.dimensions, n = 0; n < e.length; n++) {
  13538. var i = this._dimInfos[e[n]];
  13539. i.ordinalMeta && t.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta)
  13540. }
  13541. }, t.prototype._shouldMakeIdFromName = function () {
  13542. var t = this._store.getProvider();
  13543. return null == this._idDimIdx && t.getSource().sourceFormat !== Hp && !t.fillStorage
  13544. }, t.prototype._doInit = function (t, e) {
  13545. if (!(t >= e)) {
  13546. var n = this._store.getProvider();
  13547. this._updateOrdinalMeta();
  13548. var i = this._nameList,
  13549. r = this._idList;
  13550. if (n.getSource().sourceFormat === Bp && !n.pure)
  13551. for (var o = [], a = t; a < e; a++) {
  13552. var s = n.getItem(a, o);
  13553. if (!this.hasItemOption && Io(s) && (this.hasItemOption = !0), s) {
  13554. var l = s.name;
  13555. null == i[a] && null != l && (i[a] = Ao(l, null));
  13556. var u = s.id;
  13557. null == r[a] && null != u && (r[a] = Ao(u, null))
  13558. }
  13559. }
  13560. if (this._shouldMakeIdFromName())
  13561. for (a = t; a < e; a++) nx(this, a);
  13562. Km(this)
  13563. }
  13564. }, t.prototype.getApproximateExtent = function (t) {
  13565. return this._approximateExtent[t] || this._store.getDataExtent(this._getStoreDimIndex(t))
  13566. }, t.prototype.setApproximateExtent = function (t, e) {
  13567. e = this.getDimension(e), this._approximateExtent[e] = t.slice()
  13568. }, t.prototype.getCalculationInfo = function (t) {
  13569. return this._calculationInfo[t]
  13570. }, t.prototype.setCalculationInfo = function (t, e) {
  13571. ix(t) ? A(this._calculationInfo, t) : this._calculationInfo[t] = e
  13572. }, t.prototype.getName = function (t) {
  13573. var e = this.getRawIndex(t),
  13574. n = this._nameList[e];
  13575. return null == n && null != this._nameDimIdx && (n = Jm(this, this._nameDimIdx, e)), null == n && (n = ""), n
  13576. }, t.prototype._getCategory = function (t, e) {
  13577. var n = this._store.get(t, e),
  13578. i = this._store.getOrdinalMeta(t);
  13579. return i ? i.categories[n] : n
  13580. }, t.prototype.getId = function (t) {
  13581. return $m(this, this.getRawIndex(t))
  13582. }, t.prototype.count = function () {
  13583. return this._store.count()
  13584. }, t.prototype.get = function (t, e) {
  13585. var n = this._store,
  13586. i = this._dimInfos[t];
  13587. if (i) return n.get(i.storeDimIndex, e)
  13588. }, t.prototype.getByRawIndex = function (t, e) {
  13589. var n = this._store,
  13590. i = this._dimInfos[t];
  13591. if (i) return n.getByRawIndex(i.storeDimIndex, e)
  13592. }, t.prototype.getIndices = function () {
  13593. return this._store.getIndices()
  13594. }, t.prototype.getDataExtent = function (t) {
  13595. return this._store.getDataExtent(this._getStoreDimIndex(t))
  13596. }, t.prototype.getSum = function (t) {
  13597. return this._store.getSum(this._getStoreDimIndex(t))
  13598. }, t.prototype.getMedian = function (t) {
  13599. return this._store.getMedian(this._getStoreDimIndex(t))
  13600. }, t.prototype.getValues = function (t, e) {
  13601. var n = this,
  13602. i = this._store;
  13603. return Y(t) ? i.getValues(rx(t, (function (t) {
  13604. return n._getStoreDimIndex(t)
  13605. })), e) : i.getValues(t)
  13606. }, t.prototype.hasValue = function (t) {
  13607. for (var e = this._dimSummary.dataDimIndicesOnCoord, n = 0, i = e.length; n < i; n++)
  13608. if (isNaN(this._store.get(e[n], t))) return !1;
  13609. return !0
  13610. }, t.prototype.indexOfName = function (t) {
  13611. for (var e = 0, n = this._store.count(); e < n; e++)
  13612. if (this.getName(e) === t) return e;
  13613. return -1
  13614. }, t.prototype.getRawIndex = function (t) {
  13615. return this._store.getRawIndex(t)
  13616. }, t.prototype.indexOfRawIndex = function (t) {
  13617. return this._store.indexOfRawIndex(t)
  13618. }, t.prototype.rawIndexOf = function (t, e) {
  13619. var n = t && this._invertedIndicesMap[t];
  13620. var i = n[e];
  13621. return null == i || isNaN(i) ? -1 : i
  13622. }, t.prototype.indicesOfNearest = function (t, e, n) {
  13623. return this._store.indicesOfNearest(this._getStoreDimIndex(t), e, n)
  13624. }, t.prototype.each = function (t, e, n) {
  13625. X(t) && (n = e, e = t, t = []);
  13626. var i = n || this,
  13627. r = rx(Qm(t), this._getStoreDimIndex, this);
  13628. this._store.each(r, i ? W(e, i) : e)
  13629. }, t.prototype.filterSelf = function (t, e, n) {
  13630. X(t) && (n = e, e = t, t = []);
  13631. var i = n || this,
  13632. r = rx(Qm(t), this._getStoreDimIndex, this);
  13633. return this._store = this._store.filter(r, i ? W(e, i) : e), this
  13634. }, t.prototype.selectRange = function (t) {
  13635. var e = this,
  13636. n = {};
  13637. return E(G(t), (function (i) {
  13638. var r = e._getStoreDimIndex(i);
  13639. n[r] = t[i]
  13640. })), this._store = this._store.selectRange(n), this
  13641. }, t.prototype.mapArray = function (t, e, n) {
  13642. X(t) && (n = e, e = t, t = []), n = n || this;
  13643. var i = [];
  13644. return this.each(t, (function () {
  13645. i.push(e && e.apply(this, arguments))
  13646. }), n), i
  13647. }, t.prototype.map = function (t, e, n, i) {
  13648. var r = n || i || this,
  13649. o = rx(Qm(t), this._getStoreDimIndex, this),
  13650. a = ex(this);
  13651. return a._store = this._store.map(o, r ? W(e, r) : e), a
  13652. }, t.prototype.modify = function (t, e, n, i) {
  13653. var r = n || i || this;
  13654. var o = rx(Qm(t), this._getStoreDimIndex, this);
  13655. this._store.modify(o, r ? W(e, r) : e)
  13656. }, t.prototype.downSample = function (t, e, n, i) {
  13657. var r = ex(this);
  13658. return r._store = this._store.downSample(this._getStoreDimIndex(t), e, n, i), r
  13659. }, t.prototype.lttbDownSample = function (t, e) {
  13660. var n = ex(this);
  13661. return n._store = this._store.lttbDownSample(this._getStoreDimIndex(t), e), n
  13662. }, t.prototype.getRawDataItem = function (t) {
  13663. return this._store.getRawDataItem(t)
  13664. }, t.prototype.getItemModel = function (t) {
  13665. var e = this.hostModel,
  13666. n = this.getRawDataItem(t);
  13667. return new Mc(n, e, e && e.ecModel)
  13668. }, t.prototype.diff = function (t) {
  13669. var e = this;
  13670. return new Vm(t ? t.getStore().getIndices() : [], this.getStore().getIndices(), (function (e) {
  13671. return $m(t, e)
  13672. }), (function (t) {
  13673. return $m(e, t)
  13674. }))
  13675. }, t.prototype.getVisual = function (t) {
  13676. var e = this._visual;
  13677. return e && e[t]
  13678. }, t.prototype.setVisual = function (t, e) {
  13679. this._visual = this._visual || {}, ix(t) ? A(this._visual, t) : this._visual[t] = e
  13680. }, t.prototype.getItemVisual = function (t, e) {
  13681. var n = this._itemVisuals[t],
  13682. i = n && n[e];
  13683. return null == i ? this.getVisual(e) : i
  13684. }, t.prototype.hasItemVisual = function () {
  13685. return this._itemVisuals.length > 0
  13686. }, t.prototype.ensureUniqueItemVisual = function (t, e) {
  13687. var n = this._itemVisuals,
  13688. i = n[t];
  13689. i || (i = n[t] = {});
  13690. var r = i[e];
  13691. return null == r && (Y(r = this.getVisual(e)) ? r = r.slice() : ix(r) && (r = A({}, r)), i[e] = r), r
  13692. }, t.prototype.setItemVisual = function (t, e, n) {
  13693. var i = this._itemVisuals[t] || {};
  13694. this._itemVisuals[t] = i, ix(e) ? A(i, e) : i[e] = n
  13695. }, t.prototype.clearAllVisual = function () {
  13696. this._visual = {}, this._itemVisuals = []
  13697. }, t.prototype.setLayout = function (t, e) {
  13698. ix(t) ? A(this._layout, t) : this._layout[t] = e
  13699. }, t.prototype.getLayout = function (t) {
  13700. return this._layout[t]
  13701. }, t.prototype.getItemLayout = function (t) {
  13702. return this._itemLayouts[t]
  13703. }, t.prototype.setItemLayout = function (t, e, n) {
  13704. this._itemLayouts[t] = n ? A(this._itemLayouts[t] || {}, e) : e
  13705. }, t.prototype.clearItemLayouts = function () {
  13706. this._itemLayouts.length = 0
  13707. }, t.prototype.setItemGraphicEl = function (t, e) {
  13708. var n = this.hostModel && this.hostModel.seriesIndex;
  13709. tl(n, this.dataType, t, e), this._graphicEls[t] = e
  13710. }, t.prototype.getItemGraphicEl = function (t) {
  13711. return this._graphicEls[t]
  13712. }, t.prototype.eachItemGraphicEl = function (t, e) {
  13713. E(this._graphicEls, (function (n, i) {
  13714. n && t && t.call(e, n, i)
  13715. }))
  13716. }, t.prototype.cloneShallow = function (e) {
  13717. return e || (e = new t(this._schema ? this._schema : rx(this.dimensions, this._getDimInfo, this), this.hostModel)), tx(e, this), e._store = this._store, e
  13718. }, t.prototype.wrapMethod = function (t, e) {
  13719. var n = this[t];
  13720. X(n) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(t), this[t] = function () {
  13721. var t = n.apply(this, arguments);
  13722. return e.apply(this, [t].concat(at(arguments)))
  13723. })
  13724. }, t.internalField = (Km = function (t) {
  13725. var e = t._invertedIndicesMap;
  13726. E(e, (function (n, i) {
  13727. var r = t._dimInfos[i],
  13728. o = r.ordinalMeta,
  13729. a = t._store;
  13730. if (o) {
  13731. n = e[i] = new ox(o.categories.length);
  13732. for (var s = 0; s < n.length; s++) n[s] = -1;
  13733. for (s = 0; s < a.count(); s++) n[a.get(r.storeDimIndex, s)] = s
  13734. }
  13735. }))
  13736. }, Jm = function (t, e, n) {
  13737. return Ao(t._getCategory(e, n), null)
  13738. }, $m = function (t, e) {
  13739. var n = t._idList[e];
  13740. return null == n && null != t._idDimIdx && (n = Jm(t, t._idDimIdx, e)), null == n && (n = "e\0\0" + e), n
  13741. }, Qm = function (t) {
  13742. return Y(t) || (t = null != t ? [t] : []), t
  13743. }, ex = function (e) {
  13744. var n = new t(e._schema ? e._schema : rx(e.dimensions, e._getDimInfo, e), e.hostModel);
  13745. return tx(n, e), n
  13746. }, tx = function (t, e) {
  13747. E(ax.concat(e.__wrappedMethods || []), (function (n) {
  13748. e.hasOwnProperty(n) && (t[n] = e[n])
  13749. })), t.__wrappedMethods = e.__wrappedMethods, E(sx, (function (n) {
  13750. t[n] = T(e[n])
  13751. })), t._calculationInfo = A({}, e._calculationInfo)
  13752. }, void(nx = function (t, e) {
  13753. var n = t._nameList,
  13754. i = t._idList,
  13755. r = t._nameDimIdx,
  13756. o = t._idDimIdx,
  13757. a = n[e],
  13758. s = i[e];
  13759. if (null == a && null != r && (n[e] = a = Jm(t, r, e)), null == s && null != o && (i[e] = s = Jm(t, o, e)), null == s && null != a) {
  13760. var l = t._nameRepeatCount,
  13761. u = l[a] = (l[a] || 0) + 1;
  13762. s = a, u > 1 && (s += "__ec__" + u), i[e] = s
  13763. }
  13764. })), t
  13765. }();
  13766. function ux(t, e) {
  13767. Kd(t) || (t = Jd(t));
  13768. var n = (e = e || {}).coordDimensions || [],
  13769. i = e.dimensionsDefine || t.dimensionsDefine || [],
  13770. r = yt(),
  13771. o = [],
  13772. a = function (t, e, n, i) {
  13773. var r = Math.max(t.dimensionsDetectedCount || 1, e.length, n.length, i || 0);
  13774. return E(e, (function (t) {
  13775. var e;
  13776. q(t) && (e = t.dimsDef) && (r = Math.max(r, e.length))
  13777. })), r
  13778. }(t, n, i, e.dimensionsCount),
  13779. s = e.canOmitUnusedDimensions && qm(a),
  13780. l = i === t.dimensionsDefine,
  13781. u = l ? jm(t) : Zm(i),
  13782. h = e.encodeDefine;
  13783. !h && e.encodeDefaulter && (h = e.encodeDefaulter(t, a));
  13784. for (var c = yt(h), p = new Wf(a), d = 0; d < p.length; d++) p[d] = -1;
  13785. function f(t) {
  13786. var e = p[t];
  13787. if (e < 0) {
  13788. var n = i[t],
  13789. r = q(n) ? n : {
  13790. name: n
  13791. },
  13792. a = new Wm,
  13793. s = r.name;
  13794. null != s && null != u.get(s) && (a.name = a.displayName = s), null != r.type && (a.type = r.type), null != r.displayName && (a.displayName = r.displayName);
  13795. var l = o.length;
  13796. return p[t] = l, a.storeDimIndex = t, o.push(a), a
  13797. }
  13798. return o[e]
  13799. }
  13800. if (!s)
  13801. for (d = 0; d < a; d++) f(d);
  13802. c.each((function (t, e) {
  13803. var n = bo(t).slice();
  13804. if (1 === n.length && !U(n[0]) && n[0] < 0) c.set(e, !1);
  13805. else {
  13806. var i = c.set(e, []);
  13807. E(n, (function (t, n) {
  13808. var r = U(t) ? u.get(t) : t;
  13809. null != r && r < a && (i[n] = r, y(f(r), e, n))
  13810. }))
  13811. }
  13812. }));
  13813. var g = 0;
  13814. function y(t, e, n) {
  13815. null != Vp.get(e) ? t.otherDims[e] = n : (t.coordDim = e, t.coordDimIndex = n, r.set(e, !0))
  13816. }
  13817. E(n, (function (t) {
  13818. var e, n, i, r;
  13819. if (U(t)) e = t, r = {};
  13820. else {
  13821. e = (r = t).name;
  13822. var o = r.ordinalMeta;
  13823. r.ordinalMeta = null, (r = A({}, r)).ordinalMeta = o, n = r.dimsDef, i = r.otherDims, r.name = r.coordDim = r.coordDimIndex = r.dimsDef = r.otherDims = null
  13824. }
  13825. var s = c.get(e);
  13826. if (!1 !== s) {
  13827. if (!(s = bo(s)).length)
  13828. for (var u = 0; u < (n && n.length || 1); u++) {
  13829. for (; g < a && null != f(g).coordDim;) g++;
  13830. g < a && s.push(g++)
  13831. }
  13832. E(s, (function (t, o) {
  13833. var a = f(t);
  13834. if (l && null != r.type && (a.type = r.type), y(k(a, r), e, o), null == a.name && n) {
  13835. var s = n[o];
  13836. !q(s) && (s = {
  13837. name: s
  13838. }), a.name = a.displayName = s.name, a.defaultTooltip = s.defaultTooltip
  13839. }
  13840. i && k(a.otherDims, i)
  13841. }))
  13842. }
  13843. }));
  13844. var v = e.generateCoord,
  13845. m = e.generateCoordCount,
  13846. x = null != m;
  13847. m = v ? m || 1 : 0;
  13848. var _ = v || "value";
  13849. function b(t) {
  13850. null == t.name && (t.name = t.coordDim)
  13851. }
  13852. if (s) E(o, (function (t) {
  13853. b(t)
  13854. })), o.sort((function (t, e) {
  13855. return t.storeDimIndex - e.storeDimIndex
  13856. }));
  13857. else
  13858. for (var w = 0; w < a; w++) {
  13859. var S = f(w);
  13860. null == S.coordDim && (S.coordDim = hx(_, r, x), S.coordDimIndex = 0, (!v || m <= 0) && (S.isExtraCoord = !0), m--), b(S), null != S.type || td(t, w) !== Zp && (!S.isExtraCoord || null == S.otherDims.itemName && null == S.otherDims.seriesName) || (S.type = "ordinal")
  13861. }
  13862. return function (t) {
  13863. for (var e = yt(), n = 0; n < t.length; n++) {
  13864. var i = t[n],
  13865. r = i.name,
  13866. o = e.get(r) || 0;
  13867. o > 0 && (i.name = r + (o - 1)), o++, e.set(r, o)
  13868. }
  13869. }(o), new Xm({
  13870. source: t,
  13871. dimensions: o,
  13872. fullDimensionCount: a,
  13873. dimensionOmitted: s
  13874. })
  13875. }
  13876. function hx(t, e, n) {
  13877. if (n || e.hasKey(t)) {
  13878. for (var i = 0; e.hasKey(t + i);) i++;
  13879. t += i
  13880. }
  13881. return e.set(t, !0), t
  13882. }
  13883. var cx = function (t) {
  13884. this.coordSysDims = [], this.axisMap = yt(), this.categoryAxisMap = yt(), this.coordSysName = t
  13885. };
  13886. var px = {
  13887. cartesian2d: function (t, e, n, i) {
  13888. var r = t.getReferringComponents("xAxis", zo).models[0],
  13889. o = t.getReferringComponents("yAxis", zo).models[0];
  13890. e.coordSysDims = ["x", "y"], n.set("x", r), n.set("y", o), dx(r) && (i.set("x", r), e.firstCategoryDimIndex = 0), dx(o) && (i.set("y", o), null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = 1))
  13891. },
  13892. singleAxis: function (t, e, n, i) {
  13893. var r = t.getReferringComponents("singleAxis", zo).models[0];
  13894. e.coordSysDims = ["single"], n.set("single", r), dx(r) && (i.set("single", r), e.firstCategoryDimIndex = 0)
  13895. },
  13896. polar: function (t, e, n, i) {
  13897. var r = t.getReferringComponents("polar", zo).models[0],
  13898. o = r.findAxisModel("radiusAxis"),
  13899. a = r.findAxisModel("angleAxis");
  13900. e.coordSysDims = ["radius", "angle"], n.set("radius", o), n.set("angle", a), dx(o) && (i.set("radius", o), e.firstCategoryDimIndex = 0), dx(a) && (i.set("angle", a), null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = 1))
  13901. },
  13902. geo: function (t, e, n, i) {
  13903. e.coordSysDims = ["lng", "lat"]
  13904. },
  13905. parallel: function (t, e, n, i) {
  13906. var r = t.ecModel,
  13907. o = r.getComponent("parallel", t.get("parallelIndex")),
  13908. a = e.coordSysDims = o.dimensions.slice();
  13909. E(o.parallelAxisIndex, (function (t, o) {
  13910. var s = r.getComponent("parallelAxis", t),
  13911. l = a[o];
  13912. n.set(l, s), dx(s) && (i.set(l, s), null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = o))
  13913. }))
  13914. }
  13915. };
  13916. function dx(t) {
  13917. return "category" === t.get("type")
  13918. }
  13919. function fx(t, e, n) {
  13920. var i, r, o, a = (n = n || {}).byIndex,
  13921. s = n.stackedCoordDimension;
  13922. ! function (t) {
  13923. return !Um(t.schema)
  13924. }(e) ? (r = e.schema, i = r.dimensions, o = e.store) : i = e;
  13925. var l, u, h, c, p = !(!t || !t.get("stack"));
  13926. if (E(i, (function (t, e) {
  13927. U(t) && (i[e] = t = {
  13928. name: t
  13929. }), p && !t.isExtraCoord && (a || l || !t.ordinalMeta || (l = t), u || "ordinal" === t.type || "time" === t.type || s && s !== t.coordDim || (u = t))
  13930. })), !u || a || l || (a = !0), u) {
  13931. h = "__\0ecstackresult_" + t.id, c = "__\0ecstackedover_" + t.id, l && (l.createInvertedIndices = !0);
  13932. var d = u.coordDim,
  13933. f = u.type,
  13934. g = 0;
  13935. E(i, (function (t) {
  13936. t.coordDim === d && g++
  13937. }));
  13938. var y = {
  13939. name: h,
  13940. coordDim: d,
  13941. coordDimIndex: g,
  13942. type: f,
  13943. isExtraCoord: !0,
  13944. isCalculationCoord: !0,
  13945. storeDimIndex: i.length
  13946. },
  13947. v = {
  13948. name: c,
  13949. coordDim: c,
  13950. coordDimIndex: g + 1,
  13951. type: f,
  13952. isExtraCoord: !0,
  13953. isCalculationCoord: !0,
  13954. storeDimIndex: i.length + 1
  13955. };
  13956. r ? (o && (y.storeDimIndex = o.ensureCalculationDimension(c, f), v.storeDimIndex = o.ensureCalculationDimension(h, f)), r.appendCalculationDimension(y), r.appendCalculationDimension(v)) : (i.push(y), i.push(v))
  13957. }
  13958. return {
  13959. stackedDimension: u && u.name,
  13960. stackedByDimension: l && l.name,
  13961. isStackedByIndex: a,
  13962. stackedOverDimension: c,
  13963. stackResultDimension: h
  13964. }
  13965. }
  13966. function gx(t, e) {
  13967. return !!e && e === t.getCalculationInfo("stackedDimension")
  13968. }
  13969. function yx(t, e) {
  13970. return gx(t, e) ? t.getCalculationInfo("stackResultDimension") : e
  13971. }
  13972. function vx(t, e, n) {
  13973. n = n || {};
  13974. var i, r = e.getSourceManager(),
  13975. o = !1;
  13976. t ? (o = !0, i = Jd(t)) : o = (i = r.getSource()).sourceFormat === Bp;
  13977. var a = function (t) {
  13978. var e = t.get("coordinateSystem"),
  13979. n = new cx(e),
  13980. i = px[e];
  13981. if (i) return i(t, n, n.axisMap, n.categoryAxisMap), n
  13982. }(e),
  13983. s = function (t, e) {
  13984. var n, i = t.get("coordinateSystem"),
  13985. r = xd.get(i);
  13986. return e && e.coordSysDims && (n = z(e.coordSysDims, (function (t) {
  13987. var n = {
  13988. name: t
  13989. },
  13990. i = e.axisMap.get(t);
  13991. if (i) {
  13992. var r = i.get("type");
  13993. n.type = Gm(r)
  13994. }
  13995. return n
  13996. }))), n || (n = r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"]), n
  13997. }(e, a),
  13998. l = n.useEncodeDefaulter,
  13999. u = X(l) ? l : l ? H($p, s, e) : null,
  14000. h = ux(i, {
  14001. coordDimensions: s,
  14002. generateCoord: n.generateCoord,
  14003. encodeDefine: e.getEncode(),
  14004. encodeDefaulter: u,
  14005. canOmitUnusedDimensions: !o
  14006. }),
  14007. c = function (t, e, n) {
  14008. var i, r;
  14009. return n && E(t, (function (t, o) {
  14010. var a = t.coordDim,
  14011. s = n.categoryAxisMap.get(a);
  14012. s && (null == i && (i = o), t.ordinalMeta = s.getOrdinalMeta(), e && (t.createInvertedIndices = !0)), null != t.otherDims.itemName && (r = !0)
  14013. })), r || null == i || (t[i].otherDims.itemName = 0), i
  14014. }(h.dimensions, n.createInvertedIndices, a),
  14015. p = o ? null : r.getSharedDataStore(h),
  14016. d = fx(e, {
  14017. schema: h,
  14018. store: p
  14019. }),
  14020. f = new lx(h, e);
  14021. f.setCalculationInfo(d);
  14022. var g = null != c && function (t) {
  14023. if (t.sourceFormat === Bp) {
  14024. var e = function (t) {
  14025. var e = 0;
  14026. for (; e < t.length && null == t[e];) e++;
  14027. return t[e]
  14028. }(t.data || []);
  14029. return !Y(Mo(e))
  14030. }
  14031. }(i) ? function (t, e, n, i) {
  14032. return i === c ? n : this.defaultDimValueGetter(t, e, n, i)
  14033. } : null;
  14034. return f.hasItemOption = !1, f.initData(o ? i : p, null, g), f
  14035. }
  14036. var mx = function () {
  14037. function t(t) {
  14038. this._setting = t || {}, this._extent = [1 / 0, -1 / 0]
  14039. }
  14040. return t.prototype.getSetting = function (t) {
  14041. return this._setting[t]
  14042. }, t.prototype.unionExtent = function (t) {
  14043. var e = this._extent;
  14044. t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1])
  14045. }, t.prototype.unionExtentFromData = function (t, e) {
  14046. this.unionExtent(t.getApproximateExtent(e))
  14047. }, t.prototype.getExtent = function () {
  14048. return this._extent.slice()
  14049. }, t.prototype.setExtent = function (t, e) {
  14050. var n = this._extent;
  14051. isNaN(t) || (n[0] = t), isNaN(e) || (n[1] = e)
  14052. }, t.prototype.isInExtentRange = function (t) {
  14053. return this._extent[0] <= t && this._extent[1] >= t
  14054. }, t.prototype.isBlank = function () {
  14055. return this._isBlank
  14056. }, t.prototype.setBlank = function (t) {
  14057. this._isBlank = t
  14058. }, t
  14059. }();
  14060. $o(mx);
  14061. var xx = 0,
  14062. _x = function () {
  14063. function t(t) {
  14064. this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this.uid = ++xx
  14065. }
  14066. return t.createByAxisModel = function (e) {
  14067. var n = e.option,
  14068. i = n.data,
  14069. r = i && z(i, bx);
  14070. return new t({
  14071. categories: r,
  14072. needCollect: !r,
  14073. deduplication: !1 !== n.dedplication
  14074. })
  14075. }, t.prototype.getOrdinal = function (t) {
  14076. return this._getOrCreateMap().get(t)
  14077. }, t.prototype.parseAndCollect = function (t) {
  14078. var e, n = this._needCollect;
  14079. if (!U(t) && !n) return t;
  14080. if (n && !this._deduplication) return e = this.categories.length, this.categories[e] = t, e;
  14081. var i = this._getOrCreateMap();
  14082. return null == (e = i.get(t)) && (n ? (e = this.categories.length, this.categories[e] = t, i.set(t, e)) : e = NaN), e
  14083. }, t.prototype._getOrCreateMap = function () {
  14084. return this._map || (this._map = yt(this.categories))
  14085. }, t
  14086. }();
  14087. function bx(t) {
  14088. return q(t) && null != t.value ? t.value : t + ""
  14089. }
  14090. function Sx(t) {
  14091. return "interval" === t.type || "log" === t.type
  14092. }
  14093. function Mx(t, e, n, i) {
  14094. var r = {},
  14095. o = t[1] - t[0],
  14096. a = r.interval = so(o / e, !0);
  14097. null != n && a < n && (a = r.interval = n), null != i && a > i && (a = r.interval = i);
  14098. var s = r.intervalPrecision = Tx(a);
  14099. return function (t, e) {
  14100. !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), Cx(t, 0, e), Cx(t, 1, e), t[0] > t[1] && (t[0] = t[1])
  14101. }(r.niceTickExtent = [Zr(Math.ceil(t[0] / a) * a, s), Zr(Math.floor(t[1] / a) * a, s)], t), r
  14102. }
  14103. function Ix(t) {
  14104. var e = Math.pow(10, ao(t)),
  14105. n = t / e;
  14106. return n ? 2 === n ? n = 3 : 3 === n ? n = 5 : n *= 2 : n = 1, Zr(n * e)
  14107. }
  14108. function Tx(t) {
  14109. return qr(t) + 2
  14110. }
  14111. function Cx(t, e, n) {
  14112. t[e] = Math.max(Math.min(t[e], n[1]), n[0])
  14113. }
  14114. function Dx(t, e) {
  14115. return t >= e[0] && t <= e[1]
  14116. }
  14117. function Ax(t, e) {
  14118. return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0])
  14119. }
  14120. function kx(t, e) {
  14121. return t * (e[1] - e[0]) + e[0]
  14122. }
  14123. var Lx = function (t) {
  14124. function e(e) {
  14125. var n = t.call(this, e) || this;
  14126. n.type = "ordinal";
  14127. var i = n.getSetting("ordinalMeta");
  14128. return i || (i = new _x({})), Y(i) && (i = new _x({
  14129. categories: z(i, (function (t) {
  14130. return q(t) ? t.value : t
  14131. }))
  14132. })), n._ordinalMeta = i, n._extent = n.getSetting("extent") || [0, i.categories.length - 1], n
  14133. }
  14134. return n(e, t), e.prototype.parse = function (t) {
  14135. return null == t ? NaN : U(t) ? this._ordinalMeta.getOrdinal(t) : Math.round(t)
  14136. }, e.prototype.contain = function (t) {
  14137. return Dx(t = this.parse(t), this._extent) && null != this._ordinalMeta.categories[t]
  14138. }, e.prototype.normalize = function (t) {
  14139. return Ax(t = this._getTickNumber(this.parse(t)), this._extent)
  14140. }, e.prototype.scale = function (t) {
  14141. return t = Math.round(kx(t, this._extent)), this.getRawOrdinalNumber(t)
  14142. }, e.prototype.getTicks = function () {
  14143. for (var t = [], e = this._extent, n = e[0]; n <= e[1];) t.push({
  14144. value: n
  14145. }), n++;
  14146. return t
  14147. }, e.prototype.getMinorTicks = function (t) {}, e.prototype.setSortInfo = function (t) {
  14148. if (null != t) {
  14149. for (var e = t.ordinalNumbers, n = this._ordinalNumbersByTick = [], i = this._ticksByOrdinalNumber = [], r = 0, o = this._ordinalMeta.categories.length, a = Math.min(o, e.length); r < a; ++r) {
  14150. var s = e[r];
  14151. n[r] = s, i[s] = r
  14152. }
  14153. for (var l = 0; r < o; ++r) {
  14154. for (; null != i[l];) l++;
  14155. n.push(l), i[l] = r
  14156. }
  14157. } else this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null
  14158. }, e.prototype._getTickNumber = function (t) {
  14159. var e = this._ticksByOrdinalNumber;
  14160. return e && t >= 0 && t < e.length ? e[t] : t
  14161. }, e.prototype.getRawOrdinalNumber = function (t) {
  14162. var e = this._ordinalNumbersByTick;
  14163. return e && t >= 0 && t < e.length ? e[t] : t
  14164. }, e.prototype.getLabel = function (t) {
  14165. if (!this.isBlank()) {
  14166. var e = this.getRawOrdinalNumber(t.value),
  14167. n = this._ordinalMeta.categories[e];
  14168. return null == n ? "" : n + ""
  14169. }
  14170. }, e.prototype.count = function () {
  14171. return this._extent[1] - this._extent[0] + 1
  14172. }, e.prototype.unionExtentFromData = function (t, e) {
  14173. this.unionExtent(t.getApproximateExtent(e))
  14174. }, e.prototype.isInExtentRange = function (t) {
  14175. return t = this._getTickNumber(t), this._extent[0] <= t && this._extent[1] >= t
  14176. }, e.prototype.getOrdinalMeta = function () {
  14177. return this._ordinalMeta
  14178. }, e.prototype.calcNiceTicks = function () {}, e.prototype.calcNiceExtent = function () {}, e.type = "ordinal", e
  14179. }(mx);
  14180. mx.registerClass(Lx);
  14181. var Px = Zr,
  14182. Ox = function (t) {
  14183. function e() {
  14184. var e = null !== t && t.apply(this, arguments) || this;
  14185. return e.type = "interval", e._interval = 0, e._intervalPrecision = 2, e
  14186. }
  14187. return n(e, t), e.prototype.parse = function (t) {
  14188. return t
  14189. }, e.prototype.contain = function (t) {
  14190. return Dx(t, this._extent)
  14191. }, e.prototype.normalize = function (t) {
  14192. return Ax(t, this._extent)
  14193. }, e.prototype.scale = function (t) {
  14194. return kx(t, this._extent)
  14195. }, e.prototype.setExtent = function (t, e) {
  14196. var n = this._extent;
  14197. isNaN(t) || (n[0] = parseFloat(t)), isNaN(e) || (n[1] = parseFloat(e))
  14198. }, e.prototype.unionExtent = function (t) {
  14199. var e = this._extent;
  14200. t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]), this.setExtent(e[0], e[1])
  14201. }, e.prototype.getInterval = function () {
  14202. return this._interval
  14203. }, e.prototype.setInterval = function (t) {
  14204. this._interval = t, this._niceExtent = this._extent.slice(), this._intervalPrecision = Tx(t)
  14205. }, e.prototype.getTicks = function (t) {
  14206. var e = this._interval,
  14207. n = this._extent,
  14208. i = this._niceExtent,
  14209. r = this._intervalPrecision,
  14210. o = [];
  14211. if (!e) return o;
  14212. n[0] < i[0] && (t ? o.push({
  14213. value: Px(i[0] - e, r)
  14214. }) : o.push({
  14215. value: n[0]
  14216. }));
  14217. for (var a = i[0]; a <= i[1] && (o.push({
  14218. value: a
  14219. }), (a = Px(a + e, r)) !== o[o.length - 1].value);)
  14220. if (o.length > 1e4) return [];
  14221. var s = o.length ? o[o.length - 1].value : i[1];
  14222. return n[1] > s && (t ? o.push({
  14223. value: Px(s + e, r)
  14224. }) : o.push({
  14225. value: n[1]
  14226. })), o
  14227. }, e.prototype.getMinorTicks = function (t) {
  14228. for (var e = this.getTicks(!0), n = [], i = this.getExtent(), r = 1; r < e.length; r++) {
  14229. for (var o = e[r], a = e[r - 1], s = 0, l = [], u = (o.value - a.value) / t; s < t - 1;) {
  14230. var h = Px(a.value + (s + 1) * u);
  14231. h > i[0] && h < i[1] && l.push(h), s++
  14232. }
  14233. n.push(l)
  14234. }
  14235. return n
  14236. }, e.prototype.getLabel = function (t, e) {
  14237. if (null == t) return "";
  14238. var n = e && e.precision;
  14239. return null == n ? n = qr(t.value) || 0 : "auto" === n && (n = this._intervalPrecision), pp(Px(t.value, n, !0))
  14240. }, e.prototype.calcNiceTicks = function (t, e, n) {
  14241. t = t || 5;
  14242. var i = this._extent,
  14243. r = i[1] - i[0];
  14244. if (isFinite(r)) {
  14245. r < 0 && (r = -r, i.reverse());
  14246. var o = Mx(i, t, e, n);
  14247. this._intervalPrecision = o.intervalPrecision, this._interval = o.interval, this._niceExtent = o.niceTickExtent
  14248. }
  14249. }, e.prototype.calcNiceExtent = function (t) {
  14250. var e = this._extent;
  14251. if (e[0] === e[1])
  14252. if (0 !== e[0]) {
  14253. var n = Math.abs(e[0]);
  14254. t.fixMax || (e[1] += n / 2), e[0] -= n / 2
  14255. } else e[1] = 1;
  14256. var i = e[1] - e[0];
  14257. isFinite(i) || (e[0] = 0, e[1] = 1), this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval);
  14258. var r = this._interval;
  14259. t.fixMin || (e[0] = Px(Math.floor(e[0] / r) * r)), t.fixMax || (e[1] = Px(Math.ceil(e[1] / r) * r))
  14260. }, e.prototype.setNiceExtent = function (t, e) {
  14261. this._niceExtent = [t, e]
  14262. }, e.type = "interval", e
  14263. }(mx);
  14264. mx.registerClass(Ox);
  14265. var Rx = "undefined" != typeof Float32Array,
  14266. Nx = Rx ? Float32Array : Array;
  14267. function Ex(t) {
  14268. return Y(t) ? Rx ? new Float32Array(t) : t : new Nx(t)
  14269. }
  14270. var zx = "__ec_stack_";
  14271. function Vx(t) {
  14272. return t.get("stack") || zx + t.seriesIndex
  14273. }
  14274. function Bx(t) {
  14275. return t.dim + t.index
  14276. }
  14277. function Fx(t, e) {
  14278. var n = [];
  14279. return e.eachSeriesByType(t, (function (t) {
  14280. Xx(t) && n.push(t)
  14281. })), n
  14282. }
  14283. function Gx(t) {
  14284. var e = function (t) {
  14285. var e = {};
  14286. E(t, (function (t) {
  14287. var n = t.coordinateSystem.getBaseAxis();
  14288. if ("time" === n.type || "value" === n.type)
  14289. for (var i = t.getData(), r = n.dim + "_" + n.index, o = i.getDimensionIndex(i.mapDimension(n.dim)), a = i.getStore(), s = 0, l = a.count(); s < l; ++s) {
  14290. var u = a.get(o, s);
  14291. e[r] ? e[r].push(u) : e[r] = [u]
  14292. }
  14293. }));
  14294. var n = {};
  14295. for (var i in e)
  14296. if (e.hasOwnProperty(i)) {
  14297. var r = e[i];
  14298. if (r) {
  14299. r.sort((function (t, e) {
  14300. return t - e
  14301. }));
  14302. for (var o = null, a = 1; a < r.length; ++a) {
  14303. var s = r[a] - r[a - 1];
  14304. s > 0 && (o = null === o ? s : Math.min(o, s))
  14305. }
  14306. n[i] = o
  14307. }
  14308. } return n
  14309. }(t),
  14310. n = [];
  14311. return E(t, (function (t) {
  14312. var i, r = t.coordinateSystem.getBaseAxis(),
  14313. o = r.getExtent();
  14314. if ("category" === r.type) i = r.getBandWidth();
  14315. else if ("value" === r.type || "time" === r.type) {
  14316. var a = r.dim + "_" + r.index,
  14317. s = e[a],
  14318. l = Math.abs(o[1] - o[0]),
  14319. u = r.scale.getExtent(),
  14320. h = Math.abs(u[1] - u[0]);
  14321. i = s ? l / h * s : l
  14322. } else {
  14323. var c = t.getData();
  14324. i = Math.abs(o[1] - o[0]) / c.count()
  14325. }
  14326. var p = Ur(t.get("barWidth"), i),
  14327. d = Ur(t.get("barMaxWidth"), i),
  14328. f = Ur(t.get("barMinWidth") || (Ux(t) ? .5 : 1), i),
  14329. g = t.get("barGap"),
  14330. y = t.get("barCategoryGap");
  14331. n.push({
  14332. bandWidth: i,
  14333. barWidth: p,
  14334. barMaxWidth: d,
  14335. barMinWidth: f,
  14336. barGap: g,
  14337. barCategoryGap: y,
  14338. axisKey: Bx(r),
  14339. stackId: Vx(t)
  14340. })
  14341. })), Wx(n)
  14342. }
  14343. function Wx(t) {
  14344. var e = {};
  14345. E(t, (function (t, n) {
  14346. var i = t.axisKey,
  14347. r = t.bandWidth,
  14348. o = e[i] || {
  14349. bandWidth: r,
  14350. remainedWidth: r,
  14351. autoWidthCount: 0,
  14352. categoryGap: null,
  14353. gap: "20%",
  14354. stacks: {}
  14355. },
  14356. a = o.stacks;
  14357. e[i] = o;
  14358. var s = t.stackId;
  14359. a[s] || o.autoWidthCount++, a[s] = a[s] || {
  14360. width: 0,
  14361. maxWidth: 0
  14362. };
  14363. var l = t.barWidth;
  14364. l && !a[s].width && (a[s].width = l, l = Math.min(o.remainedWidth, l), o.remainedWidth -= l);
  14365. var u = t.barMaxWidth;
  14366. u && (a[s].maxWidth = u);
  14367. var h = t.barMinWidth;
  14368. h && (a[s].minWidth = h);
  14369. var c = t.barGap;
  14370. null != c && (o.gap = c);
  14371. var p = t.barCategoryGap;
  14372. null != p && (o.categoryGap = p)
  14373. }));
  14374. var n = {};
  14375. return E(e, (function (t, e) {
  14376. n[e] = {};
  14377. var i = t.stacks,
  14378. r = t.bandWidth,
  14379. o = t.categoryGap;
  14380. if (null == o) {
  14381. var a = G(i).length;
  14382. o = Math.max(35 - 4 * a, 15) + "%"
  14383. }
  14384. var s = Ur(o, r),
  14385. l = Ur(t.gap, 1),
  14386. u = t.remainedWidth,
  14387. h = t.autoWidthCount,
  14388. c = (u - s) / (h + (h - 1) * l);
  14389. c = Math.max(c, 0), E(i, (function (t) {
  14390. var e = t.maxWidth,
  14391. n = t.minWidth;
  14392. if (t.width) {
  14393. i = t.width;
  14394. e && (i = Math.min(i, e)), n && (i = Math.max(i, n)), t.width = i, u -= i + l * i, h--
  14395. } else {
  14396. var i = c;
  14397. e && e < i && (i = Math.min(e, u)), n && n > i && (i = n), i !== c && (t.width = i, u -= i + l * i, h--)
  14398. }
  14399. })), c = (u - s) / (h + (h - 1) * l), c = Math.max(c, 0);
  14400. var p, d = 0;
  14401. E(i, (function (t, e) {
  14402. t.width || (t.width = c), p = t, d += t.width * (1 + l)
  14403. })), p && (d -= p.width * l);
  14404. var f = -d / 2;
  14405. E(i, (function (t, i) {
  14406. n[e][i] = n[e][i] || {
  14407. bandWidth: r,
  14408. offset: f,
  14409. width: t.width
  14410. }, f += t.width * (1 + l)
  14411. }))
  14412. })), n
  14413. }
  14414. function Hx(t, e) {
  14415. var n = Fx(t, e),
  14416. i = Gx(n);
  14417. E(n, (function (t) {
  14418. var e = t.getData(),
  14419. n = t.coordinateSystem.getBaseAxis(),
  14420. r = Vx(t),
  14421. o = i[Bx(n)][r],
  14422. a = o.offset,
  14423. s = o.width;
  14424. e.setLayout({
  14425. bandWidth: o.bandWidth,
  14426. offset: a,
  14427. size: s
  14428. })
  14429. }))
  14430. }
  14431. function Yx(t) {
  14432. return {
  14433. seriesType: t,
  14434. plan: Cg(),
  14435. reset: function (t) {
  14436. if (Xx(t)) {
  14437. var e = t.getData(),
  14438. n = t.coordinateSystem,
  14439. i = n.getBaseAxis(),
  14440. r = n.getOtherAxis(i),
  14441. o = e.getDimensionIndex(e.mapDimension(r.dim)),
  14442. a = e.getDimensionIndex(e.mapDimension(i.dim)),
  14443. s = t.get("showBackground", !0),
  14444. l = e.mapDimension(r.dim),
  14445. u = e.getCalculationInfo("stackResultDimension"),
  14446. h = gx(e, l) && !!e.getCalculationInfo("stackedOnSeries"),
  14447. c = r.isHorizontal(),
  14448. p = function (t, e) {
  14449. return e.toGlobalCoord(e.dataToCoord("log" === e.type ? 1 : 0))
  14450. }(0, r),
  14451. d = Ux(t),
  14452. f = t.get("barMinHeight") || 0,
  14453. g = u && e.getDimensionIndex(u),
  14454. y = e.getLayout("size"),
  14455. v = e.getLayout("offset");
  14456. return {
  14457. progress: function (t, e) {
  14458. for (var i, r = t.count, l = d && Ex(3 * r), u = d && s && Ex(3 * r), m = d && Ex(r), x = n.master.getRect(), _ = c ? x.width : x.height, b = e.getStore(), w = 0; null != (i = t.next());) {
  14459. var S = b.get(h ? g : o, i),
  14460. M = b.get(a, i),
  14461. I = p,
  14462. T = void 0;
  14463. h && (T = +S - b.get(o, i));
  14464. var C = void 0,
  14465. D = void 0,
  14466. A = void 0,
  14467. k = void 0;
  14468. if (c) {
  14469. var L = n.dataToPoint([S, M]);
  14470. if (h) I = n.dataToPoint([T, M])[0];
  14471. C = I, D = L[1] + v, A = L[0] - I, k = y, Math.abs(A) < f && (A = (A < 0 ? -1 : 1) * f)
  14472. } else {
  14473. L = n.dataToPoint([M, S]);
  14474. if (h) I = n.dataToPoint([M, T])[1];
  14475. C = L[0] + v, D = I, A = y, k = L[1] - I, Math.abs(k) < f && (k = (k <= 0 ? -1 : 1) * f)
  14476. }
  14477. d ? (l[w] = C, l[w + 1] = D, l[w + 2] = c ? A : k, u && (u[w] = c ? x.x : C, u[w + 1] = c ? D : x.y, u[w + 2] = _), m[i] = i) : e.setItemLayout(i, {
  14478. x: C,
  14479. y: D,
  14480. width: A,
  14481. height: k
  14482. }), w += 3
  14483. }
  14484. d && e.setLayout({
  14485. largePoints: l,
  14486. largeDataIndices: m,
  14487. largeBackgroundPoints: u,
  14488. valueAxisHorizontal: c
  14489. })
  14490. }
  14491. }
  14492. }
  14493. }
  14494. }
  14495. }
  14496. function Xx(t) {
  14497. return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type
  14498. }
  14499. function Ux(t) {
  14500. return t.pipelineContext && t.pipelineContext.large
  14501. }
  14502. var Zx = function (t) {
  14503. function e(e) {
  14504. var n = t.call(this, e) || this;
  14505. return n.type = "time", n
  14506. }
  14507. return n(e, t), e.prototype.getLabel = function (t) {
  14508. var e = this.getSetting("useUTC");
  14509. return qc(t.value, Hc[function (t) {
  14510. switch (t) {
  14511. case "year":
  14512. case "month":
  14513. return "day";
  14514. case "millisecond":
  14515. return "millisecond";
  14516. default:
  14517. return "second"
  14518. }
  14519. }(Zc(this._minLevelUnit))] || Hc.second, e, this.getSetting("locale"))
  14520. }, e.prototype.getFormattedLabel = function (t, e, n) {
  14521. var i = this.getSetting("useUTC");
  14522. return function (t, e, n, i, r) {
  14523. var o = null;
  14524. if (U(n)) o = n;
  14525. else if (X(n)) o = n(t.value, e, {
  14526. level: t.level
  14527. });
  14528. else {
  14529. var a = A({}, Gc);
  14530. if (t.level > 0)
  14531. for (var s = 0; s < Yc.length; ++s) a[Yc[s]] = "{primary|" + a[Yc[s]] + "}";
  14532. var l = n ? !1 === n.inherit ? n : k(n, a) : a,
  14533. u = Kc(t.value, r);
  14534. if (l[u]) o = l[u];
  14535. else if (l.inherit) {
  14536. for (s = Xc.indexOf(u) - 1; s >= 0; --s)
  14537. if (l[u]) {
  14538. o = l[u];
  14539. break
  14540. } o = o || a.none
  14541. }
  14542. if (Y(o)) {
  14543. var h = null == t.level ? 0 : t.level >= 0 ? t.level : o.length + t.level;
  14544. o = o[h = Math.min(h, o.length - 1)]
  14545. }
  14546. }
  14547. return qc(new Date(t.value), o, r, i)
  14548. }(t, e, n, this.getSetting("locale"), i)
  14549. }, e.prototype.getTicks = function () {
  14550. var t = this._interval,
  14551. e = this._extent,
  14552. n = [];
  14553. if (!t) return n;
  14554. n.push({
  14555. value: e[0],
  14556. level: 0
  14557. });
  14558. var i = this.getSetting("useUTC"),
  14559. r = function (t, e, n, i) {
  14560. var r = 1e4,
  14561. o = Xc,
  14562. a = 0;
  14563. function s(t, e, n, r, o, a, s) {
  14564. for (var l = new Date(e), u = e, h = l[r](); u < n && u <= i[1];) s.push({
  14565. value: u
  14566. }), h += t, l[o](h), u = l.getTime();
  14567. s.push({
  14568. value: u,
  14569. notAdd: !0
  14570. })
  14571. }
  14572. function l(t, r, o) {
  14573. var a = [],
  14574. l = !r.length;
  14575. if (! function (t, e, n, i) {
  14576. var r = ro(e),
  14577. o = ro(n),
  14578. a = function (t) {
  14579. return $c(r, t, i) === $c(o, t, i)
  14580. },
  14581. s = function () {
  14582. return a("year")
  14583. },
  14584. l = function () {
  14585. return s() && a("month")
  14586. },
  14587. u = function () {
  14588. return l() && a("day")
  14589. },
  14590. h = function () {
  14591. return u() && a("hour")
  14592. },
  14593. c = function () {
  14594. return h() && a("minute")
  14595. },
  14596. p = function () {
  14597. return c() && a("second")
  14598. },
  14599. d = function () {
  14600. return p() && a("millisecond")
  14601. };
  14602. switch (t) {
  14603. case "year":
  14604. return s();
  14605. case "month":
  14606. return l();
  14607. case "day":
  14608. return u();
  14609. case "hour":
  14610. return h();
  14611. case "minute":
  14612. return c();
  14613. case "second":
  14614. return p();
  14615. case "millisecond":
  14616. return d()
  14617. }
  14618. }(Zc(t), i[0], i[1], n)) {
  14619. l && (r = [{
  14620. value: t_(new Date(i[0]), t, n)
  14621. }, {
  14622. value: i[1]
  14623. }]);
  14624. for (var u = 0; u < r.length - 1; u++) {
  14625. var h = r[u].value,
  14626. c = r[u + 1].value;
  14627. if (h !== c) {
  14628. var p = void 0,
  14629. d = void 0,
  14630. f = void 0,
  14631. g = !1;
  14632. switch (t) {
  14633. case "year":
  14634. p = Math.max(1, Math.round(e / Bc / 365)), d = Jc(n), f = op(n);
  14635. break;
  14636. case "half-year":
  14637. case "quarter":
  14638. case "month":
  14639. p = Kx(e), d = Qc(n), f = ap(n);
  14640. break;
  14641. case "week":
  14642. case "half-week":
  14643. case "day":
  14644. p = qx(e), d = tp(n), f = sp(n), g = !0;
  14645. break;
  14646. case "half-day":
  14647. case "quarter-day":
  14648. case "hour":
  14649. p = $x(e), d = ep(n), f = lp(n);
  14650. break;
  14651. case "minute":
  14652. p = Jx(e, !0), d = np(n), f = up(n);
  14653. break;
  14654. case "second":
  14655. p = Jx(e, !1), d = ip(n), f = hp(n);
  14656. break;
  14657. case "millisecond":
  14658. p = Qx(e), d = rp(n), f = cp(n)
  14659. }
  14660. s(p, h, c, d, f, g, a), "year" === t && o.length > 1 && 0 === u && o.unshift({
  14661. value: o[0].value - p
  14662. })
  14663. }
  14664. }
  14665. for (u = 0; u < a.length; u++) o.push(a[u]);
  14666. return a
  14667. }
  14668. }
  14669. for (var u = [], h = [], c = 0, p = 0, d = 0; d < o.length && a++ < r; ++d) {
  14670. var f = Zc(o[d]);
  14671. if (jc(o[d]))
  14672. if (l(o[d], u[u.length - 1] || [], h), f !== (o[d + 1] ? Zc(o[d + 1]) : null)) {
  14673. if (h.length) {
  14674. p = c, h.sort((function (t, e) {
  14675. return t.value - e.value
  14676. }));
  14677. for (var g = [], y = 0; y < h.length; ++y) {
  14678. var v = h[y].value;
  14679. 0 !== y && h[y - 1].value === v || (g.push(h[y]), v >= i[0] && v <= i[1] && c++)
  14680. }
  14681. var m = (i[1] - i[0]) / e;
  14682. if (c > 1.5 * m && p > m / 1.5) break;
  14683. if (u.push(g), c > m || t === o[d]) break
  14684. }
  14685. h = []
  14686. }
  14687. }
  14688. 0;
  14689. var x = B(z(u, (function (t) {
  14690. return B(t, (function (t) {
  14691. return t.value >= i[0] && t.value <= i[1] && !t.notAdd
  14692. }))
  14693. })), (function (t) {
  14694. return t.length > 0
  14695. })),
  14696. _ = [],
  14697. b = x.length - 1;
  14698. for (d = 0; d < x.length; ++d)
  14699. for (var w = x[d], S = 0; S < w.length; ++S) _.push({
  14700. value: w[S].value,
  14701. level: b - d
  14702. });
  14703. _.sort((function (t, e) {
  14704. return t.value - e.value
  14705. }));
  14706. var M = [];
  14707. for (d = 0; d < _.length; ++d) 0 !== d && _[d].value === _[d - 1].value || M.push(_[d]);
  14708. return M
  14709. }(this._minLevelUnit, this._approxInterval, i, e);
  14710. return (n = n.concat(r)).push({
  14711. value: e[1],
  14712. level: 0
  14713. }), n
  14714. }, e.prototype.calcNiceExtent = function (t) {
  14715. var e = this._extent;
  14716. if (e[0] === e[1] && (e[0] -= Bc, e[1] += Bc), e[1] === -1 / 0 && e[0] === 1 / 0) {
  14717. var n = new Date;
  14718. e[1] = +new Date(n.getFullYear(), n.getMonth(), n.getDate()), e[0] = e[1] - Bc
  14719. }
  14720. this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval)
  14721. }, e.prototype.calcNiceTicks = function (t, e, n) {
  14722. t = t || 10;
  14723. var i = this._extent,
  14724. r = i[1] - i[0];
  14725. this._approxInterval = r / t, null != e && this._approxInterval < e && (this._approxInterval = e), null != n && this._approxInterval > n && (this._approxInterval = n);
  14726. var o = jx.length,
  14727. a = Math.min(function (t, e, n, i) {
  14728. for (; n < i;) {
  14729. var r = n + i >>> 1;
  14730. t[r][1] < e ? n = r + 1 : i = r
  14731. }
  14732. return n
  14733. }(jx, this._approxInterval, 0, o), o - 1);
  14734. this._interval = jx[a][1], this._minLevelUnit = jx[Math.max(a - 1, 0)][0]
  14735. }, e.prototype.parse = function (t) {
  14736. return j(t) ? t : +ro(t)
  14737. }, e.prototype.contain = function (t) {
  14738. return Dx(this.parse(t), this._extent)
  14739. }, e.prototype.normalize = function (t) {
  14740. return Ax(this.parse(t), this._extent)
  14741. }, e.prototype.scale = function (t) {
  14742. return kx(t, this._extent)
  14743. }, e.type = "time", e
  14744. }(Ox),
  14745. jx = [
  14746. ["second", Ec],
  14747. ["minute", zc],
  14748. ["hour", Vc],
  14749. ["quarter-day", 216e5],
  14750. ["half-day", 432e5],
  14751. ["day", 10368e4],
  14752. ["half-week", 3024e5],
  14753. ["week", 6048e5],
  14754. ["month", 26784e5],
  14755. ["quarter", 8208e6],
  14756. ["half-year", Fc / 2],
  14757. ["year", Fc]
  14758. ];
  14759. function qx(t, e) {
  14760. return (t /= Bc) > 16 ? 16 : t > 7.5 ? 7 : t > 3.5 ? 4 : t > 1.5 ? 2 : 1
  14761. }
  14762. function Kx(t) {
  14763. return (t /= 2592e6) > 6 ? 6 : t > 3 ? 3 : t > 2 ? 2 : 1
  14764. }
  14765. function $x(t) {
  14766. return (t /= Vc) > 12 ? 12 : t > 6 ? 6 : t > 3.5 ? 4 : t > 2 ? 2 : 1
  14767. }
  14768. function Jx(t, e) {
  14769. return (t /= e ? zc : Ec) > 30 ? 30 : t > 20 ? 20 : t > 15 ? 15 : t > 10 ? 10 : t > 5 ? 5 : t > 2 ? 2 : 1
  14770. }
  14771. function Qx(t) {
  14772. return so(t, !0)
  14773. }
  14774. function t_(t, e, n) {
  14775. var i = new Date(t);
  14776. switch (Zc(e)) {
  14777. case "year":
  14778. case "month":
  14779. i[ap(n)](0);
  14780. case "day":
  14781. i[sp(n)](1);
  14782. case "hour":
  14783. i[lp(n)](0);
  14784. case "minute":
  14785. i[up(n)](0);
  14786. case "second":
  14787. i[hp(n)](0), i[cp(n)](0)
  14788. }
  14789. return i.getTime()
  14790. }
  14791. mx.registerClass(Zx);
  14792. var e_ = mx.prototype,
  14793. n_ = Ox.prototype,
  14794. i_ = Zr,
  14795. r_ = Math.floor,
  14796. o_ = Math.ceil,
  14797. a_ = Math.pow,
  14798. s_ = Math.log,
  14799. l_ = function (t) {
  14800. function e() {
  14801. var e = null !== t && t.apply(this, arguments) || this;
  14802. return e.type = "log", e.base = 10, e._originalScale = new Ox, e._interval = 0, e
  14803. }
  14804. return n(e, t), e.prototype.getTicks = function (t) {
  14805. var e = this._originalScale,
  14806. n = this._extent,
  14807. i = e.getExtent();
  14808. return z(n_.getTicks.call(this, t), (function (t) {
  14809. var e = t.value,
  14810. r = Zr(a_(this.base, e));
  14811. return r = e === n[0] && this._fixMin ? h_(r, i[0]) : r, {
  14812. value: r = e === n[1] && this._fixMax ? h_(r, i[1]) : r
  14813. }
  14814. }), this)
  14815. }, e.prototype.setExtent = function (t, e) {
  14816. var n = s_(this.base);
  14817. t = s_(Math.max(0, t)) / n, e = s_(Math.max(0, e)) / n, n_.setExtent.call(this, t, e)
  14818. }, e.prototype.getExtent = function () {
  14819. var t = this.base,
  14820. e = e_.getExtent.call(this);
  14821. e[0] = a_(t, e[0]), e[1] = a_(t, e[1]);
  14822. var n = this._originalScale.getExtent();
  14823. return this._fixMin && (e[0] = h_(e[0], n[0])), this._fixMax && (e[1] = h_(e[1], n[1])), e
  14824. }, e.prototype.unionExtent = function (t) {
  14825. this._originalScale.unionExtent(t);
  14826. var e = this.base;
  14827. t[0] = s_(t[0]) / s_(e), t[1] = s_(t[1]) / s_(e), e_.unionExtent.call(this, t)
  14828. }, e.prototype.unionExtentFromData = function (t, e) {
  14829. this.unionExtent(t.getApproximateExtent(e))
  14830. }, e.prototype.calcNiceTicks = function (t) {
  14831. t = t || 10;
  14832. var e = this._extent,
  14833. n = e[1] - e[0];
  14834. if (!(n === 1 / 0 || n <= 0)) {
  14835. var i = oo(n);
  14836. for (t / n * i <= .5 && (i *= 10); !isNaN(i) && Math.abs(i) < 1 && Math.abs(i) > 0;) i *= 10;
  14837. var r = [Zr(o_(e[0] / i) * i), Zr(r_(e[1] / i) * i)];
  14838. this._interval = i, this._niceExtent = r
  14839. }
  14840. }, e.prototype.calcNiceExtent = function (t) {
  14841. n_.calcNiceExtent.call(this, t), this._fixMin = t.fixMin, this._fixMax = t.fixMax
  14842. }, e.prototype.parse = function (t) {
  14843. return t
  14844. }, e.prototype.contain = function (t) {
  14845. return Dx(t = s_(t) / s_(this.base), this._extent)
  14846. }, e.prototype.normalize = function (t) {
  14847. return Ax(t = s_(t) / s_(this.base), this._extent)
  14848. }, e.prototype.scale = function (t) {
  14849. return t = kx(t, this._extent), a_(this.base, t)
  14850. }, e.type = "log", e
  14851. }(mx),
  14852. u_ = l_.prototype;
  14853. function h_(t, e) {
  14854. return i_(t, qr(e))
  14855. }
  14856. u_.getMinorTicks = n_.getMinorTicks, u_.getLabel = n_.getLabel, mx.registerClass(l_);
  14857. var c_ = function () {
  14858. function t(t, e, n) {
  14859. this._prepareParams(t, e, n)
  14860. }
  14861. return t.prototype._prepareParams = function (t, e, n) {
  14862. n[1] < n[0] && (n = [NaN, NaN]), this._dataMin = n[0], this._dataMax = n[1];
  14863. var i = this._isOrdinal = "ordinal" === t.type;
  14864. this._needCrossZero = "interval" === t.type && e.getNeedCrossZero && e.getNeedCrossZero();
  14865. var r = this._modelMinRaw = e.get("min", !0);
  14866. X(r) ? this._modelMinNum = g_(t, r({
  14867. min: n[0],
  14868. max: n[1]
  14869. })) : "dataMin" !== r && (this._modelMinNum = g_(t, r));
  14870. var o = this._modelMaxRaw = e.get("max", !0);
  14871. if (X(o) ? this._modelMaxNum = g_(t, o({
  14872. min: n[0],
  14873. max: n[1]
  14874. })) : "dataMax" !== o && (this._modelMaxNum = g_(t, o)), i) this._axisDataLen = e.getCategories().length;
  14875. else {
  14876. var a = e.get("boundaryGap"),
  14877. s = Y(a) ? a : [a || 0, a || 0];
  14878. "boolean" == typeof s[0] || "boolean" == typeof s[1] ? this._boundaryGapInner = [0, 0] : this._boundaryGapInner = [Ir(s[0], 1), Ir(s[1], 1)]
  14879. }
  14880. }, t.prototype.calculate = function () {
  14881. var t = this._isOrdinal,
  14882. e = this._dataMin,
  14883. n = this._dataMax,
  14884. i = this._axisDataLen,
  14885. r = this._boundaryGapInner,
  14886. o = t ? null : n - e || Math.abs(e),
  14887. a = "dataMin" === this._modelMinRaw ? e : this._modelMinNum,
  14888. s = "dataMax" === this._modelMaxRaw ? n : this._modelMaxNum,
  14889. l = null != a,
  14890. u = null != s;
  14891. null == a && (a = t ? i ? 0 : NaN : e - r[0] * o), null == s && (s = t ? i ? i - 1 : NaN : n + r[1] * o), (null == a || !isFinite(a)) && (a = NaN), (null == s || !isFinite(s)) && (s = NaN);
  14892. var h = nt(a) || nt(s) || t && !i;
  14893. this._needCrossZero && (a > 0 && s > 0 && !l && (a = 0), a < 0 && s < 0 && !u && (s = 0));
  14894. var c = this._determinedMin,
  14895. p = this._determinedMax;
  14896. return null != c && (a = c, l = !0), null != p && (s = p, u = !0), {
  14897. min: a,
  14898. max: s,
  14899. minFixed: l,
  14900. maxFixed: u,
  14901. isBlank: h
  14902. }
  14903. }, t.prototype.modifyDataMinMax = function (t, e) {
  14904. this[d_[t]] = e
  14905. }, t.prototype.setDeterminedMinMax = function (t, e) {
  14906. var n = p_[t];
  14907. this[n] = e
  14908. }, t.prototype.freeze = function () {
  14909. this.frozen = !0
  14910. }, t
  14911. }(),
  14912. p_ = {
  14913. min: "_determinedMin",
  14914. max: "_determinedMax"
  14915. },
  14916. d_ = {
  14917. min: "_dataMin",
  14918. max: "_dataMax"
  14919. };
  14920. function f_(t, e, n) {
  14921. var i = t.rawExtentInfo;
  14922. return i || (i = new c_(t, e, n), t.rawExtentInfo = i, i)
  14923. }
  14924. function g_(t, e) {
  14925. return null == e ? null : nt(e) ? NaN : t.parse(e)
  14926. }
  14927. function y_(t, e) {
  14928. var n = t.type,
  14929. i = f_(t, e, t.getExtent()).calculate();
  14930. t.setBlank(i.isBlank);
  14931. var r = i.min,
  14932. o = i.max,
  14933. a = e.ecModel;
  14934. if (a && "time" === n) {
  14935. var s = Fx("bar", a),
  14936. l = !1;
  14937. if (E(s, (function (t) {
  14938. l = l || t.getBaseAxis() === e.axis
  14939. })), l) {
  14940. var u = Gx(s),
  14941. h = function (t, e, n, i) {
  14942. var r = n.axis.getExtent(),
  14943. o = r[1] - r[0],
  14944. a = function (t, e, n) {
  14945. if (t && e) {
  14946. var i = t[Bx(e)];
  14947. return null != i && null != n ? i[Vx(n)] : i
  14948. }
  14949. }(i, n.axis);
  14950. if (void 0 === a) return {
  14951. min: t,
  14952. max: e
  14953. };
  14954. var s = 1 / 0;
  14955. E(a, (function (t) {
  14956. s = Math.min(t.offset, s)
  14957. }));
  14958. var l = -1 / 0;
  14959. E(a, (function (t) {
  14960. l = Math.max(t.offset + t.width, l)
  14961. })), s = Math.abs(s), l = Math.abs(l);
  14962. var u = s + l,
  14963. h = e - t,
  14964. c = h / (1 - (s + l) / o) - h;
  14965. return e += c * (l / u), t -= c * (s / u), {
  14966. min: t,
  14967. max: e
  14968. }
  14969. }(r, o, e, u);
  14970. r = h.min, o = h.max
  14971. }
  14972. }
  14973. return {
  14974. extent: [r, o],
  14975. fixMin: i.minFixed,
  14976. fixMax: i.maxFixed
  14977. }
  14978. }
  14979. function v_(t, e) {
  14980. var n = e,
  14981. i = y_(t, n),
  14982. r = i.extent,
  14983. o = n.get("splitNumber");
  14984. t instanceof l_ && (t.base = n.get("logBase"));
  14985. var a = t.type,
  14986. s = n.get("interval"),
  14987. l = "interval" === a || "time" === a;
  14988. t.setExtent(r[0], r[1]), t.calcNiceExtent({
  14989. splitNumber: o,
  14990. fixMin: i.fixMin,
  14991. fixMax: i.fixMax,
  14992. minInterval: l ? n.get("minInterval") : null,
  14993. maxInterval: l ? n.get("maxInterval") : null
  14994. }), null != s && t.setInterval && t.setInterval(s)
  14995. }
  14996. function m_(t, e) {
  14997. if (e = e || t.get("type")) switch (e) {
  14998. case "category":
  14999. return new Lx({
  15000. ordinalMeta: t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(),
  15001. extent: [1 / 0, -1 / 0]
  15002. });
  15003. case "time":
  15004. return new Zx({
  15005. locale: t.ecModel.getLocaleModel(),
  15006. useUTC: t.ecModel.get("useUTC")
  15007. });
  15008. default:
  15009. return new(mx.getClass(e) || Ox)
  15010. }
  15011. }
  15012. function x_(t) {
  15013. var e, n, i = t.getLabelModel().get("formatter"),
  15014. r = "category" === t.type ? t.scale.getExtent()[0] : null;
  15015. return "time" === t.scale.type ? (n = i, function (e, i) {
  15016. return t.scale.getFormattedLabel(e, i, n)
  15017. }) : U(i) ? function (e) {
  15018. return function (n) {
  15019. var i = t.scale.getLabel(n);
  15020. return e.replace("{value}", null != i ? i : "")
  15021. }
  15022. }(i) : X(i) ? (e = i, function (n, i) {
  15023. return null != r && (i = n.value - r), e(__(t, n), i, null != n.level ? {
  15024. level: n.level
  15025. } : null)
  15026. }) : function (e) {
  15027. return t.scale.getLabel(e)
  15028. }
  15029. }
  15030. function __(t, e) {
  15031. return "category" === t.type ? t.scale.getLabel(e) : e.value
  15032. }
  15033. function b_(t, e) {
  15034. var n = e * Math.PI / 180,
  15035. i = t.width,
  15036. r = t.height,
  15037. o = i * Math.abs(Math.cos(n)) + Math.abs(r * Math.sin(n)),
  15038. a = i * Math.abs(Math.sin(n)) + Math.abs(r * Math.cos(n));
  15039. return new ze(t.x, t.y, o, a)
  15040. }
  15041. function w_(t) {
  15042. var e = t.get("interval");
  15043. return null == e ? "auto" : e
  15044. }
  15045. function S_(t) {
  15046. return "category" === t.type && 0 === w_(t.getLabelModel())
  15047. }
  15048. function M_(t, e) {
  15049. var n = {};
  15050. return E(t.mapDimensionsAll(e), (function (e) {
  15051. n[yx(t, e)] = !0
  15052. })), G(n)
  15053. }
  15054. var I_ = function () {
  15055. function t() {}
  15056. return t.prototype.getNeedCrossZero = function () {
  15057. return !this.option.scale
  15058. }, t.prototype.getCoordSysModel = function () {}, t
  15059. }();
  15060. var T_ = {
  15061. isDimensionStacked: gx,
  15062. enableDataStack: fx,
  15063. getStackedDimension: yx
  15064. };
  15065. var C_ = Object.freeze({
  15066. __proto__: null,
  15067. createList: function (t) {
  15068. return vx(null, t)
  15069. },
  15070. getLayoutRect: Cp,
  15071. dataStack: T_,
  15072. createScale: function (t, e) {
  15073. var n = e;
  15074. e instanceof Mc || (n = new Mc(e));
  15075. var i = m_(n);
  15076. return i.setExtent(t[0], t[1]), v_(i, n), i
  15077. },
  15078. mixinAxisModelCommonMethods: function (t) {
  15079. R(t, I_)
  15080. },
  15081. getECData: Qs,
  15082. createTextStyle: function (t, e) {
  15083. return nc(t, null, null, "normal" !== (e = e || {}).state)
  15084. },
  15085. createDimensions: function (t, e) {
  15086. return ux(t, e).dimensions
  15087. },
  15088. createSymbol: Wy,
  15089. enableHoverEmphasis: Hl
  15090. });
  15091. function D_(t, e) {
  15092. return Math.abs(t - e) < 1e-8
  15093. }
  15094. function A_(t, e, n) {
  15095. var i = 0,
  15096. r = t[0];
  15097. if (!r) return !1;
  15098. for (var o = 1; o < t.length; o++) {
  15099. var a = t[o];
  15100. i += ds(r[0], r[1], a[0], a[1], e, n), r = a
  15101. }
  15102. var s = t[0];
  15103. return D_(r[0], s[0]) && D_(r[1], s[1]) || (i += ds(r[0], r[1], s[0], s[1], e, n)), 0 !== i
  15104. }
  15105. var k_ = [];
  15106. function L_(t, e) {
  15107. for (var n = 0; n < t.length; n++) Wt(t[n], t[n], e)
  15108. }
  15109. function P_(t, e, n, i) {
  15110. for (var r = 0; r < t.length; r++) {
  15111. var o = t[r];
  15112. i && (o = i.project(o)), o && isFinite(o[0]) && isFinite(o[1]) && (Ht(e, e, o), Yt(n, n, o))
  15113. }
  15114. }
  15115. var O_ = function () {
  15116. function t(t) {
  15117. this.name = t
  15118. }
  15119. return t.prototype.setCenter = function (t) {
  15120. this._center = t
  15121. }, t.prototype.getCenter = function () {
  15122. var t = this._center;
  15123. return t || (t = this._center = this.calcCenter()), t
  15124. }, t
  15125. }(),
  15126. R_ = function (t, e) {
  15127. this.type = "polygon", this.exterior = t, this.interiors = e
  15128. },
  15129. N_ = function (t) {
  15130. this.type = "linestring", this.points = t
  15131. },
  15132. E_ = function (t) {
  15133. function e(e, n, i) {
  15134. var r = t.call(this, e) || this;
  15135. return r.type = "geoJSON", r.geometries = n, r._center = i && [i[0], i[1]], r
  15136. }
  15137. return n(e, t), e.prototype.calcCenter = function () {
  15138. for (var t, e = this.geometries, n = 0, i = 0; i < e.length; i++) {
  15139. var r = e[i],
  15140. o = r.exterior,
  15141. a = o && o.length;
  15142. a > n && (t = r, n = a)
  15143. }
  15144. if (t) return function (t) {
  15145. for (var e = 0, n = 0, i = 0, r = t.length, o = t[r - 1][0], a = t[r - 1][1], s = 0; s < r; s++) {
  15146. var l = t[s][0],
  15147. u = t[s][1],
  15148. h = o * u - l * a;
  15149. e += h, n += (o + l) * h, i += (a + u) * h, o = l, a = u
  15150. }
  15151. return e ? [n / e / 3, i / e / 3, e] : [t[0][0] || 0, t[0][1] || 0]
  15152. }(t.exterior);
  15153. var s = this.getBoundingRect();
  15154. return [s.x + s.width / 2, s.y + s.height / 2]
  15155. }, e.prototype.getBoundingRect = function (t) {
  15156. var e = this._rect;
  15157. if (e && !t) return e;
  15158. var n = [1 / 0, 1 / 0],
  15159. i = [-1 / 0, -1 / 0];
  15160. return E(this.geometries, (function (e) {
  15161. "polygon" === e.type ? P_(e.exterior, n, i, t) : E(e.points, (function (e) {
  15162. P_(e, n, i, t)
  15163. }))
  15164. })), isFinite(n[0]) && isFinite(n[1]) && isFinite(i[0]) && isFinite(i[1]) || (n[0] = n[1] = i[0] = i[1] = 0), e = new ze(n[0], n[1], i[0] - n[0], i[1] - n[1]), t || (this._rect = e), e
  15165. }, e.prototype.contain = function (t) {
  15166. var e = this.getBoundingRect(),
  15167. n = this.geometries;
  15168. if (!e.contain(t[0], t[1])) return !1;
  15169. t: for (var i = 0, r = n.length; i < r; i++) {
  15170. var o = n[i];
  15171. if ("polygon" === o.type) {
  15172. var a = o.exterior,
  15173. s = o.interiors;
  15174. if (A_(a, t[0], t[1])) {
  15175. for (var l = 0; l < (s ? s.length : 0); l++)
  15176. if (A_(s[l], t[0], t[1])) continue t;
  15177. return !0
  15178. }
  15179. }
  15180. }
  15181. return !1
  15182. }, e.prototype.transformTo = function (t, e, n, i) {
  15183. var r = this.getBoundingRect(),
  15184. o = r.width / r.height;
  15185. n ? i || (i = n / o) : n = o * i;
  15186. for (var a = new ze(t, e, n, i), s = r.calculateTransform(a), l = this.geometries, u = 0; u < l.length; u++) {
  15187. var h = l[u];
  15188. "polygon" === h.type ? (L_(h.exterior, s), E(h.interiors, (function (t) {
  15189. L_(t, s)
  15190. }))) : E(h.points, (function (t) {
  15191. L_(t, s)
  15192. }))
  15193. }(r = this._rect).copy(a), this._center = [r.x + r.width / 2, r.y + r.height / 2]
  15194. }, e.prototype.cloneShallow = function (t) {
  15195. null == t && (t = this.name);
  15196. var n = new e(t, this.geometries, this._center);
  15197. return n._rect = this._rect, n.transformTo = null, n
  15198. }, e
  15199. }(O_),
  15200. z_ = function (t) {
  15201. function e(e, n) {
  15202. var i = t.call(this, e) || this;
  15203. return i.type = "geoSVG", i._elOnlyForCalculate = n, i
  15204. }
  15205. return n(e, t), e.prototype.calcCenter = function () {
  15206. for (var t = this._elOnlyForCalculate, e = t.getBoundingRect(), n = [e.x + e.width / 2, e.y + e.height / 2], i = xe(k_), r = t; r && !r.isGeoSVGGraphicRoot;) be(i, r.getLocalTransform(), i), r = r.parent;
  15207. return Ie(i, i), Wt(n, n, i), n
  15208. }, e
  15209. }(O_);
  15210. function V_(t, e, n) {
  15211. for (var i = 0; i < t.length; i++) t[i] = B_(t[i], e[i], n)
  15212. }
  15213. function B_(t, e, n) {
  15214. for (var i = [], r = e[0], o = e[1], a = 0; a < t.length; a += 2) {
  15215. var s = t.charCodeAt(a) - 64,
  15216. l = t.charCodeAt(a + 1) - 64;
  15217. s = s >> 1 ^ -(1 & s), l = l >> 1 ^ -(1 & l), r = s += r, o = l += o, i.push([s / n, l / n])
  15218. }
  15219. return i
  15220. }
  15221. function F_(t, e) {
  15222. return z(B((t = function (t) {
  15223. if (!t.UTF8Encoding) return t;
  15224. var e = t,
  15225. n = e.UTF8Scale;
  15226. return null == n && (n = 1024), E(e.features, (function (t) {
  15227. var e = t.geometry,
  15228. i = e.encodeOffsets,
  15229. r = e.coordinates;
  15230. if (i) switch (e.type) {
  15231. case "LineString":
  15232. e.coordinates = B_(r, i, n);
  15233. break;
  15234. case "Polygon":
  15235. case "MultiLineString":
  15236. V_(r, i, n);
  15237. break;
  15238. case "MultiPolygon":
  15239. E(r, (function (t, e) {
  15240. return V_(t, i[e], n)
  15241. }))
  15242. }
  15243. })), e.UTF8Encoding = !1, e
  15244. }(t)).features, (function (t) {
  15245. return t.geometry && t.properties && t.geometry.coordinates.length > 0
  15246. })), (function (t) {
  15247. var n = t.properties,
  15248. i = t.geometry,
  15249. r = [];
  15250. switch (i.type) {
  15251. case "Polygon":
  15252. var o = i.coordinates;
  15253. r.push(new R_(o[0], o.slice(1)));
  15254. break;
  15255. case "MultiPolygon":
  15256. E(i.coordinates, (function (t) {
  15257. t[0] && r.push(new R_(t[0], t.slice(1)))
  15258. }));
  15259. break;
  15260. case "LineString":
  15261. r.push(new N_([i.coordinates]));
  15262. break;
  15263. case "MultiLineString":
  15264. r.push(new N_(i.coordinates))
  15265. }
  15266. var a = new E_(n[e || "name"], r, n.cp);
  15267. return a.properties = n, a
  15268. }))
  15269. }
  15270. var G_ = Object.freeze({
  15271. __proto__: null,
  15272. linearMap: Xr,
  15273. round: Zr,
  15274. asc: jr,
  15275. getPrecision: qr,
  15276. getPrecisionSafe: Kr,
  15277. getPixelPrecision: $r,
  15278. getPercentWithPrecision: function (t, e, n) {
  15279. return t[e] && Jr(t, n)[e] || 0
  15280. },
  15281. MAX_SAFE_INTEGER: to,
  15282. remRadian: eo,
  15283. isRadianAroundZero: no,
  15284. parseDate: ro,
  15285. quantity: oo,
  15286. quantityExponent: ao,
  15287. nice: so,
  15288. quantile: lo,
  15289. reformIntervals: uo,
  15290. isNumeric: co,
  15291. numericToNumber: ho
  15292. }),
  15293. W_ = Object.freeze({
  15294. __proto__: null,
  15295. parse: ro,
  15296. format: qc
  15297. }),
  15298. H_ = Object.freeze({
  15299. __proto__: null,
  15300. extendShape: Mh,
  15301. extendPath: Th,
  15302. makePath: Ah,
  15303. makeImage: kh,
  15304. mergePath: Ph,
  15305. resizePath: Oh,
  15306. createIcon: Hh,
  15307. updateProps: fh,
  15308. initProps: gh,
  15309. getTransform: Eh,
  15310. clipPointsByRect: Gh,
  15311. clipRectByRect: Wh,
  15312. registerShape: Ch,
  15313. getShapeClass: Dh,
  15314. Group: zr,
  15315. Image: ks,
  15316. Text: Fs,
  15317. Circle: _u,
  15318. Ellipse: wu,
  15319. Sector: zu,
  15320. Ring: Bu,
  15321. Polygon: Wu,
  15322. Polyline: Yu,
  15323. Rect: zs,
  15324. Line: Zu,
  15325. BezierCurve: $u,
  15326. Arc: Qu,
  15327. IncrementalDisplayable: hh,
  15328. CompoundPath: th,
  15329. LinearGradient: nh,
  15330. RadialGradient: ih,
  15331. BoundingRect: ze
  15332. }),
  15333. Y_ = Object.freeze({
  15334. __proto__: null,
  15335. addCommas: pp,
  15336. toCamelCase: dp,
  15337. normalizeCssArray: fp,
  15338. encodeHTML: re,
  15339. formatTpl: mp,
  15340. getTooltipMarker: xp,
  15341. formatTime: function (t, e, n) {
  15342. "week" !== t && "month" !== t && "quarter" !== t && "half-year" !== t && "year" !== t || (t = "MM-dd\nyyyy");
  15343. var i = ro(e),
  15344. r = n ? "getUTC" : "get",
  15345. o = i[r + "FullYear"](),
  15346. a = i[r + "Month"]() + 1,
  15347. s = i[r + "Date"](),
  15348. l = i[r + "Hours"](),
  15349. u = i[r + "Minutes"](),
  15350. h = i[r + "Seconds"](),
  15351. c = i[r + "Milliseconds"]();
  15352. return t = t.replace("MM", Uc(a, 2)).replace("M", a).replace("yyyy", o).replace("yy", Uc(o % 100 + "", 2)).replace("dd", Uc(s, 2)).replace("d", s).replace("hh", Uc(l, 2)).replace("h", l).replace("mm", Uc(u, 2)).replace("m", u).replace("ss", Uc(h, 2)).replace("s", h).replace("SSS", Uc(c, 3))
  15353. },
  15354. capitalFirst: function (t) {
  15355. return t ? t.charAt(0).toUpperCase() + t.substr(1) : t
  15356. },
  15357. truncateText: sa,
  15358. getTextRect: function (t, e, n, i, r, o, a, s) {
  15359. return new Fs({
  15360. style: {
  15361. text: t,
  15362. font: e,
  15363. align: n,
  15364. verticalAlign: i,
  15365. padding: r,
  15366. rich: o,
  15367. overflow: a ? "truncate" : null,
  15368. lineHeight: s
  15369. }
  15370. }).getBoundingRect()
  15371. }
  15372. }),
  15373. X_ = Object.freeze({
  15374. __proto__: null,
  15375. map: z,
  15376. each: E,
  15377. indexOf: P,
  15378. inherits: O,
  15379. reduce: V,
  15380. filter: B,
  15381. bind: W,
  15382. curry: H,
  15383. isArray: Y,
  15384. isString: U,
  15385. isObject: q,
  15386. isFunction: X,
  15387. extend: A,
  15388. defaults: k,
  15389. clone: T,
  15390. merge: C
  15391. }),
  15392. U_ = Oo();
  15393. function Z_(t) {
  15394. return "category" === t.type ? function (t) {
  15395. var e = t.getLabelModel(),
  15396. n = q_(t, e);
  15397. return !e.get("show") || t.scale.isBlank() ? {
  15398. labels: [],
  15399. labelCategoryInterval: n.labelCategoryInterval
  15400. } : n
  15401. }(t) : function (t) {
  15402. var e = t.scale.getTicks(),
  15403. n = x_(t);
  15404. return {
  15405. labels: z(e, (function (e, i) {
  15406. return {
  15407. level: e.level,
  15408. formattedLabel: n(e, i),
  15409. rawLabel: t.scale.getLabel(e),
  15410. tickValue: e.value
  15411. }
  15412. }))
  15413. }
  15414. }(t)
  15415. }
  15416. function j_(t, e) {
  15417. return "category" === t.type ? function (t, e) {
  15418. var n, i, r = K_(t, "ticks"),
  15419. o = w_(e),
  15420. a = $_(r, o);
  15421. if (a) return a;
  15422. e.get("show") && !t.scale.isBlank() || (n = []);
  15423. if (X(o)) n = tb(t, o, !0);
  15424. else if ("auto" === o) {
  15425. var s = q_(t, t.getLabelModel());
  15426. i = s.labelCategoryInterval, n = z(s.labels, (function (t) {
  15427. return t.tickValue
  15428. }))
  15429. } else n = Q_(t, i = o, !0);
  15430. return J_(r, o, {
  15431. ticks: n,
  15432. tickCategoryInterval: i
  15433. })
  15434. }(t, e) : {
  15435. ticks: z(t.scale.getTicks(), (function (t) {
  15436. return t.value
  15437. }))
  15438. }
  15439. }
  15440. function q_(t, e) {
  15441. var n, i, r = K_(t, "labels"),
  15442. o = w_(e),
  15443. a = $_(r, o);
  15444. return a || (X(o) ? n = tb(t, o) : (i = "auto" === o ? function (t) {
  15445. var e = U_(t).autoInterval;
  15446. return null != e ? e : U_(t).autoInterval = t.calculateCategoryInterval()
  15447. }(t) : o, n = Q_(t, i)), J_(r, o, {
  15448. labels: n,
  15449. labelCategoryInterval: i
  15450. }))
  15451. }
  15452. function K_(t, e) {
  15453. return U_(t)[e] || (U_(t)[e] = [])
  15454. }
  15455. function $_(t, e) {
  15456. for (var n = 0; n < t.length; n++)
  15457. if (t[n].key === e) return t[n].value
  15458. }
  15459. function J_(t, e, n) {
  15460. return t.push({
  15461. key: e,
  15462. value: n
  15463. }), n
  15464. }
  15465. function Q_(t, e, n) {
  15466. var i = x_(t),
  15467. r = t.scale,
  15468. o = r.getExtent(),
  15469. a = t.getLabelModel(),
  15470. s = [],
  15471. l = Math.max((e || 0) + 1, 1),
  15472. u = o[0],
  15473. h = r.count();
  15474. 0 !== u && l > 1 && h / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
  15475. var c = S_(t),
  15476. p = a.get("showMinLabel") || c,
  15477. d = a.get("showMaxLabel") || c;
  15478. p && u !== o[0] && g(o[0]);
  15479. for (var f = u; f <= o[1]; f += l) g(f);
  15480. function g(t) {
  15481. var e = {
  15482. value: t
  15483. };
  15484. s.push(n ? t : {
  15485. formattedLabel: i(e),
  15486. rawLabel: r.getLabel(e),
  15487. tickValue: t
  15488. })
  15489. }
  15490. return d && f - l !== o[1] && g(o[1]), s
  15491. }
  15492. function tb(t, e, n) {
  15493. var i = t.scale,
  15494. r = x_(t),
  15495. o = [];
  15496. return E(i.getTicks(), (function (t) {
  15497. var a = i.getLabel(t),
  15498. s = t.value;
  15499. e(t.value, a) && o.push(n ? s : {
  15500. formattedLabel: r(t),
  15501. rawLabel: a,
  15502. tickValue: s
  15503. })
  15504. })), o
  15505. }
  15506. var eb = [0, 1],
  15507. nb = function () {
  15508. function t(t, e, n) {
  15509. this.onBand = !1, this.inverse = !1, this.dim = t, this.scale = e, this._extent = n || [0, 0]
  15510. }
  15511. return t.prototype.contain = function (t) {
  15512. var e = this._extent,
  15513. n = Math.min(e[0], e[1]),
  15514. i = Math.max(e[0], e[1]);
  15515. return t >= n && t <= i
  15516. }, t.prototype.containData = function (t) {
  15517. return this.scale.contain(t)
  15518. }, t.prototype.getExtent = function () {
  15519. return this._extent.slice()
  15520. }, t.prototype.getPixelPrecision = function (t) {
  15521. return $r(t || this.scale.getExtent(), this._extent)
  15522. }, t.prototype.setExtent = function (t, e) {
  15523. var n = this._extent;
  15524. n[0] = t, n[1] = e
  15525. }, t.prototype.dataToCoord = function (t, e) {
  15526. var n = this._extent,
  15527. i = this.scale;
  15528. return t = i.normalize(t), this.onBand && "ordinal" === i.type && ib(n = n.slice(), i.count()), Xr(t, eb, n, e)
  15529. }, t.prototype.coordToData = function (t, e) {
  15530. var n = this._extent,
  15531. i = this.scale;
  15532. this.onBand && "ordinal" === i.type && ib(n = n.slice(), i.count());
  15533. var r = Xr(t, n, eb, e);
  15534. return this.scale.scale(r)
  15535. }, t.prototype.pointToData = function (t, e) {}, t.prototype.getTicksCoords = function (t) {
  15536. var e = (t = t || {}).tickModel || this.getTickModel(),
  15537. n = z(j_(this, e).ticks, (function (t) {
  15538. return {
  15539. coord: this.dataToCoord("ordinal" === this.scale.type ? this.scale.getRawOrdinalNumber(t) : t),
  15540. tickValue: t
  15541. }
  15542. }), this);
  15543. return function (t, e, n, i) {
  15544. var r = e.length;
  15545. if (!t.onBand || n || !r) return;
  15546. var o, a, s = t.getExtent();
  15547. if (1 === r) e[0].coord = s[0], o = e[1] = {
  15548. coord: s[0]
  15549. };
  15550. else {
  15551. var l = e[r - 1].tickValue - e[0].tickValue,
  15552. u = (e[r - 1].coord - e[0].coord) / l;
  15553. E(e, (function (t) {
  15554. t.coord -= u / 2
  15555. })), a = 1 + t.scale.getExtent()[1] - e[r - 1].tickValue, o = {
  15556. coord: e[r - 1].coord + u * a
  15557. }, e.push(o)
  15558. }
  15559. var h = s[0] > s[1];
  15560. c(e[0].coord, s[0]) && (i ? e[0].coord = s[0] : e.shift());
  15561. i && c(s[0], e[0].coord) && e.unshift({
  15562. coord: s[0]
  15563. });
  15564. c(s[1], o.coord) && (i ? o.coord = s[1] : e.pop());
  15565. i && c(o.coord, s[1]) && e.push({
  15566. coord: s[1]
  15567. });
  15568. function c(t, e) {
  15569. return t = Zr(t), e = Zr(e), h ? t > e : t < e
  15570. }
  15571. }(this, n, e.get("alignWithLabel"), t.clamp), n
  15572. }, t.prototype.getMinorTicksCoords = function () {
  15573. if ("ordinal" === this.scale.type) return [];
  15574. var t = this.model.getModel("minorTick").get("splitNumber");
  15575. return t > 0 && t < 100 || (t = 5), z(this.scale.getMinorTicks(t), (function (t) {
  15576. return z(t, (function (t) {
  15577. return {
  15578. coord: this.dataToCoord(t),
  15579. tickValue: t
  15580. }
  15581. }), this)
  15582. }), this)
  15583. }, t.prototype.getViewLabels = function () {
  15584. return Z_(this).labels
  15585. }, t.prototype.getLabelModel = function () {
  15586. return this.model.getModel("axisLabel")
  15587. }, t.prototype.getTickModel = function () {
  15588. return this.model.getModel("axisTick")
  15589. }, t.prototype.getBandWidth = function () {
  15590. var t = this._extent,
  15591. e = this.scale.getExtent(),
  15592. n = e[1] - e[0] + (this.onBand ? 1 : 0);
  15593. 0 === n && (n = 1);
  15594. var i = Math.abs(t[1] - t[0]);
  15595. return Math.abs(i) / n
  15596. }, t.prototype.calculateCategoryInterval = function () {
  15597. return function (t) {
  15598. var e = function (t) {
  15599. var e = t.getLabelModel();
  15600. return {
  15601. axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
  15602. labelRotate: e.get("rotate") || 0,
  15603. font: e.getFont()
  15604. }
  15605. }(t),
  15606. n = x_(t),
  15607. i = (e.axisRotate - e.labelRotate) / 180 * Math.PI,
  15608. r = t.scale,
  15609. o = r.getExtent(),
  15610. a = r.count();
  15611. if (o[1] - o[0] < 1) return 0;
  15612. var s = 1;
  15613. a > 40 && (s = Math.max(1, Math.floor(a / 40)));
  15614. for (var l = o[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), h = Math.abs(u * Math.cos(i)), c = Math.abs(u * Math.sin(i)), p = 0, d = 0; l <= o[1]; l += s) {
  15615. var f, g, y = br(n({
  15616. value: l
  15617. }), e.font, "center", "top");
  15618. f = 1.3 * y.width, g = 1.3 * y.height, p = Math.max(p, f, 7), d = Math.max(d, g, 7)
  15619. }
  15620. var v = p / h,
  15621. m = d / c;
  15622. isNaN(v) && (v = 1 / 0), isNaN(m) && (m = 1 / 0);
  15623. var x = Math.max(0, Math.floor(Math.min(v, m))),
  15624. _ = U_(t.model),
  15625. b = t.getExtent(),
  15626. w = _.lastAutoInterval,
  15627. S = _.lastTickCount;
  15628. return null != w && null != S && Math.abs(w - x) <= 1 && Math.abs(S - a) <= 1 && w > x && _.axisExtent0 === b[0] && _.axisExtent1 === b[1] ? x = w : (_.lastTickCount = a, _.lastAutoInterval = x, _.axisExtent0 = b[0], _.axisExtent1 = b[1]), x
  15629. }(this)
  15630. }, t
  15631. }();
  15632. function ib(t, e) {
  15633. var n = (t[1] - t[0]) / e / 2;
  15634. t[0] += n, t[1] -= n
  15635. }
  15636. var rb = 2 * Math.PI,
  15637. ob = os.CMD,
  15638. ab = ["top", "right", "bottom", "left"];
  15639. function sb(t, e, n, i, r) {
  15640. var o = n.width,
  15641. a = n.height;
  15642. switch (t) {
  15643. case "top":
  15644. i.set(n.x + o / 2, n.y - e), r.set(0, -1);
  15645. break;
  15646. case "bottom":
  15647. i.set(n.x + o / 2, n.y + a + e), r.set(0, 1);
  15648. break;
  15649. case "left":
  15650. i.set(n.x - e, n.y + a / 2), r.set(-1, 0);
  15651. break;
  15652. case "right":
  15653. i.set(n.x + o + e, n.y + a / 2), r.set(1, 0)
  15654. }
  15655. }
  15656. function lb(t, e, n, i, r, o, a, s, l) {
  15657. a -= t, s -= e;
  15658. var u = Math.sqrt(a * a + s * s),
  15659. h = (a /= u) * n + t,
  15660. c = (s /= u) * n + e;
  15661. if (Math.abs(i - r) % rb < 1e-4) return l[0] = h, l[1] = c, u - n;
  15662. if (o) {
  15663. var p = i;
  15664. i = hs(r), r = hs(p)
  15665. } else i = hs(i), r = hs(r);
  15666. i > r && (r += rb);
  15667. var d = Math.atan2(s, a);
  15668. if (d < 0 && (d += rb), d >= i && d <= r || d + rb >= i && d + rb <= r) return l[0] = h, l[1] = c, u - n;
  15669. var f = n * Math.cos(i) + t,
  15670. g = n * Math.sin(i) + e,
  15671. y = n * Math.cos(r) + t,
  15672. v = n * Math.sin(r) + e,
  15673. m = (f - a) * (f - a) + (g - s) * (g - s),
  15674. x = (y - a) * (y - a) + (v - s) * (v - s);
  15675. return m < x ? (l[0] = f, l[1] = g, Math.sqrt(m)) : (l[0] = y, l[1] = v, Math.sqrt(x))
  15676. }
  15677. function ub(t, e, n, i, r, o, a, s) {
  15678. var l = r - t,
  15679. u = o - e,
  15680. h = n - t,
  15681. c = i - e,
  15682. p = Math.sqrt(h * h + c * c),
  15683. d = (l * (h /= p) + u * (c /= p)) / p;
  15684. s && (d = Math.min(Math.max(d, 0), 1)), d *= p;
  15685. var f = a[0] = t + d * h,
  15686. g = a[1] = e + d * c;
  15687. return Math.sqrt((f - r) * (f - r) + (g - o) * (g - o))
  15688. }
  15689. function hb(t, e, n, i, r, o, a) {
  15690. n < 0 && (t += n, n = -n), i < 0 && (e += i, i = -i);
  15691. var s = t + n,
  15692. l = e + i,
  15693. u = a[0] = Math.min(Math.max(r, t), s),
  15694. h = a[1] = Math.min(Math.max(o, e), l);
  15695. return Math.sqrt((u - r) * (u - r) + (h - o) * (h - o))
  15696. }
  15697. var cb = [];
  15698. function pb(t, e, n) {
  15699. var i = hb(e.x, e.y, e.width, e.height, t.x, t.y, cb);
  15700. return n.set(cb[0], cb[1]), i
  15701. }
  15702. function db(t, e, n) {
  15703. for (var i, r, o = 0, a = 0, s = 0, l = 0, u = 1 / 0, h = e.data, c = t.x, p = t.y, d = 0; d < h.length;) {
  15704. var f = h[d++];
  15705. 1 === d && (s = o = h[d], l = a = h[d + 1]);
  15706. var g = u;
  15707. switch (f) {
  15708. case ob.M:
  15709. o = s = h[d++], a = l = h[d++];
  15710. break;
  15711. case ob.L:
  15712. g = ub(o, a, h[d], h[d + 1], c, p, cb, !0), o = h[d++], a = h[d++];
  15713. break;
  15714. case ob.C:
  15715. g = Sn(o, a, h[d++], h[d++], h[d++], h[d++], h[d], h[d + 1], c, p, cb), o = h[d++], a = h[d++];
  15716. break;
  15717. case ob.Q:
  15718. g = An(o, a, h[d++], h[d++], h[d], h[d + 1], c, p, cb), o = h[d++], a = h[d++];
  15719. break;
  15720. case ob.A:
  15721. var y = h[d++],
  15722. v = h[d++],
  15723. m = h[d++],
  15724. x = h[d++],
  15725. _ = h[d++],
  15726. b = h[d++];
  15727. d += 1;
  15728. var w = !!(1 - h[d++]);
  15729. i = Math.cos(_) * m + y, r = Math.sin(_) * x + v, d <= 1 && (s = i, l = r), g = lb(y, v, x, _, _ + b, w, (c - y) * x / m + y, p, cb), o = Math.cos(_ + b) * m + y, a = Math.sin(_ + b) * x + v;
  15730. break;
  15731. case ob.R:
  15732. g = hb(s = o = h[d++], l = a = h[d++], h[d++], h[d++], c, p, cb);
  15733. break;
  15734. case ob.Z:
  15735. g = ub(o, a, s, l, c, p, cb, !0), o = s, a = l
  15736. }
  15737. g < u && (u = g, n.set(cb[0], cb[1]))
  15738. }
  15739. return u
  15740. }
  15741. var fb = new De,
  15742. gb = new De,
  15743. yb = new De,
  15744. vb = new De,
  15745. mb = new De;
  15746. function xb(t, e) {
  15747. if (t) {
  15748. var n = t.getTextGuideLine(),
  15749. i = t.getTextContent();
  15750. if (i && n) {
  15751. var r = t.textGuideLineConfig || {},
  15752. o = [
  15753. [0, 0],
  15754. [0, 0],
  15755. [0, 0]
  15756. ],
  15757. a = r.candidates || ab,
  15758. s = i.getBoundingRect().clone();
  15759. s.applyTransform(i.getComputedTransform());
  15760. var l = 1 / 0,
  15761. u = r.anchor,
  15762. h = t.getComputedTransform(),
  15763. c = h && Ie([], h),
  15764. p = e.get("length2") || 0;
  15765. u && yb.copy(u);
  15766. for (var d = 0; d < a.length; d++) {
  15767. sb(a[d], 0, s, fb, vb), De.scaleAndAdd(gb, fb, vb, p), gb.transform(c);
  15768. var f = t.getBoundingRect(),
  15769. g = u ? u.distance(gb) : t instanceof Is ? db(gb, t.path, yb) : pb(gb, f, yb);
  15770. g < l && (l = g, gb.transform(h), yb.transform(h), yb.toArray(o[0]), gb.toArray(o[1]), fb.toArray(o[2]))
  15771. }
  15772. wb(o, e.get("minTurnAngle")), n.setShape({
  15773. points: o
  15774. })
  15775. }
  15776. }
  15777. }
  15778. var _b = [],
  15779. bb = new De;
  15780. function wb(t, e) {
  15781. if (e <= 180 && e > 0) {
  15782. e = e / 180 * Math.PI, fb.fromArray(t[0]), gb.fromArray(t[1]), yb.fromArray(t[2]), De.sub(vb, fb, gb), De.sub(mb, yb, gb);
  15783. var n = vb.len(),
  15784. i = mb.len();
  15785. if (!(n < .001 || i < .001)) {
  15786. vb.scale(1 / n), mb.scale(1 / i);
  15787. var r = vb.dot(mb);
  15788. if (Math.cos(e) < r) {
  15789. var o = ub(gb.x, gb.y, yb.x, yb.y, fb.x, fb.y, _b, !1);
  15790. bb.fromArray(_b), bb.scaleAndAdd(mb, o / Math.tan(Math.PI - e));
  15791. var a = yb.x !== gb.x ? (bb.x - gb.x) / (yb.x - gb.x) : (bb.y - gb.y) / (yb.y - gb.y);
  15792. if (isNaN(a)) return;
  15793. a < 0 ? De.copy(bb, gb) : a > 1 && De.copy(bb, yb), bb.toArray(t[1])
  15794. }
  15795. }
  15796. }
  15797. }
  15798. function Sb(t, e, n) {
  15799. if (n <= 180 && n > 0) {
  15800. n = n / 180 * Math.PI, fb.fromArray(t[0]), gb.fromArray(t[1]), yb.fromArray(t[2]), De.sub(vb, gb, fb), De.sub(mb, yb, gb);
  15801. var i = vb.len(),
  15802. r = mb.len();
  15803. if (!(i < .001 || r < .001))
  15804. if (vb.scale(1 / i), mb.scale(1 / r), vb.dot(e) < Math.cos(n)) {
  15805. var o = ub(gb.x, gb.y, yb.x, yb.y, fb.x, fb.y, _b, !1);
  15806. bb.fromArray(_b);
  15807. var a = Math.PI / 2,
  15808. s = a + Math.acos(mb.dot(e)) - n;
  15809. if (s >= a) De.copy(bb, yb);
  15810. else {
  15811. bb.scaleAndAdd(mb, o / Math.tan(Math.PI / 2 - s));
  15812. var l = yb.x !== gb.x ? (bb.x - gb.x) / (yb.x - gb.x) : (bb.y - gb.y) / (yb.y - gb.y);
  15813. if (isNaN(l)) return;
  15814. l < 0 ? De.copy(bb, gb) : l > 1 && De.copy(bb, yb)
  15815. }
  15816. bb.toArray(t[1])
  15817. }
  15818. }
  15819. }
  15820. function Mb(t, e, n, i) {
  15821. var r = "normal" === n,
  15822. o = r ? t : t.ensureState(n);
  15823. o.ignore = e;
  15824. var a = i.get("smooth");
  15825. a && !0 === a && (a = .3), o.shape = o.shape || {}, a > 0 && (o.shape.smooth = a);
  15826. var s = i.getModel("lineStyle").getLineStyle();
  15827. r ? t.useStyle(s) : o.style = s
  15828. }
  15829. function Ib(t, e) {
  15830. var n = e.smooth,
  15831. i = e.points;
  15832. if (i)
  15833. if (t.moveTo(i[0][0], i[0][1]), n > 0 && i.length >= 3) {
  15834. var r = Vt(i[0], i[1]),
  15835. o = Vt(i[1], i[2]);
  15836. if (!r || !o) return t.lineTo(i[1][0], i[1][1]), void t.lineTo(i[2][0], i[2][1]);
  15837. var a = Math.min(r, o) * n,
  15838. s = Gt([], i[1], i[0], a / r),
  15839. l = Gt([], i[1], i[2], a / o),
  15840. u = Gt([], s, l, .5);
  15841. t.bezierCurveTo(s[0], s[1], s[0], s[1], u[0], u[1]), t.bezierCurveTo(l[0], l[1], l[0], l[1], i[2][0], i[2][1])
  15842. } else
  15843. for (var h = 1; h < i.length; h++) t.lineTo(i[h][0], i[h][1])
  15844. }
  15845. function Tb(t, e, n) {
  15846. var i = t.getTextGuideLine(),
  15847. r = t.getTextContent();
  15848. if (r) {
  15849. for (var o = e.normal, a = o.get("show"), s = r.ignore, l = 0; l < al.length; l++) {
  15850. var u = al[l],
  15851. h = e[u],
  15852. c = "normal" === u;
  15853. if (h) {
  15854. var p = h.get("show");
  15855. if ((c ? s : rt(r.states[u] && r.states[u].ignore, s)) || !rt(p, a)) {
  15856. var d = c ? i : i && i.states[u];
  15857. d && (d.ignore = !0);
  15858. continue
  15859. }
  15860. i || (i = new Yu, t.setTextGuideLine(i), c || !s && a || Mb(i, !0, "normal", e.normal), t.stateProxy && (i.stateProxy = t.stateProxy)), Mb(i, !1, u, h)
  15861. }
  15862. }
  15863. if (i) {
  15864. k(i.style, n), i.style.fill = null;
  15865. var f = o.get("showAbove");
  15866. (t.textGuideLineConfig = t.textGuideLineConfig || {}).showAbove = f || !1, i.buildPath = Ib
  15867. }
  15868. } else i && t.removeTextGuideLine()
  15869. }
  15870. function Cb(t, e) {
  15871. e = e || "labelLine";
  15872. for (var n = {
  15873. normal: t.getModel(e)
  15874. }, i = 0; i < ol.length; i++) {
  15875. var r = ol[i];
  15876. n[r] = t.getModel([r, e])
  15877. }
  15878. return n
  15879. }
  15880. function Db(t) {
  15881. for (var e = [], n = 0; n < t.length; n++) {
  15882. var i = t[n];
  15883. if (!i.defaultAttr.ignore) {
  15884. var r = i.label,
  15885. o = r.getComputedTransform(),
  15886. a = r.getBoundingRect(),
  15887. s = !o || o[1] < 1e-5 && o[2] < 1e-5,
  15888. l = r.style.margin || 0,
  15889. u = a.clone();
  15890. u.applyTransform(o), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
  15891. var h = s ? new lh(a, o) : null;
  15892. e.push({
  15893. label: r,
  15894. labelLine: i.labelLine,
  15895. rect: u,
  15896. localRect: a,
  15897. obb: h,
  15898. priority: i.priority,
  15899. defaultAttr: i.defaultAttr,
  15900. layoutOption: i.computedLayoutOption,
  15901. axisAligned: s,
  15902. transform: o
  15903. })
  15904. }
  15905. }
  15906. return e
  15907. }
  15908. function Ab(t, e, n, i, r, o) {
  15909. var a = t.length;
  15910. if (!(a < 2)) {
  15911. t.sort((function (t, n) {
  15912. return t.rect[e] - n.rect[e]
  15913. }));
  15914. for (var s, l = 0, u = !1, h = 0, c = 0; c < a; c++) {
  15915. var p = t[c],
  15916. d = p.rect;
  15917. (s = d[e] - l) < 0 && (d[e] -= s, p.label[e] -= s, u = !0), h += Math.max(-s, 0), l = d[e] + d[n]
  15918. }
  15919. h > 0 && o && _(-h / a, 0, a);
  15920. var f, g, y = t[0],
  15921. v = t[a - 1];
  15922. return m(), f < 0 && b(-f, .8), g < 0 && b(g, .8), m(), x(f, g, 1), x(g, f, -1), m(), f < 0 && w(-f), g < 0 && w(g), u
  15923. }
  15924. function m() {
  15925. f = y.rect[e] - i, g = r - v.rect[e] - v.rect[n]
  15926. }
  15927. function x(t, e, n) {
  15928. if (t < 0) {
  15929. var i = Math.min(e, -t);
  15930. if (i > 0) {
  15931. _(i * n, 0, a);
  15932. var r = i + t;
  15933. r < 0 && b(-r * n, 1)
  15934. } else b(-t * n, 1)
  15935. }
  15936. }
  15937. function _(n, i, r) {
  15938. 0 !== n && (u = !0);
  15939. for (var o = i; o < r; o++) {
  15940. var a = t[o];
  15941. a.rect[e] += n, a.label[e] += n
  15942. }
  15943. }
  15944. function b(i, r) {
  15945. for (var o = [], s = 0, l = 1; l < a; l++) {
  15946. var u = t[l - 1].rect,
  15947. h = Math.max(t[l].rect[e] - u[e] - u[n], 0);
  15948. o.push(h), s += h
  15949. }
  15950. if (s) {
  15951. var c = Math.min(Math.abs(i) / s, r);
  15952. if (i > 0)
  15953. for (l = 0; l < a - 1; l++) {
  15954. _(o[l] * c, 0, l + 1)
  15955. } else
  15956. for (l = a - 1; l > 0; l--) {
  15957. _(-(o[l - 1] * c), l, a)
  15958. }
  15959. }
  15960. }
  15961. function w(t) {
  15962. var e = t < 0 ? -1 : 1;
  15963. t = Math.abs(t);
  15964. for (var n = Math.ceil(t / (a - 1)), i = 0; i < a - 1; i++)
  15965. if (e > 0 ? _(n, 0, i + 1) : _(-n, a - i - 1, a), (t -= n) <= 0) return
  15966. }
  15967. }
  15968. function kb(t, e, n, i) {
  15969. return Ab(t, "y", "height", e, n, i)
  15970. }
  15971. function Lb(t) {
  15972. var e = [];
  15973. t.sort((function (t, e) {
  15974. return e.priority - t.priority
  15975. }));
  15976. var n = new ze(0, 0, 0, 0);
  15977. function i(t) {
  15978. if (!t.ignore) {
  15979. var e = t.ensureState("emphasis");
  15980. null == e.ignore && (e.ignore = !1)
  15981. }
  15982. t.ignore = !0
  15983. }
  15984. for (var r = 0; r < t.length; r++) {
  15985. var o = t[r],
  15986. a = o.axisAligned,
  15987. s = o.localRect,
  15988. l = o.transform,
  15989. u = o.label,
  15990. h = o.labelLine;
  15991. n.copy(o.rect), n.width -= .1, n.height -= .1, n.x += .05, n.y += .05;
  15992. for (var c = o.obb, p = !1, d = 0; d < e.length; d++) {
  15993. var f = e[d];
  15994. if (n.intersect(f.rect)) {
  15995. if (a && f.axisAligned) {
  15996. p = !0;
  15997. break
  15998. }
  15999. if (f.obb || (f.obb = new lh(f.localRect, f.transform)), c || (c = new lh(s, l)), c.intersect(f.obb)) {
  16000. p = !0;
  16001. break
  16002. }
  16003. }
  16004. }
  16005. p ? (i(u), h && i(h)) : (u.attr("ignore", o.defaultAttr.ignore), h && h.attr("ignore", o.defaultAttr.labelGuideIgnore), e.push(o))
  16006. }
  16007. }
  16008. function Pb(t) {
  16009. if (t) {
  16010. for (var e = [], n = 0; n < t.length; n++) e.push(t[n].slice());
  16011. return e
  16012. }
  16013. }
  16014. function Ob(t, e) {
  16015. var n = t.label,
  16016. i = e && e.getTextGuideLine();
  16017. return {
  16018. dataIndex: t.dataIndex,
  16019. dataType: t.dataType,
  16020. seriesIndex: t.seriesModel.seriesIndex,
  16021. text: t.label.style.text,
  16022. rect: t.hostRect,
  16023. labelRect: t.rect,
  16024. align: n.style.align,
  16025. verticalAlign: n.style.verticalAlign,
  16026. labelLinePoints: Pb(i && i.shape.points)
  16027. }
  16028. }
  16029. var Rb = ["align", "verticalAlign", "width", "height", "fontSize"],
  16030. Nb = new gr,
  16031. Eb = Oo(),
  16032. zb = Oo();
  16033. function Vb(t, e, n) {
  16034. for (var i = 0; i < n.length; i++) {
  16035. var r = n[i];
  16036. null != e[r] && (t[r] = e[r])
  16037. }
  16038. }
  16039. var Bb = ["x", "y", "rotation"],
  16040. Fb = function () {
  16041. function t() {
  16042. this._labelList = [], this._chartViewList = []
  16043. }
  16044. return t.prototype.clearLabels = function () {
  16045. this._labelList = [], this._chartViewList = []
  16046. }, t.prototype._addLabel = function (t, e, n, i, r) {
  16047. var o = i.style,
  16048. a = i.__hostTarget.textConfig || {},
  16049. s = i.getComputedTransform(),
  16050. l = i.getBoundingRect().plain();
  16051. ze.applyTransform(l, l, s), s ? Nb.setLocalTransform(s) : (Nb.x = Nb.y = Nb.rotation = Nb.originX = Nb.originY = 0, Nb.scaleX = Nb.scaleY = 1);
  16052. var u, h = i.__hostTarget;
  16053. if (h) {
  16054. u = h.getBoundingRect().plain();
  16055. var c = h.getComputedTransform();
  16056. ze.applyTransform(u, u, c)
  16057. }
  16058. var p = u && h.getTextGuideLine();
  16059. this._labelList.push({
  16060. label: i,
  16061. labelLine: p,
  16062. seriesModel: n,
  16063. dataIndex: t,
  16064. dataType: e,
  16065. layoutOption: r,
  16066. computedLayoutOption: null,
  16067. rect: l,
  16068. hostRect: u,
  16069. priority: u ? u.width * u.height : 0,
  16070. defaultAttr: {
  16071. ignore: i.ignore,
  16072. labelGuideIgnore: p && p.ignore,
  16073. x: Nb.x,
  16074. y: Nb.y,
  16075. scaleX: Nb.scaleX,
  16076. scaleY: Nb.scaleY,
  16077. rotation: Nb.rotation,
  16078. style: {
  16079. x: o.x,
  16080. y: o.y,
  16081. align: o.align,
  16082. verticalAlign: o.verticalAlign,
  16083. width: o.width,
  16084. height: o.height,
  16085. fontSize: o.fontSize
  16086. },
  16087. cursor: i.cursor,
  16088. attachedPos: a.position,
  16089. attachedRot: a.rotation
  16090. }
  16091. })
  16092. }, t.prototype.addLabelsOfSeries = function (t) {
  16093. var e = this;
  16094. this._chartViewList.push(t);
  16095. var n = t.__model,
  16096. i = n.get("labelLayout");
  16097. (X(i) || G(i).length) && t.group.traverse((function (t) {
  16098. if (t.ignore) return !0;
  16099. var r = t.getTextContent(),
  16100. o = Qs(t);
  16101. r && !r.disableLabelLayout && e._addLabel(o.dataIndex, o.dataType, n, r, i)
  16102. }))
  16103. }, t.prototype.updateLayoutConfig = function (t) {
  16104. var e = t.getWidth(),
  16105. n = t.getHeight();
  16106. function i(t, e) {
  16107. return function () {
  16108. xb(t, e)
  16109. }
  16110. }
  16111. for (var r = 0; r < this._labelList.length; r++) {
  16112. var o = this._labelList[r],
  16113. a = o.label,
  16114. s = a.__hostTarget,
  16115. l = o.defaultAttr,
  16116. u = void 0;
  16117. u = (u = X(o.layoutOption) ? o.layoutOption(Ob(o, s)) : o.layoutOption) || {}, o.computedLayoutOption = u;
  16118. var h = Math.PI / 180;
  16119. s && s.setTextConfig({
  16120. local: !1,
  16121. position: null != u.x || null != u.y ? null : l.attachedPos,
  16122. rotation: null != u.rotate ? u.rotate * h : l.attachedRot,
  16123. offset: [u.dx || 0, u.dy || 0]
  16124. });
  16125. var c = !1;
  16126. if (null != u.x ? (a.x = Ur(u.x, e), a.setStyle("x", 0), c = !0) : (a.x = l.x, a.setStyle("x", l.style.x)), null != u.y ? (a.y = Ur(u.y, n), a.setStyle("y", 0), c = !0) : (a.y = l.y, a.setStyle("y", l.style.y)), u.labelLinePoints) {
  16127. var p = s.getTextGuideLine();
  16128. p && (p.setShape({
  16129. points: u.labelLinePoints
  16130. }), c = !1)
  16131. }
  16132. Eb(a).needsUpdateLabelLine = c, a.rotation = null != u.rotate ? u.rotate * h : l.rotation, a.scaleX = l.scaleX, a.scaleY = l.scaleY;
  16133. for (var d = 0; d < Rb.length; d++) {
  16134. var f = Rb[d];
  16135. a.setStyle(f, null != u[f] ? u[f] : l.style[f])
  16136. }
  16137. if (u.draggable) {
  16138. if (a.draggable = !0, a.cursor = "move", s) {
  16139. var g = o.seriesModel;
  16140. if (null != o.dataIndex) g = o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex);
  16141. a.on("drag", i(s, g.getModel("labelLine")))
  16142. }
  16143. } else a.off("drag"), a.cursor = l.cursor
  16144. }
  16145. }, t.prototype.layout = function (t) {
  16146. var e, n = t.getWidth(),
  16147. i = t.getHeight(),
  16148. r = Db(this._labelList),
  16149. o = B(r, (function (t) {
  16150. return "shiftX" === t.layoutOption.moveOverlap
  16151. })),
  16152. a = B(r, (function (t) {
  16153. return "shiftY" === t.layoutOption.moveOverlap
  16154. }));
  16155. Ab(o, "x", "width", 0, n, e), kb(a, 0, i), Lb(B(r, (function (t) {
  16156. return t.layoutOption.hideOverlap
  16157. })))
  16158. }, t.prototype.processLabelsOverall = function () {
  16159. var t = this;
  16160. E(this._chartViewList, (function (e) {
  16161. var n = e.__model,
  16162. i = e.ignoreLabelLineUpdate,
  16163. r = n.isAnimationEnabled();
  16164. e.group.traverse((function (e) {
  16165. if (e.ignore && !e.forceLabelAnimation) return !0;
  16166. var o = !i,
  16167. a = e.getTextContent();
  16168. !o && a && (o = Eb(a).needsUpdateLabelLine), o && t._updateLabelLine(e, n), r && t._animateLabels(e, n)
  16169. }))
  16170. }))
  16171. }, t.prototype._updateLabelLine = function (t, e) {
  16172. var n = t.getTextContent(),
  16173. i = Qs(t),
  16174. r = i.dataIndex;
  16175. if (n && null != r) {
  16176. var o = e.getData(i.dataType),
  16177. a = o.getItemModel(r),
  16178. s = {},
  16179. l = o.getItemVisual(r, "style"),
  16180. u = o.getVisual("drawType");
  16181. s.stroke = l[u];
  16182. var h = a.getModel("labelLine");
  16183. Tb(t, Cb(a), s), xb(t, h)
  16184. }
  16185. }, t.prototype._animateLabels = function (t, e) {
  16186. var n = t.getTextContent(),
  16187. i = t.getTextGuideLine();
  16188. if (n && (t.forceLabelAnimation || !n.ignore && !n.invisible && !t.disableLabelAnimation && !yh(t))) {
  16189. var r = (d = Eb(n)).oldLayout,
  16190. o = Qs(t),
  16191. a = o.dataIndex,
  16192. s = {
  16193. x: n.x,
  16194. y: n.y,
  16195. rotation: n.rotation
  16196. },
  16197. l = e.getData(o.dataType);
  16198. if (r) {
  16199. n.attr(r);
  16200. var u = t.prevStates;
  16201. u && (P(u, "select") >= 0 && n.attr(d.oldLayoutSelect), P(u, "emphasis") >= 0 && n.attr(d.oldLayoutEmphasis)), fh(n, s, e, a)
  16202. } else if (n.attr(s), !uc(n).valueAnimation) {
  16203. var h = rt(n.style.opacity, 1);
  16204. n.style.opacity = 0, gh(n, {
  16205. style: {
  16206. opacity: h
  16207. }
  16208. }, e, a)
  16209. }
  16210. if (d.oldLayout = s, n.states.select) {
  16211. var c = d.oldLayoutSelect = {};
  16212. Vb(c, s, Bb), Vb(c, n.states.select, Bb)
  16213. }
  16214. if (n.states.emphasis) {
  16215. var p = d.oldLayoutEmphasis = {};
  16216. Vb(p, s, Bb), Vb(p, n.states.emphasis, Bb)
  16217. }
  16218. cc(n, a, l, e, e)
  16219. }
  16220. if (i && !i.ignore && !i.invisible) {
  16221. r = (d = zb(i)).oldLayout;
  16222. var d, f = {
  16223. points: i.shape.points
  16224. };
  16225. r ? (i.attr({
  16226. shape: r
  16227. }), fh(i, {
  16228. shape: f
  16229. }, e)) : (i.setShape(f), i.style.strokePercent = 0, gh(i, {
  16230. style: {
  16231. strokePercent: 1
  16232. }
  16233. }, e)), d.oldLayout = f
  16234. }
  16235. }, t
  16236. }(),
  16237. Gb = Oo();
  16238. var Wb = Math.sin,
  16239. Hb = Math.cos,
  16240. Yb = Math.PI,
  16241. Xb = 2 * Math.PI,
  16242. Ub = 180 / Yb,
  16243. Zb = function () {
  16244. function t() {}
  16245. return t.prototype.reset = function (t) {
  16246. this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, t || 4)
  16247. }, t.prototype.moveTo = function (t, e) {
  16248. this._add("M", t, e)
  16249. }, t.prototype.lineTo = function (t, e) {
  16250. this._add("L", t, e)
  16251. }, t.prototype.bezierCurveTo = function (t, e, n, i, r, o) {
  16252. this._add("C", t, e, n, i, r, o)
  16253. }, t.prototype.quadraticCurveTo = function (t, e, n, i) {
  16254. this._add("Q", t, e, n, i)
  16255. }, t.prototype.arc = function (t, e, n, i, r, o) {
  16256. this.ellipse(t, e, n, n, 0, i, r, o)
  16257. }, t.prototype.ellipse = function (t, e, n, i, r, o, a, s) {
  16258. var l = a - o,
  16259. u = !s,
  16260. h = Math.abs(l),
  16261. c = hi(h - Xb) || (u ? l >= Xb : -l >= Xb),
  16262. p = l > 0 ? l % Xb : l % Xb + Xb,
  16263. d = !1;
  16264. d = !!c || !hi(h) && p >= Yb == !!u;
  16265. var f = t + n * Hb(o),
  16266. g = e + i * Wb(o);
  16267. this._start && this._add("M", f, g);
  16268. var y = Math.round(r * Ub);
  16269. if (c) {
  16270. var v = 1 / this._p,
  16271. m = (u ? 1 : -1) * (Xb - v);
  16272. this._add("A", n, i, y, 1, +u, t + n * Hb(o + m), e + i * Wb(o + m)), v > .01 && this._add("A", n, i, y, 0, +u, f, g)
  16273. } else {
  16274. var x = t + n * Hb(a),
  16275. _ = e + i * Wb(a);
  16276. this._add("A", n, i, y, +d, +u, x, _)
  16277. }
  16278. }, t.prototype.rect = function (t, e, n, i) {
  16279. this._add("M", t, e), this._add("l", n, 0), this._add("l", 0, i), this._add("l", -n, 0), this._add("Z")
  16280. }, t.prototype.closePath = function () {
  16281. this._d.length > 0 && this._add("Z")
  16282. }, t.prototype._add = function (t, e, n, i, r, o, a, s, l) {
  16283. for (var u = [], h = this._p, c = 1; c < arguments.length; c++) {
  16284. var p = arguments[c];
  16285. if (isNaN(p)) return void(this._invalid = !0);
  16286. u.push(Math.round(p * h) / h)
  16287. }
  16288. this._d.push(t + u.join(" ")), this._start = "Z" === t
  16289. }, t.prototype.generateStr = function () {
  16290. this._str = this._invalid ? "" : this._d.join(""), this._d = []
  16291. }, t.prototype.getStr = function () {
  16292. return this._str
  16293. }, t
  16294. }(),
  16295. jb = "none",
  16296. qb = Math.round;
  16297. var Kb = ["lineCap", "miterLimit", "lineJoin"],
  16298. $b = z(Kb, (function (t) {
  16299. return "stroke-" + t.toLowerCase()
  16300. }));
  16301. function Jb(t, e, n, i) {
  16302. var r = null == e.opacity ? 1 : e.opacity;
  16303. if (n instanceof ks) t("opacity", r);
  16304. else {
  16305. if (function (t) {
  16306. var e = t.fill;
  16307. return null != e && e !== jb
  16308. }(e)) {
  16309. var o = li(e.fill);
  16310. t("fill", o.color);
  16311. var a = null != e.fillOpacity ? e.fillOpacity * o.opacity * r : o.opacity * r;
  16312. (i || a < 1) && t("fill-opacity", a)
  16313. } else t("fill", jb);
  16314. if (function (t) {
  16315. var e = t.stroke;
  16316. return null != e && e !== jb
  16317. }(e)) {
  16318. var s = li(e.stroke);
  16319. t("stroke", s.color);
  16320. var l = e.strokeNoScale ? n.getLineScale() : 1,
  16321. u = l ? (e.lineWidth || 0) / l : 0,
  16322. h = null != e.strokeOpacity ? e.strokeOpacity * s.opacity * r : s.opacity * r,
  16323. c = e.strokeFirst;
  16324. if ((i || 1 !== u) && t("stroke-width", u), (i || c) && t("paint-order", c ? "stroke" : "fill"), (i || h < 1) && t("stroke-opacity", h), e.lineDash) {
  16325. var p = qy(n),
  16326. d = p[0],
  16327. f = p[1];
  16328. d && (f = qb(f || 0), t("stroke-dasharray", d.join(",")), (f || i) && t("stroke-dashoffset", f))
  16329. } else i && t("stroke-dasharray", jb);
  16330. for (var g = 0; g < Kb.length; g++) {
  16331. var y = Kb[g];
  16332. if (i || e[y] !== ws[y]) {
  16333. var v = e[y] || ws[y];
  16334. v && t($b[g], v)
  16335. }
  16336. }
  16337. } else i && t("stroke", jb)
  16338. }
  16339. }
  16340. var Qb = "http://www.w3.org/2000/svg",
  16341. tw = "http://www.w3.org/1999/xlink";
  16342. function ew(t) {
  16343. return document.createElementNS(Qb, t)
  16344. }
  16345. function nw(t, e, n, i, r) {
  16346. return {
  16347. tag: t,
  16348. attrs: n || {},
  16349. children: i,
  16350. text: r,
  16351. key: e
  16352. }
  16353. }
  16354. function iw(t, e) {
  16355. var n = (e = e || {}).newline ? "\n" : "";
  16356. return function t(e) {
  16357. var i = e.children,
  16358. r = e.tag,
  16359. o = e.attrs,
  16360. a = e.text;
  16361. return function (t, e) {
  16362. var n = [];
  16363. if (e)
  16364. for (var i in e) {
  16365. var r = e[i],
  16366. o = i;
  16367. !1 !== r && (!0 !== r && null != r && (o += '="' + r + '"'), n.push(o))
  16368. }
  16369. return "<" + t + " " + n.join(" ") + ">"
  16370. }(r, o) + ("style" !== r ? re(a) : a || "") + (i ? "" + n + z(i, (function (e) {
  16371. return t(e)
  16372. })).join(n) + n : "") + ("</" + r + ">")
  16373. }(t)
  16374. }
  16375. function rw(t) {
  16376. return {
  16377. zrId: t,
  16378. shadowCache: {},
  16379. patternCache: {},
  16380. gradientCache: {},
  16381. clipPathCache: {},
  16382. defs: {},
  16383. cssNodes: {},
  16384. cssAnims: {},
  16385. cssClassIdx: 0,
  16386. cssAnimIdx: 0,
  16387. shadowIdx: 0,
  16388. gradientIdx: 0,
  16389. patternIdx: 0,
  16390. clipPathIdx: 0
  16391. }
  16392. }
  16393. function ow(t, e, n, i) {
  16394. return nw("svg", "root", {
  16395. width: t,
  16396. height: e,
  16397. xmlns: Qb,
  16398. "xmlns:xlink": tw,
  16399. version: "1.1",
  16400. baseProfile: "full",
  16401. viewBox: !!i && "0 0 " + t + " " + e
  16402. }, n)
  16403. }
  16404. var aw = {
  16405. cubicIn: "0.32,0,0.67,0",
  16406. cubicOut: "0.33,1,0.68,1",
  16407. cubicInOut: "0.65,0,0.35,1",
  16408. quadraticIn: "0.11,0,0.5,0",
  16409. quadraticOut: "0.5,1,0.89,1",
  16410. quadraticInOut: "0.45,0,0.55,1",
  16411. quarticIn: "0.5,0,0.75,0",
  16412. quarticOut: "0.25,1,0.5,1",
  16413. quarticInOut: "0.76,0,0.24,1",
  16414. quinticIn: "0.64,0,0.78,0",
  16415. quinticOut: "0.22,1,0.36,1",
  16416. quinticInOut: "0.83,0,0.17,1",
  16417. sinusoidalIn: "0.12,0,0.39,0",
  16418. sinusoidalOut: "0.61,1,0.88,1",
  16419. sinusoidalInOut: "0.37,0,0.63,1",
  16420. exponentialIn: "0.7,0,0.84,0",
  16421. exponentialOut: "0.16,1,0.3,1",
  16422. exponentialInOut: "0.87,0,0.13,1",
  16423. circularIn: "0.55,0,1,0.45",
  16424. circularOut: "0,0.55,0.45,1",
  16425. circularInOut: "0.85,0,0.15,1"
  16426. },
  16427. sw = "transform-origin";
  16428. function lw(t, e, n) {
  16429. var i = A({}, t.shape);
  16430. A(i, e), t.buildPath(n, i);
  16431. var r = new Zb;
  16432. return r.reset(_i(t)), n.rebuildPath(r, 1), r.generateStr(), r.getStr()
  16433. }
  16434. function uw(t, e) {
  16435. var n = e.originX,
  16436. i = e.originY;
  16437. (n || i) && (t[sw] = n + "px " + i + "px")
  16438. }
  16439. var hw = {
  16440. fill: "fill",
  16441. opacity: "opacity",
  16442. lineWidth: "stroke-width",
  16443. lineDashOffset: "stroke-dashoffset"
  16444. };
  16445. function cw(t, e) {
  16446. var n = e.zrId + "-ani-" + e.cssAnimIdx++;
  16447. return e.cssAnims[n] = t, n
  16448. }
  16449. function pw(t) {
  16450. return U(t) ? aw[t] ? "cubic-bezier(" + aw[t] + ")" : Pn(t) ? t : "" : ""
  16451. }
  16452. function dw(t, e, n, i) {
  16453. var r = t.animators,
  16454. o = r.length,
  16455. a = [];
  16456. if (t instanceof th) {
  16457. var s = function (t, e, n) {
  16458. var i, r, o = t.shape.paths,
  16459. a = {};
  16460. if (E(o, (function (t) {
  16461. var e = rw(n.zrId);
  16462. e.animation = !0, dw(t, {}, e, !0);
  16463. var o = e.cssAnims,
  16464. s = e.cssNodes,
  16465. l = G(o),
  16466. u = l.length;
  16467. if (u) {
  16468. var h = o[r = l[u - 1]];
  16469. for (var c in h) {
  16470. var p = h[c];
  16471. a[c] = a[c] || {
  16472. d: ""
  16473. }, a[c].d += p.d || ""
  16474. }
  16475. for (var d in s) {
  16476. var f = s[d].animation;
  16477. f.indexOf(r) >= 0 && (i = f)
  16478. }
  16479. }
  16480. })), i) {
  16481. e.d = !1;
  16482. var s = cw(a, n);
  16483. return i.replace(r, s)
  16484. }
  16485. }(t, e, n);
  16486. if (s) a.push(s);
  16487. else if (!o) return
  16488. } else if (!o) return;
  16489. for (var l = {}, u = 0; u < o; u++) {
  16490. var h = r[u],
  16491. c = [h.getMaxTime() / 1e3 + "s"],
  16492. p = pw(h.getClip().easing),
  16493. d = h.getDelay();
  16494. p ? c.push(p) : c.push("linear"), d && c.push(d / 1e3 + "s"), h.getLoop() && c.push("infinite");
  16495. var f = c.join(" ");
  16496. l[f] = l[f] || [f, []], l[f][1].push(h)
  16497. }
  16498. function g(r) {
  16499. var o, a = r[1],
  16500. s = a.length,
  16501. l = {},
  16502. u = {},
  16503. h = {},
  16504. c = "animation-timing-function";
  16505. function p(t, e, n) {
  16506. for (var i = t.getTracks(), r = t.getMaxTime(), o = 0; o < i.length; o++) {
  16507. var a = i[o];
  16508. if (a.needsAnimate()) {
  16509. var s = a.keyframes,
  16510. l = a.propName;
  16511. if (n && (l = n(l)), l)
  16512. for (var u = 0; u < s.length; u++) {
  16513. var h = s[u],
  16514. p = Math.round(h.time / r * 100) + "%",
  16515. d = pw(h.easing),
  16516. f = h.rawValue;
  16517. (U(f) || j(f)) && (e[p] = e[p] || {}, e[p][l] = h.rawValue, d && (e[p][c] = d))
  16518. }
  16519. }
  16520. }
  16521. }
  16522. for (var d = 0; d < s; d++) {
  16523. (S = (w = a[d]).targetName) ? "shape" === S && p(w, u): !i && p(w, l)
  16524. }
  16525. for (var f in l) {
  16526. var g = {};
  16527. vr(g, t), A(g, l[f]);
  16528. var y = bi(g),
  16529. v = l[f][c];
  16530. h[f] = y ? {
  16531. transform: y
  16532. } : {}, uw(h[f], g), v && (h[f][c] = v)
  16533. }
  16534. var m = !0;
  16535. for (var f in u) {
  16536. h[f] = h[f] || {};
  16537. var x = !o;
  16538. v = u[f][c];
  16539. x && (o = new os);
  16540. var _ = o.len();
  16541. o.reset(), h[f].d = lw(t, u[f], o);
  16542. var b = o.len();
  16543. if (!x && _ !== b) {
  16544. m = !1;
  16545. break
  16546. }
  16547. v && (h[f][c] = v)
  16548. }
  16549. if (!m)
  16550. for (var f in h) delete h[f].d;
  16551. if (!i)
  16552. for (d = 0; d < s; d++) {
  16553. var w, S;
  16554. "style" === (S = (w = a[d]).targetName) && p(w, h, (function (t) {
  16555. return hw[t]
  16556. }))
  16557. }
  16558. var M, I = G(h),
  16559. T = !0;
  16560. for (d = 1; d < I.length; d++) {
  16561. var C = I[d - 1],
  16562. D = I[d];
  16563. if (h[C][sw] !== h[D][sw]) {
  16564. T = !1;
  16565. break
  16566. }
  16567. M = h[C][sw]
  16568. }
  16569. if (T && M) {
  16570. for (var f in h) h[f][sw] && delete h[f][sw];
  16571. e[sw] = M
  16572. }
  16573. if (B(I, (function (t) {
  16574. return G(h[t]).length > 0
  16575. })).length) return cw(h, n) + " " + r[0] + " both"
  16576. }
  16577. for (var y in l) {
  16578. (s = g(l[y])) && a.push(s)
  16579. }
  16580. if (a.length) {
  16581. var v = n.zrId + "-cls-" + n.cssClassIdx++;
  16582. n.cssNodes["." + v] = {
  16583. animation: a.join(",")
  16584. }, e.class = v
  16585. }
  16586. }
  16587. var fw = Math.round;
  16588. function gw(t) {
  16589. return t && U(t.src)
  16590. }
  16591. function yw(t) {
  16592. return t && X(t.toDataURL)
  16593. }
  16594. function vw(t, e, n, i) {
  16595. Jb((function (r, o) {
  16596. var a = "fill" === r || "stroke" === r;
  16597. a && mi(o) ? Cw(e, t, r, i) : a && gi(o) ? Dw(n, t, r, i) : t[r] = o
  16598. }), e, n, !1),
  16599. function (t, e, n) {
  16600. var i = t.style;
  16601. if (function (t) {
  16602. return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY)
  16603. }(i)) {
  16604. var r = function (t) {
  16605. var e = t.style,
  16606. n = t.getGlobalScale();
  16607. return [e.shadowColor, (e.shadowBlur || 0).toFixed(2), (e.shadowOffsetX || 0).toFixed(2), (e.shadowOffsetY || 0).toFixed(2), n[0], n[1]].join(",")
  16608. }(t),
  16609. o = n.shadowCache,
  16610. a = o[r];
  16611. if (!a) {
  16612. var s = t.getGlobalScale(),
  16613. l = s[0],
  16614. u = s[1];
  16615. if (!l || !u) return;
  16616. var h = i.shadowOffsetX || 0,
  16617. c = i.shadowOffsetY || 0,
  16618. p = i.shadowBlur,
  16619. d = li(i.shadowColor),
  16620. f = d.opacity,
  16621. g = d.color,
  16622. y = p / 2 / l + " " + p / 2 / u;
  16623. a = n.zrId + "-s" + n.shadowIdx++, n.defs[a] = nw("filter", a, {
  16624. id: a,
  16625. x: "-100%",
  16626. y: "-100%",
  16627. width: "300%",
  16628. height: "300%"
  16629. }, [nw("feDropShadow", "", {
  16630. dx: h / l,
  16631. dy: c / u,
  16632. stdDeviation: y,
  16633. "flood-color": g,
  16634. "flood-opacity": f
  16635. })]), o[r] = a
  16636. }
  16637. e.filter = xi(a)
  16638. }
  16639. }(n, t, i)
  16640. }
  16641. function mw(t) {
  16642. return hi(t[0] - 1) && hi(t[1]) && hi(t[2]) && hi(t[3] - 1)
  16643. }
  16644. function xw(t, e, n) {
  16645. if (e && (! function (t) {
  16646. return hi(t[4]) && hi(t[5])
  16647. }(e) || !mw(e))) {
  16648. var i = n ? 10 : 1e4;
  16649. t.transform = mw(e) ? "translate(" + fw(e[4] * i) / i + " " + fw(e[5] * i) / i + ")" : function (t) {
  16650. return "matrix(" + ci(t[0]) + "," + ci(t[1]) + "," + ci(t[2]) + "," + ci(t[3]) + "," + pi(t[4]) + "," + pi(t[5]) + ")"
  16651. }(e)
  16652. }
  16653. }
  16654. function _w(t, e, n) {
  16655. for (var i = t.points, r = [], o = 0; o < i.length; o++) r.push(fw(i[o][0] * n) / n), r.push(fw(i[o][1] * n) / n);
  16656. e.points = r.join(" ")
  16657. }
  16658. function bw(t) {
  16659. return !t.smooth
  16660. }
  16661. var ww, Sw, Mw = {
  16662. circle: [(ww = ["cx", "cy", "r"], Sw = z(ww, (function (t) {
  16663. return "string" == typeof t ? [t, t] : t
  16664. })), function (t, e, n) {
  16665. for (var i = 0; i < Sw.length; i++) {
  16666. var r = Sw[i],
  16667. o = t[r[0]];
  16668. null != o && (e[r[1]] = fw(o * n) / n)
  16669. }
  16670. })],
  16671. polyline: [_w, bw],
  16672. polygon: [_w, bw]
  16673. };
  16674. function Iw(t, e) {
  16675. var n = t.style,
  16676. i = t.shape,
  16677. r = Mw[t.type],
  16678. o = {},
  16679. a = e.animation,
  16680. s = "path",
  16681. l = t.style.strokePercent,
  16682. u = e.compress && _i(t) || 4;
  16683. if (!r || e.willUpdate || r[1] && !r[1](i) || a && function (t) {
  16684. for (var e = t.animators, n = 0; n < e.length; n++)
  16685. if ("shape" === e[n].targetName) return !0;
  16686. return !1
  16687. }(t) || l < 1) {
  16688. var h = !t.path || t.shapeChanged();
  16689. t.path || t.createPathProxy();
  16690. var c = t.path;
  16691. h && (c.beginPath(), t.buildPath(c, t.shape), t.pathUpdated());
  16692. var p = c.getVersion(),
  16693. d = t,
  16694. f = d.__svgPathBuilder;
  16695. d.__svgPathVersion === p && f && l === d.__svgPathStrokePercent || (f || (f = d.__svgPathBuilder = new Zb), f.reset(u), c.rebuildPath(f, l), f.generateStr(), d.__svgPathVersion = p, d.__svgPathStrokePercent = l), o.d = f.getStr()
  16696. } else {
  16697. s = t.type;
  16698. var g = Math.pow(10, u);
  16699. r[0](i, o, g)
  16700. }
  16701. return xw(o, t.transform), vw(o, n, t, e), e.animation && dw(t, o, e), nw(s, t.id + "", o)
  16702. }
  16703. function Tw(t, e) {
  16704. return t instanceof Is ? Iw(t, e) : t instanceof ks ? function (t, e) {
  16705. var n = t.style,
  16706. i = n.image;
  16707. if (i && !U(i) && (gw(i) ? i = i.src : yw(i) && (i = i.toDataURL())), i) {
  16708. var r = n.x || 0,
  16709. o = n.y || 0,
  16710. a = {
  16711. href: i,
  16712. width: n.width,
  16713. height: n.height
  16714. };
  16715. return r && (a.x = r), o && (a.y = o), xw(a, t.transform), vw(a, n, t, e), e.animation && dw(t, a, e), nw("image", t.id + "", a)
  16716. }
  16717. }(t, e) : t instanceof Cs ? function (t, e) {
  16718. var n = t.style,
  16719. i = n.text;
  16720. if (null != i && (i += ""), i && !isNaN(n.x) && !isNaN(n.y)) {
  16721. var r = n.font || a,
  16722. s = n.x || 0,
  16723. l = function (t, e, n) {
  16724. return "top" === n ? t += e / 2 : "bottom" === n && (t -= e / 2), t
  16725. }(n.y || 0, Mr(r), n.textBaseline),
  16726. u = {
  16727. "dominant-baseline": "central",
  16728. "text-anchor": di[n.textAlign] || n.textAlign
  16729. };
  16730. if (Us(n)) {
  16731. var h = "",
  16732. c = n.fontStyle,
  16733. p = Ys(n.fontSize);
  16734. if (!parseFloat(p)) return;
  16735. var d = n.fontFamily || o,
  16736. f = n.fontWeight;
  16737. h += "font-size:" + p + ";font-family:" + d + ";", c && "normal" !== c && (h += "font-style:" + c + ";"), f && "normal" !== f && (h += "font-weight:" + f + ";"), u.style = h
  16738. } else u.style = "font: " + r;
  16739. return i.match(/\s/) && (u["xml:space"] = "preserve"), s && (u.x = s), l && (u.y = l), xw(u, t.transform), vw(u, n, t, e), e.animation && dw(t, u, e), nw("text", t.id + "", u, void 0, i)
  16740. }
  16741. }(t, e) : void 0
  16742. }
  16743. function Cw(t, e, n, i) {
  16744. var r, o = t[n],
  16745. a = {
  16746. gradientUnits: o.global ? "userSpaceOnUse" : "objectBoundingBox"
  16747. };
  16748. if (yi(o)) r = "linearGradient", a.x1 = o.x, a.y1 = o.y, a.x2 = o.x2, a.y2 = o.y2;
  16749. else {
  16750. if (!vi(o)) return void 0;
  16751. r = "radialGradient", a.cx = rt(o.x, .5), a.cy = rt(o.y, .5), a.r = rt(o.r, .5)
  16752. }
  16753. for (var s = o.colorStops, l = [], u = 0, h = s.length; u < h; ++u) {
  16754. var c = 100 * pi(s[u].offset) + "%",
  16755. p = li(s[u].color),
  16756. d = p.color,
  16757. f = p.opacity,
  16758. g = {
  16759. offset: c
  16760. };
  16761. g["stop-color"] = d, f < 1 && (g["stop-opacity"] = f), l.push(nw("stop", u + "", g))
  16762. }
  16763. var y = iw(nw(r, "", a, l)),
  16764. v = i.gradientCache,
  16765. m = v[y];
  16766. m || (m = i.zrId + "-g" + i.gradientIdx++, v[y] = m, a.id = m, i.defs[m] = nw(r, m, a, l)), e[n] = xi(m)
  16767. }
  16768. function Dw(t, e, n, i) {
  16769. var r, o = t.style[n],
  16770. a = t.getBoundingRect(),
  16771. s = {},
  16772. l = o.repeat,
  16773. u = "no-repeat" === l,
  16774. h = "repeat-x" === l,
  16775. c = "repeat-y" === l;
  16776. if (fi(o)) {
  16777. var p = o.imageWidth,
  16778. d = o.imageHeight,
  16779. f = void 0,
  16780. g = o.image;
  16781. if (U(g) ? f = g : gw(g) ? f = g.src : yw(g) && (f = g.toDataURL()), "undefined" == typeof Image) {
  16782. var y = "Image width/height must been given explictly in svg-ssr renderer.";
  16783. lt(p, y), lt(d, y)
  16784. } else if (null == p || null == d) {
  16785. var v = function (t, e) {
  16786. if (t) {
  16787. var n = t.elm,
  16788. i = p || e.width,
  16789. r = d || e.height;
  16790. "pattern" === t.tag && (h ? (r = 1, i /= a.width) : c && (i = 1, r /= a.height)), t.attrs.width = i, t.attrs.height = r, n && (n.setAttribute("width", i), n.setAttribute("height", r))
  16791. }
  16792. },
  16793. m = ia(f, null, t, (function (t) {
  16794. u || v(w, t), v(r, t)
  16795. }));
  16796. m && m.width && m.height && (p = p || m.width, d = d || m.height)
  16797. }
  16798. r = nw("image", "img", {
  16799. href: f,
  16800. width: p,
  16801. height: d
  16802. }), s.width = p, s.height = d
  16803. } else o.svgElement && (r = T(o.svgElement), s.width = o.svgWidth, s.height = o.svgHeight);
  16804. if (r) {
  16805. var x, _;
  16806. u ? x = _ = 1 : h ? (_ = 1, x = s.width / a.width) : c ? (x = 1, _ = s.height / a.height) : s.patternUnits = "userSpaceOnUse", null == x || isNaN(x) || (s.width = x), null == _ || isNaN(_) || (s.height = _);
  16807. var b = bi(o);
  16808. b && (s.patternTransform = b);
  16809. var w = nw("pattern", "", s, [r]),
  16810. S = iw(w),
  16811. M = i.patternCache,
  16812. I = M[S];
  16813. I || (I = i.zrId + "-p" + i.patternIdx++, M[S] = I, s.id = I, w = i.defs[I] = nw("pattern", I, s, [r])), e[n] = xi(I)
  16814. }
  16815. }
  16816. function Aw(t, e, n) {
  16817. var i = n.clipPathCache,
  16818. r = n.defs,
  16819. o = i[t.id];
  16820. if (!o) {
  16821. var a = {
  16822. id: o = n.zrId + "-c" + n.clipPathIdx++
  16823. };
  16824. i[t.id] = o, r[o] = nw("clipPath", o, a, [Iw(t, n)])
  16825. }
  16826. e["clip-path"] = xi(o)
  16827. }
  16828. function kw(t) {
  16829. return document.createTextNode(t)
  16830. }
  16831. function Lw(t, e, n) {
  16832. t.insertBefore(e, n)
  16833. }
  16834. function Pw(t, e) {
  16835. t.removeChild(e)
  16836. }
  16837. function Ow(t, e) {
  16838. t.appendChild(e)
  16839. }
  16840. function Rw(t) {
  16841. return t.parentNode
  16842. }
  16843. function Nw(t) {
  16844. return t.nextSibling
  16845. }
  16846. function Ew(t, e) {
  16847. t.textContent = e
  16848. }
  16849. var zw = nw("", "");
  16850. function Vw(t) {
  16851. return void 0 === t
  16852. }
  16853. function Bw(t) {
  16854. return void 0 !== t
  16855. }
  16856. function Fw(t, e, n) {
  16857. for (var i = {}, r = e; r <= n; ++r) {
  16858. var o = t[r].key;
  16859. void 0 !== o && (i[o] = r)
  16860. }
  16861. return i
  16862. }
  16863. function Gw(t, e) {
  16864. var n = t.key === e.key;
  16865. return t.tag === e.tag && n
  16866. }
  16867. function Ww(t) {
  16868. var e, n = t.children,
  16869. i = t.tag;
  16870. if (Bw(i)) {
  16871. var r = t.elm = ew(i);
  16872. if (Xw(zw, t), Y(n))
  16873. for (e = 0; e < n.length; ++e) {
  16874. var o = n[e];
  16875. null != o && Ow(r, Ww(o))
  16876. } else Bw(t.text) && !q(t.text) && Ow(r, kw(t.text))
  16877. } else t.elm = kw(t.text);
  16878. return t.elm
  16879. }
  16880. function Hw(t, e, n, i, r) {
  16881. for (; i <= r; ++i) {
  16882. var o = n[i];
  16883. null != o && Lw(t, Ww(o), e)
  16884. }
  16885. }
  16886. function Yw(t, e, n, i) {
  16887. for (; n <= i; ++n) {
  16888. var r = e[n];
  16889. if (null != r)
  16890. if (Bw(r.tag)) Pw(Rw(r.elm), r.elm);
  16891. else Pw(t, r.elm)
  16892. }
  16893. }
  16894. function Xw(t, e) {
  16895. var n, i = e.elm,
  16896. r = t && t.attrs || {},
  16897. o = e.attrs || {};
  16898. if (r !== o) {
  16899. for (n in o) {
  16900. var a = o[n];
  16901. r[n] !== a && (!0 === a ? i.setAttribute(n, "") : !1 === a ? i.removeAttribute(n) : 120 !== n.charCodeAt(0) ? i.setAttribute(n, a) : "xmlns:xlink" === n || "xmlns" === n ? i.setAttributeNS("http://www.w3.org/2000/xmlns/", n, a) : 58 === n.charCodeAt(3) ? i.setAttributeNS("http://www.w3.org/XML/1998/namespace", n, a) : 58 === n.charCodeAt(5) ? i.setAttributeNS(tw, n, a) : i.setAttribute(n, a))
  16902. }
  16903. for (n in r) n in o || i.removeAttribute(n)
  16904. }
  16905. }
  16906. function Uw(t, e) {
  16907. var n = e.elm = t.elm,
  16908. i = t.children,
  16909. r = e.children;
  16910. t !== e && (Xw(t, e), Vw(e.text) ? Bw(i) && Bw(r) ? i !== r && function (t, e, n) {
  16911. for (var i, r, o, a = 0, s = 0, l = e.length - 1, u = e[0], h = e[l], c = n.length - 1, p = n[0], d = n[c]; a <= l && s <= c;) null == u ? u = e[++a] : null == h ? h = e[--l] : null == p ? p = n[++s] : null == d ? d = n[--c] : Gw(u, p) ? (Uw(u, p), u = e[++a], p = n[++s]) : Gw(h, d) ? (Uw(h, d), h = e[--l], d = n[--c]) : Gw(u, d) ? (Uw(u, d), Lw(t, u.elm, Nw(h.elm)), u = e[++a], d = n[--c]) : Gw(h, p) ? (Uw(h, p), Lw(t, h.elm, u.elm), h = e[--l], p = n[++s]) : (Vw(i) && (i = Fw(e, a, l)), Vw(r = i[p.key]) || (o = e[r]).tag !== p.tag ? Lw(t, Ww(p), u.elm) : (Uw(o, p), e[r] = void 0, Lw(t, o.elm, u.elm)), p = n[++s]);
  16912. (a <= l || s <= c) && (a > l ? Hw(t, null == n[c + 1] ? null : n[c + 1].elm, n, s, c) : Yw(t, e, a, l))
  16913. }(n, i, r) : Bw(r) ? (Bw(t.text) && Ew(n, ""), Hw(n, null, r, 0, r.length - 1)) : Bw(i) ? Yw(n, i, 0, i.length - 1) : Bw(t.text) && Ew(n, "") : t.text !== e.text && (Bw(i) && Yw(n, i, 0, i.length - 1), Ew(n, e.text)))
  16914. }
  16915. var Zw = 0,
  16916. jw = function () {
  16917. function t(t, e, n) {
  16918. if (this.type = "svg", this.refreshHover = qw("refreshHover"), this.configLayer = qw("configLayer"), this.storage = e, this._opts = n = A({}, n), this.root = t, this._id = "zr" + Zw++, this._oldVNode = ow(n.width, n.height), t && !n.ssr) {
  16919. var i = this._viewport = document.createElement("div");
  16920. i.style.cssText = "position:relative;overflow:hidden";
  16921. var r = this._svgDom = this._oldVNode.elm = ew("svg");
  16922. Xw(null, this._oldVNode), i.appendChild(r), t.appendChild(i)
  16923. }
  16924. this.resize(n.width, n.height)
  16925. }
  16926. return t.prototype.getType = function () {
  16927. return this.type
  16928. }, t.prototype.getViewportRoot = function () {
  16929. return this._viewport
  16930. }, t.prototype.getViewportRootOffset = function () {
  16931. var t = this.getViewportRoot();
  16932. if (t) return {
  16933. offsetLeft: t.offsetLeft || 0,
  16934. offsetTop: t.offsetTop || 0
  16935. }
  16936. }, t.prototype.getSvgDom = function () {
  16937. return this._svgDom
  16938. }, t.prototype.refresh = function () {
  16939. if (this.root) {
  16940. var t = this.renderToVNode({
  16941. willUpdate: !0
  16942. });
  16943. t.attrs.style = "position:absolute;left:0;top:0;user-select:none",
  16944. function (t, e) {
  16945. if (Gw(t, e)) Uw(t, e);
  16946. else {
  16947. var n = t.elm,
  16948. i = Rw(n);
  16949. Ww(e), null !== i && (Lw(i, e.elm, Nw(n)), Yw(i, [t], 0, 0))
  16950. }
  16951. }(this._oldVNode, t), this._oldVNode = t
  16952. }
  16953. }, t.prototype.renderOneToVNode = function (t) {
  16954. return Tw(t, rw(this._id))
  16955. }, t.prototype.renderToVNode = function (t) {
  16956. t = t || {};
  16957. var e = this.storage.getDisplayList(!0),
  16958. n = this._width,
  16959. i = this._height,
  16960. r = rw(this._id);
  16961. r.animation = t.animation, r.willUpdate = t.willUpdate, r.compress = t.compress;
  16962. var o = [],
  16963. a = this._bgVNode = function (t, e, n, i) {
  16964. var r;
  16965. if (n && "none" !== n)
  16966. if (r = nw("rect", "bg", {
  16967. width: t,
  16968. height: e,
  16969. x: "0",
  16970. y: "0",
  16971. id: "0"
  16972. }), mi(n)) Cw({
  16973. fill: n
  16974. }, r.attrs, "fill", i);
  16975. else if (gi(n)) Dw({
  16976. style: {
  16977. fill: n
  16978. },
  16979. dirty: bt,
  16980. getBoundingRect: function () {
  16981. return {
  16982. width: t,
  16983. height: e
  16984. }
  16985. }
  16986. }, r.attrs, "fill", i);
  16987. else {
  16988. var o = li(n),
  16989. a = o.color,
  16990. s = o.opacity;
  16991. r.attrs.fill = a, s < 1 && (r.attrs["fill-opacity"] = s)
  16992. }
  16993. return r
  16994. }(n, i, this._backgroundColor, r);
  16995. a && o.push(a);
  16996. var s = t.compress ? null : this._mainVNode = nw("g", "main", {}, []);
  16997. this._paintList(e, r, s ? s.children : o), s && o.push(s);
  16998. var l = z(G(r.defs), (function (t) {
  16999. return r.defs[t]
  17000. }));
  17001. if (l.length && o.push(nw("defs", "defs", {}, l)), t.animation) {
  17002. var u = function (t, e, n) {
  17003. var i = (n = n || {}).newline ? "\n" : "",
  17004. r = " {" + i,
  17005. o = i + "}",
  17006. a = z(G(t), (function (e) {
  17007. return e + r + z(G(t[e]), (function (n) {
  17008. return n + ":" + t[e][n] + ";"
  17009. })).join(i) + o
  17010. })).join(i),
  17011. s = z(G(e), (function (t) {
  17012. return "@keyframes " + t + r + z(G(e[t]), (function (n) {
  17013. return n + r + z(G(e[t][n]), (function (i) {
  17014. var r = e[t][n][i];
  17015. return "d" === i && (r = 'path("' + r + '")'), i + ":" + r + ";"
  17016. })).join(i) + o
  17017. })).join(i) + o
  17018. })).join(i);
  17019. return a || s ? ["<![CDATA[", a, s, "]]>"].join(i) : ""
  17020. }(r.cssNodes, r.cssAnims, {
  17021. newline: !0
  17022. });
  17023. if (u) {
  17024. var h = nw("style", "stl", {}, [], u);
  17025. o.push(h)
  17026. }
  17027. }
  17028. return ow(n, i, o, t.useViewBox)
  17029. }, t.prototype.renderToString = function (t) {
  17030. return t = t || {}, iw(this.renderToVNode({
  17031. animation: rt(t.cssAnimation, !0),
  17032. willUpdate: !1,
  17033. compress: !0,
  17034. useViewBox: rt(t.useViewBox, !0)
  17035. }), {
  17036. newline: !0
  17037. })
  17038. }, t.prototype.setBackgroundColor = function (t) {
  17039. this._backgroundColor = t
  17040. }, t.prototype.getSvgRoot = function () {
  17041. return this._mainVNode && this._mainVNode.elm
  17042. }, t.prototype._paintList = function (t, e, n) {
  17043. for (var i, r, o = t.length, a = [], s = 0, l = 0, u = 0; u < o; u++) {
  17044. var h = t[u];
  17045. if (!h.invisible) {
  17046. var c = h.__clipPaths,
  17047. p = c && c.length || 0,
  17048. d = r && r.length || 0,
  17049. f = void 0;
  17050. for (f = Math.max(p - 1, d - 1); f >= 0 && (!c || !r || c[f] !== r[f]); f--);
  17051. for (var g = d - 1; g > f; g--) i = a[--s - 1];
  17052. for (var y = f + 1; y < p; y++) {
  17053. var v = {};
  17054. Aw(c[y], v, e);
  17055. var m = nw("g", "clip-g-" + l++, v, []);
  17056. (i ? i.children : n).push(m), a[s++] = m, i = m
  17057. }
  17058. r = c;
  17059. var x = Tw(h, e);
  17060. x && (i ? i.children : n).push(x)
  17061. }
  17062. }
  17063. }, t.prototype.resize = function (t, e) {
  17064. var n = this._opts,
  17065. i = this.root,
  17066. r = this._viewport;
  17067. if (null != t && (n.width = t), null != e && (n.height = e), i && r && (r.style.display = "none", t = jy(i, 0, n), e = jy(i, 1, n), r.style.display = ""), this._width !== t || this._height !== e) {
  17068. if (this._width = t, this._height = e, r) {
  17069. var o = r.style;
  17070. o.width = t + "px", o.height = e + "px"
  17071. }
  17072. if (gi(this._backgroundColor)) this.refresh();
  17073. else {
  17074. var a = this._svgDom;
  17075. a && (a.setAttribute("width", t), a.setAttribute("height", e));
  17076. var s = this._bgVNode && this._bgVNode.elm;
  17077. s && (s.setAttribute("width", t), s.setAttribute("height", e))
  17078. }
  17079. }
  17080. }, t.prototype.getWidth = function () {
  17081. return this._width
  17082. }, t.prototype.getHeight = function () {
  17083. return this._height
  17084. }, t.prototype.dispose = function () {
  17085. this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null
  17086. }, t.prototype.clear = function () {
  17087. this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null
  17088. }, t.prototype.toDataURL = function (t) {
  17089. var e = this.renderToString(),
  17090. n = "data:image/svg+xml;";
  17091. return t ? (e = wi(e)) && n + "base64," + e : n + "charset=UTF-8," + encodeURIComponent(e)
  17092. }, t
  17093. }();
  17094. function qw(t) {
  17095. return function () {
  17096. 0
  17097. }
  17098. }
  17099. function Kw(t, e, n) {
  17100. var i = h.createCanvas(),
  17101. r = e.getWidth(),
  17102. o = e.getHeight(),
  17103. a = i.style;
  17104. return a && (a.position = "absolute", a.left = "0", a.top = "0", a.width = r + "px", a.height = o + "px", i.setAttribute("data-zr-dom-id", t)), i.width = r * n, i.height = o * n, i
  17105. }
  17106. var $w = function (t) {
  17107. function e(e, n, i) {
  17108. var r, o = t.call(this) || this;
  17109. o.motionBlur = !1, o.lastFrameAlpha = .7, o.dpr = 1, o.virtual = !1, o.config = {}, o.incremental = !1, o.zlevel = 0, o.maxRepaintRectCount = 5, o.__dirty = !0, o.__firstTimePaint = !0, o.__used = !1, o.__drawIndex = 0, o.__startIndex = 0, o.__endIndex = 0, o.__prevStartIndex = null, o.__prevEndIndex = null, i = i || or, "string" == typeof e ? r = Kw(e, n, i) : q(e) && (e = (r = e).id), o.id = e, o.dom = r;
  17110. var a = r.style;
  17111. return a && (xt(r), r.onselectstart = function () {
  17112. return !1
  17113. }, a.padding = "0", a.margin = "0", a.borderWidth = "0"), o.painter = n, o.dpr = i, o
  17114. }
  17115. return n(e, t), e.prototype.getElementCount = function () {
  17116. return this.__endIndex - this.__startIndex
  17117. }, e.prototype.afterBrush = function () {
  17118. this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex
  17119. }, e.prototype.initContext = function () {
  17120. this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr
  17121. }, e.prototype.setUnpainted = function () {
  17122. this.__firstTimePaint = !0
  17123. }, e.prototype.createBackBuffer = function () {
  17124. var t = this.dpr;
  17125. this.domBack = Kw("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), 1 !== t && this.ctxBack.scale(t, t)
  17126. }, e.prototype.createRepaintRects = function (t, e, n, i) {
  17127. if (this.__firstTimePaint) return this.__firstTimePaint = !1, null;
  17128. var r, o = [],
  17129. a = this.maxRepaintRectCount,
  17130. s = !1,
  17131. l = new ze(0, 0, 0, 0);
  17132. function u(t) {
  17133. if (t.isFinite() && !t.isZero())
  17134. if (0 === o.length) {
  17135. (e = new ze(0, 0, 0, 0)).copy(t), o.push(e)
  17136. } else {
  17137. for (var e, n = !1, i = 1 / 0, r = 0, u = 0; u < o.length; ++u) {
  17138. var h = o[u];
  17139. if (h.intersect(t)) {
  17140. var c = new ze(0, 0, 0, 0);
  17141. c.copy(h), c.union(t), o[u] = c, n = !0;
  17142. break
  17143. }
  17144. if (s) {
  17145. l.copy(t), l.union(h);
  17146. var p = t.width * t.height,
  17147. d = h.width * h.height,
  17148. f = l.width * l.height - p - d;
  17149. f < i && (i = f, r = u)
  17150. }
  17151. }
  17152. if (s && (o[r].union(t), n = !0), !n)(e = new ze(0, 0, 0, 0)).copy(t), o.push(e);
  17153. s || (s = o.length >= a)
  17154. }
  17155. }
  17156. for (var h = this.__startIndex; h < this.__endIndex; ++h) {
  17157. if (d = t[h]) {
  17158. var c = d.shouldBePainted(n, i, !0, !0);
  17159. (f = d.__isRendered && (1 & d.__dirty || !c) ? d.getPrevPaintRect() : null) && u(f);
  17160. var p = c && (1 & d.__dirty || !d.__isRendered) ? d.getPaintRect() : null;
  17161. p && u(p)
  17162. }
  17163. }
  17164. for (h = this.__prevStartIndex; h < this.__prevEndIndex; ++h) {
  17165. var d, f;
  17166. c = (d = e[h]).shouldBePainted(n, i, !0, !0);
  17167. if (d && (!c || !d.__zr) && d.__isRendered)(f = d.getPrevPaintRect()) && u(f)
  17168. }
  17169. do {
  17170. r = !1;
  17171. for (h = 0; h < o.length;)
  17172. if (o[h].isZero()) o.splice(h, 1);
  17173. else {
  17174. for (var g = h + 1; g < o.length;) o[h].intersect(o[g]) ? (r = !0, o[h].union(o[g]), o.splice(g, 1)) : g++;
  17175. h++
  17176. }
  17177. } while (r);
  17178. return this._paintRects = o, o
  17179. }, e.prototype.debugGetPaintRects = function () {
  17180. return (this._paintRects || []).slice()
  17181. }, e.prototype.resize = function (t, e) {
  17182. var n = this.dpr,
  17183. i = this.dom,
  17184. r = i.style,
  17185. o = this.domBack;
  17186. r && (r.width = t + "px", r.height = e + "px"), i.width = t * n, i.height = e * n, o && (o.width = t * n, o.height = e * n, 1 !== n && this.ctxBack.scale(n, n))
  17187. }, e.prototype.clear = function (t, e, n) {
  17188. var i = this.dom,
  17189. r = this.ctx,
  17190. o = i.width,
  17191. a = i.height;
  17192. e = e || this.clearColor;
  17193. var s = this.motionBlur && !t,
  17194. l = this.lastFrameAlpha,
  17195. u = this.dpr,
  17196. h = this;
  17197. s && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(i, 0, 0, o / u, a / u));
  17198. var c = this.domBack;
  17199. function p(t, n, i, o) {
  17200. if (r.clearRect(t, n, i, o), e && "transparent" !== e) {
  17201. var a = void 0;
  17202. if (Q(e)) a = (e.global || e.__width === i && e.__height === o) && e.__canvasGradient || Uy(r, e, {
  17203. x: 0,
  17204. y: 0,
  17205. width: i,
  17206. height: o
  17207. }), e.__canvasGradient = a, e.__width = i, e.__height = o;
  17208. else tt(e) && (e.scaleX = e.scaleX || u, e.scaleY = e.scaleY || u, a = nv(r, e, {
  17209. dirty: function () {
  17210. h.setUnpainted(), h.__painter.refresh()
  17211. }
  17212. }));
  17213. r.save(), r.fillStyle = a || e, r.fillRect(t, n, i, o), r.restore()
  17214. }
  17215. s && (r.save(), r.globalAlpha = l, r.drawImage(c, t, n, i, o), r.restore())
  17216. }!n || s ? p(0, 0, o, a) : n.length && E(n, (function (t) {
  17217. p(t.x * u, t.y * u, t.width * u, t.height * u)
  17218. }))
  17219. }, e
  17220. }(jt),
  17221. Jw = 1e5,
  17222. Qw = 314159,
  17223. tS = .01;
  17224. var eS = function () {
  17225. function t(t, e, n, i) {
  17226. this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
  17227. var r = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase();
  17228. this._opts = n = A({}, n || {}), this.dpr = n.devicePixelRatio || or, this._singleCanvas = r, this.root = t, t.style && (xt(t), t.innerHTML = ""), this.storage = e;
  17229. var o = this._zlevelList;
  17230. this._prevDisplayList = [];
  17231. var a = this._layers;
  17232. if (r) {
  17233. var s = t,
  17234. l = s.width,
  17235. u = s.height;
  17236. null != n.width && (l = n.width), null != n.height && (u = n.height), this.dpr = n.devicePixelRatio || 1, s.width = l * this.dpr, s.height = u * this.dpr, this._width = l, this._height = u;
  17237. var h = new $w(s, this, this.dpr);
  17238. h.__builtin__ = !0, h.initContext(), a[314159] = h, h.zlevel = Qw, o.push(Qw), this._domRoot = t
  17239. } else {
  17240. this._width = jy(t, 0, n), this._height = jy(t, 1, n);
  17241. var c = this._domRoot = function (t, e) {
  17242. var n = document.createElement("div");
  17243. return n.style.cssText = ["position:relative", "width:" + t + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";", n
  17244. }(this._width, this._height);
  17245. t.appendChild(c)
  17246. }
  17247. }
  17248. return t.prototype.getType = function () {
  17249. return "canvas"
  17250. }, t.prototype.isSingleCanvas = function () {
  17251. return this._singleCanvas
  17252. }, t.prototype.getViewportRoot = function () {
  17253. return this._domRoot
  17254. }, t.prototype.getViewportRootOffset = function () {
  17255. var t = this.getViewportRoot();
  17256. if (t) return {
  17257. offsetLeft: t.offsetLeft || 0,
  17258. offsetTop: t.offsetTop || 0
  17259. }
  17260. }, t.prototype.refresh = function (t) {
  17261. var e = this.storage.getDisplayList(!0),
  17262. n = this._prevDisplayList,
  17263. i = this._zlevelList;
  17264. this._redrawId = Math.random(), this._paintList(e, n, t, this._redrawId);
  17265. for (var r = 0; r < i.length; r++) {
  17266. var o = i[r],
  17267. a = this._layers[o];
  17268. if (!a.__builtin__ && a.refresh) {
  17269. var s = 0 === r ? this._backgroundColor : null;
  17270. a.refresh(s)
  17271. }
  17272. }
  17273. return this._opts.useDirtyRect && (this._prevDisplayList = e.slice()), this
  17274. }, t.prototype.refreshHover = function () {
  17275. this._paintHoverList(this.storage.getDisplayList(!1))
  17276. }, t.prototype._paintHoverList = function (t) {
  17277. var e = t.length,
  17278. n = this._hoverlayer;
  17279. if (n && n.clear(), e) {
  17280. for (var i, r = {
  17281. inHover: !0,
  17282. viewWidth: this._width,
  17283. viewHeight: this._height
  17284. }, o = 0; o < e; o++) {
  17285. var a = t[o];
  17286. a.__inHover && (n || (n = this._hoverlayer = this.getLayer(Jw)), i || (i = n.ctx).save(), cv(i, a, r, o === e - 1))
  17287. }
  17288. i && i.restore()
  17289. }
  17290. }, t.prototype.getHoverLayer = function () {
  17291. return this.getLayer(Jw)
  17292. }, t.prototype.paintOne = function (t, e) {
  17293. hv(t, e)
  17294. }, t.prototype._paintList = function (t, e, n, i) {
  17295. if (this._redrawId === i) {
  17296. n = n || !1, this._updateLayerStatus(t);
  17297. var r = this._doPaintList(t, e, n),
  17298. o = r.finished,
  17299. a = r.needsRefreshHover;
  17300. if (this._needsManuallyCompositing && this._compositeManually(), a && this._paintHoverList(t), o) this.eachLayer((function (t) {
  17301. t.afterBrush && t.afterBrush()
  17302. }));
  17303. else {
  17304. var s = this;
  17305. on((function () {
  17306. s._paintList(t, e, n, i)
  17307. }))
  17308. }
  17309. }
  17310. }, t.prototype._compositeManually = function () {
  17311. var t = this.getLayer(Qw).ctx,
  17312. e = this._domRoot.width,
  17313. n = this._domRoot.height;
  17314. t.clearRect(0, 0, e, n), this.eachBuiltinLayer((function (i) {
  17315. i.virtual && t.drawImage(i.dom, 0, 0, e, n)
  17316. }))
  17317. }, t.prototype._doPaintList = function (t, e, n) {
  17318. for (var i = this, o = [], a = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
  17319. var l = this._zlevelList[s],
  17320. u = this._layers[l];
  17321. u.__builtin__ && u !== this._hoverlayer && (u.__dirty || n) && o.push(u)
  17322. }
  17323. for (var h = !0, c = !1, p = function (r) {
  17324. var s, l = o[r],
  17325. u = l.ctx,
  17326. p = a && l.createRepaintRects(t, e, d._width, d._height),
  17327. f = n ? l.__startIndex : l.__drawIndex,
  17328. g = !n && l.incremental && Date.now,
  17329. y = g && Date.now(),
  17330. v = l.zlevel === d._zlevelList[0] ? d._backgroundColor : null;
  17331. if (l.__startIndex === l.__endIndex) l.clear(!1, v, p);
  17332. else if (f === l.__startIndex) {
  17333. var m = t[f];
  17334. m.incremental && m.notClear && !n || l.clear(!1, v, p)
  17335. } - 1 === f && (console.error("For some unknown reason. drawIndex is -1"), f = l.__startIndex);
  17336. var x = function (e) {
  17337. var n = {
  17338. inHover: !1,
  17339. allClipped: !1,
  17340. prevEl: null,
  17341. viewWidth: i._width,
  17342. viewHeight: i._height
  17343. };
  17344. for (s = f; s < l.__endIndex; s++) {
  17345. var r = t[s];
  17346. if (r.__inHover && (c = !0), i._doPaintEl(r, l, a, e, n, s === l.__endIndex - 1), g)
  17347. if (Date.now() - y > 15) break
  17348. }
  17349. n.prevElClipPaths && u.restore()
  17350. };
  17351. if (p)
  17352. if (0 === p.length) s = l.__endIndex;
  17353. else
  17354. for (var _ = d.dpr, b = 0; b < p.length; ++b) {
  17355. var w = p[b];
  17356. u.save(), u.beginPath(), u.rect(w.x * _, w.y * _, w.width * _, w.height * _), u.clip(), x(w), u.restore()
  17357. } else u.save(), x(), u.restore();
  17358. l.__drawIndex = s, l.__drawIndex < l.__endIndex && (h = !1)
  17359. }, d = this, f = 0; f < o.length; f++) p(f);
  17360. return r.wxa && E(this._layers, (function (t) {
  17361. t && t.ctx && t.ctx.draw && t.ctx.draw()
  17362. })), {
  17363. finished: h,
  17364. needsRefreshHover: c
  17365. }
  17366. }, t.prototype._doPaintEl = function (t, e, n, i, r, o) {
  17367. var a = e.ctx;
  17368. if (n) {
  17369. var s = t.getPaintRect();
  17370. (!i || s && s.intersect(i)) && (cv(a, t, r, o), t.setPrevPaintRect(s))
  17371. } else cv(a, t, r, o)
  17372. }, t.prototype.getLayer = function (t, e) {
  17373. this._singleCanvas && !this._needsManuallyCompositing && (t = Qw);
  17374. var n = this._layers[t];
  17375. return n || ((n = new $w("zr_" + t, this, this.dpr)).zlevel = t, n.__builtin__ = !0, this._layerConfig[t] ? C(n, this._layerConfig[t], !0) : this._layerConfig[t - tS] && C(n, this._layerConfig[t - tS], !0), e && (n.virtual = e), this.insertLayer(t, n), n.initContext()), n
  17376. }, t.prototype.insertLayer = function (t, e) {
  17377. var n = this._layers,
  17378. i = this._zlevelList,
  17379. r = i.length,
  17380. o = this._domRoot,
  17381. a = null,
  17382. s = -1;
  17383. if (!n[t] && function (t) {
  17384. return !!t && (!!t.__builtin__ || "function" == typeof t.resize && "function" == typeof t.refresh)
  17385. }(e)) {
  17386. if (r > 0 && t > i[0]) {
  17387. for (s = 0; s < r - 1 && !(i[s] < t && i[s + 1] > t); s++);
  17388. a = n[i[s]]
  17389. }
  17390. if (i.splice(s + 1, 0, t), n[t] = e, !e.virtual)
  17391. if (a) {
  17392. var l = a.dom;
  17393. l.nextSibling ? o.insertBefore(e.dom, l.nextSibling) : o.appendChild(e.dom)
  17394. } else o.firstChild ? o.insertBefore(e.dom, o.firstChild) : o.appendChild(e.dom);
  17395. e.__painter = this
  17396. }
  17397. }, t.prototype.eachLayer = function (t, e) {
  17398. for (var n = this._zlevelList, i = 0; i < n.length; i++) {
  17399. var r = n[i];
  17400. t.call(e, this._layers[r], r)
  17401. }
  17402. }, t.prototype.eachBuiltinLayer = function (t, e) {
  17403. for (var n = this._zlevelList, i = 0; i < n.length; i++) {
  17404. var r = n[i],
  17405. o = this._layers[r];
  17406. o.__builtin__ && t.call(e, o, r)
  17407. }
  17408. }, t.prototype.eachOtherLayer = function (t, e) {
  17409. for (var n = this._zlevelList, i = 0; i < n.length; i++) {
  17410. var r = n[i],
  17411. o = this._layers[r];
  17412. o.__builtin__ || t.call(e, o, r)
  17413. }
  17414. }, t.prototype.getLayers = function () {
  17415. return this._layers
  17416. }, t.prototype._updateLayerStatus = function (t) {
  17417. function e(t) {
  17418. o && (o.__endIndex !== t && (o.__dirty = !0), o.__endIndex = t)
  17419. }
  17420. if (this.eachBuiltinLayer((function (t, e) {
  17421. t.__dirty = t.__used = !1
  17422. })), this._singleCanvas)
  17423. for (var n = 1; n < t.length; n++) {
  17424. if ((s = t[n]).zlevel !== t[n - 1].zlevel || s.incremental) {
  17425. this._needsManuallyCompositing = !0;
  17426. break
  17427. }
  17428. }
  17429. var i, r, o = null,
  17430. a = 0;
  17431. for (r = 0; r < t.length; r++) {
  17432. var s, l = (s = t[r]).zlevel,
  17433. u = void 0;
  17434. i !== l && (i = l, a = 0), s.incremental ? ((u = this.getLayer(l + .001, this._needsManuallyCompositing)).incremental = !0, a = 1) : u = this.getLayer(l + (a > 0 ? tS : 0), this._needsManuallyCompositing), u.__builtin__ || I("ZLevel " + l + " has been used by unkown layer " + u.id), u !== o && (u.__used = !0, u.__startIndex !== r && (u.__dirty = !0), u.__startIndex = r, u.incremental ? u.__drawIndex = -1 : u.__drawIndex = r, e(r), o = u), 1 & s.__dirty && !s.__inHover && (u.__dirty = !0, u.incremental && u.__drawIndex < 0 && (u.__drawIndex = r))
  17435. }
  17436. e(r), this.eachBuiltinLayer((function (t, e) {
  17437. !t.__used && t.getElementCount() > 0 && (t.__dirty = !0, t.__startIndex = t.__endIndex = t.__drawIndex = 0), t.__dirty && t.__drawIndex < 0 && (t.__drawIndex = t.__startIndex)
  17438. }))
  17439. }, t.prototype.clear = function () {
  17440. return this.eachBuiltinLayer(this._clearLayer), this
  17441. }, t.prototype._clearLayer = function (t) {
  17442. t.clear()
  17443. }, t.prototype.setBackgroundColor = function (t) {
  17444. this._backgroundColor = t, E(this._layers, (function (t) {
  17445. t.setUnpainted()
  17446. }))
  17447. }, t.prototype.configLayer = function (t, e) {
  17448. if (e) {
  17449. var n = this._layerConfig;
  17450. n[t] ? C(n[t], e, !0) : n[t] = e;
  17451. for (var i = 0; i < this._zlevelList.length; i++) {
  17452. var r = this._zlevelList[i];
  17453. if (r === t || r === t + tS) C(this._layers[r], n[t], !0)
  17454. }
  17455. }
  17456. }, t.prototype.delLayer = function (t) {
  17457. var e = this._layers,
  17458. n = this._zlevelList,
  17459. i = e[t];
  17460. i && (i.dom.parentNode.removeChild(i.dom), delete e[t], n.splice(P(n, t), 1))
  17461. }, t.prototype.resize = function (t, e) {
  17462. if (this._domRoot.style) {
  17463. var n = this._domRoot;
  17464. n.style.display = "none";
  17465. var i = this._opts,
  17466. r = this.root;
  17467. if (null != t && (i.width = t), null != e && (i.height = e), t = jy(r, 0, i), e = jy(r, 1, i), n.style.display = "", this._width !== t || e !== this._height) {
  17468. for (var o in n.style.width = t + "px", n.style.height = e + "px", this._layers) this._layers.hasOwnProperty(o) && this._layers[o].resize(t, e);
  17469. this.refresh(!0)
  17470. }
  17471. this._width = t, this._height = e
  17472. } else {
  17473. if (null == t || null == e) return;
  17474. this._width = t, this._height = e, this.getLayer(Qw).resize(t, e)
  17475. }
  17476. return this
  17477. }, t.prototype.clearLayer = function (t) {
  17478. var e = this._layers[t];
  17479. e && e.clear()
  17480. }, t.prototype.dispose = function () {
  17481. this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null
  17482. }, t.prototype.getRenderedCanvas = function (t) {
  17483. if (t = t || {}, this._singleCanvas && !this._compositeManually) return this._layers[314159].dom;
  17484. var e = new $w("image", this, t.pixelRatio || this.dpr);
  17485. e.initContext(), e.clear(!1, t.backgroundColor || this._backgroundColor);
  17486. var n = e.ctx;
  17487. if (t.pixelRatio <= this.dpr) {
  17488. this.refresh();
  17489. var i = e.dom.width,
  17490. r = e.dom.height;
  17491. this.eachLayer((function (t) {
  17492. t.__builtin__ ? n.drawImage(t.dom, 0, 0, i, r) : t.renderToCanvas && (n.save(), t.renderToCanvas(n), n.restore())
  17493. }))
  17494. } else
  17495. for (var o = {
  17496. inHover: !1,
  17497. viewWidth: this._width,
  17498. viewHeight: this._height
  17499. }, a = this.storage.getDisplayList(!0), s = 0, l = a.length; s < l; s++) {
  17500. var u = a[s];
  17501. cv(n, u, o, s === l - 1)
  17502. }
  17503. return e.dom
  17504. }, t.prototype.getWidth = function () {
  17505. return this._width
  17506. }, t.prototype.getHeight = function () {
  17507. return this._height
  17508. }, t
  17509. }();
  17510. var nS = function (t) {
  17511. function e() {
  17512. var n = null !== t && t.apply(this, arguments) || this;
  17513. return n.type = e.type, n.hasSymbolVisual = !0, n
  17514. }
  17515. return n(e, t), e.prototype.getInitialData = function (t) {
  17516. return vx(null, this, {
  17517. useEncodeDefaulter: !0
  17518. })
  17519. }, e.prototype.getLegendIcon = function (t) {
  17520. var e = new zr,
  17521. n = Wy("line", 0, t.itemHeight / 2, t.itemWidth, 0, t.lineStyle.stroke, !1);
  17522. e.add(n), n.setStyle(t.lineStyle);
  17523. var i = this.getData().getVisual("symbol"),
  17524. r = this.getData().getVisual("symbolRotate"),
  17525. o = "none" === i ? "circle" : i,
  17526. a = .8 * t.itemHeight,
  17527. s = Wy(o, (t.itemWidth - a) / 2, (t.itemHeight - a) / 2, a, a, t.itemStyle.fill);
  17528. e.add(s), s.setStyle(t.itemStyle);
  17529. var l = "inherit" === t.iconRotate ? r : t.iconRotate || 0;
  17530. return s.rotation = l * Math.PI / 180, s.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), o.indexOf("empty") > -1 && (s.style.stroke = s.style.fill, s.style.fill = "#fff", s.style.lineWidth = 2), e
  17531. }, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = {
  17532. z: 3,
  17533. coordinateSystem: "cartesian2d",
  17534. legendHoverLink: !0,
  17535. clip: !0,
  17536. label: {
  17537. position: "top"
  17538. },
  17539. endLabel: {
  17540. show: !1,
  17541. valueAnimation: !0,
  17542. distance: 8
  17543. },
  17544. lineStyle: {
  17545. width: 2,
  17546. type: "solid"
  17547. },
  17548. emphasis: {
  17549. scale: !0
  17550. },
  17551. step: !1,
  17552. smooth: !1,
  17553. smoothMonotone: null,
  17554. symbol: "emptyCircle",
  17555. symbolSize: 4,
  17556. symbolRotate: null,
  17557. showSymbol: !0,
  17558. showAllSymbol: "auto",
  17559. connectNulls: !1,
  17560. sampling: "none",
  17561. animationEasing: "linear",
  17562. progressive: 0,
  17563. hoverLayerThreshold: 1 / 0,
  17564. universalTransition: {
  17565. divideShape: "clone"
  17566. },
  17567. triggerLineEvent: !1
  17568. }, e
  17569. }(mg);
  17570. function iS(t, e) {
  17571. var n = t.mapDimensionsAll("defaultedLabel"),
  17572. i = n.length;
  17573. if (1 === i) {
  17574. var r = gf(t, e, n[0]);
  17575. return null != r ? r + "" : null
  17576. }
  17577. if (i) {
  17578. for (var o = [], a = 0; a < n.length; a++) o.push(gf(t, e, n[a]));
  17579. return o.join(" ")
  17580. }
  17581. }
  17582. function rS(t, e) {
  17583. var n = t.mapDimensionsAll("defaultedLabel");
  17584. if (!Y(e)) return e + "";
  17585. for (var i = [], r = 0; r < n.length; r++) {
  17586. var o = t.getDimensionIndex(n[r]);
  17587. o >= 0 && i.push(e[o])
  17588. }
  17589. return i.join(" ")
  17590. }
  17591. var oS = function (t) {
  17592. function e(e, n, i, r) {
  17593. var o = t.call(this) || this;
  17594. return o.updateData(e, n, i, r), o
  17595. }
  17596. return n(e, t), e.prototype._createSymbol = function (t, e, n, i, r) {
  17597. this.removeAll();
  17598. var o = Wy(t, -1, -1, 2, 2, null, r);
  17599. o.attr({
  17600. z2: 100,
  17601. culling: !0,
  17602. scaleX: i[0] / 2,
  17603. scaleY: i[1] / 2
  17604. }), o.drift = aS, this._symbolType = t, this.add(o)
  17605. }, e.prototype.stopSymbolAnimation = function (t) {
  17606. this.childAt(0).stopAnimation(null, t)
  17607. }, e.prototype.getSymbolType = function () {
  17608. return this._symbolType
  17609. }, e.prototype.getSymbolPath = function () {
  17610. return this.childAt(0)
  17611. }, e.prototype.highlight = function () {
  17612. kl(this.childAt(0))
  17613. }, e.prototype.downplay = function () {
  17614. Ll(this.childAt(0))
  17615. }, e.prototype.setZ = function (t, e) {
  17616. var n = this.childAt(0);
  17617. n.zlevel = t, n.z = e
  17618. }, e.prototype.setDraggable = function (t, e) {
  17619. var n = this.childAt(0);
  17620. n.draggable = t, n.cursor = !e && t ? "move" : n.cursor
  17621. }, e.prototype.updateData = function (t, n, i, r) {
  17622. this.silent = !1;
  17623. var o = t.getItemVisual(n, "symbol") || "circle",
  17624. a = t.hostModel,
  17625. s = e.getSymbolSize(t, n),
  17626. l = o !== this._symbolType,
  17627. u = r && r.disableAnimation;
  17628. if (l) {
  17629. var h = t.getItemVisual(n, "symbolKeepAspect");
  17630. this._createSymbol(o, t, n, s, h)
  17631. } else {
  17632. (p = this.childAt(0)).silent = !1;
  17633. var c = {
  17634. scaleX: s[0] / 2,
  17635. scaleY: s[1] / 2
  17636. };
  17637. u ? p.attr(c) : fh(p, c, a, n), _h(p)
  17638. }
  17639. if (this._updateCommon(t, n, s, i, r), l) {
  17640. var p = this.childAt(0);
  17641. if (!u) {
  17642. c = {
  17643. scaleX: this._sizeX,
  17644. scaleY: this._sizeY,
  17645. style: {
  17646. opacity: p.style.opacity
  17647. }
  17648. };
  17649. p.scaleX = p.scaleY = 0, p.style.opacity = 0, gh(p, c, a, n)
  17650. }
  17651. }
  17652. u && this.childAt(0).stopAnimation("leave")
  17653. }, e.prototype._updateCommon = function (t, e, n, i, r) {
  17654. var o, a, s, l, u, h, c, p, d, f = this.childAt(0),
  17655. g = t.hostModel;
  17656. if (i && (o = i.emphasisItemStyle, a = i.blurItemStyle, s = i.selectItemStyle, l = i.focus, u = i.blurScope, c = i.labelStatesModels, p = i.hoverScale, d = i.cursorStyle, h = i.emphasisDisabled), !i || t.hasItemOption) {
  17657. var y = i && i.itemModel ? i.itemModel : t.getItemModel(e),
  17658. v = y.getModel("emphasis");
  17659. o = v.getModel("itemStyle").getItemStyle(), s = y.getModel(["select", "itemStyle"]).getItemStyle(), a = y.getModel(["blur", "itemStyle"]).getItemStyle(), l = v.get("focus"), u = v.get("blurScope"), h = v.get("disabled"), c = ec(y), p = v.getShallow("scale"), d = y.getShallow("cursor")
  17660. }
  17661. var m = t.getItemVisual(e, "symbolRotate");
  17662. f.attr("rotation", (m || 0) * Math.PI / 180 || 0);
  17663. var x = Yy(t.getItemVisual(e, "symbolOffset"), n);
  17664. x && (f.x = x[0], f.y = x[1]), d && f.attr("cursor", d);
  17665. var _ = t.getItemVisual(e, "style"),
  17666. b = _.fill;
  17667. if (f instanceof ks) {
  17668. var w = f.style;
  17669. f.useStyle(A({
  17670. image: w.image,
  17671. x: w.x,
  17672. y: w.y,
  17673. width: w.width,
  17674. height: w.height
  17675. }, _))
  17676. } else f.__isEmptyBrush ? f.useStyle(A({}, _)) : f.useStyle(_), f.style.decal = null, f.setColor(b, r && r.symbolInnerColor), f.style.strokeNoScale = !0;
  17677. var S = t.getItemVisual(e, "liftZ"),
  17678. M = this._z2;
  17679. null != S ? null == M && (this._z2 = f.z2, f.z2 += S) : null != M && (f.z2 = M, this._z2 = null);
  17680. var I = r && r.useNameLabel;
  17681. tc(f, c, {
  17682. labelFetcher: g,
  17683. labelDataIndex: e,
  17684. defaultText: function (e) {
  17685. return I ? t.getName(e) : iS(t, e)
  17686. },
  17687. inheritColor: b,
  17688. defaultOpacity: _.opacity
  17689. }), this._sizeX = n[0] / 2, this._sizeY = n[1] / 2;
  17690. var T = f.ensureState("emphasis");
  17691. T.style = o, f.ensureState("select").style = s, f.ensureState("blur").style = a;
  17692. var C = null == p || !0 === p ? Math.max(1.1, 3 / this._sizeY) : isFinite(p) && p > 0 ? +p : 1;
  17693. T.scaleX = this._sizeX * C, T.scaleY = this._sizeY * C, this.setSymbolScale(1), Yl(this, l, u, h)
  17694. }, e.prototype.setSymbolScale = function (t) {
  17695. this.scaleX = this.scaleY = t
  17696. }, e.prototype.fadeOut = function (t, e, n) {
  17697. var i = this.childAt(0),
  17698. r = Qs(this).dataIndex,
  17699. o = n && n.animation;
  17700. if (this.silent = i.silent = !0, n && n.fadeLabel) {
  17701. var a = i.getTextContent();
  17702. a && vh(a, {
  17703. style: {
  17704. opacity: 0
  17705. }
  17706. }, e, {
  17707. dataIndex: r,
  17708. removeOpt: o,
  17709. cb: function () {
  17710. i.removeTextContent()
  17711. }
  17712. })
  17713. } else i.removeTextContent();
  17714. vh(i, {
  17715. style: {
  17716. opacity: 0
  17717. },
  17718. scaleX: 0,
  17719. scaleY: 0
  17720. }, e, {
  17721. dataIndex: r,
  17722. cb: t,
  17723. removeOpt: o
  17724. })
  17725. }, e.getSymbolSize = function (t, e) {
  17726. return Hy(t.getItemVisual(e, "symbolSize"))
  17727. }, e
  17728. }(zr);
  17729. function aS(t, e) {
  17730. this.parent.drift(t, e)
  17731. }
  17732. function sS(t, e, n, i) {
  17733. return e && !isNaN(e[0]) && !isNaN(e[1]) && !(i.isIgnore && i.isIgnore(n)) && !(i.clipShape && !i.clipShape.contain(e[0], e[1])) && "none" !== t.getItemVisual(n, "symbol")
  17734. }
  17735. function lS(t) {
  17736. return null == t || q(t) || (t = {
  17737. isIgnore: t
  17738. }), t || {}
  17739. }
  17740. function uS(t) {
  17741. var e = t.hostModel,
  17742. n = e.getModel("emphasis");
  17743. return {
  17744. emphasisItemStyle: n.getModel("itemStyle").getItemStyle(),
  17745. blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
  17746. selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
  17747. focus: n.get("focus"),
  17748. blurScope: n.get("blurScope"),
  17749. emphasisDisabled: n.get("disabled"),
  17750. hoverScale: n.get("scale"),
  17751. labelStatesModels: ec(e),
  17752. cursorStyle: e.get("cursor")
  17753. }
  17754. }
  17755. var hS = function () {
  17756. function t(t) {
  17757. this.group = new zr, this._SymbolCtor = t || oS
  17758. }
  17759. return t.prototype.updateData = function (t, e) {
  17760. this._progressiveEls = null, e = lS(e);
  17761. var n = this.group,
  17762. i = t.hostModel,
  17763. r = this._data,
  17764. o = this._SymbolCtor,
  17765. a = e.disableAnimation,
  17766. s = uS(t),
  17767. l = {
  17768. disableAnimation: a
  17769. },
  17770. u = e.getSymbolPoint || function (e) {
  17771. return t.getItemLayout(e)
  17772. };
  17773. r || n.removeAll(), t.diff(r).add((function (i) {
  17774. var r = u(i);
  17775. if (sS(t, r, i, e)) {
  17776. var a = new o(t, i, s, l);
  17777. a.setPosition(r), t.setItemGraphicEl(i, a), n.add(a)
  17778. }
  17779. })).update((function (h, c) {
  17780. var p = r.getItemGraphicEl(c),
  17781. d = u(h);
  17782. if (sS(t, d, h, e)) {
  17783. var f = t.getItemVisual(h, "symbol") || "circle",
  17784. g = p && p.getSymbolType && p.getSymbolType();
  17785. if (!p || g && g !== f) n.remove(p), (p = new o(t, h, s, l)).setPosition(d);
  17786. else {
  17787. p.updateData(t, h, s, l);
  17788. var y = {
  17789. x: d[0],
  17790. y: d[1]
  17791. };
  17792. a ? p.attr(y) : fh(p, y, i)
  17793. }
  17794. n.add(p), t.setItemGraphicEl(h, p)
  17795. } else n.remove(p)
  17796. })).remove((function (t) {
  17797. var e = r.getItemGraphicEl(t);
  17798. e && e.fadeOut((function () {
  17799. n.remove(e)
  17800. }), i)
  17801. })).execute(), this._getSymbolPoint = u, this._data = t
  17802. }, t.prototype.updateLayout = function () {
  17803. var t = this,
  17804. e = this._data;
  17805. e && e.eachItemGraphicEl((function (e, n) {
  17806. var i = t._getSymbolPoint(n);
  17807. e.setPosition(i), e.markRedraw()
  17808. }))
  17809. }, t.prototype.incrementalPrepareUpdate = function (t) {
  17810. this._seriesScope = uS(t), this._data = null, this.group.removeAll()
  17811. }, t.prototype.incrementalUpdate = function (t, e, n) {
  17812. function i(t) {
  17813. t.isGroup || (t.incremental = !0, t.ensureState("emphasis").hoverLayer = !0)
  17814. }
  17815. this._progressiveEls = [], n = lS(n);
  17816. for (var r = t.start; r < t.end; r++) {
  17817. var o = e.getItemLayout(r);
  17818. if (sS(e, o, r, n)) {
  17819. var a = new this._SymbolCtor(e, r, this._seriesScope);
  17820. a.traverse(i), a.setPosition(o), this.group.add(a), e.setItemGraphicEl(r, a), this._progressiveEls.push(a)
  17821. }
  17822. }
  17823. }, t.prototype.eachRendered = function (t) {
  17824. qh(this._progressiveEls || this.group, t)
  17825. }, t.prototype.remove = function (t) {
  17826. var e = this.group,
  17827. n = this._data;
  17828. n && t ? n.eachItemGraphicEl((function (t) {
  17829. t.fadeOut((function () {
  17830. e.remove(t)
  17831. }), n.hostModel)
  17832. })) : e.removeAll()
  17833. }, t
  17834. }();
  17835. function cS(t, e, n) {
  17836. var i = t.getBaseAxis(),
  17837. r = t.getOtherAxis(i),
  17838. o = function (t, e) {
  17839. var n = 0,
  17840. i = t.scale.getExtent();
  17841. "start" === e ? n = i[0] : "end" === e ? n = i[1] : j(e) && !isNaN(e) ? n = e : i[0] > 0 ? n = i[0] : i[1] < 0 && (n = i[1]);
  17842. return n
  17843. }(r, n),
  17844. a = i.dim,
  17845. s = r.dim,
  17846. l = e.mapDimension(s),
  17847. u = e.mapDimension(a),
  17848. h = "x" === s || "radius" === s ? 1 : 0,
  17849. c = z(t.dimensions, (function (t) {
  17850. return e.mapDimension(t)
  17851. })),
  17852. p = !1,
  17853. d = e.getCalculationInfo("stackResultDimension");
  17854. return gx(e, c[0]) && (p = !0, c[0] = d), gx(e, c[1]) && (p = !0, c[1] = d), {
  17855. dataDimsForPoint: c,
  17856. valueStart: o,
  17857. valueAxisDim: s,
  17858. baseAxisDim: a,
  17859. stacked: !!p,
  17860. valueDim: l,
  17861. baseDim: u,
  17862. baseDataOffset: h,
  17863. stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  17864. }
  17865. }
  17866. function pS(t, e, n, i) {
  17867. var r = NaN;
  17868. t.stacked && (r = n.get(n.getCalculationInfo("stackedOverDimension"), i)), isNaN(r) && (r = t.valueStart);
  17869. var o = t.baseDataOffset,
  17870. a = [];
  17871. return a[o] = n.get(t.baseDim, i), a[1 - o] = r, e.dataToPoint(a)
  17872. }
  17873. var dS = Math.min,
  17874. fS = Math.max;
  17875. function gS(t, e) {
  17876. return isNaN(t) || isNaN(e)
  17877. }
  17878. function yS(t, e, n, i, r, o, a, s, l) {
  17879. for (var u, h, c, p, d, f, g = n, y = 0; y < i; y++) {
  17880. var v = e[2 * g],
  17881. m = e[2 * g + 1];
  17882. if (g >= r || g < 0) break;
  17883. if (gS(v, m)) {
  17884. if (l) {
  17885. g += o;
  17886. continue
  17887. }
  17888. break
  17889. }
  17890. if (g === n) t[o > 0 ? "moveTo" : "lineTo"](v, m), c = v, p = m;
  17891. else {
  17892. var x = v - u,
  17893. _ = m - h;
  17894. if (x * x + _ * _ < .5) {
  17895. g += o;
  17896. continue
  17897. }
  17898. if (a > 0) {
  17899. for (var b = g + o, w = e[2 * b], S = e[2 * b + 1]; w === v && S === m && y < i;) y++, g += o, w = e[2 * (b += o)], S = e[2 * b + 1], x = (v = e[2 * g]) - u, _ = (m = e[2 * g + 1]) - h;
  17900. var M = y + 1;
  17901. if (l)
  17902. for (; gS(w, S) && M < i;) M++, w = e[2 * (b += o)], S = e[2 * b + 1];
  17903. var I = .5,
  17904. T = 0,
  17905. C = 0,
  17906. D = void 0,
  17907. A = void 0;
  17908. if (M >= i || gS(w, S)) d = v, f = m;
  17909. else {
  17910. T = w - u, C = S - h;
  17911. var k = v - u,
  17912. L = w - v,
  17913. P = m - h,
  17914. O = S - m,
  17915. R = void 0,
  17916. N = void 0;
  17917. if ("x" === s) {
  17918. var E = T > 0 ? 1 : -1;
  17919. d = v - E * (R = Math.abs(k)) * a, f = m, D = v + E * (N = Math.abs(L)) * a, A = m
  17920. } else if ("y" === s) {
  17921. var z = C > 0 ? 1 : -1;
  17922. d = v, f = m - z * (R = Math.abs(P)) * a, D = v, A = m + z * (N = Math.abs(O)) * a
  17923. } else R = Math.sqrt(k * k + P * P), d = v - T * a * (1 - (I = (N = Math.sqrt(L * L + O * O)) / (N + R))), f = m - C * a * (1 - I), A = m + C * a * I, D = dS(D = v + T * a * I, fS(w, v)), A = dS(A, fS(S, m)), D = fS(D, dS(w, v)), f = m - (C = (A = fS(A, dS(S, m))) - m) * R / N, d = dS(d = v - (T = D - v) * R / N, fS(u, v)), f = dS(f, fS(h, m)), D = v + (T = v - (d = fS(d, dS(u, v)))) * N / R, A = m + (C = m - (f = fS(f, dS(h, m)))) * N / R
  17924. }
  17925. t.bezierCurveTo(c, p, d, f, v, m), c = D, p = A
  17926. } else t.lineTo(v, m)
  17927. }
  17928. u = v, h = m, g += o
  17929. }
  17930. return y
  17931. }
  17932. var vS = function () {
  17933. this.smooth = 0, this.smoothConstraint = !0
  17934. },
  17935. mS = function (t) {
  17936. function e(e) {
  17937. var n = t.call(this, e) || this;
  17938. return n.type = "ec-polyline", n
  17939. }
  17940. return n(e, t), e.prototype.getDefaultStyle = function () {
  17941. return {
  17942. stroke: "#000",
  17943. fill: null
  17944. }
  17945. }, e.prototype.getDefaultShape = function () {
  17946. return new vS
  17947. }, e.prototype.buildPath = function (t, e) {
  17948. var n = e.points,
  17949. i = 0,
  17950. r = n.length / 2;
  17951. if (e.connectNulls) {
  17952. for (; r > 0 && gS(n[2 * r - 2], n[2 * r - 1]); r--);
  17953. for (; i < r && gS(n[2 * i], n[2 * i + 1]); i++);
  17954. }
  17955. for (; i < r;) i += yS(t, n, i, r, r, 1, e.smooth, e.smoothMonotone, e.connectNulls) + 1
  17956. }, e.prototype.getPointOn = function (t, e) {
  17957. this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
  17958. for (var n, i, r = this.path.data, o = os.CMD, a = "x" === e, s = [], l = 0; l < r.length;) {
  17959. var u = void 0,
  17960. h = void 0,
  17961. c = void 0,
  17962. p = void 0,
  17963. d = void 0,
  17964. f = void 0,
  17965. g = void 0;
  17966. switch (r[l++]) {
  17967. case o.M:
  17968. n = r[l++], i = r[l++];
  17969. break;
  17970. case o.L:
  17971. if (u = r[l++], h = r[l++], (g = a ? (t - n) / (u - n) : (t - i) / (h - i)) <= 1 && g >= 0) {
  17972. var y = a ? (h - i) * g + i : (u - n) * g + n;
  17973. return a ? [t, y] : [y, t]
  17974. }
  17975. n = u, i = h;
  17976. break;
  17977. case o.C:
  17978. u = r[l++], h = r[l++], c = r[l++], p = r[l++], d = r[l++], f = r[l++];
  17979. var v = a ? _n(n, u, c, d, t, s) : _n(i, h, p, f, t, s);
  17980. if (v > 0)
  17981. for (var m = 0; m < v; m++) {
  17982. var x = s[m];
  17983. if (x <= 1 && x >= 0) {
  17984. y = a ? mn(i, h, p, f, x) : mn(n, u, c, d, x);
  17985. return a ? [t, y] : [y, t]
  17986. }
  17987. }
  17988. n = d, i = f
  17989. }
  17990. }
  17991. }, e
  17992. }(Is),
  17993. xS = function (t) {
  17994. function e() {
  17995. return null !== t && t.apply(this, arguments) || this
  17996. }
  17997. return n(e, t), e
  17998. }(vS),
  17999. _S = function (t) {
  18000. function e(e) {
  18001. var n = t.call(this, e) || this;
  18002. return n.type = "ec-polygon", n
  18003. }
  18004. return n(e, t), e.prototype.getDefaultShape = function () {
  18005. return new xS
  18006. }, e.prototype.buildPath = function (t, e) {
  18007. var n = e.points,
  18008. i = e.stackedOnPoints,
  18009. r = 0,
  18010. o = n.length / 2,
  18011. a = e.smoothMonotone;
  18012. if (e.connectNulls) {
  18013. for (; o > 0 && gS(n[2 * o - 2], n[2 * o - 1]); o--);
  18014. for (; r < o && gS(n[2 * r], n[2 * r + 1]); r++);
  18015. }
  18016. for (; r < o;) {
  18017. var s = yS(t, n, r, o, o, 1, e.smooth, a, e.connectNulls);
  18018. yS(t, i, r + s - 1, s, o, -1, e.stackedOnSmooth, a, e.connectNulls), r += s + 1, t.closePath()
  18019. }
  18020. }, e
  18021. }(Is);
  18022. function bS(t, e, n, i, r) {
  18023. var o = t.getArea(),
  18024. a = o.x,
  18025. s = o.y,
  18026. l = o.width,
  18027. u = o.height,
  18028. h = n.get(["lineStyle", "width"]) || 2;
  18029. a -= h / 2, s -= h / 2, l += h, u += h, a = Math.floor(a), l = Math.round(l);
  18030. var c = new zs({
  18031. shape: {
  18032. x: a,
  18033. y: s,
  18034. width: l,
  18035. height: u
  18036. }
  18037. });
  18038. if (e) {
  18039. var p = t.getBaseAxis(),
  18040. d = p.isHorizontal(),
  18041. f = p.inverse;
  18042. d ? (f && (c.shape.x += l), c.shape.width = 0) : (f || (c.shape.y += u), c.shape.height = 0);
  18043. var g = X(r) ? function (t) {
  18044. r(t, c)
  18045. } : null;
  18046. gh(c, {
  18047. shape: {
  18048. width: l,
  18049. height: u,
  18050. x: a,
  18051. y: s
  18052. }
  18053. }, n, null, i, g)
  18054. }
  18055. return c
  18056. }
  18057. function wS(t, e, n) {
  18058. var i = t.getArea(),
  18059. r = Zr(i.r0, 1),
  18060. o = Zr(i.r, 1),
  18061. a = new zu({
  18062. shape: {
  18063. cx: Zr(t.cx, 1),
  18064. cy: Zr(t.cy, 1),
  18065. r0: r,
  18066. r: o,
  18067. startAngle: i.startAngle,
  18068. endAngle: i.endAngle,
  18069. clockwise: i.clockwise
  18070. }
  18071. });
  18072. e && ("angle" === t.getBaseAxis().dim ? a.shape.endAngle = i.startAngle : a.shape.r = r, gh(a, {
  18073. shape: {
  18074. endAngle: i.endAngle,
  18075. r: o
  18076. }
  18077. }, n));
  18078. return a
  18079. }
  18080. function SS(t, e, n, i, r) {
  18081. return t ? "polar" === t.type ? wS(t, e, n) : "cartesian2d" === t.type ? bS(t, e, n, i, r) : null : null
  18082. }
  18083. function MS(t, e) {
  18084. return t.type === e
  18085. }
  18086. function IS(t, e) {
  18087. if (t.length === e.length) {
  18088. for (var n = 0; n < t.length; n++)
  18089. if (t[n] !== e[n]) return;
  18090. return !0
  18091. }
  18092. }
  18093. function TS(t) {
  18094. for (var e = 1 / 0, n = 1 / 0, i = -1 / 0, r = -1 / 0, o = 0; o < t.length;) {
  18095. var a = t[o++],
  18096. s = t[o++];
  18097. isNaN(a) || (e = Math.min(a, e), i = Math.max(a, i)), isNaN(s) || (n = Math.min(s, n), r = Math.max(s, r))
  18098. }
  18099. return [
  18100. [e, n],
  18101. [i, r]
  18102. ]
  18103. }
  18104. function CS(t, e) {
  18105. var n = TS(t),
  18106. i = n[0],
  18107. r = n[1],
  18108. o = TS(e),
  18109. a = o[0],
  18110. s = o[1];
  18111. return Math.max(Math.abs(i[0] - a[0]), Math.abs(i[1] - a[1]), Math.abs(r[0] - s[0]), Math.abs(r[1] - s[1]))
  18112. }
  18113. function DS(t) {
  18114. return j(t) ? t : t ? .5 : 0
  18115. }
  18116. function AS(t, e, n, i) {
  18117. var r = e.getBaseAxis(),
  18118. o = "x" === r.dim || "radius" === r.dim ? 0 : 1,
  18119. a = [],
  18120. s = 0,
  18121. l = [],
  18122. u = [],
  18123. h = [],
  18124. c = [];
  18125. if (i) {
  18126. for (s = 0; s < t.length; s += 2) isNaN(t[s]) || isNaN(t[s + 1]) || c.push(t[s], t[s + 1]);
  18127. t = c
  18128. }
  18129. for (s = 0; s < t.length - 2; s += 2) switch (h[0] = t[s + 2], h[1] = t[s + 3], u[0] = t[s], u[1] = t[s + 1], a.push(u[0], u[1]), n) {
  18130. case "end":
  18131. l[o] = h[o], l[1 - o] = u[1 - o], a.push(l[0], l[1]);
  18132. break;
  18133. case "middle":
  18134. var p = (u[o] + h[o]) / 2,
  18135. d = [];
  18136. l[o] = d[o] = p, l[1 - o] = u[1 - o], d[1 - o] = h[1 - o], a.push(l[0], l[1]), a.push(d[0], d[1]);
  18137. break;
  18138. default:
  18139. l[o] = u[o], l[1 - o] = h[1 - o], a.push(l[0], l[1])
  18140. }
  18141. return a.push(t[s++], t[s++]), a
  18142. }
  18143. function kS(t, e, n) {
  18144. var i = t.getVisual("visualMeta");
  18145. if (i && i.length && t.count() && "cartesian2d" === e.type) {
  18146. for (var r, o, a = i.length - 1; a >= 0; a--) {
  18147. var s = t.getDimensionInfo(i[a].dimension);
  18148. if ("x" === (r = s && s.coordDim) || "y" === r) {
  18149. o = i[a];
  18150. break
  18151. }
  18152. }
  18153. if (o) {
  18154. var l = e.getAxis(r),
  18155. u = z(o.stops, (function (t) {
  18156. return {
  18157. coord: l.toGlobalCoord(l.dataToCoord(t.value)),
  18158. color: t.color
  18159. }
  18160. })),
  18161. h = u.length,
  18162. c = o.outerColors.slice();
  18163. h && u[0].coord > u[h - 1].coord && (u.reverse(), c.reverse());
  18164. var p = function (t, e) {
  18165. var n, i, r = [],
  18166. o = t.length;
  18167. function a(t, e, n) {
  18168. var i = t.coord;
  18169. return {
  18170. coord: n,
  18171. color: ti((n - i) / (e.coord - i), [t.color, e.color])
  18172. }
  18173. }
  18174. for (var s = 0; s < o; s++) {
  18175. var l = t[s],
  18176. u = l.coord;
  18177. if (u < 0) n = l;
  18178. else {
  18179. if (u > e) {
  18180. i ? r.push(a(i, l, e)) : n && r.push(a(n, l, 0), a(n, l, e));
  18181. break
  18182. }
  18183. n && (r.push(a(n, l, 0)), n = null), r.push(l), i = l
  18184. }
  18185. }
  18186. return r
  18187. }(u, "x" === r ? n.getWidth() : n.getHeight()),
  18188. d = p.length;
  18189. if (!d && h) return u[0].coord < 0 ? c[1] ? c[1] : u[h - 1].color : c[0] ? c[0] : u[0].color;
  18190. var f = p[0].coord - 10,
  18191. g = p[d - 1].coord + 10,
  18192. y = g - f;
  18193. if (y < .001) return "transparent";
  18194. E(p, (function (t) {
  18195. t.offset = (t.coord - f) / y
  18196. })), p.push({
  18197. offset: d ? p[d - 1].offset : .5,
  18198. color: c[1] || "transparent"
  18199. }), p.unshift({
  18200. offset: d ? p[0].offset : .5,
  18201. color: c[0] || "transparent"
  18202. });
  18203. var v = new nh(0, 0, 0, 0, p, !0);
  18204. return v[r] = f, v[r + "2"] = g, v
  18205. }
  18206. }
  18207. }
  18208. function LS(t, e, n) {
  18209. var i = t.get("showAllSymbol"),
  18210. r = "auto" === i;
  18211. if (!i || r) {
  18212. var o = n.getAxesByScale("ordinal")[0];
  18213. if (o && (!r || ! function (t, e) {
  18214. var n = t.getExtent(),
  18215. i = Math.abs(n[1] - n[0]) / t.scale.count();
  18216. isNaN(i) && (i = 0);
  18217. for (var r = e.count(), o = Math.max(1, Math.round(r / 5)), a = 0; a < r; a += o)
  18218. if (1.5 * oS.getSymbolSize(e, a)[t.isHorizontal() ? 1 : 0] > i) return !1;
  18219. return !0
  18220. }(o, e))) {
  18221. var a = e.mapDimension(o.dim),
  18222. s = {};
  18223. return E(o.getViewLabels(), (function (t) {
  18224. var e = o.scale.getRawOrdinalNumber(t.tickValue);
  18225. s[e] = 1
  18226. })),
  18227. function (t) {
  18228. return !s.hasOwnProperty(e.get(a, t))
  18229. }
  18230. }
  18231. }
  18232. }
  18233. function PS(t, e) {
  18234. return [t[2 * e], t[2 * e + 1]]
  18235. }
  18236. function OS(t) {
  18237. if (t.get(["endLabel", "show"])) return !0;
  18238. for (var e = 0; e < ol.length; e++)
  18239. if (t.get([ol[e], "endLabel", "show"])) return !0;
  18240. return !1
  18241. }
  18242. function RS(t, e, n, i) {
  18243. if (MS(e, "cartesian2d")) {
  18244. var r = i.getModel("endLabel"),
  18245. o = r.get("valueAnimation"),
  18246. a = i.getData(),
  18247. s = {
  18248. lastFrameIndex: 0
  18249. },
  18250. l = OS(i) ? function (n, i) {
  18251. t._endLabelOnDuring(n, i, a, s, o, r, e)
  18252. } : null,
  18253. u = e.getBaseAxis().isHorizontal(),
  18254. h = bS(e, n, i, (function () {
  18255. var e = t._endLabel;
  18256. e && n && null != s.originalX && e.attr({
  18257. x: s.originalX,
  18258. y: s.originalY
  18259. })
  18260. }), l);
  18261. if (!i.get("clip", !0)) {
  18262. var c = h.shape,
  18263. p = Math.max(c.width, c.height);
  18264. u ? (c.y -= p, c.height += 2 * p) : (c.x -= p, c.width += 2 * p)
  18265. }
  18266. return l && l(1, h), h
  18267. }
  18268. return wS(e, n, i)
  18269. }
  18270. var NS = function (t) {
  18271. function e() {
  18272. return null !== t && t.apply(this, arguments) || this
  18273. }
  18274. return n(e, t), e.prototype.init = function () {
  18275. var t = new zr,
  18276. e = new hS;
  18277. this.group.add(e.group), this._symbolDraw = e, this._lineGroup = t
  18278. }, e.prototype.render = function (t, e, n) {
  18279. var i = this,
  18280. r = t.coordinateSystem,
  18281. o = this.group,
  18282. a = t.getData(),
  18283. s = t.getModel("lineStyle"),
  18284. l = t.getModel("areaStyle"),
  18285. u = a.getLayout("points") || [],
  18286. h = "polar" === r.type,
  18287. c = this._coordSys,
  18288. p = this._symbolDraw,
  18289. d = this._polyline,
  18290. f = this._polygon,
  18291. g = this._lineGroup,
  18292. y = !e.ssr && t.isAnimationEnabled(),
  18293. v = !l.isEmpty(),
  18294. m = l.get("origin"),
  18295. x = cS(r, a, m),
  18296. _ = v && function (t, e, n) {
  18297. if (!n.valueDim) return [];
  18298. for (var i = e.count(), r = Ex(2 * i), o = 0; o < i; o++) {
  18299. var a = pS(n, t, e, o);
  18300. r[2 * o] = a[0], r[2 * o + 1] = a[1]
  18301. }
  18302. return r
  18303. }(r, a, x),
  18304. b = t.get("showSymbol"),
  18305. w = t.get("connectNulls"),
  18306. S = b && !h && LS(t, a, r),
  18307. M = this._data;
  18308. M && M.eachItemGraphicEl((function (t, e) {
  18309. t.__temp && (o.remove(t), M.setItemGraphicEl(e, null))
  18310. })), b || p.remove(), o.add(g);
  18311. var I, T = !h && t.get("step");
  18312. r && r.getArea && t.get("clip", !0) && (null != (I = r.getArea()).width ? (I.x -= .1, I.y -= .1, I.width += .2, I.height += .2) : I.r0 && (I.r0 -= .5, I.r += .5)), this._clipShapeForSymbol = I;
  18313. var C = kS(a, r, n) || a.getVisual("style")[a.getVisual("drawType")];
  18314. if (d && c.type === r.type && T === this._step) {
  18315. v && !f ? f = this._newPolygon(u, _) : f && !v && (g.remove(f), f = this._polygon = null), h || this._initOrUpdateEndLabel(t, r, _p(C));
  18316. var D = g.getClipPath();
  18317. if (D) gh(D, {
  18318. shape: RS(this, r, !1, t).shape
  18319. }, t);
  18320. else g.setClipPath(RS(this, r, !0, t));
  18321. b && p.updateData(a, {
  18322. isIgnore: S,
  18323. clipShape: I,
  18324. disableAnimation: !0,
  18325. getSymbolPoint: function (t) {
  18326. return [u[2 * t], u[2 * t + 1]]
  18327. }
  18328. }), IS(this._stackedOnPoints, _) && IS(this._points, u) || (y ? this._doUpdateAnimation(a, _, r, n, T, m, w) : (T && (u = AS(u, r, T, w), _ && (_ = AS(_, r, T, w))), d.setShape({
  18329. points: u
  18330. }), f && f.setShape({
  18331. points: u,
  18332. stackedOnPoints: _
  18333. })))
  18334. } else b && p.updateData(a, {
  18335. isIgnore: S,
  18336. clipShape: I,
  18337. disableAnimation: !0,
  18338. getSymbolPoint: function (t) {
  18339. return [u[2 * t], u[2 * t + 1]]
  18340. }
  18341. }), y && this._initSymbolLabelAnimation(a, r, I), T && (u = AS(u, r, T, w), _ && (_ = AS(_, r, T, w))), d = this._newPolyline(u), v ? f = this._newPolygon(u, _) : f && (g.remove(f), f = this._polygon = null), h || this._initOrUpdateEndLabel(t, r, _p(C)), g.setClipPath(RS(this, r, !0, t));
  18342. var A = t.getModel("emphasis"),
  18343. L = A.get("focus"),
  18344. P = A.get("blurScope"),
  18345. O = A.get("disabled");
  18346. (d.useStyle(k(s.getLineStyle(), {
  18347. fill: "none",
  18348. stroke: C,
  18349. lineJoin: "bevel"
  18350. })), jl(d, t, "lineStyle"), d.style.lineWidth > 0 && "bolder" === t.get(["emphasis", "lineStyle", "width"])) && (d.getState("emphasis").style.lineWidth = +d.style.lineWidth + 1);
  18351. Qs(d).seriesIndex = t.seriesIndex, Yl(d, L, P, O);
  18352. var R = DS(t.get("smooth")),
  18353. N = t.get("smoothMonotone");
  18354. if (d.setShape({
  18355. smooth: R,
  18356. smoothMonotone: N,
  18357. connectNulls: w
  18358. }), f) {
  18359. var E = a.getCalculationInfo("stackedOnSeries"),
  18360. z = 0;
  18361. f.useStyle(k(l.getAreaStyle(), {
  18362. fill: C,
  18363. opacity: .7,
  18364. lineJoin: "bevel",
  18365. decal: a.getVisual("style").decal
  18366. })), E && (z = DS(E.get("smooth"))), f.setShape({
  18367. smooth: R,
  18368. stackedOnSmooth: z,
  18369. smoothMonotone: N,
  18370. connectNulls: w
  18371. }), jl(f, t, "areaStyle"), Qs(f).seriesIndex = t.seriesIndex, Yl(f, L, P, O)
  18372. }
  18373. var V = function (t) {
  18374. i._changePolyState(t)
  18375. };
  18376. a.eachItemGraphicEl((function (t) {
  18377. t && (t.onHoverStateChange = V)
  18378. })), this._polyline.onHoverStateChange = V, this._data = a, this._coordSys = r, this._stackedOnPoints = _, this._points = u, this._step = T, this._valueOrigin = m, t.get("triggerLineEvent") && (this.packEventData(t, d), f && this.packEventData(t, f))
  18379. }, e.prototype.packEventData = function (t, e) {
  18380. Qs(e).eventData = {
  18381. componentType: "series",
  18382. componentSubType: "line",
  18383. componentIndex: t.componentIndex,
  18384. seriesIndex: t.seriesIndex,
  18385. seriesName: t.name,
  18386. seriesType: "line"
  18387. }
  18388. }, e.prototype.highlight = function (t, e, n, i) {
  18389. var r = t.getData(),
  18390. o = Po(r, i);
  18391. if (this._changePolyState("emphasis"), !(o instanceof Array) && null != o && o >= 0) {
  18392. var a = r.getLayout("points"),
  18393. s = r.getItemGraphicEl(o);
  18394. if (!s) {
  18395. var l = a[2 * o],
  18396. u = a[2 * o + 1];
  18397. if (isNaN(l) || isNaN(u)) return;
  18398. if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(l, u)) return;
  18399. var h = t.get("zlevel") || 0,
  18400. c = t.get("z") || 0;
  18401. (s = new oS(r, o)).x = l, s.y = u, s.setZ(h, c);
  18402. var p = s.getSymbolPath().getTextContent();
  18403. p && (p.zlevel = h, p.z = c, p.z2 = this._polyline.z2 + 1), s.__temp = !0, r.setItemGraphicEl(o, s), s.stopSymbolAnimation(!0), this.group.add(s)
  18404. }
  18405. s.highlight()
  18406. } else kg.prototype.highlight.call(this, t, e, n, i)
  18407. }, e.prototype.downplay = function (t, e, n, i) {
  18408. var r = t.getData(),
  18409. o = Po(r, i);
  18410. if (this._changePolyState("normal"), null != o && o >= 0) {
  18411. var a = r.getItemGraphicEl(o);
  18412. a && (a.__temp ? (r.setItemGraphicEl(o, null), this.group.remove(a)) : a.downplay())
  18413. } else kg.prototype.downplay.call(this, t, e, n, i)
  18414. }, e.prototype._changePolyState = function (t) {
  18415. var e = this._polygon;
  18416. Il(this._polyline, t), e && Il(e, t)
  18417. }, e.prototype._newPolyline = function (t) {
  18418. var e = this._polyline;
  18419. return e && this._lineGroup.remove(e), e = new mS({
  18420. shape: {
  18421. points: t
  18422. },
  18423. segmentIgnoreThreshold: 2,
  18424. z2: 10
  18425. }), this._lineGroup.add(e), this._polyline = e, e
  18426. }, e.prototype._newPolygon = function (t, e) {
  18427. var n = this._polygon;
  18428. return n && this._lineGroup.remove(n), n = new _S({
  18429. shape: {
  18430. points: t,
  18431. stackedOnPoints: e
  18432. },
  18433. segmentIgnoreThreshold: 2
  18434. }), this._lineGroup.add(n), this._polygon = n, n
  18435. }, e.prototype._initSymbolLabelAnimation = function (t, e, n) {
  18436. var i, r, o = e.getBaseAxis(),
  18437. a = o.inverse;
  18438. "cartesian2d" === e.type ? (i = o.isHorizontal(), r = !1) : "polar" === e.type && (i = "angle" === o.dim, r = !0);
  18439. var s = t.hostModel,
  18440. l = s.get("animationDuration");
  18441. X(l) && (l = l(null));
  18442. var u = s.get("animationDelay") || 0,
  18443. h = X(u) ? u(null) : u;
  18444. t.eachItemGraphicEl((function (t, o) {
  18445. var s = t;
  18446. if (s) {
  18447. var c = [t.x, t.y],
  18448. p = void 0,
  18449. d = void 0,
  18450. f = void 0;
  18451. if (n)
  18452. if (r) {
  18453. var g = n,
  18454. y = e.pointToCoord(c);
  18455. i ? (p = g.startAngle, d = g.endAngle, f = -y[1] / 180 * Math.PI) : (p = g.r0, d = g.r, f = y[0])
  18456. } else {
  18457. var v = n;
  18458. i ? (p = v.x, d = v.x + v.width, f = t.x) : (p = v.y + v.height, d = v.y, f = t.y)
  18459. } var m = d === p ? 0 : (f - p) / (d - p);
  18460. a && (m = 1 - m);
  18461. var x = X(u) ? u(o) : l * m + h,
  18462. _ = s.getSymbolPath(),
  18463. b = _.getTextContent();
  18464. s.attr({
  18465. scaleX: 0,
  18466. scaleY: 0
  18467. }), s.animateTo({
  18468. scaleX: 1,
  18469. scaleY: 1
  18470. }, {
  18471. duration: 200,
  18472. setToFinal: !0,
  18473. delay: x
  18474. }), b && b.animateFrom({
  18475. style: {
  18476. opacity: 0
  18477. }
  18478. }, {
  18479. duration: 300,
  18480. delay: x
  18481. }), _.disableLabelAnimation = !0
  18482. }
  18483. }))
  18484. }, e.prototype._initOrUpdateEndLabel = function (t, e, n) {
  18485. var i = t.getModel("endLabel");
  18486. if (OS(t)) {
  18487. var r = t.getData(),
  18488. o = this._polyline,
  18489. a = r.getLayout("points");
  18490. if (!a) return o.removeTextContent(), void(this._endLabel = null);
  18491. var s = this._endLabel;
  18492. s || ((s = this._endLabel = new Fs({
  18493. z2: 200
  18494. })).ignoreClip = !0, o.setTextContent(this._endLabel), o.disableLabelAnimation = !0);
  18495. var l = function (t) {
  18496. for (var e, n, i = t.length / 2; i > 0 && (e = t[2 * i - 2], n = t[2 * i - 1], isNaN(e) || isNaN(n)); i--);
  18497. return i - 1
  18498. }(a);
  18499. l >= 0 && (tc(o, ec(t, "endLabel"), {
  18500. inheritColor: n,
  18501. labelFetcher: t,
  18502. labelDataIndex: l,
  18503. defaultText: function (t, e, n) {
  18504. return null != n ? rS(r, n) : iS(r, t)
  18505. },
  18506. enableTextSetter: !0
  18507. }, function (t, e) {
  18508. var n = e.getBaseAxis(),
  18509. i = n.isHorizontal(),
  18510. r = n.inverse,
  18511. o = i ? r ? "right" : "left" : "center",
  18512. a = i ? "middle" : r ? "top" : "bottom";
  18513. return {
  18514. normal: {
  18515. align: t.get("align") || o,
  18516. verticalAlign: t.get("verticalAlign") || a
  18517. }
  18518. }
  18519. }(i, e)), o.textConfig.position = null)
  18520. } else this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null)
  18521. }, e.prototype._endLabelOnDuring = function (t, e, n, i, r, o, a) {
  18522. var s = this._endLabel,
  18523. l = this._polyline;
  18524. if (s) {
  18525. t < 1 && null == i.originalX && (i.originalX = s.x, i.originalY = s.y);
  18526. var u = n.getLayout("points"),
  18527. h = n.hostModel,
  18528. c = h.get("connectNulls"),
  18529. p = o.get("precision"),
  18530. d = o.get("distance") || 0,
  18531. f = a.getBaseAxis(),
  18532. g = f.isHorizontal(),
  18533. y = f.inverse,
  18534. v = e.shape,
  18535. m = y ? g ? v.x : v.y + v.height : g ? v.x + v.width : v.y,
  18536. x = (g ? d : 0) * (y ? -1 : 1),
  18537. _ = (g ? 0 : -d) * (y ? -1 : 1),
  18538. b = g ? "x" : "y",
  18539. w = function (t, e, n) {
  18540. for (var i, r, o = t.length / 2, a = "x" === n ? 0 : 1, s = 0, l = -1, u = 0; u < o; u++)
  18541. if (r = t[2 * u + a], !isNaN(r) && !isNaN(t[2 * u + 1 - a]))
  18542. if (0 !== u) {
  18543. if (i <= e && r >= e || i >= e && r <= e) {
  18544. l = u;
  18545. break
  18546. }
  18547. s = u, i = r
  18548. } else i = r;
  18549. return {
  18550. range: [s, l],
  18551. t: (e - i) / (r - i)
  18552. }
  18553. }(u, m, b),
  18554. S = w.range,
  18555. M = S[1] - S[0],
  18556. I = void 0;
  18557. if (M >= 1) {
  18558. if (M > 1 && !c) {
  18559. var T = PS(u, S[0]);
  18560. s.attr({
  18561. x: T[0] + x,
  18562. y: T[1] + _
  18563. }), r && (I = h.getRawValue(S[0]))
  18564. } else {
  18565. (T = l.getPointOn(m, b)) && s.attr({
  18566. x: T[0] + x,
  18567. y: T[1] + _
  18568. });
  18569. var C = h.getRawValue(S[0]),
  18570. D = h.getRawValue(S[1]);
  18571. r && (I = Wo(n, p, C, D, w.t))
  18572. }
  18573. i.lastFrameIndex = S[0]
  18574. } else {
  18575. var A = 1 === t || i.lastFrameIndex > 0 ? S[0] : 0;
  18576. T = PS(u, A);
  18577. r && (I = h.getRawValue(A)), s.attr({
  18578. x: T[0] + x,
  18579. y: T[1] + _
  18580. })
  18581. }
  18582. r && uc(s).setLabelText(I)
  18583. }
  18584. }, e.prototype._doUpdateAnimation = function (t, e, n, i, r, o, a) {
  18585. var s = this._polyline,
  18586. l = this._polygon,
  18587. u = t.hostModel,
  18588. h = function (t, e, n, i, r, o, a, s) {
  18589. for (var l = function (t, e) {
  18590. var n = [];
  18591. return e.diff(t).add((function (t) {
  18592. n.push({
  18593. cmd: "+",
  18594. idx: t
  18595. })
  18596. })).update((function (t, e) {
  18597. n.push({
  18598. cmd: "=",
  18599. idx: e,
  18600. idx1: t
  18601. })
  18602. })).remove((function (t) {
  18603. n.push({
  18604. cmd: "-",
  18605. idx: t
  18606. })
  18607. })).execute(), n
  18608. }(t, e), u = [], h = [], c = [], p = [], d = [], f = [], g = [], y = cS(r, e, a), v = t.getLayout("points") || [], m = e.getLayout("points") || [], x = 0; x < l.length; x++) {
  18609. var _ = l[x],
  18610. b = !0,
  18611. w = void 0,
  18612. S = void 0;
  18613. switch (_.cmd) {
  18614. case "=":
  18615. w = 2 * _.idx, S = 2 * _.idx1;
  18616. var M = v[w],
  18617. I = v[w + 1],
  18618. T = m[S],
  18619. C = m[S + 1];
  18620. (isNaN(M) || isNaN(I)) && (M = T, I = C), u.push(M, I), h.push(T, C), c.push(n[w], n[w + 1]), p.push(i[S], i[S + 1]), g.push(e.getRawIndex(_.idx1));
  18621. break;
  18622. case "+":
  18623. var D = _.idx,
  18624. A = y.dataDimsForPoint,
  18625. k = r.dataToPoint([e.get(A[0], D), e.get(A[1], D)]);
  18626. S = 2 * D, u.push(k[0], k[1]), h.push(m[S], m[S + 1]);
  18627. var L = pS(y, r, e, D);
  18628. c.push(L[0], L[1]), p.push(i[S], i[S + 1]), g.push(e.getRawIndex(D));
  18629. break;
  18630. case "-":
  18631. b = !1
  18632. }
  18633. b && (d.push(_), f.push(f.length))
  18634. }
  18635. f.sort((function (t, e) {
  18636. return g[t] - g[e]
  18637. }));
  18638. var P = u.length,
  18639. O = Ex(P),
  18640. R = Ex(P),
  18641. N = Ex(P),
  18642. E = Ex(P),
  18643. z = [];
  18644. for (x = 0; x < f.length; x++) {
  18645. var V = f[x],
  18646. B = 2 * x,
  18647. F = 2 * V;
  18648. O[B] = u[F], O[B + 1] = u[F + 1], R[B] = h[F], R[B + 1] = h[F + 1], N[B] = c[F], N[B + 1] = c[F + 1], E[B] = p[F], E[B + 1] = p[F + 1], z[x] = d[V]
  18649. }
  18650. return {
  18651. current: O,
  18652. next: R,
  18653. stackedOnCurrent: N,
  18654. stackedOnNext: E,
  18655. status: z
  18656. }
  18657. }(this._data, t, this._stackedOnPoints, e, this._coordSys, 0, this._valueOrigin),
  18658. c = h.current,
  18659. p = h.stackedOnCurrent,
  18660. d = h.next,
  18661. f = h.stackedOnNext;
  18662. if (r && (c = AS(h.current, n, r, a), p = AS(h.stackedOnCurrent, n, r, a), d = AS(h.next, n, r, a), f = AS(h.stackedOnNext, n, r, a)), CS(c, d) > 3e3 || l && CS(p, f) > 3e3) return s.stopAnimation(), s.setShape({
  18663. points: d
  18664. }), void(l && (l.stopAnimation(), l.setShape({
  18665. points: d,
  18666. stackedOnPoints: f
  18667. })));
  18668. s.shape.__points = h.current, s.shape.points = c;
  18669. var g = {
  18670. shape: {
  18671. points: d
  18672. }
  18673. };
  18674. h.current !== c && (g.shape.__points = h.next), s.stopAnimation(), fh(s, g, u), l && (l.setShape({
  18675. points: c,
  18676. stackedOnPoints: p
  18677. }), l.stopAnimation(), fh(l, {
  18678. shape: {
  18679. stackedOnPoints: f
  18680. }
  18681. }, u), s.shape.points !== l.shape.points && (l.shape.points = s.shape.points));
  18682. for (var y = [], v = h.status, m = 0; m < v.length; m++) {
  18683. if ("=" === v[m].cmd) {
  18684. var x = t.getItemGraphicEl(v[m].idx1);
  18685. x && y.push({
  18686. el: x,
  18687. ptIdx: m
  18688. })
  18689. }
  18690. }
  18691. s.animators && s.animators.length && s.animators[0].during((function () {
  18692. l && l.dirtyShape();
  18693. for (var t = s.shape.__points, e = 0; e < y.length; e++) {
  18694. var n = y[e].el,
  18695. i = 2 * y[e].ptIdx;
  18696. n.x = t[i], n.y = t[i + 1], n.markRedraw()
  18697. }
  18698. }))
  18699. }, e.prototype.remove = function (t) {
  18700. var e = this.group,
  18701. n = this._data;
  18702. this._lineGroup.removeAll(), this._symbolDraw.remove(!0), n && n.eachItemGraphicEl((function (t, i) {
  18703. t.__temp && (e.remove(t), n.setItemGraphicEl(i, null))
  18704. })), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null
  18705. }, e.type = "line", e
  18706. }(kg);
  18707. function ES(t, e) {
  18708. return {
  18709. seriesType: t,
  18710. plan: Cg(),
  18711. reset: function (t) {
  18712. var n = t.getData(),
  18713. i = t.coordinateSystem,
  18714. r = t.pipelineContext,
  18715. o = e || r.large;
  18716. if (i) {
  18717. var a = z(i.dimensions, (function (t) {
  18718. return n.mapDimension(t)
  18719. })).slice(0, 2),
  18720. s = a.length,
  18721. l = n.getCalculationInfo("stackResultDimension");
  18722. gx(n, a[0]) && (a[0] = l), gx(n, a[1]) && (a[1] = l);
  18723. var u = n.getStore(),
  18724. h = n.getDimensionIndex(a[0]),
  18725. c = n.getDimensionIndex(a[1]);
  18726. return s && {
  18727. progress: function (t, e) {
  18728. for (var n = t.end - t.start, r = o && Ex(n * s), a = [], l = [], p = t.start, d = 0; p < t.end; p++) {
  18729. var f = void 0;
  18730. if (1 === s) {
  18731. var g = u.get(h, p);
  18732. f = i.dataToPoint(g, null, l)
  18733. } else a[0] = u.get(h, p), a[1] = u.get(c, p), f = i.dataToPoint(a, null, l);
  18734. o ? (r[d++] = f[0], r[d++] = f[1]) : e.setItemLayout(p, f.slice())
  18735. }
  18736. o && e.setLayout("points", r)
  18737. }
  18738. }
  18739. }
  18740. }
  18741. }
  18742. }
  18743. var zS = {
  18744. average: function (t) {
  18745. for (var e = 0, n = 0, i = 0; i < t.length; i++) isNaN(t[i]) || (e += t[i], n++);
  18746. return 0 === n ? NaN : e / n
  18747. },
  18748. sum: function (t) {
  18749. for (var e = 0, n = 0; n < t.length; n++) e += t[n] || 0;
  18750. return e
  18751. },
  18752. max: function (t) {
  18753. for (var e = -1 / 0, n = 0; n < t.length; n++) t[n] > e && (e = t[n]);
  18754. return isFinite(e) ? e : NaN
  18755. },
  18756. min: function (t) {
  18757. for (var e = 1 / 0, n = 0; n < t.length; n++) t[n] < e && (e = t[n]);
  18758. return isFinite(e) ? e : NaN
  18759. },
  18760. nearest: function (t) {
  18761. return t[0]
  18762. }
  18763. },
  18764. VS = function (t) {
  18765. return Math.round(t.length / 2)
  18766. };
  18767. function BS(t) {
  18768. return {
  18769. seriesType: t,
  18770. reset: function (t, e, n) {
  18771. var i = t.getData(),
  18772. r = t.get("sampling"),
  18773. o = t.coordinateSystem,
  18774. a = i.count();
  18775. if (a > 10 && "cartesian2d" === o.type && r) {
  18776. var s = o.getBaseAxis(),
  18777. l = o.getOtherAxis(s),
  18778. u = s.getExtent(),
  18779. h = n.getDevicePixelRatio(),
  18780. c = Math.abs(u[1] - u[0]) * (h || 1),
  18781. p = Math.round(a / c);
  18782. if (isFinite(p) && p > 1) {
  18783. "lttb" === r && t.setData(i.lttbDownSample(i.mapDimension(l.dim), 1 / p));
  18784. var d = void 0;
  18785. U(r) ? d = zS[r] : X(r) && (d = r), d && t.setData(i.downSample(i.mapDimension(l.dim), 1 / p, d, VS))
  18786. }
  18787. }
  18788. }
  18789. }
  18790. }
  18791. var FS = function (t) {
  18792. function e() {
  18793. var n = null !== t && t.apply(this, arguments) || this;
  18794. return n.type = e.type, n
  18795. }
  18796. return n(e, t), e.prototype.getInitialData = function (t, e) {
  18797. return vx(null, this, {
  18798. useEncodeDefaulter: !0
  18799. })
  18800. }, e.prototype.getMarkerPosition = function (t, e, n) {
  18801. var i = this.coordinateSystem;
  18802. if (i && i.clampData) {
  18803. var r = i.clampData(t),
  18804. o = i.dataToPoint(r);
  18805. if (n) E(i.getAxes(), (function (t, n) {
  18806. if ("category" === t.type && null != e) {
  18807. var i = t.getTicksCoords(),
  18808. a = r[n],
  18809. s = "x1" === e[n] || "y1" === e[n];
  18810. if (s && (a += 1), i.length < 2) return;
  18811. if (2 === i.length) return void(o[n] = t.toGlobalCoord(t.getExtent()[s ? 1 : 0]));
  18812. for (var l = void 0, u = void 0, h = 1, c = 0; c < i.length; c++) {
  18813. var p = i[c].coord,
  18814. d = c === i.length - 1 ? i[c - 1].tickValue + h : i[c].tickValue;
  18815. if (d === a) {
  18816. u = p;
  18817. break
  18818. }
  18819. if (d < a) l = p;
  18820. else if (null != l && d > a) {
  18821. u = (p + l) / 2;
  18822. break
  18823. }
  18824. 1 === c && (h = d - i[0].tickValue)
  18825. }
  18826. null == u && (l ? l && (u = i[i.length - 1].coord) : u = i[0].coord), o[n] = t.toGlobalCoord(u)
  18827. }
  18828. }));
  18829. else {
  18830. var a = this.getData(),
  18831. s = a.getLayout("offset"),
  18832. l = a.getLayout("size"),
  18833. u = i.getBaseAxis().isHorizontal() ? 0 : 1;
  18834. o[u] += s + l / 2
  18835. }
  18836. return o
  18837. }
  18838. return [NaN, NaN]
  18839. }, e.type = "series.__base_bar__", e.defaultOption = {
  18840. z: 2,
  18841. coordinateSystem: "cartesian2d",
  18842. legendHoverLink: !0,
  18843. barMinHeight: 0,
  18844. barMinAngle: 0,
  18845. large: !1,
  18846. largeThreshold: 400,
  18847. progressive: 3e3,
  18848. progressiveChunkMode: "mod"
  18849. }, e
  18850. }(mg);
  18851. mg.registerClass(FS);
  18852. var GS = function (t) {
  18853. function e() {
  18854. var n = null !== t && t.apply(this, arguments) || this;
  18855. return n.type = e.type, n
  18856. }
  18857. return n(e, t), e.prototype.getInitialData = function () {
  18858. return vx(null, this, {
  18859. useEncodeDefaulter: !0,
  18860. createInvertedIndices: !!this.get("realtimeSort", !0) || null
  18861. })
  18862. }, e.prototype.getProgressive = function () {
  18863. return !!this.get("large") && this.get("progressive")
  18864. }, e.prototype.getProgressiveThreshold = function () {
  18865. var t = this.get("progressiveThreshold"),
  18866. e = this.get("largeThreshold");
  18867. return e > t && (t = e), t
  18868. }, e.prototype.brushSelector = function (t, e, n) {
  18869. return n.rect(e.getItemLayout(t))
  18870. }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = Cc(FS.defaultOption, {
  18871. clip: !0,
  18872. roundCap: !1,
  18873. showBackground: !1,
  18874. backgroundStyle: {
  18875. color: "rgba(180, 180, 180, 0.2)",
  18876. borderColor: null,
  18877. borderWidth: 0,
  18878. borderType: "solid",
  18879. borderRadius: 0,
  18880. shadowBlur: 0,
  18881. shadowColor: null,
  18882. shadowOffsetX: 0,
  18883. shadowOffsetY: 0,
  18884. opacity: 1
  18885. },
  18886. select: {
  18887. itemStyle: {
  18888. borderColor: "#212121"
  18889. }
  18890. },
  18891. realtimeSort: !1
  18892. }), e
  18893. }(FS),
  18894. WS = function () {
  18895. this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = 2 * Math.PI, this.clockwise = !0
  18896. },
  18897. HS = function (t) {
  18898. function e(e) {
  18899. var n = t.call(this, e) || this;
  18900. return n.type = "sausage", n
  18901. }
  18902. return n(e, t), e.prototype.getDefaultShape = function () {
  18903. return new WS
  18904. }, e.prototype.buildPath = function (t, e) {
  18905. var n = e.cx,
  18906. i = e.cy,
  18907. r = Math.max(e.r0 || 0, 0),
  18908. o = Math.max(e.r, 0),
  18909. a = .5 * (o - r),
  18910. s = r + a,
  18911. l = e.startAngle,
  18912. u = e.endAngle,
  18913. h = e.clockwise,
  18914. c = 2 * Math.PI,
  18915. p = h ? u - l < c : l - u < c;
  18916. p || (l = u - (h ? c : -c));
  18917. var d = Math.cos(l),
  18918. f = Math.sin(l),
  18919. g = Math.cos(u),
  18920. y = Math.sin(u);
  18921. p ? (t.moveTo(d * r + n, f * r + i), t.arc(d * s + n, f * s + i, a, -Math.PI + l, l, !h)) : t.moveTo(d * o + n, f * o + i), t.arc(n, i, o, l, u, !h), t.arc(g * s + n, y * s + i, a, u - 2 * Math.PI, u - Math.PI, !h), 0 !== r && t.arc(n, i, r, u, l, h)
  18922. }, e
  18923. }(Is);
  18924. function YS(t, e, n) {
  18925. return e * Math.sin(t) * (n ? -1 : 1)
  18926. }
  18927. function XS(t, e, n) {
  18928. return e * Math.cos(t) * (n ? 1 : -1)
  18929. }
  18930. function US(t, e, n) {
  18931. var i = t.get("borderRadius");
  18932. if (null == i) return n ? {
  18933. cornerRadius: 0
  18934. } : null;
  18935. Y(i) || (i = [i, i, i, i]);
  18936. var r = Math.abs(e.r || 0 - e.r0 || 0);
  18937. return {
  18938. cornerRadius: z(i, (function (t) {
  18939. return Ir(t, r)
  18940. }))
  18941. }
  18942. }
  18943. var ZS = Math.max,
  18944. jS = Math.min;
  18945. var qS = function (t) {
  18946. function e() {
  18947. var n = t.call(this) || this;
  18948. return n.type = e.type, n._isFirstFrame = !0, n
  18949. }
  18950. return n(e, t), e.prototype.render = function (t, e, n, i) {
  18951. this._model = t, this._removeOnRenderedListener(n), this._updateDrawMode(t);
  18952. var r = t.get("coordinateSystem");
  18953. ("cartesian2d" === r || "polar" === r) && (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(t, e, n) : this._renderNormal(t, e, n, i))
  18954. }, e.prototype.incrementalPrepareRender = function (t) {
  18955. this._clear(), this._updateDrawMode(t), this._updateLargeClip(t)
  18956. }, e.prototype.incrementalRender = function (t, e) {
  18957. this._progressiveEls = [], this._incrementalRenderLarge(t, e)
  18958. }, e.prototype.eachRendered = function (t) {
  18959. qh(this._progressiveEls || this.group, t)
  18960. }, e.prototype._updateDrawMode = function (t) {
  18961. var e = t.pipelineContext.large;
  18962. null != this._isLargeDraw && e === this._isLargeDraw || (this._isLargeDraw = e, this._clear())
  18963. }, e.prototype._renderNormal = function (t, e, n, i) {
  18964. var r, o = this.group,
  18965. a = t.getData(),
  18966. s = this._data,
  18967. l = t.coordinateSystem,
  18968. u = l.getBaseAxis();
  18969. "cartesian2d" === l.type ? r = u.isHorizontal() : "polar" === l.type && (r = "angle" === u.dim);
  18970. var h = t.isAnimationEnabled() ? t : null,
  18971. c = function (t, e) {
  18972. var n = t.get("realtimeSort", !0),
  18973. i = e.getBaseAxis();
  18974. 0;
  18975. if (n && "category" === i.type && "cartesian2d" === e.type) return {
  18976. baseAxis: i,
  18977. otherAxis: e.getOtherAxis(i)
  18978. }
  18979. }(t, l);
  18980. c && this._enableRealtimeSort(c, a, n);
  18981. var p = t.get("clip", !0) || c,
  18982. d = function (t, e) {
  18983. var n = t.getArea && t.getArea();
  18984. if (MS(t, "cartesian2d")) {
  18985. var i = t.getBaseAxis();
  18986. if ("category" !== i.type || !i.onBand) {
  18987. var r = e.getLayout("bandWidth");
  18988. i.isHorizontal() ? (n.x -= r, n.width += 2 * r) : (n.y -= r, n.height += 2 * r)
  18989. }
  18990. }
  18991. return n
  18992. }(l, a);
  18993. o.removeClipPath();
  18994. var f = t.get("roundCap", !0),
  18995. g = t.get("showBackground", !0),
  18996. y = t.getModel("backgroundStyle"),
  18997. v = y.get("borderRadius") || 0,
  18998. m = [],
  18999. x = this._backgroundEls,
  19000. _ = i && i.isInitSort,
  19001. b = i && "changeAxisOrder" === i.type;
  19002. function w(t) {
  19003. var e = iM[l.type](a, t),
  19004. n = function (t, e, n) {
  19005. var i = "polar" === t.type ? zu : zs;
  19006. return new i({
  19007. shape: hM(e, n, t),
  19008. silent: !0,
  19009. z2: 0
  19010. })
  19011. }(l, r, e);
  19012. return n.useStyle(y.getItemStyle()), "cartesian2d" === l.type ? n.setShape("r", v) : n.setShape("cornerRadius", v), m[t] = n, n
  19013. }
  19014. a.diff(s).add((function (e) {
  19015. var n = a.getItemModel(e),
  19016. i = iM[l.type](a, e, n);
  19017. if (g && w(e), a.hasValue(e) && nM[l.type](i)) {
  19018. var s = !1;
  19019. p && (s = KS[l.type](d, i));
  19020. var y = $S[l.type](t, a, e, i, r, h, u.model, !1, f);
  19021. c && (y.forceLabelAnimation = !0), oM(y, a, e, n, i, t, r, "polar" === l.type), _ ? y.attr({
  19022. shape: i
  19023. }) : c ? JS(c, h, y, i, e, r, !1, !1) : gh(y, {
  19024. shape: i
  19025. }, t, e), a.setItemGraphicEl(e, y), o.add(y), y.ignore = s
  19026. }
  19027. })).update((function (e, n) {
  19028. var i = a.getItemModel(e),
  19029. S = iM[l.type](a, e, i);
  19030. if (g) {
  19031. var M = void 0;
  19032. 0 === x.length ? M = w(n) : ((M = x[n]).useStyle(y.getItemStyle()), "cartesian2d" === l.type ? M.setShape("r", v) : M.setShape("cornerRadius", v), m[e] = M);
  19033. var I = iM[l.type](a, e);
  19034. fh(M, {
  19035. shape: hM(r, I, l)
  19036. }, h, e)
  19037. }
  19038. var T = s.getItemGraphicEl(n);
  19039. if (a.hasValue(e) && nM[l.type](S)) {
  19040. var C = !1;
  19041. if (p && (C = KS[l.type](d, S)) && o.remove(T), T ? _h(T) : T = $S[l.type](t, a, e, S, r, h, u.model, !!T, f), c && (T.forceLabelAnimation = !0), b) {
  19042. var D = T.getTextContent();
  19043. if (D) {
  19044. var A = uc(D);
  19045. null != A.prevValue && (A.prevValue = A.value)
  19046. }
  19047. } else oM(T, a, e, i, S, t, r, "polar" === l.type);
  19048. _ ? T.attr({
  19049. shape: S
  19050. }) : c ? JS(c, h, T, S, e, r, !0, b) : fh(T, {
  19051. shape: S
  19052. }, t, e, null), a.setItemGraphicEl(e, T), T.ignore = C, o.add(T)
  19053. } else o.remove(T)
  19054. })).remove((function (e) {
  19055. var n = s.getItemGraphicEl(e);
  19056. n && xh(n, t, e)
  19057. })).execute();
  19058. var S = this._backgroundGroup || (this._backgroundGroup = new zr);
  19059. S.removeAll();
  19060. for (var M = 0; M < m.length; ++M) S.add(m[M]);
  19061. o.add(S), this._backgroundEls = m, this._data = a
  19062. }, e.prototype._renderLarge = function (t, e, n) {
  19063. this._clear(), lM(t, this.group), this._updateLargeClip(t)
  19064. }, e.prototype._incrementalRenderLarge = function (t, e) {
  19065. this._removeBackground(), lM(e, this.group, this._progressiveEls, !0)
  19066. }, e.prototype._updateLargeClip = function (t) {
  19067. var e = t.get("clip", !0) && SS(t.coordinateSystem, !1, t),
  19068. n = this.group;
  19069. e ? n.setClipPath(e) : n.removeClipPath()
  19070. }, e.prototype._enableRealtimeSort = function (t, e, n) {
  19071. var i = this;
  19072. if (e.count()) {
  19073. var r = t.baseAxis;
  19074. if (this._isFirstFrame) this._dispatchInitSort(e, t, n), this._isFirstFrame = !1;
  19075. else {
  19076. var o = function (t) {
  19077. var n = e.getItemGraphicEl(t),
  19078. i = n && n.shape;
  19079. return i && Math.abs(r.isHorizontal() ? i.height : i.width) || 0
  19080. };
  19081. this._onRendered = function () {
  19082. i._updateSortWithinSameData(e, o, r, n)
  19083. }, n.getZr().on("rendered", this._onRendered)
  19084. }
  19085. }
  19086. }, e.prototype._dataSort = function (t, e, n) {
  19087. var i = [];
  19088. return t.each(t.mapDimension(e.dim), (function (t, e) {
  19089. var r = n(e);
  19090. r = null == r ? NaN : r, i.push({
  19091. dataIndex: e,
  19092. mappedValue: r,
  19093. ordinalNumber: t
  19094. })
  19095. })), i.sort((function (t, e) {
  19096. return e.mappedValue - t.mappedValue
  19097. })), {
  19098. ordinalNumbers: z(i, (function (t) {
  19099. return t.ordinalNumber
  19100. }))
  19101. }
  19102. }, e.prototype._isOrderChangedWithinSameData = function (t, e, n) {
  19103. for (var i = n.scale, r = t.mapDimension(n.dim), o = Number.MAX_VALUE, a = 0, s = i.getOrdinalMeta().categories.length; a < s; ++a) {
  19104. var l = t.rawIndexOf(r, i.getRawOrdinalNumber(a)),
  19105. u = l < 0 ? Number.MIN_VALUE : e(t.indexOfRawIndex(l));
  19106. if (u > o) return !0;
  19107. o = u
  19108. }
  19109. return !1
  19110. }, e.prototype._isOrderDifferentInView = function (t, e) {
  19111. for (var n = e.scale, i = n.getExtent(), r = Math.max(0, i[0]), o = Math.min(i[1], n.getOrdinalMeta().categories.length - 1); r <= o; ++r)
  19112. if (t.ordinalNumbers[r] !== n.getRawOrdinalNumber(r)) return !0
  19113. }, e.prototype._updateSortWithinSameData = function (t, e, n, i) {
  19114. if (this._isOrderChangedWithinSameData(t, e, n)) {
  19115. var r = this._dataSort(t, n, e);
  19116. this._isOrderDifferentInView(r, n) && (this._removeOnRenderedListener(i), i.dispatchAction({
  19117. type: "changeAxisOrder",
  19118. componentType: n.dim + "Axis",
  19119. axisId: n.index,
  19120. sortInfo: r
  19121. }))
  19122. }
  19123. }, e.prototype._dispatchInitSort = function (t, e, n) {
  19124. var i = e.baseAxis,
  19125. r = this._dataSort(t, i, (function (n) {
  19126. return t.get(t.mapDimension(e.otherAxis.dim), n)
  19127. }));
  19128. n.dispatchAction({
  19129. type: "changeAxisOrder",
  19130. componentType: i.dim + "Axis",
  19131. isInitSort: !0,
  19132. axisId: i.index,
  19133. sortInfo: r
  19134. })
  19135. }, e.prototype.remove = function (t, e) {
  19136. this._clear(this._model), this._removeOnRenderedListener(e)
  19137. }, e.prototype.dispose = function (t, e) {
  19138. this._removeOnRenderedListener(e)
  19139. }, e.prototype._removeOnRenderedListener = function (t) {
  19140. this._onRendered && (t.getZr().off("rendered", this._onRendered), this._onRendered = null)
  19141. }, e.prototype._clear = function (t) {
  19142. var e = this.group,
  19143. n = this._data;
  19144. t && t.isAnimationEnabled() && n && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], n.eachItemGraphicEl((function (e) {
  19145. xh(e, t, Qs(e).dataIndex)
  19146. }))) : e.removeAll(), this._data = null, this._isFirstFrame = !0
  19147. }, e.prototype._removeBackground = function () {
  19148. this.group.remove(this._backgroundGroup), this._backgroundGroup = null
  19149. }, e.type = "bar", e
  19150. }(kg),
  19151. KS = {
  19152. cartesian2d: function (t, e) {
  19153. var n = e.width < 0 ? -1 : 1,
  19154. i = e.height < 0 ? -1 : 1;
  19155. n < 0 && (e.x += e.width, e.width = -e.width), i < 0 && (e.y += e.height, e.height = -e.height);
  19156. var r = t.x + t.width,
  19157. o = t.y + t.height,
  19158. a = ZS(e.x, t.x),
  19159. s = jS(e.x + e.width, r),
  19160. l = ZS(e.y, t.y),
  19161. u = jS(e.y + e.height, o),
  19162. h = s < a,
  19163. c = u < l;
  19164. return e.x = h && a > r ? s : a, e.y = c && l > o ? u : l, e.width = h ? 0 : s - a, e.height = c ? 0 : u - l, n < 0 && (e.x += e.width, e.width = -e.width), i < 0 && (e.y += e.height, e.height = -e.height), h || c
  19165. },
  19166. polar: function (t, e) {
  19167. var n = e.r0 <= e.r ? 1 : -1;
  19168. if (n < 0) {
  19169. var i = e.r;
  19170. e.r = e.r0, e.r0 = i
  19171. }
  19172. var r = jS(e.r, t.r),
  19173. o = ZS(e.r0, t.r0);
  19174. e.r = r, e.r0 = o;
  19175. var a = r - o < 0;
  19176. if (n < 0) {
  19177. i = e.r;
  19178. e.r = e.r0, e.r0 = i
  19179. }
  19180. return a
  19181. }
  19182. },
  19183. $S = {
  19184. cartesian2d: function (t, e, n, i, r, o, a, s, l) {
  19185. var u = new zs({
  19186. shape: A({}, i),
  19187. z2: 1
  19188. });
  19189. (u.__dataIndex = n, u.name = "item", o) && (u.shape[r ? "height" : "width"] = 0);
  19190. return u
  19191. },
  19192. polar: function (t, e, n, i, r, o, a, s, l) {
  19193. var u = !r && l ? HS : zu,
  19194. h = new u({
  19195. shape: i,
  19196. z2: 1
  19197. });
  19198. h.name = "item";
  19199. var c, p, d = rM(r);
  19200. if (h.calculateTextPosition = (c = d, p = ({
  19201. isRoundCap: u === HS
  19202. } || {}).isRoundCap, function (t, e, n) {
  19203. var i = e.position;
  19204. if (!i || i instanceof Array) return Tr(t, e, n);
  19205. var r = c(i),
  19206. o = null != e.distance ? e.distance : 5,
  19207. a = this.shape,
  19208. s = a.cx,
  19209. l = a.cy,
  19210. u = a.r,
  19211. h = a.r0,
  19212. d = (u + h) / 2,
  19213. f = a.startAngle,
  19214. g = a.endAngle,
  19215. y = (f + g) / 2,
  19216. v = p ? Math.abs(u - h) / 2 : 0,
  19217. m = Math.cos,
  19218. x = Math.sin,
  19219. _ = s + u * m(f),
  19220. b = l + u * x(f),
  19221. w = "left",
  19222. S = "top";
  19223. switch (r) {
  19224. case "startArc":
  19225. _ = s + (h - o) * m(y), b = l + (h - o) * x(y), w = "center", S = "top";
  19226. break;
  19227. case "insideStartArc":
  19228. _ = s + (h + o) * m(y), b = l + (h + o) * x(y), w = "center", S = "bottom";
  19229. break;
  19230. case "startAngle":
  19231. _ = s + d * m(f) + YS(f, o + v, !1), b = l + d * x(f) + XS(f, o + v, !1), w = "right", S = "middle";
  19232. break;
  19233. case "insideStartAngle":
  19234. _ = s + d * m(f) + YS(f, -o + v, !1), b = l + d * x(f) + XS(f, -o + v, !1), w = "left", S = "middle";
  19235. break;
  19236. case "middle":
  19237. _ = s + d * m(y), b = l + d * x(y), w = "center", S = "middle";
  19238. break;
  19239. case "endArc":
  19240. _ = s + (u + o) * m(y), b = l + (u + o) * x(y), w = "center", S = "bottom";
  19241. break;
  19242. case "insideEndArc":
  19243. _ = s + (u - o) * m(y), b = l + (u - o) * x(y), w = "center", S = "top";
  19244. break;
  19245. case "endAngle":
  19246. _ = s + d * m(g) + YS(g, o + v, !0), b = l + d * x(g) + XS(g, o + v, !0), w = "left", S = "middle";
  19247. break;
  19248. case "insideEndAngle":
  19249. _ = s + d * m(g) + YS(g, -o + v, !0), b = l + d * x(g) + XS(g, -o + v, !0), w = "right", S = "middle";
  19250. break;
  19251. default:
  19252. return Tr(t, e, n)
  19253. }
  19254. return (t = t || {}).x = _, t.y = b, t.align = w, t.verticalAlign = S, t
  19255. }), o) {
  19256. var f = r ? "r" : "endAngle",
  19257. g = {};
  19258. h.shape[f] = r ? i.r0 : i.startAngle, g[f] = i[f], (s ? fh : gh)(h, {
  19259. shape: g
  19260. }, o)
  19261. }
  19262. return h
  19263. }
  19264. };
  19265. function JS(t, e, n, i, r, o, a, s) {
  19266. var l, u;
  19267. o ? (u = {
  19268. x: i.x,
  19269. width: i.width
  19270. }, l = {
  19271. y: i.y,
  19272. height: i.height
  19273. }) : (u = {
  19274. y: i.y,
  19275. height: i.height
  19276. }, l = {
  19277. x: i.x,
  19278. width: i.width
  19279. }), s || (a ? fh : gh)(n, {
  19280. shape: l
  19281. }, e, r, null), (a ? fh : gh)(n, {
  19282. shape: u
  19283. }, e ? t.baseAxis.model : null, r)
  19284. }
  19285. function QS(t, e) {
  19286. for (var n = 0; n < e.length; n++)
  19287. if (!isFinite(t[e[n]])) return !0;
  19288. return !1
  19289. }
  19290. var tM = ["x", "y", "width", "height"],
  19291. eM = ["cx", "cy", "r", "startAngle", "endAngle"],
  19292. nM = {
  19293. cartesian2d: function (t) {
  19294. return !QS(t, tM)
  19295. },
  19296. polar: function (t) {
  19297. return !QS(t, eM)
  19298. }
  19299. },
  19300. iM = {
  19301. cartesian2d: function (t, e, n) {
  19302. var i = t.getItemLayout(e),
  19303. r = n ? function (t, e) {
  19304. var n = t.get(["itemStyle", "borderColor"]);
  19305. if (!n || "none" === n) return 0;
  19306. var i = t.get(["itemStyle", "borderWidth"]) || 0,
  19307. r = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width),
  19308. o = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
  19309. return Math.min(i, r, o)
  19310. }(n, i) : 0,
  19311. o = i.width > 0 ? 1 : -1,
  19312. a = i.height > 0 ? 1 : -1;
  19313. return {
  19314. x: i.x + o * r / 2,
  19315. y: i.y + a * r / 2,
  19316. width: i.width - o * r,
  19317. height: i.height - a * r
  19318. }
  19319. },
  19320. polar: function (t, e, n) {
  19321. var i = t.getItemLayout(e);
  19322. return {
  19323. cx: i.cx,
  19324. cy: i.cy,
  19325. r0: i.r0,
  19326. r: i.r,
  19327. startAngle: i.startAngle,
  19328. endAngle: i.endAngle,
  19329. clockwise: i.clockwise
  19330. }
  19331. }
  19332. };
  19333. function rM(t) {
  19334. return function (t) {
  19335. var e = t ? "Arc" : "Angle";
  19336. return function (t) {
  19337. switch (t) {
  19338. case "start":
  19339. case "insideStart":
  19340. case "end":
  19341. case "insideEnd":
  19342. return t + e;
  19343. default:
  19344. return t
  19345. }
  19346. }
  19347. }(t)
  19348. }
  19349. function oM(t, e, n, i, r, o, a, s) {
  19350. var l = e.getItemVisual(n, "style");
  19351. if (s) {
  19352. if (!o.get("roundCap")) {
  19353. var u = t.shape;
  19354. A(u, US(i.getModel("itemStyle"), u, !0)), t.setShape(u)
  19355. }
  19356. } else {
  19357. var h = i.get(["itemStyle", "borderRadius"]) || 0;
  19358. t.setShape("r", h)
  19359. }
  19360. t.useStyle(l);
  19361. var c = i.getShallow("cursor");
  19362. c && t.attr("cursor", c);
  19363. var p = s ? a ? r.r >= r.r0 ? "endArc" : "startArc" : r.endAngle >= r.startAngle ? "endAngle" : "startAngle" : a ? r.height >= 0 ? "bottom" : "top" : r.width >= 0 ? "right" : "left",
  19364. d = ec(i);
  19365. tc(t, d, {
  19366. labelFetcher: o,
  19367. labelDataIndex: n,
  19368. defaultText: iS(o.getData(), n),
  19369. inheritColor: l.fill,
  19370. defaultOpacity: l.opacity,
  19371. defaultOutsidePosition: p
  19372. });
  19373. var f = t.getTextContent();
  19374. if (s && f) {
  19375. var g = i.get(["label", "position"]);
  19376. t.textConfig.inside = "middle" === g || null,
  19377. function (t, e, n, i) {
  19378. if (j(i)) t.setTextConfig({
  19379. rotation: i
  19380. });
  19381. else if (Y(e)) t.setTextConfig({
  19382. rotation: 0
  19383. });
  19384. else {
  19385. var r, o = t.shape,
  19386. a = o.clockwise ? o.startAngle : o.endAngle,
  19387. s = o.clockwise ? o.endAngle : o.startAngle,
  19388. l = (a + s) / 2,
  19389. u = n(e);
  19390. switch (u) {
  19391. case "startArc":
  19392. case "insideStartArc":
  19393. case "middle":
  19394. case "insideEndArc":
  19395. case "endArc":
  19396. r = l;
  19397. break;
  19398. case "startAngle":
  19399. case "insideStartAngle":
  19400. r = a;
  19401. break;
  19402. case "endAngle":
  19403. case "insideEndAngle":
  19404. r = s;
  19405. break;
  19406. default:
  19407. return void t.setTextConfig({
  19408. rotation: 0
  19409. })
  19410. }
  19411. var h = 1.5 * Math.PI - r;
  19412. "middle" === u && h > Math.PI / 2 && h < 1.5 * Math.PI && (h -= Math.PI), t.setTextConfig({
  19413. rotation: h
  19414. })
  19415. }
  19416. }(t, "outside" === g ? p : g, rM(a), i.get(["label", "rotate"]))
  19417. }
  19418. hc(f, d, o.getRawValue(n), (function (t) {
  19419. return rS(e, t)
  19420. }));
  19421. var y = i.getModel(["emphasis"]);
  19422. Yl(t, y.get("focus"), y.get("blurScope"), y.get("disabled")), jl(t, i),
  19423. function (t) {
  19424. return null != t.startAngle && null != t.endAngle && t.startAngle === t.endAngle
  19425. }(r) && (t.style.fill = "none", t.style.stroke = "none", E(t.states, (function (t) {
  19426. t.style && (t.style.fill = t.style.stroke = "none")
  19427. })))
  19428. }
  19429. var aM = function () {},
  19430. sM = function (t) {
  19431. function e(e) {
  19432. var n = t.call(this, e) || this;
  19433. return n.type = "largeBar", n
  19434. }
  19435. return n(e, t), e.prototype.getDefaultShape = function () {
  19436. return new aM
  19437. }, e.prototype.buildPath = function (t, e) {
  19438. for (var n = e.points, i = this.baseDimIdx, r = 1 - this.baseDimIdx, o = [], a = [], s = this.barWidth, l = 0; l < n.length; l += 3) a[i] = s, a[r] = n[l + 2], o[i] = n[l + i], o[r] = n[l + r], t.rect(o[0], o[1], a[0], a[1])
  19439. }, e
  19440. }(Is);
  19441. function lM(t, e, n, i) {
  19442. var r = t.getData(),
  19443. o = r.getLayout("valueAxisHorizontal") ? 1 : 0,
  19444. a = r.getLayout("largeDataIndices"),
  19445. s = r.getLayout("size"),
  19446. l = t.getModel("backgroundStyle"),
  19447. u = r.getLayout("largeBackgroundPoints");
  19448. if (u) {
  19449. var h = new sM({
  19450. shape: {
  19451. points: u
  19452. },
  19453. incremental: !!i,
  19454. silent: !0,
  19455. z2: 0
  19456. });
  19457. h.baseDimIdx = o, h.largeDataIndices = a, h.barWidth = s, h.useStyle(l.getItemStyle()), e.add(h), n && n.push(h)
  19458. }
  19459. var c = new sM({
  19460. shape: {
  19461. points: r.getLayout("largePoints")
  19462. },
  19463. incremental: !!i,
  19464. ignoreCoarsePointer: !0,
  19465. z2: 1
  19466. });
  19467. c.baseDimIdx = o, c.largeDataIndices = a, c.barWidth = s, e.add(c), c.useStyle(r.getVisual("style")), Qs(c).seriesIndex = t.seriesIndex, t.get("silent") || (c.on("mousedown", uM), c.on("mousemove", uM)), n && n.push(c)
  19468. }
  19469. var uM = Bg((function (t) {
  19470. var e = function (t, e, n) {
  19471. for (var i = t.baseDimIdx, r = 1 - i, o = t.shape.points, a = t.largeDataIndices, s = [], l = [], u = t.barWidth, h = 0, c = o.length / 3; h < c; h++) {
  19472. var p = 3 * h;
  19473. if (l[i] = u, l[r] = o[p + 2], s[i] = o[p + i], s[r] = o[p + r], l[r] < 0 && (s[r] += l[r], l[r] = -l[r]), e >= s[0] && e <= s[0] + l[0] && n >= s[1] && n <= s[1] + l[1]) return a[h]
  19474. }
  19475. return -1
  19476. }(this, t.offsetX, t.offsetY);
  19477. Qs(this).dataIndex = e >= 0 ? e : null
  19478. }), 30, !1);
  19479. function hM(t, e, n) {
  19480. if (MS(n, "cartesian2d")) {
  19481. var i = e,
  19482. r = n.getArea();
  19483. return {
  19484. x: t ? i.x : r.x,
  19485. y: t ? r.y : i.y,
  19486. width: t ? i.width : r.width,
  19487. height: t ? r.height : i.height
  19488. }
  19489. }
  19490. var o = e;
  19491. return {
  19492. cx: (r = n.getArea()).cx,
  19493. cy: r.cy,
  19494. r0: t ? r.r0 : o.r0,
  19495. r: t ? r.r : o.r,
  19496. startAngle: t ? o.startAngle : 0,
  19497. endAngle: t ? o.endAngle : 2 * Math.PI
  19498. }
  19499. }
  19500. var cM = 2 * Math.PI,
  19501. pM = Math.PI / 180;
  19502. function dM(t, e) {
  19503. return Cp(t.getBoxLayoutParams(), {
  19504. width: e.getWidth(),
  19505. height: e.getHeight()
  19506. })
  19507. }
  19508. function fM(t, e) {
  19509. var n = dM(t, e),
  19510. i = t.get("center"),
  19511. r = t.get("radius");
  19512. Y(r) || (r = [0, r]);
  19513. var o, a, s = Ur(n.width, e.getWidth()),
  19514. l = Ur(n.height, e.getHeight()),
  19515. u = Math.min(s, l),
  19516. h = Ur(r[0], u / 2),
  19517. c = Ur(r[1], u / 2),
  19518. p = t.coordinateSystem;
  19519. if (p) {
  19520. var d = p.dataToPoint(i);
  19521. o = d[0] || 0, a = d[1] || 0
  19522. } else Y(i) || (i = [i, i]), o = Ur(i[0], s) + n.x, a = Ur(i[1], l) + n.y;
  19523. return {
  19524. cx: o,
  19525. cy: a,
  19526. r0: h,
  19527. r: c
  19528. }
  19529. }
  19530. function gM(t, e, n) {
  19531. e.eachSeriesByType(t, (function (t) {
  19532. var e = t.getData(),
  19533. i = e.mapDimension("value"),
  19534. r = dM(t, n),
  19535. o = fM(t, n),
  19536. a = o.cx,
  19537. s = o.cy,
  19538. l = o.r,
  19539. u = o.r0,
  19540. h = -t.get("startAngle") * pM,
  19541. c = t.get("minAngle") * pM,
  19542. p = 0;
  19543. e.each(i, (function (t) {
  19544. !isNaN(t) && p++
  19545. }));
  19546. var d = e.getSum(i),
  19547. f = Math.PI / (d || p) * 2,
  19548. g = t.get("clockwise"),
  19549. y = t.get("roseType"),
  19550. v = t.get("stillShowZeroSum"),
  19551. m = e.getDataExtent(i);
  19552. m[0] = 0;
  19553. var x = cM,
  19554. _ = 0,
  19555. b = h,
  19556. w = g ? 1 : -1;
  19557. if (e.setLayout({
  19558. viewRect: r,
  19559. r: l
  19560. }), e.each(i, (function (t, n) {
  19561. var i;
  19562. if (isNaN(t)) e.setItemLayout(n, {
  19563. angle: NaN,
  19564. startAngle: NaN,
  19565. endAngle: NaN,
  19566. clockwise: g,
  19567. cx: a,
  19568. cy: s,
  19569. r0: u,
  19570. r: y ? NaN : l
  19571. });
  19572. else {
  19573. (i = "area" !== y ? 0 === d && v ? f : t * f : cM / p) < c ? (i = c, x -= c) : _ += t;
  19574. var r = b + w * i;
  19575. e.setItemLayout(n, {
  19576. angle: i,
  19577. startAngle: b,
  19578. endAngle: r,
  19579. clockwise: g,
  19580. cx: a,
  19581. cy: s,
  19582. r0: u,
  19583. r: y ? Xr(t, m, [u, l]) : l
  19584. }), b = r
  19585. }
  19586. })), x < cM && p)
  19587. if (x <= .001) {
  19588. var S = cM / p;
  19589. e.each(i, (function (t, n) {
  19590. if (!isNaN(t)) {
  19591. var i = e.getItemLayout(n);
  19592. i.angle = S, i.startAngle = h + w * n * S, i.endAngle = h + w * (n + 1) * S
  19593. }
  19594. }))
  19595. } else f = x / _, b = h, e.each(i, (function (t, n) {
  19596. if (!isNaN(t)) {
  19597. var i = e.getItemLayout(n),
  19598. r = i.angle === c ? c : t * f;
  19599. i.startAngle = b, i.endAngle = b + w * r, b += w * r
  19600. }
  19601. }))
  19602. }))
  19603. }
  19604. function yM(t) {
  19605. return {
  19606. seriesType: t,
  19607. reset: function (t, e) {
  19608. var n = e.findComponents({
  19609. mainType: "legend"
  19610. });
  19611. if (n && n.length) {
  19612. var i = t.getData();
  19613. i.filterSelf((function (t) {
  19614. for (var e = i.getName(t), r = 0; r < n.length; r++)
  19615. if (!n[r].isSelected(e)) return !1;
  19616. return !0
  19617. }))
  19618. }
  19619. }
  19620. }
  19621. }
  19622. var vM = Math.PI / 180;
  19623. function mM(t, e, n, i, r, o, a, s, l, u) {
  19624. if (!(t.length < 2)) {
  19625. for (var h = t.length, c = 0; c < h; c++)
  19626. if ("outer" === t[c].position && "labelLine" === t[c].labelAlignTo) {
  19627. var p = t[c].label.x - u;
  19628. t[c].linePoints[1][0] += p, t[c].label.x = u
  19629. } kb(t, l, l + a) && function (t) {
  19630. for (var o = {
  19631. list: [],
  19632. maxY: 0
  19633. }, a = {
  19634. list: [],
  19635. maxY: 0
  19636. }, s = 0; s < t.length; s++)
  19637. if ("none" === t[s].labelAlignTo) {
  19638. var l = t[s],
  19639. u = l.label.y > n ? a : o,
  19640. h = Math.abs(l.label.y - n);
  19641. if (h >= u.maxY) {
  19642. var c = l.label.x - e - l.len2 * r,
  19643. p = i + l.len,
  19644. f = Math.abs(c) < p ? Math.sqrt(h * h / (1 - c * c / p / p)) : p;
  19645. u.rB = f, u.maxY = h
  19646. }
  19647. u.list.push(l)
  19648. } d(o), d(a)
  19649. }(t)
  19650. }
  19651. function d(t) {
  19652. for (var o = t.rB, a = o * o, s = 0; s < t.list.length; s++) {
  19653. var l = t.list[s],
  19654. u = Math.abs(l.label.y - n),
  19655. h = i + l.len,
  19656. c = h * h,
  19657. p = Math.sqrt((1 - Math.abs(u * u / a)) * c),
  19658. d = e + (p + l.len2) * r,
  19659. f = d - l.label.x;
  19660. xM(l, l.targetTextWidth - f * r, !0), l.label.x = d
  19661. }
  19662. }
  19663. }
  19664. function xM(t, e, n) {
  19665. if (void 0 === n && (n = !1), null == t.labelStyleWidth) {
  19666. var i = t.label,
  19667. r = i.style,
  19668. o = t.rect,
  19669. a = r.backgroundColor,
  19670. s = r.padding,
  19671. l = s ? s[1] + s[3] : 0,
  19672. u = r.overflow,
  19673. h = o.width + (a ? 0 : l);
  19674. if (e < h || n) {
  19675. var c = o.height;
  19676. if (u && u.match("break")) {
  19677. i.setStyle("backgroundColor", null), i.setStyle("width", e - l);
  19678. var p = i.getBoundingRect();
  19679. i.setStyle("width", Math.ceil(p.width)), i.setStyle("backgroundColor", a)
  19680. } else {
  19681. var d = e - l,
  19682. f = e < h ? d : n ? d > t.unconstrainedWidth ? null : d : null;
  19683. i.setStyle("width", f)
  19684. }
  19685. var g = i.getBoundingRect();
  19686. o.width = g.width;
  19687. var y = (i.style.margin || 0) + 2.1;
  19688. o.height = g.height + y, o.y -= (o.height - c) / 2
  19689. }
  19690. }
  19691. }
  19692. function _M(t) {
  19693. return "center" === t.position
  19694. }
  19695. function bM(t) {
  19696. var e, n, i = t.getData(),
  19697. r = [],
  19698. o = !1,
  19699. a = (t.get("minShowLabelAngle") || 0) * vM,
  19700. s = i.getLayout("viewRect"),
  19701. l = i.getLayout("r"),
  19702. u = s.width,
  19703. h = s.x,
  19704. c = s.y,
  19705. p = s.height;
  19706. function d(t) {
  19707. t.ignore = !0
  19708. }
  19709. i.each((function (t) {
  19710. var s = i.getItemGraphicEl(t),
  19711. c = s.shape,
  19712. p = s.getTextContent(),
  19713. f = s.getTextGuideLine(),
  19714. g = i.getItemModel(t),
  19715. y = g.getModel("label"),
  19716. v = y.get("position") || g.get(["emphasis", "label", "position"]),
  19717. m = y.get("distanceToLabelLine"),
  19718. x = y.get("alignTo"),
  19719. _ = Ur(y.get("edgeDistance"), u),
  19720. b = y.get("bleedMargin"),
  19721. w = g.getModel("labelLine"),
  19722. S = w.get("length");
  19723. S = Ur(S, u);
  19724. var M = w.get("length2");
  19725. if (M = Ur(M, u), Math.abs(c.endAngle - c.startAngle) < a) return E(p.states, d), p.ignore = !0, void(f && (E(f.states, d), f.ignore = !0));
  19726. if (function (t) {
  19727. if (!t.ignore) return !0;
  19728. for (var e in t.states)
  19729. if (!1 === t.states[e].ignore) return !0;
  19730. return !1
  19731. }(p)) {
  19732. var I, T, C, D, A = (c.startAngle + c.endAngle) / 2,
  19733. k = Math.cos(A),
  19734. L = Math.sin(A);
  19735. e = c.cx, n = c.cy;
  19736. var P = "inside" === v || "inner" === v;
  19737. if ("center" === v) I = c.cx, T = c.cy, D = "center";
  19738. else {
  19739. var O = (P ? (c.r + c.r0) / 2 * k : c.r * k) + e,
  19740. R = (P ? (c.r + c.r0) / 2 * L : c.r * L) + n;
  19741. if (I = O + 3 * k, T = R + 3 * L, !P) {
  19742. var N = O + k * (S + l - c.r),
  19743. z = R + L * (S + l - c.r),
  19744. V = N + (k < 0 ? -1 : 1) * M;
  19745. I = "edge" === x ? k < 0 ? h + _ : h + u - _ : V + (k < 0 ? -m : m), T = z, C = [
  19746. [O, R],
  19747. [N, z],
  19748. [V, z]
  19749. ]
  19750. }
  19751. D = P ? "center" : "edge" === x ? k > 0 ? "right" : "left" : k > 0 ? "left" : "right"
  19752. }
  19753. var B = Math.PI,
  19754. F = 0,
  19755. G = y.get("rotate");
  19756. if (j(G)) F = G * (B / 180);
  19757. else if ("center" === v) F = 0;
  19758. else if ("radial" === G || !0 === G) {
  19759. F = k < 0 ? -A + B : -A
  19760. } else if ("tangential" === G && "outside" !== v && "outer" !== v) {
  19761. var W = Math.atan2(k, L);
  19762. W < 0 && (W = 2 * B + W), L > 0 && (W = B + W), F = W - B
  19763. }
  19764. if (o = !!F, p.x = I, p.y = T, p.rotation = F, p.setStyle({
  19765. verticalAlign: "middle"
  19766. }), P) {
  19767. p.setStyle({
  19768. align: D
  19769. });
  19770. var H = p.states.select;
  19771. H && (H.x += p.x, H.y += p.y)
  19772. } else {
  19773. var Y = p.getBoundingRect().clone();
  19774. Y.applyTransform(p.getComputedTransform());
  19775. var X = (p.style.margin || 0) + 2.1;
  19776. Y.y -= X / 2, Y.height += X, r.push({
  19777. label: p,
  19778. labelLine: f,
  19779. position: v,
  19780. len: S,
  19781. len2: M,
  19782. minTurnAngle: w.get("minTurnAngle"),
  19783. maxSurfaceAngle: w.get("maxSurfaceAngle"),
  19784. surfaceNormal: new De(k, L),
  19785. linePoints: C,
  19786. textAlign: D,
  19787. labelDistance: m,
  19788. labelAlignTo: x,
  19789. edgeDistance: _,
  19790. bleedMargin: b,
  19791. rect: Y,
  19792. unconstrainedWidth: Y.width,
  19793. labelStyleWidth: p.style.width
  19794. })
  19795. }
  19796. s.setTextConfig({
  19797. inside: P
  19798. })
  19799. }
  19800. })), !o && t.get("avoidLabelOverlap") && function (t, e, n, i, r, o, a, s) {
  19801. for (var l = [], u = [], h = Number.MAX_VALUE, c = -Number.MAX_VALUE, p = 0; p < t.length; p++) {
  19802. var d = t[p].label;
  19803. _M(t[p]) || (d.x < e ? (h = Math.min(h, d.x), l.push(t[p])) : (c = Math.max(c, d.x), u.push(t[p])))
  19804. }
  19805. for (p = 0; p < t.length; p++)
  19806. if (!_M(y = t[p]) && y.linePoints) {
  19807. if (null != y.labelStyleWidth) continue;
  19808. d = y.label;
  19809. var f = y.linePoints,
  19810. g = void 0;
  19811. g = "edge" === y.labelAlignTo ? d.x < e ? f[2][0] - y.labelDistance - a - y.edgeDistance : a + r - y.edgeDistance - f[2][0] - y.labelDistance : "labelLine" === y.labelAlignTo ? d.x < e ? h - a - y.bleedMargin : a + r - c - y.bleedMargin : d.x < e ? d.x - a - y.bleedMargin : a + r - d.x - y.bleedMargin, y.targetTextWidth = g, xM(y, g)
  19812. } for (mM(u, e, n, i, 1, 0, o, 0, s, c), mM(l, e, n, i, -1, 0, o, 0, s, h), p = 0; p < t.length; p++) {
  19813. var y;
  19814. if (!_M(y = t[p]) && y.linePoints) {
  19815. d = y.label, f = y.linePoints;
  19816. var v = "edge" === y.labelAlignTo,
  19817. m = d.style.padding,
  19818. x = m ? m[1] + m[3] : 0,
  19819. _ = d.style.backgroundColor ? 0 : x,
  19820. b = y.rect.width + _,
  19821. w = f[1][0] - f[2][0];
  19822. v ? d.x < e ? f[2][0] = a + y.edgeDistance + b + y.labelDistance : f[2][0] = a + r - y.edgeDistance - b - y.labelDistance : (d.x < e ? f[2][0] = d.x + y.labelDistance : f[2][0] = d.x - y.labelDistance, f[1][0] = f[2][0] + w), f[1][1] = f[2][1] = d.y
  19823. }
  19824. }
  19825. }(r, e, n, l, u, p, h, c);
  19826. for (var f = 0; f < r.length; f++) {
  19827. var g = r[f],
  19828. y = g.label,
  19829. v = g.labelLine,
  19830. m = isNaN(y.x) || isNaN(y.y);
  19831. if (y) {
  19832. y.setStyle({
  19833. align: g.textAlign
  19834. }), m && (E(y.states, d), y.ignore = !0);
  19835. var x = y.states.select;
  19836. x && (x.x += y.x, x.y += y.y)
  19837. }
  19838. if (v) {
  19839. var _ = g.linePoints;
  19840. m || !_ ? (E(v.states, d), v.ignore = !0) : (wb(_, g.minTurnAngle), Sb(_, g.surfaceNormal, g.maxSurfaceAngle), v.setShape({
  19841. points: _
  19842. }), y.__hostTarget.textGuideLineConfig = {
  19843. anchor: new De(_[0][0], _[0][1])
  19844. })
  19845. }
  19846. }
  19847. }
  19848. var wM = function (t) {
  19849. function e(e, n, i) {
  19850. var r = t.call(this) || this;
  19851. r.z2 = 2;
  19852. var o = new Fs;
  19853. return r.setTextContent(o), r.updateData(e, n, i, !0), r
  19854. }
  19855. return n(e, t), e.prototype.updateData = function (t, e, n, i) {
  19856. var r = this,
  19857. o = t.hostModel,
  19858. a = t.getItemModel(e),
  19859. s = a.getModel("emphasis"),
  19860. l = t.getItemLayout(e),
  19861. u = A(US(a.getModel("itemStyle"), l, !0), l);
  19862. if (isNaN(u.startAngle)) r.setShape(u);
  19863. else {
  19864. if (i) {
  19865. r.setShape(u);
  19866. var h = o.getShallow("animationType");
  19867. o.ecModel.ssr ? (gh(r, {
  19868. scaleX: 0,
  19869. scaleY: 0
  19870. }, o, {
  19871. dataIndex: e,
  19872. isFrom: !0
  19873. }), r.originX = u.cx, r.originY = u.cy) : "scale" === h ? (r.shape.r = l.r0, gh(r, {
  19874. shape: {
  19875. r: l.r
  19876. }
  19877. }, o, e)) : null != n ? (r.setShape({
  19878. startAngle: n,
  19879. endAngle: n
  19880. }), gh(r, {
  19881. shape: {
  19882. startAngle: l.startAngle,
  19883. endAngle: l.endAngle
  19884. }
  19885. }, o, e)) : (r.shape.endAngle = l.startAngle, fh(r, {
  19886. shape: {
  19887. endAngle: l.endAngle
  19888. }
  19889. }, o, e))
  19890. } else _h(r), fh(r, {
  19891. shape: u
  19892. }, o, e);
  19893. r.useStyle(t.getItemVisual(e, "style")), jl(r, a);
  19894. var c = (l.startAngle + l.endAngle) / 2,
  19895. p = o.get("selectedOffset"),
  19896. d = Math.cos(c) * p,
  19897. f = Math.sin(c) * p,
  19898. g = a.getShallow("cursor");
  19899. g && r.attr("cursor", g), this._updateLabel(o, t, e), r.ensureState("emphasis").shape = A({
  19900. r: l.r + (s.get("scale") && s.get("scaleSize") || 0)
  19901. }, US(s.getModel("itemStyle"), l)), A(r.ensureState("select"), {
  19902. x: d,
  19903. y: f,
  19904. shape: US(a.getModel(["select", "itemStyle"]), l)
  19905. }), A(r.ensureState("blur"), {
  19906. shape: US(a.getModel(["blur", "itemStyle"]), l)
  19907. });
  19908. var y = r.getTextGuideLine(),
  19909. v = r.getTextContent();
  19910. y && A(y.ensureState("select"), {
  19911. x: d,
  19912. y: f
  19913. }), A(v.ensureState("select"), {
  19914. x: d,
  19915. y: f
  19916. }), Yl(this, s.get("focus"), s.get("blurScope"), s.get("disabled"))
  19917. }
  19918. }, e.prototype._updateLabel = function (t, e, n) {
  19919. var i = this,
  19920. r = e.getItemModel(n),
  19921. o = r.getModel("labelLine"),
  19922. a = e.getItemVisual(n, "style"),
  19923. s = a && a.fill,
  19924. l = a && a.opacity;
  19925. tc(i, ec(r), {
  19926. labelFetcher: e.hostModel,
  19927. labelDataIndex: n,
  19928. inheritColor: s,
  19929. defaultOpacity: l,
  19930. defaultText: t.getFormattedLabel(n, "normal") || e.getName(n)
  19931. });
  19932. var u = i.getTextContent();
  19933. i.setTextConfig({
  19934. position: null,
  19935. rotation: null
  19936. }), u.attr({
  19937. z2: 10
  19938. });
  19939. var h = t.get(["label", "position"]);
  19940. if ("outside" !== h && "outer" !== h) i.removeTextGuideLine();
  19941. else {
  19942. var c = this.getTextGuideLine();
  19943. c || (c = new Yu, this.setTextGuideLine(c)), Tb(this, Cb(r), {
  19944. stroke: s,
  19945. opacity: ot(o.get(["lineStyle", "opacity"]), l, 1)
  19946. })
  19947. }
  19948. }, e
  19949. }(zu),
  19950. SM = function (t) {
  19951. function e() {
  19952. var e = null !== t && t.apply(this, arguments) || this;
  19953. return e.ignoreLabelLineUpdate = !0, e
  19954. }
  19955. return n(e, t), e.prototype.render = function (t, e, n, i) {
  19956. var r, o = t.getData(),
  19957. a = this._data,
  19958. s = this.group;
  19959. if (!a && o.count() > 0) {
  19960. for (var l = o.getItemLayout(0), u = 1; isNaN(l && l.startAngle) && u < o.count(); ++u) l = o.getItemLayout(u);
  19961. l && (r = l.startAngle)
  19962. }
  19963. if (this._emptyCircleSector && s.remove(this._emptyCircleSector), 0 === o.count() && t.get("showEmptyCircle")) {
  19964. var h = new zu({
  19965. shape: fM(t, n)
  19966. });
  19967. h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = h, s.add(h)
  19968. }
  19969. o.diff(a).add((function (t) {
  19970. var e = new wM(o, t, r);
  19971. o.setItemGraphicEl(t, e), s.add(e)
  19972. })).update((function (t, e) {
  19973. var n = a.getItemGraphicEl(e);
  19974. n.updateData(o, t, r), n.off("click"), s.add(n), o.setItemGraphicEl(t, n)
  19975. })).remove((function (e) {
  19976. xh(a.getItemGraphicEl(e), t, e)
  19977. })).execute(), bM(t), "expansion" !== t.get("animationTypeUpdate") && (this._data = o)
  19978. }, e.prototype.dispose = function () {}, e.prototype.containPoint = function (t, e) {
  19979. var n = e.getData().getItemLayout(0);
  19980. if (n) {
  19981. var i = t[0] - n.cx,
  19982. r = t[1] - n.cy,
  19983. o = Math.sqrt(i * i + r * r);
  19984. return o <= n.r && o >= n.r0
  19985. }
  19986. }, e.type = "pie", e
  19987. }(kg);
  19988. function MM(t, e, n) {
  19989. e = Y(e) && {
  19990. coordDimensions: e
  19991. } || A({
  19992. encodeDefine: t.getEncode()
  19993. }, e);
  19994. var i = t.getSource(),
  19995. r = ux(i, e).dimensions,
  19996. o = new lx(r, t);
  19997. return o.initData(i, n), o
  19998. }
  19999. var IM = function () {
  20000. function t(t, e) {
  20001. this._getDataWithEncodedVisual = t, this._getRawData = e
  20002. }
  20003. return t.prototype.getAllNames = function () {
  20004. var t = this._getRawData();
  20005. return t.mapArray(t.getName)
  20006. }, t.prototype.containName = function (t) {
  20007. return this._getRawData().indexOfName(t) >= 0
  20008. }, t.prototype.indexOfName = function (t) {
  20009. return this._getDataWithEncodedVisual().indexOfName(t)
  20010. }, t.prototype.getItemVisual = function (t, e) {
  20011. return this._getDataWithEncodedVisual().getItemVisual(t, e)
  20012. }, t
  20013. }(),
  20014. TM = Oo(),
  20015. CM = function (t) {
  20016. function e() {
  20017. return null !== t && t.apply(this, arguments) || this
  20018. }
  20019. return n(e, t), e.prototype.init = function (e) {
  20020. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new IM(W(this.getData, this), W(this.getRawData, this)), this._defaultLabelLine(e)
  20021. }, e.prototype.mergeOption = function () {
  20022. t.prototype.mergeOption.apply(this, arguments)
  20023. }, e.prototype.getInitialData = function () {
  20024. return MM(this, {
  20025. coordDimensions: ["value"],
  20026. encodeDefaulter: H(Jp, this)
  20027. })
  20028. }, e.prototype.getDataParams = function (e) {
  20029. var n = this.getData(),
  20030. i = TM(n),
  20031. r = i.seats;
  20032. if (!r) {
  20033. var o = [];
  20034. n.each(n.mapDimension("value"), (function (t) {
  20035. o.push(t)
  20036. })), r = i.seats = Jr(o, n.hostModel.get("percentPrecision"))
  20037. }
  20038. var a = t.prototype.getDataParams.call(this, e);
  20039. return a.percent = r[e] || 0, a.$vars.push("percent"), a
  20040. }, e.prototype._defaultLabelLine = function (t) {
  20041. wo(t, "labelLine", ["show"]);
  20042. var e = t.labelLine,
  20043. n = t.emphasis.labelLine;
  20044. e.show = e.show && t.label.show, n.show = n.show && t.emphasis.label.show
  20045. }, e.type = "series.pie", e.defaultOption = {
  20046. z: 2,
  20047. legendHoverLink: !0,
  20048. colorBy: "data",
  20049. center: ["50%", "50%"],
  20050. radius: [0, "75%"],
  20051. clockwise: !0,
  20052. startAngle: 90,
  20053. minAngle: 0,
  20054. minShowLabelAngle: 0,
  20055. selectedOffset: 10,
  20056. percentPrecision: 2,
  20057. stillShowZeroSum: !0,
  20058. left: 0,
  20059. top: 0,
  20060. right: 0,
  20061. bottom: 0,
  20062. width: null,
  20063. height: null,
  20064. label: {
  20065. rotate: 0,
  20066. show: !0,
  20067. overflow: "truncate",
  20068. position: "outer",
  20069. alignTo: "none",
  20070. edgeDistance: "25%",
  20071. bleedMargin: 10,
  20072. distanceToLabelLine: 5
  20073. },
  20074. labelLine: {
  20075. show: !0,
  20076. length: 15,
  20077. length2: 15,
  20078. smooth: !1,
  20079. minTurnAngle: 90,
  20080. maxSurfaceAngle: 90,
  20081. lineStyle: {
  20082. width: 1,
  20083. type: "solid"
  20084. }
  20085. },
  20086. itemStyle: {
  20087. borderWidth: 1,
  20088. borderJoin: "round"
  20089. },
  20090. showEmptyCircle: !0,
  20091. emptyCircleStyle: {
  20092. color: "lightgray",
  20093. opacity: 1
  20094. },
  20095. labelLayout: {
  20096. hideOverlap: !0
  20097. },
  20098. emphasis: {
  20099. scale: !0,
  20100. scaleSize: 5
  20101. },
  20102. avoidLabelOverlap: !0,
  20103. animationType: "expansion",
  20104. animationDuration: 1e3,
  20105. animationTypeUpdate: "transition",
  20106. animationEasingUpdate: "cubicInOut",
  20107. animationDurationUpdate: 500,
  20108. animationEasing: "cubicInOut"
  20109. }, e
  20110. }(mg);
  20111. var DM = function (t) {
  20112. function e() {
  20113. var n = null !== t && t.apply(this, arguments) || this;
  20114. return n.type = e.type, n.hasSymbolVisual = !0, n
  20115. }
  20116. return n(e, t), e.prototype.getInitialData = function (t, e) {
  20117. return vx(null, this, {
  20118. useEncodeDefaulter: !0
  20119. })
  20120. }, e.prototype.getProgressive = function () {
  20121. var t = this.option.progressive;
  20122. return null == t ? this.option.large ? 5e3 : this.get("progressive") : t
  20123. }, e.prototype.getProgressiveThreshold = function () {
  20124. var t = this.option.progressiveThreshold;
  20125. return null == t ? this.option.large ? 1e4 : this.get("progressiveThreshold") : t
  20126. }, e.prototype.brushSelector = function (t, e, n) {
  20127. return n.point(e.getItemLayout(t))
  20128. }, e.prototype.getZLevelKey = function () {
  20129. return this.getData().count() > this.getProgressiveThreshold() ? this.id : ""
  20130. }, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  20131. coordinateSystem: "cartesian2d",
  20132. z: 2,
  20133. legendHoverLink: !0,
  20134. symbolSize: 10,
  20135. large: !1,
  20136. largeThreshold: 2e3,
  20137. itemStyle: {
  20138. opacity: .8
  20139. },
  20140. emphasis: {
  20141. scale: !0
  20142. },
  20143. clip: !0,
  20144. select: {
  20145. itemStyle: {
  20146. borderColor: "#212121"
  20147. }
  20148. },
  20149. universalTransition: {
  20150. divideShape: "clone"
  20151. }
  20152. }, e
  20153. }(mg),
  20154. AM = function () {},
  20155. kM = function (t) {
  20156. function e(e) {
  20157. var n = t.call(this, e) || this;
  20158. return n._off = 0, n.hoverDataIdx = -1, n
  20159. }
  20160. return n(e, t), e.prototype.getDefaultShape = function () {
  20161. return new AM
  20162. }, e.prototype.reset = function () {
  20163. this.notClear = !1, this._off = 0
  20164. }, e.prototype.buildPath = function (t, e) {
  20165. var n, i = e.points,
  20166. r = e.size,
  20167. o = this.symbolProxy,
  20168. a = o.shape,
  20169. s = t.getContext ? t.getContext() : t,
  20170. l = s && r[0] < 4,
  20171. u = this.softClipShape;
  20172. if (l) this._ctx = s;
  20173. else {
  20174. for (this._ctx = null, n = this._off; n < i.length;) {
  20175. var h = i[n++],
  20176. c = i[n++];
  20177. isNaN(h) || isNaN(c) || (u && !u.contain(h, c) || (a.x = h - r[0] / 2, a.y = c - r[1] / 2, a.width = r[0], a.height = r[1], o.buildPath(t, a, !0)))
  20178. }
  20179. this.incremental && (this._off = n, this.notClear = !0)
  20180. }
  20181. }, e.prototype.afterBrush = function () {
  20182. var t, e = this.shape,
  20183. n = e.points,
  20184. i = e.size,
  20185. r = this._ctx,
  20186. o = this.softClipShape;
  20187. if (r) {
  20188. for (t = this._off; t < n.length;) {
  20189. var a = n[t++],
  20190. s = n[t++];
  20191. isNaN(a) || isNaN(s) || (o && !o.contain(a, s) || r.fillRect(a - i[0] / 2, s - i[1] / 2, i[0], i[1]))
  20192. }
  20193. this.incremental && (this._off = t, this.notClear = !0)
  20194. }
  20195. }, e.prototype.findDataIndex = function (t, e) {
  20196. for (var n = this.shape, i = n.points, r = n.size, o = Math.max(r[0], 4), a = Math.max(r[1], 4), s = i.length / 2 - 1; s >= 0; s--) {
  20197. var l = 2 * s,
  20198. u = i[l] - o / 2,
  20199. h = i[l + 1] - a / 2;
  20200. if (t >= u && e >= h && t <= u + o && e <= h + a) return s
  20201. }
  20202. return -1
  20203. }, e.prototype.contain = function (t, e) {
  20204. var n = this.transformCoordToLocal(t, e),
  20205. i = this.getBoundingRect();
  20206. return t = n[0], e = n[1], i.contain(t, e) ? (this.hoverDataIdx = this.findDataIndex(t, e)) >= 0 : (this.hoverDataIdx = -1, !1)
  20207. }, e.prototype.getBoundingRect = function () {
  20208. var t = this._rect;
  20209. if (!t) {
  20210. for (var e = this.shape, n = e.points, i = e.size, r = i[0], o = i[1], a = 1 / 0, s = 1 / 0, l = -1 / 0, u = -1 / 0, h = 0; h < n.length;) {
  20211. var c = n[h++],
  20212. p = n[h++];
  20213. a = Math.min(c, a), l = Math.max(c, l), s = Math.min(p, s), u = Math.max(p, u)
  20214. }
  20215. t = this._rect = new ze(a - r / 2, s - o / 2, l - a + r, u - s + o)
  20216. }
  20217. return t
  20218. }, e
  20219. }(Is),
  20220. LM = function () {
  20221. function t() {
  20222. this.group = new zr
  20223. }
  20224. return t.prototype.updateData = function (t, e) {
  20225. this._clear();
  20226. var n = this._create();
  20227. n.setShape({
  20228. points: t.getLayout("points")
  20229. }), this._setCommon(n, t, e)
  20230. }, t.prototype.updateLayout = function (t) {
  20231. var e = t.getLayout("points");
  20232. this.group.eachChild((function (t) {
  20233. if (null != t.startIndex) {
  20234. var n = 2 * (t.endIndex - t.startIndex),
  20235. i = 4 * t.startIndex * 2;
  20236. e = new Float32Array(e.buffer, i, n)
  20237. }
  20238. t.setShape("points", e), t.reset()
  20239. }))
  20240. }, t.prototype.incrementalPrepareUpdate = function (t) {
  20241. this._clear()
  20242. }, t.prototype.incrementalUpdate = function (t, e, n) {
  20243. var i = this._newAdded[0],
  20244. r = e.getLayout("points"),
  20245. o = i && i.shape.points;
  20246. if (o && o.length < 2e4) {
  20247. var a = o.length,
  20248. s = new Float32Array(a + r.length);
  20249. s.set(o), s.set(r, a), i.endIndex = t.end, i.setShape({
  20250. points: s
  20251. })
  20252. } else {
  20253. this._newAdded = [];
  20254. var l = this._create();
  20255. l.startIndex = t.start, l.endIndex = t.end, l.incremental = !0, l.setShape({
  20256. points: r
  20257. }), this._setCommon(l, e, n)
  20258. }
  20259. }, t.prototype.eachRendered = function (t) {
  20260. this._newAdded[0] && t(this._newAdded[0])
  20261. }, t.prototype._create = function () {
  20262. var t = new kM({
  20263. cursor: "default"
  20264. });
  20265. return t.ignoreCoarsePointer = !0, this.group.add(t), this._newAdded.push(t), t
  20266. }, t.prototype._setCommon = function (t, e, n) {
  20267. var i = e.hostModel;
  20268. n = n || {};
  20269. var r = e.getVisual("symbolSize");
  20270. t.setShape("size", r instanceof Array ? r : [r, r]), t.softClipShape = n.clipShape || null, t.symbolProxy = Wy(e.getVisual("symbol"), 0, 0, 0, 0), t.setColor = t.symbolProxy.setColor;
  20271. var o = t.shape.size[0] < 4;
  20272. t.useStyle(i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"]));
  20273. var a = e.getVisual("style"),
  20274. s = a && a.fill;
  20275. s && t.setColor(s);
  20276. var l = Qs(t);
  20277. l.seriesIndex = i.seriesIndex, t.on("mousemove", (function (e) {
  20278. l.dataIndex = null;
  20279. var n = t.hoverDataIdx;
  20280. n >= 0 && (l.dataIndex = n + (t.startIndex || 0))
  20281. }))
  20282. }, t.prototype.remove = function () {
  20283. this._clear()
  20284. }, t.prototype._clear = function () {
  20285. this._newAdded = [], this.group.removeAll()
  20286. }, t
  20287. }(),
  20288. PM = function (t) {
  20289. function e() {
  20290. var n = null !== t && t.apply(this, arguments) || this;
  20291. return n.type = e.type, n
  20292. }
  20293. return n(e, t), e.prototype.render = function (t, e, n) {
  20294. var i = t.getData();
  20295. this._updateSymbolDraw(i, t).updateData(i, {
  20296. clipShape: this._getClipShape(t)
  20297. }), this._finished = !0
  20298. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  20299. var i = t.getData();
  20300. this._updateSymbolDraw(i, t).incrementalPrepareUpdate(i), this._finished = !1
  20301. }, e.prototype.incrementalRender = function (t, e, n) {
  20302. this._symbolDraw.incrementalUpdate(t, e.getData(), {
  20303. clipShape: this._getClipShape(e)
  20304. }), this._finished = t.end === e.getData().count()
  20305. }, e.prototype.updateTransform = function (t, e, n) {
  20306. var i = t.getData();
  20307. if (this.group.dirty(), !this._finished || i.count() > 1e4) return {
  20308. update: !0
  20309. };
  20310. var r = ES("").reset(t, e, n);
  20311. r.progress && r.progress({
  20312. start: 0,
  20313. end: i.count(),
  20314. count: i.count()
  20315. }, i), this._symbolDraw.updateLayout(i)
  20316. }, e.prototype.eachRendered = function (t) {
  20317. this._symbolDraw && this._symbolDraw.eachRendered(t)
  20318. }, e.prototype._getClipShape = function (t) {
  20319. var e = t.coordinateSystem,
  20320. n = e && e.getArea && e.getArea();
  20321. return t.get("clip", !0) ? n : null
  20322. }, e.prototype._updateSymbolDraw = function (t, e) {
  20323. var n = this._symbolDraw,
  20324. i = e.pipelineContext.large;
  20325. return n && i === this._isLargeDraw || (n && n.remove(), n = this._symbolDraw = i ? new LM : new hS, this._isLargeDraw = i, this.group.removeAll()), this.group.add(n.group), n
  20326. }, e.prototype.remove = function (t, e) {
  20327. this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null
  20328. }, e.prototype.dispose = function () {}, e.type = "scatter", e
  20329. }(kg),
  20330. OM = function (t) {
  20331. function e() {
  20332. return null !== t && t.apply(this, arguments) || this
  20333. }
  20334. return n(e, t), e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = {
  20335. show: !1,
  20336. z: 0,
  20337. left: "10%",
  20338. top: 60,
  20339. right: "10%",
  20340. bottom: 70,
  20341. containLabel: !1,
  20342. backgroundColor: "rgba(0,0,0,0)",
  20343. borderWidth: 1,
  20344. borderColor: "#ccc"
  20345. }, e
  20346. }(Rp),
  20347. RM = function (t) {
  20348. function e() {
  20349. return null !== t && t.apply(this, arguments) || this
  20350. }
  20351. return n(e, t), e.prototype.getCoordSysModel = function () {
  20352. return this.getReferringComponents("grid", zo).models[0]
  20353. }, e.type = "cartesian2dAxis", e
  20354. }(Rp);
  20355. R(RM, I_);
  20356. var NM = {
  20357. show: !0,
  20358. z: 0,
  20359. inverse: !1,
  20360. name: "",
  20361. nameLocation: "end",
  20362. nameRotate: null,
  20363. nameTruncate: {
  20364. maxWidth: null,
  20365. ellipsis: "...",
  20366. placeholder: "."
  20367. },
  20368. nameTextStyle: {},
  20369. nameGap: 15,
  20370. silent: !1,
  20371. triggerEvent: !1,
  20372. tooltip: {
  20373. show: !1
  20374. },
  20375. axisPointer: {},
  20376. axisLine: {
  20377. show: !0,
  20378. onZero: !0,
  20379. onZeroAxisIndex: null,
  20380. lineStyle: {
  20381. color: "#6E7079",
  20382. width: 1,
  20383. type: "solid"
  20384. },
  20385. symbol: ["none", "none"],
  20386. symbolSize: [10, 15]
  20387. },
  20388. axisTick: {
  20389. show: !0,
  20390. inside: !1,
  20391. length: 5,
  20392. lineStyle: {
  20393. width: 1
  20394. }
  20395. },
  20396. axisLabel: {
  20397. show: !0,
  20398. inside: !1,
  20399. rotate: 0,
  20400. showMinLabel: null,
  20401. showMaxLabel: null,
  20402. margin: 8,
  20403. fontSize: 12
  20404. },
  20405. splitLine: {
  20406. show: !0,
  20407. lineStyle: {
  20408. color: ["#E0E6F1"],
  20409. width: 1,
  20410. type: "solid"
  20411. }
  20412. },
  20413. splitArea: {
  20414. show: !1,
  20415. areaStyle: {
  20416. color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
  20417. }
  20418. }
  20419. },
  20420. EM = C({
  20421. boundaryGap: !0,
  20422. deduplication: null,
  20423. splitLine: {
  20424. show: !1
  20425. },
  20426. axisTick: {
  20427. alignWithLabel: !1,
  20428. interval: "auto"
  20429. },
  20430. axisLabel: {
  20431. interval: "auto"
  20432. }
  20433. }, NM),
  20434. zM = C({
  20435. boundaryGap: [0, 0],
  20436. axisLine: {
  20437. show: "auto"
  20438. },
  20439. axisTick: {
  20440. show: "auto"
  20441. },
  20442. splitNumber: 5,
  20443. minorTick: {
  20444. show: !1,
  20445. splitNumber: 5,
  20446. length: 3,
  20447. lineStyle: {}
  20448. },
  20449. minorSplitLine: {
  20450. show: !1,
  20451. lineStyle: {
  20452. color: "#F4F7FD",
  20453. width: 1
  20454. }
  20455. }
  20456. }, NM),
  20457. VM = {
  20458. category: EM,
  20459. value: zM,
  20460. time: C({
  20461. splitNumber: 6,
  20462. axisLabel: {
  20463. showMinLabel: !1,
  20464. showMaxLabel: !1,
  20465. rich: {
  20466. primary: {
  20467. fontWeight: "bold"
  20468. }
  20469. }
  20470. },
  20471. splitLine: {
  20472. show: !1
  20473. }
  20474. }, zM),
  20475. log: k({
  20476. logBase: 10
  20477. }, zM)
  20478. },
  20479. BM = {
  20480. value: 1,
  20481. category: 1,
  20482. time: 1,
  20483. log: 1
  20484. };
  20485. function FM(t, e, i, r) {
  20486. E(BM, (function (o, a) {
  20487. var s = C(C({}, VM[a], !0), r, !0),
  20488. l = function (t) {
  20489. function i() {
  20490. var n = null !== t && t.apply(this, arguments) || this;
  20491. return n.type = e + "Axis." + a, n
  20492. }
  20493. return n(i, t), i.prototype.mergeDefaultAndTheme = function (t, e) {
  20494. var n = Ap(this),
  20495. i = n ? Lp(t) : {};
  20496. C(t, e.getTheme().get(a + "Axis")), C(t, this.getDefaultOption()), t.type = GM(t), n && kp(t, i, n)
  20497. }, i.prototype.optionUpdated = function () {
  20498. "category" === this.option.type && (this.__ordinalMeta = _x.createByAxisModel(this))
  20499. }, i.prototype.getCategories = function (t) {
  20500. var e = this.option;
  20501. if ("category" === e.type) return t ? e.data : this.__ordinalMeta.categories
  20502. }, i.prototype.getOrdinalMeta = function () {
  20503. return this.__ordinalMeta
  20504. }, i.type = e + "Axis." + a, i.defaultOption = s, i
  20505. }(i);
  20506. t.registerComponentModel(l)
  20507. })), t.registerSubTypeDefaulter(e + "Axis", GM)
  20508. }
  20509. function GM(t) {
  20510. return t.type || (t.data ? "category" : "value")
  20511. }
  20512. var WM = function () {
  20513. function t(t) {
  20514. this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = t || ""
  20515. }
  20516. return t.prototype.getAxis = function (t) {
  20517. return this._axes[t]
  20518. }, t.prototype.getAxes = function () {
  20519. return z(this._dimList, (function (t) {
  20520. return this._axes[t]
  20521. }), this)
  20522. }, t.prototype.getAxesByScale = function (t) {
  20523. return t = t.toLowerCase(), B(this.getAxes(), (function (e) {
  20524. return e.scale.type === t
  20525. }))
  20526. }, t.prototype.addAxis = function (t) {
  20527. var e = t.dim;
  20528. this._axes[e] = t, this._dimList.push(e)
  20529. }, t
  20530. }(),
  20531. HM = ["x", "y"];
  20532. function YM(t) {
  20533. return "interval" === t.type || "time" === t.type
  20534. }
  20535. var XM = function (t) {
  20536. function e() {
  20537. var e = null !== t && t.apply(this, arguments) || this;
  20538. return e.type = "cartesian2d", e.dimensions = HM, e
  20539. }
  20540. return n(e, t), e.prototype.calcAffineTransform = function () {
  20541. this._transform = this._invTransform = null;
  20542. var t = this.getAxis("x").scale,
  20543. e = this.getAxis("y").scale;
  20544. if (YM(t) && YM(e)) {
  20545. var n = t.getExtent(),
  20546. i = e.getExtent(),
  20547. r = this.dataToPoint([n[0], i[0]]),
  20548. o = this.dataToPoint([n[1], i[1]]),
  20549. a = n[1] - n[0],
  20550. s = i[1] - i[0];
  20551. if (a && s) {
  20552. var l = (o[0] - r[0]) / a,
  20553. u = (o[1] - r[1]) / s,
  20554. h = r[0] - n[0] * l,
  20555. c = r[1] - i[0] * u,
  20556. p = this._transform = [l, 0, 0, u, h, c];
  20557. this._invTransform = Ie([], p)
  20558. }
  20559. }
  20560. }, e.prototype.getBaseAxis = function () {
  20561. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x")
  20562. }, e.prototype.containPoint = function (t) {
  20563. var e = this.getAxis("x"),
  20564. n = this.getAxis("y");
  20565. return e.contain(e.toLocalCoord(t[0])) && n.contain(n.toLocalCoord(t[1]))
  20566. }, e.prototype.containData = function (t) {
  20567. return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1])
  20568. }, e.prototype.containZone = function (t, e) {
  20569. var n = this.dataToPoint(t),
  20570. i = this.dataToPoint(e),
  20571. r = this.getArea(),
  20572. o = new ze(n[0], n[1], i[0] - n[0], i[1] - n[1]);
  20573. return r.intersect(o)
  20574. }, e.prototype.dataToPoint = function (t, e, n) {
  20575. n = n || [];
  20576. var i = t[0],
  20577. r = t[1];
  20578. if (this._transform && null != i && isFinite(i) && null != r && isFinite(r)) return Wt(n, t, this._transform);
  20579. var o = this.getAxis("x"),
  20580. a = this.getAxis("y");
  20581. return n[0] = o.toGlobalCoord(o.dataToCoord(i, e)), n[1] = a.toGlobalCoord(a.dataToCoord(r, e)), n
  20582. }, e.prototype.clampData = function (t, e) {
  20583. var n = this.getAxis("x").scale,
  20584. i = this.getAxis("y").scale,
  20585. r = n.getExtent(),
  20586. o = i.getExtent(),
  20587. a = n.parse(t[0]),
  20588. s = i.parse(t[1]);
  20589. return (e = e || [])[0] = Math.min(Math.max(Math.min(r[0], r[1]), a), Math.max(r[0], r[1])), e[1] = Math.min(Math.max(Math.min(o[0], o[1]), s), Math.max(o[0], o[1])), e
  20590. }, e.prototype.pointToData = function (t, e) {
  20591. var n = [];
  20592. if (this._invTransform) return Wt(n, t, this._invTransform);
  20593. var i = this.getAxis("x"),
  20594. r = this.getAxis("y");
  20595. return n[0] = i.coordToData(i.toLocalCoord(t[0]), e), n[1] = r.coordToData(r.toLocalCoord(t[1]), e), n
  20596. }, e.prototype.getOtherAxis = function (t) {
  20597. return this.getAxis("x" === t.dim ? "y" : "x")
  20598. }, e.prototype.getArea = function () {
  20599. var t = this.getAxis("x").getGlobalExtent(),
  20600. e = this.getAxis("y").getGlobalExtent(),
  20601. n = Math.min(t[0], t[1]),
  20602. i = Math.min(e[0], e[1]),
  20603. r = Math.max(t[0], t[1]) - n,
  20604. o = Math.max(e[0], e[1]) - i;
  20605. return new ze(n, i, r, o)
  20606. }, e
  20607. }(WM),
  20608. UM = function (t) {
  20609. function e(e, n, i, r, o) {
  20610. var a = t.call(this, e, n, i) || this;
  20611. return a.index = 0, a.type = r || "value", a.position = o || "bottom", a
  20612. }
  20613. return n(e, t), e.prototype.isHorizontal = function () {
  20614. var t = this.position;
  20615. return "top" === t || "bottom" === t
  20616. }, e.prototype.getGlobalExtent = function (t) {
  20617. var e = this.getExtent();
  20618. return e[0] = this.toGlobalCoord(e[0]), e[1] = this.toGlobalCoord(e[1]), t && e[0] > e[1] && e.reverse(), e
  20619. }, e.prototype.pointToData = function (t, e) {
  20620. return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e)
  20621. }, e.prototype.setCategorySortInfo = function (t) {
  20622. if ("category" !== this.type) return !1;
  20623. this.model.option.categorySortInfo = t, this.scale.setSortInfo(t)
  20624. }, e
  20625. }(nb);
  20626. function ZM(t, e, n) {
  20627. n = n || {};
  20628. var i = t.coordinateSystem,
  20629. r = e.axis,
  20630. o = {},
  20631. a = r.getAxesOnZeroOf()[0],
  20632. s = r.position,
  20633. l = a ? "onZero" : s,
  20634. u = r.dim,
  20635. h = i.getRect(),
  20636. c = [h.x, h.x + h.width, h.y, h.y + h.height],
  20637. p = {
  20638. left: 0,
  20639. right: 1,
  20640. top: 0,
  20641. bottom: 1,
  20642. onZero: 2
  20643. },
  20644. d = e.get("offset") || 0,
  20645. f = "x" === u ? [c[2] - d, c[3] + d] : [c[0] - d, c[1] + d];
  20646. if (a) {
  20647. var g = a.toGlobalCoord(a.dataToCoord(0));
  20648. f[p.onZero] = Math.max(Math.min(g, f[1]), f[0])
  20649. }
  20650. o.position = ["y" === u ? f[p[l]] : c[0], "x" === u ? f[p[l]] : c[3]], o.rotation = Math.PI / 2 * ("x" === u ? 0 : 1);
  20651. o.labelDirection = o.tickDirection = o.nameDirection = {
  20652. top: -1,
  20653. bottom: 1,
  20654. left: -1,
  20655. right: 1
  20656. } [s], o.labelOffset = a ? f[p[s]] - f[p.onZero] : 0, e.get(["axisTick", "inside"]) && (o.tickDirection = -o.tickDirection), it(n.labelInside, e.get(["axisLabel", "inside"])) && (o.labelDirection = -o.labelDirection);
  20657. var y = e.get(["axisLabel", "rotate"]);
  20658. return o.labelRotate = "top" === l ? -y : y, o.z2 = 1, o
  20659. }
  20660. function jM(t) {
  20661. return "cartesian2d" === t.get("coordinateSystem")
  20662. }
  20663. function qM(t) {
  20664. var e = {
  20665. xAxisModel: null,
  20666. yAxisModel: null
  20667. };
  20668. return E(e, (function (n, i) {
  20669. var r = i.replace(/Model$/, ""),
  20670. o = t.getReferringComponents(r, zo).models[0];
  20671. e[i] = o
  20672. })), e
  20673. }
  20674. var KM = Math.log;
  20675. function $M(t, e, n) {
  20676. var i = Ox.prototype,
  20677. r = i.getTicks.call(n),
  20678. o = i.getTicks.call(n, !0),
  20679. a = r.length - 1,
  20680. s = i.getInterval.call(n),
  20681. l = y_(t, e),
  20682. u = l.extent,
  20683. h = l.fixMin,
  20684. c = l.fixMax;
  20685. if ("log" === t.type) {
  20686. var p = KM(t.base);
  20687. u = [KM(u[0]) / p, KM(u[1]) / p]
  20688. }
  20689. t.setExtent(u[0], u[1]), t.calcNiceExtent({
  20690. splitNumber: a,
  20691. fixMin: h,
  20692. fixMax: c
  20693. });
  20694. var d = i.getExtent.call(t);
  20695. h && (u[0] = d[0]), c && (u[1] = d[1]);
  20696. var f = i.getInterval.call(t),
  20697. g = u[0],
  20698. y = u[1];
  20699. if (h && c) f = (y - g) / a;
  20700. else if (h)
  20701. for (y = u[0] + f * a; y < u[1] && isFinite(y) && isFinite(u[1]);) f = Ix(f), y = u[0] + f * a;
  20702. else if (c)
  20703. for (g = u[1] - f * a; g > u[0] && isFinite(g) && isFinite(u[0]);) f = Ix(f), g = u[1] - f * a;
  20704. else {
  20705. t.getTicks().length - 1 > a && (f = Ix(f));
  20706. var v = f * a;
  20707. (g = Zr((y = Math.ceil(u[1] / f) * f) - v)) < 0 && u[0] >= 0 ? (g = 0, y = Zr(v)) : y > 0 && u[1] <= 0 && (y = 0, g = -Zr(v))
  20708. }
  20709. var m = (r[0].value - o[0].value) / s,
  20710. x = (r[a].value - o[a].value) / s;
  20711. i.setExtent.call(t, g + f * m, y + f * x), i.setInterval.call(t, f), (m || x) && i.setNiceExtent.call(t, g + f, y - f)
  20712. }
  20713. var JM = function () {
  20714. function t(t, e, n) {
  20715. this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = HM, this._initCartesian(t, e, n), this.model = t
  20716. }
  20717. return t.prototype.getRect = function () {
  20718. return this._rect
  20719. }, t.prototype.update = function (t, e) {
  20720. var n = this._axesMap;
  20721. function i(t) {
  20722. var e, n = G(t),
  20723. i = n.length;
  20724. if (i) {
  20725. for (var r = [], o = i - 1; o >= 0; o--) {
  20726. var a = t[+n[o]],
  20727. s = a.model,
  20728. l = a.scale;
  20729. Sx(l) && s.get("alignTicks") && null == s.get("interval") ? r.push(a) : (v_(l, s), Sx(l) && (e = a))
  20730. }
  20731. r.length && (e || v_((e = r.pop()).scale, e.model), E(r, (function (t) {
  20732. $M(t.scale, t.model, e.scale)
  20733. })))
  20734. }
  20735. }
  20736. this._updateScale(t, this.model), i(n.x), i(n.y);
  20737. var r = {};
  20738. E(n.x, (function (t) {
  20739. tI(n, "y", t, r)
  20740. })), E(n.y, (function (t) {
  20741. tI(n, "x", t, r)
  20742. })), this.resize(this.model, e)
  20743. }, t.prototype.resize = function (t, e, n) {
  20744. var i = t.getBoxLayoutParams(),
  20745. r = !n && t.get("containLabel"),
  20746. o = Cp(i, {
  20747. width: e.getWidth(),
  20748. height: e.getHeight()
  20749. });
  20750. this._rect = o;
  20751. var a = this._axesList;
  20752. function s() {
  20753. E(a, (function (t) {
  20754. var e = t.isHorizontal(),
  20755. n = e ? [0, o.width] : [0, o.height],
  20756. i = t.inverse ? 1 : 0;
  20757. t.setExtent(n[i], n[1 - i]),
  20758. function (t, e) {
  20759. var n = t.getExtent(),
  20760. i = n[0] + n[1];
  20761. t.toGlobalCoord = "x" === t.dim ? function (t) {
  20762. return t + e
  20763. } : function (t) {
  20764. return i - t + e
  20765. }, t.toLocalCoord = "x" === t.dim ? function (t) {
  20766. return t - e
  20767. } : function (t) {
  20768. return i - t + e
  20769. }
  20770. }(t, e ? o.x : o.y)
  20771. }))
  20772. }
  20773. s(), r && (E(a, (function (t) {
  20774. if (!t.model.get(["axisLabel", "inside"])) {
  20775. var e = function (t) {
  20776. var e = t.model,
  20777. n = t.scale;
  20778. if (e.get(["axisLabel", "show"]) && !n.isBlank()) {
  20779. var i, r, o = n.getExtent();
  20780. r = n instanceof Lx ? n.count() : (i = n.getTicks()).length;
  20781. var a, s = t.getLabelModel(),
  20782. l = x_(t),
  20783. u = 1;
  20784. r > 40 && (u = Math.ceil(r / 40));
  20785. for (var h = 0; h < r; h += u) {
  20786. var c = l(i ? i[h] : {
  20787. value: o[0] + h
  20788. }, h),
  20789. p = b_(s.getTextRect(c), s.get("rotate") || 0);
  20790. a ? a.union(p) : a = p
  20791. }
  20792. return a
  20793. }
  20794. }(t);
  20795. if (e) {
  20796. var n = t.isHorizontal() ? "height" : "width",
  20797. i = t.model.get(["axisLabel", "margin"]);
  20798. o[n] -= e[n] + i, "top" === t.position ? o.y += e.height + i : "left" === t.position && (o.x += e.width + i)
  20799. }
  20800. }
  20801. })), s()), E(this._coordsList, (function (t) {
  20802. t.calcAffineTransform()
  20803. }))
  20804. }, t.prototype.getAxis = function (t, e) {
  20805. var n = this._axesMap[t];
  20806. if (null != n) return n[e || 0]
  20807. }, t.prototype.getAxes = function () {
  20808. return this._axesList.slice()
  20809. }, t.prototype.getCartesian = function (t, e) {
  20810. if (null != t && null != e) {
  20811. var n = "x" + t + "y" + e;
  20812. return this._coordsMap[n]
  20813. }
  20814. q(t) && (e = t.yAxisIndex, t = t.xAxisIndex);
  20815. for (var i = 0, r = this._coordsList; i < r.length; i++)
  20816. if (r[i].getAxis("x").index === t || r[i].getAxis("y").index === e) return r[i]
  20817. }, t.prototype.getCartesians = function () {
  20818. return this._coordsList.slice()
  20819. }, t.prototype.convertToPixel = function (t, e, n) {
  20820. var i = this._findConvertTarget(e);
  20821. return i.cartesian ? i.cartesian.dataToPoint(n) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(n)) : null
  20822. }, t.prototype.convertFromPixel = function (t, e, n) {
  20823. var i = this._findConvertTarget(e);
  20824. return i.cartesian ? i.cartesian.pointToData(n) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(n)) : null
  20825. }, t.prototype._findConvertTarget = function (t) {
  20826. var e, n, i = t.seriesModel,
  20827. r = t.xAxisModel || i && i.getReferringComponents("xAxis", zo).models[0],
  20828. o = t.yAxisModel || i && i.getReferringComponents("yAxis", zo).models[0],
  20829. a = t.gridModel,
  20830. s = this._coordsList;
  20831. if (i) P(s, e = i.coordinateSystem) < 0 && (e = null);
  20832. else if (r && o) e = this.getCartesian(r.componentIndex, o.componentIndex);
  20833. else if (r) n = this.getAxis("x", r.componentIndex);
  20834. else if (o) n = this.getAxis("y", o.componentIndex);
  20835. else if (a) {
  20836. a.coordinateSystem === this && (e = this._coordsList[0])
  20837. }
  20838. return {
  20839. cartesian: e,
  20840. axis: n
  20841. }
  20842. }, t.prototype.containPoint = function (t) {
  20843. var e = this._coordsList[0];
  20844. if (e) return e.containPoint(t)
  20845. }, t.prototype._initCartesian = function (t, e, n) {
  20846. var i = this,
  20847. r = this,
  20848. o = {
  20849. left: !1,
  20850. right: !1,
  20851. top: !1,
  20852. bottom: !1
  20853. },
  20854. a = {
  20855. x: {},
  20856. y: {}
  20857. },
  20858. s = {
  20859. x: 0,
  20860. y: 0
  20861. };
  20862. if (e.eachComponent("xAxis", l("x"), this), e.eachComponent("yAxis", l("y"), this), !s.x || !s.y) return this._axesMap = {}, void(this._axesList = []);
  20863. function l(e) {
  20864. return function (n, i) {
  20865. if (QM(n, t)) {
  20866. var l = n.get("position");
  20867. "x" === e ? "top" !== l && "bottom" !== l && (l = o.bottom ? "top" : "bottom") : "left" !== l && "right" !== l && (l = o.left ? "right" : "left"), o[l] = !0;
  20868. var u = new UM(e, m_(n), [0, 0], n.get("type"), l),
  20869. h = "category" === u.type;
  20870. u.onBand = h && n.get("boundaryGap"), u.inverse = n.get("inverse"), n.axis = u, u.model = n, u.grid = r, u.index = i, r._axesList.push(u), a[e][i] = u, s[e]++
  20871. }
  20872. }
  20873. }
  20874. this._axesMap = a, E(a.x, (function (e, n) {
  20875. E(a.y, (function (r, o) {
  20876. var a = "x" + n + "y" + o,
  20877. s = new XM(a);
  20878. s.master = i, s.model = t, i._coordsMap[a] = s, i._coordsList.push(s), s.addAxis(e), s.addAxis(r)
  20879. }))
  20880. }))
  20881. }, t.prototype._updateScale = function (t, e) {
  20882. function n(t, e) {
  20883. E(M_(t, e.dim), (function (n) {
  20884. e.scale.unionExtentFromData(t, n)
  20885. }))
  20886. }
  20887. E(this._axesList, (function (t) {
  20888. if (t.scale.setExtent(1 / 0, -1 / 0), "category" === t.type) {
  20889. var e = t.model.get("categorySortInfo");
  20890. t.scale.setSortInfo(e)
  20891. }
  20892. })), t.eachSeries((function (t) {
  20893. if (jM(t)) {
  20894. var i = qM(t),
  20895. r = i.xAxisModel,
  20896. o = i.yAxisModel;
  20897. if (!QM(r, e) || !QM(o, e)) return;
  20898. var a = this.getCartesian(r.componentIndex, o.componentIndex),
  20899. s = t.getData(),
  20900. l = a.getAxis("x"),
  20901. u = a.getAxis("y");
  20902. n(s, l), n(s, u)
  20903. }
  20904. }), this)
  20905. }, t.prototype.getTooltipAxes = function (t) {
  20906. var e = [],
  20907. n = [];
  20908. return E(this.getCartesians(), (function (i) {
  20909. var r = null != t && "auto" !== t ? i.getAxis(t) : i.getBaseAxis(),
  20910. o = i.getOtherAxis(r);
  20911. P(e, r) < 0 && e.push(r), P(n, o) < 0 && n.push(o)
  20912. })), {
  20913. baseAxes: e,
  20914. otherAxes: n
  20915. }
  20916. }, t.create = function (e, n) {
  20917. var i = [];
  20918. return e.eachComponent("grid", (function (r, o) {
  20919. var a = new t(r, e, n);
  20920. a.name = "grid_" + o, a.resize(r, n, !0), r.coordinateSystem = a, i.push(a)
  20921. })), e.eachSeries((function (t) {
  20922. if (jM(t)) {
  20923. var e = qM(t),
  20924. n = e.xAxisModel,
  20925. i = e.yAxisModel,
  20926. r = n.getCoordSysModel();
  20927. 0;
  20928. var o = r.coordinateSystem;
  20929. t.coordinateSystem = o.getCartesian(n.componentIndex, i.componentIndex)
  20930. }
  20931. })), i
  20932. }, t.dimensions = HM, t
  20933. }();
  20934. function QM(t, e) {
  20935. return t.getCoordSysModel() === e
  20936. }
  20937. function tI(t, e, n, i) {
  20938. n.getAxesOnZeroOf = function () {
  20939. return r ? [r] : []
  20940. };
  20941. var r, o = t[e],
  20942. a = n.model,
  20943. s = a.get(["axisLine", "onZero"]),
  20944. l = a.get(["axisLine", "onZeroAxisIndex"]);
  20945. if (s) {
  20946. if (null != l) eI(o[l]) && (r = o[l]);
  20947. else
  20948. for (var u in o)
  20949. if (o.hasOwnProperty(u) && eI(o[u]) && !i[h(o[u])]) {
  20950. r = o[u];
  20951. break
  20952. } r && (i[h(r)] = !0)
  20953. }
  20954. function h(t) {
  20955. return t.dim + "_" + t.index
  20956. }
  20957. }
  20958. function eI(t) {
  20959. return t && "category" !== t.type && "time" !== t.type && function (t) {
  20960. var e = t.scale.getExtent(),
  20961. n = e[0],
  20962. i = e[1];
  20963. return !(n > 0 && i > 0 || n < 0 && i < 0)
  20964. }(t)
  20965. }
  20966. var nI = Math.PI,
  20967. iI = function () {
  20968. function t(t, e) {
  20969. this.group = new zr, this.opt = e, this.axisModel = t, k(e, {
  20970. labelOffset: 0,
  20971. nameDirection: 1,
  20972. tickDirection: 1,
  20973. labelDirection: 1,
  20974. silent: !0,
  20975. handleAutoShown: function () {
  20976. return !0
  20977. }
  20978. });
  20979. var n = new zr({
  20980. x: e.position[0],
  20981. y: e.position[1],
  20982. rotation: e.rotation
  20983. });
  20984. n.updateTransform(), this._transformGroup = n
  20985. }
  20986. return t.prototype.hasBuilder = function (t) {
  20987. return !!rI[t]
  20988. }, t.prototype.add = function (t) {
  20989. rI[t](this.opt, this.axisModel, this.group, this._transformGroup)
  20990. }, t.prototype.getGroup = function () {
  20991. return this.group
  20992. }, t.innerTextLayout = function (t, e, n) {
  20993. var i, r, o = eo(e - t);
  20994. return no(o) ? (r = n > 0 ? "top" : "bottom", i = "center") : no(o - nI) ? (r = n > 0 ? "bottom" : "top", i = "center") : (r = "middle", i = o > 0 && o < nI ? n > 0 ? "right" : "left" : n > 0 ? "left" : "right"), {
  20995. rotation: o,
  20996. textAlign: i,
  20997. textVerticalAlign: r
  20998. }
  20999. }, t.makeAxisEventDataBase = function (t) {
  21000. var e = {
  21001. componentType: t.mainType,
  21002. componentIndex: t.componentIndex
  21003. };
  21004. return e[t.mainType + "Index"] = t.componentIndex, e
  21005. }, t.isLabelSilent = function (t) {
  21006. var e = t.get("tooltip");
  21007. return t.get("silent") || !(t.get("triggerEvent") || e && e.show)
  21008. }, t
  21009. }(),
  21010. rI = {
  21011. axisLine: function (t, e, n, i) {
  21012. var r = e.get(["axisLine", "show"]);
  21013. if ("auto" === r && t.handleAutoShown && (r = t.handleAutoShown("axisLine")), r) {
  21014. var o = e.axis.getExtent(),
  21015. a = i.transform,
  21016. s = [o[0], 0],
  21017. l = [o[1], 0],
  21018. u = s[0] > l[0];
  21019. a && (Wt(s, s, a), Wt(l, l, a));
  21020. var h = A({
  21021. lineCap: "round"
  21022. }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()),
  21023. c = new Zu({
  21024. shape: {
  21025. x1: s[0],
  21026. y1: s[1],
  21027. x2: l[0],
  21028. y2: l[1]
  21029. },
  21030. style: h,
  21031. strokeContainThreshold: t.strokeContainThreshold || 5,
  21032. silent: !0,
  21033. z2: 1
  21034. });
  21035. Rh(c.shape, c.style.lineWidth), c.anid = "line", n.add(c);
  21036. var p = e.get(["axisLine", "symbol"]);
  21037. if (null != p) {
  21038. var d = e.get(["axisLine", "symbolSize"]);
  21039. U(p) && (p = [p, p]), (U(d) || j(d)) && (d = [d, d]);
  21040. var f = Yy(e.get(["axisLine", "symbolOffset"]) || 0, d),
  21041. g = d[0],
  21042. y = d[1];
  21043. E([{
  21044. rotate: t.rotation + Math.PI / 2,
  21045. offset: f[0],
  21046. r: 0
  21047. }, {
  21048. rotate: t.rotation - Math.PI / 2,
  21049. offset: f[1],
  21050. r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
  21051. }], (function (e, i) {
  21052. if ("none" !== p[i] && null != p[i]) {
  21053. var r = Wy(p[i], -g / 2, -y / 2, g, y, h.stroke, !0),
  21054. o = e.r + e.offset,
  21055. a = u ? l : s;
  21056. r.attr({
  21057. rotation: e.rotate,
  21058. x: a[0] + o * Math.cos(t.rotation),
  21059. y: a[1] - o * Math.sin(t.rotation),
  21060. silent: !0,
  21061. z2: 11
  21062. }), n.add(r)
  21063. }
  21064. }))
  21065. }
  21066. }
  21067. },
  21068. axisTickLabel: function (t, e, n, i) {
  21069. var r = function (t, e, n, i) {
  21070. var r = n.axis,
  21071. o = n.getModel("axisTick"),
  21072. a = o.get("show");
  21073. "auto" === a && i.handleAutoShown && (a = i.handleAutoShown("axisTick"));
  21074. if (!a || r.scale.isBlank()) return;
  21075. for (var s = o.getModel("lineStyle"), l = i.tickDirection * o.get("length"), u = lI(r.getTicksCoords(), e.transform, l, k(s.getLineStyle(), {
  21076. stroke: n.get(["axisLine", "lineStyle", "color"])
  21077. }), "ticks"), h = 0; h < u.length; h++) t.add(u[h]);
  21078. return u
  21079. }(n, i, e, t),
  21080. o = function (t, e, n, i) {
  21081. var r = n.axis,
  21082. o = it(i.axisLabelShow, n.get(["axisLabel", "show"]));
  21083. if (!o || r.scale.isBlank()) return;
  21084. var a = n.getModel("axisLabel"),
  21085. s = a.get("margin"),
  21086. l = r.getViewLabels(),
  21087. u = (it(i.labelRotate, a.get("rotate")) || 0) * nI / 180,
  21088. h = iI.innerTextLayout(i.rotation, u, i.labelDirection),
  21089. c = n.getCategories && n.getCategories(!0),
  21090. p = [],
  21091. d = iI.isLabelSilent(n),
  21092. f = n.get("triggerEvent");
  21093. return E(l, (function (o, l) {
  21094. var u = "ordinal" === r.scale.type ? r.scale.getRawOrdinalNumber(o.tickValue) : o.tickValue,
  21095. g = o.formattedLabel,
  21096. y = o.rawLabel,
  21097. v = a;
  21098. if (c && c[u]) {
  21099. var m = c[u];
  21100. q(m) && m.textStyle && (v = new Mc(m.textStyle, a, n.ecModel))
  21101. }
  21102. var x = v.getTextColor() || n.get(["axisLine", "lineStyle", "color"]),
  21103. _ = r.dataToCoord(u),
  21104. b = new Fs({
  21105. x: _,
  21106. y: i.labelOffset + i.labelDirection * s,
  21107. rotation: h.rotation,
  21108. silent: d,
  21109. z2: 10 + (o.level || 0),
  21110. style: nc(v, {
  21111. text: g,
  21112. align: v.getShallow("align", !0) || h.textAlign,
  21113. verticalAlign: v.getShallow("verticalAlign", !0) || v.getShallow("baseline", !0) || h.textVerticalAlign,
  21114. fill: X(x) ? x("category" === r.type ? y : "value" === r.type ? u + "" : u, l) : x
  21115. })
  21116. });
  21117. if (b.anid = "label_" + u, f) {
  21118. var w = iI.makeAxisEventDataBase(n);
  21119. w.targetType = "axisLabel", w.value = y, w.tickIndex = l, "category" === r.type && (w.dataIndex = u), Qs(b).eventData = w
  21120. }
  21121. e.add(b), b.updateTransform(), p.push(b), t.add(b), b.decomposeTransform()
  21122. })), p
  21123. }(n, i, e, t);
  21124. (function (t, e, n) {
  21125. if (S_(t.axis)) return;
  21126. var i = t.get(["axisLabel", "showMinLabel"]),
  21127. r = t.get(["axisLabel", "showMaxLabel"]);
  21128. e = e || [], n = n || [];
  21129. var o = e[0],
  21130. a = e[1],
  21131. s = e[e.length - 1],
  21132. l = e[e.length - 2],
  21133. u = n[0],
  21134. h = n[1],
  21135. c = n[n.length - 1],
  21136. p = n[n.length - 2];
  21137. !1 === i ? (oI(o), oI(u)) : aI(o, a) && (i ? (oI(a), oI(h)) : (oI(o), oI(u)));
  21138. !1 === r ? (oI(s), oI(c)) : aI(l, s) && (r ? (oI(l), oI(p)) : (oI(s), oI(c)))
  21139. }(e, o, r), function (t, e, n, i) {
  21140. var r = n.axis,
  21141. o = n.getModel("minorTick");
  21142. if (!o.get("show") || r.scale.isBlank()) return;
  21143. var a = r.getMinorTicksCoords();
  21144. if (!a.length) return;
  21145. for (var s = o.getModel("lineStyle"), l = i * o.get("length"), u = k(s.getLineStyle(), k(n.getModel("axisTick").getLineStyle(), {
  21146. stroke: n.get(["axisLine", "lineStyle", "color"])
  21147. })), h = 0; h < a.length; h++)
  21148. for (var c = lI(a[h], e.transform, l, u, "minorticks_" + h), p = 0; p < c.length; p++) t.add(c[p])
  21149. }(n, i, e, t.tickDirection), e.get(["axisLabel", "hideOverlap"])) && Lb(Db(z(o, (function (t) {
  21150. return {
  21151. label: t,
  21152. priority: t.z2,
  21153. defaultAttr: {
  21154. ignore: t.ignore
  21155. }
  21156. }
  21157. }))))
  21158. },
  21159. axisName: function (t, e, n, i) {
  21160. var r = it(t.axisName, e.get("name"));
  21161. if (r) {
  21162. var o, a, s = e.get("nameLocation"),
  21163. l = t.nameDirection,
  21164. u = e.getModel("nameTextStyle"),
  21165. h = e.get("nameGap") || 0,
  21166. c = e.axis.getExtent(),
  21167. p = c[0] > c[1] ? -1 : 1,
  21168. d = ["start" === s ? c[0] - p * h : "end" === s ? c[1] + p * h : (c[0] + c[1]) / 2, sI(s) ? t.labelOffset + l * h : 0],
  21169. f = e.get("nameRotate");
  21170. null != f && (f = f * nI / 180), sI(s) ? o = iI.innerTextLayout(t.rotation, null != f ? f : t.rotation, l) : (o = function (t, e, n, i) {
  21171. var r, o, a = eo(n - t),
  21172. s = i[0] > i[1],
  21173. l = "start" === e && !s || "start" !== e && s;
  21174. no(a - nI / 2) ? (o = l ? "bottom" : "top", r = "center") : no(a - 1.5 * nI) ? (o = l ? "top" : "bottom", r = "center") : (o = "middle", r = a < 1.5 * nI && a > nI / 2 ? l ? "left" : "right" : l ? "right" : "left");
  21175. return {
  21176. rotation: a,
  21177. textAlign: r,
  21178. textVerticalAlign: o
  21179. }
  21180. }(t.rotation, s, f || 0, c), null != (a = t.axisNameAvailableWidth) && (a = Math.abs(a / Math.sin(o.rotation)), !isFinite(a) && (a = null)));
  21181. var g = u.getFont(),
  21182. y = e.get("nameTruncate", !0) || {},
  21183. v = y.ellipsis,
  21184. m = it(t.nameTruncateMaxWidth, y.maxWidth, a),
  21185. x = new Fs({
  21186. x: d[0],
  21187. y: d[1],
  21188. rotation: o.rotation,
  21189. silent: iI.isLabelSilent(e),
  21190. style: nc(u, {
  21191. text: r,
  21192. font: g,
  21193. overflow: "truncate",
  21194. width: m,
  21195. ellipsis: v,
  21196. fill: u.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  21197. align: u.get("align") || o.textAlign,
  21198. verticalAlign: u.get("verticalAlign") || o.textVerticalAlign
  21199. }),
  21200. z2: 1
  21201. });
  21202. if (Zh({
  21203. el: x,
  21204. componentModel: e,
  21205. itemName: r
  21206. }), x.__fullText = r, x.anid = "name", e.get("triggerEvent")) {
  21207. var _ = iI.makeAxisEventDataBase(e);
  21208. _.targetType = "axisName", _.name = r, Qs(x).eventData = _
  21209. }
  21210. i.add(x), x.updateTransform(), n.add(x), x.decomposeTransform()
  21211. }
  21212. }
  21213. };
  21214. function oI(t) {
  21215. t && (t.ignore = !0)
  21216. }
  21217. function aI(t, e) {
  21218. var n = t && t.getBoundingRect().clone(),
  21219. i = e && e.getBoundingRect().clone();
  21220. if (n && i) {
  21221. var r = xe([]);
  21222. return Se(r, r, -t.rotation), n.applyTransform(be([], r, t.getLocalTransform())), i.applyTransform(be([], r, e.getLocalTransform())), n.intersect(i)
  21223. }
  21224. }
  21225. function sI(t) {
  21226. return "middle" === t || "center" === t
  21227. }
  21228. function lI(t, e, n, i, r) {
  21229. for (var o = [], a = [], s = [], l = 0; l < t.length; l++) {
  21230. var u = t[l].coord;
  21231. a[0] = u, a[1] = 0, s[0] = u, s[1] = n, e && (Wt(a, a, e), Wt(s, s, e));
  21232. var h = new Zu({
  21233. shape: {
  21234. x1: a[0],
  21235. y1: a[1],
  21236. x2: s[0],
  21237. y2: s[1]
  21238. },
  21239. style: i,
  21240. z2: 2,
  21241. autoBatch: !0,
  21242. silent: !0
  21243. });
  21244. Rh(h.shape, h.style.lineWidth), h.anid = r + "_" + t[l].tickValue, o.push(h)
  21245. }
  21246. return o
  21247. }
  21248. function uI(t, e) {
  21249. var n = {
  21250. axesInfo: {},
  21251. seriesInvolved: !1,
  21252. coordSysAxesInfo: {},
  21253. coordSysMap: {}
  21254. };
  21255. return function (t, e, n) {
  21256. var i = e.getComponent("tooltip"),
  21257. r = e.getComponent("axisPointer"),
  21258. o = r.get("link", !0) || [],
  21259. a = [];
  21260. E(n.getCoordinateSystems(), (function (n) {
  21261. if (n.axisPointerEnabled) {
  21262. var s = fI(n.model),
  21263. l = t.coordSysAxesInfo[s] = {};
  21264. t.coordSysMap[s] = n;
  21265. var u = n.model.getModel("tooltip", i);
  21266. if (E(n.getAxes(), H(d, !1, null)), n.getTooltipAxes && i && u.get("show")) {
  21267. var h = "axis" === u.get("trigger"),
  21268. c = "cross" === u.get(["axisPointer", "type"]),
  21269. p = n.getTooltipAxes(u.get(["axisPointer", "axis"]));
  21270. (h || c) && E(p.baseAxes, H(d, !c || "cross", h)), c && E(p.otherAxes, H(d, "cross", !1))
  21271. }
  21272. }
  21273. function d(i, s, h) {
  21274. var c = h.model.getModel("axisPointer", r),
  21275. p = c.get("show");
  21276. if (p && ("auto" !== p || i || dI(c))) {
  21277. null == s && (s = c.get("triggerTooltip")), c = i ? function (t, e, n, i, r, o) {
  21278. var a = e.getModel("axisPointer"),
  21279. s = {};
  21280. E(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], (function (t) {
  21281. s[t] = T(a.get(t))
  21282. })), s.snap = "category" !== t.type && !!o, "cross" === a.get("type") && (s.type = "line");
  21283. var l = s.label || (s.label = {});
  21284. if (null == l.show && (l.show = !1), "cross" === r) {
  21285. var u = a.get(["label", "show"]);
  21286. if (l.show = null == u || u, !o) {
  21287. var h = s.lineStyle = a.get("crossStyle");
  21288. h && k(l, h.textStyle)
  21289. }
  21290. }
  21291. return t.model.getModel("axisPointer", new Mc(s, n, i))
  21292. }(h, u, r, e, i, s) : c;
  21293. var d = c.get("snap"),
  21294. f = fI(h.model),
  21295. g = s || d || "category" === h.type,
  21296. y = t.axesInfo[f] = {
  21297. key: f,
  21298. axis: h,
  21299. coordSys: n,
  21300. axisPointerModel: c,
  21301. triggerTooltip: s,
  21302. involveSeries: g,
  21303. snap: d,
  21304. useHandle: dI(c),
  21305. seriesModels: [],
  21306. linkGroup: null
  21307. };
  21308. l[f] = y, t.seriesInvolved = t.seriesInvolved || g;
  21309. var v = function (t, e) {
  21310. for (var n = e.model, i = e.dim, r = 0; r < t.length; r++) {
  21311. var o = t[r] || {};
  21312. if (hI(o[i + "AxisId"], n.id) || hI(o[i + "AxisIndex"], n.componentIndex) || hI(o[i + "AxisName"], n.name)) return r
  21313. }
  21314. }(o, h);
  21315. if (null != v) {
  21316. var m = a[v] || (a[v] = {
  21317. axesInfo: {}
  21318. });
  21319. m.axesInfo[f] = y, m.mapper = o[v].mapper, y.linkGroup = m
  21320. }
  21321. }
  21322. }
  21323. }))
  21324. }(n, t, e), n.seriesInvolved && function (t, e) {
  21325. e.eachSeries((function (e) {
  21326. var n = e.coordinateSystem,
  21327. i = e.get(["tooltip", "trigger"], !0),
  21328. r = e.get(["tooltip", "show"], !0);
  21329. n && "none" !== i && !1 !== i && "item" !== i && !1 !== r && !1 !== e.get(["axisPointer", "show"], !0) && E(t.coordSysAxesInfo[fI(n.model)], (function (t) {
  21330. var i = t.axis;
  21331. n.getAxis(i.dim) === i && (t.seriesModels.push(e), null == t.seriesDataCount && (t.seriesDataCount = 0), t.seriesDataCount += e.getData().count())
  21332. }))
  21333. }))
  21334. }(n, t), n
  21335. }
  21336. function hI(t, e) {
  21337. return "all" === t || Y(t) && P(t, e) >= 0 || t === e
  21338. }
  21339. function cI(t) {
  21340. var e = pI(t);
  21341. if (e) {
  21342. var n = e.axisPointerModel,
  21343. i = e.axis.scale,
  21344. r = n.option,
  21345. o = n.get("status"),
  21346. a = n.get("value");
  21347. null != a && (a = i.parse(a));
  21348. var s = dI(n);
  21349. null == o && (r.status = s ? "show" : "hide");
  21350. var l = i.getExtent().slice();
  21351. l[0] > l[1] && l.reverse(), (null == a || a > l[1]) && (a = l[1]), a < l[0] && (a = l[0]), r.value = a, s && (r.status = e.axis.scale.isBlank() ? "hide" : "show")
  21352. }
  21353. }
  21354. function pI(t) {
  21355. var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  21356. return e && e.axesInfo[fI(t)]
  21357. }
  21358. function dI(t) {
  21359. return !!t.get(["handle", "show"])
  21360. }
  21361. function fI(t) {
  21362. return t.type + "||" + t.id
  21363. }
  21364. var gI = {},
  21365. yI = function (t) {
  21366. function e() {
  21367. var n = null !== t && t.apply(this, arguments) || this;
  21368. return n.type = e.type, n
  21369. }
  21370. return n(e, t), e.prototype.render = function (e, n, i, r) {
  21371. this.axisPointerClass && cI(e), t.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(e, i, !0)
  21372. }, e.prototype.updateAxisPointer = function (t, e, n, i) {
  21373. this._doUpdateAxisPointerClass(t, n, !1)
  21374. }, e.prototype.remove = function (t, e) {
  21375. var n = this._axisPointer;
  21376. n && n.remove(e)
  21377. }, e.prototype.dispose = function (e, n) {
  21378. this._disposeAxisPointer(n), t.prototype.dispose.apply(this, arguments)
  21379. }, e.prototype._doUpdateAxisPointerClass = function (t, n, i) {
  21380. var r = e.getAxisPointerClass(this.axisPointerClass);
  21381. if (r) {
  21382. var o = function (t) {
  21383. var e = pI(t);
  21384. return e && e.axisPointerModel
  21385. }(t);
  21386. o ? (this._axisPointer || (this._axisPointer = new r)).render(t, o, n, i) : this._disposeAxisPointer(n)
  21387. }
  21388. }, e.prototype._disposeAxisPointer = function (t) {
  21389. this._axisPointer && this._axisPointer.dispose(t), this._axisPointer = null
  21390. }, e.registerAxisPointerClass = function (t, e) {
  21391. gI[t] = e
  21392. }, e.getAxisPointerClass = function (t) {
  21393. return t && gI[t]
  21394. }, e.type = "axis", e
  21395. }(Tg),
  21396. vI = Oo();
  21397. function mI(t, e, n, i) {
  21398. var r = n.axis;
  21399. if (!r.scale.isBlank()) {
  21400. var o = n.getModel("splitArea"),
  21401. a = o.getModel("areaStyle"),
  21402. s = a.get("color"),
  21403. l = i.coordinateSystem.getRect(),
  21404. u = r.getTicksCoords({
  21405. tickModel: o,
  21406. clamp: !0
  21407. });
  21408. if (u.length) {
  21409. var h = s.length,
  21410. c = vI(t).splitAreaColors,
  21411. p = yt(),
  21412. d = 0;
  21413. if (c)
  21414. for (var f = 0; f < u.length; f++) {
  21415. var g = c.get(u[f].tickValue);
  21416. if (null != g) {
  21417. d = (g + (h - 1) * f) % h;
  21418. break
  21419. }
  21420. }
  21421. var y = r.toGlobalCoord(u[0].coord),
  21422. v = a.getAreaStyle();
  21423. s = Y(s) ? s : [s];
  21424. for (f = 1; f < u.length; f++) {
  21425. var m = r.toGlobalCoord(u[f].coord),
  21426. x = void 0,
  21427. _ = void 0,
  21428. b = void 0,
  21429. w = void 0;
  21430. r.isHorizontal() ? (x = y, _ = l.y, b = m - x, w = l.height, y = x + b) : (x = l.x, _ = y, b = l.width, y = _ + (w = m - _));
  21431. var S = u[f - 1].tickValue;
  21432. null != S && p.set(S, d), e.add(new zs({
  21433. anid: null != S ? "area_" + S : null,
  21434. shape: {
  21435. x: x,
  21436. y: _,
  21437. width: b,
  21438. height: w
  21439. },
  21440. style: k({
  21441. fill: s[d]
  21442. }, v),
  21443. autoBatch: !0,
  21444. silent: !0
  21445. })), d = (d + 1) % h
  21446. }
  21447. vI(t).splitAreaColors = p
  21448. }
  21449. }
  21450. }
  21451. function xI(t) {
  21452. vI(t).splitAreaColors = null
  21453. }
  21454. var _I = ["axisLine", "axisTickLabel", "axisName"],
  21455. bI = ["splitArea", "splitLine", "minorSplitLine"],
  21456. wI = function (t) {
  21457. function e() {
  21458. var n = null !== t && t.apply(this, arguments) || this;
  21459. return n.type = e.type, n.axisPointerClass = "CartesianAxisPointer", n
  21460. }
  21461. return n(e, t), e.prototype.render = function (e, n, i, r) {
  21462. this.group.removeAll();
  21463. var o = this._axisGroup;
  21464. if (this._axisGroup = new zr, this.group.add(this._axisGroup), e.get("show")) {
  21465. var a = e.getCoordSysModel(),
  21466. s = ZM(a, e),
  21467. l = new iI(e, A({
  21468. handleAutoShown: function (t) {
  21469. for (var n = a.coordinateSystem.getCartesians(), i = 0; i < n.length; i++)
  21470. if (Sx(n[i].getOtherAxis(e.axis).scale)) return !0;
  21471. return !1
  21472. }
  21473. }, s));
  21474. E(_I, l.add, l), this._axisGroup.add(l.getGroup()), E(bI, (function (t) {
  21475. e.get([t, "show"]) && SI[t](this, this._axisGroup, e, a)
  21476. }), this), r && "changeAxisOrder" === r.type && r.isInitSort || Fh(o, this._axisGroup, e), t.prototype.render.call(this, e, n, i, r)
  21477. }
  21478. }, e.prototype.remove = function () {
  21479. xI(this)
  21480. }, e.type = "cartesianAxis", e
  21481. }(yI),
  21482. SI = {
  21483. splitLine: function (t, e, n, i) {
  21484. var r = n.axis;
  21485. if (!r.scale.isBlank()) {
  21486. var o = n.getModel("splitLine"),
  21487. a = o.getModel("lineStyle"),
  21488. s = a.get("color");
  21489. s = Y(s) ? s : [s];
  21490. for (var l = i.coordinateSystem.getRect(), u = r.isHorizontal(), h = 0, c = r.getTicksCoords({
  21491. tickModel: o
  21492. }), p = [], d = [], f = a.getLineStyle(), g = 0; g < c.length; g++) {
  21493. var y = r.toGlobalCoord(c[g].coord);
  21494. u ? (p[0] = y, p[1] = l.y, d[0] = y, d[1] = l.y + l.height) : (p[0] = l.x, p[1] = y, d[0] = l.x + l.width, d[1] = y);
  21495. var v = h++ % s.length,
  21496. m = c[g].tickValue,
  21497. x = new Zu({
  21498. anid: null != m ? "line_" + c[g].tickValue : null,
  21499. autoBatch: !0,
  21500. shape: {
  21501. x1: p[0],
  21502. y1: p[1],
  21503. x2: d[0],
  21504. y2: d[1]
  21505. },
  21506. style: k({
  21507. stroke: s[v]
  21508. }, f),
  21509. silent: !0
  21510. });
  21511. Rh(x.shape, f.lineWidth), e.add(x)
  21512. }
  21513. }
  21514. },
  21515. minorSplitLine: function (t, e, n, i) {
  21516. var r = n.axis,
  21517. o = n.getModel("minorSplitLine").getModel("lineStyle"),
  21518. a = i.coordinateSystem.getRect(),
  21519. s = r.isHorizontal(),
  21520. l = r.getMinorTicksCoords();
  21521. if (l.length)
  21522. for (var u = [], h = [], c = o.getLineStyle(), p = 0; p < l.length; p++)
  21523. for (var d = 0; d < l[p].length; d++) {
  21524. var f = r.toGlobalCoord(l[p][d].coord);
  21525. s ? (u[0] = f, u[1] = a.y, h[0] = f, h[1] = a.y + a.height) : (u[0] = a.x, u[1] = f, h[0] = a.x + a.width, h[1] = f);
  21526. var g = new Zu({
  21527. anid: "minor_line_" + l[p][d].tickValue,
  21528. autoBatch: !0,
  21529. shape: {
  21530. x1: u[0],
  21531. y1: u[1],
  21532. x2: h[0],
  21533. y2: h[1]
  21534. },
  21535. style: c,
  21536. silent: !0
  21537. });
  21538. Rh(g.shape, c.lineWidth), e.add(g)
  21539. }
  21540. },
  21541. splitArea: function (t, e, n, i) {
  21542. mI(t, e, n, i)
  21543. }
  21544. },
  21545. MI = function (t) {
  21546. function e() {
  21547. var n = null !== t && t.apply(this, arguments) || this;
  21548. return n.type = e.type, n
  21549. }
  21550. return n(e, t), e.type = "xAxis", e
  21551. }(wI),
  21552. II = function (t) {
  21553. function e() {
  21554. var e = null !== t && t.apply(this, arguments) || this;
  21555. return e.type = MI.type, e
  21556. }
  21557. return n(e, t), e.type = "yAxis", e
  21558. }(wI),
  21559. TI = function (t) {
  21560. function e() {
  21561. var e = null !== t && t.apply(this, arguments) || this;
  21562. return e.type = "grid", e
  21563. }
  21564. return n(e, t), e.prototype.render = function (t, e) {
  21565. this.group.removeAll(), t.get("show") && this.group.add(new zs({
  21566. shape: t.coordinateSystem.getRect(),
  21567. style: k({
  21568. fill: t.get("backgroundColor")
  21569. }, t.getItemStyle()),
  21570. silent: !0,
  21571. z2: -1
  21572. }))
  21573. }, e.type = "grid", e
  21574. }(Tg),
  21575. CI = {
  21576. offset: 0
  21577. };
  21578. function DI(t) {
  21579. t.registerComponentView(TI), t.registerComponentModel(OM), t.registerCoordinateSystem("cartesian2d", JM), FM(t, "x", RM, CI), FM(t, "y", RM, CI), t.registerComponentView(MI), t.registerComponentView(II), t.registerPreprocessor((function (t) {
  21580. t.xAxis && t.yAxis && !t.grid && (t.grid = {})
  21581. }))
  21582. }
  21583. function AI(t) {
  21584. t.eachSeriesByType("radar", (function (t) {
  21585. var e = t.getData(),
  21586. n = [],
  21587. i = t.coordinateSystem;
  21588. if (i) {
  21589. var r = i.getIndicatorAxes();
  21590. E(r, (function (t, o) {
  21591. e.each(e.mapDimension(r[o].dim), (function (t, e) {
  21592. n[e] = n[e] || [];
  21593. var r = i.dataToPoint(t, o);
  21594. n[e][o] = kI(r) ? r : LI(i)
  21595. }))
  21596. })), e.each((function (t) {
  21597. var r = F(n[t], (function (t) {
  21598. return kI(t)
  21599. })) || LI(i);
  21600. n[t].push(r.slice()), e.setItemLayout(t, n[t])
  21601. }))
  21602. }
  21603. }))
  21604. }
  21605. function kI(t) {
  21606. return !isNaN(t[0]) && !isNaN(t[1])
  21607. }
  21608. function LI(t) {
  21609. return [t.cx, t.cy]
  21610. }
  21611. function PI(t) {
  21612. var e = t.polar;
  21613. if (e) {
  21614. Y(e) || (e = [e]);
  21615. var n = [];
  21616. E(e, (function (e, i) {
  21617. e.indicator ? (e.type && !e.shape && (e.shape = e.type), t.radar = t.radar || [], Y(t.radar) || (t.radar = [t.radar]), t.radar.push(e)) : n.push(e)
  21618. })), t.polar = n
  21619. }
  21620. E(t.series, (function (t) {
  21621. t && "radar" === t.type && t.polarIndex && (t.radarIndex = t.polarIndex)
  21622. }))
  21623. }
  21624. var OI = function (t) {
  21625. function e() {
  21626. var n = null !== t && t.apply(this, arguments) || this;
  21627. return n.type = e.type, n
  21628. }
  21629. return n(e, t), e.prototype.render = function (t, e, n) {
  21630. var i = t.coordinateSystem,
  21631. r = this.group,
  21632. o = t.getData(),
  21633. a = this._data;
  21634. function s(t, e) {
  21635. var n = t.getItemVisual(e, "symbol") || "circle";
  21636. if ("none" !== n) {
  21637. var i = Hy(t.getItemVisual(e, "symbolSize")),
  21638. r = Wy(n, -1, -1, 2, 2),
  21639. o = t.getItemVisual(e, "symbolRotate") || 0;
  21640. return r.attr({
  21641. style: {
  21642. strokeNoScale: !0
  21643. },
  21644. z2: 100,
  21645. scaleX: i[0] / 2,
  21646. scaleY: i[1] / 2,
  21647. rotation: o * Math.PI / 180 || 0
  21648. }), r
  21649. }
  21650. }
  21651. function l(e, n, i, r, o, a) {
  21652. i.removeAll();
  21653. for (var l = 0; l < n.length - 1; l++) {
  21654. var u = s(r, o);
  21655. u && (u.__dimIdx = l, e[l] ? (u.setPosition(e[l]), Kh[a ? "initProps" : "updateProps"](u, {
  21656. x: n[l][0],
  21657. y: n[l][1]
  21658. }, t, o)) : u.setPosition(n[l]), i.add(u))
  21659. }
  21660. }
  21661. function u(t) {
  21662. return z(t, (function (t) {
  21663. return [i.cx, i.cy]
  21664. }))
  21665. }
  21666. o.diff(a).add((function (e) {
  21667. var n = o.getItemLayout(e);
  21668. if (n) {
  21669. var i = new Wu,
  21670. r = new Yu,
  21671. a = {
  21672. shape: {
  21673. points: n
  21674. }
  21675. };
  21676. i.shape.points = u(n), r.shape.points = u(n), gh(i, a, t, e), gh(r, a, t, e);
  21677. var s = new zr,
  21678. h = new zr;
  21679. s.add(r), s.add(i), s.add(h), l(r.shape.points, n, h, o, e, !0), o.setItemGraphicEl(e, s)
  21680. }
  21681. })).update((function (e, n) {
  21682. var i = a.getItemGraphicEl(n),
  21683. r = i.childAt(0),
  21684. s = i.childAt(1),
  21685. u = i.childAt(2),
  21686. h = {
  21687. shape: {
  21688. points: o.getItemLayout(e)
  21689. }
  21690. };
  21691. h.shape.points && (l(r.shape.points, h.shape.points, u, o, e, !1), _h(s), _h(r), fh(r, h, t), fh(s, h, t), o.setItemGraphicEl(e, i))
  21692. })).remove((function (t) {
  21693. r.remove(a.getItemGraphicEl(t))
  21694. })).execute(), o.eachItemGraphicEl((function (t, e) {
  21695. var n = o.getItemModel(e),
  21696. i = t.childAt(0),
  21697. a = t.childAt(1),
  21698. s = t.childAt(2),
  21699. l = o.getItemVisual(e, "style"),
  21700. u = l.fill;
  21701. r.add(t), i.useStyle(k(n.getModel("lineStyle").getLineStyle(), {
  21702. fill: "none",
  21703. stroke: u
  21704. })), jl(i, n, "lineStyle"), jl(a, n, "areaStyle");
  21705. var h = n.getModel("areaStyle"),
  21706. c = h.isEmpty() && h.parentModel.isEmpty();
  21707. a.ignore = c, E(["emphasis", "select", "blur"], (function (t) {
  21708. var e = n.getModel([t, "areaStyle"]),
  21709. i = e.isEmpty() && e.parentModel.isEmpty();
  21710. a.ensureState(t).ignore = i && c
  21711. })), a.useStyle(k(h.getAreaStyle(), {
  21712. fill: u,
  21713. opacity: .7,
  21714. decal: l.decal
  21715. }));
  21716. var p = n.getModel("emphasis"),
  21717. d = p.getModel("itemStyle").getItemStyle();
  21718. s.eachChild((function (t) {
  21719. if (t instanceof ks) {
  21720. var i = t.style;
  21721. t.useStyle(A({
  21722. image: i.image,
  21723. x: i.x,
  21724. y: i.y,
  21725. width: i.width,
  21726. height: i.height
  21727. }, l))
  21728. } else t.useStyle(l), t.setColor(u), t.style.strokeNoScale = !0;
  21729. t.ensureState("emphasis").style = T(d);
  21730. var r = o.getStore().get(o.getDimensionIndex(t.__dimIdx), e);
  21731. (null == r || isNaN(r)) && (r = ""), tc(t, ec(n), {
  21732. labelFetcher: o.hostModel,
  21733. labelDataIndex: e,
  21734. labelDimIndex: t.__dimIdx,
  21735. defaultText: r,
  21736. inheritColor: u,
  21737. defaultOpacity: l.opacity
  21738. })
  21739. })), Yl(t, p.get("focus"), p.get("blurScope"), p.get("disabled"))
  21740. })), this._data = o
  21741. }, e.prototype.remove = function () {
  21742. this.group.removeAll(), this._data = null
  21743. }, e.type = "radar", e
  21744. }(kg),
  21745. RI = function (t) {
  21746. function e() {
  21747. var n = null !== t && t.apply(this, arguments) || this;
  21748. return n.type = e.type, n.hasSymbolVisual = !0, n
  21749. }
  21750. return n(e, t), e.prototype.init = function (e) {
  21751. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new IM(W(this.getData, this), W(this.getRawData, this))
  21752. }, e.prototype.getInitialData = function (t, e) {
  21753. return MM(this, {
  21754. generateCoord: "indicator_",
  21755. generateCoordCount: 1 / 0
  21756. })
  21757. }, e.prototype.formatTooltip = function (t, e, n) {
  21758. var i = this.getData(),
  21759. r = this.coordinateSystem.getIndicatorAxes(),
  21760. o = this.getData().getName(t),
  21761. a = "" === o ? this.name : o,
  21762. s = cg(this, t);
  21763. return ng("section", {
  21764. header: a,
  21765. sortBlocks: !0,
  21766. blocks: z(r, (function (e) {
  21767. var n = i.get(i.mapDimension(e.dim), t);
  21768. return ng("nameValue", {
  21769. markerType: "subItem",
  21770. markerColor: s,
  21771. name: e.name,
  21772. value: n,
  21773. sortParam: n
  21774. })
  21775. }))
  21776. })
  21777. }, e.prototype.getTooltipPosition = function (t) {
  21778. if (null != t)
  21779. for (var e = this.getData(), n = this.coordinateSystem, i = e.getValues(z(n.dimensions, (function (t) {
  21780. return e.mapDimension(t)
  21781. })), t), r = 0, o = i.length; r < o; r++)
  21782. if (!isNaN(i[r])) {
  21783. var a = n.getIndicatorAxes();
  21784. return n.coordToPoint(a[r].dataToCoord(i[r]), r)
  21785. }
  21786. }, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = {
  21787. z: 2,
  21788. colorBy: "data",
  21789. coordinateSystem: "radar",
  21790. legendHoverLink: !0,
  21791. radarIndex: 0,
  21792. lineStyle: {
  21793. width: 2,
  21794. type: "solid",
  21795. join: "round"
  21796. },
  21797. label: {
  21798. position: "top"
  21799. },
  21800. symbolSize: 8
  21801. }, e
  21802. }(mg),
  21803. NI = VM.value;
  21804. function EI(t, e) {
  21805. return k({
  21806. show: e
  21807. }, t)
  21808. }
  21809. var zI = function (t) {
  21810. function e() {
  21811. var n = null !== t && t.apply(this, arguments) || this;
  21812. return n.type = e.type, n
  21813. }
  21814. return n(e, t), e.prototype.optionUpdated = function () {
  21815. var t = this.get("boundaryGap"),
  21816. e = this.get("splitNumber"),
  21817. n = this.get("scale"),
  21818. i = this.get("axisLine"),
  21819. r = this.get("axisTick"),
  21820. o = this.get("axisLabel"),
  21821. a = this.get("axisName"),
  21822. s = this.get(["axisName", "show"]),
  21823. l = this.get(["axisName", "formatter"]),
  21824. u = this.get("axisNameGap"),
  21825. h = this.get("triggerEvent"),
  21826. c = z(this.get("indicator") || [], (function (c) {
  21827. null != c.max && c.max > 0 && !c.min ? c.min = 0 : null != c.min && c.min < 0 && !c.max && (c.max = 0);
  21828. var p = a;
  21829. null != c.color && (p = k({
  21830. color: c.color
  21831. }, a));
  21832. var d = C(T(c), {
  21833. boundaryGap: t,
  21834. splitNumber: e,
  21835. scale: n,
  21836. axisLine: i,
  21837. axisTick: r,
  21838. axisLabel: o,
  21839. name: c.text,
  21840. showName: s,
  21841. nameLocation: "end",
  21842. nameGap: u,
  21843. nameTextStyle: p,
  21844. triggerEvent: h
  21845. }, !1);
  21846. if (U(l)) {
  21847. var f = d.name;
  21848. d.name = l.replace("{value}", null != f ? f : "")
  21849. } else X(l) && (d.name = l(d.name, d));
  21850. var g = new Mc(d, null, this.ecModel);
  21851. return R(g, I_.prototype), g.mainType = "radar", g.componentIndex = this.componentIndex, g
  21852. }), this);
  21853. this._indicatorModels = c
  21854. }, e.prototype.getIndicatorModels = function () {
  21855. return this._indicatorModels
  21856. }, e.type = "radar", e.defaultOption = {
  21857. z: 0,
  21858. center: ["50%", "50%"],
  21859. radius: "75%",
  21860. startAngle: 90,
  21861. axisName: {
  21862. show: !0
  21863. },
  21864. boundaryGap: [0, 0],
  21865. splitNumber: 5,
  21866. axisNameGap: 15,
  21867. scale: !1,
  21868. shape: "polygon",
  21869. axisLine: C({
  21870. lineStyle: {
  21871. color: "#bbb"
  21872. }
  21873. }, NI.axisLine),
  21874. axisLabel: EI(NI.axisLabel, !1),
  21875. axisTick: EI(NI.axisTick, !1),
  21876. splitLine: EI(NI.splitLine, !0),
  21877. splitArea: EI(NI.splitArea, !0),
  21878. indicator: []
  21879. }, e
  21880. }(Rp),
  21881. VI = ["axisLine", "axisTickLabel", "axisName"],
  21882. BI = function (t) {
  21883. function e() {
  21884. var n = null !== t && t.apply(this, arguments) || this;
  21885. return n.type = e.type, n
  21886. }
  21887. return n(e, t), e.prototype.render = function (t, e, n) {
  21888. this.group.removeAll(), this._buildAxes(t), this._buildSplitLineAndArea(t)
  21889. }, e.prototype._buildAxes = function (t) {
  21890. var e = t.coordinateSystem;
  21891. E(z(e.getIndicatorAxes(), (function (t) {
  21892. var n = t.model.get("showName") ? t.name : "";
  21893. return new iI(t.model, {
  21894. axisName: n,
  21895. position: [e.cx, e.cy],
  21896. rotation: t.angle,
  21897. labelDirection: -1,
  21898. tickDirection: -1,
  21899. nameDirection: 1
  21900. })
  21901. })), (function (t) {
  21902. E(VI, t.add, t), this.group.add(t.getGroup())
  21903. }), this)
  21904. }, e.prototype._buildSplitLineAndArea = function (t) {
  21905. var e = t.coordinateSystem,
  21906. n = e.getIndicatorAxes();
  21907. if (n.length) {
  21908. var i = t.get("shape"),
  21909. r = t.getModel("splitLine"),
  21910. o = t.getModel("splitArea"),
  21911. a = r.getModel("lineStyle"),
  21912. s = o.getModel("areaStyle"),
  21913. l = r.get("show"),
  21914. u = o.get("show"),
  21915. h = a.get("color"),
  21916. c = s.get("color"),
  21917. p = Y(h) ? h : [h],
  21918. d = Y(c) ? c : [c],
  21919. f = [],
  21920. g = [];
  21921. if ("circle" === i)
  21922. for (var y = n[0].getTicksCoords(), v = e.cx, m = e.cy, x = 0; x < y.length; x++) {
  21923. if (l) f[C(f, p, x)].push(new _u({
  21924. shape: {
  21925. cx: v,
  21926. cy: m,
  21927. r: y[x].coord
  21928. }
  21929. }));
  21930. if (u && x < y.length - 1) g[C(g, d, x)].push(new Bu({
  21931. shape: {
  21932. cx: v,
  21933. cy: m,
  21934. r0: y[x].coord,
  21935. r: y[x + 1].coord
  21936. }
  21937. }))
  21938. } else {
  21939. var _, b = z(n, (function (t, n) {
  21940. var i = t.getTicksCoords();
  21941. return _ = null == _ ? i.length - 1 : Math.min(i.length - 1, _), z(i, (function (t) {
  21942. return e.coordToPoint(t.coord, n)
  21943. }))
  21944. })),
  21945. w = [];
  21946. for (x = 0; x <= _; x++) {
  21947. for (var S = [], M = 0; M < n.length; M++) S.push(b[M][x]);
  21948. if (S[0] && S.push(S[0].slice()), l) f[C(f, p, x)].push(new Yu({
  21949. shape: {
  21950. points: S
  21951. }
  21952. }));
  21953. if (u && w) g[C(g, d, x - 1)].push(new Wu({
  21954. shape: {
  21955. points: S.concat(w)
  21956. }
  21957. }));
  21958. w = S.slice().reverse()
  21959. }
  21960. }
  21961. var I = a.getLineStyle(),
  21962. T = s.getAreaStyle();
  21963. E(g, (function (t, e) {
  21964. this.group.add(Ph(t, {
  21965. style: k({
  21966. stroke: "none",
  21967. fill: d[e % d.length]
  21968. }, T),
  21969. silent: !0
  21970. }))
  21971. }), this), E(f, (function (t, e) {
  21972. this.group.add(Ph(t, {
  21973. style: k({
  21974. fill: "none",
  21975. stroke: p[e % p.length]
  21976. }, I),
  21977. silent: !0
  21978. }))
  21979. }), this)
  21980. }
  21981. function C(t, e, n) {
  21982. var i = n % e.length;
  21983. return t[i] = t[i] || [], i
  21984. }
  21985. }, e.type = "radar", e
  21986. }(Tg),
  21987. FI = function (t) {
  21988. function e(e, n, i) {
  21989. var r = t.call(this, e, n, i) || this;
  21990. return r.type = "value", r.angle = 0, r.name = "", r
  21991. }
  21992. return n(e, t), e
  21993. }(nb),
  21994. GI = function () {
  21995. function t(t, e, n) {
  21996. this.dimensions = [], this._model = t, this._indicatorAxes = z(t.getIndicatorModels(), (function (t, e) {
  21997. var n = "indicator_" + e,
  21998. i = new FI(n, new Ox);
  21999. return i.name = t.get("name"), i.model = t, t.axis = i, this.dimensions.push(n), i
  22000. }), this), this.resize(t, n)
  22001. }
  22002. return t.prototype.getIndicatorAxes = function () {
  22003. return this._indicatorAxes
  22004. }, t.prototype.dataToPoint = function (t, e) {
  22005. var n = this._indicatorAxes[e];
  22006. return this.coordToPoint(n.dataToCoord(t), e)
  22007. }, t.prototype.coordToPoint = function (t, e) {
  22008. var n = this._indicatorAxes[e].angle;
  22009. return [this.cx + t * Math.cos(n), this.cy - t * Math.sin(n)]
  22010. }, t.prototype.pointToData = function (t) {
  22011. var e = t[0] - this.cx,
  22012. n = t[1] - this.cy,
  22013. i = Math.sqrt(e * e + n * n);
  22014. e /= i, n /= i;
  22015. for (var r, o = Math.atan2(-n, e), a = 1 / 0, s = -1, l = 0; l < this._indicatorAxes.length; l++) {
  22016. var u = this._indicatorAxes[l],
  22017. h = Math.abs(o - u.angle);
  22018. h < a && (r = u, s = l, a = h)
  22019. }
  22020. return [s, +(r && r.coordToData(i))]
  22021. }, t.prototype.resize = function (t, e) {
  22022. var n = t.get("center"),
  22023. i = e.getWidth(),
  22024. r = e.getHeight(),
  22025. o = Math.min(i, r) / 2;
  22026. this.cx = Ur(n[0], i), this.cy = Ur(n[1], r), this.startAngle = t.get("startAngle") * Math.PI / 180;
  22027. var a = t.get("radius");
  22028. (U(a) || j(a)) && (a = [0, a]), this.r0 = Ur(a[0], o), this.r = Ur(a[1], o), E(this._indicatorAxes, (function (t, e) {
  22029. t.setExtent(this.r0, this.r);
  22030. var n = this.startAngle + e * Math.PI * 2 / this._indicatorAxes.length;
  22031. n = Math.atan2(Math.sin(n), Math.cos(n)), t.angle = n
  22032. }), this)
  22033. }, t.prototype.update = function (t, e) {
  22034. var n = this._indicatorAxes,
  22035. i = this._model;
  22036. E(n, (function (t) {
  22037. t.scale.setExtent(1 / 0, -1 / 0)
  22038. })), t.eachSeriesByType("radar", (function (e, r) {
  22039. if ("radar" === e.get("coordinateSystem") && t.getComponent("radar", e.get("radarIndex")) === i) {
  22040. var o = e.getData();
  22041. E(n, (function (t) {
  22042. t.scale.unionExtentFromData(o, o.mapDimension(t.dim))
  22043. }))
  22044. }
  22045. }), this);
  22046. var r = i.get("splitNumber"),
  22047. o = new Ox;
  22048. o.setExtent(0, r), o.setInterval(1), E(n, (function (t, e) {
  22049. $M(t.scale, t.model, o)
  22050. }))
  22051. }, t.prototype.convertToPixel = function (t, e, n) {
  22052. return console.warn("Not implemented."), null
  22053. }, t.prototype.convertFromPixel = function (t, e, n) {
  22054. return console.warn("Not implemented."), null
  22055. }, t.prototype.containPoint = function (t) {
  22056. return console.warn("Not implemented."), !1
  22057. }, t.create = function (e, n) {
  22058. var i = [];
  22059. return e.eachComponent("radar", (function (r) {
  22060. var o = new t(r, e, n);
  22061. i.push(o), r.coordinateSystem = o
  22062. })), e.eachSeriesByType("radar", (function (t) {
  22063. "radar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("radarIndex") || 0])
  22064. })), i
  22065. }, t.dimensions = [], t
  22066. }();
  22067. function WI(t) {
  22068. t.registerCoordinateSystem("radar", GI), t.registerComponentModel(zI), t.registerComponentView(BI), t.registerVisual({
  22069. seriesType: "radar",
  22070. reset: function (t) {
  22071. var e = t.getData();
  22072. e.each((function (t) {
  22073. e.setItemVisual(t, "legendIcon", "roundRect")
  22074. })), e.setVisual("legendIcon", "roundRect")
  22075. }
  22076. })
  22077. }
  22078. var HI = "\0_ec_interaction_mutex";
  22079. function YI(t, e) {
  22080. return !!XI(t)[e]
  22081. }
  22082. function XI(t) {
  22083. return t[HI] || (t[HI] = {})
  22084. }
  22085. Mm({
  22086. type: "takeGlobalCursor",
  22087. event: "globalCursorTaken",
  22088. update: "update"
  22089. }, bt);
  22090. var UI = function (t) {
  22091. function e(e) {
  22092. var n = t.call(this) || this;
  22093. n._zr = e;
  22094. var i = W(n._mousedownHandler, n),
  22095. r = W(n._mousemoveHandler, n),
  22096. o = W(n._mouseupHandler, n),
  22097. a = W(n._mousewheelHandler, n),
  22098. s = W(n._pinchHandler, n);
  22099. return n.enable = function (t, n) {
  22100. this.disable(), this._opt = k(T(n) || {}, {
  22101. zoomOnMouseWheel: !0,
  22102. moveOnMouseMove: !0,
  22103. moveOnMouseWheel: !1,
  22104. preventDefaultMouseMove: !0
  22105. }), null == t && (t = !0), !0 !== t && "move" !== t && "pan" !== t || (e.on("mousedown", i), e.on("mousemove", r), e.on("mouseup", o)), !0 !== t && "scale" !== t && "zoom" !== t || (e.on("mousewheel", a), e.on("pinch", s))
  22106. }, n.disable = function () {
  22107. e.off("mousedown", i), e.off("mousemove", r), e.off("mouseup", o), e.off("mousewheel", a), e.off("pinch", s)
  22108. }, n
  22109. }
  22110. return n(e, t), e.prototype.isDragging = function () {
  22111. return this._dragging
  22112. }, e.prototype.isPinching = function () {
  22113. return this._pinching
  22114. }, e.prototype.setPointerChecker = function (t) {
  22115. this.pointerChecker = t
  22116. }, e.prototype.dispose = function () {
  22117. this.disable()
  22118. }, e.prototype._mousedownHandler = function (t) {
  22119. if (!fe(t)) {
  22120. for (var e = t.target; e;) {
  22121. if (e.draggable) return;
  22122. e = e.__hostTarget || e.parent
  22123. }
  22124. var n = t.offsetX,
  22125. i = t.offsetY;
  22126. this.pointerChecker && this.pointerChecker(t, n, i) && (this._x = n, this._y = i, this._dragging = !0)
  22127. }
  22128. }, e.prototype._mousemoveHandler = function (t) {
  22129. if (this._dragging && qI("moveOnMouseMove", t, this._opt) && "pinch" !== t.gestureEvent && !YI(this._zr, "globalPan")) {
  22130. var e = t.offsetX,
  22131. n = t.offsetY,
  22132. i = this._x,
  22133. r = this._y,
  22134. o = e - i,
  22135. a = n - r;
  22136. this._x = e, this._y = n, this._opt.preventDefaultMouseMove && de(t.event), jI(this, "pan", "moveOnMouseMove", t, {
  22137. dx: o,
  22138. dy: a,
  22139. oldX: i,
  22140. oldY: r,
  22141. newX: e,
  22142. newY: n,
  22143. isAvailableBehavior: null
  22144. })
  22145. }
  22146. }, e.prototype._mouseupHandler = function (t) {
  22147. fe(t) || (this._dragging = !1)
  22148. }, e.prototype._mousewheelHandler = function (t) {
  22149. var e = qI("zoomOnMouseWheel", t, this._opt),
  22150. n = qI("moveOnMouseWheel", t, this._opt),
  22151. i = t.wheelDelta,
  22152. r = Math.abs(i),
  22153. o = t.offsetX,
  22154. a = t.offsetY;
  22155. if (0 !== i && (e || n)) {
  22156. if (e) {
  22157. var s = r > 3 ? 1.4 : r > 1 ? 1.2 : 1.1;
  22158. ZI(this, "zoom", "zoomOnMouseWheel", t, {
  22159. scale: i > 0 ? s : 1 / s,
  22160. originX: o,
  22161. originY: a,
  22162. isAvailableBehavior: null
  22163. })
  22164. }
  22165. if (n) {
  22166. var l = Math.abs(i);
  22167. ZI(this, "scrollMove", "moveOnMouseWheel", t, {
  22168. scrollDelta: (i > 0 ? 1 : -1) * (l > 3 ? .4 : l > 1 ? .15 : .05),
  22169. originX: o,
  22170. originY: a,
  22171. isAvailableBehavior: null
  22172. })
  22173. }
  22174. }
  22175. }, e.prototype._pinchHandler = function (t) {
  22176. YI(this._zr, "globalPan") || ZI(this, "zoom", null, t, {
  22177. scale: t.pinchScale > 1 ? 1.1 : 1 / 1.1,
  22178. originX: t.pinchX,
  22179. originY: t.pinchY,
  22180. isAvailableBehavior: null
  22181. })
  22182. }, e
  22183. }(jt);
  22184. function ZI(t, e, n, i, r) {
  22185. t.pointerChecker && t.pointerChecker(i, r.originX, r.originY) && (de(i.event), jI(t, e, n, i, r))
  22186. }
  22187. function jI(t, e, n, i, r) {
  22188. r.isAvailableBehavior = W(qI, null, n, i), t.trigger(e, r)
  22189. }
  22190. function qI(t, e, n) {
  22191. var i = n[t];
  22192. return !t || i && (!U(i) || e.event[i + "Key"])
  22193. }
  22194. function KI(t, e, n) {
  22195. var i = t.target;
  22196. i.x += e, i.y += n, i.dirty()
  22197. }
  22198. function $I(t, e, n, i) {
  22199. var r = t.target,
  22200. o = t.zoomLimit,
  22201. a = t.zoom = t.zoom || 1;
  22202. if (a *= e, o) {
  22203. var s = o.min || 0,
  22204. l = o.max || 1 / 0;
  22205. a = Math.max(Math.min(l, a), s)
  22206. }
  22207. var u = a / t.zoom;
  22208. t.zoom = a, r.x -= (n - r.x) * (u - 1), r.y -= (i - r.y) * (u - 1), r.scaleX *= u, r.scaleY *= u, r.dirty()
  22209. }
  22210. var JI, QI = {
  22211. axisPointer: 1,
  22212. tooltip: 1,
  22213. brush: 1
  22214. };
  22215. function tT(t, e, n) {
  22216. var i = e.getComponentByElement(t.topTarget),
  22217. r = i && i.coordinateSystem;
  22218. return i && i !== n && !QI.hasOwnProperty(i.mainType) && r && r.model !== n
  22219. }
  22220. function eT(t) {
  22221. U(t) && (t = (new DOMParser).parseFromString(t, "text/xml"));
  22222. var e = t;
  22223. for (9 === e.nodeType && (e = e.firstChild);
  22224. "svg" !== e.nodeName.toLowerCase() || 1 !== e.nodeType;) e = e.nextSibling;
  22225. return e
  22226. }
  22227. var nT = {
  22228. fill: "fill",
  22229. stroke: "stroke",
  22230. "stroke-width": "lineWidth",
  22231. opacity: "opacity",
  22232. "fill-opacity": "fillOpacity",
  22233. "stroke-opacity": "strokeOpacity",
  22234. "stroke-dasharray": "lineDash",
  22235. "stroke-dashoffset": "lineDashOffset",
  22236. "stroke-linecap": "lineCap",
  22237. "stroke-linejoin": "lineJoin",
  22238. "stroke-miterlimit": "miterLimit",
  22239. "font-family": "fontFamily",
  22240. "font-size": "fontSize",
  22241. "font-style": "fontStyle",
  22242. "font-weight": "fontWeight",
  22243. "text-anchor": "textAlign",
  22244. visibility: "visibility",
  22245. display: "display"
  22246. },
  22247. iT = G(nT),
  22248. rT = {
  22249. "alignment-baseline": "textBaseline",
  22250. "stop-color": "stopColor"
  22251. },
  22252. oT = G(rT),
  22253. aT = function () {
  22254. function t() {
  22255. this._defs = {}, this._root = null
  22256. }
  22257. return t.prototype.parse = function (t, e) {
  22258. e = e || {};
  22259. var n = eT(t);
  22260. this._defsUsePending = [];
  22261. var i = new zr;
  22262. this._root = i;
  22263. var r = [],
  22264. o = n.getAttribute("viewBox") || "",
  22265. a = parseFloat(n.getAttribute("width") || e.width),
  22266. s = parseFloat(n.getAttribute("height") || e.height);
  22267. isNaN(a) && (a = null), isNaN(s) && (s = null), pT(n, i, null, !0, !1);
  22268. for (var l, u, h = n.firstChild; h;) this._parseNode(h, i, r, null, !1, !1), h = h.nextSibling;
  22269. if (function (t, e) {
  22270. for (var n = 0; n < e.length; n++) {
  22271. var i = e[n];
  22272. i[0].style[i[1]] = t[i[2]]
  22273. }
  22274. }(this._defs, this._defsUsePending), this._defsUsePending = [], o) {
  22275. var c = yT(o);
  22276. c.length >= 4 && (l = {
  22277. x: parseFloat(c[0] || 0),
  22278. y: parseFloat(c[1] || 0),
  22279. width: parseFloat(c[2]),
  22280. height: parseFloat(c[3])
  22281. })
  22282. }
  22283. if (l && null != a && null != s && (u = bT(l, {
  22284. x: 0,
  22285. y: 0,
  22286. width: a,
  22287. height: s
  22288. }), !e.ignoreViewBox)) {
  22289. var p = i;
  22290. (i = new zr).add(p), p.scaleX = p.scaleY = u.scale, p.x = u.x, p.y = u.y
  22291. }
  22292. return e.ignoreRootClip || null == a || null == s || i.setClipPath(new zs({
  22293. shape: {
  22294. x: 0,
  22295. y: 0,
  22296. width: a,
  22297. height: s
  22298. }
  22299. })), {
  22300. root: i,
  22301. width: a,
  22302. height: s,
  22303. viewBoxRect: l,
  22304. viewBoxTransform: u,
  22305. named: r
  22306. }
  22307. }, t.prototype._parseNode = function (t, e, n, i, r, o) {
  22308. var a, s = t.nodeName.toLowerCase(),
  22309. l = i;
  22310. if ("defs" === s && (r = !0), "text" === s && (o = !0), "defs" === s || "switch" === s) a = e;
  22311. else {
  22312. if (!r) {
  22313. var u = JI[s];
  22314. if (u && _t(JI, s)) {
  22315. a = u.call(this, t, e);
  22316. var h = t.getAttribute("name");
  22317. if (h) {
  22318. var c = {
  22319. name: h,
  22320. namedFrom: null,
  22321. svgNodeTagLower: s,
  22322. el: a
  22323. };
  22324. n.push(c), "g" === s && (l = c)
  22325. } else i && n.push({
  22326. name: i.name,
  22327. namedFrom: i,
  22328. svgNodeTagLower: s,
  22329. el: a
  22330. });
  22331. e.add(a)
  22332. }
  22333. }
  22334. var p = sT[s];
  22335. if (p && _t(sT, s)) {
  22336. var d = p.call(this, t),
  22337. f = t.getAttribute("id");
  22338. f && (this._defs[f] = d)
  22339. }
  22340. }
  22341. if (a && a.isGroup)
  22342. for (var g = t.firstChild; g;) 1 === g.nodeType ? this._parseNode(g, a, n, l, r, o) : 3 === g.nodeType && o && this._parseText(g, a), g = g.nextSibling
  22343. }, t.prototype._parseText = function (t, e) {
  22344. var n = new Cs({
  22345. style: {
  22346. text: t.textContent
  22347. },
  22348. silent: !0,
  22349. x: this._textX || 0,
  22350. y: this._textY || 0
  22351. });
  22352. hT(e, n), pT(t, n, this._defsUsePending, !1, !1),
  22353. function (t, e) {
  22354. var n = e.__selfStyle;
  22355. if (n) {
  22356. var i = n.textBaseline,
  22357. r = i;
  22358. i && "auto" !== i ? "baseline" === i ? r = "alphabetic" : "before-edge" === i || "text-before-edge" === i ? r = "top" : "after-edge" === i || "text-after-edge" === i ? r = "bottom" : "central" !== i && "mathematical" !== i || (r = "middle") : r = "alphabetic", t.style.textBaseline = r
  22359. }
  22360. var o = e.__inheritedStyle;
  22361. if (o) {
  22362. var a = o.textAlign,
  22363. s = a;
  22364. a && ("middle" === a && (s = "center"), t.style.textAlign = s)
  22365. }
  22366. }(n, e);
  22367. var i = n.style,
  22368. r = i.fontSize;
  22369. r && r < 9 && (i.fontSize = 9, n.scaleX *= r / 9, n.scaleY *= r / 9);
  22370. var o = (i.fontSize || i.fontFamily) && [i.fontStyle, i.fontWeight, (i.fontSize || 12) + "px", i.fontFamily || "sans-serif"].join(" ");
  22371. i.font = o;
  22372. var a = n.getBoundingRect();
  22373. return this._textX += a.width, e.add(n), n
  22374. }, t.internalField = void(JI = {
  22375. g: function (t, e) {
  22376. var n = new zr;
  22377. return hT(e, n), pT(t, n, this._defsUsePending, !1, !1), n
  22378. },
  22379. rect: function (t, e) {
  22380. var n = new zs;
  22381. return hT(e, n), pT(t, n, this._defsUsePending, !1, !1), n.setShape({
  22382. x: parseFloat(t.getAttribute("x") || "0"),
  22383. y: parseFloat(t.getAttribute("y") || "0"),
  22384. width: parseFloat(t.getAttribute("width") || "0"),
  22385. height: parseFloat(t.getAttribute("height") || "0")
  22386. }), n.silent = !0, n
  22387. },
  22388. circle: function (t, e) {
  22389. var n = new _u;
  22390. return hT(e, n), pT(t, n, this._defsUsePending, !1, !1), n.setShape({
  22391. cx: parseFloat(t.getAttribute("cx") || "0"),
  22392. cy: parseFloat(t.getAttribute("cy") || "0"),
  22393. r: parseFloat(t.getAttribute("r") || "0")
  22394. }), n.silent = !0, n
  22395. },
  22396. line: function (t, e) {
  22397. var n = new Zu;
  22398. return hT(e, n), pT(t, n, this._defsUsePending, !1, !1), n.setShape({
  22399. x1: parseFloat(t.getAttribute("x1") || "0"),
  22400. y1: parseFloat(t.getAttribute("y1") || "0"),
  22401. x2: parseFloat(t.getAttribute("x2") || "0"),
  22402. y2: parseFloat(t.getAttribute("y2") || "0")
  22403. }), n.silent = !0, n
  22404. },
  22405. ellipse: function (t, e) {
  22406. var n = new wu;
  22407. return hT(e, n), pT(t, n, this._defsUsePending, !1, !1), n.setShape({
  22408. cx: parseFloat(t.getAttribute("cx") || "0"),
  22409. cy: parseFloat(t.getAttribute("cy") || "0"),
  22410. rx: parseFloat(t.getAttribute("rx") || "0"),
  22411. ry: parseFloat(t.getAttribute("ry") || "0")
  22412. }), n.silent = !0, n
  22413. },
  22414. polygon: function (t, e) {
  22415. var n, i = t.getAttribute("points");
  22416. i && (n = cT(i));
  22417. var r = new Wu({
  22418. shape: {
  22419. points: n || []
  22420. },
  22421. silent: !0
  22422. });
  22423. return hT(e, r), pT(t, r, this._defsUsePending, !1, !1), r
  22424. },
  22425. polyline: function (t, e) {
  22426. var n, i = t.getAttribute("points");
  22427. i && (n = cT(i));
  22428. var r = new Yu({
  22429. shape: {
  22430. points: n || []
  22431. },
  22432. silent: !0
  22433. });
  22434. return hT(e, r), pT(t, r, this._defsUsePending, !1, !1), r
  22435. },
  22436. image: function (t, e) {
  22437. var n = new ks;
  22438. return hT(e, n), pT(t, n, this._defsUsePending, !1, !1), n.setStyle({
  22439. image: t.getAttribute("xlink:href") || t.getAttribute("href"),
  22440. x: +t.getAttribute("x"),
  22441. y: +t.getAttribute("y"),
  22442. width: +t.getAttribute("width"),
  22443. height: +t.getAttribute("height")
  22444. }), n.silent = !0, n
  22445. },
  22446. text: function (t, e) {
  22447. var n = t.getAttribute("x") || "0",
  22448. i = t.getAttribute("y") || "0",
  22449. r = t.getAttribute("dx") || "0",
  22450. o = t.getAttribute("dy") || "0";
  22451. this._textX = parseFloat(n) + parseFloat(r), this._textY = parseFloat(i) + parseFloat(o);
  22452. var a = new zr;
  22453. return hT(e, a), pT(t, a, this._defsUsePending, !1, !0), a
  22454. },
  22455. tspan: function (t, e) {
  22456. var n = t.getAttribute("x"),
  22457. i = t.getAttribute("y");
  22458. null != n && (this._textX = parseFloat(n)), null != i && (this._textY = parseFloat(i));
  22459. var r = t.getAttribute("dx") || "0",
  22460. o = t.getAttribute("dy") || "0",
  22461. a = new zr;
  22462. return hT(e, a), pT(t, a, this._defsUsePending, !1, !0), this._textX += parseFloat(r), this._textY += parseFloat(o), a
  22463. },
  22464. path: function (t, e) {
  22465. var n = vu(t.getAttribute("d") || "");
  22466. return hT(e, n), pT(t, n, this._defsUsePending, !1, !1), n.silent = !0, n
  22467. }
  22468. }), t
  22469. }(),
  22470. sT = {
  22471. lineargradient: function (t) {
  22472. var e = parseInt(t.getAttribute("x1") || "0", 10),
  22473. n = parseInt(t.getAttribute("y1") || "0", 10),
  22474. i = parseInt(t.getAttribute("x2") || "10", 10),
  22475. r = parseInt(t.getAttribute("y2") || "0", 10),
  22476. o = new nh(e, n, i, r);
  22477. return lT(t, o), uT(t, o), o
  22478. },
  22479. radialgradient: function (t) {
  22480. var e = parseInt(t.getAttribute("cx") || "0", 10),
  22481. n = parseInt(t.getAttribute("cy") || "0", 10),
  22482. i = parseInt(t.getAttribute("r") || "0", 10),
  22483. r = new ih(e, n, i);
  22484. return lT(t, r), uT(t, r), r
  22485. }
  22486. };
  22487. function lT(t, e) {
  22488. "userSpaceOnUse" === t.getAttribute("gradientUnits") && (e.global = !0)
  22489. }
  22490. function uT(t, e) {
  22491. for (var n = t.firstChild; n;) {
  22492. if (1 === n.nodeType && "stop" === n.nodeName.toLocaleLowerCase()) {
  22493. var i = n.getAttribute("offset"),
  22494. r = void 0;
  22495. r = i && i.indexOf("%") > 0 ? parseInt(i, 10) / 100 : i ? parseFloat(i) : 0;
  22496. var o = {};
  22497. _T(n, o, o);
  22498. var a = o.stopColor || n.getAttribute("stop-color") || "#000000";
  22499. e.colorStops.push({
  22500. offset: r,
  22501. color: a
  22502. })
  22503. }
  22504. n = n.nextSibling
  22505. }
  22506. }
  22507. function hT(t, e) {
  22508. t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), k(e.__inheritedStyle, t.__inheritedStyle))
  22509. }
  22510. function cT(t) {
  22511. for (var e = yT(t), n = [], i = 0; i < e.length; i += 2) {
  22512. var r = parseFloat(e[i]),
  22513. o = parseFloat(e[i + 1]);
  22514. n.push([r, o])
  22515. }
  22516. return n
  22517. }
  22518. function pT(t, e, n, i, r) {
  22519. var o = e,
  22520. a = o.__inheritedStyle = o.__inheritedStyle || {},
  22521. s = {};
  22522. 1 === t.nodeType && (function (t, e) {
  22523. var n = t.getAttribute("transform");
  22524. if (n) {
  22525. n = n.replace(/,/g, " ");
  22526. var i = [],
  22527. r = null;
  22528. n.replace(vT, (function (t, e, n) {
  22529. return i.push(e, n), ""
  22530. }));
  22531. for (var o = i.length - 1; o > 0; o -= 2) {
  22532. var a = i[o],
  22533. s = i[o - 1],
  22534. l = yT(a);
  22535. switch (r = r || [1, 0, 0, 1, 0, 0], s) {
  22536. case "translate":
  22537. we(r, r, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
  22538. break;
  22539. case "scale":
  22540. Me(r, r, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
  22541. break;
  22542. case "rotate":
  22543. Se(r, r, -parseFloat(l[0]) * mT);
  22544. break;
  22545. case "skewX":
  22546. be(r, [1, 0, Math.tan(parseFloat(l[0]) * mT), 1, 0, 0], r);
  22547. break;
  22548. case "skewY":
  22549. be(r, [1, Math.tan(parseFloat(l[0]) * mT), 0, 1, 0, 0], r);
  22550. break;
  22551. case "matrix":
  22552. r[0] = parseFloat(l[0]), r[1] = parseFloat(l[1]), r[2] = parseFloat(l[2]), r[3] = parseFloat(l[3]), r[4] = parseFloat(l[4]), r[5] = parseFloat(l[5])
  22553. }
  22554. }
  22555. e.setLocalTransform(r)
  22556. }
  22557. }(t, e), _T(t, a, s), i || function (t, e, n) {
  22558. for (var i = 0; i < iT.length; i++) {
  22559. var r = iT[i];
  22560. null != (o = t.getAttribute(r)) && (e[nT[r]] = o)
  22561. }
  22562. for (i = 0; i < oT.length; i++) {
  22563. var o;
  22564. r = oT[i];
  22565. null != (o = t.getAttribute(r)) && (n[rT[r]] = o)
  22566. }
  22567. }(t, a, s)), o.style = o.style || {}, null != a.fill && (o.style.fill = fT(o, "fill", a.fill, n)), null != a.stroke && (o.style.stroke = fT(o, "stroke", a.stroke, n)), E(["lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"], (function (t) {
  22568. null != a[t] && (o.style[t] = parseFloat(a[t]))
  22569. })), E(["lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign"], (function (t) {
  22570. null != a[t] && (o.style[t] = a[t])
  22571. })), r && (o.__selfStyle = s), a.lineDash && (o.style.lineDash = z(yT(a.lineDash), (function (t) {
  22572. return parseFloat(t)
  22573. }))), "hidden" !== a.visibility && "collapse" !== a.visibility || (o.invisible = !0), "none" === a.display && (o.ignore = !0)
  22574. }
  22575. var dT = /^url\(\s*#(.*?)\)/;
  22576. function fT(t, e, n, i) {
  22577. var r = n && n.match(dT);
  22578. if (!r) return "none" === n && (n = null), n;
  22579. var o = ut(r[1]);
  22580. i.push([t, e, o])
  22581. }
  22582. var gT = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  22583. function yT(t) {
  22584. return t.match(gT) || []
  22585. }
  22586. var vT = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,
  22587. mT = Math.PI / 180;
  22588. var xT = /([^\s:;]+)\s*:\s*([^:;]+)/g;
  22589. function _T(t, e, n) {
  22590. var i, r = t.getAttribute("style");
  22591. if (r)
  22592. for (xT.lastIndex = 0; null != (i = xT.exec(r));) {
  22593. var o = i[1],
  22594. a = _t(nT, o) ? nT[o] : null;
  22595. a && (e[a] = i[2]);
  22596. var s = _t(rT, o) ? rT[o] : null;
  22597. s && (n[s] = i[2])
  22598. }
  22599. }
  22600. function bT(t, e) {
  22601. var n = e.width / t.width,
  22602. i = e.height / t.height,
  22603. r = Math.min(n, i);
  22604. return {
  22605. scale: r,
  22606. x: -(t.x + t.width / 2) * r + (e.x + e.width / 2),
  22607. y: -(t.y + t.height / 2) * r + (e.y + e.height / 2)
  22608. }
  22609. }
  22610. var wT = yt(["rect", "circle", "line", "ellipse", "polygon", "polyline", "path", "text", "tspan", "g"]),
  22611. ST = function () {
  22612. function t(t, e) {
  22613. this.type = "geoSVG", this._usedGraphicMap = yt(), this._freedGraphics = [], this._mapName = t, this._parsedXML = eT(e)
  22614. }
  22615. return t.prototype.load = function () {
  22616. var t = this._firstGraphic;
  22617. if (!t) {
  22618. t = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(t), this._boundingRect = this._firstGraphic.boundingRect.clone();
  22619. var e = function (t) {
  22620. var e = [],
  22621. n = yt();
  22622. return E(t, (function (t) {
  22623. if (null == t.namedFrom) {
  22624. var i = new z_(t.name, t.el);
  22625. e.push(i), n.set(t.name, i)
  22626. }
  22627. })), {
  22628. regions: e,
  22629. regionsMap: n
  22630. }
  22631. }(t.named),
  22632. n = e.regions,
  22633. i = e.regionsMap;
  22634. this._regions = n, this._regionsMap = i
  22635. }
  22636. return {
  22637. boundingRect: this._boundingRect,
  22638. regions: this._regions,
  22639. regionsMap: this._regionsMap
  22640. }
  22641. }, t.prototype._buildGraphic = function (t) {
  22642. var e, n, i, r;
  22643. try {
  22644. lt(null != (n = (e = t && (i = t, r = {
  22645. ignoreViewBox: !0,
  22646. ignoreRootClip: !0
  22647. }, (new aT).parse(i, r)) || {}).root))
  22648. } catch (t) {
  22649. throw new Error("Invalid svg format\n" + t.message)
  22650. }
  22651. var o = new zr;
  22652. o.add(n), o.isGeoSVGGraphicRoot = !0;
  22653. var a = e.width,
  22654. s = e.height,
  22655. l = e.viewBoxRect,
  22656. u = this._boundingRect;
  22657. if (!u) {
  22658. var h = void 0,
  22659. c = void 0,
  22660. p = void 0,
  22661. d = void 0;
  22662. if (null != a ? (h = 0, p = a) : l && (h = l.x, p = l.width), null != s ? (c = 0, d = s) : l && (c = l.y, d = l.height), null == h || null == c) {
  22663. var f = n.getBoundingRect();
  22664. null == h && (h = f.x, p = f.width), null == c && (c = f.y, d = f.height)
  22665. }
  22666. u = this._boundingRect = new ze(h, c, p, d)
  22667. }
  22668. if (l) {
  22669. var g = bT(l, u);
  22670. n.scaleX = n.scaleY = g.scale, n.x = g.x, n.y = g.y
  22671. }
  22672. o.setClipPath(new zs({
  22673. shape: u.plain()
  22674. }));
  22675. var y = [];
  22676. return E(e.named, (function (t) {
  22677. var e;
  22678. null != wT.get(t.svgNodeTagLower) && (y.push(t), (e = t.el).silent = !1, e.isGroup && e.traverse((function (t) {
  22679. t.silent = !1
  22680. })))
  22681. })), {
  22682. root: o,
  22683. boundingRect: u,
  22684. named: y
  22685. }
  22686. }, t.prototype.useGraphic = function (t) {
  22687. var e = this._usedGraphicMap,
  22688. n = e.get(t);
  22689. return n || (n = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), e.set(t, n), n)
  22690. }, t.prototype.freeGraphic = function (t) {
  22691. var e = this._usedGraphicMap,
  22692. n = e.get(t);
  22693. n && (e.removeKey(t), this._freedGraphics.push(n))
  22694. }, t
  22695. }();
  22696. for (var MT = [126, 25], IT = "南海诸岛", TT = [
  22697. [
  22698. [0, 3.5],
  22699. [7, 11.2],
  22700. [15, 11.9],
  22701. [30, 7],
  22702. [42, .7],
  22703. [52, .7],
  22704. [56, 7.7],
  22705. [59, .7],
  22706. [64, .7],
  22707. [64, 0],
  22708. [5, 0],
  22709. [0, 3.5]
  22710. ],
  22711. [
  22712. [13, 16.1],
  22713. [19, 14.7],
  22714. [16, 21.7],
  22715. [11, 23.1],
  22716. [13, 16.1]
  22717. ],
  22718. [
  22719. [12, 32.2],
  22720. [14, 38.5],
  22721. [15, 38.5],
  22722. [13, 32.2],
  22723. [12, 32.2]
  22724. ],
  22725. [
  22726. [16, 47.6],
  22727. [12, 53.2],
  22728. [13, 53.2],
  22729. [18, 47.6],
  22730. [16, 47.6]
  22731. ],
  22732. [
  22733. [6, 64.4],
  22734. [8, 70],
  22735. [9, 70],
  22736. [8, 64.4],
  22737. [6, 64.4]
  22738. ],
  22739. [
  22740. [23, 82.6],
  22741. [29, 79.8],
  22742. [30, 79.8],
  22743. [25, 82.6],
  22744. [23, 82.6]
  22745. ],
  22746. [
  22747. [37, 70.7],
  22748. [43, 62.3],
  22749. [44, 62.3],
  22750. [39, 70.7],
  22751. [37, 70.7]
  22752. ],
  22753. [
  22754. [48, 51.1],
  22755. [51, 45.5],
  22756. [53, 45.5],
  22757. [50, 51.1],
  22758. [48, 51.1]
  22759. ],
  22760. [
  22761. [51, 35],
  22762. [51, 28.7],
  22763. [53, 28.7],
  22764. [53, 35],
  22765. [51, 35]
  22766. ],
  22767. [
  22768. [52, 22.4],
  22769. [55, 17.5],
  22770. [56, 17.5],
  22771. [53, 22.4],
  22772. [52, 22.4]
  22773. ],
  22774. [
  22775. [58, 12.6],
  22776. [62, 7],
  22777. [63, 7],
  22778. [60, 12.6],
  22779. [58, 12.6]
  22780. ],
  22781. [
  22782. [0, 3.5],
  22783. [0, 93.1],
  22784. [64, 93.1],
  22785. [64, 0],
  22786. [63, 0],
  22787. [63, 92.4],
  22788. [1, 92.4],
  22789. [1, 3.5],
  22790. [0, 3.5]
  22791. ]
  22792. ], CT = 0; CT < TT.length; CT++)
  22793. for (var DT = 0; DT < TT[CT].length; DT++) TT[CT][DT][0] /= 10.5, TT[CT][DT][1] /= -14, TT[CT][DT][0] += MT[0], TT[CT][DT][1] += MT[1];
  22794. var AT = {
  22795. "南海诸岛": [32, 80],
  22796. "广东": [0, -10],
  22797. "香港": [10, 5],
  22798. "澳门": [-10, 10],
  22799. "天津": [5, 5]
  22800. };
  22801. var kT = [
  22802. [
  22803. [123.45165252685547, 25.73527164402261],
  22804. [123.49731445312499, 25.73527164402261],
  22805. [123.49731445312499, 25.750734064600884],
  22806. [123.45165252685547, 25.750734064600884],
  22807. [123.45165252685547, 25.73527164402261]
  22808. ]
  22809. ];
  22810. var LT = function () {
  22811. function t(t, e, n) {
  22812. var i;
  22813. this.type = "geoJSON", this._parsedMap = yt(), this._mapName = t, this._specialAreas = n, this._geoJSON = U(i = e) ? "undefined" != typeof JSON && JSON.parse ? JSON.parse(i) : new Function("return (" + i + ");")() : i
  22814. }
  22815. return t.prototype.load = function (t, e) {
  22816. e = e || "name";
  22817. var n = this._parsedMap.get(e);
  22818. if (!n) {
  22819. var i = this._parseToRegions(e);
  22820. n = this._parsedMap.set(e, {
  22821. regions: i,
  22822. boundingRect: PT(i)
  22823. })
  22824. }
  22825. var r = yt(),
  22826. o = [];
  22827. return E(n.regions, (function (e) {
  22828. var n = e.name;
  22829. t && _t(t, n) && (e = e.cloneShallow(n = t[n])), o.push(e), r.set(n, e)
  22830. })), {
  22831. regions: o,
  22832. boundingRect: n.boundingRect || new ze(0, 0, 0, 0),
  22833. regionsMap: r
  22834. }
  22835. }, t.prototype._parseToRegions = function (t) {
  22836. var e, n = this._mapName,
  22837. i = this._geoJSON;
  22838. try {
  22839. e = i ? F_(i, t) : []
  22840. } catch (t) {
  22841. throw new Error("Invalid geoJson format\n" + t.message)
  22842. }
  22843. return function (t, e) {
  22844. if ("china" === t) {
  22845. for (var n = 0; n < e.length; n++)
  22846. if (e[n].name === IT) return;
  22847. e.push(new E_(IT, z(TT, (function (t) {
  22848. return {
  22849. type: "polygon",
  22850. exterior: t
  22851. }
  22852. })), MT))
  22853. }
  22854. }(n, e), E(e, (function (t) {
  22855. var e = t.name;
  22856. ! function (t, e) {
  22857. if ("china" === t) {
  22858. var n = AT[e.name];
  22859. if (n) {
  22860. var i = e.getCenter();
  22861. i[0] += n[0] / 10.5, i[1] += -n[1] / 14, e.setCenter(i)
  22862. }
  22863. }
  22864. }(n, t),
  22865. function (t, e) {
  22866. "china" === t && "台湾" === e.name && e.geometries.push({
  22867. type: "polygon",
  22868. exterior: kT[0]
  22869. })
  22870. }(n, t);
  22871. var i = this._specialAreas && this._specialAreas[e];
  22872. i && t.transformTo(i.left, i.top, i.width, i.height)
  22873. }), this), e
  22874. }, t.prototype.getMapForUser = function () {
  22875. return {
  22876. geoJson: this._geoJSON,
  22877. geoJSON: this._geoJSON,
  22878. specialAreas: this._specialAreas
  22879. }
  22880. }, t
  22881. }();
  22882. function PT(t) {
  22883. for (var e, n = 0; n < t.length; n++) {
  22884. var i = t[n].getBoundingRect();
  22885. (e = e || i.clone()).union(i)
  22886. }
  22887. return e
  22888. }
  22889. var OT = yt(),
  22890. RT = function (t, e, n) {
  22891. if (e.svg) {
  22892. var i = new ST(t, e.svg);
  22893. OT.set(t, i)
  22894. } else {
  22895. var r = e.geoJson || e.geoJSON;
  22896. r && !e.features ? n = e.specialAreas : r = e;
  22897. i = new LT(t, r, n);
  22898. OT.set(t, i)
  22899. }
  22900. },
  22901. NT = function (t) {
  22902. return OT.get(t)
  22903. },
  22904. ET = function (t) {
  22905. var e = OT.get(t);
  22906. return e && "geoJSON" === e.type && e.getMapForUser()
  22907. },
  22908. zT = function (t, e, n) {
  22909. var i = OT.get(t);
  22910. if (i) return i.load(e, n)
  22911. },
  22912. VT = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"],
  22913. BT = yt(VT),
  22914. FT = yt(VT.concat(["g"])),
  22915. GT = yt(VT.concat(["g"])),
  22916. WT = Oo();
  22917. function HT(t) {
  22918. var e = t.getItemStyle(),
  22919. n = t.get("areaColor");
  22920. return null != n && (e.fill = n), e
  22921. }
  22922. function YT(t) {
  22923. var e = t.style;
  22924. e && (e.stroke = e.stroke || e.fill, e.fill = null)
  22925. }
  22926. var XT = function () {
  22927. function t(t) {
  22928. var e = new zr;
  22929. this.uid = Tc("ec_map_draw"), this._controller = new UI(t.getZr()), this._controllerHost = {
  22930. target: e
  22931. }, this.group = e, e.add(this._regionsGroup = new zr), e.add(this._svgGroup = new zr)
  22932. }
  22933. return t.prototype.draw = function (t, e, n, i, r) {
  22934. var o = "geo" === t.mainType,
  22935. a = t.getData && t.getData();
  22936. o && e.eachComponent({
  22937. mainType: "series",
  22938. subType: "map"
  22939. }, (function (e) {
  22940. a || e.getHostGeoModel() !== t || (a = e.getData())
  22941. }));
  22942. var s = t.coordinateSystem,
  22943. l = this._regionsGroup,
  22944. u = this.group,
  22945. h = s.getTransformInfo(),
  22946. c = h.raw,
  22947. p = h.roam;
  22948. !l.childAt(0) || r ? (u.x = p.x, u.y = p.y, u.scaleX = p.scaleX, u.scaleY = p.scaleY, u.dirty()) : fh(u, p, t);
  22949. var d = a && a.getVisual("visualMeta") && a.getVisual("visualMeta").length > 0,
  22950. f = {
  22951. api: n,
  22952. geo: s,
  22953. mapOrGeoModel: t,
  22954. data: a,
  22955. isVisualEncodedByVisualMap: d,
  22956. isGeo: o,
  22957. transformInfoRaw: c
  22958. };
  22959. "geoJSON" === s.resourceType ? this._buildGeoJSON(f) : "geoSVG" === s.resourceType && this._buildSVG(f), this._updateController(t, e, n), this._updateMapSelectHandler(t, l, n, i)
  22960. }, t.prototype._buildGeoJSON = function (t) {
  22961. var e = this._regionsGroupByName = yt(),
  22962. n = yt(),
  22963. i = this._regionsGroup,
  22964. r = t.transformInfoRaw,
  22965. o = t.mapOrGeoModel,
  22966. a = t.data,
  22967. s = t.geo.projection,
  22968. l = s && s.stream;
  22969. function u(t, e) {
  22970. return e && (t = e(t)), t && [t[0] * r.scaleX + r.x, t[1] * r.scaleY + r.y]
  22971. }
  22972. function h(t) {
  22973. for (var e = [], n = !l && s && s.project, i = 0; i < t.length; ++i) {
  22974. var r = u(t[i], n);
  22975. r && e.push(r)
  22976. }
  22977. return e
  22978. }
  22979. function c(t) {
  22980. return {
  22981. shape: {
  22982. points: h(t)
  22983. }
  22984. }
  22985. }
  22986. i.removeAll(), E(t.geo.regions, (function (r) {
  22987. var h = r.name,
  22988. p = e.get(h),
  22989. d = n.get(h) || {},
  22990. f = d.dataIdx,
  22991. g = d.regionModel;
  22992. p || (p = e.set(h, new zr), i.add(p), f = a ? a.indexOfName(h) : null, g = t.isGeo ? o.getRegionModel(h) : a ? a.getItemModel(f) : null, n.set(h, {
  22993. dataIdx: f,
  22994. regionModel: g
  22995. }));
  22996. var y = [],
  22997. v = [];
  22998. E(r.geometries, (function (t) {
  22999. if ("polygon" === t.type) {
  23000. var e = [t.exterior].concat(t.interiors || []);
  23001. l && (e = $T(e, l)), E(e, (function (t) {
  23002. y.push(new Wu(c(t)))
  23003. }))
  23004. } else {
  23005. var n = t.points;
  23006. l && (n = $T(n, l, !0)), E(n, (function (t) {
  23007. v.push(new Yu(c(t)))
  23008. }))
  23009. }
  23010. }));
  23011. var m = u(r.getCenter(), s && s.project);
  23012. function x(e, n) {
  23013. if (e.length) {
  23014. var i = new th({
  23015. culling: !0,
  23016. segmentIgnoreThreshold: 1,
  23017. shape: {
  23018. paths: e
  23019. }
  23020. });
  23021. p.add(i), UT(t, i, f, g), ZT(t, i, h, g, o, f, m), n && (YT(i), E(i.states, YT))
  23022. }
  23023. }
  23024. x(y), x(v, !0)
  23025. })), e.each((function (e, i) {
  23026. var r = n.get(i),
  23027. a = r.dataIdx,
  23028. s = r.regionModel;
  23029. jT(t, e, i, s, o, a), qT(t, e, i, s, o), KT(t, e, i, s, o)
  23030. }), this)
  23031. }, t.prototype._buildSVG = function (t) {
  23032. var e = t.geo.map,
  23033. n = t.transformInfoRaw;
  23034. this._svgGroup.x = n.x, this._svgGroup.y = n.y, this._svgGroup.scaleX = n.scaleX, this._svgGroup.scaleY = n.scaleY, this._svgResourceChanged(e) && (this._freeSVG(), this._useSVG(e));
  23035. var i = this._svgDispatcherMap = yt(),
  23036. r = !1;
  23037. E(this._svgGraphicRecord.named, (function (e) {
  23038. var n = e.name,
  23039. o = t.mapOrGeoModel,
  23040. a = t.data,
  23041. s = e.svgNodeTagLower,
  23042. l = e.el,
  23043. u = a ? a.indexOfName(n) : null,
  23044. h = o.getRegionModel(n);
  23045. (null != BT.get(s) && l instanceof Sa && UT(t, l, u, h), l instanceof Sa && (l.culling = !0), l.z2EmphasisLift = 0, e.namedFrom) || (null != GT.get(s) && ZT(t, l, n, h, o, u, null), jT(t, l, n, h, o, u), qT(t, l, n, h, o), null != FT.get(s) && ("self" === KT(t, l, n, h, o) && (r = !0), (i.get(n) || i.set(n, [])).push(l)))
  23046. }), this), this._enableBlurEntireSVG(r, t)
  23047. }, t.prototype._enableBlurEntireSVG = function (t, e) {
  23048. if (t && e.isGeo) {
  23049. var n = e.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle().opacity;
  23050. this._svgGraphicRecord.root.traverse((function (t) {
  23051. if (!t.isGroup) {
  23052. Cl(t);
  23053. var e = t.ensureState("blur").style || {};
  23054. null == e.opacity && null != n && (e.opacity = n), t.ensureState("emphasis")
  23055. }
  23056. }))
  23057. }
  23058. }, t.prototype.remove = function () {
  23059. this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null
  23060. }, t.prototype.findHighDownDispatchers = function (t, e) {
  23061. if (null == t) return [];
  23062. var n = e.coordinateSystem;
  23063. if ("geoJSON" === n.resourceType) {
  23064. var i = this._regionsGroupByName;
  23065. if (i) {
  23066. var r = i.get(t);
  23067. return r ? [r] : []
  23068. }
  23069. } else if ("geoSVG" === n.resourceType) return this._svgDispatcherMap && this._svgDispatcherMap.get(t) || []
  23070. }, t.prototype._svgResourceChanged = function (t) {
  23071. return this._svgMapName !== t
  23072. }, t.prototype._useSVG = function (t) {
  23073. var e = NT(t);
  23074. if (e && "geoSVG" === e.type) {
  23075. var n = e.useGraphic(this.uid);
  23076. this._svgGroup.add(n.root), this._svgGraphicRecord = n, this._svgMapName = t
  23077. }
  23078. }, t.prototype._freeSVG = function () {
  23079. var t = this._svgMapName;
  23080. if (null != t) {
  23081. var e = NT(t);
  23082. e && "geoSVG" === e.type && e.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null
  23083. }
  23084. }, t.prototype._updateController = function (t, e, n) {
  23085. var i = t.coordinateSystem,
  23086. r = this._controller,
  23087. o = this._controllerHost;
  23088. o.zoomLimit = t.get("scaleLimit"), o.zoom = i.getZoom(), r.enable(t.get("roam") || !1);
  23089. var a = t.mainType;
  23090. function s() {
  23091. var e = {
  23092. type: "geoRoam",
  23093. componentType: a
  23094. };
  23095. return e[a + "Id"] = t.id, e
  23096. }
  23097. r.off("pan").on("pan", (function (t) {
  23098. this._mouseDownFlag = !1, KI(o, t.dx, t.dy), n.dispatchAction(A(s(), {
  23099. dx: t.dx,
  23100. dy: t.dy,
  23101. animation: {
  23102. duration: 0
  23103. }
  23104. }))
  23105. }), this), r.off("zoom").on("zoom", (function (t) {
  23106. this._mouseDownFlag = !1, $I(o, t.scale, t.originX, t.originY), n.dispatchAction(A(s(), {
  23107. zoom: t.scale,
  23108. originX: t.originX,
  23109. originY: t.originY,
  23110. animation: {
  23111. duration: 0
  23112. }
  23113. }))
  23114. }), this), r.setPointerChecker((function (e, r, o) {
  23115. return i.containPoint([r, o]) && !tT(e, n, t)
  23116. }))
  23117. }, t.prototype.resetForLabelLayout = function () {
  23118. this.group.traverse((function (t) {
  23119. var e = t.getTextContent();
  23120. e && (e.ignore = WT(e).ignore)
  23121. }))
  23122. }, t.prototype._updateMapSelectHandler = function (t, e, n, i) {
  23123. var r = this;
  23124. e.off("mousedown"), e.off("click"), t.get("selectedMode") && (e.on("mousedown", (function () {
  23125. r._mouseDownFlag = !0
  23126. })), e.on("click", (function (t) {
  23127. r._mouseDownFlag && (r._mouseDownFlag = !1)
  23128. })))
  23129. }, t
  23130. }();
  23131. function UT(t, e, n, i) {
  23132. var r = i.getModel("itemStyle"),
  23133. o = i.getModel(["emphasis", "itemStyle"]),
  23134. a = i.getModel(["blur", "itemStyle"]),
  23135. s = i.getModel(["select", "itemStyle"]),
  23136. l = HT(r),
  23137. u = HT(o),
  23138. h = HT(s),
  23139. c = HT(a),
  23140. p = t.data;
  23141. if (p) {
  23142. var d = p.getItemVisual(n, "style"),
  23143. f = p.getItemVisual(n, "decal");
  23144. t.isVisualEncodedByVisualMap && d.fill && (l.fill = d.fill), f && (l.decal = gv(f, t.api))
  23145. }
  23146. e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = h, e.ensureState("blur").style = c, Cl(e)
  23147. }
  23148. function ZT(t, e, n, i, r, o, a) {
  23149. var s = t.data,
  23150. l = t.isGeo,
  23151. u = s && isNaN(s.get(s.mapDimension("value"), o)),
  23152. h = s && s.getItemLayout(o);
  23153. if (l || u || h && h.showLabel) {
  23154. var c = l ? n : o,
  23155. p = void 0;
  23156. (!s || o >= 0) && (p = r);
  23157. var d = a ? {
  23158. normal: {
  23159. align: "center",
  23160. verticalAlign: "middle"
  23161. }
  23162. } : null;
  23163. tc(e, ec(i), {
  23164. labelFetcher: p,
  23165. labelDataIndex: c,
  23166. defaultText: n
  23167. }, d);
  23168. var f = e.getTextContent();
  23169. if (f && (WT(f).ignore = f.ignore, e.textConfig && a)) {
  23170. var g = e.getBoundingRect().clone();
  23171. e.textConfig.layoutRect = g, e.textConfig.position = [(a[0] - g.x) / g.width * 100 + "%", (a[1] - g.y) / g.height * 100 + "%"]
  23172. }
  23173. e.disableLabelAnimation = !0
  23174. } else e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null
  23175. }
  23176. function jT(t, e, n, i, r, o) {
  23177. t.data ? t.data.setItemGraphicEl(o, e) : Qs(e).eventData = {
  23178. componentType: "geo",
  23179. componentIndex: r.componentIndex,
  23180. geoIndex: r.componentIndex,
  23181. name: n,
  23182. region: i && i.option || {}
  23183. }
  23184. }
  23185. function qT(t, e, n, i, r) {
  23186. t.data || Zh({
  23187. el: e,
  23188. componentModel: r,
  23189. itemName: n,
  23190. itemTooltipOption: i.get("tooltip")
  23191. })
  23192. }
  23193. function KT(t, e, n, i, r) {
  23194. e.highDownSilentOnTouch = !!r.get("selectedMode");
  23195. var o = i.getModel("emphasis"),
  23196. a = o.get("focus");
  23197. return Yl(e, a, o.get("blurScope"), o.get("disabled")), t.isGeo && function (t, e, n) {
  23198. var i = Qs(t);
  23199. i.componentMainType = e.mainType, i.componentIndex = e.componentIndex, i.componentHighDownName = n
  23200. }(e, r, n), a
  23201. }
  23202. function $T(t, e, n) {
  23203. var i, r = [];
  23204. function o() {
  23205. i = []
  23206. }
  23207. function a() {
  23208. i.length && (r.push(i), i = [])
  23209. }
  23210. var s = e({
  23211. polygonStart: o,
  23212. polygonEnd: a,
  23213. lineStart: o,
  23214. lineEnd: a,
  23215. point: function (t, e) {
  23216. isFinite(t) && isFinite(e) && i.push([t, e])
  23217. },
  23218. sphere: function () {}
  23219. });
  23220. return !n && s.polygonStart(), E(t, (function (t) {
  23221. s.lineStart();
  23222. for (var e = 0; e < t.length; e++) s.point(t[e][0], t[e][1]);
  23223. s.lineEnd()
  23224. })), !n && s.polygonEnd(), r
  23225. }
  23226. var JT = function (t) {
  23227. function e() {
  23228. var n = null !== t && t.apply(this, arguments) || this;
  23229. return n.type = e.type, n
  23230. }
  23231. return n(e, t), e.prototype.render = function (t, e, n, i) {
  23232. if (!i || "mapToggleSelect" !== i.type || i.from !== this.uid) {
  23233. var r = this.group;
  23234. if (r.removeAll(), !t.getHostGeoModel()) {
  23235. if (this._mapDraw && i && "geoRoam" === i.type && this._mapDraw.resetForLabelLayout(), i && "geoRoam" === i.type && "series" === i.componentType && i.seriesId === t.id)(o = this._mapDraw) && r.add(o.group);
  23236. else if (t.needsDrawMap) {
  23237. var o = this._mapDraw || new XT(n);
  23238. r.add(o.group), o.draw(t, e, n, this, i), this._mapDraw = o
  23239. } else this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  23240. t.get("showLegendSymbol") && e.getComponent("legend") && this._renderSymbols(t, e, n)
  23241. }
  23242. }
  23243. }, e.prototype.remove = function () {
  23244. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll()
  23245. }, e.prototype.dispose = function () {
  23246. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null
  23247. }, e.prototype._renderSymbols = function (t, e, n) {
  23248. var i = t.originalData,
  23249. r = this.group;
  23250. i.each(i.mapDimension("value"), (function (e, n) {
  23251. if (!isNaN(e)) {
  23252. var o = i.getItemLayout(n);
  23253. if (o && o.point) {
  23254. var a = o.point,
  23255. s = o.offset,
  23256. l = new _u({
  23257. style: {
  23258. fill: t.getData().getVisual("style").fill
  23259. },
  23260. shape: {
  23261. cx: a[0] + 9 * s,
  23262. cy: a[1],
  23263. r: 3
  23264. },
  23265. silent: !0,
  23266. z2: 8 + (s ? 0 : 11)
  23267. });
  23268. if (!s) {
  23269. var u = t.mainSeries.getData(),
  23270. h = i.getName(n),
  23271. c = u.indexOfName(h),
  23272. p = i.getItemModel(n),
  23273. d = p.getModel("label"),
  23274. f = u.getItemGraphicEl(c);
  23275. tc(l, ec(p), {
  23276. labelFetcher: {
  23277. getFormattedLabel: function (e, n) {
  23278. return t.getFormattedLabel(c, n)
  23279. }
  23280. },
  23281. defaultText: h
  23282. }), l.disableLabelAnimation = !0, d.get("position") || l.setTextConfig({
  23283. position: "bottom"
  23284. }), f.onHoverStateChange = function (t) {
  23285. Il(l, t)
  23286. }
  23287. }
  23288. r.add(l)
  23289. }
  23290. }
  23291. }))
  23292. }, e.type = "map", e
  23293. }(kg),
  23294. QT = function (t) {
  23295. function e() {
  23296. var n = null !== t && t.apply(this, arguments) || this;
  23297. return n.type = e.type, n.needsDrawMap = !1, n.seriesGroup = [], n.getTooltipPosition = function (t) {
  23298. if (null != t) {
  23299. var e = this.getData().getName(t),
  23300. n = this.coordinateSystem,
  23301. i = n.getRegion(e);
  23302. return i && n.dataToPoint(i.getCenter())
  23303. }
  23304. }, n
  23305. }
  23306. return n(e, t), e.prototype.getInitialData = function (t) {
  23307. for (var e = MM(this, {
  23308. coordDimensions: ["value"],
  23309. encodeDefaulter: H(Jp, this)
  23310. }), n = yt(), i = [], r = 0, o = e.count(); r < o; r++) {
  23311. var a = e.getName(r);
  23312. n.set(a, !0)
  23313. }
  23314. return E(zT(this.getMapType(), this.option.nameMap, this.option.nameProperty).regions, (function (t) {
  23315. var e = t.name;
  23316. n.get(e) || i.push(e)
  23317. })), e.appendValues([], i), e
  23318. }, e.prototype.getHostGeoModel = function () {
  23319. var t = this.option.geoIndex;
  23320. return null != t ? this.ecModel.getComponent("geo", t) : null
  23321. }, e.prototype.getMapType = function () {
  23322. return (this.getHostGeoModel() || this).option.map
  23323. }, e.prototype.getRawValue = function (t) {
  23324. var e = this.getData();
  23325. return e.get(e.mapDimension("value"), t)
  23326. }, e.prototype.getRegionModel = function (t) {
  23327. var e = this.getData();
  23328. return e.getItemModel(e.indexOfName(t))
  23329. }, e.prototype.formatTooltip = function (t, e, n) {
  23330. for (var i = this.getData(), r = this.getRawValue(t), o = i.getName(t), a = this.seriesGroup, s = [], l = 0; l < a.length; l++) {
  23331. var u = a[l].originalData.indexOfName(o),
  23332. h = i.mapDimension("value");
  23333. isNaN(a[l].originalData.get(h, u)) || s.push(a[l].name)
  23334. }
  23335. return ng("section", {
  23336. header: s.join(", "),
  23337. noHeader: !s.length,
  23338. blocks: [ng("nameValue", {
  23339. name: o,
  23340. value: r
  23341. })]
  23342. })
  23343. }, e.prototype.setZoom = function (t) {
  23344. this.option.zoom = t
  23345. }, e.prototype.setCenter = function (t) {
  23346. this.option.center = t
  23347. }, e.prototype.getLegendIcon = function (t) {
  23348. var e = t.icon || "roundRect",
  23349. n = Wy(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill);
  23350. return n.setStyle(t.itemStyle), n.style.stroke = "none", e.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = "#fff", n.style.lineWidth = 2), n
  23351. }, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = {
  23352. z: 2,
  23353. coordinateSystem: "geo",
  23354. map: "",
  23355. left: "center",
  23356. top: "center",
  23357. aspectScale: null,
  23358. showLegendSymbol: !0,
  23359. boundingCoords: null,
  23360. center: null,
  23361. zoom: 1,
  23362. scaleLimit: null,
  23363. selectedMode: !0,
  23364. label: {
  23365. show: !1,
  23366. color: "#000"
  23367. },
  23368. itemStyle: {
  23369. borderWidth: .5,
  23370. borderColor: "#444",
  23371. areaColor: "#eee"
  23372. },
  23373. emphasis: {
  23374. label: {
  23375. show: !0,
  23376. color: "rgb(100,0,0)"
  23377. },
  23378. itemStyle: {
  23379. areaColor: "rgba(255,215,0,0.8)"
  23380. }
  23381. },
  23382. select: {
  23383. label: {
  23384. show: !0,
  23385. color: "rgb(100,0,0)"
  23386. },
  23387. itemStyle: {
  23388. color: "rgba(255,215,0,0.8)"
  23389. }
  23390. },
  23391. nameProperty: "name"
  23392. }, e
  23393. }(mg);
  23394. function tC(t) {
  23395. var e = {};
  23396. t.eachSeriesByType("map", (function (t) {
  23397. var n = t.getHostGeoModel(),
  23398. i = n ? "o" + n.id : "i" + t.getMapType();
  23399. (e[i] = e[i] || []).push(t)
  23400. })), E(e, (function (t, e) {
  23401. for (var n, i, r, o = (n = z(t, (function (t) {
  23402. return t.getData()
  23403. })), i = t[0].get("mapValueCalculation"), r = {}, E(n, (function (t) {
  23404. t.each(t.mapDimension("value"), (function (e, n) {
  23405. var i = "ec-" + t.getName(n);
  23406. r[i] = r[i] || [], isNaN(e) || r[i].push(e)
  23407. }))
  23408. })), n[0].map(n[0].mapDimension("value"), (function (t, e) {
  23409. for (var o = "ec-" + n[0].getName(e), a = 0, s = 1 / 0, l = -1 / 0, u = r[o].length, h = 0; h < u; h++) s = Math.min(s, r[o][h]), l = Math.max(l, r[o][h]), a += r[o][h];
  23410. return 0 === u ? NaN : "min" === i ? s : "max" === i ? l : "average" === i ? a / u : a
  23411. }))), a = 0; a < t.length; a++) t[a].originalData = t[a].getData();
  23412. for (a = 0; a < t.length; a++) t[a].seriesGroup = t, t[a].needsDrawMap = 0 === a && !t[a].getHostGeoModel(), t[a].setData(o.cloneShallow()), t[a].mainSeries = t[0]
  23413. }))
  23414. }
  23415. function eC(t) {
  23416. var e = {};
  23417. t.eachSeriesByType("map", (function (n) {
  23418. var i = n.getMapType();
  23419. if (!n.getHostGeoModel() && !e[i]) {
  23420. var r = {};
  23421. E(n.seriesGroup, (function (e) {
  23422. var n = e.coordinateSystem,
  23423. i = e.originalData;
  23424. e.get("showLegendSymbol") && t.getComponent("legend") && i.each(i.mapDimension("value"), (function (t, e) {
  23425. var o = i.getName(e),
  23426. a = n.getRegion(o);
  23427. if (a && !isNaN(t)) {
  23428. var s = r[o] || 0,
  23429. l = n.dataToPoint(a.getCenter());
  23430. r[o] = s + 1, i.setItemLayout(e, {
  23431. point: l,
  23432. offset: s
  23433. })
  23434. }
  23435. }))
  23436. }));
  23437. var o = n.getData();
  23438. o.each((function (t) {
  23439. var e = o.getName(t),
  23440. n = o.getItemLayout(t) || {};
  23441. n.showLabel = !r[e], o.setItemLayout(t, n)
  23442. })), e[i] = !0
  23443. }
  23444. }))
  23445. }
  23446. var nC = Wt,
  23447. iC = function (t) {
  23448. function e(e) {
  23449. var n = t.call(this) || this;
  23450. return n.type = "view", n.dimensions = ["x", "y"], n._roamTransformable = new gr, n._rawTransformable = new gr, n.name = e, n
  23451. }
  23452. return n(e, t), e.prototype.setBoundingRect = function (t, e, n, i) {
  23453. return this._rect = new ze(t, e, n, i), this._rect
  23454. }, e.prototype.getBoundingRect = function () {
  23455. return this._rect
  23456. }, e.prototype.setViewRect = function (t, e, n, i) {
  23457. this._transformTo(t, e, n, i), this._viewRect = new ze(t, e, n, i)
  23458. }, e.prototype._transformTo = function (t, e, n, i) {
  23459. var r = this.getBoundingRect(),
  23460. o = this._rawTransformable;
  23461. o.transform = r.calculateTransform(new ze(t, e, n, i));
  23462. var a = o.parent;
  23463. o.parent = null, o.decomposeTransform(), o.parent = a, this._updateTransform()
  23464. }, e.prototype.setCenter = function (t, e) {
  23465. t && (this._center = [Ur(t[0], e.getWidth()), Ur(t[1], e.getHeight())], this._updateCenterAndZoom())
  23466. }, e.prototype.setZoom = function (t) {
  23467. t = t || 1;
  23468. var e = this.zoomLimit;
  23469. e && (null != e.max && (t = Math.min(e.max, t)), null != e.min && (t = Math.max(e.min, t))), this._zoom = t, this._updateCenterAndZoom()
  23470. }, e.prototype.getDefaultCenter = function () {
  23471. var t = this.getBoundingRect();
  23472. return [t.x + t.width / 2, t.y + t.height / 2]
  23473. }, e.prototype.getCenter = function () {
  23474. return this._center || this.getDefaultCenter()
  23475. }, e.prototype.getZoom = function () {
  23476. return this._zoom || 1
  23477. }, e.prototype.getRoamTransform = function () {
  23478. return this._roamTransformable.getLocalTransform()
  23479. }, e.prototype._updateCenterAndZoom = function () {
  23480. var t = this._rawTransformable.getLocalTransform(),
  23481. e = this._roamTransformable,
  23482. n = this.getDefaultCenter(),
  23483. i = this.getCenter(),
  23484. r = this.getZoom();
  23485. i = Wt([], i, t), n = Wt([], n, t), e.originX = i[0], e.originY = i[1], e.x = n[0] - i[0], e.y = n[1] - i[1], e.scaleX = e.scaleY = r, this._updateTransform()
  23486. }, e.prototype._updateTransform = function () {
  23487. var t = this._roamTransformable,
  23488. e = this._rawTransformable;
  23489. e.parent = t, t.updateTransform(), e.updateTransform(), _e(this.transform || (this.transform = []), e.transform || [1, 0, 0, 1, 0, 0]), this._rawTransform = e.getLocalTransform(), this.invTransform = this.invTransform || [], Ie(this.invTransform, this.transform), this.decomposeTransform()
  23490. }, e.prototype.getTransformInfo = function () {
  23491. var t = this._rawTransformable,
  23492. e = this._roamTransformable,
  23493. n = new gr;
  23494. return n.transform = e.transform, n.decomposeTransform(), {
  23495. roam: {
  23496. x: n.x,
  23497. y: n.y,
  23498. scaleX: n.scaleX,
  23499. scaleY: n.scaleY
  23500. },
  23501. raw: {
  23502. x: t.x,
  23503. y: t.y,
  23504. scaleX: t.scaleX,
  23505. scaleY: t.scaleY
  23506. }
  23507. }
  23508. }, e.prototype.getViewRect = function () {
  23509. return this._viewRect
  23510. }, e.prototype.getViewRectAfterRoam = function () {
  23511. var t = this.getBoundingRect().clone();
  23512. return t.applyTransform(this.transform), t
  23513. }, e.prototype.dataToPoint = function (t, e, n) {
  23514. var i = e ? this._rawTransform : this.transform;
  23515. return n = n || [], i ? nC(n, t, i) : It(n, t)
  23516. }, e.prototype.pointToData = function (t) {
  23517. var e = this.invTransform;
  23518. return e ? nC([], t, e) : [t[0], t[1]]
  23519. }, e.prototype.convertToPixel = function (t, e, n) {
  23520. var i = rC(e);
  23521. return i === this ? i.dataToPoint(n) : null
  23522. }, e.prototype.convertFromPixel = function (t, e, n) {
  23523. var i = rC(e);
  23524. return i === this ? i.pointToData(n) : null
  23525. }, e.prototype.containPoint = function (t) {
  23526. return this.getViewRectAfterRoam().contain(t[0], t[1])
  23527. }, e.dimensions = ["x", "y"], e
  23528. }(gr);
  23529. function rC(t) {
  23530. var e = t.seriesModel;
  23531. return e ? e.coordinateSystem : null
  23532. }
  23533. var oC = {
  23534. geoJSON: {
  23535. aspectScale: .75,
  23536. invertLongitute: !0
  23537. },
  23538. geoSVG: {
  23539. aspectScale: 1,
  23540. invertLongitute: !1
  23541. }
  23542. },
  23543. aC = ["lng", "lat"],
  23544. sC = function (t) {
  23545. function e(e, n, i) {
  23546. var r = t.call(this, e) || this;
  23547. r.dimensions = aC, r.type = "geo", r._nameCoordMap = yt(), r.map = n;
  23548. var o, a = i.projection,
  23549. s = zT(n, i.nameMap, i.nameProperty),
  23550. l = NT(n),
  23551. u = (r.resourceType = l ? l.type : null, r.regions = s.regions),
  23552. h = oC[l.type];
  23553. if (r._regionsMap = s.regionsMap, r.regions = s.regions, r.projection = a, a)
  23554. for (var c = 0; c < u.length; c++) {
  23555. var p = u[c].getBoundingRect(a);
  23556. (o = o || p.clone()).union(p)
  23557. } else o = s.boundingRect;
  23558. return r.setBoundingRect(o.x, o.y, o.width, o.height), r.aspectScale = a ? 1 : rt(i.aspectScale, h.aspectScale), r._invertLongitute = !a && h.invertLongitute, r
  23559. }
  23560. return n(e, t), e.prototype._transformTo = function (t, e, n, i) {
  23561. var r = this.getBoundingRect(),
  23562. o = this._invertLongitute;
  23563. r = r.clone(), o && (r.y = -r.y - r.height);
  23564. var a = this._rawTransformable;
  23565. a.transform = r.calculateTransform(new ze(t, e, n, i));
  23566. var s = a.parent;
  23567. a.parent = null, a.decomposeTransform(), a.parent = s, o && (a.scaleY = -a.scaleY), this._updateTransform()
  23568. }, e.prototype.getRegion = function (t) {
  23569. return this._regionsMap.get(t)
  23570. }, e.prototype.getRegionByCoord = function (t) {
  23571. for (var e = this.regions, n = 0; n < e.length; n++) {
  23572. var i = e[n];
  23573. if ("geoJSON" === i.type && i.contain(t)) return e[n]
  23574. }
  23575. }, e.prototype.addGeoCoord = function (t, e) {
  23576. this._nameCoordMap.set(t, e)
  23577. }, e.prototype.getGeoCoord = function (t) {
  23578. var e = this._regionsMap.get(t);
  23579. return this._nameCoordMap.get(t) || e && e.getCenter()
  23580. }, e.prototype.dataToPoint = function (t, e, n) {
  23581. if (U(t) && (t = this.getGeoCoord(t)), t) {
  23582. var i = this.projection;
  23583. return i && (t = i.project(t)), t && this.projectedToPoint(t, e, n)
  23584. }
  23585. }, e.prototype.pointToData = function (t) {
  23586. var e = this.projection;
  23587. return e && (t = e.unproject(t)), t && this.pointToProjected(t)
  23588. }, e.prototype.pointToProjected = function (e) {
  23589. return t.prototype.pointToData.call(this, e)
  23590. }, e.prototype.projectedToPoint = function (e, n, i) {
  23591. return t.prototype.dataToPoint.call(this, e, n, i)
  23592. }, e.prototype.convertToPixel = function (t, e, n) {
  23593. var i = lC(e);
  23594. return i === this ? i.dataToPoint(n) : null
  23595. }, e.prototype.convertFromPixel = function (t, e, n) {
  23596. var i = lC(e);
  23597. return i === this ? i.pointToData(n) : null
  23598. }, e
  23599. }(iC);
  23600. function lC(t) {
  23601. var e = t.geoModel,
  23602. n = t.seriesModel;
  23603. return e ? e.coordinateSystem : n ? n.coordinateSystem || (n.getReferringComponents("geo", zo).models[0] || {}).coordinateSystem : null
  23604. }
  23605. function uC(t, e) {
  23606. var n = t.get("boundingCoords");
  23607. if (null != n) {
  23608. var i = n[0],
  23609. r = n[1];
  23610. if (isFinite(i[0]) && isFinite(i[1]) && isFinite(r[0]) && isFinite(r[1])) {
  23611. var o = this.projection;
  23612. if (o) {
  23613. var a = i[0],
  23614. s = i[1],
  23615. l = r[0],
  23616. u = r[1];
  23617. i = [1 / 0, 1 / 0], r = [-1 / 0, -1 / 0];
  23618. var h = function (t, e, n, a) {
  23619. for (var s = n - t, l = a - e, u = 0; u <= 100; u++) {
  23620. var h = u / 100,
  23621. c = o.project([t + s * h, e + l * h]);
  23622. Ht(i, i, c), Yt(r, r, c)
  23623. }
  23624. };
  23625. h(a, s, l, s), h(l, s, l, u), h(l, u, a, u), h(a, u, l, s)
  23626. }
  23627. this.setBoundingRect(i[0], i[1], r[0] - i[0], r[1] - i[1])
  23628. } else 0
  23629. }
  23630. var c, p, d, f = this.getBoundingRect(),
  23631. g = t.get("layoutCenter"),
  23632. y = t.get("layoutSize"),
  23633. v = e.getWidth(),
  23634. m = e.getHeight(),
  23635. x = f.width / f.height * this.aspectScale,
  23636. _ = !1;
  23637. if (g && y && (c = [Ur(g[0], v), Ur(g[1], m)], p = Ur(y, Math.min(v, m)), isNaN(c[0]) || isNaN(c[1]) || isNaN(p) || (_ = !0)), _) d = {}, x > 1 ? (d.width = p, d.height = p / x) : (d.height = p, d.width = p * x), d.y = c[1] - d.height / 2, d.x = c[0] - d.width / 2;
  23638. else {
  23639. var b = t.getBoxLayoutParams();
  23640. b.aspect = x, d = Cp(b, {
  23641. width: v,
  23642. height: m
  23643. })
  23644. }
  23645. this.setViewRect(d.x, d.y, d.width, d.height), this.setCenter(t.get("center"), e), this.setZoom(t.get("zoom"))
  23646. }
  23647. R(sC, iC);
  23648. var hC = function () {
  23649. function t() {
  23650. this.dimensions = aC
  23651. }
  23652. return t.prototype.create = function (t, e) {
  23653. var n = [];
  23654. function i(t) {
  23655. return {
  23656. nameProperty: t.get("nameProperty"),
  23657. aspectScale: t.get("aspectScale"),
  23658. projection: t.get("projection")
  23659. }
  23660. }
  23661. t.eachComponent("geo", (function (t, r) {
  23662. var o = t.get("map"),
  23663. a = new sC(o + r, o, A({
  23664. nameMap: t.get("nameMap")
  23665. }, i(t)));
  23666. a.zoomLimit = t.get("scaleLimit"), n.push(a), t.coordinateSystem = a, a.model = t, a.resize = uC, a.resize(t, e)
  23667. })), t.eachSeries((function (t) {
  23668. if ("geo" === t.get("coordinateSystem")) {
  23669. var e = t.get("geoIndex") || 0;
  23670. t.coordinateSystem = n[e]
  23671. }
  23672. }));
  23673. var r = {};
  23674. return t.eachSeriesByType("map", (function (t) {
  23675. if (!t.getHostGeoModel()) {
  23676. var e = t.getMapType();
  23677. r[e] = r[e] || [], r[e].push(t)
  23678. }
  23679. })), E(r, (function (t, r) {
  23680. var o = z(t, (function (t) {
  23681. return t.get("nameMap")
  23682. })),
  23683. a = new sC(r, r, A({
  23684. nameMap: D(o)
  23685. }, i(t[0])));
  23686. a.zoomLimit = it.apply(null, z(t, (function (t) {
  23687. return t.get("scaleLimit")
  23688. }))), n.push(a), a.resize = uC, a.resize(t[0], e), E(t, (function (t) {
  23689. t.coordinateSystem = a,
  23690. function (t, e) {
  23691. E(e.get("geoCoord"), (function (e, n) {
  23692. t.addGeoCoord(n, e)
  23693. }))
  23694. }(a, t)
  23695. }))
  23696. })), n
  23697. }, t.prototype.getFilledRegions = function (t, e, n, i) {
  23698. for (var r = (t || []).slice(), o = yt(), a = 0; a < r.length; a++) o.set(r[a].name, r[a]);
  23699. return E(zT(e, n, i).regions, (function (t) {
  23700. var e = t.name;
  23701. !o.get(e) && r.push({
  23702. name: e
  23703. })
  23704. })), r
  23705. }, t
  23706. }(),
  23707. cC = new hC,
  23708. pC = function (t) {
  23709. function e() {
  23710. var n = null !== t && t.apply(this, arguments) || this;
  23711. return n.type = e.type, n
  23712. }
  23713. return n(e, t), e.prototype.init = function (t, e, n) {
  23714. var i = NT(t.map);
  23715. if (i && "geoJSON" === i.type) {
  23716. var r = t.itemStyle = t.itemStyle || {};
  23717. "color" in r || (r.color = "#eee")
  23718. }
  23719. this.mergeDefaultAndTheme(t, n), wo(t, "label", ["show"])
  23720. }, e.prototype.optionUpdated = function () {
  23721. var t = this,
  23722. e = this.option;
  23723. e.regions = cC.getFilledRegions(e.regions, e.map, e.nameMap, e.nameProperty);
  23724. var n = {};
  23725. this._optionModelMap = V(e.regions || [], (function (e, i) {
  23726. var r = i.name;
  23727. return r && (e.set(r, new Mc(i, t, t.ecModel)), i.selected && (n[r] = !0)), e
  23728. }), yt()), e.selectedMap || (e.selectedMap = n)
  23729. }, e.prototype.getRegionModel = function (t) {
  23730. return this._optionModelMap.get(t) || new Mc(null, this, this.ecModel)
  23731. }, e.prototype.getFormattedLabel = function (t, e) {
  23732. var n = this.getRegionModel(t),
  23733. i = "normal" === e ? n.get(["label", "formatter"]) : n.get(["emphasis", "label", "formatter"]),
  23734. r = {
  23735. name: t
  23736. };
  23737. return X(i) ? (r.status = e, i(r)) : U(i) ? i.replace("{a}", null != t ? t : "") : void 0
  23738. }, e.prototype.setZoom = function (t) {
  23739. this.option.zoom = t
  23740. }, e.prototype.setCenter = function (t) {
  23741. this.option.center = t
  23742. }, e.prototype.select = function (t) {
  23743. var e = this.option,
  23744. n = e.selectedMode;
  23745. n && ("multiple" !== n && (e.selectedMap = null), (e.selectedMap || (e.selectedMap = {}))[t] = !0)
  23746. }, e.prototype.unSelect = function (t) {
  23747. var e = this.option.selectedMap;
  23748. e && (e[t] = !1)
  23749. }, e.prototype.toggleSelected = function (t) {
  23750. this[this.isSelected(t) ? "unSelect" : "select"](t)
  23751. }, e.prototype.isSelected = function (t) {
  23752. var e = this.option.selectedMap;
  23753. return !(!e || !e[t])
  23754. }, e.type = "geo", e.layoutMode = "box", e.defaultOption = {
  23755. z: 0,
  23756. show: !0,
  23757. left: "center",
  23758. top: "center",
  23759. aspectScale: null,
  23760. silent: !1,
  23761. map: "",
  23762. boundingCoords: null,
  23763. center: null,
  23764. zoom: 1,
  23765. scaleLimit: null,
  23766. label: {
  23767. show: !1,
  23768. color: "#000"
  23769. },
  23770. itemStyle: {
  23771. borderWidth: .5,
  23772. borderColor: "#444"
  23773. },
  23774. emphasis: {
  23775. label: {
  23776. show: !0,
  23777. color: "rgb(100,0,0)"
  23778. },
  23779. itemStyle: {
  23780. color: "rgba(255,215,0,0.8)"
  23781. }
  23782. },
  23783. select: {
  23784. label: {
  23785. show: !0,
  23786. color: "rgb(100,0,0)"
  23787. },
  23788. itemStyle: {
  23789. color: "rgba(255,215,0,0.8)"
  23790. }
  23791. },
  23792. regions: []
  23793. }, e
  23794. }(Rp);
  23795. function dC(t, e) {
  23796. return t.pointToProjected ? t.pointToProjected(e) : t.pointToData(e)
  23797. }
  23798. function fC(t, e, n, i) {
  23799. var r = t.getZoom(),
  23800. o = t.getCenter(),
  23801. a = e.zoom,
  23802. s = t.projectedToPoint ? t.projectedToPoint(o) : t.dataToPoint(o);
  23803. if (null != e.dx && null != e.dy && (s[0] -= e.dx, s[1] -= e.dy, t.setCenter(dC(t, s), i)), null != a) {
  23804. if (n) {
  23805. var l = n.min || 0,
  23806. u = n.max || 1 / 0;
  23807. a = Math.max(Math.min(r * a, u), l) / r
  23808. }
  23809. t.scaleX *= a, t.scaleY *= a;
  23810. var h = (e.originX - t.x) * (a - 1),
  23811. c = (e.originY - t.y) * (a - 1);
  23812. t.x -= h, t.y -= c, t.updateTransform(), t.setCenter(dC(t, s), i), t.setZoom(a * r)
  23813. }
  23814. return {
  23815. center: t.getCenter(),
  23816. zoom: t.getZoom()
  23817. }
  23818. }
  23819. var gC = function (t) {
  23820. function e() {
  23821. var n = null !== t && t.apply(this, arguments) || this;
  23822. return n.type = e.type, n.focusBlurEnabled = !0, n
  23823. }
  23824. return n(e, t), e.prototype.init = function (t, e) {
  23825. this._api = e
  23826. }, e.prototype.render = function (t, e, n, i) {
  23827. if (this._model = t, !t.get("show")) return this._mapDraw && this._mapDraw.remove(), void(this._mapDraw = null);
  23828. this._mapDraw || (this._mapDraw = new XT(n));
  23829. var r = this._mapDraw;
  23830. r.draw(t, e, n, this, i), r.group.on("click", this._handleRegionClick, this), r.group.silent = t.get("silent"), this.group.add(r.group), this.updateSelectStatus(t, e, n)
  23831. }, e.prototype._handleRegionClick = function (t) {
  23832. var e;
  23833. ky(t.target, (function (t) {
  23834. return null != (e = Qs(t).eventData)
  23835. }), !0), e && this._api.dispatchAction({
  23836. type: "geoToggleSelect",
  23837. geoId: this._model.id,
  23838. name: e.name
  23839. })
  23840. }, e.prototype.updateSelectStatus = function (t, e, n) {
  23841. var i = this;
  23842. this._mapDraw.group.traverse((function (t) {
  23843. var e = Qs(t).eventData;
  23844. if (e) return i._model.isSelected(e.name) ? n.enterSelect(t) : n.leaveSelect(t), !0
  23845. }))
  23846. }, e.prototype.findHighDownDispatchers = function (t) {
  23847. return this._mapDraw && this._mapDraw.findHighDownDispatchers(t, this._model)
  23848. }, e.prototype.dispose = function () {
  23849. this._mapDraw && this._mapDraw.remove()
  23850. }, e.type = "geo", e
  23851. }(Tg);
  23852. function yC(t, e, n) {
  23853. RT(t, e, n)
  23854. }
  23855. function vC(t) {
  23856. function e(e, n) {
  23857. n.update = "geo:updateSelectStatus", t.registerAction(n, (function (t, n) {
  23858. var i = {},
  23859. r = [];
  23860. return n.eachComponent({
  23861. mainType: "geo",
  23862. query: t
  23863. }, (function (n) {
  23864. n[e](t.name), E(n.coordinateSystem.regions, (function (t) {
  23865. i[t.name] = n.isSelected(t.name) || !1
  23866. }));
  23867. var o = [];
  23868. E(i, (function (t, e) {
  23869. i[e] && o.push(e)
  23870. })), r.push({
  23871. geoIndex: n.componentIndex,
  23872. name: o
  23873. })
  23874. })), {
  23875. selected: i,
  23876. allSelected: r,
  23877. name: t.name
  23878. }
  23879. }))
  23880. }
  23881. t.registerCoordinateSystem("geo", cC), t.registerComponentModel(pC), t.registerComponentView(gC), t.registerImpl("registerMap", yC), t.registerImpl("getMap", (function (t) {
  23882. return ET(t)
  23883. })), e("toggleSelected", {
  23884. type: "geoToggleSelect",
  23885. event: "geoselectchanged"
  23886. }), e("select", {
  23887. type: "geoSelect",
  23888. event: "geoselected"
  23889. }), e("unSelect", {
  23890. type: "geoUnSelect",
  23891. event: "geounselected"
  23892. }), t.registerAction({
  23893. type: "geoRoam",
  23894. event: "geoRoam",
  23895. update: "updateTransform"
  23896. }, (function (t, e, n) {
  23897. var i = t.componentType || "series";
  23898. e.eachComponent({
  23899. mainType: i,
  23900. query: t
  23901. }, (function (e) {
  23902. var r = e.coordinateSystem;
  23903. if ("geo" === r.type) {
  23904. var o = fC(r, t, e.get("scaleLimit"), n);
  23905. e.setCenter && e.setCenter(o.center), e.setZoom && e.setZoom(o.zoom), "series" === i && E(e.seriesGroup, (function (t) {
  23906. t.setCenter(o.center), t.setZoom(o.zoom)
  23907. }))
  23908. }
  23909. }))
  23910. }))
  23911. }
  23912. function mC(t, e) {
  23913. var n = t.isExpand ? t.children : [],
  23914. i = t.parentNode.children,
  23915. r = t.hierNode.i ? i[t.hierNode.i - 1] : null;
  23916. if (n.length) {
  23917. ! function (t) {
  23918. var e = t.children,
  23919. n = e.length,
  23920. i = 0,
  23921. r = 0;
  23922. for (; --n >= 0;) {
  23923. var o = e[n];
  23924. o.hierNode.prelim += i, o.hierNode.modifier += i, r += o.hierNode.change, i += o.hierNode.shift + r
  23925. }
  23926. }(t);
  23927. var o = (n[0].hierNode.prelim + n[n.length - 1].hierNode.prelim) / 2;
  23928. r ? (t.hierNode.prelim = r.hierNode.prelim + e(t, r), t.hierNode.modifier = t.hierNode.prelim - o) : t.hierNode.prelim = o
  23929. } else r && (t.hierNode.prelim = r.hierNode.prelim + e(t, r));
  23930. t.parentNode.hierNode.defaultAncestor = function (t, e, n, i) {
  23931. if (e) {
  23932. for (var r = t, o = t, a = o.parentNode.children[0], s = e, l = r.hierNode.modifier, u = o.hierNode.modifier, h = a.hierNode.modifier, c = s.hierNode.modifier; s = wC(s), o = SC(o), s && o;) {
  23933. r = wC(r), a = SC(a), r.hierNode.ancestor = t;
  23934. var p = s.hierNode.prelim + c - o.hierNode.prelim - u + i(s, o);
  23935. p > 0 && (IC(MC(s, t, n), t, p), u += p, l += p), c += s.hierNode.modifier, u += o.hierNode.modifier, l += r.hierNode.modifier, h += a.hierNode.modifier
  23936. }
  23937. s && !wC(r) && (r.hierNode.thread = s, r.hierNode.modifier += c - l), o && !SC(a) && (a.hierNode.thread = o, a.hierNode.modifier += u - h, n = t)
  23938. }
  23939. return n
  23940. }(t, r, t.parentNode.hierNode.defaultAncestor || i[0], e)
  23941. }
  23942. function xC(t) {
  23943. var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  23944. t.setLayout({
  23945. x: e
  23946. }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier
  23947. }
  23948. function _C(t) {
  23949. return arguments.length ? t : TC
  23950. }
  23951. function bC(t, e) {
  23952. return t -= Math.PI / 2, {
  23953. x: e * Math.cos(t),
  23954. y: e * Math.sin(t)
  23955. }
  23956. }
  23957. function wC(t) {
  23958. var e = t.children;
  23959. return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread
  23960. }
  23961. function SC(t) {
  23962. var e = t.children;
  23963. return e.length && t.isExpand ? e[0] : t.hierNode.thread
  23964. }
  23965. function MC(t, e, n) {
  23966. return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : n
  23967. }
  23968. function IC(t, e, n) {
  23969. var i = n / (e.hierNode.i - t.hierNode.i);
  23970. e.hierNode.change -= i, e.hierNode.shift += n, e.hierNode.modifier += n, e.hierNode.prelim += n, t.hierNode.change += i
  23971. }
  23972. function TC(t, e) {
  23973. return t.parentNode === e.parentNode ? 1 : 2
  23974. }
  23975. var CC = function () {
  23976. this.parentPoint = [], this.childPoints = []
  23977. },
  23978. DC = function (t) {
  23979. function e(e) {
  23980. return t.call(this, e) || this
  23981. }
  23982. return n(e, t), e.prototype.getDefaultStyle = function () {
  23983. return {
  23984. stroke: "#000",
  23985. fill: null
  23986. }
  23987. }, e.prototype.getDefaultShape = function () {
  23988. return new CC
  23989. }, e.prototype.buildPath = function (t, e) {
  23990. var n = e.childPoints,
  23991. i = n.length,
  23992. r = e.parentPoint,
  23993. o = n[0],
  23994. a = n[i - 1];
  23995. if (1 === i) return t.moveTo(r[0], r[1]), void t.lineTo(o[0], o[1]);
  23996. var s = e.orient,
  23997. l = "TB" === s || "BT" === s ? 0 : 1,
  23998. u = 1 - l,
  23999. h = Ur(e.forkPosition, 1),
  24000. c = [];
  24001. c[l] = r[l], c[u] = r[u] + (a[u] - r[u]) * h, t.moveTo(r[0], r[1]), t.lineTo(c[0], c[1]), t.moveTo(o[0], o[1]), c[l] = o[l], t.lineTo(c[0], c[1]), c[l] = a[l], t.lineTo(c[0], c[1]), t.lineTo(a[0], a[1]);
  24002. for (var p = 1; p < i - 1; p++) {
  24003. var d = n[p];
  24004. t.moveTo(d[0], d[1]), c[l] = d[l], t.lineTo(c[0], c[1])
  24005. }
  24006. }, e
  24007. }(Is),
  24008. AC = function (t) {
  24009. function e() {
  24010. var n = null !== t && t.apply(this, arguments) || this;
  24011. return n.type = e.type, n._mainGroup = new zr, n
  24012. }
  24013. return n(e, t), e.prototype.init = function (t, e) {
  24014. this._controller = new UI(e.getZr()), this._controllerHost = {
  24015. target: this.group
  24016. }, this.group.add(this._mainGroup)
  24017. }, e.prototype.render = function (t, e, n) {
  24018. var i = t.getData(),
  24019. r = t.layoutInfo,
  24020. o = this._mainGroup;
  24021. "radial" === t.get("layout") ? (o.x = r.x + r.width / 2, o.y = r.y + r.height / 2) : (o.x = r.x, o.y = r.y), this._updateViewCoordSys(t, n), this._updateController(t, e, n);
  24022. var a = this._data;
  24023. i.diff(a).add((function (e) {
  24024. kC(i, e) && LC(i, e, null, o, t)
  24025. })).update((function (e, n) {
  24026. var r = a.getItemGraphicEl(n);
  24027. kC(i, e) ? LC(i, e, r, o, t) : r && RC(a, n, r, o, t)
  24028. })).remove((function (e) {
  24029. var n = a.getItemGraphicEl(e);
  24030. n && RC(a, e, n, o, t)
  24031. })).execute(), this._nodeScaleRatio = t.get("nodeScaleRatio"), this._updateNodeAndLinkScale(t), !0 === t.get("expandAndCollapse") && i.eachItemGraphicEl((function (e, i) {
  24032. e.off("click").on("click", (function () {
  24033. n.dispatchAction({
  24034. type: "treeExpandAndCollapse",
  24035. seriesId: t.id,
  24036. dataIndex: i
  24037. })
  24038. }))
  24039. })), this._data = i
  24040. }, e.prototype._updateViewCoordSys = function (t, e) {
  24041. var n = t.getData(),
  24042. i = [];
  24043. n.each((function (t) {
  24044. var e = n.getItemLayout(t);
  24045. !e || isNaN(e.x) || isNaN(e.y) || i.push([+e.x, +e.y])
  24046. }));
  24047. var r = [],
  24048. o = [];
  24049. Ra(i, r, o);
  24050. var a = this._min,
  24051. s = this._max;
  24052. o[0] - r[0] == 0 && (r[0] = a ? a[0] : r[0] - 1, o[0] = s ? s[0] : o[0] + 1), o[1] - r[1] == 0 && (r[1] = a ? a[1] : r[1] - 1, o[1] = s ? s[1] : o[1] + 1);
  24053. var l = t.coordinateSystem = new iC;
  24054. l.zoomLimit = t.get("scaleLimit"), l.setBoundingRect(r[0], r[1], o[0] - r[0], o[1] - r[1]), l.setCenter(t.get("center"), e), l.setZoom(t.get("zoom")), this.group.attr({
  24055. x: l.x,
  24056. y: l.y,
  24057. scaleX: l.scaleX,
  24058. scaleY: l.scaleY
  24059. }), this._min = r, this._max = o
  24060. }, e.prototype._updateController = function (t, e, n) {
  24061. var i = this,
  24062. r = this._controller,
  24063. o = this._controllerHost,
  24064. a = this.group;
  24065. r.setPointerChecker((function (e, i, r) {
  24066. var o = a.getBoundingRect();
  24067. return o.applyTransform(a.transform), o.contain(i, r) && !tT(e, n, t)
  24068. })), r.enable(t.get("roam")), o.zoomLimit = t.get("scaleLimit"), o.zoom = t.coordinateSystem.getZoom(), r.off("pan").off("zoom").on("pan", (function (e) {
  24069. KI(o, e.dx, e.dy), n.dispatchAction({
  24070. seriesId: t.id,
  24071. type: "treeRoam",
  24072. dx: e.dx,
  24073. dy: e.dy
  24074. })
  24075. })).on("zoom", (function (e) {
  24076. $I(o, e.scale, e.originX, e.originY), n.dispatchAction({
  24077. seriesId: t.id,
  24078. type: "treeRoam",
  24079. zoom: e.scale,
  24080. originX: e.originX,
  24081. originY: e.originY
  24082. }), i._updateNodeAndLinkScale(t), n.updateLabelLayout()
  24083. }))
  24084. }, e.prototype._updateNodeAndLinkScale = function (t) {
  24085. var e = t.getData(),
  24086. n = this._getNodeGlobalScale(t);
  24087. e.eachItemGraphicEl((function (t, e) {
  24088. t.setSymbolScale(n)
  24089. }))
  24090. }, e.prototype._getNodeGlobalScale = function (t) {
  24091. var e = t.coordinateSystem;
  24092. if ("view" !== e.type) return 1;
  24093. var n = this._nodeScaleRatio,
  24094. i = e.scaleX || 1;
  24095. return ((e.getZoom() - 1) * n + 1) / i
  24096. }, e.prototype.dispose = function () {
  24097. this._controller && this._controller.dispose(), this._controllerHost = null
  24098. }, e.prototype.remove = function () {
  24099. this._mainGroup.removeAll(), this._data = null
  24100. }, e.type = "tree", e
  24101. }(kg);
  24102. function kC(t, e) {
  24103. var n = t.getItemLayout(e);
  24104. return n && !isNaN(n.x) && !isNaN(n.y)
  24105. }
  24106. function LC(t, e, n, i, r) {
  24107. var o = !n,
  24108. a = t.tree.getNodeByDataIndex(e),
  24109. s = a.getModel(),
  24110. l = a.getVisual("style").fill,
  24111. u = !1 === a.isExpand && 0 !== a.children.length ? l : "#fff",
  24112. h = t.tree.root,
  24113. c = a.parentNode === h ? a : a.parentNode || a,
  24114. p = t.getItemGraphicEl(c.dataIndex),
  24115. d = c.getLayout(),
  24116. f = p ? {
  24117. x: p.__oldX,
  24118. y: p.__oldY,
  24119. rawX: p.__radialOldRawX,
  24120. rawY: p.__radialOldRawY
  24121. } : d,
  24122. g = a.getLayout();
  24123. o ? ((n = new oS(t, e, null, {
  24124. symbolInnerColor: u,
  24125. useNameLabel: !0
  24126. })).x = f.x, n.y = f.y) : n.updateData(t, e, null, {
  24127. symbolInnerColor: u,
  24128. useNameLabel: !0
  24129. }), n.__radialOldRawX = n.__radialRawX, n.__radialOldRawY = n.__radialRawY, n.__radialRawX = g.rawX, n.__radialRawY = g.rawY, i.add(n), t.setItemGraphicEl(e, n), n.__oldX = n.x, n.__oldY = n.y, fh(n, {
  24130. x: g.x,
  24131. y: g.y
  24132. }, r);
  24133. var y = n.getSymbolPath();
  24134. if ("radial" === r.get("layout")) {
  24135. var v = h.children[0],
  24136. m = v.getLayout(),
  24137. x = v.children.length,
  24138. _ = void 0,
  24139. b = void 0;
  24140. if (g.x === m.x && !0 === a.isExpand && v.children.length) {
  24141. var w = {
  24142. x: (v.children[0].getLayout().x + v.children[x - 1].getLayout().x) / 2,
  24143. y: (v.children[0].getLayout().y + v.children[x - 1].getLayout().y) / 2
  24144. };
  24145. (_ = Math.atan2(w.y - m.y, w.x - m.x)) < 0 && (_ = 2 * Math.PI + _), (b = w.x < m.x) && (_ -= Math.PI)
  24146. } else(_ = Math.atan2(g.y - m.y, g.x - m.x)) < 0 && (_ = 2 * Math.PI + _), 0 === a.children.length || 0 !== a.children.length && !1 === a.isExpand ? (b = g.x < m.x) && (_ -= Math.PI) : (b = g.x > m.x) || (_ -= Math.PI);
  24147. var S = b ? "left" : "right",
  24148. M = s.getModel("label"),
  24149. I = M.get("rotate"),
  24150. T = I * (Math.PI / 180),
  24151. C = y.getTextContent();
  24152. C && (y.setTextConfig({
  24153. position: M.get("position") || S,
  24154. rotation: null == I ? -_ : T,
  24155. origin: "center"
  24156. }), C.setStyle("verticalAlign", "middle"))
  24157. }
  24158. var D = s.get(["emphasis", "focus"]),
  24159. A = "relative" === D ? vt(a.getAncestorsIndices(), a.getDescendantIndices()) : "ancestor" === D ? a.getAncestorsIndices() : "descendant" === D ? a.getDescendantIndices() : null;
  24160. A && (Qs(n).focus = A),
  24161. function (t, e, n, i, r, o, a, s) {
  24162. var l = e.getModel(),
  24163. u = t.get("edgeShape"),
  24164. h = t.get("layout"),
  24165. c = t.getOrient(),
  24166. p = t.get(["lineStyle", "curveness"]),
  24167. d = t.get("edgeForkPosition"),
  24168. f = l.getModel("lineStyle").getLineStyle(),
  24169. g = i.__edge;
  24170. if ("curve" === u) e.parentNode && e.parentNode !== n && (g || (g = i.__edge = new $u({
  24171. shape: NC(h, c, p, r, r)
  24172. })), fh(g, {
  24173. shape: NC(h, c, p, o, a)
  24174. }, t));
  24175. else if ("polyline" === u)
  24176. if ("orthogonal" === h) {
  24177. if (e !== n && e.children && 0 !== e.children.length && !0 === e.isExpand) {
  24178. for (var y = e.children, v = [], m = 0; m < y.length; m++) {
  24179. var x = y[m].getLayout();
  24180. v.push([x.x, x.y])
  24181. }
  24182. g || (g = i.__edge = new DC({
  24183. shape: {
  24184. parentPoint: [a.x, a.y],
  24185. childPoints: [
  24186. [a.x, a.y]
  24187. ],
  24188. orient: c,
  24189. forkPosition: d
  24190. }
  24191. })), fh(g, {
  24192. shape: {
  24193. parentPoint: [a.x, a.y],
  24194. childPoints: v
  24195. }
  24196. }, t)
  24197. }
  24198. } else 0;
  24199. g && ("polyline" !== u || e.isExpand) && (g.useStyle(k({
  24200. strokeNoScale: !0,
  24201. fill: null
  24202. }, f)), jl(g, l, "lineStyle"), Cl(g), s.add(g))
  24203. }(r, a, h, n, f, d, g, i), n.__edge && (n.onHoverStateChange = function (e) {
  24204. if ("blur" !== e) {
  24205. var i = a.parentNode && t.getItemGraphicEl(a.parentNode.dataIndex);
  24206. i && 1 === i.hoverState || Il(n.__edge, e)
  24207. }
  24208. })
  24209. }
  24210. function PC(t, e, n, i, r) {
  24211. var o = OC(e.tree.root, t),
  24212. a = o.source,
  24213. s = o.sourceLayout,
  24214. l = e.getItemGraphicEl(t.dataIndex);
  24215. if (l) {
  24216. var u = e.getItemGraphicEl(a.dataIndex).__edge,
  24217. h = l.__edge || (!1 === a.isExpand || 1 === a.children.length ? u : void 0),
  24218. c = i.get("edgeShape"),
  24219. p = i.get("layout"),
  24220. d = i.get("orient"),
  24221. f = i.get(["lineStyle", "curveness"]);
  24222. h && ("curve" === c ? vh(h, {
  24223. shape: NC(p, d, f, s, s),
  24224. style: {
  24225. opacity: 0
  24226. }
  24227. }, i, {
  24228. cb: function () {
  24229. n.remove(h)
  24230. },
  24231. removeOpt: r
  24232. }) : "polyline" === c && "orthogonal" === i.get("layout") && vh(h, {
  24233. shape: {
  24234. parentPoint: [s.x, s.y],
  24235. childPoints: [
  24236. [s.x, s.y]
  24237. ]
  24238. },
  24239. style: {
  24240. opacity: 0
  24241. }
  24242. }, i, {
  24243. cb: function () {
  24244. n.remove(h)
  24245. },
  24246. removeOpt: r
  24247. }))
  24248. }
  24249. }
  24250. function OC(t, e) {
  24251. for (var n, i = e.parentNode === t ? e : e.parentNode || e; null == (n = i.getLayout());) i = i.parentNode === t ? i : i.parentNode || i;
  24252. return {
  24253. source: i,
  24254. sourceLayout: n
  24255. }
  24256. }
  24257. function RC(t, e, n, i, r) {
  24258. var o = t.tree.getNodeByDataIndex(e),
  24259. a = OC(t.tree.root, o).sourceLayout,
  24260. s = {
  24261. duration: r.get("animationDurationUpdate"),
  24262. easing: r.get("animationEasingUpdate")
  24263. };
  24264. vh(n, {
  24265. x: a.x + 1,
  24266. y: a.y + 1
  24267. }, r, {
  24268. cb: function () {
  24269. i.remove(n), t.setItemGraphicEl(e, null)
  24270. },
  24271. removeOpt: s
  24272. }), n.fadeOut(null, t.hostModel, {
  24273. fadeLabel: !0,
  24274. animation: s
  24275. }), o.children.forEach((function (e) {
  24276. PC(e, t, i, r, s)
  24277. })), PC(o, t, i, r, s)
  24278. }
  24279. function NC(t, e, n, i, r) {
  24280. var o, a, s, l, u, h, c, p;
  24281. if ("radial" === t) {
  24282. u = i.rawX, c = i.rawY, h = r.rawX, p = r.rawY;
  24283. var d = bC(u, c),
  24284. f = bC(u, c + (p - c) * n),
  24285. g = bC(h, p + (c - p) * n),
  24286. y = bC(h, p);
  24287. return {
  24288. x1: d.x || 0,
  24289. y1: d.y || 0,
  24290. x2: y.x || 0,
  24291. y2: y.y || 0,
  24292. cpx1: f.x || 0,
  24293. cpy1: f.y || 0,
  24294. cpx2: g.x || 0,
  24295. cpy2: g.y || 0
  24296. }
  24297. }
  24298. return u = i.x, c = i.y, h = r.x, p = r.y, "LR" !== e && "RL" !== e || (o = u + (h - u) * n, a = c, s = h + (u - h) * n, l = p), "TB" !== e && "BT" !== e || (o = u, a = c + (p - c) * n, s = h, l = p + (c - p) * n), {
  24299. x1: u,
  24300. y1: c,
  24301. x2: h,
  24302. y2: p,
  24303. cpx1: o,
  24304. cpy1: a,
  24305. cpx2: s,
  24306. cpy2: l
  24307. }
  24308. }
  24309. var EC = Oo();
  24310. function zC(t) {
  24311. var e = t.mainData,
  24312. n = t.datas;
  24313. n || (n = {
  24314. main: e
  24315. }, t.datasAttr = {
  24316. main: "data"
  24317. }), t.datas = t.mainData = null, HC(e, n, t), E(n, (function (n) {
  24318. E(e.TRANSFERABLE_METHODS, (function (e) {
  24319. n.wrapMethod(e, H(VC, t))
  24320. }))
  24321. })), e.wrapMethod("cloneShallow", H(FC, t)), E(e.CHANGABLE_METHODS, (function (n) {
  24322. e.wrapMethod(n, H(BC, t))
  24323. })), lt(n[e.dataType] === e)
  24324. }
  24325. function VC(t, e) {
  24326. if (EC(i = this).mainData === i) {
  24327. var n = A({}, EC(this).datas);
  24328. n[this.dataType] = e, HC(e, n, t)
  24329. } else YC(e, this.dataType, EC(this).mainData, t);
  24330. var i;
  24331. return e
  24332. }
  24333. function BC(t, e) {
  24334. return t.struct && t.struct.update(), e
  24335. }
  24336. function FC(t, e) {
  24337. return E(EC(e).datas, (function (n, i) {
  24338. n !== e && YC(n.cloneShallow(), i, e, t)
  24339. })), e
  24340. }
  24341. function GC(t) {
  24342. var e = EC(this).mainData;
  24343. return null == t || null == e ? e : EC(e).datas[t]
  24344. }
  24345. function WC() {
  24346. var t = EC(this).mainData;
  24347. return null == t ? [{
  24348. data: t
  24349. }] : z(G(EC(t).datas), (function (e) {
  24350. return {
  24351. type: e,
  24352. data: EC(t).datas[e]
  24353. }
  24354. }))
  24355. }
  24356. function HC(t, e, n) {
  24357. EC(t).datas = {}, E(e, (function (e, i) {
  24358. YC(e, i, t, n)
  24359. }))
  24360. }
  24361. function YC(t, e, n, i) {
  24362. EC(n).datas[e] = t, EC(t).mainData = n, t.dataType = e, i.struct && (t[i.structAttr] = i.struct, i.struct[i.datasAttr[e]] = t), t.getLinkedData = GC, t.getLinkedDataAll = WC
  24363. }
  24364. var XC = function () {
  24365. function t(t, e) {
  24366. this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = t || "", this.hostTree = e
  24367. }
  24368. return t.prototype.isRemoved = function () {
  24369. return this.dataIndex < 0
  24370. }, t.prototype.eachNode = function (t, e, n) {
  24371. X(t) && (n = e, e = t, t = null), U(t = t || {}) && (t = {
  24372. order: t
  24373. });
  24374. var i, r = t.order || "preorder",
  24375. o = this[t.attr || "children"];
  24376. "preorder" === r && (i = e.call(n, this));
  24377. for (var a = 0; !i && a < o.length; a++) o[a].eachNode(t, e, n);
  24378. "postorder" === r && e.call(n, this)
  24379. }, t.prototype.updateDepthAndHeight = function (t) {
  24380. var e = 0;
  24381. this.depth = t;
  24382. for (var n = 0; n < this.children.length; n++) {
  24383. var i = this.children[n];
  24384. i.updateDepthAndHeight(t + 1), i.height > e && (e = i.height)
  24385. }
  24386. this.height = e + 1
  24387. }, t.prototype.getNodeById = function (t) {
  24388. if (this.getId() === t) return this;
  24389. for (var e = 0, n = this.children, i = n.length; e < i; e++) {
  24390. var r = n[e].getNodeById(t);
  24391. if (r) return r
  24392. }
  24393. }, t.prototype.contains = function (t) {
  24394. if (t === this) return !0;
  24395. for (var e = 0, n = this.children, i = n.length; e < i; e++) {
  24396. var r = n[e].contains(t);
  24397. if (r) return r
  24398. }
  24399. }, t.prototype.getAncestors = function (t) {
  24400. for (var e = [], n = t ? this : this.parentNode; n;) e.push(n), n = n.parentNode;
  24401. return e.reverse(), e
  24402. }, t.prototype.getAncestorsIndices = function () {
  24403. for (var t = [], e = this; e;) t.push(e.dataIndex), e = e.parentNode;
  24404. return t.reverse(), t
  24405. }, t.prototype.getDescendantIndices = function () {
  24406. var t = [];
  24407. return this.eachNode((function (e) {
  24408. t.push(e.dataIndex)
  24409. })), t
  24410. }, t.prototype.getValue = function (t) {
  24411. var e = this.hostTree.data;
  24412. return e.getStore().get(e.getDimensionIndex(t || "value"), this.dataIndex)
  24413. }, t.prototype.setLayout = function (t, e) {
  24414. this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, t, e)
  24415. }, t.prototype.getLayout = function () {
  24416. return this.hostTree.data.getItemLayout(this.dataIndex)
  24417. }, t.prototype.getModel = function (t) {
  24418. if (!(this.dataIndex < 0)) return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)
  24419. }, t.prototype.getLevelModel = function () {
  24420. return (this.hostTree.levelModels || [])[this.depth]
  24421. }, t.prototype.setVisual = function (t, e) {
  24422. this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, t, e)
  24423. }, t.prototype.getVisual = function (t) {
  24424. return this.hostTree.data.getItemVisual(this.dataIndex, t)
  24425. }, t.prototype.getRawIndex = function () {
  24426. return this.hostTree.data.getRawIndex(this.dataIndex)
  24427. }, t.prototype.getId = function () {
  24428. return this.hostTree.data.getId(this.dataIndex)
  24429. }, t.prototype.getChildIndex = function () {
  24430. if (this.parentNode) {
  24431. for (var t = this.parentNode.children, e = 0; e < t.length; ++e)
  24432. if (t[e] === this) return e;
  24433. return -1
  24434. }
  24435. return -1
  24436. }, t.prototype.isAncestorOf = function (t) {
  24437. for (var e = t.parentNode; e;) {
  24438. if (e === this) return !0;
  24439. e = e.parentNode
  24440. }
  24441. return !1
  24442. }, t.prototype.isDescendantOf = function (t) {
  24443. return t !== this && t.isAncestorOf(this)
  24444. }, t
  24445. }(),
  24446. UC = function () {
  24447. function t(t) {
  24448. this.type = "tree", this._nodes = [], this.hostModel = t
  24449. }
  24450. return t.prototype.eachNode = function (t, e, n) {
  24451. this.root.eachNode(t, e, n)
  24452. }, t.prototype.getNodeByDataIndex = function (t) {
  24453. var e = this.data.getRawIndex(t);
  24454. return this._nodes[e]
  24455. }, t.prototype.getNodeById = function (t) {
  24456. return this.root.getNodeById(t)
  24457. }, t.prototype.update = function () {
  24458. for (var t = this.data, e = this._nodes, n = 0, i = e.length; n < i; n++) e[n].dataIndex = -1;
  24459. for (n = 0, i = t.count(); n < i; n++) e[t.getRawIndex(n)].dataIndex = n
  24460. }, t.prototype.clearLayouts = function () {
  24461. this.data.clearItemLayouts()
  24462. }, t.createTree = function (e, n, i) {
  24463. var r = new t(n),
  24464. o = [],
  24465. a = 1;
  24466. ! function t(e, n) {
  24467. var i = e.value;
  24468. a = Math.max(a, Y(i) ? i.length : 1), o.push(e);
  24469. var s = new XC(Ao(e.name, ""), r);
  24470. n ? function (t, e) {
  24471. var n = e.children;
  24472. if (t.parentNode === e) return;
  24473. n.push(t), t.parentNode = e
  24474. }(s, n) : r.root = s, r._nodes.push(s);
  24475. var l = e.children;
  24476. if (l)
  24477. for (var u = 0; u < l.length; u++) t(l[u], s)
  24478. }(e), r.root.updateDepthAndHeight(0);
  24479. var s = ux(o, {
  24480. coordDimensions: ["value"],
  24481. dimensionsCount: a
  24482. }).dimensions,
  24483. l = new lx(s, n);
  24484. return l.initData(o), i && i(l), zC({
  24485. mainData: l,
  24486. struct: r,
  24487. structAttr: "tree"
  24488. }), r.update(), r
  24489. }, t
  24490. }();
  24491. function ZC(t, e, n) {
  24492. if (t && P(e, t.type) >= 0) {
  24493. var i = n.getData().tree.root,
  24494. r = t.targetNode;
  24495. if (U(r) && (r = i.getNodeById(r)), r && i.contains(r)) return {
  24496. node: r
  24497. };
  24498. var o = t.targetNodeId;
  24499. if (null != o && (r = i.getNodeById(o))) return {
  24500. node: r
  24501. }
  24502. }
  24503. }
  24504. function jC(t) {
  24505. for (var e = []; t;)(t = t.parentNode) && e.push(t);
  24506. return e.reverse()
  24507. }
  24508. function qC(t, e) {
  24509. return P(jC(t), e) >= 0
  24510. }
  24511. function KC(t, e) {
  24512. for (var n = []; t;) {
  24513. var i = t.dataIndex;
  24514. n.push({
  24515. name: t.name,
  24516. dataIndex: i,
  24517. value: e.getRawValue(i)
  24518. }), t = t.parentNode
  24519. }
  24520. return n.reverse(), n
  24521. }
  24522. var $C = function (t) {
  24523. function e() {
  24524. var e = null !== t && t.apply(this, arguments) || this;
  24525. return e.hasSymbolVisual = !0, e.ignoreStyleOnData = !0, e
  24526. }
  24527. return n(e, t), e.prototype.getInitialData = function (t) {
  24528. var e = {
  24529. name: t.name,
  24530. children: t.data
  24531. },
  24532. n = t.leaves || {},
  24533. i = new Mc(n, this, this.ecModel),
  24534. r = UC.createTree(e, this, (function (t) {
  24535. t.wrapMethod("getItemModel", (function (t, e) {
  24536. var n = r.getNodeByDataIndex(e);
  24537. return n && n.children.length && n.isExpand || (t.parentModel = i), t
  24538. }))
  24539. }));
  24540. var o = 0;
  24541. r.eachNode("preorder", (function (t) {
  24542. t.depth > o && (o = t.depth)
  24543. }));
  24544. var a = t.expandAndCollapse && t.initialTreeDepth >= 0 ? t.initialTreeDepth : o;
  24545. return r.root.eachNode("preorder", (function (t) {
  24546. var e = t.hostTree.data.getRawDataItem(t.dataIndex);
  24547. t.isExpand = e && null != e.collapsed ? !e.collapsed : t.depth <= a
  24548. })), r.data
  24549. }, e.prototype.getOrient = function () {
  24550. var t = this.get("orient");
  24551. return "horizontal" === t ? t = "LR" : "vertical" === t && (t = "TB"), t
  24552. }, e.prototype.setZoom = function (t) {
  24553. this.option.zoom = t
  24554. }, e.prototype.setCenter = function (t) {
  24555. this.option.center = t
  24556. }, e.prototype.formatTooltip = function (t, e, n) {
  24557. for (var i = this.getData().tree, r = i.root.children[0], o = i.getNodeByDataIndex(t), a = o.getValue(), s = o.name; o && o !== r;) s = o.parentNode.name + "." + s, o = o.parentNode;
  24558. return ng("nameValue", {
  24559. name: s,
  24560. value: a,
  24561. noValue: isNaN(a) || null == a
  24562. })
  24563. }, e.prototype.getDataParams = function (e) {
  24564. var n = t.prototype.getDataParams.apply(this, arguments),
  24565. i = this.getData().tree.getNodeByDataIndex(e);
  24566. return n.treeAncestors = KC(i, this), n.collapsed = !i.isExpand, n
  24567. }, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = {
  24568. z: 2,
  24569. coordinateSystem: "view",
  24570. left: "12%",
  24571. top: "12%",
  24572. right: "12%",
  24573. bottom: "12%",
  24574. layout: "orthogonal",
  24575. edgeShape: "curve",
  24576. edgeForkPosition: "50%",
  24577. roam: !1,
  24578. nodeScaleRatio: .4,
  24579. center: null,
  24580. zoom: 1,
  24581. orient: "LR",
  24582. symbol: "emptyCircle",
  24583. symbolSize: 7,
  24584. expandAndCollapse: !0,
  24585. initialTreeDepth: 2,
  24586. lineStyle: {
  24587. color: "#ccc",
  24588. width: 1.5,
  24589. curveness: .5
  24590. },
  24591. itemStyle: {
  24592. color: "lightsteelblue",
  24593. borderWidth: 1.5
  24594. },
  24595. label: {
  24596. show: !0
  24597. },
  24598. animationEasing: "linear",
  24599. animationDuration: 700,
  24600. animationDurationUpdate: 500
  24601. }, e
  24602. }(mg);
  24603. function JC(t, e) {
  24604. for (var n, i = [t]; n = i.pop();)
  24605. if (e(n), n.isExpand) {
  24606. var r = n.children;
  24607. if (r.length)
  24608. for (var o = r.length - 1; o >= 0; o--) i.push(r[o])
  24609. }
  24610. }
  24611. function QC(t, e) {
  24612. t.eachSeriesByType("tree", (function (t) {
  24613. ! function (t, e) {
  24614. var n = function (t, e) {
  24615. return Cp(t.getBoxLayoutParams(), {
  24616. width: e.getWidth(),
  24617. height: e.getHeight()
  24618. })
  24619. }(t, e);
  24620. t.layoutInfo = n;
  24621. var i = t.get("layout"),
  24622. r = 0,
  24623. o = 0,
  24624. a = null;
  24625. "radial" === i ? (r = 2 * Math.PI, o = Math.min(n.height, n.width) / 2, a = _C((function (t, e) {
  24626. return (t.parentNode === e.parentNode ? 1 : 2) / t.depth
  24627. }))) : (r = n.width, o = n.height, a = _C());
  24628. var s = t.getData().tree.root,
  24629. l = s.children[0];
  24630. if (l) {
  24631. ! function (t) {
  24632. var e = t;
  24633. e.hierNode = {
  24634. defaultAncestor: null,
  24635. ancestor: e,
  24636. prelim: 0,
  24637. modifier: 0,
  24638. change: 0,
  24639. shift: 0,
  24640. i: 0,
  24641. thread: null
  24642. };
  24643. for (var n, i, r = [e]; n = r.pop();)
  24644. if (i = n.children, n.isExpand && i.length)
  24645. for (var o = i.length - 1; o >= 0; o--) {
  24646. var a = i[o];
  24647. a.hierNode = {
  24648. defaultAncestor: null,
  24649. ancestor: a,
  24650. prelim: 0,
  24651. modifier: 0,
  24652. change: 0,
  24653. shift: 0,
  24654. i: o,
  24655. thread: null
  24656. }, r.push(a)
  24657. }
  24658. }(s),
  24659. function (t, e, n) {
  24660. for (var i, r = [t], o = []; i = r.pop();)
  24661. if (o.push(i), i.isExpand) {
  24662. var a = i.children;
  24663. if (a.length)
  24664. for (var s = 0; s < a.length; s++) r.push(a[s])
  24665. } for (; i = o.pop();) e(i, n)
  24666. }(l, mC, a), s.hierNode.modifier = -l.hierNode.prelim, JC(l, xC);
  24667. var u = l,
  24668. h = l,
  24669. c = l;
  24670. JC(l, (function (t) {
  24671. var e = t.getLayout().x;
  24672. e < u.getLayout().x && (u = t), e > h.getLayout().x && (h = t), t.depth > c.depth && (c = t)
  24673. }));
  24674. var p = u === h ? 1 : a(u, h) / 2,
  24675. d = p - u.getLayout().x,
  24676. f = 0,
  24677. g = 0,
  24678. y = 0,
  24679. v = 0;
  24680. if ("radial" === i) f = r / (h.getLayout().x + p + d), g = o / (c.depth - 1 || 1), JC(l, (function (t) {
  24681. y = (t.getLayout().x + d) * f, v = (t.depth - 1) * g;
  24682. var e = bC(y, v);
  24683. t.setLayout({
  24684. x: e.x,
  24685. y: e.y,
  24686. rawX: y,
  24687. rawY: v
  24688. }, !0)
  24689. }));
  24690. else {
  24691. var m = t.getOrient();
  24692. "RL" === m || "LR" === m ? (g = o / (h.getLayout().x + p + d), f = r / (c.depth - 1 || 1), JC(l, (function (t) {
  24693. v = (t.getLayout().x + d) * g, y = "LR" === m ? (t.depth - 1) * f : r - (t.depth - 1) * f, t.setLayout({
  24694. x: y,
  24695. y: v
  24696. }, !0)
  24697. }))) : "TB" !== m && "BT" !== m || (f = r / (h.getLayout().x + p + d), g = o / (c.depth - 1 || 1), JC(l, (function (t) {
  24698. y = (t.getLayout().x + d) * f, v = "TB" === m ? (t.depth - 1) * g : o - (t.depth - 1) * g, t.setLayout({
  24699. x: y,
  24700. y: v
  24701. }, !0)
  24702. })))
  24703. }
  24704. }
  24705. }(t, e)
  24706. }))
  24707. }
  24708. function tD(t) {
  24709. t.eachSeriesByType("tree", (function (t) {
  24710. var e = t.getData();
  24711. e.tree.eachNode((function (t) {
  24712. var n = t.getModel().getModel("itemStyle").getItemStyle();
  24713. A(e.ensureUniqueItemVisual(t.dataIndex, "style"), n)
  24714. }))
  24715. }))
  24716. }
  24717. var eD = ["treemapZoomToNode", "treemapRender", "treemapMove"];
  24718. function nD(t) {
  24719. var e = t.getData().tree,
  24720. n = {};
  24721. e.eachNode((function (e) {
  24722. for (var i = e; i && i.depth > 1;) i = i.parentNode;
  24723. var r = ud(t.ecModel, i.name || i.dataIndex + "", n);
  24724. e.setVisual("decal", r)
  24725. }))
  24726. }
  24727. var iD = function (t) {
  24728. function e() {
  24729. var n = null !== t && t.apply(this, arguments) || this;
  24730. return n.type = e.type, n.preventUsingHoverLayer = !0, n
  24731. }
  24732. return n(e, t), e.prototype.getInitialData = function (t, e) {
  24733. var n = {
  24734. name: t.name,
  24735. children: t.data
  24736. };
  24737. rD(n);
  24738. var i = t.levels || [],
  24739. r = this.designatedVisualItemStyle = {},
  24740. o = new Mc({
  24741. itemStyle: r
  24742. }, this, e);
  24743. i = t.levels = function (t, e) {
  24744. var n, i, r = bo(e.get("color")),
  24745. o = bo(e.get(["aria", "decal", "decals"]));
  24746. if (!r) return;
  24747. t = t || [], E(t, (function (t) {
  24748. var e = new Mc(t),
  24749. r = e.get("color"),
  24750. o = e.get("decal");
  24751. (e.get(["itemStyle", "color"]) || r && "none" !== r) && (n = !0), (e.get(["itemStyle", "decal"]) || o && "none" !== o) && (i = !0)
  24752. }));
  24753. var a = t[0] || (t[0] = {});
  24754. n || (a.color = r.slice());
  24755. !i && o && (a.decal = o.slice());
  24756. return t
  24757. }(i, e);
  24758. var a = z(i || [], (function (t) {
  24759. return new Mc(t, o, e)
  24760. }), this),
  24761. s = UC.createTree(n, this, (function (t) {
  24762. t.wrapMethod("getItemModel", (function (t, e) {
  24763. var n = s.getNodeByDataIndex(e),
  24764. i = n ? a[n.depth] : null;
  24765. return t.parentModel = i || o, t
  24766. }))
  24767. }));
  24768. return s.data
  24769. }, e.prototype.optionUpdated = function () {
  24770. this.resetViewRoot()
  24771. }, e.prototype.formatTooltip = function (t, e, n) {
  24772. var i = this.getData(),
  24773. r = this.getRawValue(t);
  24774. return ng("nameValue", {
  24775. name: i.getName(t),
  24776. value: r
  24777. })
  24778. }, e.prototype.getDataParams = function (e) {
  24779. var n = t.prototype.getDataParams.apply(this, arguments),
  24780. i = this.getData().tree.getNodeByDataIndex(e);
  24781. return n.treeAncestors = KC(i, this), n.treePathInfo = n.treeAncestors, n
  24782. }, e.prototype.setLayoutInfo = function (t) {
  24783. this.layoutInfo = this.layoutInfo || {}, A(this.layoutInfo, t)
  24784. }, e.prototype.mapIdToIndex = function (t) {
  24785. var e = this._idIndexMap;
  24786. e || (e = this._idIndexMap = yt(), this._idIndexMapCount = 0);
  24787. var n = e.get(t);
  24788. return null == n && e.set(t, n = this._idIndexMapCount++), n
  24789. }, e.prototype.getViewRoot = function () {
  24790. return this._viewRoot
  24791. }, e.prototype.resetViewRoot = function (t) {
  24792. t ? this._viewRoot = t : t = this._viewRoot;
  24793. var e = this.getRawData().tree.root;
  24794. t && (t === e || e.contains(t)) || (this._viewRoot = e)
  24795. }, e.prototype.enableAriaDecal = function () {
  24796. nD(this)
  24797. }, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = {
  24798. progressive: 0,
  24799. left: "center",
  24800. top: "middle",
  24801. width: "80%",
  24802. height: "80%",
  24803. sort: !0,
  24804. clipWindow: "origin",
  24805. squareRatio: .5 * (1 + Math.sqrt(5)),
  24806. leafDepth: null,
  24807. drillDownIcon: "▶",
  24808. zoomToNodeRatio: .1024,
  24809. roam: !0,
  24810. nodeClick: "zoomToNode",
  24811. animation: !0,
  24812. animationDurationUpdate: 900,
  24813. animationEasing: "quinticInOut",
  24814. breadcrumb: {
  24815. show: !0,
  24816. height: 22,
  24817. left: "center",
  24818. top: "bottom",
  24819. emptyItemWidth: 25,
  24820. itemStyle: {
  24821. color: "rgba(0,0,0,0.7)",
  24822. textStyle: {
  24823. color: "#fff"
  24824. }
  24825. },
  24826. emphasis: {
  24827. itemStyle: {
  24828. color: "rgba(0,0,0,0.9)"
  24829. }
  24830. }
  24831. },
  24832. label: {
  24833. show: !0,
  24834. distance: 0,
  24835. padding: 5,
  24836. position: "inside",
  24837. color: "#fff",
  24838. overflow: "truncate"
  24839. },
  24840. upperLabel: {
  24841. show: !1,
  24842. position: [0, "50%"],
  24843. height: 20,
  24844. overflow: "truncate",
  24845. verticalAlign: "middle"
  24846. },
  24847. itemStyle: {
  24848. color: null,
  24849. colorAlpha: null,
  24850. colorSaturation: null,
  24851. borderWidth: 0,
  24852. gapWidth: 0,
  24853. borderColor: "#fff",
  24854. borderColorSaturation: null
  24855. },
  24856. emphasis: {
  24857. upperLabel: {
  24858. show: !0,
  24859. position: [0, "50%"],
  24860. overflow: "truncate",
  24861. verticalAlign: "middle"
  24862. }
  24863. },
  24864. visualDimension: 0,
  24865. visualMin: null,
  24866. visualMax: null,
  24867. color: [],
  24868. colorAlpha: null,
  24869. colorSaturation: null,
  24870. colorMappingBy: "index",
  24871. visibleMin: 10,
  24872. childrenVisibleMin: null,
  24873. levels: []
  24874. }, e
  24875. }(mg);
  24876. function rD(t) {
  24877. var e = 0;
  24878. E(t.children, (function (t) {
  24879. rD(t);
  24880. var n = t.value;
  24881. Y(n) && (n = n[0]), e += n
  24882. }));
  24883. var n = t.value;
  24884. Y(n) && (n = n[0]), (null == n || isNaN(n)) && (n = e), n < 0 && (n = 0), Y(t.value) ? t.value[0] = n : t.value = n
  24885. }
  24886. var oD = function () {
  24887. function t(t) {
  24888. this.group = new zr, t.add(this.group)
  24889. }
  24890. return t.prototype.render = function (t, e, n, i) {
  24891. var r = t.getModel("breadcrumb"),
  24892. o = this.group;
  24893. if (o.removeAll(), r.get("show") && n) {
  24894. var a = r.getModel("itemStyle"),
  24895. s = r.getModel("emphasis"),
  24896. l = a.getModel("textStyle"),
  24897. u = s.getModel(["itemStyle", "textStyle"]),
  24898. h = {
  24899. pos: {
  24900. left: r.get("left"),
  24901. right: r.get("right"),
  24902. top: r.get("top"),
  24903. bottom: r.get("bottom")
  24904. },
  24905. box: {
  24906. width: e.getWidth(),
  24907. height: e.getHeight()
  24908. },
  24909. emptyItemWidth: r.get("emptyItemWidth"),
  24910. totalWidth: 0,
  24911. renderList: []
  24912. };
  24913. this._prepare(n, h, l), this._renderContent(t, h, a, s, l, u, i), Dp(o, h.pos, h.box)
  24914. }
  24915. }, t.prototype._prepare = function (t, e, n) {
  24916. for (var i = t; i; i = i.parentNode) {
  24917. var r = Ao(i.getModel().get("name"), ""),
  24918. o = n.getTextRect(r),
  24919. a = Math.max(o.width + 16, e.emptyItemWidth);
  24920. e.totalWidth += a + 8, e.renderList.push({
  24921. node: i,
  24922. text: r,
  24923. width: a
  24924. })
  24925. }
  24926. }, t.prototype._renderContent = function (t, e, n, i, r, o, a) {
  24927. for (var s, l, u, h, c, p, d, f, g, y = 0, v = e.emptyItemWidth, m = t.get(["breadcrumb", "height"]), x = (s = e.pos, l = e.box, h = l.width, c = l.height, p = Ur(s.left, h), d = Ur(s.top, c), f = Ur(s.right, h), g = Ur(s.bottom, c), (isNaN(p) || isNaN(parseFloat(s.left))) && (p = 0), (isNaN(f) || isNaN(parseFloat(s.right))) && (f = h), (isNaN(d) || isNaN(parseFloat(s.top))) && (d = 0), (isNaN(g) || isNaN(parseFloat(s.bottom))) && (g = c), u = fp(u || 0), {
  24928. width: Math.max(f - p - u[1] - u[3], 0),
  24929. height: Math.max(g - d - u[0] - u[2], 0)
  24930. }), _ = e.totalWidth, b = e.renderList, w = i.getModel("itemStyle").getItemStyle(), S = b.length - 1; S >= 0; S--) {
  24931. var M = b[S],
  24932. I = M.node,
  24933. T = M.width,
  24934. C = M.text;
  24935. _ > x.width && (_ -= T - v, T = v, C = null);
  24936. var D = new Wu({
  24937. shape: {
  24938. points: aD(y, 0, T, m, S === b.length - 1, 0 === S)
  24939. },
  24940. style: k(n.getItemStyle(), {
  24941. lineJoin: "bevel"
  24942. }),
  24943. textContent: new Fs({
  24944. style: nc(r, {
  24945. text: C
  24946. })
  24947. }),
  24948. textConfig: {
  24949. position: "inside"
  24950. },
  24951. z2: 1e5,
  24952. onclick: H(a, I)
  24953. });
  24954. D.disableLabelAnimation = !0, D.getTextContent().ensureState("emphasis").style = nc(o, {
  24955. text: C
  24956. }), D.ensureState("emphasis").style = w, Yl(D, i.get("focus"), i.get("blurScope"), i.get("disabled")), this.group.add(D), sD(D, t, I), y += T + 8
  24957. }
  24958. }, t.prototype.remove = function () {
  24959. this.group.removeAll()
  24960. }, t
  24961. }();
  24962. function aD(t, e, n, i, r, o) {
  24963. var a = [
  24964. [r ? t : t - 5, e],
  24965. [t + n, e],
  24966. [t + n, e + i],
  24967. [r ? t : t - 5, e + i]
  24968. ];
  24969. return !o && a.splice(2, 0, [t + n + 5, e + i / 2]), !r && a.push([t, e + i / 2]), a
  24970. }
  24971. function sD(t, e, n) {
  24972. Qs(t).eventData = {
  24973. componentType: "series",
  24974. componentSubType: "treemap",
  24975. componentIndex: e.componentIndex,
  24976. seriesIndex: e.seriesIndex,
  24977. seriesName: e.name,
  24978. seriesType: "treemap",
  24979. selfType: "breadcrumb",
  24980. nodeData: {
  24981. dataIndex: n && n.dataIndex,
  24982. name: n && n.name
  24983. },
  24984. treePathInfo: n && KC(n, e)
  24985. }
  24986. }
  24987. var lD = function () {
  24988. function t() {
  24989. this._storage = [], this._elExistsMap = {}
  24990. }
  24991. return t.prototype.add = function (t, e, n, i, r) {
  24992. return !this._elExistsMap[t.id] && (this._elExistsMap[t.id] = !0, this._storage.push({
  24993. el: t,
  24994. target: e,
  24995. duration: n,
  24996. delay: i,
  24997. easing: r
  24998. }), !0)
  24999. }, t.prototype.finished = function (t) {
  25000. return this._finishedCallback = t, this
  25001. }, t.prototype.start = function () {
  25002. for (var t = this, e = this._storage.length, n = function () {
  25003. --e <= 0 && (t._storage.length = 0, t._elExistsMap = {}, t._finishedCallback && t._finishedCallback())
  25004. }, i = 0, r = this._storage.length; i < r; i++) {
  25005. var o = this._storage[i];
  25006. o.el.animateTo(o.target, {
  25007. duration: o.duration,
  25008. delay: o.delay,
  25009. easing: o.easing,
  25010. setToFinal: !0,
  25011. done: n,
  25012. aborted: n
  25013. })
  25014. }
  25015. return this
  25016. }, t
  25017. }();
  25018. var uD = zr,
  25019. hD = zs,
  25020. cD = "label",
  25021. pD = "upperLabel",
  25022. dD = Jo([
  25023. ["fill", "color"],
  25024. ["stroke", "strokeColor"],
  25025. ["lineWidth", "strokeWidth"],
  25026. ["shadowBlur"],
  25027. ["shadowOffsetX"],
  25028. ["shadowOffsetY"],
  25029. ["shadowColor"]
  25030. ]),
  25031. fD = function (t) {
  25032. var e = dD(t);
  25033. return e.stroke = e.fill = e.lineWidth = null, e
  25034. },
  25035. gD = Oo(),
  25036. yD = function (t) {
  25037. function e() {
  25038. var n = null !== t && t.apply(this, arguments) || this;
  25039. return n.type = e.type, n._state = "ready", n._storage = {
  25040. nodeGroup: [],
  25041. background: [],
  25042. content: []
  25043. }, n
  25044. }
  25045. return n(e, t), e.prototype.render = function (t, e, n, i) {
  25046. if (!(P(e.findComponents({
  25047. mainType: "series",
  25048. subType: "treemap",
  25049. query: i
  25050. }), t) < 0)) {
  25051. this.seriesModel = t, this.api = n, this.ecModel = e;
  25052. var r = ZC(i, ["treemapZoomToNode", "treemapRootToNode"], t),
  25053. o = i && i.type,
  25054. a = t.layoutInfo,
  25055. s = !this._oldTree,
  25056. l = this._storage,
  25057. u = "treemapRootToNode" === o && r && l ? {
  25058. rootNodeGroup: l.nodeGroup[r.node.getRawIndex()],
  25059. direction: i.direction
  25060. } : null,
  25061. h = this._giveContainerGroup(a),
  25062. c = t.get("animation"),
  25063. p = this._doRender(h, t, u);
  25064. !c || s || o && "treemapZoomToNode" !== o && "treemapRootToNode" !== o ? p.renderFinally() : this._doAnimation(h, p, t, u), this._resetController(n), this._renderBreadcrumb(t, n, r)
  25065. }
  25066. }, e.prototype._giveContainerGroup = function (t) {
  25067. var e = this._containerGroup;
  25068. return e || (e = this._containerGroup = new uD, this._initEvents(e), this.group.add(e)), e.x = t.x, e.y = t.y, e
  25069. }, e.prototype._doRender = function (t, e, n) {
  25070. var i = e.getData().tree,
  25071. r = this._oldTree,
  25072. o = {
  25073. nodeGroup: [],
  25074. background: [],
  25075. content: []
  25076. },
  25077. a = {
  25078. nodeGroup: [],
  25079. background: [],
  25080. content: []
  25081. },
  25082. s = this._storage,
  25083. l = [];
  25084. function u(t, i, r, u) {
  25085. return function (t, e, n, i, r, o, a, s, l, u) {
  25086. if (!a) return;
  25087. var h = a.getLayout(),
  25088. c = t.getData(),
  25089. p = a.getModel();
  25090. if (c.setItemGraphicEl(a.dataIndex, null), !h || !h.isInView) return;
  25091. var d = h.width,
  25092. f = h.height,
  25093. g = h.borderWidth,
  25094. y = h.invisible,
  25095. v = a.getRawIndex(),
  25096. m = s && s.getRawIndex(),
  25097. x = a.viewChildren,
  25098. _ = h.upperHeight,
  25099. b = x && x.length,
  25100. w = p.getModel("itemStyle"),
  25101. S = p.getModel(["emphasis", "itemStyle"]),
  25102. M = p.getModel(["blur", "itemStyle"]),
  25103. I = p.getModel(["select", "itemStyle"]),
  25104. T = w.get("borderRadius") || 0,
  25105. C = G("nodeGroup", uD);
  25106. if (!C) return;
  25107. if (l.add(C), C.x = h.x || 0, C.y = h.y || 0, C.markRedraw(), gD(C).nodeWidth = d, gD(C).nodeHeight = f, h.isAboveViewRoot) return C;
  25108. var D = G("background", hD, u, 20);
  25109. D && E(C, D, b && h.upperLabelHeight);
  25110. var k = p.getModel("emphasis"),
  25111. L = k.get("focus"),
  25112. P = k.get("blurScope"),
  25113. O = k.get("disabled"),
  25114. R = "ancestor" === L ? a.getAncestorsIndices() : "descendant" === L ? a.getDescendantIndices() : L;
  25115. if (b) Kl(C) && ql(C, !1), D && (ql(D, !O), c.setItemGraphicEl(a.dataIndex, D), Xl(D, R, P));
  25116. else {
  25117. var N = G("content", hD, u, 30);
  25118. N && z(C, N), D.disableMorphing = !0, D && Kl(D) && ql(D, !1), ql(C, !O), c.setItemGraphicEl(a.dataIndex, C), Xl(C, R, P)
  25119. }
  25120. return C;
  25121. function E(e, n, i) {
  25122. var r = Qs(n);
  25123. if (r.dataIndex = a.dataIndex, r.seriesIndex = t.seriesIndex, n.setShape({
  25124. x: 0,
  25125. y: 0,
  25126. width: d,
  25127. height: f,
  25128. r: T
  25129. }), y) V(n);
  25130. else {
  25131. n.invisible = !1;
  25132. var o = a.getVisual("style"),
  25133. s = o.stroke,
  25134. l = fD(w);
  25135. l.fill = s;
  25136. var u = dD(S);
  25137. u.fill = S.get("borderColor");
  25138. var h = dD(M);
  25139. h.fill = M.get("borderColor");
  25140. var c = dD(I);
  25141. if (c.fill = I.get("borderColor"), i) {
  25142. var p = d - 2 * g;
  25143. B(n, s, o.opacity, {
  25144. x: g,
  25145. y: 0,
  25146. width: p,
  25147. height: _
  25148. })
  25149. } else n.removeTextContent();
  25150. n.setStyle(l), n.ensureState("emphasis").style = u, n.ensureState("blur").style = h, n.ensureState("select").style = c, Cl(n)
  25151. }
  25152. e.add(n)
  25153. }
  25154. function z(e, n) {
  25155. var i = Qs(n);
  25156. i.dataIndex = a.dataIndex, i.seriesIndex = t.seriesIndex;
  25157. var r = Math.max(d - 2 * g, 0),
  25158. o = Math.max(f - 2 * g, 0);
  25159. if (n.culling = !0, n.setShape({
  25160. x: g,
  25161. y: g,
  25162. width: r,
  25163. height: o,
  25164. r: T
  25165. }), y) V(n);
  25166. else {
  25167. n.invisible = !1;
  25168. var s = a.getVisual("style"),
  25169. l = s.fill,
  25170. u = fD(w);
  25171. u.fill = l, u.decal = s.decal;
  25172. var h = dD(S),
  25173. c = dD(M),
  25174. p = dD(I);
  25175. B(n, l, s.opacity, null), n.setStyle(u), n.ensureState("emphasis").style = h, n.ensureState("blur").style = c, n.ensureState("select").style = p, Cl(n)
  25176. }
  25177. e.add(n)
  25178. }
  25179. function V(t) {
  25180. !t.invisible && o.push(t)
  25181. }
  25182. function B(e, n, i, r) {
  25183. var o = p.getModel(r ? pD : cD),
  25184. s = Ao(p.get("name"), null),
  25185. l = o.getShallow("show");
  25186. tc(e, ec(p, r ? pD : cD), {
  25187. defaultText: l ? s : null,
  25188. inheritColor: n,
  25189. defaultOpacity: i,
  25190. labelFetcher: t,
  25191. labelDataIndex: a.dataIndex
  25192. });
  25193. var u = e.getTextContent();
  25194. if (u) {
  25195. var c = u.style,
  25196. d = st(c.padding || 0);
  25197. r && (e.setTextConfig({
  25198. layoutRect: r
  25199. }), u.disableLabelLayout = !0), u.beforeUpdate = function () {
  25200. var t = Math.max((r ? r.width : e.shape.width) - d[1] - d[3], 0),
  25201. n = Math.max((r ? r.height : e.shape.height) - d[0] - d[2], 0);
  25202. c.width === t && c.height === n || u.setStyle({
  25203. width: t,
  25204. height: n
  25205. })
  25206. }, c.truncateMinChar = 2, c.lineOverflow = "truncate", F(c, r, h);
  25207. var f = u.getState("emphasis");
  25208. F(f ? f.style : null, r, h)
  25209. }
  25210. }
  25211. function F(e, n, i) {
  25212. var r = e ? e.text : null;
  25213. if (!n && i.isLeafRoot && null != r) {
  25214. var o = t.get("drillDownIcon", !0);
  25215. e.text = o ? o + " " + r : r
  25216. }
  25217. }
  25218. function G(t, i, o, a) {
  25219. var s = null != m && n[t][m],
  25220. l = r[t];
  25221. return s ? (n[t][m] = null, W(l, s)) : y || ((s = new i) instanceof Sa && (s.z2 = function (t, e) {
  25222. return 100 * t + e
  25223. }(o, a)), H(l, s)), e[t][v] = s
  25224. }
  25225. function W(t, e) {
  25226. var n = t[v] = {};
  25227. e instanceof uD ? (n.oldX = e.x, n.oldY = e.y) : n.oldShape = A({}, e.shape)
  25228. }
  25229. function H(t, e) {
  25230. var n = t[v] = {},
  25231. o = a.parentNode,
  25232. s = e instanceof zr;
  25233. if (o && (!i || "drillDown" === i.direction)) {
  25234. var l = 0,
  25235. u = 0,
  25236. h = r.background[o.getRawIndex()];
  25237. !i && h && h.oldShape && (l = h.oldShape.width, u = h.oldShape.height), s ? (n.oldX = 0, n.oldY = u) : n.oldShape = {
  25238. x: l,
  25239. y: u,
  25240. width: 0,
  25241. height: 0
  25242. }
  25243. }
  25244. n.fadein = !s
  25245. }
  25246. }(e, a, s, n, o, l, t, i, r, u)
  25247. }! function t(e, n, i, r, o) {
  25248. r ? (n = e, E(e, (function (t, e) {
  25249. !t.isRemoved() && s(e, e)
  25250. }))) : new Vm(n, e, a, a).add(s).update(s).remove(H(s, null)).execute();
  25251. function a(t) {
  25252. return t.getId()
  25253. }
  25254. function s(a, s) {
  25255. var l = null != a ? e[a] : null,
  25256. h = null != s ? n[s] : null,
  25257. c = u(l, h, i, o);
  25258. c && t(l && l.viewChildren || [], h && h.viewChildren || [], c, r, o + 1)
  25259. }
  25260. }(i.root ? [i.root] : [], r && r.root ? [r.root] : [], t, i === r || !r, 0);
  25261. var h = function (t) {
  25262. var e = {
  25263. nodeGroup: [],
  25264. background: [],
  25265. content: []
  25266. };
  25267. return t && E(t, (function (t, n) {
  25268. var i = e[n];
  25269. E(t, (function (t) {
  25270. t && (i.push(t), gD(t).willDelete = !0)
  25271. }))
  25272. })), e
  25273. }(s);
  25274. return this._oldTree = i, this._storage = a, {
  25275. lastsForAnimation: o,
  25276. willDeleteEls: h,
  25277. renderFinally: function () {
  25278. E(h, (function (t) {
  25279. E(t, (function (t) {
  25280. t.parent && t.parent.remove(t)
  25281. }))
  25282. })), E(l, (function (t) {
  25283. t.invisible = !0, t.dirty()
  25284. }))
  25285. }
  25286. }
  25287. }, e.prototype._doAnimation = function (t, e, n, i) {
  25288. var r = n.get("animationDurationUpdate"),
  25289. o = n.get("animationEasing"),
  25290. a = (X(r) ? 0 : r) || 0,
  25291. s = (X(o) ? null : o) || "cubicOut",
  25292. l = new lD;
  25293. E(e.willDeleteEls, (function (t, e) {
  25294. E(t, (function (t, n) {
  25295. if (!t.invisible) {
  25296. var r, o = t.parent,
  25297. u = gD(o);
  25298. if (i && "drillDown" === i.direction) r = o === i.rootNodeGroup ? {
  25299. shape: {
  25300. x: 0,
  25301. y: 0,
  25302. width: u.nodeWidth,
  25303. height: u.nodeHeight
  25304. },
  25305. style: {
  25306. opacity: 0
  25307. }
  25308. } : {
  25309. style: {
  25310. opacity: 0
  25311. }
  25312. };
  25313. else {
  25314. var h = 0,
  25315. c = 0;
  25316. u.willDelete || (h = u.nodeWidth / 2, c = u.nodeHeight / 2), r = "nodeGroup" === e ? {
  25317. x: h,
  25318. y: c,
  25319. style: {
  25320. opacity: 0
  25321. }
  25322. } : {
  25323. shape: {
  25324. x: h,
  25325. y: c,
  25326. width: 0,
  25327. height: 0
  25328. },
  25329. style: {
  25330. opacity: 0
  25331. }
  25332. }
  25333. }
  25334. r && l.add(t, r, a, 0, s)
  25335. }
  25336. }))
  25337. })), E(this._storage, (function (t, n) {
  25338. E(t, (function (t, i) {
  25339. var r = e.lastsForAnimation[n][i],
  25340. o = {};
  25341. r && (t instanceof zr ? null != r.oldX && (o.x = t.x, o.y = t.y, t.x = r.oldX, t.y = r.oldY) : (r.oldShape && (o.shape = A({}, t.shape), t.setShape(r.oldShape)), r.fadein ? (t.setStyle("opacity", 0), o.style = {
  25342. opacity: 1
  25343. }) : 1 !== t.style.opacity && (o.style = {
  25344. opacity: 1
  25345. })), l.add(t, o, a, 0, s))
  25346. }))
  25347. }), this), this._state = "animating", l.finished(W((function () {
  25348. this._state = "ready", e.renderFinally()
  25349. }), this)).start()
  25350. }, e.prototype._resetController = function (t) {
  25351. var e = this._controller;
  25352. e || ((e = this._controller = new UI(t.getZr())).enable(this.seriesModel.get("roam")), e.on("pan", W(this._onPan, this)), e.on("zoom", W(this._onZoom, this)));
  25353. var n = new ze(0, 0, t.getWidth(), t.getHeight());
  25354. e.setPointerChecker((function (t, e, i) {
  25355. return n.contain(e, i)
  25356. }))
  25357. }, e.prototype._clearController = function () {
  25358. var t = this._controller;
  25359. t && (t.dispose(), t = null)
  25360. }, e.prototype._onPan = function (t) {
  25361. if ("animating" !== this._state && (Math.abs(t.dx) > 3 || Math.abs(t.dy) > 3)) {
  25362. var e = this.seriesModel.getData().tree.root;
  25363. if (!e) return;
  25364. var n = e.getLayout();
  25365. if (!n) return;
  25366. this.api.dispatchAction({
  25367. type: "treemapMove",
  25368. from: this.uid,
  25369. seriesId: this.seriesModel.id,
  25370. rootRect: {
  25371. x: n.x + t.dx,
  25372. y: n.y + t.dy,
  25373. width: n.width,
  25374. height: n.height
  25375. }
  25376. })
  25377. }
  25378. }, e.prototype._onZoom = function (t) {
  25379. var e = t.originX,
  25380. n = t.originY;
  25381. if ("animating" !== this._state) {
  25382. var i = this.seriesModel.getData().tree.root;
  25383. if (!i) return;
  25384. var r = i.getLayout();
  25385. if (!r) return;
  25386. var o = new ze(r.x, r.y, r.width, r.height),
  25387. a = this.seriesModel.layoutInfo,
  25388. s = [1, 0, 0, 1, 0, 0];
  25389. we(s, s, [-(e -= a.x), -(n -= a.y)]), Me(s, s, [t.scale, t.scale]), we(s, s, [e, n]), o.applyTransform(s), this.api.dispatchAction({
  25390. type: "treemapRender",
  25391. from: this.uid,
  25392. seriesId: this.seriesModel.id,
  25393. rootRect: {
  25394. x: o.x,
  25395. y: o.y,
  25396. width: o.width,
  25397. height: o.height
  25398. }
  25399. })
  25400. }
  25401. }, e.prototype._initEvents = function (t) {
  25402. var e = this;
  25403. t.on("click", (function (t) {
  25404. if ("ready" === e._state) {
  25405. var n = e.seriesModel.get("nodeClick", !0);
  25406. if (n) {
  25407. var i = e.findTarget(t.offsetX, t.offsetY);
  25408. if (i) {
  25409. var r = i.node;
  25410. if (r.getLayout().isLeafRoot) e._rootToNode(i);
  25411. else if ("zoomToNode" === n) e._zoomToNode(i);
  25412. else if ("link" === n) {
  25413. var o = r.hostTree.data.getItemModel(r.dataIndex),
  25414. a = o.get("link", !0),
  25415. s = o.get("target", !0) || "blank";
  25416. a && bp(a, s)
  25417. }
  25418. }
  25419. }
  25420. }
  25421. }), this)
  25422. }, e.prototype._renderBreadcrumb = function (t, e, n) {
  25423. var i = this;
  25424. n || (n = null != t.get("leafDepth", !0) ? {
  25425. node: t.getViewRoot()
  25426. } : this.findTarget(e.getWidth() / 2, e.getHeight() / 2)) || (n = {
  25427. node: t.getData().tree.root
  25428. }), (this._breadcrumb || (this._breadcrumb = new oD(this.group))).render(t, e, n.node, (function (e) {
  25429. "animating" !== i._state && (qC(t.getViewRoot(), e) ? i._rootToNode({
  25430. node: e
  25431. }) : i._zoomToNode({
  25432. node: e
  25433. }))
  25434. }))
  25435. }, e.prototype.remove = function () {
  25436. this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = {
  25437. nodeGroup: [],
  25438. background: [],
  25439. content: []
  25440. }, this._state = "ready", this._breadcrumb && this._breadcrumb.remove()
  25441. }, e.prototype.dispose = function () {
  25442. this._clearController()
  25443. }, e.prototype._zoomToNode = function (t) {
  25444. this.api.dispatchAction({
  25445. type: "treemapZoomToNode",
  25446. from: this.uid,
  25447. seriesId: this.seriesModel.id,
  25448. targetNode: t.node
  25449. })
  25450. }, e.prototype._rootToNode = function (t) {
  25451. this.api.dispatchAction({
  25452. type: "treemapRootToNode",
  25453. from: this.uid,
  25454. seriesId: this.seriesModel.id,
  25455. targetNode: t.node
  25456. })
  25457. }, e.prototype.findTarget = function (t, e) {
  25458. var n;
  25459. return this.seriesModel.getViewRoot().eachNode({
  25460. attr: "viewChildren",
  25461. order: "preorder"
  25462. }, (function (i) {
  25463. var r = this._storage.background[i.getRawIndex()];
  25464. if (r) {
  25465. var o = r.transformCoordToLocal(t, e),
  25466. a = r.shape;
  25467. if (!(a.x <= o[0] && o[0] <= a.x + a.width && a.y <= o[1] && o[1] <= a.y + a.height)) return !1;
  25468. n = {
  25469. node: i,
  25470. offsetX: o[0],
  25471. offsetY: o[1]
  25472. }
  25473. }
  25474. }), this), n
  25475. }, e.type = "treemap", e
  25476. }(kg);
  25477. var vD = E,
  25478. mD = q,
  25479. xD = -1,
  25480. _D = function () {
  25481. function t(e) {
  25482. var n = e.mappingMethod,
  25483. i = e.type,
  25484. r = this.option = T(e);
  25485. this.type = i, this.mappingMethod = n, this._normalizeData = kD[n];
  25486. var o = t.visualHandlers[i];
  25487. this.applyVisual = o.applyVisual, this.getColorMapper = o.getColorMapper, this._normalizedToVisual = o._normalizedToVisual[n], "piecewise" === n ? (bD(r), function (t) {
  25488. var e = t.pieceList;
  25489. t.hasSpecialVisual = !1, E(e, (function (e, n) {
  25490. e.originIndex = n, null != e.visual && (t.hasSpecialVisual = !0)
  25491. }))
  25492. }(r)) : "category" === n ? r.categories ? function (t) {
  25493. var e = t.categories,
  25494. n = t.categoryMap = {},
  25495. i = t.visual;
  25496. if (vD(e, (function (t, e) {
  25497. n[t] = e
  25498. })), !Y(i)) {
  25499. var r = [];
  25500. q(i) ? vD(i, (function (t, e) {
  25501. var i = n[e];
  25502. r[null != i ? i : xD] = t
  25503. })) : r[-1] = i, i = AD(t, r)
  25504. }
  25505. for (var o = e.length - 1; o >= 0; o--) null == i[o] && (delete n[e[o]], e.pop())
  25506. }(r) : bD(r, !0) : (lt("linear" !== n || r.dataExtent), bD(r))
  25507. }
  25508. return t.prototype.mapValueToVisual = function (t) {
  25509. var e = this._normalizeData(t);
  25510. return this._normalizedToVisual(e, t)
  25511. }, t.prototype.getNormalizer = function () {
  25512. return W(this._normalizeData, this)
  25513. }, t.listVisualTypes = function () {
  25514. return G(t.visualHandlers)
  25515. }, t.isValidType = function (e) {
  25516. return t.visualHandlers.hasOwnProperty(e)
  25517. }, t.eachVisual = function (t, e, n) {
  25518. q(t) ? E(t, e, n) : e.call(n, t)
  25519. }, t.mapVisual = function (e, n, i) {
  25520. var r, o = Y(e) ? [] : q(e) ? {} : (r = !0, null);
  25521. return t.eachVisual(e, (function (t, e) {
  25522. var a = n.call(i, t, e);
  25523. r ? o = a : o[e] = a
  25524. })), o
  25525. }, t.retrieveVisuals = function (e) {
  25526. var n, i = {};
  25527. return e && vD(t.visualHandlers, (function (t, r) {
  25528. e.hasOwnProperty(r) && (i[r] = e[r], n = !0)
  25529. })), n ? i : null
  25530. }, t.prepareVisualTypes = function (t) {
  25531. if (Y(t)) t = t.slice();
  25532. else {
  25533. if (!mD(t)) return [];
  25534. var e = [];
  25535. vD(t, (function (t, n) {
  25536. e.push(n)
  25537. })), t = e
  25538. }
  25539. return t.sort((function (t, e) {
  25540. return "color" === e && "color" !== t && 0 === t.indexOf("color") ? 1 : -1
  25541. })), t
  25542. }, t.dependsOn = function (t, e) {
  25543. return "color" === e ? !(!t || 0 !== t.indexOf(e)) : t === e
  25544. }, t.findPieceIndex = function (t, e, n) {
  25545. for (var i, r = 1 / 0, o = 0, a = e.length; o < a; o++) {
  25546. var s = e[o].value;
  25547. if (null != s) {
  25548. if (s === t || U(s) && s === t + "") return o;
  25549. n && c(s, o)
  25550. }
  25551. }
  25552. for (o = 0, a = e.length; o < a; o++) {
  25553. var l = e[o],
  25554. u = l.interval,
  25555. h = l.close;
  25556. if (u) {
  25557. if (u[0] === -1 / 0) {
  25558. if (LD(h[1], t, u[1])) return o
  25559. } else if (u[1] === 1 / 0) {
  25560. if (LD(h[0], u[0], t)) return o
  25561. } else if (LD(h[0], u[0], t) && LD(h[1], t, u[1])) return o;
  25562. n && c(u[0], o), n && c(u[1], o)
  25563. }
  25564. }
  25565. if (n) return t === 1 / 0 ? e.length - 1 : t === -1 / 0 ? 0 : i;
  25566. function c(e, n) {
  25567. var o = Math.abs(e - t);
  25568. o < r && (r = o, i = n)
  25569. }
  25570. }, t.visualHandlers = {
  25571. color: {
  25572. applyVisual: MD("color"),
  25573. getColorMapper: function () {
  25574. var t = this.option;
  25575. return W("category" === t.mappingMethod ? function (t, e) {
  25576. return !e && (t = this._normalizeData(t)), ID.call(this, t)
  25577. } : function (e, n, i) {
  25578. var r = !!i;
  25579. return !n && (e = this._normalizeData(e)), i = Jn(e, t.parsedVisual, i), r ? i : ri(i, "rgba")
  25580. }, this)
  25581. },
  25582. _normalizedToVisual: {
  25583. linear: function (t) {
  25584. return ri(Jn(t, this.option.parsedVisual), "rgba")
  25585. },
  25586. category: ID,
  25587. piecewise: function (t, e) {
  25588. var n = DD.call(this, e);
  25589. return null == n && (n = ri(Jn(t, this.option.parsedVisual), "rgba")), n
  25590. },
  25591. fixed: TD
  25592. }
  25593. },
  25594. colorHue: wD((function (t, e) {
  25595. return ni(t, e)
  25596. })),
  25597. colorSaturation: wD((function (t, e) {
  25598. return ni(t, null, e)
  25599. })),
  25600. colorLightness: wD((function (t, e) {
  25601. return ni(t, null, null, e)
  25602. })),
  25603. colorAlpha: wD((function (t, e) {
  25604. return ii(t, e)
  25605. })),
  25606. decal: {
  25607. applyVisual: MD("decal"),
  25608. _normalizedToVisual: {
  25609. linear: null,
  25610. category: ID,
  25611. piecewise: null,
  25612. fixed: null
  25613. }
  25614. },
  25615. opacity: {
  25616. applyVisual: MD("opacity"),
  25617. _normalizedToVisual: CD([0, 1])
  25618. },
  25619. liftZ: {
  25620. applyVisual: MD("liftZ"),
  25621. _normalizedToVisual: {
  25622. linear: TD,
  25623. category: TD,
  25624. piecewise: TD,
  25625. fixed: TD
  25626. }
  25627. },
  25628. symbol: {
  25629. applyVisual: function (t, e, n) {
  25630. n("symbol", this.mapValueToVisual(t))
  25631. },
  25632. _normalizedToVisual: {
  25633. linear: SD,
  25634. category: ID,
  25635. piecewise: function (t, e) {
  25636. var n = DD.call(this, e);
  25637. return null == n && (n = SD.call(this, t)), n
  25638. },
  25639. fixed: TD
  25640. }
  25641. },
  25642. symbolSize: {
  25643. applyVisual: MD("symbolSize"),
  25644. _normalizedToVisual: CD([0, 1])
  25645. }
  25646. }, t
  25647. }();
  25648. function bD(t, e) {
  25649. var n = t.visual,
  25650. i = [];
  25651. q(n) ? vD(n, (function (t) {
  25652. i.push(t)
  25653. })) : null != n && i.push(n);
  25654. e || 1 !== i.length || {
  25655. color: 1,
  25656. symbol: 1
  25657. }.hasOwnProperty(t.type) || (i[1] = i[0]), AD(t, i)
  25658. }
  25659. function wD(t) {
  25660. return {
  25661. applyVisual: function (e, n, i) {
  25662. var r = this.mapValueToVisual(e);
  25663. i("color", t(n("color"), r))
  25664. },
  25665. _normalizedToVisual: CD([0, 1])
  25666. }
  25667. }
  25668. function SD(t) {
  25669. var e = this.option.visual;
  25670. return e[Math.round(Xr(t, [0, 1], [0, e.length - 1], !0))] || {}
  25671. }
  25672. function MD(t) {
  25673. return function (e, n, i) {
  25674. i(t, this.mapValueToVisual(e))
  25675. }
  25676. }
  25677. function ID(t) {
  25678. var e = this.option.visual;
  25679. return e[this.option.loop && t !== xD ? t % e.length : t]
  25680. }
  25681. function TD() {
  25682. return this.option.visual[0]
  25683. }
  25684. function CD(t) {
  25685. return {
  25686. linear: function (e) {
  25687. return Xr(e, t, this.option.visual, !0)
  25688. },
  25689. category: ID,
  25690. piecewise: function (e, n) {
  25691. var i = DD.call(this, n);
  25692. return null == i && (i = Xr(e, t, this.option.visual, !0)), i
  25693. },
  25694. fixed: TD
  25695. }
  25696. }
  25697. function DD(t) {
  25698. var e = this.option,
  25699. n = e.pieceList;
  25700. if (e.hasSpecialVisual) {
  25701. var i = n[_D.findPieceIndex(t, n)];
  25702. if (i && i.visual) return i.visual[this.type]
  25703. }
  25704. }
  25705. function AD(t, e) {
  25706. return t.visual = e, "color" === t.type && (t.parsedVisual = z(e, (function (t) {
  25707. var e = qn(t);
  25708. return e || [0, 0, 0, 1]
  25709. }))), e
  25710. }
  25711. var kD = {
  25712. linear: function (t) {
  25713. return Xr(t, this.option.dataExtent, [0, 1], !0)
  25714. },
  25715. piecewise: function (t) {
  25716. var e = this.option.pieceList,
  25717. n = _D.findPieceIndex(t, e, !0);
  25718. if (null != n) return Xr(n, [0, e.length - 1], [0, 1], !0)
  25719. },
  25720. category: function (t) {
  25721. var e = this.option.categories ? this.option.categoryMap[t] : t;
  25722. return null == e ? xD : e
  25723. },
  25724. fixed: bt
  25725. };
  25726. function LD(t, e, n) {
  25727. return t ? e <= n : e < n
  25728. }
  25729. var PD = Oo(),
  25730. OD = {
  25731. seriesType: "treemap",
  25732. reset: function (t) {
  25733. var e = t.getData().tree.root;
  25734. e.isRemoved() || RD(e, {}, t.getViewRoot().getAncestors(), t)
  25735. }
  25736. };
  25737. function RD(t, e, n, i) {
  25738. var r = t.getModel(),
  25739. o = t.getLayout(),
  25740. a = t.hostTree.data;
  25741. if (o && !o.invisible && o.isInView) {
  25742. var s, l = r.getModel("itemStyle"),
  25743. u = function (t, e, n) {
  25744. var i = A({}, e),
  25745. r = n.designatedVisualItemStyle;
  25746. return E(["color", "colorAlpha", "colorSaturation"], (function (n) {
  25747. r[n] = e[n];
  25748. var o = t.get(n);
  25749. r[n] = null, null != o && (i[n] = o)
  25750. })), i
  25751. }(l, e, i),
  25752. h = a.ensureUniqueItemVisual(t.dataIndex, "style"),
  25753. c = l.get("borderColor"),
  25754. p = l.get("borderColorSaturation");
  25755. null != p && (c = function (t, e) {
  25756. return null != e ? ni(e, null, null, t) : null
  25757. }(p, s = ND(u))), h.stroke = c;
  25758. var d = t.viewChildren;
  25759. if (d && d.length) {
  25760. var f = function (t, e, n, i, r, o) {
  25761. if (!o || !o.length) return;
  25762. var a = zD(e, "color") || null != r.color && "none" !== r.color && (zD(e, "colorAlpha") || zD(e, "colorSaturation"));
  25763. if (!a) return;
  25764. var s = e.get("visualMin"),
  25765. l = e.get("visualMax"),
  25766. u = n.dataExtent.slice();
  25767. null != s && s < u[0] && (u[0] = s), null != l && l > u[1] && (u[1] = l);
  25768. var h = e.get("colorMappingBy"),
  25769. c = {
  25770. type: a.name,
  25771. dataExtent: u,
  25772. visual: a.range
  25773. };
  25774. "color" !== c.type || "index" !== h && "id" !== h ? c.mappingMethod = "linear" : (c.mappingMethod = "category", c.loop = !0);
  25775. var p = new _D(c);
  25776. return PD(p).drColorMappingBy = h, p
  25777. }(0, r, o, 0, u, d);
  25778. E(d, (function (t, e) {
  25779. if (t.depth >= n.length || t === n[t.depth]) {
  25780. var o = function (t, e, n, i, r, o) {
  25781. var a = A({}, e);
  25782. if (r) {
  25783. var s = r.type,
  25784. l = "color" === s && PD(r).drColorMappingBy,
  25785. u = "index" === l ? i : "id" === l ? o.mapIdToIndex(n.getId()) : n.getValue(t.get("visualDimension"));
  25786. a[s] = r.mapValueToVisual(u)
  25787. }
  25788. return a
  25789. }(r, u, t, e, f, i);
  25790. RD(t, o, n, i)
  25791. }
  25792. }))
  25793. } else s = ND(u), h.fill = s
  25794. }
  25795. }
  25796. function ND(t) {
  25797. var e = ED(t, "color");
  25798. if (e) {
  25799. var n = ED(t, "colorAlpha"),
  25800. i = ED(t, "colorSaturation");
  25801. return i && (e = ni(e, null, null, i)), n && (e = ii(e, n)), e
  25802. }
  25803. }
  25804. function ED(t, e) {
  25805. var n = t[e];
  25806. if (null != n && "none" !== n) return n
  25807. }
  25808. function zD(t, e) {
  25809. var n = t.get(e);
  25810. return Y(n) && n.length ? {
  25811. name: e,
  25812. range: n
  25813. } : null
  25814. }
  25815. var VD = Math.max,
  25816. BD = Math.min,
  25817. FD = it,
  25818. GD = E,
  25819. WD = ["itemStyle", "borderWidth"],
  25820. HD = ["itemStyle", "gapWidth"],
  25821. YD = ["upperLabel", "show"],
  25822. XD = ["upperLabel", "height"],
  25823. UD = {
  25824. seriesType: "treemap",
  25825. reset: function (t, e, n, i) {
  25826. var r = n.getWidth(),
  25827. o = n.getHeight(),
  25828. a = t.option,
  25829. s = Cp(t.getBoxLayoutParams(), {
  25830. width: n.getWidth(),
  25831. height: n.getHeight()
  25832. }),
  25833. l = a.size || [],
  25834. u = Ur(FD(s.width, l[0]), r),
  25835. h = Ur(FD(s.height, l[1]), o),
  25836. c = i && i.type,
  25837. p = ZC(i, ["treemapZoomToNode", "treemapRootToNode"], t),
  25838. d = "treemapRender" === c || "treemapMove" === c ? i.rootRect : null,
  25839. f = t.getViewRoot(),
  25840. g = jC(f);
  25841. if ("treemapMove" !== c) {
  25842. var y = "treemapZoomToNode" === c ? function (t, e, n, i, r) {
  25843. var o, a = (e || {}).node,
  25844. s = [i, r];
  25845. if (!a || a === n) return s;
  25846. var l = i * r,
  25847. u = l * t.option.zoomToNodeRatio;
  25848. for (; o = a.parentNode;) {
  25849. for (var h = 0, c = o.children, p = 0, d = c.length; p < d; p++) h += c[p].getValue();
  25850. var f = a.getValue();
  25851. if (0 === f) return s;
  25852. u *= h / f;
  25853. var g = o.getModel(),
  25854. y = g.get(WD);
  25855. (u += 4 * y * y + (3 * y + Math.max(y, $D(g))) * Math.pow(u, .5)) > to && (u = to), a = o
  25856. }
  25857. u < l && (u = l);
  25858. var v = Math.pow(u / l, .5);
  25859. return [i * v, r * v]
  25860. }(t, p, f, u, h) : d ? [d.width, d.height] : [u, h],
  25861. v = a.sort;
  25862. v && "asc" !== v && "desc" !== v && (v = "desc");
  25863. var m = {
  25864. squareRatio: a.squareRatio,
  25865. sort: v,
  25866. leafDepth: a.leafDepth
  25867. };
  25868. f.hostTree.clearLayouts();
  25869. var x = {
  25870. x: 0,
  25871. y: 0,
  25872. width: y[0],
  25873. height: y[1],
  25874. area: y[0] * y[1]
  25875. };
  25876. f.setLayout(x), ZD(f, m, !1, 0), x = f.getLayout(), GD(g, (function (t, e) {
  25877. var n = (g[e + 1] || f).getValue();
  25878. t.setLayout(A({
  25879. dataExtent: [n, n],
  25880. borderWidth: 0,
  25881. upperHeight: 0
  25882. }, x))
  25883. }))
  25884. }
  25885. var _ = t.getData().tree.root;
  25886. _.setLayout(function (t, e, n) {
  25887. if (e) return {
  25888. x: e.x,
  25889. y: e.y
  25890. };
  25891. var i = {
  25892. x: 0,
  25893. y: 0
  25894. };
  25895. if (!n) return i;
  25896. var r = n.node,
  25897. o = r.getLayout();
  25898. if (!o) return i;
  25899. var a = [o.width / 2, o.height / 2],
  25900. s = r;
  25901. for (; s;) {
  25902. var l = s.getLayout();
  25903. a[0] += l.x, a[1] += l.y, s = s.parentNode
  25904. }
  25905. return {
  25906. x: t.width / 2 - a[0],
  25907. y: t.height / 2 - a[1]
  25908. }
  25909. }(s, d, p), !0), t.setLayoutInfo(s), KD(_, new ze(-s.x, -s.y, r, o), g, f, 0)
  25910. }
  25911. };
  25912. function ZD(t, e, n, i) {
  25913. var r, o;
  25914. if (!t.isRemoved()) {
  25915. var a = t.getLayout();
  25916. r = a.width, o = a.height;
  25917. var s = t.getModel(),
  25918. l = s.get(WD),
  25919. u = s.get(HD) / 2,
  25920. h = $D(s),
  25921. c = Math.max(l, h),
  25922. p = l - u,
  25923. d = c - u;
  25924. t.setLayout({
  25925. borderWidth: l,
  25926. upperHeight: c,
  25927. upperLabelHeight: h
  25928. }, !0);
  25929. var f = (r = VD(r - 2 * p, 0)) * (o = VD(o - p - d, 0)),
  25930. g = function (t, e, n, i, r, o) {
  25931. var a = t.children || [],
  25932. s = i.sort;
  25933. "asc" !== s && "desc" !== s && (s = null);
  25934. var l = null != i.leafDepth && i.leafDepth <= o;
  25935. if (r && !l) return t.viewChildren = [];
  25936. a = B(a, (function (t) {
  25937. return !t.isRemoved()
  25938. })),
  25939. function (t, e) {
  25940. e && t.sort((function (t, n) {
  25941. var i = "asc" === e ? t.getValue() - n.getValue() : n.getValue() - t.getValue();
  25942. return 0 === i ? "asc" === e ? t.dataIndex - n.dataIndex : n.dataIndex - t.dataIndex : i
  25943. }))
  25944. }(a, s);
  25945. var u = function (t, e, n) {
  25946. for (var i = 0, r = 0, o = e.length; r < o; r++) i += e[r].getValue();
  25947. var a, s = t.get("visualDimension");
  25948. e && e.length ? "value" === s && n ? (a = [e[e.length - 1].getValue(), e[0].getValue()], "asc" === n && a.reverse()) : (a = [1 / 0, -1 / 0], GD(e, (function (t) {
  25949. var e = t.getValue(s);
  25950. e < a[0] && (a[0] = e), e > a[1] && (a[1] = e)
  25951. }))) : a = [NaN, NaN];
  25952. return {
  25953. sum: i,
  25954. dataExtent: a
  25955. }
  25956. }(e, a, s);
  25957. if (0 === u.sum) return t.viewChildren = [];
  25958. if (u.sum = function (t, e, n, i, r) {
  25959. if (!i) return n;
  25960. for (var o = t.get("visibleMin"), a = r.length, s = a, l = a - 1; l >= 0; l--) {
  25961. var u = r["asc" === i ? a - l - 1 : l].getValue();
  25962. u / n * e < o && (s = l, n -= u)
  25963. }
  25964. return "asc" === i ? r.splice(0, a - s) : r.splice(s, a - s), n
  25965. }(e, n, u.sum, s, a), 0 === u.sum) return t.viewChildren = [];
  25966. for (var h = 0, c = a.length; h < c; h++) {
  25967. var p = a[h].getValue() / u.sum * n;
  25968. a[h].setLayout({
  25969. area: p
  25970. })
  25971. }
  25972. l && (a.length && t.setLayout({
  25973. isLeafRoot: !0
  25974. }, !0), a.length = 0);
  25975. return t.viewChildren = a, t.setLayout({
  25976. dataExtent: u.dataExtent
  25977. }, !0), a
  25978. }(t, s, f, e, n, i);
  25979. if (g.length) {
  25980. var y = {
  25981. x: p,
  25982. y: d,
  25983. width: r,
  25984. height: o
  25985. },
  25986. v = BD(r, o),
  25987. m = 1 / 0,
  25988. x = [];
  25989. x.area = 0;
  25990. for (var _ = 0, b = g.length; _ < b;) {
  25991. var w = g[_];
  25992. x.push(w), x.area += w.getLayout().area;
  25993. var S = jD(x, v, e.squareRatio);
  25994. S <= m ? (_++, m = S) : (x.area -= x.pop().getLayout().area, qD(x, v, y, u, !1), v = BD(y.width, y.height), x.length = x.area = 0, m = 1 / 0)
  25995. }
  25996. if (x.length && qD(x, v, y, u, !0), !n) {
  25997. var M = s.get("childrenVisibleMin");
  25998. null != M && f < M && (n = !0)
  25999. }
  26000. for (_ = 0, b = g.length; _ < b; _++) ZD(g[_], e, n, i + 1)
  26001. }
  26002. }
  26003. }
  26004. function jD(t, e, n) {
  26005. for (var i = 0, r = 1 / 0, o = 0, a = void 0, s = t.length; o < s; o++)(a = t[o].getLayout().area) && (a < r && (r = a), a > i && (i = a));
  26006. var l = t.area * t.area,
  26007. u = e * e * n;
  26008. return l ? VD(u * i / l, l / (u * r)) : 1 / 0
  26009. }
  26010. function qD(t, e, n, i, r) {
  26011. var o = e === n.width ? 0 : 1,
  26012. a = 1 - o,
  26013. s = ["x", "y"],
  26014. l = ["width", "height"],
  26015. u = n[s[o]],
  26016. h = e ? t.area / e : 0;
  26017. (r || h > n[l[a]]) && (h = n[l[a]]);
  26018. for (var c = 0, p = t.length; c < p; c++) {
  26019. var d = t[c],
  26020. f = {},
  26021. g = h ? d.getLayout().area / h : 0,
  26022. y = f[l[a]] = VD(h - 2 * i, 0),
  26023. v = n[s[o]] + n[l[o]] - u,
  26024. m = c === p - 1 || v < g ? v : g,
  26025. x = f[l[o]] = VD(m - 2 * i, 0);
  26026. f[s[a]] = n[s[a]] + BD(i, y / 2), f[s[o]] = u + BD(i, x / 2), u += m, d.setLayout(f, !0)
  26027. }
  26028. n[s[a]] += h, n[l[a]] -= h
  26029. }
  26030. function KD(t, e, n, i, r) {
  26031. var o = t.getLayout(),
  26032. a = n[r],
  26033. s = a && a === t;
  26034. if (!(a && !s || r === n.length && t !== i)) {
  26035. t.setLayout({
  26036. isInView: !0,
  26037. invisible: !s && !e.intersect(o),
  26038. isAboveViewRoot: s
  26039. }, !0);
  26040. var l = new ze(e.x - o.x, e.y - o.y, e.width, e.height);
  26041. GD(t.viewChildren || [], (function (t) {
  26042. KD(t, l, n, i, r + 1)
  26043. }))
  26044. }
  26045. }
  26046. function $D(t) {
  26047. return t.get(YD) ? t.get(XD) : 0
  26048. }
  26049. function JD(t) {
  26050. var e = t.findComponents({
  26051. mainType: "legend"
  26052. });
  26053. e && e.length && t.eachSeriesByType("graph", (function (t) {
  26054. var n = t.getCategoriesData(),
  26055. i = t.getGraph().data,
  26056. r = n.mapArray(n.getName);
  26057. i.filterSelf((function (t) {
  26058. var n = i.getItemModel(t).getShallow("category");
  26059. if (null != n) {
  26060. j(n) && (n = r[n]);
  26061. for (var o = 0; o < e.length; o++)
  26062. if (!e[o].isSelected(n)) return !1
  26063. }
  26064. return !0
  26065. }))
  26066. }))
  26067. }
  26068. function QD(t) {
  26069. var e = {};
  26070. t.eachSeriesByType("graph", (function (t) {
  26071. var n = t.getCategoriesData(),
  26072. i = t.getData(),
  26073. r = {};
  26074. n.each((function (i) {
  26075. var o = n.getName(i);
  26076. r["ec-" + o] = i;
  26077. var a = n.getItemModel(i),
  26078. s = a.getModel("itemStyle").getItemStyle();
  26079. s.fill || (s.fill = t.getColorFromPalette(o, e)), n.setItemVisual(i, "style", s);
  26080. for (var l = ["symbol", "symbolSize", "symbolKeepAspect"], u = 0; u < l.length; u++) {
  26081. var h = a.getShallow(l[u], !0);
  26082. null != h && n.setItemVisual(i, l[u], h)
  26083. }
  26084. })), n.count() && i.each((function (t) {
  26085. var e = i.getItemModel(t).getShallow("category");
  26086. if (null != e) {
  26087. U(e) && (e = r["ec-" + e]);
  26088. var o = n.getItemVisual(e, "style");
  26089. A(i.ensureUniqueItemVisual(t, "style"), o);
  26090. for (var a = ["symbol", "symbolSize", "symbolKeepAspect"], s = 0; s < a.length; s++) i.setItemVisual(t, a[s], n.getItemVisual(e, a[s]))
  26091. }
  26092. }))
  26093. }))
  26094. }
  26095. function tA(t) {
  26096. return t instanceof Array || (t = [t, t]), t
  26097. }
  26098. function eA(t) {
  26099. t.eachSeriesByType("graph", (function (t) {
  26100. var e = t.getGraph(),
  26101. n = t.getEdgeData(),
  26102. i = tA(t.get("edgeSymbol")),
  26103. r = tA(t.get("edgeSymbolSize"));
  26104. n.setVisual("fromSymbol", i && i[0]), n.setVisual("toSymbol", i && i[1]), n.setVisual("fromSymbolSize", r && r[0]), n.setVisual("toSymbolSize", r && r[1]), n.setVisual("style", t.getModel("lineStyle").getLineStyle()), n.each((function (t) {
  26105. var i = n.getItemModel(t),
  26106. r = e.getEdgeByIndex(t),
  26107. o = tA(i.getShallow("symbol", !0)),
  26108. a = tA(i.getShallow("symbolSize", !0)),
  26109. s = i.getModel("lineStyle").getLineStyle(),
  26110. l = n.ensureUniqueItemVisual(t, "style");
  26111. switch (A(l, s), l.stroke) {
  26112. case "source":
  26113. var u = r.node1.getVisual("style");
  26114. l.stroke = u && u.fill;
  26115. break;
  26116. case "target":
  26117. u = r.node2.getVisual("style");
  26118. l.stroke = u && u.fill
  26119. }
  26120. o[0] && r.setVisual("fromSymbol", o[0]), o[1] && r.setVisual("toSymbol", o[1]), a[0] && r.setVisual("fromSymbolSize", a[0]), a[1] && r.setVisual("toSymbolSize", a[1])
  26121. }))
  26122. }))
  26123. }
  26124. var nA = "--\x3e",
  26125. iA = function (t) {
  26126. return t.get("autoCurveness") || null
  26127. },
  26128. rA = function (t, e) {
  26129. var n = iA(t),
  26130. i = 20,
  26131. r = [];
  26132. if (j(n)) i = n;
  26133. else if (Y(n)) return void(t.__curvenessList = n);
  26134. e > i && (i = e);
  26135. var o = i % 2 ? i + 2 : i + 3;
  26136. r = [];
  26137. for (var a = 0; a < o; a++) r.push((a % 2 ? a + 1 : a) / 10 * (a % 2 ? -1 : 1));
  26138. t.__curvenessList = r
  26139. },
  26140. oA = function (t, e, n) {
  26141. var i = [t.id, t.dataIndex].join("."),
  26142. r = [e.id, e.dataIndex].join(".");
  26143. return [n.uid, i, r].join(nA)
  26144. },
  26145. aA = function (t) {
  26146. var e = t.split(nA);
  26147. return [e[0], e[2], e[1]].join(nA)
  26148. },
  26149. sA = function (t, e) {
  26150. var n = e.__edgeMap;
  26151. return n[t] ? n[t].length : 0
  26152. };
  26153. function lA(t, e, n, i) {
  26154. var r = iA(e),
  26155. o = Y(r);
  26156. if (!r) return null;
  26157. var a = function (t, e) {
  26158. var n = oA(t.node1, t.node2, e);
  26159. return e.__edgeMap[n]
  26160. }(t, e);
  26161. if (!a) return null;
  26162. for (var s = -1, l = 0; l < a.length; l++)
  26163. if (a[l] === n) {
  26164. s = l;
  26165. break
  26166. } var u = function (t, e) {
  26167. return sA(oA(t.node1, t.node2, e), e) + sA(oA(t.node2, t.node1, e), e)
  26168. }(t, e);
  26169. rA(e, u), t.lineStyle = t.lineStyle || {};
  26170. var h = oA(t.node1, t.node2, e),
  26171. c = e.__curvenessList,
  26172. p = o || u % 2 ? 0 : 1;
  26173. if (a.isForward) return c[p + s];
  26174. var d = aA(h),
  26175. f = sA(d, e),
  26176. g = c[s + f + p];
  26177. return i ? o ? r && 0 === r[0] ? (f + p) % 2 ? g : -g : ((f % 2 ? 0 : 1) + p) % 2 ? g : -g : (f + p) % 2 ? g : -g : c[s + f + p]
  26178. }
  26179. function uA(t) {
  26180. var e = t.coordinateSystem;
  26181. if (!e || "view" === e.type) {
  26182. var n = t.getGraph();
  26183. n.eachNode((function (t) {
  26184. var e = t.getModel();
  26185. t.setLayout([+e.get("x"), +e.get("y")])
  26186. })), hA(n, t)
  26187. }
  26188. }
  26189. function hA(t, e) {
  26190. t.eachEdge((function (t, n) {
  26191. var i = ot(t.getModel().get(["lineStyle", "curveness"]), -lA(t, e, n, !0), 0),
  26192. r = Tt(t.node1.getLayout()),
  26193. o = Tt(t.node2.getLayout()),
  26194. a = [r, o]; + i && a.push([(r[0] + o[0]) / 2 - (r[1] - o[1]) * i, (r[1] + o[1]) / 2 - (o[0] - r[0]) * i]), t.setLayout(a)
  26195. }))
  26196. }
  26197. function cA(t, e) {
  26198. t.eachSeriesByType("graph", (function (t) {
  26199. var e = t.get("layout"),
  26200. n = t.coordinateSystem;
  26201. if (n && "view" !== n.type) {
  26202. var i = t.getData(),
  26203. r = [];
  26204. E(n.dimensions, (function (t) {
  26205. r = r.concat(i.mapDimensionsAll(t))
  26206. }));
  26207. for (var o = 0; o < i.count(); o++) {
  26208. for (var a = [], s = !1, l = 0; l < r.length; l++) {
  26209. var u = i.get(r[l], o);
  26210. isNaN(u) || (s = !0), a.push(u)
  26211. }
  26212. s ? i.setItemLayout(o, n.dataToPoint(a)) : i.setItemLayout(o, [NaN, NaN])
  26213. }
  26214. hA(i.graph, t)
  26215. } else e && "none" !== e || uA(t)
  26216. }))
  26217. }
  26218. function pA(t) {
  26219. var e = t.coordinateSystem;
  26220. if ("view" !== e.type) return 1;
  26221. var n = t.option.nodeScaleRatio,
  26222. i = e.scaleX;
  26223. return ((e.getZoom() - 1) * n + 1) / i
  26224. }
  26225. function dA(t) {
  26226. var e = t.getVisual("symbolSize");
  26227. return e instanceof Array && (e = (e[0] + e[1]) / 2), +e
  26228. }
  26229. var fA = Math.PI,
  26230. gA = [];
  26231. function yA(t, e, n, i) {
  26232. var r = t.coordinateSystem;
  26233. if (!r || "view" === r.type) {
  26234. var o = r.getBoundingRect(),
  26235. a = t.getData(),
  26236. s = a.graph,
  26237. l = o.width / 2 + o.x,
  26238. u = o.height / 2 + o.y,
  26239. h = Math.min(o.width, o.height) / 2,
  26240. c = a.count();
  26241. if (a.setLayout({
  26242. cx: l,
  26243. cy: u
  26244. }), c) {
  26245. if (n) {
  26246. var p = r.pointToData(i),
  26247. d = p[0],
  26248. f = p[1],
  26249. g = [d - l, f - u];
  26250. Et(g, g), Nt(g, g, h), n.setLayout([l + g[0], u + g[1]], !0), mA(n, t.get(["circular", "rotateLabel"]), l, u)
  26251. }
  26252. vA[e](t, s, a, h, l, u, c), s.eachEdge((function (e, n) {
  26253. var i, r = ot(e.getModel().get(["lineStyle", "curveness"]), lA(e, t, n), 0),
  26254. o = Tt(e.node1.getLayout()),
  26255. a = Tt(e.node2.getLayout()),
  26256. s = (o[0] + a[0]) / 2,
  26257. h = (o[1] + a[1]) / 2; + r && (i = [l * (r *= 3) + s * (1 - r), u * r + h * (1 - r)]), e.setLayout([o, a, i])
  26258. }))
  26259. }
  26260. }
  26261. }
  26262. var vA = {
  26263. value: function (t, e, n, i, r, o, a) {
  26264. var s = 0,
  26265. l = n.getSum("value"),
  26266. u = 2 * Math.PI / (l || a);
  26267. e.eachNode((function (t) {
  26268. var e = t.getValue("value"),
  26269. n = u * (l ? e : 1) / 2;
  26270. s += n, t.setLayout([i * Math.cos(s) + r, i * Math.sin(s) + o]), s += n
  26271. }))
  26272. },
  26273. symbolSize: function (t, e, n, i, r, o, a) {
  26274. var s = 0;
  26275. gA.length = a;
  26276. var l = pA(t);
  26277. e.eachNode((function (t) {
  26278. var e = dA(t);
  26279. isNaN(e) && (e = 2), e < 0 && (e = 0), e *= l;
  26280. var n = Math.asin(e / 2 / i);
  26281. isNaN(n) && (n = fA / 2), gA[t.dataIndex] = n, s += 2 * n
  26282. }));
  26283. var u = (2 * fA - s) / a / 2,
  26284. h = 0;
  26285. e.eachNode((function (t) {
  26286. var e = u + gA[t.dataIndex];
  26287. h += e, (!t.getLayout() || !t.getLayout().fixed) && t.setLayout([i * Math.cos(h) + r, i * Math.sin(h) + o]), h += e
  26288. }))
  26289. }
  26290. };
  26291. function mA(t, e, n, i) {
  26292. var r = t.getGraphicEl();
  26293. if (r) {
  26294. var o = t.getModel().get(["label", "rotate"]) || 0,
  26295. a = r.getSymbolPath();
  26296. if (e) {
  26297. var s = t.getLayout(),
  26298. l = Math.atan2(s[1] - i, s[0] - n);
  26299. l < 0 && (l = 2 * Math.PI + l);
  26300. var u = s[0] < n;
  26301. u && (l -= Math.PI);
  26302. var h = u ? "left" : "right";
  26303. a.setTextConfig({
  26304. rotation: -l,
  26305. position: h,
  26306. origin: "center"
  26307. });
  26308. var c = a.ensureState("emphasis");
  26309. A(c.textConfig || (c.textConfig = {}), {
  26310. position: h
  26311. })
  26312. } else a.setTextConfig({
  26313. rotation: o *= Math.PI / 180
  26314. })
  26315. }
  26316. }
  26317. function xA(t) {
  26318. t.eachSeriesByType("graph", (function (t) {
  26319. "circular" === t.get("layout") && yA(t, "symbolSize")
  26320. }))
  26321. }
  26322. var _A = At;
  26323. function bA(t) {
  26324. t.eachSeriesByType("graph", (function (t) {
  26325. var e = t.coordinateSystem;
  26326. if (!e || "view" === e.type)
  26327. if ("force" === t.get("layout")) {
  26328. var n = t.preservedPoints || {},
  26329. i = t.getGraph(),
  26330. r = i.data,
  26331. o = i.edgeData,
  26332. a = t.getModel("force"),
  26333. s = a.get("initLayout");
  26334. t.preservedPoints ? r.each((function (t) {
  26335. var e = r.getId(t);
  26336. r.setItemLayout(t, n[e] || [NaN, NaN])
  26337. })) : s && "none" !== s ? "circular" === s && yA(t, "value") : uA(t);
  26338. var l = r.getDataExtent("value"),
  26339. u = o.getDataExtent("value"),
  26340. h = a.get("repulsion"),
  26341. c = a.get("edgeLength"),
  26342. p = Y(h) ? h : [h, h],
  26343. d = Y(c) ? c : [c, c];
  26344. d = [d[1], d[0]];
  26345. var f = r.mapArray("value", (function (t, e) {
  26346. var n = r.getItemLayout(e),
  26347. i = Xr(t, l, p);
  26348. return isNaN(i) && (i = (p[0] + p[1]) / 2), {
  26349. w: i,
  26350. rep: i,
  26351. fixed: r.getItemModel(e).get("fixed"),
  26352. p: !n || isNaN(n[0]) || isNaN(n[1]) ? null : n
  26353. }
  26354. })),
  26355. g = o.mapArray("value", (function (e, n) {
  26356. var r = i.getEdgeByIndex(n),
  26357. o = Xr(e, u, d);
  26358. isNaN(o) && (o = (d[0] + d[1]) / 2);
  26359. var a = r.getModel(),
  26360. s = ot(r.getModel().get(["lineStyle", "curveness"]), -lA(r, t, n, !0), 0);
  26361. return {
  26362. n1: f[r.node1.dataIndex],
  26363. n2: f[r.node2.dataIndex],
  26364. d: o,
  26365. curveness: s,
  26366. ignoreForceLayout: a.get("ignoreForceLayout")
  26367. }
  26368. })),
  26369. y = e.getBoundingRect(),
  26370. v = function (t, e, n) {
  26371. for (var i = t, r = e, o = n.rect, a = o.width, s = o.height, l = [o.x + a / 2, o.y + s / 2], u = null == n.gravity ? .1 : n.gravity, h = 0; h < i.length; h++) {
  26372. var c = i[h];
  26373. c.p || (c.p = Mt(a * (Math.random() - .5) + l[0], s * (Math.random() - .5) + l[1])), c.pp = Tt(c.p), c.edges = null
  26374. }
  26375. var p, d, f = null == n.friction ? .6 : n.friction,
  26376. g = f;
  26377. return {
  26378. warmUp: function () {
  26379. g = .8 * f
  26380. },
  26381. setFixed: function (t) {
  26382. i[t].fixed = !0
  26383. },
  26384. setUnfixed: function (t) {
  26385. i[t].fixed = !1
  26386. },
  26387. beforeStep: function (t) {
  26388. p = t
  26389. },
  26390. afterStep: function (t) {
  26391. d = t
  26392. },
  26393. step: function (t) {
  26394. p && p(i, r);
  26395. for (var e = [], n = i.length, o = 0; o < r.length; o++) {
  26396. var a = r[o];
  26397. if (!a.ignoreForceLayout) {
  26398. var s = a.n1;
  26399. kt(e, (y = a.n2).p, s.p);
  26400. var h = Lt(e) - a.d,
  26401. c = y.w / (s.w + y.w);
  26402. isNaN(c) && (c = 0), Et(e, e), !s.fixed && _A(s.p, s.p, e, c * h * g), !y.fixed && _A(y.p, y.p, e, -(1 - c) * h * g)
  26403. }
  26404. }
  26405. for (o = 0; o < n; o++)(x = i[o]).fixed || (kt(e, l, x.p), _A(x.p, x.p, e, u * g));
  26406. for (o = 0; o < n; o++) {
  26407. s = i[o];
  26408. for (var f = o + 1; f < n; f++) {
  26409. var y;
  26410. kt(e, (y = i[f]).p, s.p), 0 === (h = Lt(e)) && (Ct(e, Math.random() - .5, Math.random() - .5), h = 1);
  26411. var v = (s.rep + y.rep) / h / h;
  26412. !s.fixed && _A(s.pp, s.pp, e, v), !y.fixed && _A(y.pp, y.pp, e, -v)
  26413. }
  26414. }
  26415. var m = [];
  26416. for (o = 0; o < n; o++) {
  26417. var x;
  26418. (x = i[o]).fixed || (kt(m, x.p, x.pp), _A(x.p, x.p, m, g), It(x.pp, x.p))
  26419. }
  26420. var _ = (g *= .992) < .01;
  26421. d && d(i, r, _), t && t(_)
  26422. }
  26423. }
  26424. }(f, g, {
  26425. rect: y,
  26426. gravity: a.get("gravity"),
  26427. friction: a.get("friction")
  26428. });
  26429. v.beforeStep((function (t, e) {
  26430. for (var n = 0, r = t.length; n < r; n++) t[n].fixed && It(t[n].p, i.getNodeByIndex(n).getLayout())
  26431. })), v.afterStep((function (t, e, o) {
  26432. for (var a = 0, s = t.length; a < s; a++) t[a].fixed || i.getNodeByIndex(a).setLayout(t[a].p), n[r.getId(a)] = t[a].p;
  26433. for (a = 0, s = e.length; a < s; a++) {
  26434. var l = e[a],
  26435. u = i.getEdgeByIndex(a),
  26436. h = l.n1.p,
  26437. c = l.n2.p,
  26438. p = u.getLayout();
  26439. (p = p ? p.slice() : [])[0] = p[0] || [], p[1] = p[1] || [], It(p[0], h), It(p[1], c), +l.curveness && (p[2] = [(h[0] + c[0]) / 2 - (h[1] - c[1]) * l.curveness, (h[1] + c[1]) / 2 - (c[0] - h[0]) * l.curveness]), u.setLayout(p)
  26440. }
  26441. })), t.forceLayout = v, t.preservedPoints = n, v.step()
  26442. } else t.forceLayout = null
  26443. }))
  26444. }
  26445. function wA(t, e) {
  26446. var n = [];
  26447. return t.eachSeriesByType("graph", (function (t) {
  26448. var i = t.get("coordinateSystem");
  26449. if (!i || "view" === i) {
  26450. var r = t.getData(),
  26451. o = [],
  26452. a = [];
  26453. Ra(r.mapArray((function (t) {
  26454. var e = r.getItemModel(t);
  26455. return [+e.get("x"), +e.get("y")]
  26456. })), o, a), a[0] - o[0] == 0 && (a[0] += 1, o[0] -= 1), a[1] - o[1] == 0 && (a[1] += 1, o[1] -= 1);
  26457. var s = (a[0] - o[0]) / (a[1] - o[1]),
  26458. l = function (t, e, n) {
  26459. return Cp(A(t.getBoxLayoutParams(), {
  26460. aspect: n
  26461. }), {
  26462. width: e.getWidth(),
  26463. height: e.getHeight()
  26464. })
  26465. }(t, e, s);
  26466. isNaN(s) && (o = [l.x, l.y], a = [l.x + l.width, l.y + l.height]);
  26467. var u = a[0] - o[0],
  26468. h = a[1] - o[1],
  26469. c = l.width,
  26470. p = l.height,
  26471. d = t.coordinateSystem = new iC;
  26472. d.zoomLimit = t.get("scaleLimit"), d.setBoundingRect(o[0], o[1], u, h), d.setViewRect(l.x, l.y, c, p), d.setCenter(t.get("center"), e), d.setZoom(t.get("zoom")), n.push(d)
  26473. }
  26474. })), n
  26475. }
  26476. var SA = Zu.prototype,
  26477. MA = $u.prototype,
  26478. IA = function () {
  26479. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1
  26480. };
  26481. ! function (t) {
  26482. function e() {
  26483. return null !== t && t.apply(this, arguments) || this
  26484. }
  26485. n(e, t)
  26486. }(IA);
  26487. function TA(t) {
  26488. return isNaN(+t.cpx1) || isNaN(+t.cpy1)
  26489. }
  26490. var CA = function (t) {
  26491. function e(e) {
  26492. var n = t.call(this, e) || this;
  26493. return n.type = "ec-line", n
  26494. }
  26495. return n(e, t), e.prototype.getDefaultStyle = function () {
  26496. return {
  26497. stroke: "#000",
  26498. fill: null
  26499. }
  26500. }, e.prototype.getDefaultShape = function () {
  26501. return new IA
  26502. }, e.prototype.buildPath = function (t, e) {
  26503. TA(e) ? SA.buildPath.call(this, t, e) : MA.buildPath.call(this, t, e)
  26504. }, e.prototype.pointAt = function (t) {
  26505. return TA(this.shape) ? SA.pointAt.call(this, t) : MA.pointAt.call(this, t)
  26506. }, e.prototype.tangentAt = function (t) {
  26507. var e = this.shape,
  26508. n = TA(e) ? [e.x2 - e.x1, e.y2 - e.y1] : MA.tangentAt.call(this, t);
  26509. return Et(n, n)
  26510. }, e
  26511. }(Is),
  26512. DA = ["fromSymbol", "toSymbol"];
  26513. function AA(t) {
  26514. return "_" + t + "Type"
  26515. }
  26516. function kA(t, e, n) {
  26517. var i = e.getItemVisual(n, t);
  26518. if (i && "none" !== i) {
  26519. var r = e.getItemVisual(n, t + "Size"),
  26520. o = e.getItemVisual(n, t + "Rotate"),
  26521. a = e.getItemVisual(n, t + "Offset"),
  26522. s = e.getItemVisual(n, t + "KeepAspect"),
  26523. l = Hy(r),
  26524. u = Yy(a || 0, l),
  26525. h = Wy(i, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
  26526. return h.__specifiedRotation = null == o || isNaN(o) ? void 0 : +o * Math.PI / 180 || 0, h.name = t, h
  26527. }
  26528. }
  26529. function LA(t, e) {
  26530. t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
  26531. var n = e[2];
  26532. n ? (t.cpx1 = n[0], t.cpy1 = n[1]) : (t.cpx1 = NaN, t.cpy1 = NaN)
  26533. }
  26534. var PA = function (t) {
  26535. function e(e, n, i) {
  26536. var r = t.call(this) || this;
  26537. return r._createLine(e, n, i), r
  26538. }
  26539. return n(e, t), e.prototype._createLine = function (t, e, n) {
  26540. var i = t.hostModel,
  26541. r = function (t) {
  26542. var e = new CA({
  26543. name: "line",
  26544. subPixelOptimize: !0
  26545. });
  26546. return LA(e.shape, t), e
  26547. }(t.getItemLayout(e));
  26548. r.shape.percent = 0, gh(r, {
  26549. shape: {
  26550. percent: 1
  26551. }
  26552. }, i, e), this.add(r), E(DA, (function (n) {
  26553. var i = kA(n, t, e);
  26554. this.add(i), this[AA(n)] = t.getItemVisual(e, n)
  26555. }), this), this._updateCommonStl(t, e, n)
  26556. }, e.prototype.updateData = function (t, e, n) {
  26557. var i = t.hostModel,
  26558. r = this.childOfName("line"),
  26559. o = t.getItemLayout(e),
  26560. a = {
  26561. shape: {}
  26562. };
  26563. LA(a.shape, o), fh(r, a, i, e), E(DA, (function (n) {
  26564. var i = t.getItemVisual(e, n),
  26565. r = AA(n);
  26566. if (this[r] !== i) {
  26567. this.remove(this.childOfName(n));
  26568. var o = kA(n, t, e);
  26569. this.add(o)
  26570. }
  26571. this[r] = i
  26572. }), this), this._updateCommonStl(t, e, n)
  26573. }, e.prototype.getLinePath = function () {
  26574. return this.childAt(0)
  26575. }, e.prototype._updateCommonStl = function (t, e, n) {
  26576. var i = t.hostModel,
  26577. r = this.childOfName("line"),
  26578. o = n && n.emphasisLineStyle,
  26579. a = n && n.blurLineStyle,
  26580. s = n && n.selectLineStyle,
  26581. l = n && n.labelStatesModels,
  26582. u = n && n.emphasisDisabled,
  26583. h = n && n.focus,
  26584. c = n && n.blurScope;
  26585. if (!n || t.hasItemOption) {
  26586. var p = t.getItemModel(e),
  26587. d = p.getModel("emphasis");
  26588. o = d.getModel("lineStyle").getLineStyle(), a = p.getModel(["blur", "lineStyle"]).getLineStyle(), s = p.getModel(["select", "lineStyle"]).getLineStyle(), u = d.get("disabled"), h = d.get("focus"), c = d.get("blurScope"), l = ec(p)
  26589. }
  26590. var f = t.getItemVisual(e, "style"),
  26591. g = f.stroke;
  26592. r.useStyle(f), r.style.fill = null, r.style.strokeNoScale = !0, r.ensureState("emphasis").style = o, r.ensureState("blur").style = a, r.ensureState("select").style = s, E(DA, (function (t) {
  26593. var e = this.childOfName(t);
  26594. if (e) {
  26595. e.setColor(g), e.style.opacity = f.opacity;
  26596. for (var n = 0; n < ol.length; n++) {
  26597. var i = ol[n],
  26598. o = r.getState(i);
  26599. if (o) {
  26600. var a = o.style || {},
  26601. s = e.ensureState(i),
  26602. l = s.style || (s.style = {});
  26603. null != a.stroke && (l[e.__isEmptyBrush ? "stroke" : "fill"] = a.stroke), null != a.opacity && (l.opacity = a.opacity)
  26604. }
  26605. }
  26606. e.markRedraw()
  26607. }
  26608. }), this);
  26609. var y = i.getRawValue(e);
  26610. tc(this, l, {
  26611. labelDataIndex: e,
  26612. labelFetcher: {
  26613. getFormattedLabel: function (e, n) {
  26614. return i.getFormattedLabel(e, n, t.dataType)
  26615. }
  26616. },
  26617. inheritColor: g || "#000",
  26618. defaultOpacity: f.opacity,
  26619. defaultText: (null == y ? t.getName(e) : isFinite(y) ? Zr(y) : y) + ""
  26620. });
  26621. var v = this.getTextContent();
  26622. if (v) {
  26623. var m = l.normal;
  26624. v.__align = v.style.align, v.__verticalAlign = v.style.verticalAlign, v.__position = m.get("position") || "middle";
  26625. var x = m.get("distance");
  26626. Y(x) || (x = [x, x]), v.__labelDistance = x
  26627. }
  26628. this.setTextConfig({
  26629. position: null,
  26630. local: !0,
  26631. inside: !1
  26632. }), Yl(this, h, c, u)
  26633. }, e.prototype.highlight = function () {
  26634. kl(this)
  26635. }, e.prototype.downplay = function () {
  26636. Ll(this)
  26637. }, e.prototype.updateLayout = function (t, e) {
  26638. this.setLinePoints(t.getItemLayout(e))
  26639. }, e.prototype.setLinePoints = function (t) {
  26640. var e = this.childOfName("line");
  26641. LA(e.shape, t), e.dirty()
  26642. }, e.prototype.beforeUpdate = function () {
  26643. var t = this,
  26644. e = t.childOfName("fromSymbol"),
  26645. n = t.childOfName("toSymbol"),
  26646. i = t.getTextContent();
  26647. if (e || n || i && !i.ignore) {
  26648. for (var r = 1, o = this.parent; o;) o.scaleX && (r /= o.scaleX), o = o.parent;
  26649. var a = t.childOfName("line");
  26650. if (this.__dirty || a.__dirty) {
  26651. var s = a.shape.percent,
  26652. l = a.pointAt(0),
  26653. u = a.pointAt(s),
  26654. h = kt([], u, l);
  26655. if (Et(h, h), e && (e.setPosition(l), S(e, 0), e.scaleX = e.scaleY = r * s, e.markRedraw()), n && (n.setPosition(u), S(n, 1), n.scaleX = n.scaleY = r * s, n.markRedraw()), i && !i.ignore) {
  26656. i.x = i.y = 0, i.originX = i.originY = 0;
  26657. var c = void 0,
  26658. p = void 0,
  26659. d = i.__labelDistance,
  26660. f = d[0] * r,
  26661. g = d[1] * r,
  26662. y = s / 2,
  26663. v = a.tangentAt(y),
  26664. m = [v[1], -v[0]],
  26665. x = a.pointAt(y);
  26666. m[1] > 0 && (m[0] = -m[0], m[1] = -m[1]);
  26667. var _ = v[0] < 0 ? -1 : 1;
  26668. if ("start" !== i.__position && "end" !== i.__position) {
  26669. var b = -Math.atan2(v[1], v[0]);
  26670. u[0] < l[0] && (b = Math.PI + b), i.rotation = b
  26671. }
  26672. var w = void 0;
  26673. switch (i.__position) {
  26674. case "insideStartTop":
  26675. case "insideMiddleTop":
  26676. case "insideEndTop":
  26677. case "middle":
  26678. w = -g, p = "bottom";
  26679. break;
  26680. case "insideStartBottom":
  26681. case "insideMiddleBottom":
  26682. case "insideEndBottom":
  26683. w = g, p = "top";
  26684. break;
  26685. default:
  26686. w = 0, p = "middle"
  26687. }
  26688. switch (i.__position) {
  26689. case "end":
  26690. i.x = h[0] * f + u[0], i.y = h[1] * g + u[1], c = h[0] > .8 ? "left" : h[0] < -.8 ? "right" : "center", p = h[1] > .8 ? "top" : h[1] < -.8 ? "bottom" : "middle";
  26691. break;
  26692. case "start":
  26693. i.x = -h[0] * f + l[0], i.y = -h[1] * g + l[1], c = h[0] > .8 ? "right" : h[0] < -.8 ? "left" : "center", p = h[1] > .8 ? "bottom" : h[1] < -.8 ? "top" : "middle";
  26694. break;
  26695. case "insideStartTop":
  26696. case "insideStart":
  26697. case "insideStartBottom":
  26698. i.x = f * _ + l[0], i.y = l[1] + w, c = v[0] < 0 ? "right" : "left", i.originX = -f * _, i.originY = -w;
  26699. break;
  26700. case "insideMiddleTop":
  26701. case "insideMiddle":
  26702. case "insideMiddleBottom":
  26703. case "middle":
  26704. i.x = x[0], i.y = x[1] + w, c = "center", i.originY = -w;
  26705. break;
  26706. case "insideEndTop":
  26707. case "insideEnd":
  26708. case "insideEndBottom":
  26709. i.x = -f * _ + u[0], i.y = u[1] + w, c = v[0] >= 0 ? "right" : "left", i.originX = f * _, i.originY = -w
  26710. }
  26711. i.scaleX = i.scaleY = r, i.setStyle({
  26712. verticalAlign: i.__verticalAlign || p,
  26713. align: i.__align || c
  26714. })
  26715. }
  26716. }
  26717. }
  26718. function S(t, e) {
  26719. var n = t.__specifiedRotation;
  26720. if (null == n) {
  26721. var i = a.tangentAt(e);
  26722. t.attr("rotation", (1 === e ? -1 : 1) * Math.PI / 2 - Math.atan2(i[1], i[0]))
  26723. } else t.attr("rotation", n)
  26724. }
  26725. }, e
  26726. }(zr),
  26727. OA = function () {
  26728. function t(t) {
  26729. this.group = new zr, this._LineCtor = t || PA
  26730. }
  26731. return t.prototype.updateData = function (t) {
  26732. var e = this;
  26733. this._progressiveEls = null;
  26734. var n = this,
  26735. i = n.group,
  26736. r = n._lineData;
  26737. n._lineData = t, r || i.removeAll();
  26738. var o = RA(t);
  26739. t.diff(r).add((function (n) {
  26740. e._doAdd(t, n, o)
  26741. })).update((function (n, i) {
  26742. e._doUpdate(r, t, i, n, o)
  26743. })).remove((function (t) {
  26744. i.remove(r.getItemGraphicEl(t))
  26745. })).execute()
  26746. }, t.prototype.updateLayout = function () {
  26747. var t = this._lineData;
  26748. t && t.eachItemGraphicEl((function (e, n) {
  26749. e.updateLayout(t, n)
  26750. }), this)
  26751. }, t.prototype.incrementalPrepareUpdate = function (t) {
  26752. this._seriesScope = RA(t), this._lineData = null, this.group.removeAll()
  26753. }, t.prototype.incrementalUpdate = function (t, e) {
  26754. function n(t) {
  26755. t.isGroup || function (t) {
  26756. return t.animators && t.animators.length > 0
  26757. }(t) || (t.incremental = !0, t.ensureState("emphasis").hoverLayer = !0)
  26758. }
  26759. this._progressiveEls = [];
  26760. for (var i = t.start; i < t.end; i++) {
  26761. if (EA(e.getItemLayout(i))) {
  26762. var r = new this._LineCtor(e, i, this._seriesScope);
  26763. r.traverse(n), this.group.add(r), e.setItemGraphicEl(i, r), this._progressiveEls.push(r)
  26764. }
  26765. }
  26766. }, t.prototype.remove = function () {
  26767. this.group.removeAll()
  26768. }, t.prototype.eachRendered = function (t) {
  26769. qh(this._progressiveEls || this.group, t)
  26770. }, t.prototype._doAdd = function (t, e, n) {
  26771. if (EA(t.getItemLayout(e))) {
  26772. var i = new this._LineCtor(t, e, n);
  26773. t.setItemGraphicEl(e, i), this.group.add(i)
  26774. }
  26775. }, t.prototype._doUpdate = function (t, e, n, i, r) {
  26776. var o = t.getItemGraphicEl(n);
  26777. EA(e.getItemLayout(i)) ? (o ? o.updateData(e, i, r) : o = new this._LineCtor(e, i, r), e.setItemGraphicEl(i, o), this.group.add(o)) : this.group.remove(o)
  26778. }, t
  26779. }();
  26780. function RA(t) {
  26781. var e = t.hostModel,
  26782. n = e.getModel("emphasis");
  26783. return {
  26784. lineStyle: e.getModel("lineStyle").getLineStyle(),
  26785. emphasisLineStyle: n.getModel(["lineStyle"]).getLineStyle(),
  26786. blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
  26787. selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
  26788. emphasisDisabled: n.get("disabled"),
  26789. blurScope: n.get("blurScope"),
  26790. focus: n.get("focus"),
  26791. labelStatesModels: ec(e)
  26792. }
  26793. }
  26794. function NA(t) {
  26795. return isNaN(t[0]) || isNaN(t[1])
  26796. }
  26797. function EA(t) {
  26798. return t && !NA(t[0]) && !NA(t[1])
  26799. }
  26800. var zA = [],
  26801. VA = [],
  26802. BA = [],
  26803. FA = In,
  26804. GA = Ft,
  26805. WA = Math.abs;
  26806. function HA(t, e, n) {
  26807. for (var i, r = t[0], o = t[1], a = t[2], s = 1 / 0, l = n * n, u = .1, h = .1; h <= .9; h += .1) {
  26808. zA[0] = FA(r[0], o[0], a[0], h), zA[1] = FA(r[1], o[1], a[1], h), (d = WA(GA(zA, e) - l)) < s && (s = d, i = h)
  26809. }
  26810. for (var c = 0; c < 32; c++) {
  26811. var p = i + u;
  26812. VA[0] = FA(r[0], o[0], a[0], i), VA[1] = FA(r[1], o[1], a[1], i), BA[0] = FA(r[0], o[0], a[0], p), BA[1] = FA(r[1], o[1], a[1], p);
  26813. var d = GA(VA, e) - l;
  26814. if (WA(d) < .01) break;
  26815. var f = GA(BA, e) - l;
  26816. u /= 2, d < 0 ? f >= 0 ? i += u : i -= u : f >= 0 ? i -= u : i += u
  26817. }
  26818. return i
  26819. }
  26820. function YA(t, e) {
  26821. var n = [],
  26822. i = Dn,
  26823. r = [
  26824. [],
  26825. [],
  26826. []
  26827. ],
  26828. o = [
  26829. [],
  26830. []
  26831. ],
  26832. a = [];
  26833. e /= 2, t.eachEdge((function (t, s) {
  26834. var l = t.getLayout(),
  26835. u = t.getVisual("fromSymbol"),
  26836. h = t.getVisual("toSymbol");
  26837. l.__original || (l.__original = [Tt(l[0]), Tt(l[1])], l[2] && l.__original.push(Tt(l[2])));
  26838. var c = l.__original;
  26839. if (null != l[2]) {
  26840. if (It(r[0], c[0]), It(r[1], c[2]), It(r[2], c[1]), u && "none" !== u) {
  26841. var p = dA(t.node1),
  26842. d = HA(r, c[0], p * e);
  26843. i(r[0][0], r[1][0], r[2][0], d, n), r[0][0] = n[3], r[1][0] = n[4], i(r[0][1], r[1][1], r[2][1], d, n), r[0][1] = n[3], r[1][1] = n[4]
  26844. }
  26845. if (h && "none" !== h) {
  26846. p = dA(t.node2), d = HA(r, c[1], p * e);
  26847. i(r[0][0], r[1][0], r[2][0], d, n), r[1][0] = n[1], r[2][0] = n[2], i(r[0][1], r[1][1], r[2][1], d, n), r[1][1] = n[1], r[2][1] = n[2]
  26848. }
  26849. It(l[0], r[0]), It(l[1], r[2]), It(l[2], r[1])
  26850. } else {
  26851. if (It(o[0], c[0]), It(o[1], c[1]), kt(a, o[1], o[0]), Et(a, a), u && "none" !== u) {
  26852. p = dA(t.node1);
  26853. At(o[0], o[0], a, p * e)
  26854. }
  26855. if (h && "none" !== h) {
  26856. p = dA(t.node2);
  26857. At(o[1], o[1], a, -p * e)
  26858. }
  26859. It(l[0], o[0]), It(l[1], o[1])
  26860. }
  26861. }))
  26862. }
  26863. function XA(t) {
  26864. return "view" === t.type
  26865. }
  26866. var UA = function (t) {
  26867. function e() {
  26868. var n = null !== t && t.apply(this, arguments) || this;
  26869. return n.type = e.type, n
  26870. }
  26871. return n(e, t), e.prototype.init = function (t, e) {
  26872. var n = new hS,
  26873. i = new OA,
  26874. r = this.group;
  26875. this._controller = new UI(e.getZr()), this._controllerHost = {
  26876. target: r
  26877. }, r.add(n.group), r.add(i.group), this._symbolDraw = n, this._lineDraw = i, this._firstRender = !0
  26878. }, e.prototype.render = function (t, e, n) {
  26879. var i = this,
  26880. r = t.coordinateSystem;
  26881. this._model = t;
  26882. var o = this._symbolDraw,
  26883. a = this._lineDraw,
  26884. s = this.group;
  26885. if (XA(r)) {
  26886. var l = {
  26887. x: r.x,
  26888. y: r.y,
  26889. scaleX: r.scaleX,
  26890. scaleY: r.scaleY
  26891. };
  26892. this._firstRender ? s.attr(l) : fh(s, l, t)
  26893. }
  26894. YA(t.getGraph(), pA(t));
  26895. var u = t.getData();
  26896. o.updateData(u);
  26897. var h = t.getEdgeData();
  26898. a.updateData(h), this._updateNodeAndLinkScale(), this._updateController(t, e, n), clearTimeout(this._layoutTimeout);
  26899. var c = t.forceLayout,
  26900. p = t.get(["force", "layoutAnimation"]);
  26901. c && this._startForceLayoutIteration(c, p);
  26902. var d = t.get("layout");
  26903. u.graph.eachNode((function (e) {
  26904. var n = e.dataIndex,
  26905. r = e.getGraphicEl(),
  26906. o = e.getModel();
  26907. if (r) {
  26908. r.off("drag").off("dragend");
  26909. var a = o.get("draggable");
  26910. a && r.on("drag", (function (o) {
  26911. switch (d) {
  26912. case "force":
  26913. c.warmUp(), !i._layouting && i._startForceLayoutIteration(c, p), c.setFixed(n), u.setItemLayout(n, [r.x, r.y]);
  26914. break;
  26915. case "circular":
  26916. u.setItemLayout(n, [r.x, r.y]), e.setLayout({
  26917. fixed: !0
  26918. }, !0), yA(t, "symbolSize", e, [o.offsetX, o.offsetY]), i.updateLayout(t);
  26919. break;
  26920. default:
  26921. u.setItemLayout(n, [r.x, r.y]), hA(t.getGraph(), t), i.updateLayout(t)
  26922. }
  26923. })).on("dragend", (function () {
  26924. c && c.setUnfixed(n)
  26925. })), r.setDraggable(a, !!o.get("cursor")), "adjacency" === o.get(["emphasis", "focus"]) && (Qs(r).focus = e.getAdjacentDataIndices())
  26926. }
  26927. })), u.graph.eachEdge((function (t) {
  26928. var e = t.getGraphicEl(),
  26929. n = t.getModel().get(["emphasis", "focus"]);
  26930. e && "adjacency" === n && (Qs(e).focus = {
  26931. edge: [t.dataIndex],
  26932. node: [t.node1.dataIndex, t.node2.dataIndex]
  26933. })
  26934. }));
  26935. var f = "circular" === t.get("layout") && t.get(["circular", "rotateLabel"]),
  26936. g = u.getLayout("cx"),
  26937. y = u.getLayout("cy");
  26938. u.graph.eachNode((function (t) {
  26939. mA(t, f, g, y)
  26940. })), this._firstRender = !1
  26941. }, e.prototype.dispose = function () {
  26942. this._controller && this._controller.dispose(), this._controllerHost = null
  26943. }, e.prototype._startForceLayoutIteration = function (t, e) {
  26944. var n = this;
  26945. ! function i() {
  26946. t.step((function (t) {
  26947. n.updateLayout(n._model), (n._layouting = !t) && (e ? n._layoutTimeout = setTimeout(i, 16) : i())
  26948. }))
  26949. }()
  26950. }, e.prototype._updateController = function (t, e, n) {
  26951. var i = this,
  26952. r = this._controller,
  26953. o = this._controllerHost,
  26954. a = this.group;
  26955. r.setPointerChecker((function (e, i, r) {
  26956. var o = a.getBoundingRect();
  26957. return o.applyTransform(a.transform), o.contain(i, r) && !tT(e, n, t)
  26958. })), XA(t.coordinateSystem) ? (r.enable(t.get("roam")), o.zoomLimit = t.get("scaleLimit"), o.zoom = t.coordinateSystem.getZoom(), r.off("pan").off("zoom").on("pan", (function (e) {
  26959. KI(o, e.dx, e.dy), n.dispatchAction({
  26960. seriesId: t.id,
  26961. type: "graphRoam",
  26962. dx: e.dx,
  26963. dy: e.dy
  26964. })
  26965. })).on("zoom", (function (e) {
  26966. $I(o, e.scale, e.originX, e.originY), n.dispatchAction({
  26967. seriesId: t.id,
  26968. type: "graphRoam",
  26969. zoom: e.scale,
  26970. originX: e.originX,
  26971. originY: e.originY
  26972. }), i._updateNodeAndLinkScale(), YA(t.getGraph(), pA(t)), i._lineDraw.updateLayout(), n.updateLabelLayout()
  26973. }))) : r.disable()
  26974. }, e.prototype._updateNodeAndLinkScale = function () {
  26975. var t = this._model,
  26976. e = t.getData(),
  26977. n = pA(t);
  26978. e.eachItemGraphicEl((function (t, e) {
  26979. t && t.setSymbolScale(n)
  26980. }))
  26981. }, e.prototype.updateLayout = function (t) {
  26982. YA(t.getGraph(), pA(t)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout()
  26983. }, e.prototype.remove = function (t, e) {
  26984. this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove()
  26985. }, e.type = "graph", e
  26986. }(kg);
  26987. function ZA(t) {
  26988. return "_EC_" + t
  26989. }
  26990. var jA = function () {
  26991. function t(t) {
  26992. this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = t || !1
  26993. }
  26994. return t.prototype.isDirected = function () {
  26995. return this._directed
  26996. }, t.prototype.addNode = function (t, e) {
  26997. t = null == t ? "" + e : "" + t;
  26998. var n = this._nodesMap;
  26999. if (!n[ZA(t)]) {
  27000. var i = new qA(t, e);
  27001. return i.hostGraph = this, this.nodes.push(i), n[ZA(t)] = i, i
  27002. }
  27003. }, t.prototype.getNodeByIndex = function (t) {
  27004. var e = this.data.getRawIndex(t);
  27005. return this.nodes[e]
  27006. }, t.prototype.getNodeById = function (t) {
  27007. return this._nodesMap[ZA(t)]
  27008. }, t.prototype.addEdge = function (t, e, n) {
  27009. var i = this._nodesMap,
  27010. r = this._edgesMap;
  27011. if (j(t) && (t = this.nodes[t]), j(e) && (e = this.nodes[e]), t instanceof qA || (t = i[ZA(t)]), e instanceof qA || (e = i[ZA(e)]), t && e) {
  27012. var o = t.id + "-" + e.id,
  27013. a = new KA(t, e, n);
  27014. return a.hostGraph = this, this._directed && (t.outEdges.push(a), e.inEdges.push(a)), t.edges.push(a), t !== e && e.edges.push(a), this.edges.push(a), r[o] = a, a
  27015. }
  27016. }, t.prototype.getEdgeByIndex = function (t) {
  27017. var e = this.edgeData.getRawIndex(t);
  27018. return this.edges[e]
  27019. }, t.prototype.getEdge = function (t, e) {
  27020. t instanceof qA && (t = t.id), e instanceof qA && (e = e.id);
  27021. var n = this._edgesMap;
  27022. return this._directed ? n[t + "-" + e] : n[t + "-" + e] || n[e + "-" + t]
  27023. }, t.prototype.eachNode = function (t, e) {
  27024. for (var n = this.nodes, i = n.length, r = 0; r < i; r++) n[r].dataIndex >= 0 && t.call(e, n[r], r)
  27025. }, t.prototype.eachEdge = function (t, e) {
  27026. for (var n = this.edges, i = n.length, r = 0; r < i; r++) n[r].dataIndex >= 0 && n[r].node1.dataIndex >= 0 && n[r].node2.dataIndex >= 0 && t.call(e, n[r], r)
  27027. }, t.prototype.breadthFirstTraverse = function (t, e, n, i) {
  27028. if (e instanceof qA || (e = this._nodesMap[ZA(e)]), e) {
  27029. for (var r = "out" === n ? "outEdges" : "in" === n ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++) this.nodes[o].__visited = !1;
  27030. if (!t.call(i, e, null))
  27031. for (var a = [e]; a.length;) {
  27032. var s = a.shift(),
  27033. l = s[r];
  27034. for (o = 0; o < l.length; o++) {
  27035. var u = l[o],
  27036. h = u.node1 === s ? u.node2 : u.node1;
  27037. if (!h.__visited) {
  27038. if (t.call(i, h, s)) return;
  27039. a.push(h), h.__visited = !0
  27040. }
  27041. }
  27042. }
  27043. }
  27044. }, t.prototype.update = function () {
  27045. for (var t = this.data, e = this.edgeData, n = this.nodes, i = this.edges, r = 0, o = n.length; r < o; r++) n[r].dataIndex = -1;
  27046. for (r = 0, o = t.count(); r < o; r++) n[t.getRawIndex(r)].dataIndex = r;
  27047. e.filterSelf((function (t) {
  27048. var n = i[e.getRawIndex(t)];
  27049. return n.node1.dataIndex >= 0 && n.node2.dataIndex >= 0
  27050. }));
  27051. for (r = 0, o = i.length; r < o; r++) i[r].dataIndex = -1;
  27052. for (r = 0, o = e.count(); r < o; r++) i[e.getRawIndex(r)].dataIndex = r
  27053. }, t.prototype.clone = function () {
  27054. for (var e = new t(this._directed), n = this.nodes, i = this.edges, r = 0; r < n.length; r++) e.addNode(n[r].id, n[r].dataIndex);
  27055. for (r = 0; r < i.length; r++) {
  27056. var o = i[r];
  27057. e.addEdge(o.node1.id, o.node2.id, o.dataIndex)
  27058. }
  27059. return e
  27060. }, t
  27061. }(),
  27062. qA = function () {
  27063. function t(t, e) {
  27064. this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = null == t ? "" : t, this.dataIndex = null == e ? -1 : e
  27065. }
  27066. return t.prototype.degree = function () {
  27067. return this.edges.length
  27068. }, t.prototype.inDegree = function () {
  27069. return this.inEdges.length
  27070. }, t.prototype.outDegree = function () {
  27071. return this.outEdges.length
  27072. }, t.prototype.getModel = function (t) {
  27073. if (!(this.dataIndex < 0)) return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)
  27074. }, t.prototype.getAdjacentDataIndices = function () {
  27075. for (var t = {
  27076. edge: [],
  27077. node: []
  27078. }, e = 0; e < this.edges.length; e++) {
  27079. var n = this.edges[e];
  27080. n.dataIndex < 0 || (t.edge.push(n.dataIndex), t.node.push(n.node1.dataIndex, n.node2.dataIndex))
  27081. }
  27082. return t
  27083. }, t
  27084. }(),
  27085. KA = function () {
  27086. function t(t, e, n) {
  27087. this.dataIndex = -1, this.node1 = t, this.node2 = e, this.dataIndex = null == n ? -1 : n
  27088. }
  27089. return t.prototype.getModel = function (t) {
  27090. if (!(this.dataIndex < 0)) return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)
  27091. }, t.prototype.getAdjacentDataIndices = function () {
  27092. return {
  27093. edge: [this.dataIndex],
  27094. node: [this.node1.dataIndex, this.node2.dataIndex]
  27095. }
  27096. }, t
  27097. }();
  27098. function $A(t, e) {
  27099. return {
  27100. getValue: function (n) {
  27101. var i = this[t][e];
  27102. return i.getStore().get(i.getDimensionIndex(n || "value"), this.dataIndex)
  27103. },
  27104. setVisual: function (n, i) {
  27105. this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, n, i)
  27106. },
  27107. getVisual: function (n) {
  27108. return this[t][e].getItemVisual(this.dataIndex, n)
  27109. },
  27110. setLayout: function (n, i) {
  27111. this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, n, i)
  27112. },
  27113. getLayout: function () {
  27114. return this[t][e].getItemLayout(this.dataIndex)
  27115. },
  27116. getGraphicEl: function () {
  27117. return this[t][e].getItemGraphicEl(this.dataIndex)
  27118. },
  27119. getRawIndex: function () {
  27120. return this[t][e].getRawIndex(this.dataIndex)
  27121. }
  27122. }
  27123. }
  27124. function JA(t, e, n, i, r) {
  27125. for (var o = new jA(i), a = 0; a < t.length; a++) o.addNode(it(t[a].id, t[a].name, a), a);
  27126. var s = [],
  27127. l = [],
  27128. u = 0;
  27129. for (a = 0; a < e.length; a++) {
  27130. var h = e[a],
  27131. c = h.source,
  27132. p = h.target;
  27133. o.addEdge(c, p, u) && (l.push(h), s.push(it(Ao(h.id, null), c + " > " + p)), u++)
  27134. }
  27135. var d, f = n.get("coordinateSystem");
  27136. if ("cartesian2d" === f || "polar" === f) d = vx(t, n);
  27137. else {
  27138. var g = xd.get(f),
  27139. y = g && g.dimensions || [];
  27140. P(y, "value") < 0 && y.concat(["value"]);
  27141. var v = ux(t, {
  27142. coordDimensions: y,
  27143. encodeDefine: n.getEncode()
  27144. }).dimensions;
  27145. (d = new lx(v, n)).initData(t)
  27146. }
  27147. var m = new lx(["value"], n);
  27148. return m.initData(l, s), r && r(d, m), zC({
  27149. mainData: d,
  27150. struct: o,
  27151. structAttr: "graph",
  27152. datas: {
  27153. node: d,
  27154. edge: m
  27155. },
  27156. datasAttr: {
  27157. node: "data",
  27158. edge: "edgeData"
  27159. }
  27160. }), o.update(), o
  27161. }
  27162. R(qA, $A("hostGraph", "data")), R(KA, $A("hostGraph", "edgeData"));
  27163. var QA = function (t) {
  27164. function e() {
  27165. var n = null !== t && t.apply(this, arguments) || this;
  27166. return n.type = e.type, n.hasSymbolVisual = !0, n
  27167. }
  27168. return n(e, t), e.prototype.init = function (e) {
  27169. t.prototype.init.apply(this, arguments);
  27170. var n = this;
  27171. function i() {
  27172. return n._categoriesData
  27173. }
  27174. this.legendVisualProvider = new IM(i, i), this.fillDataTextStyle(e.edges || e.links), this._updateCategoriesData()
  27175. }, e.prototype.mergeOption = function (e) {
  27176. t.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(e.edges || e.links), this._updateCategoriesData()
  27177. }, e.prototype.mergeDefaultAndTheme = function (e) {
  27178. t.prototype.mergeDefaultAndTheme.apply(this, arguments), wo(e, "edgeLabel", ["show"])
  27179. }, e.prototype.getInitialData = function (t, e) {
  27180. var n, i = t.edges || t.links || [],
  27181. r = t.data || t.nodes || [],
  27182. o = this;
  27183. if (r && i) {
  27184. iA(n = this) && (n.__curvenessList = [], n.__edgeMap = {}, rA(n));
  27185. var a = JA(r, i, this, !0, (function (t, e) {
  27186. t.wrapMethod("getItemModel", (function (t) {
  27187. var e = o._categoriesModels[t.getShallow("category")];
  27188. return e && (e.parentModel = t.parentModel, t.parentModel = e), t
  27189. }));
  27190. var n = Mc.prototype.getModel;
  27191. function i(t, e) {
  27192. var i = n.call(this, t, e);
  27193. return i.resolveParentPath = r, i
  27194. }
  27195. function r(t) {
  27196. if (t && ("label" === t[0] || "label" === t[1])) {
  27197. var e = t.slice();
  27198. return "label" === t[0] ? e[0] = "edgeLabel" : "label" === t[1] && (e[1] = "edgeLabel"), e
  27199. }
  27200. return t
  27201. }
  27202. e.wrapMethod("getItemModel", (function (t) {
  27203. return t.resolveParentPath = r, t.getModel = i, t
  27204. }))
  27205. }));
  27206. return E(a.edges, (function (t) {
  27207. ! function (t, e, n, i) {
  27208. if (iA(n)) {
  27209. var r = oA(t, e, n),
  27210. o = n.__edgeMap,
  27211. a = o[aA(r)];
  27212. o[r] && !a ? o[r].isForward = !0 : a && o[r] && (a.isForward = !0, o[r].isForward = !1), o[r] = o[r] || [], o[r].push(i)
  27213. }
  27214. }(t.node1, t.node2, this, t.dataIndex)
  27215. }), this), a.data
  27216. }
  27217. }, e.prototype.getGraph = function () {
  27218. return this.getData().graph
  27219. }, e.prototype.getEdgeData = function () {
  27220. return this.getGraph().edgeData
  27221. }, e.prototype.getCategoriesData = function () {
  27222. return this._categoriesData
  27223. }, e.prototype.formatTooltip = function (t, e, n) {
  27224. if ("edge" === n) {
  27225. var i = this.getData(),
  27226. r = this.getDataParams(t, n),
  27227. o = i.graph.getEdgeByIndex(t),
  27228. a = i.getName(o.node1.dataIndex),
  27229. s = i.getName(o.node2.dataIndex),
  27230. l = [];
  27231. return null != a && l.push(a), null != s && l.push(s), ng("nameValue", {
  27232. name: l.join(" > "),
  27233. value: r.value,
  27234. noValue: null == r.value
  27235. })
  27236. }
  27237. return fg({
  27238. series: this,
  27239. dataIndex: t,
  27240. multipleSeries: e
  27241. })
  27242. }, e.prototype._updateCategoriesData = function () {
  27243. var t = z(this.option.categories || [], (function (t) {
  27244. return null != t.value ? t : A({
  27245. value: 0
  27246. }, t)
  27247. })),
  27248. e = new lx(["value"], this);
  27249. e.initData(t), this._categoriesData = e, this._categoriesModels = e.mapArray((function (t) {
  27250. return e.getItemModel(t)
  27251. }))
  27252. }, e.prototype.setZoom = function (t) {
  27253. this.option.zoom = t
  27254. }, e.prototype.setCenter = function (t) {
  27255. this.option.center = t
  27256. }, e.prototype.isAnimationEnabled = function () {
  27257. return t.prototype.isAnimationEnabled.call(this) && !("force" === this.get("layout") && this.get(["force", "layoutAnimation"]))
  27258. }, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  27259. z: 2,
  27260. coordinateSystem: "view",
  27261. legendHoverLink: !0,
  27262. layout: null,
  27263. circular: {
  27264. rotateLabel: !1
  27265. },
  27266. force: {
  27267. initLayout: null,
  27268. repulsion: [0, 50],
  27269. gravity: .1,
  27270. friction: .6,
  27271. edgeLength: 30,
  27272. layoutAnimation: !0
  27273. },
  27274. left: "center",
  27275. top: "center",
  27276. symbol: "circle",
  27277. symbolSize: 10,
  27278. edgeSymbol: ["none", "none"],
  27279. edgeSymbolSize: 10,
  27280. edgeLabel: {
  27281. position: "middle",
  27282. distance: 5
  27283. },
  27284. draggable: !1,
  27285. roam: !1,
  27286. center: null,
  27287. zoom: 1,
  27288. nodeScaleRatio: .6,
  27289. label: {
  27290. show: !1,
  27291. formatter: "{b}"
  27292. },
  27293. itemStyle: {},
  27294. lineStyle: {
  27295. color: "#aaa",
  27296. width: 1,
  27297. opacity: .5
  27298. },
  27299. emphasis: {
  27300. scale: !0,
  27301. label: {
  27302. show: !0
  27303. }
  27304. },
  27305. select: {
  27306. itemStyle: {
  27307. borderColor: "#212121"
  27308. }
  27309. }
  27310. }, e
  27311. }(mg),
  27312. tk = {
  27313. type: "graphRoam",
  27314. event: "graphRoam",
  27315. update: "none"
  27316. };
  27317. var ek = function () {
  27318. this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0
  27319. },
  27320. nk = function (t) {
  27321. function e(e) {
  27322. var n = t.call(this, e) || this;
  27323. return n.type = "pointer", n
  27324. }
  27325. return n(e, t), e.prototype.getDefaultShape = function () {
  27326. return new ek
  27327. }, e.prototype.buildPath = function (t, e) {
  27328. var n = Math.cos,
  27329. i = Math.sin,
  27330. r = e.r,
  27331. o = e.width,
  27332. a = e.angle,
  27333. s = e.x - n(a) * o * (o >= r / 3 ? 1 : 2),
  27334. l = e.y - i(a) * o * (o >= r / 3 ? 1 : 2);
  27335. a = e.angle - Math.PI / 2, t.moveTo(s, l), t.lineTo(e.x + n(a) * o, e.y + i(a) * o), t.lineTo(e.x + n(e.angle) * r, e.y + i(e.angle) * r), t.lineTo(e.x - n(a) * o, e.y - i(a) * o), t.lineTo(s, l)
  27336. }, e
  27337. }(Is);
  27338. function ik(t, e) {
  27339. var n = null == t ? "" : t + "";
  27340. return e && (U(e) ? n = e.replace("{value}", n) : X(e) && (n = e(t))), n
  27341. }
  27342. var rk = function (t) {
  27343. function e() {
  27344. var n = null !== t && t.apply(this, arguments) || this;
  27345. return n.type = e.type, n
  27346. }
  27347. return n(e, t), e.prototype.render = function (t, e, n) {
  27348. this.group.removeAll();
  27349. var i = t.get(["axisLine", "lineStyle", "color"]),
  27350. r = function (t, e) {
  27351. var n = t.get("center"),
  27352. i = e.getWidth(),
  27353. r = e.getHeight(),
  27354. o = Math.min(i, r);
  27355. return {
  27356. cx: Ur(n[0], e.getWidth()),
  27357. cy: Ur(n[1], e.getHeight()),
  27358. r: Ur(t.get("radius"), o / 2)
  27359. }
  27360. }(t, n);
  27361. this._renderMain(t, e, n, i, r), this._data = t.getData()
  27362. }, e.prototype.dispose = function () {}, e.prototype._renderMain = function (t, e, n, i, r) {
  27363. var o = this.group,
  27364. a = t.get("clockwise"),
  27365. s = -t.get("startAngle") / 180 * Math.PI,
  27366. l = -t.get("endAngle") / 180 * Math.PI,
  27367. u = t.getModel("axisLine"),
  27368. h = u.get("roundCap") ? HS : zu,
  27369. c = u.get("show"),
  27370. p = u.getModel("lineStyle"),
  27371. d = p.get("width"),
  27372. f = [s, l];
  27373. rs(f, !a);
  27374. for (var g = (l = f[1]) - (s = f[0]), y = s, v = [], m = 0; c && m < i.length; m++) {
  27375. var x = new h({
  27376. shape: {
  27377. startAngle: y,
  27378. endAngle: l = s + g * Math.min(Math.max(i[m][0], 0), 1),
  27379. cx: r.cx,
  27380. cy: r.cy,
  27381. clockwise: a,
  27382. r0: r.r - d,
  27383. r: r.r
  27384. },
  27385. silent: !0
  27386. });
  27387. x.setStyle({
  27388. fill: i[m][1]
  27389. }), x.setStyle(p.getLineStyle(["color", "width"])), v.push(x), y = l
  27390. }
  27391. v.reverse(), E(v, (function (t) {
  27392. return o.add(t)
  27393. }));
  27394. var _ = function (t) {
  27395. if (t <= 0) return i[0][1];
  27396. var e;
  27397. for (e = 0; e < i.length; e++)
  27398. if (i[e][0] >= t && (0 === e ? 0 : i[e - 1][0]) < t) return i[e][1];
  27399. return i[e - 1][1]
  27400. };
  27401. this._renderTicks(t, e, n, _, r, s, l, a, d), this._renderTitleAndDetail(t, e, n, _, r), this._renderAnchor(t, r), this._renderPointer(t, e, n, _, r, s, l, a, d)
  27402. }, e.prototype._renderTicks = function (t, e, n, i, r, o, a, s, l) {
  27403. for (var u, h, c = this.group, p = r.cx, d = r.cy, f = r.r, g = +t.get("min"), y = +t.get("max"), v = t.getModel("splitLine"), m = t.getModel("axisTick"), x = t.getModel("axisLabel"), _ = t.get("splitNumber"), b = m.get("splitNumber"), w = Ur(v.get("length"), f), S = Ur(m.get("length"), f), M = o, I = (a - o) / _, T = I / b, C = v.getModel("lineStyle").getLineStyle(), D = m.getModel("lineStyle").getLineStyle(), A = v.get("distance"), k = 0; k <= _; k++) {
  27404. if (u = Math.cos(M), h = Math.sin(M), v.get("show")) {
  27405. var L = new Zu({
  27406. shape: {
  27407. x1: u * (f - (P = A ? A + l : l)) + p,
  27408. y1: h * (f - P) + d,
  27409. x2: u * (f - w - P) + p,
  27410. y2: h * (f - w - P) + d
  27411. },
  27412. style: C,
  27413. silent: !0
  27414. });
  27415. "auto" === C.stroke && L.setStyle({
  27416. stroke: i(k / _)
  27417. }), c.add(L)
  27418. }
  27419. if (x.get("show")) {
  27420. var P = x.get("distance") + A,
  27421. O = ik(Zr(k / _ * (y - g) + g), x.get("formatter")),
  27422. R = i(k / _),
  27423. N = u * (f - w - P) + p,
  27424. E = h * (f - w - P) + d,
  27425. z = x.get("rotate"),
  27426. V = 0;
  27427. "radial" === z ? (V = -M + 2 * Math.PI) > Math.PI / 2 && (V += Math.PI) : "tangential" === z ? V = -M - Math.PI / 2 : j(z) && (V = z * Math.PI / 180), 0 === V ? c.add(new Fs({
  27428. style: nc(x, {
  27429. text: O,
  27430. x: N,
  27431. y: E,
  27432. verticalAlign: h < -.8 ? "top" : h > .8 ? "bottom" : "middle",
  27433. align: u < -.4 ? "left" : u > .4 ? "right" : "center"
  27434. }, {
  27435. inheritColor: R
  27436. }),
  27437. silent: !0
  27438. })) : c.add(new Fs({
  27439. style: nc(x, {
  27440. text: O,
  27441. x: N,
  27442. y: E,
  27443. verticalAlign: "middle",
  27444. align: "center"
  27445. }, {
  27446. inheritColor: R
  27447. }),
  27448. silent: !0,
  27449. originX: N,
  27450. originY: E,
  27451. rotation: V
  27452. }))
  27453. }
  27454. if (m.get("show") && k !== _) {
  27455. P = (P = m.get("distance")) ? P + l : l;
  27456. for (var B = 0; B <= b; B++) {
  27457. u = Math.cos(M), h = Math.sin(M);
  27458. var F = new Zu({
  27459. shape: {
  27460. x1: u * (f - P) + p,
  27461. y1: h * (f - P) + d,
  27462. x2: u * (f - S - P) + p,
  27463. y2: h * (f - S - P) + d
  27464. },
  27465. silent: !0,
  27466. style: D
  27467. });
  27468. "auto" === D.stroke && F.setStyle({
  27469. stroke: i((k + B / b) / _)
  27470. }), c.add(F), M += T
  27471. }
  27472. M -= T
  27473. } else M += I
  27474. }
  27475. }, e.prototype._renderPointer = function (t, e, n, i, r, o, a, s, l) {
  27476. var u = this.group,
  27477. h = this._data,
  27478. c = this._progressEls,
  27479. p = [],
  27480. d = t.get(["pointer", "show"]),
  27481. f = t.getModel("progress"),
  27482. g = f.get("show"),
  27483. y = t.getData(),
  27484. v = y.mapDimension("value"),
  27485. m = +t.get("min"),
  27486. x = +t.get("max"),
  27487. _ = [m, x],
  27488. b = [o, a];
  27489. function w(e, n) {
  27490. var i, o = y.getItemModel(e).getModel("pointer"),
  27491. a = Ur(o.get("width"), r.r),
  27492. s = Ur(o.get("length"), r.r),
  27493. l = t.get(["pointer", "icon"]),
  27494. u = o.get("offsetCenter"),
  27495. h = Ur(u[0], r.r),
  27496. c = Ur(u[1], r.r),
  27497. p = o.get("keepAspect");
  27498. return (i = l ? Wy(l, h - a / 2, c - s, a, s, null, p) : new nk({
  27499. shape: {
  27500. angle: -Math.PI / 2,
  27501. width: a,
  27502. r: s,
  27503. x: h,
  27504. y: c
  27505. }
  27506. })).rotation = -(n + Math.PI / 2), i.x = r.cx, i.y = r.cy, i
  27507. }
  27508. function S(t, e) {
  27509. var n = f.get("roundCap") ? HS : zu,
  27510. i = f.get("overlap"),
  27511. a = i ? f.get("width") : l / y.count(),
  27512. u = i ? r.r - a : r.r - (t + 1) * a,
  27513. h = i ? r.r : r.r - t * a,
  27514. c = new n({
  27515. shape: {
  27516. startAngle: o,
  27517. endAngle: e,
  27518. cx: r.cx,
  27519. cy: r.cy,
  27520. clockwise: s,
  27521. r0: u,
  27522. r: h
  27523. }
  27524. });
  27525. return i && (c.z2 = x - y.get(v, t) % x), c
  27526. }(g || d) && (y.diff(h).add((function (e) {
  27527. var n = y.get(v, e);
  27528. if (d) {
  27529. var i = w(e, o);
  27530. gh(i, {
  27531. rotation: -((isNaN(+n) ? b[0] : Xr(n, _, b, !0)) + Math.PI / 2)
  27532. }, t), u.add(i), y.setItemGraphicEl(e, i)
  27533. }
  27534. if (g) {
  27535. var r = S(e, o),
  27536. a = f.get("clip");
  27537. gh(r, {
  27538. shape: {
  27539. endAngle: Xr(n, _, b, a)
  27540. }
  27541. }, t), u.add(r), tl(t.seriesIndex, y.dataType, e, r), p[e] = r
  27542. }
  27543. })).update((function (e, n) {
  27544. var i = y.get(v, e);
  27545. if (d) {
  27546. var r = h.getItemGraphicEl(n),
  27547. a = r ? r.rotation : o,
  27548. s = w(e, a);
  27549. s.rotation = a, fh(s, {
  27550. rotation: -((isNaN(+i) ? b[0] : Xr(i, _, b, !0)) + Math.PI / 2)
  27551. }, t), u.add(s), y.setItemGraphicEl(e, s)
  27552. }
  27553. if (g) {
  27554. var l = c[n],
  27555. m = S(e, l ? l.shape.endAngle : o),
  27556. x = f.get("clip");
  27557. fh(m, {
  27558. shape: {
  27559. endAngle: Xr(i, _, b, x)
  27560. }
  27561. }, t), u.add(m), tl(t.seriesIndex, y.dataType, e, m), p[e] = m
  27562. }
  27563. })).execute(), y.each((function (t) {
  27564. var e = y.getItemModel(t),
  27565. n = e.getModel("emphasis"),
  27566. r = n.get("focus"),
  27567. o = n.get("blurScope"),
  27568. a = n.get("disabled");
  27569. if (d) {
  27570. var s = y.getItemGraphicEl(t),
  27571. l = y.getItemVisual(t, "style"),
  27572. u = l.fill;
  27573. if (s instanceof ks) {
  27574. var h = s.style;
  27575. s.useStyle(A({
  27576. image: h.image,
  27577. x: h.x,
  27578. y: h.y,
  27579. width: h.width,
  27580. height: h.height
  27581. }, l))
  27582. } else s.useStyle(l), "pointer" !== s.type && s.setColor(u);
  27583. s.setStyle(e.getModel(["pointer", "itemStyle"]).getItemStyle()), "auto" === s.style.fill && s.setStyle("fill", i(Xr(y.get(v, t), _, [0, 1], !0))), s.z2EmphasisLift = 0, jl(s, e), Yl(s, r, o, a)
  27584. }
  27585. if (g) {
  27586. var c = p[t];
  27587. c.useStyle(y.getItemVisual(t, "style")), c.setStyle(e.getModel(["progress", "itemStyle"]).getItemStyle()), c.z2EmphasisLift = 0, jl(c, e), Yl(c, r, o, a)
  27588. }
  27589. })), this._progressEls = p)
  27590. }, e.prototype._renderAnchor = function (t, e) {
  27591. var n = t.getModel("anchor");
  27592. if (n.get("show")) {
  27593. var i = n.get("size"),
  27594. r = n.get("icon"),
  27595. o = n.get("offsetCenter"),
  27596. a = n.get("keepAspect"),
  27597. s = Wy(r, e.cx - i / 2 + Ur(o[0], e.r), e.cy - i / 2 + Ur(o[1], e.r), i, i, null, a);
  27598. s.z2 = n.get("showAbove") ? 1 : 0, s.setStyle(n.getModel("itemStyle").getItemStyle()), this.group.add(s)
  27599. }
  27600. }, e.prototype._renderTitleAndDetail = function (t, e, n, i, r) {
  27601. var o = this,
  27602. a = t.getData(),
  27603. s = a.mapDimension("value"),
  27604. l = +t.get("min"),
  27605. u = +t.get("max"),
  27606. h = new zr,
  27607. c = [],
  27608. p = [],
  27609. d = t.isAnimationEnabled(),
  27610. f = t.get(["pointer", "showAbove"]);
  27611. a.diff(this._data).add((function (t) {
  27612. c[t] = new Fs({
  27613. silent: !0
  27614. }), p[t] = new Fs({
  27615. silent: !0
  27616. })
  27617. })).update((function (t, e) {
  27618. c[t] = o._titleEls[e], p[t] = o._detailEls[e]
  27619. })).execute(), a.each((function (e) {
  27620. var n = a.getItemModel(e),
  27621. o = a.get(s, e),
  27622. g = new zr,
  27623. y = i(Xr(o, [l, u], [0, 1], !0)),
  27624. v = n.getModel("title");
  27625. if (v.get("show")) {
  27626. var m = v.get("offsetCenter"),
  27627. x = r.cx + Ur(m[0], r.r),
  27628. _ = r.cy + Ur(m[1], r.r);
  27629. (D = c[e]).attr({
  27630. z2: f ? 0 : 2,
  27631. style: nc(v, {
  27632. x: x,
  27633. y: _,
  27634. text: a.getName(e),
  27635. align: "center",
  27636. verticalAlign: "middle"
  27637. }, {
  27638. inheritColor: y
  27639. })
  27640. }), g.add(D)
  27641. }
  27642. var b = n.getModel("detail");
  27643. if (b.get("show")) {
  27644. var w = b.get("offsetCenter"),
  27645. S = r.cx + Ur(w[0], r.r),
  27646. M = r.cy + Ur(w[1], r.r),
  27647. I = Ur(b.get("width"), r.r),
  27648. T = Ur(b.get("height"), r.r),
  27649. C = t.get(["progress", "show"]) ? a.getItemVisual(e, "style").fill : y,
  27650. D = p[e],
  27651. A = b.get("formatter");
  27652. D.attr({
  27653. z2: f ? 0 : 2,
  27654. style: nc(b, {
  27655. x: S,
  27656. y: M,
  27657. text: ik(o, A),
  27658. width: isNaN(I) ? null : I,
  27659. height: isNaN(T) ? null : T,
  27660. align: "center",
  27661. verticalAlign: "middle"
  27662. }, {
  27663. inheritColor: C
  27664. })
  27665. }), hc(D, {
  27666. normal: b
  27667. }, o, (function (t) {
  27668. return ik(t, A)
  27669. })), d && cc(D, e, a, t, {
  27670. getFormattedLabel: function (t, e, n, i, r, a) {
  27671. return ik(a ? a.interpolatedValue : o, A)
  27672. }
  27673. }), g.add(D)
  27674. }
  27675. h.add(g)
  27676. })), this.group.add(h), this._titleEls = c, this._detailEls = p
  27677. }, e.type = "gauge", e
  27678. }(kg),
  27679. ok = function (t) {
  27680. function e() {
  27681. var n = null !== t && t.apply(this, arguments) || this;
  27682. return n.type = e.type, n.visualStyleAccessPath = "itemStyle", n
  27683. }
  27684. return n(e, t), e.prototype.getInitialData = function (t, e) {
  27685. return MM(this, ["value"])
  27686. }, e.type = "series.gauge", e.defaultOption = {
  27687. z: 2,
  27688. colorBy: "data",
  27689. center: ["50%", "50%"],
  27690. legendHoverLink: !0,
  27691. radius: "75%",
  27692. startAngle: 225,
  27693. endAngle: -45,
  27694. clockwise: !0,
  27695. min: 0,
  27696. max: 100,
  27697. splitNumber: 10,
  27698. axisLine: {
  27699. show: !0,
  27700. roundCap: !1,
  27701. lineStyle: {
  27702. color: [
  27703. [1, "#E6EBF8"]
  27704. ],
  27705. width: 10
  27706. }
  27707. },
  27708. progress: {
  27709. show: !1,
  27710. overlap: !0,
  27711. width: 10,
  27712. roundCap: !1,
  27713. clip: !0
  27714. },
  27715. splitLine: {
  27716. show: !0,
  27717. length: 10,
  27718. distance: 10,
  27719. lineStyle: {
  27720. color: "#63677A",
  27721. width: 3,
  27722. type: "solid"
  27723. }
  27724. },
  27725. axisTick: {
  27726. show: !0,
  27727. splitNumber: 5,
  27728. length: 6,
  27729. distance: 10,
  27730. lineStyle: {
  27731. color: "#63677A",
  27732. width: 1,
  27733. type: "solid"
  27734. }
  27735. },
  27736. axisLabel: {
  27737. show: !0,
  27738. distance: 15,
  27739. color: "#464646",
  27740. fontSize: 12,
  27741. rotate: 0
  27742. },
  27743. pointer: {
  27744. icon: null,
  27745. offsetCenter: [0, 0],
  27746. show: !0,
  27747. showAbove: !0,
  27748. length: "60%",
  27749. width: 6,
  27750. keepAspect: !1
  27751. },
  27752. anchor: {
  27753. show: !1,
  27754. showAbove: !1,
  27755. size: 6,
  27756. icon: "circle",
  27757. offsetCenter: [0, 0],
  27758. keepAspect: !1,
  27759. itemStyle: {
  27760. color: "#fff",
  27761. borderWidth: 0,
  27762. borderColor: "#5470c6"
  27763. }
  27764. },
  27765. title: {
  27766. show: !0,
  27767. offsetCenter: [0, "20%"],
  27768. color: "#464646",
  27769. fontSize: 16,
  27770. valueAnimation: !1
  27771. },
  27772. detail: {
  27773. show: !0,
  27774. backgroundColor: "rgba(0,0,0,0)",
  27775. borderWidth: 0,
  27776. borderColor: "#ccc",
  27777. width: 100,
  27778. height: null,
  27779. padding: [5, 10],
  27780. offsetCenter: [0, "40%"],
  27781. color: "#464646",
  27782. fontSize: 30,
  27783. fontWeight: "bold",
  27784. lineHeight: 30,
  27785. valueAnimation: !1
  27786. }
  27787. }, e
  27788. }(mg);
  27789. var ak = ["itemStyle", "opacity"],
  27790. sk = function (t) {
  27791. function e(e, n) {
  27792. var i = t.call(this) || this,
  27793. r = i,
  27794. o = new Yu,
  27795. a = new Fs;
  27796. return r.setTextContent(a), i.setTextGuideLine(o), i.updateData(e, n, !0), i
  27797. }
  27798. return n(e, t), e.prototype.updateData = function (t, e, n) {
  27799. var i = this,
  27800. r = t.hostModel,
  27801. o = t.getItemModel(e),
  27802. a = t.getItemLayout(e),
  27803. s = o.getModel("emphasis"),
  27804. l = o.get(ak);
  27805. l = null == l ? 1 : l, n || _h(i), i.useStyle(t.getItemVisual(e, "style")), i.style.lineJoin = "round", n ? (i.setShape({
  27806. points: a.points
  27807. }), i.style.opacity = 0, gh(i, {
  27808. style: {
  27809. opacity: l
  27810. }
  27811. }, r, e)) : fh(i, {
  27812. style: {
  27813. opacity: l
  27814. },
  27815. shape: {
  27816. points: a.points
  27817. }
  27818. }, r, e), jl(i, o), this._updateLabel(t, e), Yl(this, s.get("focus"), s.get("blurScope"), s.get("disabled"))
  27819. }, e.prototype._updateLabel = function (t, e) {
  27820. var n = this,
  27821. i = this.getTextGuideLine(),
  27822. r = n.getTextContent(),
  27823. o = t.hostModel,
  27824. a = t.getItemModel(e),
  27825. s = t.getItemLayout(e).label,
  27826. l = t.getItemVisual(e, "style"),
  27827. u = l.fill;
  27828. tc(r, ec(a), {
  27829. labelFetcher: t.hostModel,
  27830. labelDataIndex: e,
  27831. defaultOpacity: l.opacity,
  27832. defaultText: t.getName(e)
  27833. }, {
  27834. normal: {
  27835. align: s.textAlign,
  27836. verticalAlign: s.verticalAlign
  27837. }
  27838. }), n.setTextConfig({
  27839. local: !0,
  27840. inside: !!s.inside,
  27841. insideStroke: u,
  27842. outsideFill: u
  27843. });
  27844. var h = s.linePoints;
  27845. i.setShape({
  27846. points: h
  27847. }), n.textGuideLineConfig = {
  27848. anchor: h ? new De(h[0][0], h[0][1]) : null
  27849. }, fh(r, {
  27850. style: {
  27851. x: s.x,
  27852. y: s.y
  27853. }
  27854. }, o, e), r.attr({
  27855. rotation: s.rotation,
  27856. originX: s.x,
  27857. originY: s.y,
  27858. z2: 10
  27859. }), Tb(n, Cb(a), {
  27860. stroke: u
  27861. })
  27862. }, e
  27863. }(Wu),
  27864. lk = function (t) {
  27865. function e() {
  27866. var n = null !== t && t.apply(this, arguments) || this;
  27867. return n.type = e.type, n.ignoreLabelLineUpdate = !0, n
  27868. }
  27869. return n(e, t), e.prototype.render = function (t, e, n) {
  27870. var i = t.getData(),
  27871. r = this._data,
  27872. o = this.group;
  27873. i.diff(r).add((function (t) {
  27874. var e = new sk(i, t);
  27875. i.setItemGraphicEl(t, e), o.add(e)
  27876. })).update((function (t, e) {
  27877. var n = r.getItemGraphicEl(e);
  27878. n.updateData(i, t), o.add(n), i.setItemGraphicEl(t, n)
  27879. })).remove((function (e) {
  27880. xh(r.getItemGraphicEl(e), t, e)
  27881. })).execute(), this._data = i
  27882. }, e.prototype.remove = function () {
  27883. this.group.removeAll(), this._data = null
  27884. }, e.prototype.dispose = function () {}, e.type = "funnel", e
  27885. }(kg),
  27886. uk = function (t) {
  27887. function e() {
  27888. var n = null !== t && t.apply(this, arguments) || this;
  27889. return n.type = e.type, n
  27890. }
  27891. return n(e, t), e.prototype.init = function (e) {
  27892. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new IM(W(this.getData, this), W(this.getRawData, this)), this._defaultLabelLine(e)
  27893. }, e.prototype.getInitialData = function (t, e) {
  27894. return MM(this, {
  27895. coordDimensions: ["value"],
  27896. encodeDefaulter: H(Jp, this)
  27897. })
  27898. }, e.prototype._defaultLabelLine = function (t) {
  27899. wo(t, "labelLine", ["show"]);
  27900. var e = t.labelLine,
  27901. n = t.emphasis.labelLine;
  27902. e.show = e.show && t.label.show, n.show = n.show && t.emphasis.label.show
  27903. }, e.prototype.getDataParams = function (e) {
  27904. var n = this.getData(),
  27905. i = t.prototype.getDataParams.call(this, e),
  27906. r = n.mapDimension("value"),
  27907. o = n.getSum(r);
  27908. return i.percent = o ? +(n.get(r, e) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i
  27909. }, e.type = "series.funnel", e.defaultOption = {
  27910. z: 2,
  27911. legendHoverLink: !0,
  27912. colorBy: "data",
  27913. left: 80,
  27914. top: 60,
  27915. right: 80,
  27916. bottom: 60,
  27917. minSize: "0%",
  27918. maxSize: "100%",
  27919. sort: "descending",
  27920. orient: "vertical",
  27921. gap: 0,
  27922. funnelAlign: "center",
  27923. label: {
  27924. show: !0,
  27925. position: "outer"
  27926. },
  27927. labelLine: {
  27928. show: !0,
  27929. length: 20,
  27930. lineStyle: {
  27931. width: 1
  27932. }
  27933. },
  27934. itemStyle: {
  27935. borderColor: "#fff",
  27936. borderWidth: 1
  27937. },
  27938. emphasis: {
  27939. label: {
  27940. show: !0
  27941. }
  27942. },
  27943. select: {
  27944. itemStyle: {
  27945. borderColor: "#212121"
  27946. }
  27947. }
  27948. }, e
  27949. }(mg);
  27950. function hk(t, e) {
  27951. t.eachSeriesByType("funnel", (function (t) {
  27952. var n = t.getData(),
  27953. i = n.mapDimension("value"),
  27954. r = t.get("sort"),
  27955. o = function (t, e) {
  27956. return Cp(t.getBoxLayoutParams(), {
  27957. width: e.getWidth(),
  27958. height: e.getHeight()
  27959. })
  27960. }(t, e),
  27961. a = t.get("orient"),
  27962. s = o.width,
  27963. l = o.height,
  27964. u = function (t, e) {
  27965. for (var n = t.mapDimension("value"), i = t.mapArray(n, (function (t) {
  27966. return t
  27967. })), r = [], o = "ascending" === e, a = 0, s = t.count(); a < s; a++) r[a] = a;
  27968. return X(e) ? r.sort(e) : "none" !== e && r.sort((function (t, e) {
  27969. return o ? i[t] - i[e] : i[e] - i[t]
  27970. })), r
  27971. }(n, r),
  27972. h = o.x,
  27973. c = o.y,
  27974. p = "horizontal" === a ? [Ur(t.get("minSize"), l), Ur(t.get("maxSize"), l)] : [Ur(t.get("minSize"), s), Ur(t.get("maxSize"), s)],
  27975. d = n.getDataExtent(i),
  27976. f = t.get("min"),
  27977. g = t.get("max");
  27978. null == f && (f = Math.min(d[0], 0)), null == g && (g = d[1]);
  27979. var y = t.get("funnelAlign"),
  27980. v = t.get("gap"),
  27981. m = (("horizontal" === a ? s : l) - v * (n.count() - 1)) / n.count(),
  27982. x = function (t, e) {
  27983. if ("horizontal" === a) {
  27984. var r = Xr(n.get(i, t) || 0, [f, g], p, !0),
  27985. o = void 0;
  27986. switch (y) {
  27987. case "top":
  27988. o = c;
  27989. break;
  27990. case "center":
  27991. o = c + (l - r) / 2;
  27992. break;
  27993. case "bottom":
  27994. o = c + (l - r)
  27995. }
  27996. return [
  27997. [e, o],
  27998. [e, o + r]
  27999. ]
  28000. }
  28001. var u, d = Xr(n.get(i, t) || 0, [f, g], p, !0);
  28002. switch (y) {
  28003. case "left":
  28004. u = h;
  28005. break;
  28006. case "center":
  28007. u = h + (s - d) / 2;
  28008. break;
  28009. case "right":
  28010. u = h + s - d
  28011. }
  28012. return [
  28013. [u, e],
  28014. [u + d, e]
  28015. ]
  28016. };
  28017. "ascending" === r && (m = -m, v = -v, "horizontal" === a ? h += s : c += l, u = u.reverse());
  28018. for (var _ = 0; _ < u.length; _++) {
  28019. var b = u[_],
  28020. w = u[_ + 1],
  28021. S = n.getItemModel(b);
  28022. if ("horizontal" === a) {
  28023. var M = S.get(["itemStyle", "width"]);
  28024. null == M ? M = m : (M = Ur(M, s), "ascending" === r && (M = -M));
  28025. var I = x(b, h),
  28026. T = x(w, h + M);
  28027. h += M + v, n.setItemLayout(b, {
  28028. points: I.concat(T.slice().reverse())
  28029. })
  28030. } else {
  28031. var C = S.get(["itemStyle", "height"]);
  28032. null == C ? C = m : (C = Ur(C, l), "ascending" === r && (C = -C));
  28033. I = x(b, c), T = x(w, c + C);
  28034. c += C + v, n.setItemLayout(b, {
  28035. points: I.concat(T.slice().reverse())
  28036. })
  28037. }
  28038. }! function (t) {
  28039. var e = t.hostModel.get("orient");
  28040. t.each((function (n) {
  28041. var i, r, o, a, s = t.getItemModel(n),
  28042. l = s.getModel("label").get("position"),
  28043. u = s.getModel("labelLine"),
  28044. h = t.getItemLayout(n),
  28045. c = h.points,
  28046. p = "inner" === l || "inside" === l || "center" === l || "insideLeft" === l || "insideRight" === l;
  28047. if (p) "insideLeft" === l ? (r = (c[0][0] + c[3][0]) / 2 + 5, o = (c[0][1] + c[3][1]) / 2, i = "left") : "insideRight" === l ? (r = (c[1][0] + c[2][0]) / 2 - 5, o = (c[1][1] + c[2][1]) / 2, i = "right") : (r = (c[0][0] + c[1][0] + c[2][0] + c[3][0]) / 4, o = (c[0][1] + c[1][1] + c[2][1] + c[3][1]) / 4, i = "center"), a = [
  28048. [r, o],
  28049. [r, o]
  28050. ];
  28051. else {
  28052. var d = void 0,
  28053. f = void 0,
  28054. g = void 0,
  28055. y = void 0,
  28056. v = u.get("length");
  28057. "left" === l ? (d = (c[3][0] + c[0][0]) / 2, f = (c[3][1] + c[0][1]) / 2, r = (g = d - v) - 5, i = "right") : "right" === l ? (d = (c[1][0] + c[2][0]) / 2, f = (c[1][1] + c[2][1]) / 2, r = (g = d + v) + 5, i = "left") : "top" === l ? (d = (c[3][0] + c[0][0]) / 2, o = (y = (f = (c[3][1] + c[0][1]) / 2) - v) - 5, i = "center") : "bottom" === l ? (d = (c[1][0] + c[2][0]) / 2, o = (y = (f = (c[1][1] + c[2][1]) / 2) + v) + 5, i = "center") : "rightTop" === l ? (d = "horizontal" === e ? c[3][0] : c[1][0], f = "horizontal" === e ? c[3][1] : c[1][1], "horizontal" === e ? (o = (y = f - v) - 5, i = "center") : (r = (g = d + v) + 5, i = "top")) : "rightBottom" === l ? (d = c[2][0], f = c[2][1], "horizontal" === e ? (o = (y = f + v) + 5, i = "center") : (r = (g = d + v) + 5, i = "bottom")) : "leftTop" === l ? (d = c[0][0], f = "horizontal" === e ? c[0][1] : c[1][1], "horizontal" === e ? (o = (y = f - v) - 5, i = "center") : (r = (g = d - v) - 5, i = "right")) : "leftBottom" === l ? (d = "horizontal" === e ? c[1][0] : c[3][0], f = "horizontal" === e ? c[1][1] : c[2][1], "horizontal" === e ? (o = (y = f + v) + 5, i = "center") : (r = (g = d - v) - 5, i = "right")) : (d = (c[1][0] + c[2][0]) / 2, f = (c[1][1] + c[2][1]) / 2, "horizontal" === e ? (o = (y = f + v) + 5, i = "center") : (r = (g = d + v) + 5, i = "left")), "horizontal" === e ? r = g = d : o = y = f, a = [
  28058. [d, f],
  28059. [g, y]
  28060. ]
  28061. }
  28062. h.label = {
  28063. linePoints: a,
  28064. x: r,
  28065. y: o,
  28066. verticalAlign: "middle",
  28067. textAlign: i,
  28068. inside: p
  28069. }
  28070. }))
  28071. }(n)
  28072. }))
  28073. }
  28074. var ck = function (t) {
  28075. function e() {
  28076. var n = null !== t && t.apply(this, arguments) || this;
  28077. return n.type = e.type, n._dataGroup = new zr, n._initialized = !1, n
  28078. }
  28079. return n(e, t), e.prototype.init = function () {
  28080. this.group.add(this._dataGroup)
  28081. }, e.prototype.render = function (t, e, n, i) {
  28082. this._progressiveEls = null;
  28083. var r = this._dataGroup,
  28084. o = t.getData(),
  28085. a = this._data,
  28086. s = t.coordinateSystem,
  28087. l = s.dimensions,
  28088. u = fk(t);
  28089. if (o.diff(a).add((function (t) {
  28090. gk(dk(o, r, t, l, s), o, t, u)
  28091. })).update((function (e, n) {
  28092. var i = a.getItemGraphicEl(n),
  28093. r = pk(o, e, l, s);
  28094. o.setItemGraphicEl(e, i), fh(i, {
  28095. shape: {
  28096. points: r
  28097. }
  28098. }, t, e), _h(i), gk(i, o, e, u)
  28099. })).remove((function (t) {
  28100. var e = a.getItemGraphicEl(t);
  28101. r.remove(e)
  28102. })).execute(), !this._initialized) {
  28103. this._initialized = !0;
  28104. var h = function (t, e, n) {
  28105. var i = t.model,
  28106. r = t.getRect(),
  28107. o = new zs({
  28108. shape: {
  28109. x: r.x,
  28110. y: r.y,
  28111. width: r.width,
  28112. height: r.height
  28113. }
  28114. }),
  28115. a = "horizontal" === i.get("layout") ? "width" : "height";
  28116. return o.setShape(a, 0), gh(o, {
  28117. shape: {
  28118. width: r.width,
  28119. height: r.height
  28120. }
  28121. }, e, n), o
  28122. }(s, t, (function () {
  28123. setTimeout((function () {
  28124. r.removeClipPath()
  28125. }))
  28126. }));
  28127. r.setClipPath(h)
  28128. }
  28129. this._data = o
  28130. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  28131. this._initialized = !0, this._data = null, this._dataGroup.removeAll()
  28132. }, e.prototype.incrementalRender = function (t, e, n) {
  28133. for (var i = e.getData(), r = e.coordinateSystem, o = r.dimensions, a = fk(e), s = this._progressiveEls = [], l = t.start; l < t.end; l++) {
  28134. var u = dk(i, this._dataGroup, l, o, r);
  28135. u.incremental = !0, gk(u, i, l, a), s.push(u)
  28136. }
  28137. }, e.prototype.remove = function () {
  28138. this._dataGroup && this._dataGroup.removeAll(), this._data = null
  28139. }, e.type = "parallel", e
  28140. }(kg);
  28141. function pk(t, e, n, i) {
  28142. for (var r, o = [], a = 0; a < n.length; a++) {
  28143. var s = n[a],
  28144. l = t.get(t.mapDimension(s), e);
  28145. r = l, ("category" === i.getAxis(s).type ? null == r : null == r || isNaN(r)) || o.push(i.dataToPoint(l, s))
  28146. }
  28147. return o
  28148. }
  28149. function dk(t, e, n, i, r) {
  28150. var o = pk(t, n, i, r),
  28151. a = new Yu({
  28152. shape: {
  28153. points: o
  28154. },
  28155. z2: 10
  28156. });
  28157. return e.add(a), t.setItemGraphicEl(n, a), a
  28158. }
  28159. function fk(t) {
  28160. var e = t.get("smooth", !0);
  28161. return !0 === e && (e = .3), nt(e = ho(e)) && (e = 0), {
  28162. smooth: e
  28163. }
  28164. }
  28165. function gk(t, e, n, i) {
  28166. t.useStyle(e.getItemVisual(n, "style")), t.style.fill = null, t.setShape("smooth", i.smooth);
  28167. var r = e.getItemModel(n),
  28168. o = r.getModel("emphasis");
  28169. jl(t, r, "lineStyle"), Yl(t, o.get("focus"), o.get("blurScope"), o.get("disabled"))
  28170. }
  28171. var yk = function (t) {
  28172. function e() {
  28173. var n = null !== t && t.apply(this, arguments) || this;
  28174. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n
  28175. }
  28176. return n(e, t), e.prototype.getInitialData = function (t, e) {
  28177. return vx(null, this, {
  28178. useEncodeDefaulter: W(vk, null, this)
  28179. })
  28180. }, e.prototype.getRawIndicesByActiveState = function (t) {
  28181. var e = this.coordinateSystem,
  28182. n = this.getData(),
  28183. i = [];
  28184. return e.eachActiveState(n, (function (e, r) {
  28185. t === e && i.push(n.getRawIndex(r))
  28186. })), i
  28187. }, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = {
  28188. z: 2,
  28189. coordinateSystem: "parallel",
  28190. parallelIndex: 0,
  28191. label: {
  28192. show: !1
  28193. },
  28194. inactiveOpacity: .05,
  28195. activeOpacity: 1,
  28196. lineStyle: {
  28197. width: 1,
  28198. opacity: .45,
  28199. type: "solid"
  28200. },
  28201. emphasis: {
  28202. label: {
  28203. show: !1
  28204. }
  28205. },
  28206. progressive: 500,
  28207. smooth: !1,
  28208. animationEasing: "linear"
  28209. }, e
  28210. }(mg);
  28211. function vk(t) {
  28212. var e = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
  28213. if (e) {
  28214. var n = {};
  28215. return E(e.dimensions, (function (t) {
  28216. var e = +t.replace("dim", "");
  28217. n[t] = e
  28218. })), n
  28219. }
  28220. }
  28221. var mk = ["lineStyle", "opacity"],
  28222. xk = {
  28223. seriesType: "parallel",
  28224. reset: function (t, e) {
  28225. var n = t.coordinateSystem,
  28226. i = {
  28227. normal: t.get(["lineStyle", "opacity"]),
  28228. active: t.get("activeOpacity"),
  28229. inactive: t.get("inactiveOpacity")
  28230. };
  28231. return {
  28232. progress: function (t, e) {
  28233. n.eachActiveState(e, (function (t, n) {
  28234. var r = i[t];
  28235. if ("normal" === t && e.hasItemOption) {
  28236. var o = e.getItemModel(n).get(mk, !0);
  28237. null != o && (r = o)
  28238. }
  28239. e.ensureUniqueItemVisual(n, "style").opacity = r
  28240. }), t.start, t.end)
  28241. }
  28242. }
  28243. }
  28244. };
  28245. function _k(t) {
  28246. ! function (t) {
  28247. if (t.parallel) return;
  28248. var e = !1;
  28249. E(t.series, (function (t) {
  28250. t && "parallel" === t.type && (e = !0)
  28251. })), e && (t.parallel = [{}])
  28252. }(t),
  28253. function (t) {
  28254. var e = bo(t.parallelAxis);
  28255. E(e, (function (e) {
  28256. if (q(e)) {
  28257. var n = e.parallelIndex || 0,
  28258. i = bo(t.parallel)[n];
  28259. i && i.parallelAxisDefault && C(e, i.parallelAxisDefault, !1)
  28260. }
  28261. }))
  28262. }(t)
  28263. }
  28264. var bk = function (t) {
  28265. function e() {
  28266. var n = null !== t && t.apply(this, arguments) || this;
  28267. return n.type = e.type, n
  28268. }
  28269. return n(e, t), e.prototype.render = function (t, e, n) {
  28270. this._model = t, this._api = n, this._handlers || (this._handlers = {}, E(wk, (function (t, e) {
  28271. n.getZr().on(e, this._handlers[e] = W(t, this))
  28272. }), this)), Fg(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate")
  28273. }, e.prototype.dispose = function (t, e) {
  28274. Gg(this, "_throttledDispatchExpand"), E(this._handlers, (function (t, n) {
  28275. e.getZr().off(n, t)
  28276. })), this._handlers = null
  28277. }, e.prototype._throttledDispatchExpand = function (t) {
  28278. this._dispatchExpand(t)
  28279. }, e.prototype._dispatchExpand = function (t) {
  28280. t && this._api.dispatchAction(A({
  28281. type: "parallelAxisExpand"
  28282. }, t))
  28283. }, e.type = "parallel", e
  28284. }(Tg),
  28285. wk = {
  28286. mousedown: function (t) {
  28287. Sk(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY])
  28288. },
  28289. mouseup: function (t) {
  28290. var e = this._mouseDownPoint;
  28291. if (Sk(this, "click") && e) {
  28292. var n = [t.offsetX, t.offsetY];
  28293. if (Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2) > 5) return;
  28294. var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
  28295. "none" !== i.behavior && this._dispatchExpand({
  28296. axisExpandWindow: i.axisExpandWindow
  28297. })
  28298. }
  28299. this._mouseDownPoint = null
  28300. },
  28301. mousemove: function (t) {
  28302. if (!this._mouseDownPoint && Sk(this, "mousemove")) {
  28303. var e = this._model,
  28304. n = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]),
  28305. i = n.behavior;
  28306. "jump" === i && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand("none" === i ? null : {
  28307. axisExpandWindow: n.axisExpandWindow,
  28308. animation: "jump" === i ? null : {
  28309. duration: 0
  28310. }
  28311. })
  28312. }
  28313. }
  28314. };
  28315. function Sk(t, e) {
  28316. var n = t._model;
  28317. return n.get("axisExpandable") && n.get("axisExpandTriggerOn") === e
  28318. }
  28319. var Mk = function (t) {
  28320. function e() {
  28321. var n = null !== t && t.apply(this, arguments) || this;
  28322. return n.type = e.type, n
  28323. }
  28324. return n(e, t), e.prototype.init = function () {
  28325. t.prototype.init.apply(this, arguments), this.mergeOption({})
  28326. }, e.prototype.mergeOption = function (t) {
  28327. var e = this.option;
  28328. t && C(e, t, !0), this._initDimensions()
  28329. }, e.prototype.contains = function (t, e) {
  28330. var n = t.get("parallelIndex");
  28331. return null != n && e.getComponent("parallel", n) === this
  28332. }, e.prototype.setAxisExpand = function (t) {
  28333. E(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], (function (e) {
  28334. t.hasOwnProperty(e) && (this.option[e] = t[e])
  28335. }), this)
  28336. }, e.prototype._initDimensions = function () {
  28337. var t = this.dimensions = [],
  28338. e = this.parallelAxisIndex = [];
  28339. E(B(this.ecModel.queryComponents({
  28340. mainType: "parallelAxis"
  28341. }), (function (t) {
  28342. return (t.get("parallelIndex") || 0) === this.componentIndex
  28343. }), this), (function (n) {
  28344. t.push("dim" + n.get("dim")), e.push(n.componentIndex)
  28345. }))
  28346. }, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = {
  28347. z: 0,
  28348. left: 80,
  28349. top: 60,
  28350. right: 80,
  28351. bottom: 60,
  28352. layout: "horizontal",
  28353. axisExpandable: !1,
  28354. axisExpandCenter: null,
  28355. axisExpandCount: 0,
  28356. axisExpandWidth: 50,
  28357. axisExpandRate: 17,
  28358. axisExpandDebounce: 50,
  28359. axisExpandSlideTriggerArea: [-.15, .05, .4],
  28360. axisExpandTriggerOn: "click",
  28361. parallelAxisDefault: null
  28362. }, e
  28363. }(Rp),
  28364. Ik = function (t) {
  28365. function e(e, n, i, r, o) {
  28366. var a = t.call(this, e, n, i) || this;
  28367. return a.type = r || "value", a.axisIndex = o, a
  28368. }
  28369. return n(e, t), e.prototype.isHorizontal = function () {
  28370. return "horizontal" !== this.coordinateSystem.getModel().get("layout")
  28371. }, e
  28372. }(nb);
  28373. function Tk(t, e, n, i, r, o) {
  28374. t = t || 0;
  28375. var a = n[1] - n[0];
  28376. if (null != r && (r = Dk(r, [0, a])), null != o && (o = Math.max(o, null != r ? r : 0)), "all" === i) {
  28377. var s = Math.abs(e[1] - e[0]);
  28378. s = Dk(s, [0, a]), r = o = Dk(s, [r, o]), i = 0
  28379. }
  28380. e[0] = Dk(e[0], n), e[1] = Dk(e[1], n);
  28381. var l = Ck(e, i);
  28382. e[i] += t;
  28383. var u, h = r || 0,
  28384. c = n.slice();
  28385. return l.sign < 0 ? c[0] += h : c[1] -= h, e[i] = Dk(e[i], c), u = Ck(e, i), null != r && (u.sign !== l.sign || u.span < r) && (e[1 - i] = e[i] + l.sign * r), u = Ck(e, i), null != o && u.span > o && (e[1 - i] = e[i] + u.sign * o), e
  28386. }
  28387. function Ck(t, e) {
  28388. var n = t[e] - t[1 - e];
  28389. return {
  28390. span: Math.abs(n),
  28391. sign: n > 0 ? -1 : n < 0 ? 1 : e ? -1 : 1
  28392. }
  28393. }
  28394. function Dk(t, e) {
  28395. return Math.min(null != e[1] ? e[1] : 1 / 0, Math.max(null != e[0] ? e[0] : -1 / 0, t))
  28396. }
  28397. var Ak = E,
  28398. kk = Math.min,
  28399. Lk = Math.max,
  28400. Pk = Math.floor,
  28401. Ok = Math.ceil,
  28402. Rk = Zr,
  28403. Nk = Math.PI,
  28404. Ek = function () {
  28405. function t(t, e, n) {
  28406. this.type = "parallel", this._axesMap = yt(), this._axesLayout = {}, this.dimensions = t.dimensions, this._model = t, this._init(t, e, n)
  28407. }
  28408. return t.prototype._init = function (t, e, n) {
  28409. var i = t.dimensions,
  28410. r = t.parallelAxisIndex;
  28411. Ak(i, (function (t, n) {
  28412. var i = r[n],
  28413. o = e.getComponent("parallelAxis", i),
  28414. a = this._axesMap.set(t, new Ik(t, m_(o), [0, 0], o.get("type"), i)),
  28415. s = "category" === a.type;
  28416. a.onBand = s && o.get("boundaryGap"), a.inverse = o.get("inverse"), o.axis = a, a.model = o, a.coordinateSystem = o.coordinateSystem = this
  28417. }), this)
  28418. }, t.prototype.update = function (t, e) {
  28419. this._updateAxesFromSeries(this._model, t)
  28420. }, t.prototype.containPoint = function (t) {
  28421. var e = this._makeLayoutInfo(),
  28422. n = e.axisBase,
  28423. i = e.layoutBase,
  28424. r = e.pixelDimIndex,
  28425. o = t[1 - r],
  28426. a = t[r];
  28427. return o >= n && o <= n + e.axisLength && a >= i && a <= i + e.layoutLength
  28428. }, t.prototype.getModel = function () {
  28429. return this._model
  28430. }, t.prototype._updateAxesFromSeries = function (t, e) {
  28431. e.eachSeries((function (n) {
  28432. if (t.contains(n, e)) {
  28433. var i = n.getData();
  28434. Ak(this.dimensions, (function (t) {
  28435. var e = this._axesMap.get(t);
  28436. e.scale.unionExtentFromData(i, i.mapDimension(t)), v_(e.scale, e.model)
  28437. }), this)
  28438. }
  28439. }), this)
  28440. }, t.prototype.resize = function (t, e) {
  28441. this._rect = Cp(t.getBoxLayoutParams(), {
  28442. width: e.getWidth(),
  28443. height: e.getHeight()
  28444. }), this._layoutAxes()
  28445. }, t.prototype.getRect = function () {
  28446. return this._rect
  28447. }, t.prototype._makeLayoutInfo = function () {
  28448. var t, e = this._model,
  28449. n = this._rect,
  28450. i = ["x", "y"],
  28451. r = ["width", "height"],
  28452. o = e.get("layout"),
  28453. a = "horizontal" === o ? 0 : 1,
  28454. s = n[r[a]],
  28455. l = [0, s],
  28456. u = this.dimensions.length,
  28457. h = zk(e.get("axisExpandWidth"), l),
  28458. c = zk(e.get("axisExpandCount") || 0, [0, u]),
  28459. p = e.get("axisExpandable") && u > 3 && u > c && c > 1 && h > 0 && s > 0,
  28460. d = e.get("axisExpandWindow");
  28461. d ? (t = zk(d[1] - d[0], l), d[1] = d[0] + t) : (t = zk(h * (c - 1), l), (d = [h * (e.get("axisExpandCenter") || Pk(u / 2)) - t / 2])[1] = d[0] + t);
  28462. var f = (s - t) / (u - c);
  28463. f < 3 && (f = 0);
  28464. var g = [Pk(Rk(d[0] / h, 1)) + 1, Ok(Rk(d[1] / h, 1)) - 1],
  28465. y = f / h * d[0];
  28466. return {
  28467. layout: o,
  28468. pixelDimIndex: a,
  28469. layoutBase: n[i[a]],
  28470. layoutLength: s,
  28471. axisBase: n[i[1 - a]],
  28472. axisLength: n[r[1 - a]],
  28473. axisExpandable: p,
  28474. axisExpandWidth: h,
  28475. axisCollapseWidth: f,
  28476. axisExpandWindow: d,
  28477. axisCount: u,
  28478. winInnerIndices: g,
  28479. axisExpandWindow0Pos: y
  28480. }
  28481. }, t.prototype._layoutAxes = function () {
  28482. var t = this._rect,
  28483. e = this._axesMap,
  28484. n = this.dimensions,
  28485. i = this._makeLayoutInfo(),
  28486. r = i.layout;
  28487. e.each((function (t) {
  28488. var e = [0, i.axisLength],
  28489. n = t.inverse ? 1 : 0;
  28490. t.setExtent(e[n], e[1 - n])
  28491. })), Ak(n, (function (e, n) {
  28492. var o = (i.axisExpandable ? Bk : Vk)(n, i),
  28493. a = {
  28494. horizontal: {
  28495. x: o.position,
  28496. y: i.axisLength
  28497. },
  28498. vertical: {
  28499. x: 0,
  28500. y: o.position
  28501. }
  28502. },
  28503. s = {
  28504. horizontal: Nk / 2,
  28505. vertical: 0
  28506. },
  28507. l = [a[r].x + t.x, a[r].y + t.y],
  28508. u = s[r],
  28509. h = [1, 0, 0, 1, 0, 0];
  28510. Se(h, h, u), we(h, h, l), this._axesLayout[e] = {
  28511. position: l,
  28512. rotation: u,
  28513. transform: h,
  28514. axisNameAvailableWidth: o.axisNameAvailableWidth,
  28515. axisLabelShow: o.axisLabelShow,
  28516. nameTruncateMaxWidth: o.nameTruncateMaxWidth,
  28517. tickDirection: 1,
  28518. labelDirection: 1
  28519. }
  28520. }), this)
  28521. }, t.prototype.getAxis = function (t) {
  28522. return this._axesMap.get(t)
  28523. }, t.prototype.dataToPoint = function (t, e) {
  28524. return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t), e)
  28525. }, t.prototype.eachActiveState = function (t, e, n, i) {
  28526. null == n && (n = 0), null == i && (i = t.count());
  28527. var r = this._axesMap,
  28528. o = this.dimensions,
  28529. a = [],
  28530. s = [];
  28531. E(o, (function (e) {
  28532. a.push(t.mapDimension(e)), s.push(r.get(e).model)
  28533. }));
  28534. for (var l = this.hasAxisBrushed(), u = n; u < i; u++) {
  28535. var h = void 0;
  28536. if (l) {
  28537. h = "active";
  28538. for (var c = t.getValues(a, u), p = 0, d = o.length; p < d; p++) {
  28539. if ("inactive" === s[p].getActiveState(c[p])) {
  28540. h = "inactive";
  28541. break
  28542. }
  28543. }
  28544. } else h = "normal";
  28545. e(h, u)
  28546. }
  28547. }, t.prototype.hasAxisBrushed = function () {
  28548. for (var t = this.dimensions, e = this._axesMap, n = !1, i = 0, r = t.length; i < r; i++) "normal" !== e.get(t[i]).model.getActiveState() && (n = !0);
  28549. return n
  28550. }, t.prototype.axisCoordToPoint = function (t, e) {
  28551. return zh([t, 0], this._axesLayout[e].transform)
  28552. }, t.prototype.getAxisLayout = function (t) {
  28553. return T(this._axesLayout[t])
  28554. }, t.prototype.getSlidedAxisExpandWindow = function (t) {
  28555. var e = this._makeLayoutInfo(),
  28556. n = e.pixelDimIndex,
  28557. i = e.axisExpandWindow.slice(),
  28558. r = i[1] - i[0],
  28559. o = [0, e.axisExpandWidth * (e.axisCount - 1)];
  28560. if (!this.containPoint(t)) return {
  28561. behavior: "none",
  28562. axisExpandWindow: i
  28563. };
  28564. var a, s = t[n] - e.layoutBase - e.axisExpandWindow0Pos,
  28565. l = "slide",
  28566. u = e.axisCollapseWidth,
  28567. h = this._model.get("axisExpandSlideTriggerArea"),
  28568. c = null != h[0];
  28569. if (u) c && u && s < r * h[0] ? (l = "jump", a = s - r * h[2]) : c && u && s > r * (1 - h[0]) ? (l = "jump", a = s - r * (1 - h[2])) : (a = s - r * h[1]) >= 0 && (a = s - r * (1 - h[1])) <= 0 && (a = 0), (a *= e.axisExpandWidth / u) ? Tk(a, i, o, "all") : l = "none";
  28570. else {
  28571. var p = i[1] - i[0];
  28572. (i = [Lk(0, o[1] * s / p - p / 2)])[1] = kk(o[1], i[0] + p), i[0] = i[1] - p
  28573. }
  28574. return {
  28575. axisExpandWindow: i,
  28576. behavior: l
  28577. }
  28578. }, t
  28579. }();
  28580. function zk(t, e) {
  28581. return kk(Lk(t, e[0]), e[1])
  28582. }
  28583. function Vk(t, e) {
  28584. var n = e.layoutLength / (e.axisCount - 1);
  28585. return {
  28586. position: n * t,
  28587. axisNameAvailableWidth: n,
  28588. axisLabelShow: !0
  28589. }
  28590. }
  28591. function Bk(t, e) {
  28592. var n, i, r = e.layoutLength,
  28593. o = e.axisExpandWidth,
  28594. a = e.axisCount,
  28595. s = e.axisCollapseWidth,
  28596. l = e.winInnerIndices,
  28597. u = s,
  28598. h = !1;
  28599. return t < l[0] ? (n = t * s, i = s) : t <= l[1] ? (n = e.axisExpandWindow0Pos + t * o - e.axisExpandWindow[0], u = o, h = !0) : (n = r - (a - 1 - t) * s, i = s), {
  28600. position: n,
  28601. axisNameAvailableWidth: u,
  28602. axisLabelShow: h,
  28603. nameTruncateMaxWidth: i
  28604. }
  28605. }
  28606. var Fk = {
  28607. create: function (t, e) {
  28608. var n = [];
  28609. return t.eachComponent("parallel", (function (i, r) {
  28610. var o = new Ek(i, t, e);
  28611. o.name = "parallel_" + r, o.resize(i, e), i.coordinateSystem = o, o.model = i, n.push(o)
  28612. })), t.eachSeries((function (t) {
  28613. if ("parallel" === t.get("coordinateSystem")) {
  28614. var e = t.getReferringComponents("parallel", zo).models[0];
  28615. t.coordinateSystem = e.coordinateSystem
  28616. }
  28617. })), n
  28618. }
  28619. },
  28620. Gk = function (t) {
  28621. function e() {
  28622. var n = null !== t && t.apply(this, arguments) || this;
  28623. return n.type = e.type, n.activeIntervals = [], n
  28624. }
  28625. return n(e, t), e.prototype.getAreaSelectStyle = function () {
  28626. return Jo([
  28627. ["fill", "color"],
  28628. ["lineWidth", "borderWidth"],
  28629. ["stroke", "borderColor"],
  28630. ["width", "width"],
  28631. ["opacity", "opacity"]
  28632. ])(this.getModel("areaSelectStyle"))
  28633. }, e.prototype.setActiveIntervals = function (t) {
  28634. var e = this.activeIntervals = T(t);
  28635. if (e)
  28636. for (var n = e.length - 1; n >= 0; n--) jr(e[n])
  28637. }, e.prototype.getActiveState = function (t) {
  28638. var e = this.activeIntervals;
  28639. if (!e.length) return "normal";
  28640. if (null == t || isNaN(+t)) return "inactive";
  28641. if (1 === e.length) {
  28642. var n = e[0];
  28643. if (n[0] <= t && t <= n[1]) return "active"
  28644. } else
  28645. for (var i = 0, r = e.length; i < r; i++)
  28646. if (e[i][0] <= t && t <= e[i][1]) return "active";
  28647. return "inactive"
  28648. }, e
  28649. }(Rp);
  28650. R(Gk, I_);
  28651. var Wk = !0,
  28652. Hk = Math.min,
  28653. Yk = Math.max,
  28654. Xk = Math.pow,
  28655. Uk = "globalPan",
  28656. Zk = {
  28657. w: [0, 0],
  28658. e: [0, 1],
  28659. n: [1, 0],
  28660. s: [1, 1]
  28661. },
  28662. jk = {
  28663. w: "ew",
  28664. e: "ew",
  28665. n: "ns",
  28666. s: "ns",
  28667. ne: "nesw",
  28668. sw: "nesw",
  28669. nw: "nwse",
  28670. se: "nwse"
  28671. },
  28672. qk = {
  28673. brushStyle: {
  28674. lineWidth: 2,
  28675. stroke: "rgba(210,219,238,0.3)",
  28676. fill: "#D2DBEE"
  28677. },
  28678. transformable: !0,
  28679. brushMode: "single",
  28680. removeOnClick: !1
  28681. },
  28682. Kk = 0,
  28683. $k = function (t) {
  28684. function e(e) {
  28685. var n = t.call(this) || this;
  28686. return n._track = [], n._covers = [], n._handlers = {}, n._zr = e, n.group = new zr, n._uid = "brushController_" + Kk++, E(ML, (function (t, e) {
  28687. this._handlers[e] = W(t, this)
  28688. }), n), n
  28689. }
  28690. return n(e, t), e.prototype.enableBrush = function (t) {
  28691. return this._brushType && this._doDisableBrush(), t.brushType && this._doEnableBrush(t), this
  28692. }, e.prototype._doEnableBrush = function (t) {
  28693. var e = this._zr;
  28694. this._enableGlobalPan || function (t, e, n) {
  28695. XI(t)[e] = n
  28696. }(e, Uk, this._uid), E(this._handlers, (function (t, n) {
  28697. e.on(n, t)
  28698. })), this._brushType = t.brushType, this._brushOption = C(T(qk), t, !0)
  28699. }, e.prototype._doDisableBrush = function () {
  28700. var t = this._zr;
  28701. ! function (t, e, n) {
  28702. var i = XI(t);
  28703. i[e] === n && (i[e] = null)
  28704. }(t, Uk, this._uid), E(this._handlers, (function (e, n) {
  28705. t.off(n, e)
  28706. })), this._brushType = this._brushOption = null
  28707. }, e.prototype.setPanels = function (t) {
  28708. if (t && t.length) {
  28709. var e = this._panels = {};
  28710. E(t, (function (t) {
  28711. e[t.panelId] = T(t)
  28712. }))
  28713. } else this._panels = null;
  28714. return this
  28715. }, e.prototype.mount = function (t) {
  28716. t = t || {}, this._enableGlobalPan = t.enableGlobalPan;
  28717. var e = this.group;
  28718. return this._zr.add(e), e.attr({
  28719. x: t.x || 0,
  28720. y: t.y || 0,
  28721. rotation: t.rotation || 0,
  28722. scaleX: t.scaleX || 1,
  28723. scaleY: t.scaleY || 1
  28724. }), this._transform = e.getLocalTransform(), this
  28725. }, e.prototype.updateCovers = function (t) {
  28726. t = z(t, (function (t) {
  28727. return C(T(qk), t, !0)
  28728. }));
  28729. var e = this._covers,
  28730. n = this._covers = [],
  28731. i = this,
  28732. r = this._creatingCover;
  28733. return new Vm(e, t, (function (t, e) {
  28734. return o(t.__brushOption, e)
  28735. }), o).add(a).update(a).remove((function (t) {
  28736. e[t] !== r && i.group.remove(e[t])
  28737. })).execute(), this;
  28738. function o(t, e) {
  28739. return (null != t.id ? t.id : "\0-brush-index-" + e) + "-" + t.brushType
  28740. }
  28741. function a(o, a) {
  28742. var s = t[o];
  28743. if (null != a && e[a] === r) n[o] = e[a];
  28744. else {
  28745. var l = n[o] = null != a ? (e[a].__brushOption = s, e[a]) : Qk(i, Jk(i, s));
  28746. nL(i, l)
  28747. }
  28748. }
  28749. }, e.prototype.unmount = function () {
  28750. return this.enableBrush(!1), aL(this), this._zr.remove(this.group), this
  28751. }, e.prototype.dispose = function () {
  28752. this.unmount(), this.off()
  28753. }, e
  28754. }(jt);
  28755. function Jk(t, e) {
  28756. var n = TL[e.brushType].createCover(t, e);
  28757. return n.__brushOption = e, eL(n, e), t.group.add(n), n
  28758. }
  28759. function Qk(t, e) {
  28760. var n = iL(e);
  28761. return n.endCreating && (n.endCreating(t, e), eL(e, e.__brushOption)), e
  28762. }
  28763. function tL(t, e) {
  28764. var n = e.__brushOption;
  28765. iL(e).updateCoverShape(t, e, n.range, n)
  28766. }
  28767. function eL(t, e) {
  28768. var n = e.z;
  28769. null == n && (n = 1e4), t.traverse((function (t) {
  28770. t.z = n, t.z2 = n
  28771. }))
  28772. }
  28773. function nL(t, e) {
  28774. iL(e).updateCommon(t, e), tL(t, e)
  28775. }
  28776. function iL(t) {
  28777. return TL[t.__brushOption.brushType]
  28778. }
  28779. function rL(t, e, n) {
  28780. var i, r = t._panels;
  28781. if (!r) return Wk;
  28782. var o = t._transform;
  28783. return E(r, (function (t) {
  28784. t.isTargetByCursor(e, n, o) && (i = t)
  28785. })), i
  28786. }
  28787. function oL(t, e) {
  28788. var n = t._panels;
  28789. if (!n) return Wk;
  28790. var i = e.__brushOption.panelId;
  28791. return null != i ? n[i] : Wk
  28792. }
  28793. function aL(t) {
  28794. var e = t._covers,
  28795. n = e.length;
  28796. return E(e, (function (e) {
  28797. t.group.remove(e)
  28798. }), t), e.length = 0, !!n
  28799. }
  28800. function sL(t, e) {
  28801. var n = z(t._covers, (function (t) {
  28802. var e = t.__brushOption,
  28803. n = T(e.range);
  28804. return {
  28805. brushType: e.brushType,
  28806. panelId: e.panelId,
  28807. range: n
  28808. }
  28809. }));
  28810. t.trigger("brush", {
  28811. areas: n,
  28812. isEnd: !!e.isEnd,
  28813. removeOnClick: !!e.removeOnClick
  28814. })
  28815. }
  28816. function lL(t) {
  28817. var e = t.length - 1;
  28818. return e < 0 && (e = 0), [t[0], t[e]]
  28819. }
  28820. function uL(t, e, n, i) {
  28821. var r = new zr;
  28822. return r.add(new zs({
  28823. name: "main",
  28824. style: dL(n),
  28825. silent: !0,
  28826. draggable: !0,
  28827. cursor: "move",
  28828. drift: H(yL, t, e, r, ["n", "s", "w", "e"]),
  28829. ondragend: H(sL, e, {
  28830. isEnd: !0
  28831. })
  28832. })), E(i, (function (n) {
  28833. r.add(new zs({
  28834. name: n.join(""),
  28835. style: {
  28836. opacity: 0
  28837. },
  28838. draggable: !0,
  28839. silent: !0,
  28840. invisible: !0,
  28841. drift: H(yL, t, e, r, n),
  28842. ondragend: H(sL, e, {
  28843. isEnd: !0
  28844. })
  28845. }))
  28846. })), r
  28847. }
  28848. function hL(t, e, n, i) {
  28849. var r = i.brushStyle.lineWidth || 0,
  28850. o = Yk(r, 6),
  28851. a = n[0][0],
  28852. s = n[1][0],
  28853. l = a - r / 2,
  28854. u = s - r / 2,
  28855. h = n[0][1],
  28856. c = n[1][1],
  28857. p = h - o + r / 2,
  28858. d = c - o + r / 2,
  28859. f = h - a,
  28860. g = c - s,
  28861. y = f + r,
  28862. v = g + r;
  28863. pL(t, e, "main", a, s, f, g), i.transformable && (pL(t, e, "w", l, u, o, v), pL(t, e, "e", p, u, o, v), pL(t, e, "n", l, u, y, o), pL(t, e, "s", l, d, y, o), pL(t, e, "nw", l, u, o, o), pL(t, e, "ne", p, u, o, o), pL(t, e, "sw", l, d, o, o), pL(t, e, "se", p, d, o, o))
  28864. }
  28865. function cL(t, e) {
  28866. var n = e.__brushOption,
  28867. i = n.transformable,
  28868. r = e.childAt(0);
  28869. r.useStyle(dL(n)), r.attr({
  28870. silent: !i,
  28871. cursor: i ? "move" : "default"
  28872. }), E([
  28873. ["w"],
  28874. ["e"],
  28875. ["n"],
  28876. ["s"],
  28877. ["s", "e"],
  28878. ["s", "w"],
  28879. ["n", "e"],
  28880. ["n", "w"]
  28881. ], (function (n) {
  28882. var r = e.childOfName(n.join("")),
  28883. o = 1 === n.length ? gL(t, n[0]) : function (t, e) {
  28884. var n = [gL(t, e[0]), gL(t, e[1])];
  28885. return ("e" === n[0] || "w" === n[0]) && n.reverse(), n.join("")
  28886. }(t, n);
  28887. r && r.attr({
  28888. silent: !i,
  28889. invisible: !i,
  28890. cursor: i ? jk[o] + "-resize" : null
  28891. })
  28892. }))
  28893. }
  28894. function pL(t, e, n, i, r, o, a) {
  28895. var s = e.childOfName(n);
  28896. s && s.setShape(function (t) {
  28897. var e = Hk(t[0][0], t[1][0]),
  28898. n = Hk(t[0][1], t[1][1]),
  28899. i = Yk(t[0][0], t[1][0]),
  28900. r = Yk(t[0][1], t[1][1]);
  28901. return {
  28902. x: e,
  28903. y: n,
  28904. width: i - e,
  28905. height: r - n
  28906. }
  28907. }(xL(t, e, [
  28908. [i, r],
  28909. [i + o, r + a]
  28910. ])))
  28911. }
  28912. function dL(t) {
  28913. return k({
  28914. strokeNoScale: !0
  28915. }, t.brushStyle)
  28916. }
  28917. function fL(t, e, n, i) {
  28918. var r = [Hk(t, n), Hk(e, i)],
  28919. o = [Yk(t, n), Yk(e, i)];
  28920. return [
  28921. [r[0], o[0]],
  28922. [r[1], o[1]]
  28923. ]
  28924. }
  28925. function gL(t, e) {
  28926. var n = Vh({
  28927. w: "left",
  28928. e: "right",
  28929. n: "top",
  28930. s: "bottom"
  28931. } [e], function (t) {
  28932. return Eh(t.group)
  28933. }(t));
  28934. return {
  28935. left: "w",
  28936. right: "e",
  28937. top: "n",
  28938. bottom: "s"
  28939. } [n]
  28940. }
  28941. function yL(t, e, n, i, r, o) {
  28942. var a = n.__brushOption,
  28943. s = t.toRectRange(a.range),
  28944. l = mL(e, r, o);
  28945. E(i, (function (t) {
  28946. var e = Zk[t];
  28947. s[e[0]][e[1]] += l[e[0]]
  28948. })), a.range = t.fromRectRange(fL(s[0][0], s[1][0], s[0][1], s[1][1])), nL(e, n), sL(e, {
  28949. isEnd: !1
  28950. })
  28951. }
  28952. function vL(t, e, n, i) {
  28953. var r = e.__brushOption.range,
  28954. o = mL(t, n, i);
  28955. E(r, (function (t) {
  28956. t[0] += o[0], t[1] += o[1]
  28957. })), nL(t, e), sL(t, {
  28958. isEnd: !1
  28959. })
  28960. }
  28961. function mL(t, e, n) {
  28962. var i = t.group,
  28963. r = i.transformCoordToLocal(e, n),
  28964. o = i.transformCoordToLocal(0, 0);
  28965. return [r[0] - o[0], r[1] - o[1]]
  28966. }
  28967. function xL(t, e, n) {
  28968. var i = oL(t, e);
  28969. return i && i !== Wk ? i.clipPath(n, t._transform) : T(n)
  28970. }
  28971. function _L(t) {
  28972. var e = t.event;
  28973. e.preventDefault && e.preventDefault()
  28974. }
  28975. function bL(t, e, n) {
  28976. return t.childOfName("main").contain(e, n)
  28977. }
  28978. function wL(t, e, n, i) {
  28979. var r, o = t._creatingCover,
  28980. a = t._creatingPanel,
  28981. s = t._brushOption;
  28982. if (t._track.push(n.slice()), function (t) {
  28983. var e = t._track;
  28984. if (!e.length) return !1;
  28985. var n = e[e.length - 1],
  28986. i = e[0],
  28987. r = n[0] - i[0],
  28988. o = n[1] - i[1];
  28989. return Xk(r * r + o * o, .5) > 6
  28990. }(t) || o) {
  28991. if (a && !o) {
  28992. "single" === s.brushMode && aL(t);
  28993. var l = T(s);
  28994. l.brushType = SL(l.brushType, a), l.panelId = a === Wk ? null : a.panelId, o = t._creatingCover = Jk(t, l), t._covers.push(o)
  28995. }
  28996. if (o) {
  28997. var u = TL[SL(t._brushType, a)];
  28998. o.__brushOption.range = u.getCreatingRange(xL(t, o, t._track)), i && (Qk(t, o), u.updateCommon(t, o)), tL(t, o), r = {
  28999. isEnd: i
  29000. }
  29001. }
  29002. } else i && "single" === s.brushMode && s.removeOnClick && rL(t, e, n) && aL(t) && (r = {
  29003. isEnd: i,
  29004. removeOnClick: !0
  29005. });
  29006. return r
  29007. }
  29008. function SL(t, e) {
  29009. return "auto" === t ? e.defaultBrushType : t
  29010. }
  29011. var ML = {
  29012. mousedown: function (t) {
  29013. if (this._dragging) IL(this, t);
  29014. else if (!t.target || !t.target.draggable) {
  29015. _L(t);
  29016. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  29017. this._creatingCover = null, (this._creatingPanel = rL(this, t, e)) && (this._dragging = !0, this._track = [e.slice()])
  29018. }
  29019. },
  29020. mousemove: function (t) {
  29021. var e = t.offsetX,
  29022. n = t.offsetY,
  29023. i = this.group.transformCoordToLocal(e, n);
  29024. if (function (t, e, n) {
  29025. if (t._brushType && ! function (t, e, n) {
  29026. var i = t._zr;
  29027. return e < 0 || e > i.getWidth() || n < 0 || n > i.getHeight()
  29028. }(t, e.offsetX, e.offsetY)) {
  29029. var i = t._zr,
  29030. r = t._covers,
  29031. o = rL(t, e, n);
  29032. if (!t._dragging)
  29033. for (var a = 0; a < r.length; a++) {
  29034. var s = r[a].__brushOption;
  29035. if (o && (o === Wk || s.panelId === o.panelId) && TL[s.brushType].contain(r[a], n[0], n[1])) return
  29036. }
  29037. o && i.setCursorStyle("crosshair")
  29038. }
  29039. }(this, t, i), this._dragging) {
  29040. _L(t);
  29041. var r = wL(this, t, i, !1);
  29042. r && sL(this, r)
  29043. }
  29044. },
  29045. mouseup: function (t) {
  29046. IL(this, t)
  29047. }
  29048. };
  29049. function IL(t, e) {
  29050. if (t._dragging) {
  29051. _L(e);
  29052. var n = e.offsetX,
  29053. i = e.offsetY,
  29054. r = t.group.transformCoordToLocal(n, i),
  29055. o = wL(t, e, r, !0);
  29056. t._dragging = !1, t._track = [], t._creatingCover = null, o && sL(t, o)
  29057. }
  29058. }
  29059. var TL = {
  29060. lineX: CL(0),
  29061. lineY: CL(1),
  29062. rect: {
  29063. createCover: function (t, e) {
  29064. function n(t) {
  29065. return t
  29066. }
  29067. return uL({
  29068. toRectRange: n,
  29069. fromRectRange: n
  29070. }, t, e, [
  29071. ["w"],
  29072. ["e"],
  29073. ["n"],
  29074. ["s"],
  29075. ["s", "e"],
  29076. ["s", "w"],
  29077. ["n", "e"],
  29078. ["n", "w"]
  29079. ])
  29080. },
  29081. getCreatingRange: function (t) {
  29082. var e = lL(t);
  29083. return fL(e[1][0], e[1][1], e[0][0], e[0][1])
  29084. },
  29085. updateCoverShape: function (t, e, n, i) {
  29086. hL(t, e, n, i)
  29087. },
  29088. updateCommon: cL,
  29089. contain: bL
  29090. },
  29091. polygon: {
  29092. createCover: function (t, e) {
  29093. var n = new zr;
  29094. return n.add(new Yu({
  29095. name: "main",
  29096. style: dL(e),
  29097. silent: !0
  29098. })), n
  29099. },
  29100. getCreatingRange: function (t) {
  29101. return t
  29102. },
  29103. endCreating: function (t, e) {
  29104. e.remove(e.childAt(0)), e.add(new Wu({
  29105. name: "main",
  29106. draggable: !0,
  29107. drift: H(vL, t, e),
  29108. ondragend: H(sL, t, {
  29109. isEnd: !0
  29110. })
  29111. }))
  29112. },
  29113. updateCoverShape: function (t, e, n, i) {
  29114. e.childAt(0).setShape({
  29115. points: xL(t, e, n)
  29116. })
  29117. },
  29118. updateCommon: cL,
  29119. contain: bL
  29120. }
  29121. };
  29122. function CL(t) {
  29123. return {
  29124. createCover: function (e, n) {
  29125. return uL({
  29126. toRectRange: function (e) {
  29127. var n = [e, [0, 100]];
  29128. return t && n.reverse(), n
  29129. },
  29130. fromRectRange: function (e) {
  29131. return e[t]
  29132. }
  29133. }, e, n, [
  29134. [
  29135. ["w"],
  29136. ["e"]
  29137. ],
  29138. [
  29139. ["n"],
  29140. ["s"]
  29141. ]
  29142. ][t])
  29143. },
  29144. getCreatingRange: function (e) {
  29145. var n = lL(e);
  29146. return [Hk(n[0][t], n[1][t]), Yk(n[0][t], n[1][t])]
  29147. },
  29148. updateCoverShape: function (e, n, i, r) {
  29149. var o, a = oL(e, n);
  29150. if (a !== Wk && a.getLinearBrushOtherExtent) o = a.getLinearBrushOtherExtent(t);
  29151. else {
  29152. var s = e._zr;
  29153. o = [0, [s.getWidth(), s.getHeight()][1 - t]]
  29154. }
  29155. var l = [i, o];
  29156. t && l.reverse(), hL(e, n, l, r)
  29157. },
  29158. updateCommon: cL,
  29159. contain: bL
  29160. }
  29161. }
  29162. function DL(t) {
  29163. return t = LL(t),
  29164. function (e) {
  29165. return Gh(e, t)
  29166. }
  29167. }
  29168. function AL(t, e) {
  29169. return t = LL(t),
  29170. function (n) {
  29171. var i = null != e ? e : n,
  29172. r = i ? t.width : t.height,
  29173. o = i ? t.x : t.y;
  29174. return [o, o + (r || 0)]
  29175. }
  29176. }
  29177. function kL(t, e, n) {
  29178. var i = LL(t);
  29179. return function (t, r) {
  29180. return i.contain(r[0], r[1]) && !tT(t, e, n)
  29181. }
  29182. }
  29183. function LL(t) {
  29184. return ze.create(t)
  29185. }
  29186. var PL = ["axisLine", "axisTickLabel", "axisName"],
  29187. OL = function (t) {
  29188. function e() {
  29189. var n = null !== t && t.apply(this, arguments) || this;
  29190. return n.type = e.type, n
  29191. }
  29192. return n(e, t), e.prototype.init = function (e, n) {
  29193. t.prototype.init.apply(this, arguments), (this._brushController = new $k(n.getZr())).on("brush", W(this._onBrush, this))
  29194. }, e.prototype.render = function (t, e, n, i) {
  29195. if (! function (t, e, n) {
  29196. return n && "axisAreaSelect" === n.type && e.findComponents({
  29197. mainType: "parallelAxis",
  29198. query: n
  29199. })[0] === t
  29200. }(t, e, i)) {
  29201. this.axisModel = t, this.api = n, this.group.removeAll();
  29202. var r = this._axisGroup;
  29203. if (this._axisGroup = new zr, this.group.add(this._axisGroup), t.get("show")) {
  29204. var o = function (t, e) {
  29205. return e.getComponent("parallel", t.get("parallelIndex"))
  29206. }(t, e),
  29207. a = o.coordinateSystem,
  29208. s = t.getAreaSelectStyle(),
  29209. l = s.width,
  29210. u = t.axis.dim,
  29211. h = A({
  29212. strokeContainThreshold: l
  29213. }, a.getAxisLayout(u)),
  29214. c = new iI(t, h);
  29215. E(PL, c.add, c), this._axisGroup.add(c.getGroup()), this._refreshBrushController(h, s, t, o, l, n), Fh(r, this._axisGroup, t)
  29216. }
  29217. }
  29218. }, e.prototype._refreshBrushController = function (t, e, n, i, r, o) {
  29219. var a = n.axis.getExtent(),
  29220. s = a[1] - a[0],
  29221. l = Math.min(30, .1 * Math.abs(s)),
  29222. u = ze.create({
  29223. x: a[0],
  29224. y: -r / 2,
  29225. width: s,
  29226. height: r
  29227. });
  29228. u.x -= l, u.width += 2 * l, this._brushController.mount({
  29229. enableGlobalPan: !0,
  29230. rotation: t.rotation,
  29231. x: t.position[0],
  29232. y: t.position[1]
  29233. }).setPanels([{
  29234. panelId: "pl",
  29235. clipPath: DL(u),
  29236. isTargetByCursor: kL(u, o, i),
  29237. getLinearBrushOtherExtent: AL(u, 0)
  29238. }]).enableBrush({
  29239. brushType: "lineX",
  29240. brushStyle: e,
  29241. removeOnClick: !0
  29242. }).updateCovers(function (t) {
  29243. var e = t.axis;
  29244. return z(t.activeIntervals, (function (t) {
  29245. return {
  29246. brushType: "lineX",
  29247. panelId: "pl",
  29248. range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)]
  29249. }
  29250. }))
  29251. }(n))
  29252. }, e.prototype._onBrush = function (t) {
  29253. var e = t.areas,
  29254. n = this.axisModel,
  29255. i = n.axis,
  29256. r = z(e, (function (t) {
  29257. return [i.coordToData(t.range[0], !0), i.coordToData(t.range[1], !0)]
  29258. }));
  29259. (!n.option.realtime === t.isEnd || t.removeOnClick) && this.api.dispatchAction({
  29260. type: "axisAreaSelect",
  29261. parallelAxisId: n.id,
  29262. intervals: r
  29263. })
  29264. }, e.prototype.dispose = function () {
  29265. this._brushController.dispose()
  29266. }, e.type = "parallelAxis", e
  29267. }(Tg);
  29268. var RL = {
  29269. type: "axisAreaSelect",
  29270. event: "axisAreaSelected"
  29271. };
  29272. var NL = {
  29273. type: "value",
  29274. areaSelectStyle: {
  29275. width: 20,
  29276. borderWidth: 1,
  29277. borderColor: "rgba(160,197,232)",
  29278. color: "rgba(160,197,232)",
  29279. opacity: .3
  29280. },
  29281. realtime: !0,
  29282. z: 10
  29283. };
  29284. function EL(t) {
  29285. t.registerComponentView(bk), t.registerComponentModel(Mk), t.registerCoordinateSystem("parallel", Fk), t.registerPreprocessor(_k), t.registerComponentModel(Gk), t.registerComponentView(OL), FM(t, "parallel", Gk, NL),
  29286. function (t) {
  29287. t.registerAction(RL, (function (t, e) {
  29288. e.eachComponent({
  29289. mainType: "parallelAxis",
  29290. query: t
  29291. }, (function (e) {
  29292. e.axis.model.setActiveIntervals(t.intervals)
  29293. }))
  29294. })), t.registerAction("parallelAxisExpand", (function (t, e) {
  29295. e.eachComponent({
  29296. mainType: "parallel",
  29297. query: t
  29298. }, (function (e) {
  29299. e.setAxisExpand(t)
  29300. }))
  29301. }))
  29302. }(t)
  29303. }
  29304. var zL = function () {
  29305. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.cpx2 = 0, this.cpy2 = 0, this.extent = 0
  29306. },
  29307. VL = function (t) {
  29308. function e(e) {
  29309. return t.call(this, e) || this
  29310. }
  29311. return n(e, t), e.prototype.getDefaultShape = function () {
  29312. return new zL
  29313. }, e.prototype.buildPath = function (t, e) {
  29314. var n = e.extent;
  29315. t.moveTo(e.x1, e.y1), t.bezierCurveTo(e.cpx1, e.cpy1, e.cpx2, e.cpy2, e.x2, e.y2), "vertical" === e.orient ? (t.lineTo(e.x2 + n, e.y2), t.bezierCurveTo(e.cpx2 + n, e.cpy2, e.cpx1 + n, e.cpy1, e.x1 + n, e.y1)) : (t.lineTo(e.x2, e.y2 + n), t.bezierCurveTo(e.cpx2, e.cpy2 + n, e.cpx1, e.cpy1 + n, e.x1, e.y1 + n)), t.closePath()
  29316. }, e.prototype.highlight = function () {
  29317. kl(this)
  29318. }, e.prototype.downplay = function () {
  29319. Ll(this)
  29320. }, e
  29321. }(Is),
  29322. BL = function (t) {
  29323. function e() {
  29324. var n = null !== t && t.apply(this, arguments) || this;
  29325. return n.type = e.type, n._focusAdjacencyDisabled = !1, n
  29326. }
  29327. return n(e, t), e.prototype.render = function (t, e, n) {
  29328. var i = this,
  29329. r = t.getGraph(),
  29330. o = this.group,
  29331. a = t.layoutInfo,
  29332. s = a.width,
  29333. l = a.height,
  29334. u = t.getData(),
  29335. h = t.getData("edge"),
  29336. c = t.get("orient");
  29337. this._model = t, o.removeAll(), o.x = a.x, o.y = a.y, r.eachEdge((function (e) {
  29338. var n = new VL,
  29339. i = Qs(n);
  29340. i.dataIndex = e.dataIndex, i.seriesIndex = t.seriesIndex, i.dataType = "edge";
  29341. var r, a, u, p, d, f, g, y, v = e.getModel(),
  29342. m = v.getModel("lineStyle"),
  29343. x = m.get("curveness"),
  29344. _ = e.node1.getLayout(),
  29345. b = e.node1.getModel(),
  29346. w = b.get("localX"),
  29347. S = b.get("localY"),
  29348. M = e.node2.getLayout(),
  29349. I = e.node2.getModel(),
  29350. T = I.get("localX"),
  29351. C = I.get("localY"),
  29352. D = e.getLayout();
  29353. switch (n.shape.extent = Math.max(1, D.dy), n.shape.orient = c, "vertical" === c ? (r = (null != w ? w * s : _.x) + D.sy, a = (null != S ? S * l : _.y) + _.dy, u = (null != T ? T * s : M.x) + D.ty, d = r, f = a * (1 - x) + (p = null != C ? C * l : M.y) * x, g = u, y = a * x + p * (1 - x)) : (r = (null != w ? w * s : _.x) + _.dx, a = (null != S ? S * l : _.y) + D.sy, d = r * (1 - x) + (u = null != T ? T * s : M.x) * x, f = a, g = r * x + u * (1 - x), y = p = (null != C ? C * l : M.y) + D.ty), n.setShape({
  29354. x1: r,
  29355. y1: a,
  29356. x2: u,
  29357. y2: p,
  29358. cpx1: d,
  29359. cpy1: f,
  29360. cpx2: g,
  29361. cpy2: y
  29362. }), n.useStyle(m.getItemStyle()), n.style.fill) {
  29363. case "source":
  29364. n.style.fill = e.node1.getVisual("color"), n.style.decal = e.node1.getVisual("style").decal;
  29365. break;
  29366. case "target":
  29367. n.style.fill = e.node2.getVisual("color"), n.style.decal = e.node2.getVisual("style").decal;
  29368. break;
  29369. case "gradient":
  29370. var A = e.node1.getVisual("color"),
  29371. k = e.node2.getVisual("color");
  29372. U(A) && U(k) && (n.style.fill = new nh(0, 0, +("horizontal" === c), +("vertical" === c), [{
  29373. color: A,
  29374. offset: 0
  29375. }, {
  29376. color: k,
  29377. offset: 1
  29378. }]))
  29379. }
  29380. tc(n, ec(v, "edgeLabel"), {
  29381. labelFetcher: t,
  29382. labelDataIndex: e.dataIndex,
  29383. defaultText: "" + v.get("value")
  29384. }), n.setTextConfig({
  29385. position: "inside"
  29386. });
  29387. var L = v.getModel("emphasis");
  29388. jl(n, v, "lineStyle", (function (t) {
  29389. return t.getItemStyle()
  29390. })), o.add(n), h.setItemGraphicEl(e.dataIndex, n);
  29391. var P = L.get("focus");
  29392. Yl(n, "adjacency" === P ? e.getAdjacentDataIndices() : P, L.get("blurScope"), L.get("disabled")), Qs(n).dataType = "edge"
  29393. })), r.eachNode((function (e) {
  29394. var n = e.getLayout(),
  29395. i = e.getModel(),
  29396. r = i.get("localX"),
  29397. a = i.get("localY"),
  29398. h = i.getModel("emphasis"),
  29399. c = new zs({
  29400. shape: {
  29401. x: null != r ? r * s : n.x,
  29402. y: null != a ? a * l : n.y,
  29403. width: n.dx,
  29404. height: n.dy
  29405. },
  29406. style: i.getModel("itemStyle").getItemStyle(),
  29407. z2: 10
  29408. });
  29409. tc(c, ec(i), {
  29410. labelFetcher: t,
  29411. labelDataIndex: e.dataIndex,
  29412. defaultText: e.id
  29413. }), c.disableLabelAnimation = !0, c.setStyle("fill", e.getVisual("color")), c.setStyle("decal", e.getVisual("style").decal), jl(c, i), o.add(c), u.setItemGraphicEl(e.dataIndex, c), Qs(c).dataType = "node";
  29414. var p = h.get("focus");
  29415. Yl(c, "adjacency" === p ? e.getAdjacentDataIndices() : p, h.get("blurScope"), h.get("disabled"))
  29416. })), u.eachItemGraphicEl((function (e, r) {
  29417. u.getItemModel(r).get("draggable") && (e.drift = function (e, o) {
  29418. i._focusAdjacencyDisabled = !0, this.shape.x += e, this.shape.y += o, this.dirty(), n.dispatchAction({
  29419. type: "dragNode",
  29420. seriesId: t.id,
  29421. dataIndex: u.getRawIndex(r),
  29422. localX: this.shape.x / s,
  29423. localY: this.shape.y / l
  29424. })
  29425. }, e.ondragend = function () {
  29426. i._focusAdjacencyDisabled = !1
  29427. }, e.draggable = !0, e.cursor = "move")
  29428. })), !this._data && t.isAnimationEnabled() && o.setClipPath(function (t, e, n) {
  29429. var i = new zs({
  29430. shape: {
  29431. x: t.x - 10,
  29432. y: t.y - 10,
  29433. width: 0,
  29434. height: t.height + 20
  29435. }
  29436. });
  29437. return gh(i, {
  29438. shape: {
  29439. width: t.width + 20
  29440. }
  29441. }, e, n), i
  29442. }(o.getBoundingRect(), t, (function () {
  29443. o.removeClipPath()
  29444. }))), this._data = t.getData()
  29445. }, e.prototype.dispose = function () {}, e.type = "sankey", e
  29446. }(kg);
  29447. var FL = function (t) {
  29448. function e() {
  29449. var n = null !== t && t.apply(this, arguments) || this;
  29450. return n.type = e.type, n
  29451. }
  29452. return n(e, t), e.prototype.getInitialData = function (t, e) {
  29453. var n = t.edges || t.links,
  29454. i = t.data || t.nodes,
  29455. r = t.levels;
  29456. this.levelModels = [];
  29457. for (var o = this.levelModels, a = 0; a < r.length; a++) null != r[a].depth && r[a].depth >= 0 && (o[r[a].depth] = new Mc(r[a], this, e));
  29458. if (i && n) {
  29459. var s = JA(i, n, this, !0, (function (t, e) {
  29460. t.wrapMethod("getItemModel", (function (t, e) {
  29461. var n = t.parentModel,
  29462. i = n.getData().getItemLayout(e);
  29463. if (i) {
  29464. var r = i.depth,
  29465. o = n.levelModels[r];
  29466. o && (t.parentModel = o)
  29467. }
  29468. return t
  29469. })), e.wrapMethod("getItemModel", (function (t, e) {
  29470. var n = t.parentModel,
  29471. i = n.getGraph().getEdgeByIndex(e).node1.getLayout();
  29472. if (i) {
  29473. var r = i.depth,
  29474. o = n.levelModels[r];
  29475. o && (t.parentModel = o)
  29476. }
  29477. return t
  29478. }))
  29479. }));
  29480. return s.data
  29481. }
  29482. }, e.prototype.setNodePosition = function (t, e) {
  29483. var n = (this.option.data || this.option.nodes)[t];
  29484. n.localX = e[0], n.localY = e[1]
  29485. }, e.prototype.getGraph = function () {
  29486. return this.getData().graph
  29487. }, e.prototype.getEdgeData = function () {
  29488. return this.getGraph().edgeData
  29489. }, e.prototype.formatTooltip = function (t, e, n) {
  29490. function i(t) {
  29491. return isNaN(t) || null == t
  29492. }
  29493. if ("edge" === n) {
  29494. var r = this.getDataParams(t, n),
  29495. o = r.data,
  29496. a = r.value;
  29497. return ng("nameValue", {
  29498. name: o.source + " -- " + o.target,
  29499. value: a,
  29500. noValue: i(a)
  29501. })
  29502. }
  29503. var s = this.getGraph().getNodeByIndex(t).getLayout().value,
  29504. l = this.getDataParams(t, n).data.name;
  29505. return ng("nameValue", {
  29506. name: null != l ? l + "" : null,
  29507. value: s,
  29508. noValue: i(s)
  29509. })
  29510. }, e.prototype.optionUpdated = function () {}, e.prototype.getDataParams = function (e, n) {
  29511. var i = t.prototype.getDataParams.call(this, e, n);
  29512. if (null == i.value && "node" === n) {
  29513. var r = this.getGraph().getNodeByIndex(e).getLayout().value;
  29514. i.value = r
  29515. }
  29516. return i
  29517. }, e.type = "series.sankey", e.defaultOption = {
  29518. z: 2,
  29519. coordinateSystem: "view",
  29520. left: "5%",
  29521. top: "5%",
  29522. right: "20%",
  29523. bottom: "5%",
  29524. orient: "horizontal",
  29525. nodeWidth: 20,
  29526. nodeGap: 8,
  29527. draggable: !0,
  29528. layoutIterations: 32,
  29529. label: {
  29530. show: !0,
  29531. position: "right",
  29532. fontSize: 12
  29533. },
  29534. edgeLabel: {
  29535. show: !1,
  29536. fontSize: 12
  29537. },
  29538. levels: [],
  29539. nodeAlign: "justify",
  29540. lineStyle: {
  29541. color: "#314656",
  29542. opacity: .2,
  29543. curveness: .5
  29544. },
  29545. emphasis: {
  29546. label: {
  29547. show: !0
  29548. },
  29549. lineStyle: {
  29550. opacity: .5
  29551. }
  29552. },
  29553. select: {
  29554. itemStyle: {
  29555. borderColor: "#212121"
  29556. }
  29557. },
  29558. animationEasing: "linear",
  29559. animationDuration: 1e3
  29560. }, e
  29561. }(mg);
  29562. function GL(t, e) {
  29563. t.eachSeriesByType("sankey", (function (t) {
  29564. var n = t.get("nodeWidth"),
  29565. i = t.get("nodeGap"),
  29566. r = function (t, e) {
  29567. return Cp(t.getBoxLayoutParams(), {
  29568. width: e.getWidth(),
  29569. height: e.getHeight()
  29570. })
  29571. }(t, e);
  29572. t.layoutInfo = r;
  29573. var o = r.width,
  29574. a = r.height,
  29575. s = t.getGraph(),
  29576. l = s.nodes,
  29577. u = s.edges;
  29578. ! function (t) {
  29579. E(t, (function (t) {
  29580. var e = $L(t.outEdges, KL),
  29581. n = $L(t.inEdges, KL),
  29582. i = t.getValue() || 0,
  29583. r = Math.max(e, n, i);
  29584. t.setLayout({
  29585. value: r
  29586. }, !0)
  29587. }))
  29588. }(l),
  29589. function (t, e, n, i, r, o, a, s, l) {
  29590. (function (t, e, n, i, r, o, a) {
  29591. for (var s = [], l = [], u = [], h = [], c = 0, p = 0; p < e.length; p++) s[p] = 1;
  29592. for (p = 0; p < t.length; p++) l[p] = t[p].inEdges.length, 0 === l[p] && u.push(t[p]);
  29593. var d = -1;
  29594. for (; u.length;) {
  29595. for (var f = 0; f < u.length; f++) {
  29596. var g = u[f],
  29597. y = g.hostGraph.data.getRawDataItem(g.dataIndex),
  29598. v = null != y.depth && y.depth >= 0;
  29599. v && y.depth > d && (d = y.depth), g.setLayout({
  29600. depth: v ? y.depth : c
  29601. }, !0), "vertical" === o ? g.setLayout({
  29602. dy: n
  29603. }, !0) : g.setLayout({
  29604. dx: n
  29605. }, !0);
  29606. for (var m = 0; m < g.outEdges.length; m++) {
  29607. var x = g.outEdges[m];
  29608. s[e.indexOf(x)] = 0;
  29609. var _ = x.node2;
  29610. 0 == --l[t.indexOf(_)] && h.indexOf(_) < 0 && h.push(_)
  29611. }
  29612. }++c, u = h, h = []
  29613. }
  29614. for (p = 0; p < s.length; p++)
  29615. if (1 === s[p]) throw new Error("Sankey is a DAG, the original data has cycle!");
  29616. var b = d > c - 1 ? d : c - 1;
  29617. a && "left" !== a && function (t, e, n, i) {
  29618. if ("right" === e) {
  29619. for (var r = [], o = t, a = 0; o.length;) {
  29620. for (var s = 0; s < o.length; s++) {
  29621. var l = o[s];
  29622. l.setLayout({
  29623. skNodeHeight: a
  29624. }, !0);
  29625. for (var u = 0; u < l.inEdges.length; u++) {
  29626. var h = l.inEdges[u];
  29627. r.indexOf(h.node1) < 0 && r.push(h.node1)
  29628. }
  29629. }
  29630. o = r, r = [], ++a
  29631. }
  29632. E(t, (function (t) {
  29633. WL(t) || t.setLayout({
  29634. depth: Math.max(0, i - t.getLayout().skNodeHeight)
  29635. }, !0)
  29636. }))
  29637. } else "justify" === e && function (t, e) {
  29638. E(t, (function (t) {
  29639. WL(t) || t.outEdges.length || t.setLayout({
  29640. depth: e
  29641. }, !0)
  29642. }))
  29643. }(t, i)
  29644. }(t, a, 0, b);
  29645. var w = "vertical" === o ? (r - n) / b : (i - n) / b;
  29646. ! function (t, e, n) {
  29647. E(t, (function (t) {
  29648. var i = t.getLayout().depth * e;
  29649. "vertical" === n ? t.setLayout({
  29650. y: i
  29651. }, !0) : t.setLayout({
  29652. x: i
  29653. }, !0)
  29654. }))
  29655. }(t, w, o)
  29656. })(t, e, n, r, o, s, l),
  29657. function (t, e, n, i, r, o, a) {
  29658. var s = function (t, e) {
  29659. var n = [],
  29660. i = "vertical" === e ? "y" : "x",
  29661. r = Go(t, (function (t) {
  29662. return t.getLayout()[i]
  29663. }));
  29664. return r.keys.sort((function (t, e) {
  29665. return t - e
  29666. })), E(r.keys, (function (t) {
  29667. n.push(r.buckets.get(t))
  29668. })), n
  29669. }(t, a);
  29670. (function (t, e, n, i, r, o) {
  29671. var a = 1 / 0;
  29672. E(t, (function (t) {
  29673. var e = t.length,
  29674. s = 0;
  29675. E(t, (function (t) {
  29676. s += t.getLayout().value
  29677. }));
  29678. var l = "vertical" === o ? (i - (e - 1) * r) / s : (n - (e - 1) * r) / s;
  29679. l < a && (a = l)
  29680. })), E(t, (function (t) {
  29681. E(t, (function (t, e) {
  29682. var n = t.getLayout().value * a;
  29683. "vertical" === o ? (t.setLayout({
  29684. x: e
  29685. }, !0), t.setLayout({
  29686. dx: n
  29687. }, !0)) : (t.setLayout({
  29688. y: e
  29689. }, !0), t.setLayout({
  29690. dy: n
  29691. }, !0))
  29692. }))
  29693. })), E(e, (function (t) {
  29694. var e = +t.getValue() * a;
  29695. t.setLayout({
  29696. dy: e
  29697. }, !0)
  29698. }))
  29699. })(s, e, n, i, r, a), HL(s, r, n, i, a);
  29700. for (var l = 1; o > 0; o--) YL(s, l *= .99, a), HL(s, r, n, i, a), JL(s, l, a), HL(s, r, n, i, a)
  29701. }(t, e, o, r, i, a, s),
  29702. function (t, e) {
  29703. var n = "vertical" === e ? "x" : "y";
  29704. E(t, (function (t) {
  29705. t.outEdges.sort((function (t, e) {
  29706. return t.node2.getLayout()[n] - e.node2.getLayout()[n]
  29707. })), t.inEdges.sort((function (t, e) {
  29708. return t.node1.getLayout()[n] - e.node1.getLayout()[n]
  29709. }))
  29710. })), E(t, (function (t) {
  29711. var e = 0,
  29712. n = 0;
  29713. E(t.outEdges, (function (t) {
  29714. t.setLayout({
  29715. sy: e
  29716. }, !0), e += t.getLayout().dy
  29717. })), E(t.inEdges, (function (t) {
  29718. t.setLayout({
  29719. ty: n
  29720. }, !0), n += t.getLayout().dy
  29721. }))
  29722. }))
  29723. }(t, s)
  29724. }(l, u, n, i, o, a, 0 !== B(l, (function (t) {
  29725. return 0 === t.getLayout().value
  29726. })).length ? 0 : t.get("layoutIterations"), t.get("orient"), t.get("nodeAlign"))
  29727. }))
  29728. }
  29729. function WL(t) {
  29730. var e = t.hostGraph.data.getRawDataItem(t.dataIndex);
  29731. return null != e.depth && e.depth >= 0
  29732. }
  29733. function HL(t, e, n, i, r) {
  29734. var o = "vertical" === r ? "x" : "y";
  29735. E(t, (function (t) {
  29736. var a, s, l;
  29737. t.sort((function (t, e) {
  29738. return t.getLayout()[o] - e.getLayout()[o]
  29739. }));
  29740. for (var u = 0, h = t.length, c = "vertical" === r ? "dx" : "dy", p = 0; p < h; p++)(l = u - (s = t[p]).getLayout()[o]) > 0 && (a = s.getLayout()[o] + l, "vertical" === r ? s.setLayout({
  29741. x: a
  29742. }, !0) : s.setLayout({
  29743. y: a
  29744. }, !0)), u = s.getLayout()[o] + s.getLayout()[c] + e;
  29745. if ((l = u - e - ("vertical" === r ? i : n)) > 0) {
  29746. a = s.getLayout()[o] - l, "vertical" === r ? s.setLayout({
  29747. x: a
  29748. }, !0) : s.setLayout({
  29749. y: a
  29750. }, !0), u = a;
  29751. for (p = h - 2; p >= 0; --p)(l = (s = t[p]).getLayout()[o] + s.getLayout()[c] + e - u) > 0 && (a = s.getLayout()[o] - l, "vertical" === r ? s.setLayout({
  29752. x: a
  29753. }, !0) : s.setLayout({
  29754. y: a
  29755. }, !0)), u = s.getLayout()[o]
  29756. }
  29757. }))
  29758. }
  29759. function YL(t, e, n) {
  29760. E(t.slice().reverse(), (function (t) {
  29761. E(t, (function (t) {
  29762. if (t.outEdges.length) {
  29763. var i = $L(t.outEdges, XL, n) / $L(t.outEdges, KL);
  29764. if (isNaN(i)) {
  29765. var r = t.outEdges.length;
  29766. i = r ? $L(t.outEdges, UL, n) / r : 0
  29767. }
  29768. if ("vertical" === n) {
  29769. var o = t.getLayout().x + (i - qL(t, n)) * e;
  29770. t.setLayout({
  29771. x: o
  29772. }, !0)
  29773. } else {
  29774. var a = t.getLayout().y + (i - qL(t, n)) * e;
  29775. t.setLayout({
  29776. y: a
  29777. }, !0)
  29778. }
  29779. }
  29780. }))
  29781. }))
  29782. }
  29783. function XL(t, e) {
  29784. return qL(t.node2, e) * t.getValue()
  29785. }
  29786. function UL(t, e) {
  29787. return qL(t.node2, e)
  29788. }
  29789. function ZL(t, e) {
  29790. return qL(t.node1, e) * t.getValue()
  29791. }
  29792. function jL(t, e) {
  29793. return qL(t.node1, e)
  29794. }
  29795. function qL(t, e) {
  29796. return "vertical" === e ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2
  29797. }
  29798. function KL(t) {
  29799. return t.getValue()
  29800. }
  29801. function $L(t, e, n) {
  29802. for (var i = 0, r = t.length, o = -1; ++o < r;) {
  29803. var a = +e(t[o], n);
  29804. isNaN(a) || (i += a)
  29805. }
  29806. return i
  29807. }
  29808. function JL(t, e, n) {
  29809. E(t, (function (t) {
  29810. E(t, (function (t) {
  29811. if (t.inEdges.length) {
  29812. var i = $L(t.inEdges, ZL, n) / $L(t.inEdges, KL);
  29813. if (isNaN(i)) {
  29814. var r = t.inEdges.length;
  29815. i = r ? $L(t.inEdges, jL, n) / r : 0
  29816. }
  29817. if ("vertical" === n) {
  29818. var o = t.getLayout().x + (i - qL(t, n)) * e;
  29819. t.setLayout({
  29820. x: o
  29821. }, !0)
  29822. } else {
  29823. var a = t.getLayout().y + (i - qL(t, n)) * e;
  29824. t.setLayout({
  29825. y: a
  29826. }, !0)
  29827. }
  29828. }
  29829. }))
  29830. }))
  29831. }
  29832. function QL(t) {
  29833. t.eachSeriesByType("sankey", (function (t) {
  29834. var e = t.getGraph(),
  29835. n = e.nodes,
  29836. i = e.edges;
  29837. if (n.length) {
  29838. var r = 1 / 0,
  29839. o = -1 / 0;
  29840. E(n, (function (t) {
  29841. var e = t.getLayout().value;
  29842. e < r && (r = e), e > o && (o = e)
  29843. })), E(n, (function (e) {
  29844. var n = new _D({
  29845. type: "color",
  29846. mappingMethod: "linear",
  29847. dataExtent: [r, o],
  29848. visual: t.get("color")
  29849. }).mapValueToVisual(e.getLayout().value),
  29850. i = e.getModel().get(["itemStyle", "color"]);
  29851. null != i ? (e.setVisual("color", i), e.setVisual("style", {
  29852. fill: i
  29853. })) : (e.setVisual("color", n), e.setVisual("style", {
  29854. fill: n
  29855. }))
  29856. }))
  29857. }
  29858. i.length && E(i, (function (t) {
  29859. var e = t.getModel().get("lineStyle");
  29860. t.setVisual("style", e)
  29861. }))
  29862. }))
  29863. }
  29864. var tP = function () {
  29865. function t() {}
  29866. return t.prototype.getInitialData = function (t, e) {
  29867. var n, i, r = e.getComponent("xAxis", this.get("xAxisIndex")),
  29868. o = e.getComponent("yAxis", this.get("yAxisIndex")),
  29869. a = r.get("type"),
  29870. s = o.get("type");
  29871. "category" === a ? (t.layout = "horizontal", n = r.getOrdinalMeta(), i = !0) : "category" === s ? (t.layout = "vertical", n = o.getOrdinalMeta(), i = !0) : t.layout = t.layout || "horizontal";
  29872. var l = ["x", "y"],
  29873. u = "horizontal" === t.layout ? 0 : 1,
  29874. h = this._baseAxisDim = l[u],
  29875. c = l[1 - u],
  29876. p = [r, o],
  29877. d = p[u].get("type"),
  29878. f = p[1 - u].get("type"),
  29879. g = t.data;
  29880. if (g && i) {
  29881. var y = [];
  29882. E(g, (function (t, e) {
  29883. var n;
  29884. Y(t) ? (n = t.slice(), t.unshift(e)) : Y(t.value) ? ((n = A({}, t)).value = n.value.slice(), t.value.unshift(e)) : n = t, y.push(n)
  29885. })), t.data = y
  29886. }
  29887. var v = this.defaultValueDimensions,
  29888. m = [{
  29889. name: h,
  29890. type: Gm(d),
  29891. ordinalMeta: n,
  29892. otherDims: {
  29893. tooltip: !1,
  29894. itemName: 0
  29895. },
  29896. dimsDef: ["base"]
  29897. }, {
  29898. name: c,
  29899. type: Gm(f),
  29900. dimsDef: v.slice()
  29901. }];
  29902. return MM(this, {
  29903. coordDimensions: m,
  29904. dimensionsCount: v.length + 1,
  29905. encodeDefaulter: H($p, m, this)
  29906. })
  29907. }, t.prototype.getBaseAxis = function () {
  29908. var t = this._baseAxisDim;
  29909. return this.ecModel.getComponent(t + "Axis", this.get(t + "AxisIndex")).axis
  29910. }, t
  29911. }(),
  29912. eP = function (t) {
  29913. function e() {
  29914. var n = null !== t && t.apply(this, arguments) || this;
  29915. return n.type = e.type, n.defaultValueDimensions = [{
  29916. name: "min",
  29917. defaultTooltip: !0
  29918. }, {
  29919. name: "Q1",
  29920. defaultTooltip: !0
  29921. }, {
  29922. name: "median",
  29923. defaultTooltip: !0
  29924. }, {
  29925. name: "Q3",
  29926. defaultTooltip: !0
  29927. }, {
  29928. name: "max",
  29929. defaultTooltip: !0
  29930. }], n.visualDrawType = "stroke", n
  29931. }
  29932. return n(e, t), e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  29933. z: 2,
  29934. coordinateSystem: "cartesian2d",
  29935. legendHoverLink: !0,
  29936. layout: null,
  29937. boxWidth: [7, 50],
  29938. itemStyle: {
  29939. color: "#fff",
  29940. borderWidth: 1
  29941. },
  29942. emphasis: {
  29943. scale: !0,
  29944. itemStyle: {
  29945. borderWidth: 2,
  29946. shadowBlur: 5,
  29947. shadowOffsetX: 1,
  29948. shadowOffsetY: 1,
  29949. shadowColor: "rgba(0,0,0,0.2)"
  29950. }
  29951. },
  29952. animationDuration: 800
  29953. }, e
  29954. }(mg);
  29955. R(eP, tP, !0);
  29956. var nP = function (t) {
  29957. function e() {
  29958. var n = null !== t && t.apply(this, arguments) || this;
  29959. return n.type = e.type, n
  29960. }
  29961. return n(e, t), e.prototype.render = function (t, e, n) {
  29962. var i = t.getData(),
  29963. r = this.group,
  29964. o = this._data;
  29965. this._data || r.removeAll();
  29966. var a = "horizontal" === t.get("layout") ? 1 : 0;
  29967. i.diff(o).add((function (t) {
  29968. if (i.hasValue(t)) {
  29969. var e = oP(i.getItemLayout(t), i, t, a, !0);
  29970. i.setItemGraphicEl(t, e), r.add(e)
  29971. }
  29972. })).update((function (t, e) {
  29973. var n = o.getItemGraphicEl(e);
  29974. if (i.hasValue(t)) {
  29975. var s = i.getItemLayout(t);
  29976. n ? (_h(n), aP(s, n, i, t)) : n = oP(s, i, t, a), r.add(n), i.setItemGraphicEl(t, n)
  29977. } else r.remove(n)
  29978. })).remove((function (t) {
  29979. var e = o.getItemGraphicEl(t);
  29980. e && r.remove(e)
  29981. })).execute(), this._data = i
  29982. }, e.prototype.remove = function (t) {
  29983. var e = this.group,
  29984. n = this._data;
  29985. this._data = null, n && n.eachItemGraphicEl((function (t) {
  29986. t && e.remove(t)
  29987. }))
  29988. }, e.type = "boxplot", e
  29989. }(kg),
  29990. iP = function () {},
  29991. rP = function (t) {
  29992. function e(e) {
  29993. var n = t.call(this, e) || this;
  29994. return n.type = "boxplotBoxPath", n
  29995. }
  29996. return n(e, t), e.prototype.getDefaultShape = function () {
  29997. return new iP
  29998. }, e.prototype.buildPath = function (t, e) {
  29999. var n = e.points,
  30000. i = 0;
  30001. for (t.moveTo(n[i][0], n[i][1]), i++; i < 4; i++) t.lineTo(n[i][0], n[i][1]);
  30002. for (t.closePath(); i < n.length; i++) t.moveTo(n[i][0], n[i][1]), i++, t.lineTo(n[i][0], n[i][1])
  30003. }, e
  30004. }(Is);
  30005. function oP(t, e, n, i, r) {
  30006. var o = t.ends,
  30007. a = new rP({
  30008. shape: {
  30009. points: r ? sP(o, i, t) : o
  30010. }
  30011. });
  30012. return aP(t, a, e, n, r), a
  30013. }
  30014. function aP(t, e, n, i, r) {
  30015. var o = n.hostModel;
  30016. (0, Kh[r ? "initProps" : "updateProps"])(e, {
  30017. shape: {
  30018. points: t.ends
  30019. }
  30020. }, o, i), e.useStyle(n.getItemVisual(i, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
  30021. var a = n.getItemModel(i),
  30022. s = a.getModel("emphasis");
  30023. jl(e, a), Yl(e, s.get("focus"), s.get("blurScope"), s.get("disabled"))
  30024. }
  30025. function sP(t, e, n) {
  30026. return z(t, (function (t) {
  30027. return (t = t.slice())[e] = n.initBaseline, t
  30028. }))
  30029. }
  30030. var lP = E;
  30031. function uP(t) {
  30032. var e = function (t) {
  30033. var e = [],
  30034. n = [];
  30035. return t.eachSeriesByType("boxplot", (function (t) {
  30036. var i = t.getBaseAxis(),
  30037. r = P(n, i);
  30038. r < 0 && (r = n.length, n[r] = i, e[r] = {
  30039. axis: i,
  30040. seriesModels: []
  30041. }), e[r].seriesModels.push(t)
  30042. })), e
  30043. }(t);
  30044. lP(e, (function (t) {
  30045. var e = t.seriesModels;
  30046. e.length && (! function (t) {
  30047. var e, n = t.axis,
  30048. i = t.seriesModels,
  30049. r = i.length,
  30050. o = t.boxWidthList = [],
  30051. a = t.boxOffsetList = [],
  30052. s = [];
  30053. if ("category" === n.type) e = n.getBandWidth();
  30054. else {
  30055. var l = 0;
  30056. lP(i, (function (t) {
  30057. l = Math.max(l, t.getData().count())
  30058. }));
  30059. var u = n.getExtent();
  30060. e = Math.abs(u[1] - u[0]) / l
  30061. }
  30062. lP(i, (function (t) {
  30063. var n = t.get("boxWidth");
  30064. Y(n) || (n = [n, n]), s.push([Ur(n[0], e) || 0, Ur(n[1], e) || 0])
  30065. }));
  30066. var h = .8 * e - 2,
  30067. c = h / r * .3,
  30068. p = (h - c * (r - 1)) / r,
  30069. d = p / 2 - h / 2;
  30070. lP(i, (function (t, e) {
  30071. a.push(d), d += c + p, o.push(Math.min(Math.max(p, s[e][0]), s[e][1]))
  30072. }))
  30073. }(t), lP(e, (function (e, n) {
  30074. ! function (t, e, n) {
  30075. var i = t.coordinateSystem,
  30076. r = t.getData(),
  30077. o = n / 2,
  30078. a = "horizontal" === t.get("layout") ? 0 : 1,
  30079. s = 1 - a,
  30080. l = ["x", "y"],
  30081. u = r.mapDimension(l[a]),
  30082. h = r.mapDimensionsAll(l[s]);
  30083. if (null == u || h.length < 5) return;
  30084. for (var c = 0; c < r.count(); c++) {
  30085. var p = r.get(u, c),
  30086. d = x(p, h[2], c),
  30087. f = x(p, h[0], c),
  30088. g = x(p, h[1], c),
  30089. y = x(p, h[3], c),
  30090. v = x(p, h[4], c),
  30091. m = [];
  30092. _(m, g, !1), _(m, y, !0), m.push(f, g, v, y), b(m, f), b(m, v), b(m, d), r.setItemLayout(c, {
  30093. initBaseline: d[s],
  30094. ends: m
  30095. })
  30096. }
  30097. function x(t, n, o) {
  30098. var l, u = r.get(n, o),
  30099. h = [];
  30100. return h[a] = t, h[s] = u, isNaN(t) || isNaN(u) ? l = [NaN, NaN] : (l = i.dataToPoint(h))[a] += e, l
  30101. }
  30102. function _(t, e, n) {
  30103. var i = e.slice(),
  30104. r = e.slice();
  30105. i[a] += o, r[a] -= o, n ? t.push(i, r) : t.push(r, i)
  30106. }
  30107. function b(t, e) {
  30108. var n = e.slice(),
  30109. i = e.slice();
  30110. n[a] -= o, i[a] += o, t.push(n, i)
  30111. }
  30112. }(e, t.boxOffsetList[n], t.boxWidthList[n])
  30113. })))
  30114. }))
  30115. }
  30116. var hP = {
  30117. type: "echarts:boxplot",
  30118. transform: function (t) {
  30119. var e = t.upstream;
  30120. if (e.sourceFormat !== Fp) {
  30121. var n = "";
  30122. 0, vo(n)
  30123. }
  30124. var i = function (t, e) {
  30125. for (var n = [], i = [], r = (e = e || {}).boundIQR, o = "none" === r || 0 === r, a = 0; a < t.length; a++) {
  30126. var s = jr(t[a].slice()),
  30127. l = lo(s, .25),
  30128. u = lo(s, .5),
  30129. h = lo(s, .75),
  30130. c = s[0],
  30131. p = s[s.length - 1],
  30132. d = (null == r ? 1.5 : r) * (h - l),
  30133. f = o ? c : Math.max(c, l - d),
  30134. g = o ? p : Math.min(p, h + d),
  30135. y = e.itemNameFormatter,
  30136. v = X(y) ? y({
  30137. value: a
  30138. }) : U(y) ? y.replace("{value}", a + "") : a + "";
  30139. n.push([v, f, l, u, h, g]);
  30140. for (var m = 0; m < s.length; m++) {
  30141. var x = s[m];
  30142. if (x < f || x > g) {
  30143. var _ = [v, x];
  30144. i.push(_)
  30145. }
  30146. }
  30147. }
  30148. return {
  30149. boxData: n,
  30150. outliers: i
  30151. }
  30152. }(e.getRawData(), t.config);
  30153. return [{
  30154. dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
  30155. data: i.boxData
  30156. }, {
  30157. data: i.outliers
  30158. }]
  30159. }
  30160. };
  30161. var cP = ["color", "borderColor"],
  30162. pP = function (t) {
  30163. function e() {
  30164. var n = null !== t && t.apply(this, arguments) || this;
  30165. return n.type = e.type, n
  30166. }
  30167. return n(e, t), e.prototype.render = function (t, e, n) {
  30168. this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(t), this._isLargeDraw ? this._renderLarge(t) : this._renderNormal(t)
  30169. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  30170. this._clear(), this._updateDrawMode(t)
  30171. }, e.prototype.incrementalRender = function (t, e, n, i) {
  30172. this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(t, e) : this._incrementalRenderNormal(t, e)
  30173. }, e.prototype.eachRendered = function (t) {
  30174. qh(this._progressiveEls || this.group, t)
  30175. }, e.prototype._updateDrawMode = function (t) {
  30176. var e = t.pipelineContext.large;
  30177. null != this._isLargeDraw && e === this._isLargeDraw || (this._isLargeDraw = e, this._clear())
  30178. }, e.prototype._renderNormal = function (t) {
  30179. var e = t.getData(),
  30180. n = this._data,
  30181. i = this.group,
  30182. r = e.getLayout("isSimpleBox"),
  30183. o = t.get("clip", !0),
  30184. a = t.coordinateSystem,
  30185. s = a.getArea && a.getArea();
  30186. this._data || i.removeAll(), e.diff(n).add((function (n) {
  30187. if (e.hasValue(n)) {
  30188. var a = e.getItemLayout(n);
  30189. if (o && yP(s, a)) return;
  30190. var l = gP(a, n, !0);
  30191. gh(l, {
  30192. shape: {
  30193. points: a.ends
  30194. }
  30195. }, t, n), vP(l, e, n, r), i.add(l), e.setItemGraphicEl(n, l)
  30196. }
  30197. })).update((function (a, l) {
  30198. var u = n.getItemGraphicEl(l);
  30199. if (e.hasValue(a)) {
  30200. var h = e.getItemLayout(a);
  30201. o && yP(s, h) ? i.remove(u) : (u ? (fh(u, {
  30202. shape: {
  30203. points: h.ends
  30204. }
  30205. }, t, a), _h(u)) : u = gP(h), vP(u, e, a, r), i.add(u), e.setItemGraphicEl(a, u))
  30206. } else i.remove(u)
  30207. })).remove((function (t) {
  30208. var e = n.getItemGraphicEl(t);
  30209. e && i.remove(e)
  30210. })).execute(), this._data = e
  30211. }, e.prototype._renderLarge = function (t) {
  30212. this._clear(), bP(t, this.group);
  30213. var e = t.get("clip", !0) ? SS(t.coordinateSystem, !1, t) : null;
  30214. e ? this.group.setClipPath(e) : this.group.removeClipPath()
  30215. }, e.prototype._incrementalRenderNormal = function (t, e) {
  30216. for (var n, i = e.getData(), r = i.getLayout("isSimpleBox"); null != (n = t.next());) {
  30217. var o = gP(i.getItemLayout(n));
  30218. vP(o, i, n, r), o.incremental = !0, this.group.add(o), this._progressiveEls.push(o)
  30219. }
  30220. }, e.prototype._incrementalRenderLarge = function (t, e) {
  30221. bP(e, this.group, this._progressiveEls, !0)
  30222. }, e.prototype.remove = function (t) {
  30223. this._clear()
  30224. }, e.prototype._clear = function () {
  30225. this.group.removeAll(), this._data = null
  30226. }, e.type = "candlestick", e
  30227. }(kg),
  30228. dP = function () {},
  30229. fP = function (t) {
  30230. function e(e) {
  30231. var n = t.call(this, e) || this;
  30232. return n.type = "normalCandlestickBox", n
  30233. }
  30234. return n(e, t), e.prototype.getDefaultShape = function () {
  30235. return new dP
  30236. }, e.prototype.buildPath = function (t, e) {
  30237. var n = e.points;
  30238. this.__simpleBox ? (t.moveTo(n[4][0], n[4][1]), t.lineTo(n[6][0], n[6][1])) : (t.moveTo(n[0][0], n[0][1]), t.lineTo(n[1][0], n[1][1]), t.lineTo(n[2][0], n[2][1]), t.lineTo(n[3][0], n[3][1]), t.closePath(), t.moveTo(n[4][0], n[4][1]), t.lineTo(n[5][0], n[5][1]), t.moveTo(n[6][0], n[6][1]), t.lineTo(n[7][0], n[7][1]))
  30239. }, e
  30240. }(Is);
  30241. function gP(t, e, n) {
  30242. var i = t.ends;
  30243. return new fP({
  30244. shape: {
  30245. points: n ? mP(i, t) : i
  30246. },
  30247. z2: 100
  30248. })
  30249. }
  30250. function yP(t, e) {
  30251. for (var n = !0, i = 0; i < e.ends.length; i++)
  30252. if (t.contain(e.ends[i][0], e.ends[i][1])) {
  30253. n = !1;
  30254. break
  30255. } return n
  30256. }
  30257. function vP(t, e, n, i) {
  30258. var r = e.getItemModel(n);
  30259. t.useStyle(e.getItemVisual(n, "style")), t.style.strokeNoScale = !0, t.__simpleBox = i, jl(t, r)
  30260. }
  30261. function mP(t, e) {
  30262. return z(t, (function (t) {
  30263. return (t = t.slice())[1] = e.initBaseline, t
  30264. }))
  30265. }
  30266. var xP = function () {},
  30267. _P = function (t) {
  30268. function e(e) {
  30269. var n = t.call(this, e) || this;
  30270. return n.type = "largeCandlestickBox", n
  30271. }
  30272. return n(e, t), e.prototype.getDefaultShape = function () {
  30273. return new xP
  30274. }, e.prototype.buildPath = function (t, e) {
  30275. for (var n = e.points, i = 0; i < n.length;)
  30276. if (this.__sign === n[i++]) {
  30277. var r = n[i++];
  30278. t.moveTo(r, n[i++]), t.lineTo(r, n[i++])
  30279. } else i += 3
  30280. }, e
  30281. }(Is);
  30282. function bP(t, e, n, i) {
  30283. var r = t.getData().getLayout("largePoints"),
  30284. o = new _P({
  30285. shape: {
  30286. points: r
  30287. },
  30288. __sign: 1,
  30289. ignoreCoarsePointer: !0
  30290. });
  30291. e.add(o);
  30292. var a = new _P({
  30293. shape: {
  30294. points: r
  30295. },
  30296. __sign: -1,
  30297. ignoreCoarsePointer: !0
  30298. });
  30299. e.add(a);
  30300. var s = new _P({
  30301. shape: {
  30302. points: r
  30303. },
  30304. __sign: 0,
  30305. ignoreCoarsePointer: !0
  30306. });
  30307. e.add(s), wP(1, o, t), wP(-1, a, t), wP(0, s, t), i && (o.incremental = !0, a.incremental = !0), n && n.push(o, a)
  30308. }
  30309. function wP(t, e, n, i) {
  30310. var r = n.get(["itemStyle", t > 0 ? "borderColor" : "borderColor0"]) || n.get(["itemStyle", t > 0 ? "color" : "color0"]);
  30311. 0 === t && (r = n.get(["itemStyle", "borderColorDoji"]));
  30312. var o = n.getModel("itemStyle").getItemStyle(cP);
  30313. e.useStyle(o), e.style.fill = null, e.style.stroke = r
  30314. }
  30315. var SP = function (t) {
  30316. function e() {
  30317. var n = null !== t && t.apply(this, arguments) || this;
  30318. return n.type = e.type, n.defaultValueDimensions = [{
  30319. name: "open",
  30320. defaultTooltip: !0
  30321. }, {
  30322. name: "close",
  30323. defaultTooltip: !0
  30324. }, {
  30325. name: "lowest",
  30326. defaultTooltip: !0
  30327. }, {
  30328. name: "highest",
  30329. defaultTooltip: !0
  30330. }], n
  30331. }
  30332. return n(e, t), e.prototype.getShadowDim = function () {
  30333. return "open"
  30334. }, e.prototype.brushSelector = function (t, e, n) {
  30335. var i = e.getItemLayout(t);
  30336. return i && n.rect(i.brushRect)
  30337. }, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  30338. z: 2,
  30339. coordinateSystem: "cartesian2d",
  30340. legendHoverLink: !0,
  30341. layout: null,
  30342. clip: !0,
  30343. itemStyle: {
  30344. color: "#eb5454",
  30345. color0: "#47b262",
  30346. borderColor: "#eb5454",
  30347. borderColor0: "#47b262",
  30348. borderColorDoji: null,
  30349. borderWidth: 1
  30350. },
  30351. emphasis: {
  30352. scale: !0,
  30353. itemStyle: {
  30354. borderWidth: 2
  30355. }
  30356. },
  30357. barMaxWidth: null,
  30358. barMinWidth: null,
  30359. barWidth: null,
  30360. large: !0,
  30361. largeThreshold: 600,
  30362. progressive: 3e3,
  30363. progressiveThreshold: 1e4,
  30364. progressiveChunkMode: "mod",
  30365. animationEasing: "linear",
  30366. animationDuration: 300
  30367. }, e
  30368. }(mg);
  30369. function MP(t) {
  30370. t && Y(t.series) && E(t.series, (function (t) {
  30371. q(t) && "k" === t.type && (t.type = "candlestick")
  30372. }))
  30373. }
  30374. R(SP, tP, !0);
  30375. var IP = ["itemStyle", "borderColor"],
  30376. TP = ["itemStyle", "borderColor0"],
  30377. CP = ["itemStyle", "borderColorDoji"],
  30378. DP = ["itemStyle", "color"],
  30379. AP = ["itemStyle", "color0"],
  30380. kP = {
  30381. seriesType: "candlestick",
  30382. plan: Cg(),
  30383. performRawSeries: !0,
  30384. reset: function (t, e) {
  30385. function n(t, e) {
  30386. return e.get(t > 0 ? DP : AP)
  30387. }
  30388. function i(t, e) {
  30389. return e.get(0 === t ? CP : t > 0 ? IP : TP)
  30390. }
  30391. if (!e.isSeriesFiltered(t)) return !t.pipelineContext.large && {
  30392. progress: function (t, e) {
  30393. for (var r; null != (r = t.next());) {
  30394. var o = e.getItemModel(r),
  30395. a = e.getItemLayout(r).sign,
  30396. s = o.getItemStyle();
  30397. s.fill = n(a, o), s.stroke = i(a, o) || s.fill, A(e.ensureUniqueItemVisual(r, "style"), s)
  30398. }
  30399. }
  30400. }
  30401. }
  30402. },
  30403. LP = {
  30404. seriesType: "candlestick",
  30405. plan: Cg(),
  30406. reset: function (t) {
  30407. var e = t.coordinateSystem,
  30408. n = t.getData(),
  30409. i = function (t, e) {
  30410. var n, i = t.getBaseAxis(),
  30411. r = "category" === i.type ? i.getBandWidth() : (n = i.getExtent(), Math.abs(n[1] - n[0]) / e.count()),
  30412. o = Ur(rt(t.get("barMaxWidth"), r), r),
  30413. a = Ur(rt(t.get("barMinWidth"), 1), r),
  30414. s = t.get("barWidth");
  30415. return null != s ? Ur(s, r) : Math.max(Math.min(r / 2, o), a)
  30416. }(t, n),
  30417. r = ["x", "y"],
  30418. o = n.getDimensionIndex(n.mapDimension(r[0])),
  30419. a = z(n.mapDimensionsAll(r[1]), n.getDimensionIndex, n),
  30420. s = a[0],
  30421. l = a[1],
  30422. u = a[2],
  30423. h = a[3];
  30424. if (n.setLayout({
  30425. candleWidth: i,
  30426. isSimpleBox: i <= 1.3
  30427. }), !(o < 0 || a.length < 4)) return {
  30428. progress: t.pipelineContext.large ? function (n, i) {
  30429. var r, a, c = Ex(4 * n.count),
  30430. p = 0,
  30431. d = [],
  30432. f = [],
  30433. g = i.getStore(),
  30434. y = !!t.get(["itemStyle", "borderColorDoji"]);
  30435. for (; null != (a = n.next());) {
  30436. var v = g.get(o, a),
  30437. m = g.get(s, a),
  30438. x = g.get(l, a),
  30439. _ = g.get(u, a),
  30440. b = g.get(h, a);
  30441. isNaN(v) || isNaN(_) || isNaN(b) ? (c[p++] = NaN, p += 3) : (c[p++] = PP(g, a, m, x, l, y), d[0] = v, d[1] = _, r = e.dataToPoint(d, null, f), c[p++] = r ? r[0] : NaN, c[p++] = r ? r[1] : NaN, d[1] = b, r = e.dataToPoint(d, null, f), c[p++] = r ? r[1] : NaN)
  30442. }
  30443. i.setLayout("largePoints", c)
  30444. } : function (t, n) {
  30445. var r, a = n.getStore();
  30446. for (; null != (r = t.next());) {
  30447. var c = a.get(o, r),
  30448. p = a.get(s, r),
  30449. d = a.get(l, r),
  30450. f = a.get(u, r),
  30451. g = a.get(h, r),
  30452. y = Math.min(p, d),
  30453. v = Math.max(p, d),
  30454. m = M(y, c),
  30455. x = M(v, c),
  30456. _ = M(f, c),
  30457. b = M(g, c),
  30458. w = [];
  30459. I(w, x, 0), I(w, m, 1), w.push(C(b), C(x), C(_), C(m));
  30460. var S = !!n.getItemModel(r).get(["itemStyle", "borderColorDoji"]);
  30461. n.setItemLayout(r, {
  30462. sign: PP(a, r, p, d, l, S),
  30463. initBaseline: p > d ? x[1] : m[1],
  30464. ends: w,
  30465. brushRect: T(f, g, c)
  30466. })
  30467. }
  30468. function M(t, n) {
  30469. var i = [];
  30470. return i[0] = n, i[1] = t, isNaN(n) || isNaN(t) ? [NaN, NaN] : e.dataToPoint(i)
  30471. }
  30472. function I(t, e, n) {
  30473. var r = e.slice(),
  30474. o = e.slice();
  30475. r[0] = Nh(r[0] + i / 2, 1, !1), o[0] = Nh(o[0] - i / 2, 1, !0), n ? t.push(r, o) : t.push(o, r)
  30476. }
  30477. function T(t, e, n) {
  30478. var r = M(t, n),
  30479. o = M(e, n);
  30480. return r[0] -= i / 2, o[0] -= i / 2, {
  30481. x: r[0],
  30482. y: r[1],
  30483. width: i,
  30484. height: o[1] - r[1]
  30485. }
  30486. }
  30487. function C(t) {
  30488. return t[0] = Nh(t[0], 1), t
  30489. }
  30490. }
  30491. }
  30492. }
  30493. };
  30494. function PP(t, e, n, i, r, o) {
  30495. return n > i ? -1 : n < i ? 1 : o ? 0 : e > 0 ? t.get(r, e - 1) <= i ? 1 : -1 : 1
  30496. }
  30497. function OP(t, e) {
  30498. var n = e.rippleEffectColor || e.color;
  30499. t.eachChild((function (t) {
  30500. t.attr({
  30501. z: e.z,
  30502. zlevel: e.zlevel,
  30503. style: {
  30504. stroke: "stroke" === e.brushType ? n : null,
  30505. fill: "fill" === e.brushType ? n : null
  30506. }
  30507. })
  30508. }))
  30509. }
  30510. var RP = function (t) {
  30511. function e(e, n) {
  30512. var i = t.call(this) || this,
  30513. r = new oS(e, n),
  30514. o = new zr;
  30515. return i.add(r), i.add(o), i.updateData(e, n), i
  30516. }
  30517. return n(e, t), e.prototype.stopEffectAnimation = function () {
  30518. this.childAt(1).removeAll()
  30519. }, e.prototype.startEffectAnimation = function (t) {
  30520. for (var e = t.symbolType, n = t.color, i = t.rippleNumber, r = this.childAt(1), o = 0; o < i; o++) {
  30521. var a = Wy(e, -1, -1, 2, 2, n);
  30522. a.attr({
  30523. style: {
  30524. strokeNoScale: !0
  30525. },
  30526. z2: 99,
  30527. silent: !0,
  30528. scaleX: .5,
  30529. scaleY: .5
  30530. });
  30531. var s = -o / i * t.period + t.effectOffset;
  30532. a.animate("", !0).when(t.period, {
  30533. scaleX: t.rippleScale / 2,
  30534. scaleY: t.rippleScale / 2
  30535. }).delay(s).start(), a.animateStyle(!0).when(t.period, {
  30536. opacity: 0
  30537. }).delay(s).start(), r.add(a)
  30538. }
  30539. OP(r, t)
  30540. }, e.prototype.updateEffectAnimation = function (t) {
  30541. for (var e = this._effectCfg, n = this.childAt(1), i = ["symbolType", "period", "rippleScale", "rippleNumber"], r = 0; r < i.length; r++) {
  30542. var o = i[r];
  30543. if (e[o] !== t[o]) return this.stopEffectAnimation(), void this.startEffectAnimation(t)
  30544. }
  30545. OP(n, t)
  30546. }, e.prototype.highlight = function () {
  30547. kl(this)
  30548. }, e.prototype.downplay = function () {
  30549. Ll(this)
  30550. }, e.prototype.getSymbolType = function () {
  30551. var t = this.childAt(0);
  30552. return t && t.getSymbolType()
  30553. }, e.prototype.updateData = function (t, e) {
  30554. var n = this,
  30555. i = t.hostModel;
  30556. this.childAt(0).updateData(t, e);
  30557. var r = this.childAt(1),
  30558. o = t.getItemModel(e),
  30559. a = t.getItemVisual(e, "symbol"),
  30560. s = Hy(t.getItemVisual(e, "symbolSize")),
  30561. l = t.getItemVisual(e, "style"),
  30562. u = l && l.fill,
  30563. h = o.getModel("emphasis");
  30564. r.setScale(s), r.traverse((function (t) {
  30565. t.setStyle("fill", u)
  30566. }));
  30567. var c = Yy(t.getItemVisual(e, "symbolOffset"), s);
  30568. c && (r.x = c[0], r.y = c[1]);
  30569. var p = t.getItemVisual(e, "symbolRotate");
  30570. r.rotation = (p || 0) * Math.PI / 180 || 0;
  30571. var d = {};
  30572. d.showEffectOn = i.get("showEffectOn"), d.rippleScale = o.get(["rippleEffect", "scale"]), d.brushType = o.get(["rippleEffect", "brushType"]), d.period = 1e3 * o.get(["rippleEffect", "period"]), d.effectOffset = e / t.count(), d.z = i.getShallow("z") || 0, d.zlevel = i.getShallow("zlevel") || 0, d.symbolType = a, d.color = u, d.rippleEffectColor = o.get(["rippleEffect", "color"]), d.rippleNumber = o.get(["rippleEffect", "number"]), "render" === d.showEffectOn ? (this._effectCfg ? this.updateEffectAnimation(d) : this.startEffectAnimation(d), this._effectCfg = d) : (this._effectCfg = null, this.stopEffectAnimation(), this.onHoverStateChange = function (t) {
  30573. "emphasis" === t ? "render" !== d.showEffectOn && n.startEffectAnimation(d) : "normal" === t && "render" !== d.showEffectOn && n.stopEffectAnimation()
  30574. }), this._effectCfg = d, Yl(this, h.get("focus"), h.get("blurScope"), h.get("disabled"))
  30575. }, e.prototype.fadeOut = function (t) {
  30576. t && t()
  30577. }, e
  30578. }(zr),
  30579. NP = function (t) {
  30580. function e() {
  30581. var n = null !== t && t.apply(this, arguments) || this;
  30582. return n.type = e.type, n
  30583. }
  30584. return n(e, t), e.prototype.init = function () {
  30585. this._symbolDraw = new hS(RP)
  30586. }, e.prototype.render = function (t, e, n) {
  30587. var i = t.getData(),
  30588. r = this._symbolDraw;
  30589. r.updateData(i, {
  30590. clipShape: this._getClipShape(t)
  30591. }), this.group.add(r.group)
  30592. }, e.prototype._getClipShape = function (t) {
  30593. var e = t.coordinateSystem,
  30594. n = e && e.getArea && e.getArea();
  30595. return t.get("clip", !0) ? n : null
  30596. }, e.prototype.updateTransform = function (t, e, n) {
  30597. var i = t.getData();
  30598. this.group.dirty();
  30599. var r = ES("").reset(t, e, n);
  30600. r.progress && r.progress({
  30601. start: 0,
  30602. end: i.count(),
  30603. count: i.count()
  30604. }, i), this._symbolDraw.updateLayout()
  30605. }, e.prototype._updateGroupTransform = function (t) {
  30606. var e = t.coordinateSystem;
  30607. e && e.getRoamTransform && (this.group.transform = Te(e.getRoamTransform()), this.group.decomposeTransform())
  30608. }, e.prototype.remove = function (t, e) {
  30609. this._symbolDraw && this._symbolDraw.remove(!0)
  30610. }, e.type = "effectScatter", e
  30611. }(kg),
  30612. EP = function (t) {
  30613. function e() {
  30614. var n = null !== t && t.apply(this, arguments) || this;
  30615. return n.type = e.type, n.hasSymbolVisual = !0, n
  30616. }
  30617. return n(e, t), e.prototype.getInitialData = function (t, e) {
  30618. return vx(null, this, {
  30619. useEncodeDefaulter: !0
  30620. })
  30621. }, e.prototype.brushSelector = function (t, e, n) {
  30622. return n.point(e.getItemLayout(t))
  30623. }, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = {
  30624. coordinateSystem: "cartesian2d",
  30625. z: 2,
  30626. legendHoverLink: !0,
  30627. effectType: "ripple",
  30628. progressive: 0,
  30629. showEffectOn: "render",
  30630. clip: !0,
  30631. rippleEffect: {
  30632. period: 4,
  30633. scale: 2.5,
  30634. brushType: "fill",
  30635. number: 3
  30636. },
  30637. universalTransition: {
  30638. divideShape: "clone"
  30639. },
  30640. symbolSize: 10
  30641. }, e
  30642. }(mg);
  30643. var zP = function (t) {
  30644. function e(e, n, i) {
  30645. var r = t.call(this) || this;
  30646. return r.add(r.createLine(e, n, i)), r._updateEffectSymbol(e, n), r
  30647. }
  30648. return n(e, t), e.prototype.createLine = function (t, e, n) {
  30649. return new PA(t, e, n)
  30650. }, e.prototype._updateEffectSymbol = function (t, e) {
  30651. var n = t.getItemModel(e).getModel("effect"),
  30652. i = n.get("symbolSize"),
  30653. r = n.get("symbol");
  30654. Y(i) || (i = [i, i]);
  30655. var o = t.getItemVisual(e, "style"),
  30656. a = n.get("color") || o && o.stroke,
  30657. s = this.childAt(1);
  30658. this._symbolType !== r && (this.remove(s), (s = Wy(r, -.5, -.5, 1, 1, a)).z2 = 100, s.culling = !0, this.add(s)), s && (s.setStyle("shadowColor", a), s.setStyle(n.getItemStyle(["color"])), s.scaleX = i[0], s.scaleY = i[1], s.setColor(a), this._symbolType = r, this._symbolScale = i, this._updateEffectAnimation(t, n, e))
  30659. }, e.prototype._updateEffectAnimation = function (t, e, n) {
  30660. var i = this.childAt(1);
  30661. if (i) {
  30662. var r = t.getItemLayout(n),
  30663. o = 1e3 * e.get("period"),
  30664. a = e.get("loop"),
  30665. s = e.get("roundTrip"),
  30666. l = e.get("constantSpeed"),
  30667. u = it(e.get("delay"), (function (e) {
  30668. return e / t.count() * o / 3
  30669. }));
  30670. if (i.ignore = !0, this._updateAnimationPoints(i, r), l > 0 && (o = this._getLineLength(i) / l * 1e3), o !== this._period || a !== this._loop || s !== this._roundTrip) {
  30671. i.stopAnimation();
  30672. var h = void 0;
  30673. h = X(u) ? u(n) : u, i.__t > 0 && (h = -o * i.__t), this._animateSymbol(i, o, h, a, s)
  30674. }
  30675. this._period = o, this._loop = a, this._roundTrip = s
  30676. }
  30677. }, e.prototype._animateSymbol = function (t, e, n, i, r) {
  30678. if (e > 0) {
  30679. t.__t = 0;
  30680. var o = this,
  30681. a = t.animate("", i).when(r ? 2 * e : e, {
  30682. __t: r ? 2 : 1
  30683. }).delay(n).during((function () {
  30684. o._updateSymbolPosition(t)
  30685. }));
  30686. i || a.done((function () {
  30687. o.remove(t)
  30688. })), a.start()
  30689. }
  30690. }, e.prototype._getLineLength = function (t) {
  30691. return Vt(t.__p1, t.__cp1) + Vt(t.__cp1, t.__p2)
  30692. }, e.prototype._updateAnimationPoints = function (t, e) {
  30693. t.__p1 = e[0], t.__p2 = e[1], t.__cp1 = e[2] || [(e[0][0] + e[1][0]) / 2, (e[0][1] + e[1][1]) / 2]
  30694. }, e.prototype.updateData = function (t, e, n) {
  30695. this.childAt(0).updateData(t, e, n), this._updateEffectSymbol(t, e)
  30696. }, e.prototype._updateSymbolPosition = function (t) {
  30697. var e = t.__p1,
  30698. n = t.__p2,
  30699. i = t.__cp1,
  30700. r = t.__t < 1 ? t.__t : 2 - t.__t,
  30701. o = [t.x, t.y],
  30702. a = o.slice(),
  30703. s = In,
  30704. l = Tn;
  30705. o[0] = s(e[0], i[0], n[0], r), o[1] = s(e[1], i[1], n[1], r);
  30706. var u = t.__t < 1 ? l(e[0], i[0], n[0], r) : l(n[0], i[0], e[0], 1 - r),
  30707. h = t.__t < 1 ? l(e[1], i[1], n[1], r) : l(n[1], i[1], e[1], 1 - r);
  30708. t.rotation = -Math.atan2(h, u) - Math.PI / 2, "line" !== this._symbolType && "rect" !== this._symbolType && "roundRect" !== this._symbolType || (void 0 !== t.__lastT && t.__lastT < t.__t ? (t.scaleY = 1.05 * Vt(a, o), 1 === r && (o[0] = a[0] + (o[0] - a[0]) / 2, o[1] = a[1] + (o[1] - a[1]) / 2)) : 1 === t.__lastT ? t.scaleY = 2 * Vt(e, o) : t.scaleY = this._symbolScale[1]), t.__lastT = t.__t, t.ignore = !1, t.x = o[0], t.y = o[1]
  30709. }, e.prototype.updateLayout = function (t, e) {
  30710. this.childAt(0).updateLayout(t, e);
  30711. var n = t.getItemModel(e).getModel("effect");
  30712. this._updateEffectAnimation(t, n, e)
  30713. }, e
  30714. }(zr),
  30715. VP = function (t) {
  30716. function e(e, n, i) {
  30717. var r = t.call(this) || this;
  30718. return r._createPolyline(e, n, i), r
  30719. }
  30720. return n(e, t), e.prototype._createPolyline = function (t, e, n) {
  30721. var i = t.getItemLayout(e),
  30722. r = new Yu({
  30723. shape: {
  30724. points: i
  30725. }
  30726. });
  30727. this.add(r), this._updateCommonStl(t, e, n)
  30728. }, e.prototype.updateData = function (t, e, n) {
  30729. var i = t.hostModel;
  30730. fh(this.childAt(0), {
  30731. shape: {
  30732. points: t.getItemLayout(e)
  30733. }
  30734. }, i, e), this._updateCommonStl(t, e, n)
  30735. }, e.prototype._updateCommonStl = function (t, e, n) {
  30736. var i = this.childAt(0),
  30737. r = t.getItemModel(e),
  30738. o = n && n.emphasisLineStyle,
  30739. a = n && n.focus,
  30740. s = n && n.blurScope,
  30741. l = n && n.emphasisDisabled;
  30742. if (!n || t.hasItemOption) {
  30743. var u = r.getModel("emphasis");
  30744. o = u.getModel("lineStyle").getLineStyle(), l = u.get("disabled"), a = u.get("focus"), s = u.get("blurScope")
  30745. }
  30746. i.useStyle(t.getItemVisual(e, "style")), i.style.fill = null, i.style.strokeNoScale = !0, i.ensureState("emphasis").style = o, Yl(this, a, s, l)
  30747. }, e.prototype.updateLayout = function (t, e) {
  30748. this.childAt(0).setShape("points", t.getItemLayout(e))
  30749. }, e
  30750. }(zr),
  30751. BP = function (t) {
  30752. function e() {
  30753. var e = null !== t && t.apply(this, arguments) || this;
  30754. return e._lastFrame = 0, e._lastFramePercent = 0, e
  30755. }
  30756. return n(e, t), e.prototype.createLine = function (t, e, n) {
  30757. return new VP(t, e, n)
  30758. }, e.prototype._updateAnimationPoints = function (t, e) {
  30759. this._points = e;
  30760. for (var n = [0], i = 0, r = 1; r < e.length; r++) {
  30761. var o = e[r - 1],
  30762. a = e[r];
  30763. i += Vt(o, a), n.push(i)
  30764. }
  30765. if (0 !== i) {
  30766. for (r = 0; r < n.length; r++) n[r] /= i;
  30767. this._offsets = n, this._length = i
  30768. } else this._length = 0
  30769. }, e.prototype._getLineLength = function () {
  30770. return this._length
  30771. }, e.prototype._updateSymbolPosition = function (t) {
  30772. var e = t.__t < 1 ? t.__t : 2 - t.__t,
  30773. n = this._points,
  30774. i = this._offsets,
  30775. r = n.length;
  30776. if (i) {
  30777. var o, a = this._lastFrame;
  30778. if (e < this._lastFramePercent) {
  30779. for (o = Math.min(a + 1, r - 1); o >= 0 && !(i[o] <= e); o--);
  30780. o = Math.min(o, r - 2)
  30781. } else {
  30782. for (o = a; o < r && !(i[o] > e); o++);
  30783. o = Math.min(o - 1, r - 2)
  30784. }
  30785. var s = (e - i[o]) / (i[o + 1] - i[o]),
  30786. l = n[o],
  30787. u = n[o + 1];
  30788. t.x = l[0] * (1 - s) + s * u[0], t.y = l[1] * (1 - s) + s * u[1];
  30789. var h = t.__t < 1 ? u[0] - l[0] : l[0] - u[0],
  30790. c = t.__t < 1 ? u[1] - l[1] : l[1] - u[1];
  30791. t.rotation = -Math.atan2(c, h) - Math.PI / 2, this._lastFrame = o, this._lastFramePercent = e, t.ignore = !1
  30792. }
  30793. }, e
  30794. }(zP),
  30795. FP = function () {
  30796. this.polyline = !1, this.curveness = 0, this.segs = []
  30797. },
  30798. GP = function (t) {
  30799. function e(e) {
  30800. var n = t.call(this, e) || this;
  30801. return n._off = 0, n.hoverDataIdx = -1, n
  30802. }
  30803. return n(e, t), e.prototype.reset = function () {
  30804. this.notClear = !1, this._off = 0
  30805. }, e.prototype.getDefaultStyle = function () {
  30806. return {
  30807. stroke: "#000",
  30808. fill: null
  30809. }
  30810. }, e.prototype.getDefaultShape = function () {
  30811. return new FP
  30812. }, e.prototype.buildPath = function (t, e) {
  30813. var n, i = e.segs,
  30814. r = e.curveness;
  30815. if (e.polyline)
  30816. for (n = this._off; n < i.length;) {
  30817. var o = i[n++];
  30818. if (o > 0) {
  30819. t.moveTo(i[n++], i[n++]);
  30820. for (var a = 1; a < o; a++) t.lineTo(i[n++], i[n++])
  30821. }
  30822. } else
  30823. for (n = this._off; n < i.length;) {
  30824. var s = i[n++],
  30825. l = i[n++],
  30826. u = i[n++],
  30827. h = i[n++];
  30828. if (t.moveTo(s, l), r > 0) {
  30829. var c = (s + u) / 2 - (l - h) * r,
  30830. p = (l + h) / 2 - (u - s) * r;
  30831. t.quadraticCurveTo(c, p, u, h)
  30832. } else t.lineTo(u, h)
  30833. }
  30834. this.incremental && (this._off = n, this.notClear = !0)
  30835. }, e.prototype.findDataIndex = function (t, e) {
  30836. var n = this.shape,
  30837. i = n.segs,
  30838. r = n.curveness,
  30839. o = this.style.lineWidth;
  30840. if (n.polyline)
  30841. for (var a = 0, s = 0; s < i.length;) {
  30842. var l = i[s++];
  30843. if (l > 0)
  30844. for (var u = i[s++], h = i[s++], c = 1; c < l; c++) {
  30845. if (as(u, h, p = i[s++], d = i[s++], o, t, e)) return a
  30846. }
  30847. a++
  30848. } else
  30849. for (a = 0, s = 0; s < i.length;) {
  30850. u = i[s++], h = i[s++];
  30851. var p = i[s++],
  30852. d = i[s++];
  30853. if (r > 0) {
  30854. if (ls(u, h, (u + p) / 2 - (h - d) * r, (h + d) / 2 - (p - u) * r, p, d, o, t, e)) return a
  30855. } else if (as(u, h, p, d, o, t, e)) return a;
  30856. a++
  30857. }
  30858. return -1
  30859. }, e.prototype.contain = function (t, e) {
  30860. var n = this.transformCoordToLocal(t, e),
  30861. i = this.getBoundingRect();
  30862. return t = n[0], e = n[1], i.contain(t, e) ? (this.hoverDataIdx = this.findDataIndex(t, e)) >= 0 : (this.hoverDataIdx = -1, !1)
  30863. }, e.prototype.getBoundingRect = function () {
  30864. var t = this._rect;
  30865. if (!t) {
  30866. for (var e = this.shape.segs, n = 1 / 0, i = 1 / 0, r = -1 / 0, o = -1 / 0, a = 0; a < e.length;) {
  30867. var s = e[a++],
  30868. l = e[a++];
  30869. n = Math.min(s, n), r = Math.max(s, r), i = Math.min(l, i), o = Math.max(l, o)
  30870. }
  30871. t = this._rect = new ze(n, i, r, o)
  30872. }
  30873. return t
  30874. }, e
  30875. }(Is),
  30876. WP = function () {
  30877. function t() {
  30878. this.group = new zr
  30879. }
  30880. return t.prototype.updateData = function (t) {
  30881. this._clear();
  30882. var e = this._create();
  30883. e.setShape({
  30884. segs: t.getLayout("linesPoints")
  30885. }), this._setCommon(e, t)
  30886. }, t.prototype.incrementalPrepareUpdate = function (t) {
  30887. this.group.removeAll(), this._clear()
  30888. }, t.prototype.incrementalUpdate = function (t, e) {
  30889. var n = this._newAdded[0],
  30890. i = e.getLayout("linesPoints"),
  30891. r = n && n.shape.segs;
  30892. if (r && r.length < 2e4) {
  30893. var o = r.length,
  30894. a = new Float32Array(o + i.length);
  30895. a.set(r), a.set(i, o), n.setShape({
  30896. segs: a
  30897. })
  30898. } else {
  30899. this._newAdded = [];
  30900. var s = this._create();
  30901. s.incremental = !0, s.setShape({
  30902. segs: i
  30903. }), this._setCommon(s, e), s.__startIndex = t.start
  30904. }
  30905. }, t.prototype.remove = function () {
  30906. this._clear()
  30907. }, t.prototype.eachRendered = function (t) {
  30908. this._newAdded[0] && t(this._newAdded[0])
  30909. }, t.prototype._create = function () {
  30910. var t = new GP({
  30911. cursor: "default",
  30912. ignoreCoarsePointer: !0
  30913. });
  30914. return this._newAdded.push(t), this.group.add(t), t
  30915. }, t.prototype._setCommon = function (t, e, n) {
  30916. var i = e.hostModel;
  30917. t.setShape({
  30918. polyline: i.get("polyline"),
  30919. curveness: i.get(["lineStyle", "curveness"])
  30920. }), t.useStyle(i.getModel("lineStyle").getLineStyle()), t.style.strokeNoScale = !0;
  30921. var r = e.getVisual("style");
  30922. r && r.stroke && t.setStyle("stroke", r.stroke), t.setStyle("fill", null);
  30923. var o = Qs(t);
  30924. o.seriesIndex = i.seriesIndex, t.on("mousemove", (function (e) {
  30925. o.dataIndex = null;
  30926. var n = t.hoverDataIdx;
  30927. n > 0 && (o.dataIndex = n + t.__startIndex)
  30928. }))
  30929. }, t.prototype._clear = function () {
  30930. this._newAdded = [], this.group.removeAll()
  30931. }, t
  30932. }(),
  30933. HP = {
  30934. seriesType: "lines",
  30935. plan: Cg(),
  30936. reset: function (t) {
  30937. var e = t.coordinateSystem;
  30938. if (e) {
  30939. var n = t.get("polyline"),
  30940. i = t.pipelineContext.large;
  30941. return {
  30942. progress: function (r, o) {
  30943. var a = [];
  30944. if (i) {
  30945. var s = void 0,
  30946. l = r.end - r.start;
  30947. if (n) {
  30948. for (var u = 0, h = r.start; h < r.end; h++) u += t.getLineCoordsCount(h);
  30949. s = new Float32Array(l + 2 * u)
  30950. } else s = new Float32Array(4 * l);
  30951. var c = 0,
  30952. p = [];
  30953. for (h = r.start; h < r.end; h++) {
  30954. var d = t.getLineCoords(h, a);
  30955. n && (s[c++] = d);
  30956. for (var f = 0; f < d; f++) p = e.dataToPoint(a[f], !1, p), s[c++] = p[0], s[c++] = p[1]
  30957. }
  30958. o.setLayout("linesPoints", s)
  30959. } else
  30960. for (h = r.start; h < r.end; h++) {
  30961. var g = o.getItemModel(h),
  30962. y = (d = t.getLineCoords(h, a), []);
  30963. if (n)
  30964. for (var v = 0; v < d; v++) y.push(e.dataToPoint(a[v]));
  30965. else {
  30966. y[0] = e.dataToPoint(a[0]), y[1] = e.dataToPoint(a[1]);
  30967. var m = g.get(["lineStyle", "curveness"]); + m && (y[2] = [(y[0][0] + y[1][0]) / 2 - (y[0][1] - y[1][1]) * m, (y[0][1] + y[1][1]) / 2 - (y[1][0] - y[0][0]) * m])
  30968. }
  30969. o.setItemLayout(h, y)
  30970. }
  30971. }
  30972. }
  30973. }
  30974. }
  30975. },
  30976. YP = function (t) {
  30977. function e() {
  30978. var n = null !== t && t.apply(this, arguments) || this;
  30979. return n.type = e.type, n
  30980. }
  30981. return n(e, t), e.prototype.render = function (t, e, n) {
  30982. var i = t.getData(),
  30983. r = this._updateLineDraw(i, t),
  30984. o = t.get("zlevel"),
  30985. a = t.get(["effect", "trailLength"]),
  30986. s = n.getZr(),
  30987. l = "svg" === s.painter.getType();
  30988. l || s.painter.getLayer(o).clear(!0), null == this._lastZlevel || l || s.configLayer(this._lastZlevel, {
  30989. motionBlur: !1
  30990. }), this._showEffect(t) && a > 0 && (l || s.configLayer(o, {
  30991. motionBlur: !0,
  30992. lastFrameAlpha: Math.max(Math.min(a / 10 + .9, 1), 0)
  30993. })), r.updateData(i);
  30994. var u = t.get("clip", !0) && SS(t.coordinateSystem, !1, t);
  30995. u ? this.group.setClipPath(u) : this.group.removeClipPath(), this._lastZlevel = o, this._finished = !0
  30996. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  30997. var i = t.getData();
  30998. this._updateLineDraw(i, t).incrementalPrepareUpdate(i), this._clearLayer(n), this._finished = !1
  30999. }, e.prototype.incrementalRender = function (t, e, n) {
  31000. this._lineDraw.incrementalUpdate(t, e.getData()), this._finished = t.end === e.getData().count()
  31001. }, e.prototype.eachRendered = function (t) {
  31002. this._lineDraw && this._lineDraw.eachRendered(t)
  31003. }, e.prototype.updateTransform = function (t, e, n) {
  31004. var i = t.getData(),
  31005. r = t.pipelineContext;
  31006. if (!this._finished || r.large || r.progressiveRender) return {
  31007. update: !0
  31008. };
  31009. var o = HP.reset(t, e, n);
  31010. o.progress && o.progress({
  31011. start: 0,
  31012. end: i.count(),
  31013. count: i.count()
  31014. }, i), this._lineDraw.updateLayout(), this._clearLayer(n)
  31015. }, e.prototype._updateLineDraw = function (t, e) {
  31016. var n = this._lineDraw,
  31017. i = this._showEffect(e),
  31018. r = !!e.get("polyline"),
  31019. o = e.pipelineContext.large;
  31020. return n && i === this._hasEffet && r === this._isPolyline && o === this._isLargeDraw || (n && n.remove(), n = this._lineDraw = o ? new WP : new OA(r ? i ? BP : VP : i ? zP : PA), this._hasEffet = i, this._isPolyline = r, this._isLargeDraw = o), this.group.add(n.group), n
  31021. }, e.prototype._showEffect = function (t) {
  31022. return !!t.get(["effect", "show"])
  31023. }, e.prototype._clearLayer = function (t) {
  31024. var e = t.getZr();
  31025. "svg" === e.painter.getType() || null == this._lastZlevel || e.painter.getLayer(this._lastZlevel).clear(!0)
  31026. }, e.prototype.remove = function (t, e) {
  31027. this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(e)
  31028. }, e.prototype.dispose = function (t, e) {
  31029. this.remove(t, e)
  31030. }, e.type = "lines", e
  31031. }(kg),
  31032. XP = "undefined" == typeof Uint32Array ? Array : Uint32Array,
  31033. UP = "undefined" == typeof Float64Array ? Array : Float64Array;
  31034. function ZP(t) {
  31035. var e = t.data;
  31036. e && e[0] && e[0][0] && e[0][0].coord && (t.data = z(e, (function (t) {
  31037. var e = {
  31038. coords: [t[0].coord, t[1].coord]
  31039. };
  31040. return t[0].name && (e.fromName = t[0].name), t[1].name && (e.toName = t[1].name), D([e, t[0], t[1]])
  31041. })))
  31042. }
  31043. var jP = function (t) {
  31044. function e() {
  31045. var n = null !== t && t.apply(this, arguments) || this;
  31046. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n
  31047. }
  31048. return n(e, t), e.prototype.init = function (e) {
  31049. e.data = e.data || [], ZP(e);
  31050. var n = this._processFlatCoordsArray(e.data);
  31051. this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset, n.flatCoords && (e.data = new Float32Array(n.count)), t.prototype.init.apply(this, arguments)
  31052. }, e.prototype.mergeOption = function (e) {
  31053. if (ZP(e), e.data) {
  31054. var n = this._processFlatCoordsArray(e.data);
  31055. this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset, n.flatCoords && (e.data = new Float32Array(n.count))
  31056. }
  31057. t.prototype.mergeOption.apply(this, arguments)
  31058. }, e.prototype.appendData = function (t) {
  31059. var e = this._processFlatCoordsArray(t.data);
  31060. e.flatCoords && (this._flatCoords ? (this._flatCoords = vt(this._flatCoords, e.flatCoords), this._flatCoordsOffset = vt(this._flatCoordsOffset, e.flatCoordsOffset)) : (this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset), t.data = new Float32Array(e.count)), this.getRawData().appendData(t.data)
  31061. }, e.prototype._getCoordsFromItemModel = function (t) {
  31062. var e = this.getData().getItemModel(t),
  31063. n = e.option instanceof Array ? e.option : e.getShallow("coords");
  31064. return n
  31065. }, e.prototype.getLineCoordsCount = function (t) {
  31066. return this._flatCoordsOffset ? this._flatCoordsOffset[2 * t + 1] : this._getCoordsFromItemModel(t).length
  31067. }, e.prototype.getLineCoords = function (t, e) {
  31068. if (this._flatCoordsOffset) {
  31069. for (var n = this._flatCoordsOffset[2 * t], i = this._flatCoordsOffset[2 * t + 1], r = 0; r < i; r++) e[r] = e[r] || [], e[r][0] = this._flatCoords[n + 2 * r], e[r][1] = this._flatCoords[n + 2 * r + 1];
  31070. return i
  31071. }
  31072. var o = this._getCoordsFromItemModel(t);
  31073. for (r = 0; r < o.length; r++) e[r] = e[r] || [], e[r][0] = o[r][0], e[r][1] = o[r][1];
  31074. return o.length
  31075. }, e.prototype._processFlatCoordsArray = function (t) {
  31076. var e = 0;
  31077. if (this._flatCoords && (e = this._flatCoords.length), j(t[0])) {
  31078. for (var n = t.length, i = new XP(n), r = new UP(n), o = 0, a = 0, s = 0, l = 0; l < n;) {
  31079. s++;
  31080. var u = t[l++];
  31081. i[a++] = o + e, i[a++] = u;
  31082. for (var h = 0; h < u; h++) {
  31083. var c = t[l++],
  31084. p = t[l++];
  31085. r[o++] = c, r[o++] = p
  31086. }
  31087. }
  31088. return {
  31089. flatCoordsOffset: new Uint32Array(i.buffer, 0, a),
  31090. flatCoords: r,
  31091. count: s
  31092. }
  31093. }
  31094. return {
  31095. flatCoordsOffset: null,
  31096. flatCoords: null,
  31097. count: t.length
  31098. }
  31099. }, e.prototype.getInitialData = function (t, e) {
  31100. var n = new lx(["value"], this);
  31101. return n.hasItemOption = !1, n.initData(t.data, [], (function (t, e, i, r) {
  31102. if (t instanceof Array) return NaN;
  31103. n.hasItemOption = !0;
  31104. var o = t.value;
  31105. return null != o ? o instanceof Array ? o[r] : o : void 0
  31106. })), n
  31107. }, e.prototype.formatTooltip = function (t, e, n) {
  31108. var i = this.getData().getItemModel(t),
  31109. r = i.get("name");
  31110. if (r) return r;
  31111. var o = i.get("fromName"),
  31112. a = i.get("toName"),
  31113. s = [];
  31114. return null != o && s.push(o), null != a && s.push(a), ng("nameValue", {
  31115. name: s.join(" > ")
  31116. })
  31117. }, e.prototype.preventIncremental = function () {
  31118. return !!this.get(["effect", "show"])
  31119. }, e.prototype.getProgressive = function () {
  31120. var t = this.option.progressive;
  31121. return null == t ? this.option.large ? 1e4 : this.get("progressive") : t
  31122. }, e.prototype.getProgressiveThreshold = function () {
  31123. var t = this.option.progressiveThreshold;
  31124. return null == t ? this.option.large ? 2e4 : this.get("progressiveThreshold") : t
  31125. }, e.prototype.getZLevelKey = function () {
  31126. var t = this.getModel("effect"),
  31127. e = t.get("trailLength");
  31128. return this.getData().count() > this.getProgressiveThreshold() ? this.id : t.get("show") && e > 0 ? e + "" : ""
  31129. }, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = {
  31130. coordinateSystem: "geo",
  31131. z: 2,
  31132. legendHoverLink: !0,
  31133. xAxisIndex: 0,
  31134. yAxisIndex: 0,
  31135. symbol: ["none", "none"],
  31136. symbolSize: [10, 10],
  31137. geoIndex: 0,
  31138. effect: {
  31139. show: !1,
  31140. period: 4,
  31141. constantSpeed: 0,
  31142. symbol: "circle",
  31143. symbolSize: 3,
  31144. loop: !0,
  31145. trailLength: .2
  31146. },
  31147. large: !1,
  31148. largeThreshold: 2e3,
  31149. polyline: !1,
  31150. clip: !0,
  31151. label: {
  31152. show: !1,
  31153. position: "end"
  31154. },
  31155. lineStyle: {
  31156. opacity: .5
  31157. }
  31158. }, e
  31159. }(mg);
  31160. function qP(t) {
  31161. return t instanceof Array || (t = [t, t]), t
  31162. }
  31163. var KP = {
  31164. seriesType: "lines",
  31165. reset: function (t) {
  31166. var e = qP(t.get("symbol")),
  31167. n = qP(t.get("symbolSize")),
  31168. i = t.getData();
  31169. return i.setVisual("fromSymbol", e && e[0]), i.setVisual("toSymbol", e && e[1]), i.setVisual("fromSymbolSize", n && n[0]), i.setVisual("toSymbolSize", n && n[1]), {
  31170. dataEach: i.hasItemOption ? function (t, e) {
  31171. var n = t.getItemModel(e),
  31172. i = qP(n.getShallow("symbol", !0)),
  31173. r = qP(n.getShallow("symbolSize", !0));
  31174. i[0] && t.setItemVisual(e, "fromSymbol", i[0]), i[1] && t.setItemVisual(e, "toSymbol", i[1]), r[0] && t.setItemVisual(e, "fromSymbolSize", r[0]), r[1] && t.setItemVisual(e, "toSymbolSize", r[1])
  31175. } : null
  31176. }
  31177. }
  31178. };
  31179. var $P = function () {
  31180. function t() {
  31181. this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
  31182. inRange: null,
  31183. outOfRange: null
  31184. };
  31185. var t = h.createCanvas();
  31186. this.canvas = t
  31187. }
  31188. return t.prototype.update = function (t, e, n, i, r, o) {
  31189. var a = this._getBrush(),
  31190. s = this._getGradient(r, "inRange"),
  31191. l = this._getGradient(r, "outOfRange"),
  31192. u = this.pointSize + this.blurSize,
  31193. h = this.canvas,
  31194. c = h.getContext("2d"),
  31195. p = t.length;
  31196. h.width = e, h.height = n;
  31197. for (var d = 0; d < p; ++d) {
  31198. var f = t[d],
  31199. g = f[0],
  31200. y = f[1],
  31201. v = i(f[2]);
  31202. c.globalAlpha = v, c.drawImage(a, g - u, y - u)
  31203. }
  31204. if (!h.width || !h.height) return h;
  31205. for (var m = c.getImageData(0, 0, h.width, h.height), x = m.data, _ = 0, b = x.length, w = this.minOpacity, S = this.maxOpacity - w; _ < b;) {
  31206. v = x[_ + 3] / 256;
  31207. var M = 4 * Math.floor(255 * v);
  31208. if (v > 0) {
  31209. var I = o(v) ? s : l;
  31210. v > 0 && (v = v * S + w), x[_++] = I[M], x[_++] = I[M + 1], x[_++] = I[M + 2], x[_++] = I[M + 3] * v * 256
  31211. } else _ += 4
  31212. }
  31213. return c.putImageData(m, 0, 0), h
  31214. }, t.prototype._getBrush = function () {
  31215. var t = this._brushCanvas || (this._brushCanvas = h.createCanvas()),
  31216. e = this.pointSize + this.blurSize,
  31217. n = 2 * e;
  31218. t.width = n, t.height = n;
  31219. var i = t.getContext("2d");
  31220. return i.clearRect(0, 0, n, n), i.shadowOffsetX = n, i.shadowBlur = this.blurSize, i.shadowColor = "#000", i.beginPath(), i.arc(-e, e, this.pointSize, 0, 2 * Math.PI, !0), i.closePath(), i.fill(), t
  31221. }, t.prototype._getGradient = function (t, e) {
  31222. for (var n = this._gradientPixels, i = n[e] || (n[e] = new Uint8ClampedArray(1024)), r = [0, 0, 0, 0], o = 0, a = 0; a < 256; a++) t[e](a / 255, !0, r), i[o++] = r[0], i[o++] = r[1], i[o++] = r[2], i[o++] = r[3];
  31223. return i
  31224. }, t
  31225. }();
  31226. function JP(t) {
  31227. var e = t.dimensions;
  31228. return "lng" === e[0] && "lat" === e[1]
  31229. }
  31230. var QP = function (t) {
  31231. function e() {
  31232. var n = null !== t && t.apply(this, arguments) || this;
  31233. return n.type = e.type, n
  31234. }
  31235. return n(e, t), e.prototype.render = function (t, e, n) {
  31236. var i;
  31237. e.eachComponent("visualMap", (function (e) {
  31238. e.eachTargetSeries((function (n) {
  31239. n === t && (i = e)
  31240. }))
  31241. })), this._progressiveEls = null, this.group.removeAll();
  31242. var r = t.coordinateSystem;
  31243. "cartesian2d" === r.type || "calendar" === r.type ? this._renderOnCartesianAndCalendar(t, n, 0, t.getData().count()) : JP(r) && this._renderOnGeo(r, t, i, n)
  31244. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  31245. this.group.removeAll()
  31246. }, e.prototype.incrementalRender = function (t, e, n, i) {
  31247. var r = e.coordinateSystem;
  31248. r && (JP(r) ? this.render(e, n, i) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(e, i, t.start, t.end, !0)))
  31249. }, e.prototype.eachRendered = function (t) {
  31250. qh(this._progressiveEls || this.group, t)
  31251. }, e.prototype._renderOnCartesianAndCalendar = function (t, e, n, i, r) {
  31252. var o, a, s, l, u = t.coordinateSystem,
  31253. h = MS(u, "cartesian2d");
  31254. if (h) {
  31255. var c = u.getAxis("x"),
  31256. p = u.getAxis("y");
  31257. 0, o = c.getBandWidth() + .5, a = p.getBandWidth() + .5, s = c.scale.getExtent(), l = p.scale.getExtent()
  31258. }
  31259. for (var d = this.group, f = t.getData(), g = t.getModel(["emphasis", "itemStyle"]).getItemStyle(), y = t.getModel(["blur", "itemStyle"]).getItemStyle(), v = t.getModel(["select", "itemStyle"]).getItemStyle(), m = t.get(["itemStyle", "borderRadius"]), x = ec(t), _ = t.getModel("emphasis"), b = _.get("focus"), w = _.get("blurScope"), S = _.get("disabled"), M = h ? [f.mapDimension("x"), f.mapDimension("y"), f.mapDimension("value")] : [f.mapDimension("time"), f.mapDimension("value")], I = n; I < i; I++) {
  31260. var T = void 0,
  31261. C = f.getItemVisual(I, "style");
  31262. if (h) {
  31263. var D = f.get(M[0], I),
  31264. A = f.get(M[1], I);
  31265. if (isNaN(f.get(M[2], I)) || isNaN(D) || isNaN(A) || D < s[0] || D > s[1] || A < l[0] || A > l[1]) continue;
  31266. var k = u.dataToPoint([D, A]);
  31267. T = new zs({
  31268. shape: {
  31269. x: k[0] - o / 2,
  31270. y: k[1] - a / 2,
  31271. width: o,
  31272. height: a
  31273. },
  31274. style: C
  31275. })
  31276. } else {
  31277. if (isNaN(f.get(M[1], I))) continue;
  31278. T = new zs({
  31279. z2: 1,
  31280. shape: u.dataToRect([f.get(M[0], I)]).contentShape,
  31281. style: C
  31282. })
  31283. }
  31284. if (f.hasItemOption) {
  31285. var L = f.getItemModel(I),
  31286. P = L.getModel("emphasis");
  31287. g = P.getModel("itemStyle").getItemStyle(), y = L.getModel(["blur", "itemStyle"]).getItemStyle(), v = L.getModel(["select", "itemStyle"]).getItemStyle(), m = L.get(["itemStyle", "borderRadius"]), b = P.get("focus"), w = P.get("blurScope"), S = P.get("disabled"), x = ec(L)
  31288. }
  31289. T.shape.r = m;
  31290. var O = t.getRawValue(I),
  31291. R = "-";
  31292. O && null != O[2] && (R = O[2] + ""), tc(T, x, {
  31293. labelFetcher: t,
  31294. labelDataIndex: I,
  31295. defaultOpacity: C.opacity,
  31296. defaultText: R
  31297. }), T.ensureState("emphasis").style = g, T.ensureState("blur").style = y, T.ensureState("select").style = v, Yl(T, b, w, S), T.incremental = r, r && (T.states.emphasis.hoverLayer = !0), d.add(T), f.setItemGraphicEl(I, T), this._progressiveEls && this._progressiveEls.push(T)
  31298. }
  31299. }, e.prototype._renderOnGeo = function (t, e, n, i) {
  31300. var r = n.targetVisuals.inRange,
  31301. o = n.targetVisuals.outOfRange,
  31302. a = e.getData(),
  31303. s = this._hmLayer || this._hmLayer || new $P;
  31304. s.blurSize = e.get("blurSize"), s.pointSize = e.get("pointSize"), s.minOpacity = e.get("minOpacity"), s.maxOpacity = e.get("maxOpacity");
  31305. var l = t.getViewRect().clone(),
  31306. u = t.getRoamTransform();
  31307. l.applyTransform(u);
  31308. var h = Math.max(l.x, 0),
  31309. c = Math.max(l.y, 0),
  31310. p = Math.min(l.width + l.x, i.getWidth()),
  31311. d = Math.min(l.height + l.y, i.getHeight()),
  31312. f = p - h,
  31313. g = d - c,
  31314. y = [a.mapDimension("lng"), a.mapDimension("lat"), a.mapDimension("value")],
  31315. v = a.mapArray(y, (function (e, n, i) {
  31316. var r = t.dataToPoint([e, n]);
  31317. return r[0] -= h, r[1] -= c, r.push(i), r
  31318. })),
  31319. m = n.getExtent(),
  31320. x = "visualMap.continuous" === n.type ? function (t, e) {
  31321. var n = t[1] - t[0];
  31322. return e = [(e[0] - t[0]) / n, (e[1] - t[0]) / n],
  31323. function (t) {
  31324. return t >= e[0] && t <= e[1]
  31325. }
  31326. }(m, n.option.range) : function (t, e, n) {
  31327. var i = t[1] - t[0],
  31328. r = (e = z(e, (function (e) {
  31329. return {
  31330. interval: [(e.interval[0] - t[0]) / i, (e.interval[1] - t[0]) / i]
  31331. }
  31332. }))).length,
  31333. o = 0;
  31334. return function (t) {
  31335. var i;
  31336. for (i = o; i < r; i++)
  31337. if ((a = e[i].interval)[0] <= t && t <= a[1]) {
  31338. o = i;
  31339. break
  31340. } if (i === r)
  31341. for (i = o - 1; i >= 0; i--) {
  31342. var a;
  31343. if ((a = e[i].interval)[0] <= t && t <= a[1]) {
  31344. o = i;
  31345. break
  31346. }
  31347. }
  31348. return i >= 0 && i < r && n[i]
  31349. }
  31350. }(m, n.getPieceList(), n.option.selected);
  31351. s.update(v, f, g, r.color.getNormalizer(), {
  31352. inRange: r.color.getColorMapper(),
  31353. outOfRange: o.color.getColorMapper()
  31354. }, x);
  31355. var _ = new ks({
  31356. style: {
  31357. width: f,
  31358. height: g,
  31359. x: h,
  31360. y: c,
  31361. image: s.canvas
  31362. },
  31363. silent: !0
  31364. });
  31365. this.group.add(_)
  31366. }, e.type = "heatmap", e
  31367. }(kg),
  31368. tO = function (t) {
  31369. function e() {
  31370. var n = null !== t && t.apply(this, arguments) || this;
  31371. return n.type = e.type, n
  31372. }
  31373. return n(e, t), e.prototype.getInitialData = function (t, e) {
  31374. return vx(null, this, {
  31375. generateCoord: "value"
  31376. })
  31377. }, e.prototype.preventIncremental = function () {
  31378. var t = xd.get(this.get("coordinateSystem"));
  31379. if (t && t.dimensions) return "lng" === t.dimensions[0] && "lat" === t.dimensions[1]
  31380. }, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
  31381. coordinateSystem: "cartesian2d",
  31382. z: 2,
  31383. geoIndex: 0,
  31384. blurSize: 30,
  31385. pointSize: 20,
  31386. maxOpacity: 1,
  31387. minOpacity: 0,
  31388. select: {
  31389. itemStyle: {
  31390. borderColor: "#212121"
  31391. }
  31392. }
  31393. }, e
  31394. }(mg);
  31395. var eO = ["itemStyle", "borderWidth"],
  31396. nO = [{
  31397. xy: "x",
  31398. wh: "width",
  31399. index: 0,
  31400. posDesc: ["left", "right"]
  31401. }, {
  31402. xy: "y",
  31403. wh: "height",
  31404. index: 1,
  31405. posDesc: ["top", "bottom"]
  31406. }],
  31407. iO = new _u,
  31408. rO = function (t) {
  31409. function e() {
  31410. var n = null !== t && t.apply(this, arguments) || this;
  31411. return n.type = e.type, n
  31412. }
  31413. return n(e, t), e.prototype.render = function (t, e, n) {
  31414. var i = this.group,
  31415. r = t.getData(),
  31416. o = this._data,
  31417. a = t.coordinateSystem,
  31418. s = a.getBaseAxis().isHorizontal(),
  31419. l = a.master.getRect(),
  31420. u = {
  31421. ecSize: {
  31422. width: n.getWidth(),
  31423. height: n.getHeight()
  31424. },
  31425. seriesModel: t,
  31426. coordSys: a,
  31427. coordSysExtent: [
  31428. [l.x, l.x + l.width],
  31429. [l.y, l.y + l.height]
  31430. ],
  31431. isHorizontal: s,
  31432. valueDim: nO[+s],
  31433. categoryDim: nO[1 - +s]
  31434. };
  31435. return r.diff(o).add((function (t) {
  31436. if (r.hasValue(t)) {
  31437. var e = pO(r, t),
  31438. n = oO(r, t, e, u),
  31439. o = gO(r, u, n);
  31440. r.setItemGraphicEl(t, o), i.add(o), _O(o, u, n)
  31441. }
  31442. })).update((function (t, e) {
  31443. var n = o.getItemGraphicEl(e);
  31444. if (r.hasValue(t)) {
  31445. var a = pO(r, t),
  31446. s = oO(r, t, a, u),
  31447. l = vO(r, s);
  31448. n && l !== n.__pictorialShapeStr && (i.remove(n), r.setItemGraphicEl(t, null), n = null), n ? function (t, e, n) {
  31449. var i = n.animationModel,
  31450. r = n.dataIndex,
  31451. o = t.__pictorialBundle;
  31452. fh(o, {
  31453. x: n.bundlePosition[0],
  31454. y: n.bundlePosition[1]
  31455. }, i, r), n.symbolRepeat ? lO(t, e, n, !0) : uO(t, e, n, !0);
  31456. hO(t, n, !0), cO(t, e, n, !0)
  31457. }(n, u, s) : n = gO(r, u, s, !0), r.setItemGraphicEl(t, n), n.__pictorialSymbolMeta = s, i.add(n), _O(n, u, s)
  31458. } else i.remove(n)
  31459. })).remove((function (t) {
  31460. var e = o.getItemGraphicEl(t);
  31461. e && yO(o, t, e.__pictorialSymbolMeta.animationModel, e)
  31462. })).execute(), this._data = r, this.group
  31463. }, e.prototype.remove = function (t, e) {
  31464. var n = this.group,
  31465. i = this._data;
  31466. t.get("animation") ? i && i.eachItemGraphicEl((function (e) {
  31467. yO(i, Qs(e).dataIndex, t, e)
  31468. })) : n.removeAll()
  31469. }, e.type = "pictorialBar", e
  31470. }(kg);
  31471. function oO(t, e, n, i) {
  31472. var r = t.getItemLayout(e),
  31473. o = n.get("symbolRepeat"),
  31474. a = n.get("symbolClip"),
  31475. s = n.get("symbolPosition") || "start",
  31476. l = (n.get("symbolRotate") || 0) * Math.PI / 180 || 0,
  31477. u = n.get("symbolPatternSize") || 2,
  31478. h = n.isAnimationEnabled(),
  31479. c = {
  31480. dataIndex: e,
  31481. layout: r,
  31482. itemModel: n,
  31483. symbolType: t.getItemVisual(e, "symbol") || "circle",
  31484. style: t.getItemVisual(e, "style"),
  31485. symbolClip: a,
  31486. symbolRepeat: o,
  31487. symbolRepeatDirection: n.get("symbolRepeatDirection"),
  31488. symbolPatternSize: u,
  31489. rotation: l,
  31490. animationModel: h ? n : null,
  31491. hoverScale: h && n.get(["emphasis", "scale"]),
  31492. z2: n.getShallow("z", !0) || 0
  31493. };
  31494. ! function (t, e, n, i, r) {
  31495. var o, a = i.valueDim,
  31496. s = t.get("symbolBoundingData"),
  31497. l = i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),
  31498. u = l.toGlobalCoord(l.dataToCoord(0)),
  31499. h = 1 - +(n[a.wh] <= 0);
  31500. if (Y(s)) {
  31501. var c = [aO(l, s[0]) - u, aO(l, s[1]) - u];
  31502. c[1] < c[0] && c.reverse(), o = c[h]
  31503. } else o = null != s ? aO(l, s) - u : e ? i.coordSysExtent[a.index][h] - u : n[a.wh];
  31504. r.boundingLength = o, e && (r.repeatCutLength = n[a.wh]);
  31505. r.pxSign = o > 0 ? 1 : -1
  31506. }(n, o, r, i, c),
  31507. function (t, e, n, i, r, o, a, s, l, u) {
  31508. var h, c = l.valueDim,
  31509. p = l.categoryDim,
  31510. d = Math.abs(n[p.wh]),
  31511. f = t.getItemVisual(e, "symbolSize");
  31512. h = Y(f) ? f.slice() : null == f ? ["100%", "100%"] : [f, f];
  31513. h[p.index] = Ur(h[p.index], d), h[c.index] = Ur(h[c.index], i ? d : Math.abs(o)), u.symbolSize = h;
  31514. var g = u.symbolScale = [h[0] / s, h[1] / s];
  31515. g[c.index] *= (l.isHorizontal ? -1 : 1) * a
  31516. }(t, e, r, o, 0, c.boundingLength, c.pxSign, u, i, c),
  31517. function (t, e, n, i, r) {
  31518. var o = t.get(eO) || 0;
  31519. o && (iO.attr({
  31520. scaleX: e[0],
  31521. scaleY: e[1],
  31522. rotation: n
  31523. }), iO.updateTransform(), o /= iO.getLineScale(), o *= e[i.valueDim.index]);
  31524. r.valueLineWidth = o || 0
  31525. }(n, c.symbolScale, l, i, c);
  31526. var p = c.symbolSize,
  31527. d = Yy(n.get("symbolOffset"), p);
  31528. return function (t, e, n, i, r, o, a, s, l, u, h, c) {
  31529. var p = h.categoryDim,
  31530. d = h.valueDim,
  31531. f = c.pxSign,
  31532. g = Math.max(e[d.index] + s, 0),
  31533. y = g;
  31534. if (i) {
  31535. var v = Math.abs(l),
  31536. m = it(t.get("symbolMargin"), "15%") + "",
  31537. x = !1;
  31538. m.lastIndexOf("!") === m.length - 1 && (x = !0, m = m.slice(0, m.length - 1));
  31539. var _ = Ur(m, e[d.index]),
  31540. b = Math.max(g + 2 * _, 0),
  31541. w = x ? 0 : 2 * _,
  31542. S = co(i),
  31543. M = S ? i : bO((v + w) / b);
  31544. b = g + 2 * (_ = (v - M * g) / 2 / (x ? M : Math.max(M - 1, 1))), w = x ? 0 : 2 * _, S || "fixed" === i || (M = u ? bO((Math.abs(u) + w) / b) : 0), y = M * b - w, c.repeatTimes = M, c.symbolMargin = _
  31545. }
  31546. var I = f * (y / 2),
  31547. T = c.pathPosition = [];
  31548. T[p.index] = n[p.wh] / 2, T[d.index] = "start" === a ? I : "end" === a ? l - I : l / 2, o && (T[0] += o[0], T[1] += o[1]);
  31549. var C = c.bundlePosition = [];
  31550. C[p.index] = n[p.xy], C[d.index] = n[d.xy];
  31551. var D = c.barRectShape = A({}, n);
  31552. D[d.wh] = f * Math.max(Math.abs(n[d.wh]), Math.abs(T[d.index] + I)), D[p.wh] = n[p.wh];
  31553. var k = c.clipShape = {};
  31554. k[p.xy] = -n[p.xy], k[p.wh] = h.ecSize[p.wh], k[d.xy] = 0, k[d.wh] = n[d.wh]
  31555. }(n, p, r, o, 0, d, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, i, c), c
  31556. }
  31557. function aO(t, e) {
  31558. return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))
  31559. }
  31560. function sO(t) {
  31561. var e = t.symbolPatternSize,
  31562. n = Wy(t.symbolType, -e / 2, -e / 2, e, e);
  31563. return n.attr({
  31564. culling: !0
  31565. }), "image" !== n.type && n.setStyle({
  31566. strokeNoScale: !0
  31567. }), n
  31568. }
  31569. function lO(t, e, n, i) {
  31570. var r = t.__pictorialBundle,
  31571. o = n.symbolSize,
  31572. a = n.valueLineWidth,
  31573. s = n.pathPosition,
  31574. l = e.valueDim,
  31575. u = n.repeatTimes || 0,
  31576. h = 0,
  31577. c = o[e.valueDim.index] + a + 2 * n.symbolMargin;
  31578. for (mO(t, (function (t) {
  31579. t.__pictorialAnimationIndex = h, t.__pictorialRepeatTimes = u, h < u ? xO(t, null, f(h), n, i) : xO(t, null, {
  31580. scaleX: 0,
  31581. scaleY: 0
  31582. }, n, i, (function () {
  31583. r.remove(t)
  31584. })), h++
  31585. })); h < u; h++) {
  31586. var p = sO(n);
  31587. p.__pictorialAnimationIndex = h, p.__pictorialRepeatTimes = u, r.add(p);
  31588. var d = f(h);
  31589. xO(p, {
  31590. x: d.x,
  31591. y: d.y,
  31592. scaleX: 0,
  31593. scaleY: 0
  31594. }, {
  31595. scaleX: d.scaleX,
  31596. scaleY: d.scaleY,
  31597. rotation: d.rotation
  31598. }, n, i)
  31599. }
  31600. function f(t) {
  31601. var e = s.slice(),
  31602. i = n.pxSign,
  31603. r = t;
  31604. return ("start" === n.symbolRepeatDirection ? i > 0 : i < 0) && (r = u - 1 - t), e[l.index] = c * (r - u / 2 + .5) + s[l.index], {
  31605. x: e[0],
  31606. y: e[1],
  31607. scaleX: n.symbolScale[0],
  31608. scaleY: n.symbolScale[1],
  31609. rotation: n.rotation
  31610. }
  31611. }
  31612. }
  31613. function uO(t, e, n, i) {
  31614. var r = t.__pictorialBundle,
  31615. o = t.__pictorialMainPath;
  31616. o ? xO(o, null, {
  31617. x: n.pathPosition[0],
  31618. y: n.pathPosition[1],
  31619. scaleX: n.symbolScale[0],
  31620. scaleY: n.symbolScale[1],
  31621. rotation: n.rotation
  31622. }, n, i) : (o = t.__pictorialMainPath = sO(n), r.add(o), xO(o, {
  31623. x: n.pathPosition[0],
  31624. y: n.pathPosition[1],
  31625. scaleX: 0,
  31626. scaleY: 0,
  31627. rotation: n.rotation
  31628. }, {
  31629. scaleX: n.symbolScale[0],
  31630. scaleY: n.symbolScale[1]
  31631. }, n, i))
  31632. }
  31633. function hO(t, e, n) {
  31634. var i = A({}, e.barRectShape),
  31635. r = t.__pictorialBarRect;
  31636. r ? xO(r, null, {
  31637. shape: i
  31638. }, e, n) : ((r = t.__pictorialBarRect = new zs({
  31639. z2: 2,
  31640. shape: i,
  31641. silent: !0,
  31642. style: {
  31643. stroke: "transparent",
  31644. fill: "transparent",
  31645. lineWidth: 0
  31646. }
  31647. })).disableMorphing = !0, t.add(r))
  31648. }
  31649. function cO(t, e, n, i) {
  31650. if (n.symbolClip) {
  31651. var r = t.__pictorialClipPath,
  31652. o = A({}, n.clipShape),
  31653. a = e.valueDim,
  31654. s = n.animationModel,
  31655. l = n.dataIndex;
  31656. if (r) fh(r, {
  31657. shape: o
  31658. }, s, l);
  31659. else {
  31660. o[a.wh] = 0, r = new zs({
  31661. shape: o
  31662. }), t.__pictorialBundle.setClipPath(r), t.__pictorialClipPath = r;
  31663. var u = {};
  31664. u[a.wh] = n.clipShape[a.wh], Kh[i ? "updateProps" : "initProps"](r, {
  31665. shape: u
  31666. }, s, l)
  31667. }
  31668. }
  31669. }
  31670. function pO(t, e) {
  31671. var n = t.getItemModel(e);
  31672. return n.getAnimationDelayParams = dO, n.isAnimationEnabled = fO, n
  31673. }
  31674. function dO(t) {
  31675. return {
  31676. index: t.__pictorialAnimationIndex,
  31677. count: t.__pictorialRepeatTimes
  31678. }
  31679. }
  31680. function fO() {
  31681. return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation")
  31682. }
  31683. function gO(t, e, n, i) {
  31684. var r = new zr,
  31685. o = new zr;
  31686. return r.add(o), r.__pictorialBundle = o, o.x = n.bundlePosition[0], o.y = n.bundlePosition[1], n.symbolRepeat ? lO(r, e, n) : uO(r, 0, n), hO(r, n, i), cO(r, e, n, i), r.__pictorialShapeStr = vO(t, n), r.__pictorialSymbolMeta = n, r
  31687. }
  31688. function yO(t, e, n, i) {
  31689. var r = i.__pictorialBarRect;
  31690. r && r.removeTextContent();
  31691. var o = [];
  31692. mO(i, (function (t) {
  31693. o.push(t)
  31694. })), i.__pictorialMainPath && o.push(i.__pictorialMainPath), i.__pictorialClipPath && (n = null), E(o, (function (t) {
  31695. vh(t, {
  31696. scaleX: 0,
  31697. scaleY: 0
  31698. }, n, e, (function () {
  31699. i.parent && i.parent.remove(i)
  31700. }))
  31701. })), t.setItemGraphicEl(e, null)
  31702. }
  31703. function vO(t, e) {
  31704. return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":")
  31705. }
  31706. function mO(t, e, n) {
  31707. E(t.__pictorialBundle.children(), (function (i) {
  31708. i !== t.__pictorialBarRect && e.call(n, i)
  31709. }))
  31710. }
  31711. function xO(t, e, n, i, r, o) {
  31712. e && t.attr(e), i.symbolClip && !r ? n && t.attr(n) : n && Kh[r ? "updateProps" : "initProps"](t, n, i.animationModel, i.dataIndex, o)
  31713. }
  31714. function _O(t, e, n) {
  31715. var i = n.dataIndex,
  31716. r = n.itemModel,
  31717. o = r.getModel("emphasis"),
  31718. a = o.getModel("itemStyle").getItemStyle(),
  31719. s = r.getModel(["blur", "itemStyle"]).getItemStyle(),
  31720. l = r.getModel(["select", "itemStyle"]).getItemStyle(),
  31721. u = r.getShallow("cursor"),
  31722. h = o.get("focus"),
  31723. c = o.get("blurScope"),
  31724. p = o.get("scale");
  31725. mO(t, (function (t) {
  31726. if (t instanceof ks) {
  31727. var e = t.style;
  31728. t.useStyle(A({
  31729. image: e.image,
  31730. x: e.x,
  31731. y: e.y,
  31732. width: e.width,
  31733. height: e.height
  31734. }, n.style))
  31735. } else t.useStyle(n.style);
  31736. var i = t.ensureState("emphasis");
  31737. i.style = a, p && (i.scaleX = 1.1 * t.scaleX, i.scaleY = 1.1 * t.scaleY), t.ensureState("blur").style = s, t.ensureState("select").style = l, u && (t.cursor = u), t.z2 = n.z2
  31738. }));
  31739. var d = e.valueDim.posDesc[+(n.boundingLength > 0)];
  31740. tc(t.__pictorialBarRect, ec(r), {
  31741. labelFetcher: e.seriesModel,
  31742. labelDataIndex: i,
  31743. defaultText: iS(e.seriesModel.getData(), i),
  31744. inheritColor: n.style.fill,
  31745. defaultOpacity: n.style.opacity,
  31746. defaultOutsidePosition: d
  31747. }), Yl(t, h, c, o.get("disabled"))
  31748. }
  31749. function bO(t) {
  31750. var e = Math.round(t);
  31751. return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t)
  31752. }
  31753. var wO = function (t) {
  31754. function e() {
  31755. var n = null !== t && t.apply(this, arguments) || this;
  31756. return n.type = e.type, n.hasSymbolVisual = !0, n.defaultSymbol = "roundRect", n
  31757. }
  31758. return n(e, t), e.prototype.getInitialData = function (e) {
  31759. return e.stack = null, t.prototype.getInitialData.apply(this, arguments)
  31760. }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = Cc(FS.defaultOption, {
  31761. symbol: "circle",
  31762. symbolSize: null,
  31763. symbolRotate: null,
  31764. symbolPosition: null,
  31765. symbolOffset: null,
  31766. symbolMargin: null,
  31767. symbolRepeat: !1,
  31768. symbolRepeatDirection: "end",
  31769. symbolClip: !1,
  31770. symbolBoundingData: null,
  31771. symbolPatternSize: 400,
  31772. barGap: "-100%",
  31773. progressive: 0,
  31774. emphasis: {
  31775. scale: !1
  31776. },
  31777. select: {
  31778. itemStyle: {
  31779. borderColor: "#212121"
  31780. }
  31781. }
  31782. }), e
  31783. }(FS);
  31784. var SO = function (t) {
  31785. function e() {
  31786. var n = null !== t && t.apply(this, arguments) || this;
  31787. return n.type = e.type, n._layers = [], n
  31788. }
  31789. return n(e, t), e.prototype.render = function (t, e, n) {
  31790. var i = t.getData(),
  31791. r = this,
  31792. o = this.group,
  31793. a = t.getLayerSeries(),
  31794. s = i.getLayout("layoutInfo"),
  31795. l = s.rect,
  31796. u = s.boundaryGap;
  31797. function h(t) {
  31798. return t.name
  31799. }
  31800. o.x = 0, o.y = l.y + u[0];
  31801. var c = new Vm(this._layersSeries || [], a, h, h),
  31802. p = [];
  31803. function d(e, n, s) {
  31804. var l = r._layers;
  31805. if ("remove" !== e) {
  31806. for (var u, h, c = [], d = [], f = a[n].indices, g = 0; g < f.length; g++) {
  31807. var y = i.getItemLayout(f[g]),
  31808. v = y.x,
  31809. m = y.y0,
  31810. x = y.y;
  31811. c.push(v, m), d.push(v, m + x), u = i.getItemVisual(f[g], "style")
  31812. }
  31813. var _ = i.getItemLayout(f[0]),
  31814. b = t.getModel("label").get("margin"),
  31815. w = t.getModel("emphasis");
  31816. if ("add" === e) {
  31817. var S = p[n] = new zr;
  31818. h = new _S({
  31819. shape: {
  31820. points: c,
  31821. stackedOnPoints: d,
  31822. smooth: .4,
  31823. stackedOnSmooth: .4,
  31824. smoothConstraint: !1
  31825. },
  31826. z2: 0
  31827. }), S.add(h), o.add(S), t.isAnimationEnabled() && h.setClipPath(function (t, e, n) {
  31828. var i = new zs({
  31829. shape: {
  31830. x: t.x - 10,
  31831. y: t.y - 10,
  31832. width: 0,
  31833. height: t.height + 20
  31834. }
  31835. });
  31836. return gh(i, {
  31837. shape: {
  31838. x: t.x - 50,
  31839. width: t.width + 100,
  31840. height: t.height + 20
  31841. }
  31842. }, e, n), i
  31843. }(h.getBoundingRect(), t, (function () {
  31844. h.removeClipPath()
  31845. })))
  31846. } else {
  31847. S = l[s];
  31848. h = S.childAt(0), o.add(S), p[n] = S, fh(h, {
  31849. shape: {
  31850. points: c,
  31851. stackedOnPoints: d
  31852. }
  31853. }, t), _h(h)
  31854. }
  31855. tc(h, ec(t), {
  31856. labelDataIndex: f[g - 1],
  31857. defaultText: i.getName(f[g - 1]),
  31858. inheritColor: u.fill
  31859. }, {
  31860. normal: {
  31861. verticalAlign: "middle"
  31862. }
  31863. }), h.setTextConfig({
  31864. position: null,
  31865. local: !0
  31866. });
  31867. var M = h.getTextContent();
  31868. M && (M.x = _.x - b, M.y = _.y0 + _.y / 2), h.useStyle(u), i.setItemGraphicEl(n, h), jl(h, t), Yl(h, w.get("focus"), w.get("blurScope"), w.get("disabled"))
  31869. } else o.remove(l[n])
  31870. }
  31871. c.add(W(d, this, "add")).update(W(d, this, "update")).remove(W(d, this, "remove")).execute(), this._layersSeries = a, this._layers = p
  31872. }, e.type = "themeRiver", e
  31873. }(kg);
  31874. var MO = function (t) {
  31875. function e() {
  31876. var n = null !== t && t.apply(this, arguments) || this;
  31877. return n.type = e.type, n
  31878. }
  31879. return n(e, t), e.prototype.init = function (e) {
  31880. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new IM(W(this.getData, this), W(this.getRawData, this))
  31881. }, e.prototype.fixData = function (t) {
  31882. var e = t.length,
  31883. n = {},
  31884. i = Go(t, (function (t) {
  31885. return n.hasOwnProperty(t[0] + "") || (n[t[0] + ""] = -1), t[2]
  31886. })),
  31887. r = [];
  31888. i.buckets.each((function (t, e) {
  31889. r.push({
  31890. name: e,
  31891. dataList: t
  31892. })
  31893. }));
  31894. for (var o = r.length, a = 0; a < o; ++a) {
  31895. for (var s = r[a].name, l = 0; l < r[a].dataList.length; ++l) {
  31896. var u = r[a].dataList[l][0] + "";
  31897. n[u] = a
  31898. }
  31899. for (var u in n) n.hasOwnProperty(u) && n[u] !== a && (n[u] = a, t[e] = [u, 0, s], e++)
  31900. }
  31901. return t
  31902. }, e.prototype.getInitialData = function (t, e) {
  31903. for (var n = this.getReferringComponents("singleAxis", zo).models[0].get("type"), i = B(t.data, (function (t) {
  31904. return void 0 !== t[2]
  31905. })), r = this.fixData(i || []), o = [], a = this.nameMap = yt(), s = 0, l = 0; l < r.length; ++l) o.push(r[l][2]), a.get(r[l][2]) || (a.set(r[l][2], s), s++);
  31906. var u = ux(r, {
  31907. coordDimensions: ["single"],
  31908. dimensionsDefine: [{
  31909. name: "time",
  31910. type: Gm(n)
  31911. }, {
  31912. name: "value",
  31913. type: "float"
  31914. }, {
  31915. name: "name",
  31916. type: "ordinal"
  31917. }],
  31918. encodeDefine: {
  31919. single: 0,
  31920. value: 1,
  31921. itemName: 2
  31922. }
  31923. }).dimensions,
  31924. h = new lx(u, this);
  31925. return h.initData(r), h
  31926. }, e.prototype.getLayerSeries = function () {
  31927. for (var t = this.getData(), e = t.count(), n = [], i = 0; i < e; ++i) n[i] = i;
  31928. var r = t.mapDimension("single"),
  31929. o = Go(n, (function (e) {
  31930. return t.get("name", e)
  31931. })),
  31932. a = [];
  31933. return o.buckets.each((function (e, n) {
  31934. e.sort((function (e, n) {
  31935. return t.get(r, e) - t.get(r, n)
  31936. })), a.push({
  31937. name: n,
  31938. indices: e
  31939. })
  31940. })), a
  31941. }, e.prototype.getAxisTooltipData = function (t, e, n) {
  31942. Y(t) || (t = t ? [t] : []);
  31943. for (var i, r = this.getData(), o = this.getLayerSeries(), a = [], s = o.length, l = 0; l < s; ++l) {
  31944. for (var u = Number.MAX_VALUE, h = -1, c = o[l].indices.length, p = 0; p < c; ++p) {
  31945. var d = r.get(t[0], o[l].indices[p]),
  31946. f = Math.abs(d - e);
  31947. f <= u && (i = d, u = f, h = o[l].indices[p])
  31948. }
  31949. a.push(h)
  31950. }
  31951. return {
  31952. dataIndices: a,
  31953. nestestValue: i
  31954. }
  31955. }, e.prototype.formatTooltip = function (t, e, n) {
  31956. var i = this.getData();
  31957. return ng("nameValue", {
  31958. name: i.getName(t),
  31959. value: i.get(i.mapDimension("value"), t)
  31960. })
  31961. }, e.type = "series.themeRiver", e.dependencies = ["singleAxis"], e.defaultOption = {
  31962. z: 2,
  31963. colorBy: "data",
  31964. coordinateSystem: "singleAxis",
  31965. boundaryGap: ["10%", "10%"],
  31966. singleAxisIndex: 0,
  31967. animationEasing: "linear",
  31968. label: {
  31969. margin: 4,
  31970. show: !0,
  31971. position: "left",
  31972. fontSize: 11
  31973. },
  31974. emphasis: {
  31975. label: {
  31976. show: !0
  31977. }
  31978. }
  31979. }, e
  31980. }(mg);
  31981. function IO(t, e) {
  31982. t.eachSeriesByType("themeRiver", (function (t) {
  31983. var e = t.getData(),
  31984. n = t.coordinateSystem,
  31985. i = {},
  31986. r = n.getRect();
  31987. i.rect = r;
  31988. var o = t.get("boundaryGap"),
  31989. a = n.getAxis();
  31990. (i.boundaryGap = o, "horizontal" === a.orient) ? (o[0] = Ur(o[0], r.height), o[1] = Ur(o[1], r.height), TO(e, t, r.height - o[0] - o[1])) : (o[0] = Ur(o[0], r.width), o[1] = Ur(o[1], r.width), TO(e, t, r.width - o[0] - o[1]));
  31991. e.setLayout("layoutInfo", i)
  31992. }))
  31993. }
  31994. function TO(t, e, n) {
  31995. if (t.count())
  31996. for (var i, r = e.coordinateSystem, o = e.getLayerSeries(), a = t.mapDimension("single"), s = t.mapDimension("value"), l = z(o, (function (e) {
  31997. return z(e.indices, (function (e) {
  31998. var n = r.dataToPoint(t.get(a, e));
  31999. return n[1] = t.get(s, e), n
  32000. }))
  32001. })), u = function (t) {
  32002. for (var e = t.length, n = t[0].length, i = [], r = [], o = 0, a = 0; a < n; ++a) {
  32003. for (var s = 0, l = 0; l < e; ++l) s += t[l][a][1];
  32004. s > o && (o = s), i.push(s)
  32005. }
  32006. for (var u = 0; u < n; ++u) r[u] = (o - i[u]) / 2;
  32007. o = 0;
  32008. for (var h = 0; h < n; ++h) {
  32009. var c = i[h] + r[h];
  32010. c > o && (o = c)
  32011. }
  32012. return {
  32013. y0: r,
  32014. max: o
  32015. }
  32016. }(l), h = u.y0, c = n / u.max, p = o.length, d = o[0].indices.length, f = 0; f < d; ++f) {
  32017. i = h[f] * c, t.setItemLayout(o[0].indices[f], {
  32018. layerIndex: 0,
  32019. x: l[0][f][0],
  32020. y0: i,
  32021. y: l[0][f][1] * c
  32022. });
  32023. for (var g = 1; g < p; ++g) i += l[g - 1][f][1] * c, t.setItemLayout(o[g].indices[f], {
  32024. layerIndex: g,
  32025. x: l[g][f][0],
  32026. y0: i,
  32027. y: l[g][f][1] * c
  32028. })
  32029. }
  32030. }
  32031. var CO = function (t) {
  32032. function e(e, n, i, r) {
  32033. var o = t.call(this) || this;
  32034. o.z2 = 2, o.textConfig = {
  32035. inside: !0
  32036. }, Qs(o).seriesIndex = n.seriesIndex;
  32037. var a = new Fs({
  32038. z2: 4,
  32039. silent: e.getModel().get(["label", "silent"])
  32040. });
  32041. return o.setTextContent(a), o.updateData(!0, e, n, i, r), o
  32042. }
  32043. return n(e, t), e.prototype.updateData = function (t, e, n, i, r) {
  32044. this.node = e, e.piece = this, n = n || this._seriesModel, i = i || this._ecModel;
  32045. var o = this;
  32046. Qs(o).dataIndex = e.dataIndex;
  32047. var a = e.getModel(),
  32048. s = a.getModel("emphasis"),
  32049. l = e.getLayout(),
  32050. u = A({}, l);
  32051. u.label = null;
  32052. var h = e.getVisual("style");
  32053. h.lineJoin = "bevel";
  32054. var c = e.getVisual("decal");
  32055. c && (h.decal = gv(c, r));
  32056. var p = US(a.getModel("itemStyle"), u, !0);
  32057. A(u, p), E(ol, (function (t) {
  32058. var e = o.ensureState(t),
  32059. n = a.getModel([t, "itemStyle"]);
  32060. e.style = n.getItemStyle();
  32061. var i = US(n, u);
  32062. i && (e.shape = i)
  32063. })), t ? (o.setShape(u), o.shape.r = l.r0, gh(o, {
  32064. shape: {
  32065. r: l.r
  32066. }
  32067. }, n, e.dataIndex)) : (fh(o, {
  32068. shape: u
  32069. }, n), _h(o)), o.useStyle(h), this._updateLabel(n);
  32070. var d = a.getShallow("cursor");
  32071. d && o.attr("cursor", d), this._seriesModel = n || this._seriesModel, this._ecModel = i || this._ecModel;
  32072. var f = s.get("focus");
  32073. Yl(this, "ancestor" === f ? e.getAncestorsIndices() : "descendant" === f ? e.getDescendantIndices() : f, s.get("blurScope"), s.get("disabled"))
  32074. }, e.prototype._updateLabel = function (t) {
  32075. var e = this,
  32076. n = this.node.getModel(),
  32077. i = n.getModel("label"),
  32078. r = this.node.getLayout(),
  32079. o = r.endAngle - r.startAngle,
  32080. a = (r.startAngle + r.endAngle) / 2,
  32081. s = Math.cos(a),
  32082. l = Math.sin(a),
  32083. u = this,
  32084. h = u.getTextContent(),
  32085. c = this.node.dataIndex,
  32086. p = i.get("minAngle") / 180 * Math.PI,
  32087. d = i.get("show") && !(null != p && Math.abs(o) < p);
  32088. function f(t, e) {
  32089. var n = t.get(e);
  32090. return null == n ? i.get(e) : n
  32091. }
  32092. h.ignore = !d, E(al, (function (i) {
  32093. var p = "normal" === i ? n.getModel("label") : n.getModel([i, "label"]),
  32094. d = "normal" === i,
  32095. g = d ? h : h.ensureState(i),
  32096. y = t.getFormattedLabel(c, i);
  32097. d && (y = y || e.node.name), g.style = nc(p, {}, null, "normal" !== i, !0), y && (g.style.text = y);
  32098. var v = p.get("show");
  32099. null == v || d || (g.ignore = !v);
  32100. var m, x = f(p, "position"),
  32101. _ = d ? u : u.states[i],
  32102. b = _.style.fill;
  32103. _.textConfig = {
  32104. outsideFill: "inherit" === p.get("color") ? b : null,
  32105. inside: "outside" !== x
  32106. };
  32107. var w = f(p, "distance") || 0,
  32108. S = f(p, "align");
  32109. "outside" === x ? (m = r.r + w, S = a > Math.PI / 2 ? "right" : "left") : S && "center" !== S ? "left" === S ? (m = r.r0 + w, a > Math.PI / 2 && (S = "right")) : "right" === S && (m = r.r - w, a > Math.PI / 2 && (S = "left")) : (m = o === 2 * Math.PI && 0 === r.r0 ? 0 : (r.r + r.r0) / 2, S = "center"), g.style.align = S, g.style.verticalAlign = f(p, "verticalAlign") || "middle", g.x = m * s + r.cx, g.y = m * l + r.cy;
  32110. var M = f(p, "rotate"),
  32111. I = 0;
  32112. "radial" === M ? (I = hs(-a)) > Math.PI / 2 && I < 1.5 * Math.PI && (I += Math.PI) : "tangential" === M ? (I = Math.PI / 2 - a) > Math.PI / 2 ? I -= Math.PI : I < -Math.PI / 2 && (I += Math.PI) : j(M) && (I = M * Math.PI / 180), g.rotation = I
  32113. })), h.dirtyStyle()
  32114. }, e
  32115. }(zu),
  32116. DO = "sunburstRootToNode",
  32117. AO = "sunburstHighlight";
  32118. var kO = function (t) {
  32119. function e() {
  32120. var n = null !== t && t.apply(this, arguments) || this;
  32121. return n.type = e.type, n
  32122. }
  32123. return n(e, t), e.prototype.render = function (t, e, n, i) {
  32124. var r = this;
  32125. this.seriesModel = t, this.api = n, this.ecModel = e;
  32126. var o = t.getData(),
  32127. a = o.tree.root,
  32128. s = t.getViewRoot(),
  32129. l = this.group,
  32130. u = t.get("renderLabelForZeroData"),
  32131. h = [];
  32132. s.eachNode((function (t) {
  32133. h.push(t)
  32134. }));
  32135. var c = this._oldChildren || [];
  32136. ! function (i, r) {
  32137. if (0 === i.length && 0 === r.length) return;
  32138. function s(t) {
  32139. return t.getId()
  32140. }
  32141. function h(s, h) {
  32142. ! function (i, r) {
  32143. u || !i || i.getValue() || (i = null);
  32144. if (i !== a && r !== a)
  32145. if (r && r.piece) i ? (r.piece.updateData(!1, i, t, e, n), o.setItemGraphicEl(i.dataIndex, r.piece)) : function (t) {
  32146. if (!t) return;
  32147. t.piece && (l.remove(t.piece), t.piece = null)
  32148. }(r);
  32149. else if (i) {
  32150. var s = new CO(i, t, e, n);
  32151. l.add(s), o.setItemGraphicEl(i.dataIndex, s)
  32152. }
  32153. }(null == s ? null : i[s], null == h ? null : r[h])
  32154. }
  32155. new Vm(r, i, s, s).add(h).update(h).remove(H(h, null)).execute()
  32156. }(h, c),
  32157. function (i, o) {
  32158. o.depth > 0 ? (r.virtualPiece ? r.virtualPiece.updateData(!1, i, t, e, n) : (r.virtualPiece = new CO(i, t, e, n), l.add(r.virtualPiece)), o.piece.off("click"), r.virtualPiece.on("click", (function (t) {
  32159. r._rootToNode(o.parentNode)
  32160. }))) : r.virtualPiece && (l.remove(r.virtualPiece), r.virtualPiece = null)
  32161. }(a, s), this._initEvents(), this._oldChildren = h
  32162. }, e.prototype._initEvents = function () {
  32163. var t = this;
  32164. this.group.off("click"), this.group.on("click", (function (e) {
  32165. var n = !1;
  32166. t.seriesModel.getViewRoot().eachNode((function (i) {
  32167. if (!n && i.piece && i.piece === e.target) {
  32168. var r = i.getModel().get("nodeClick");
  32169. if ("rootToNode" === r) t._rootToNode(i);
  32170. else if ("link" === r) {
  32171. var o = i.getModel(),
  32172. a = o.get("link");
  32173. if (a) bp(a, o.get("target", !0) || "_blank")
  32174. }
  32175. n = !0
  32176. }
  32177. }))
  32178. }))
  32179. }, e.prototype._rootToNode = function (t) {
  32180. t !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
  32181. type: DO,
  32182. from: this.uid,
  32183. seriesId: this.seriesModel.id,
  32184. targetNode: t
  32185. })
  32186. }, e.prototype.containPoint = function (t, e) {
  32187. var n = e.getData().getItemLayout(0);
  32188. if (n) {
  32189. var i = t[0] - n.cx,
  32190. r = t[1] - n.cy,
  32191. o = Math.sqrt(i * i + r * r);
  32192. return o <= n.r && o >= n.r0
  32193. }
  32194. }, e.type = "sunburst", e
  32195. }(kg),
  32196. LO = function (t) {
  32197. function e() {
  32198. var n = null !== t && t.apply(this, arguments) || this;
  32199. return n.type = e.type, n.ignoreStyleOnData = !0, n
  32200. }
  32201. return n(e, t), e.prototype.getInitialData = function (t, e) {
  32202. var n = {
  32203. name: t.name,
  32204. children: t.data
  32205. };
  32206. PO(n);
  32207. var i = this._levelModels = z(t.levels || [], (function (t) {
  32208. return new Mc(t, this, e)
  32209. }), this),
  32210. r = UC.createTree(n, this, (function (t) {
  32211. t.wrapMethod("getItemModel", (function (t, e) {
  32212. var n = r.getNodeByDataIndex(e),
  32213. o = i[n.depth];
  32214. return o && (t.parentModel = o), t
  32215. }))
  32216. }));
  32217. return r.data
  32218. }, e.prototype.optionUpdated = function () {
  32219. this.resetViewRoot()
  32220. }, e.prototype.getDataParams = function (e) {
  32221. var n = t.prototype.getDataParams.apply(this, arguments),
  32222. i = this.getData().tree.getNodeByDataIndex(e);
  32223. return n.treePathInfo = KC(i, this), n
  32224. }, e.prototype.getLevelModel = function (t) {
  32225. return this._levelModels && this._levelModels[t.depth]
  32226. }, e.prototype.getViewRoot = function () {
  32227. return this._viewRoot
  32228. }, e.prototype.resetViewRoot = function (t) {
  32229. t ? this._viewRoot = t : t = this._viewRoot;
  32230. var e = this.getRawData().tree.root;
  32231. t && (t === e || e.contains(t)) || (this._viewRoot = e)
  32232. }, e.prototype.enableAriaDecal = function () {
  32233. nD(this)
  32234. }, e.type = "series.sunburst", e.defaultOption = {
  32235. z: 2,
  32236. center: ["50%", "50%"],
  32237. radius: [0, "75%"],
  32238. clockwise: !0,
  32239. startAngle: 90,
  32240. minAngle: 0,
  32241. stillShowZeroSum: !0,
  32242. nodeClick: "rootToNode",
  32243. renderLabelForZeroData: !1,
  32244. label: {
  32245. rotate: "radial",
  32246. show: !0,
  32247. opacity: 1,
  32248. align: "center",
  32249. position: "inside",
  32250. distance: 5,
  32251. silent: !0
  32252. },
  32253. itemStyle: {
  32254. borderWidth: 1,
  32255. borderColor: "white",
  32256. borderType: "solid",
  32257. shadowBlur: 0,
  32258. shadowColor: "rgba(0, 0, 0, 0.2)",
  32259. shadowOffsetX: 0,
  32260. shadowOffsetY: 0,
  32261. opacity: 1
  32262. },
  32263. emphasis: {
  32264. focus: "descendant"
  32265. },
  32266. blur: {
  32267. itemStyle: {
  32268. opacity: .2
  32269. },
  32270. label: {
  32271. opacity: .1
  32272. }
  32273. },
  32274. animationType: "expansion",
  32275. animationDuration: 1e3,
  32276. animationDurationUpdate: 500,
  32277. data: [],
  32278. sort: "desc"
  32279. }, e
  32280. }(mg);
  32281. function PO(t) {
  32282. var e = 0;
  32283. E(t.children, (function (t) {
  32284. PO(t);
  32285. var n = t.value;
  32286. Y(n) && (n = n[0]), e += n
  32287. }));
  32288. var n = t.value;
  32289. Y(n) && (n = n[0]), (null == n || isNaN(n)) && (n = e), n < 0 && (n = 0), Y(t.value) ? t.value[0] = n : t.value = n
  32290. }
  32291. var OO = Math.PI / 180;
  32292. function RO(t, e, n) {
  32293. e.eachSeriesByType(t, (function (t) {
  32294. var e = t.get("center"),
  32295. i = t.get("radius");
  32296. Y(i) || (i = [0, i]), Y(e) || (e = [e, e]);
  32297. var r = n.getWidth(),
  32298. o = n.getHeight(),
  32299. a = Math.min(r, o),
  32300. s = Ur(e[0], r),
  32301. l = Ur(e[1], o),
  32302. u = Ur(i[0], a / 2),
  32303. h = Ur(i[1], a / 2),
  32304. c = -t.get("startAngle") * OO,
  32305. p = t.get("minAngle") * OO,
  32306. d = t.getData().tree.root,
  32307. f = t.getViewRoot(),
  32308. g = f.depth,
  32309. y = t.get("sort");
  32310. null != y && NO(f, y);
  32311. var v = 0;
  32312. E(f.children, (function (t) {
  32313. !isNaN(t.getValue()) && v++
  32314. }));
  32315. var m = f.getValue(),
  32316. x = Math.PI / (m || v) * 2,
  32317. _ = f.depth > 0,
  32318. b = f.height - (_ ? -1 : 1),
  32319. w = (h - u) / (b || 1),
  32320. S = t.get("clockwise"),
  32321. M = t.get("stillShowZeroSum"),
  32322. I = S ? 1 : -1,
  32323. T = function (e, n) {
  32324. if (e) {
  32325. var i = n;
  32326. if (e !== d) {
  32327. var r = e.getValue(),
  32328. o = 0 === m && M ? x : r * x;
  32329. o < p && (o = p), i = n + I * o;
  32330. var h = e.depth - g - (_ ? -1 : 1),
  32331. c = u + w * h,
  32332. f = u + w * (h + 1),
  32333. y = t.getLevelModel(e);
  32334. if (y) {
  32335. var v = y.get("r0", !0),
  32336. b = y.get("r", !0),
  32337. C = y.get("radius", !0);
  32338. null != C && (v = C[0], b = C[1]), null != v && (c = Ur(v, a / 2)), null != b && (f = Ur(b, a / 2))
  32339. }
  32340. e.setLayout({
  32341. angle: o,
  32342. startAngle: n,
  32343. endAngle: i,
  32344. clockwise: S,
  32345. cx: s,
  32346. cy: l,
  32347. r0: c,
  32348. r: f
  32349. })
  32350. }
  32351. if (e.children && e.children.length) {
  32352. var D = 0;
  32353. E(e.children, (function (t) {
  32354. D += T(t, n + D)
  32355. }))
  32356. }
  32357. return i - n
  32358. }
  32359. };
  32360. if (_) {
  32361. var C = u,
  32362. D = u + w,
  32363. A = 2 * Math.PI;
  32364. d.setLayout({
  32365. angle: A,
  32366. startAngle: c,
  32367. endAngle: c + A,
  32368. clockwise: S,
  32369. cx: s,
  32370. cy: l,
  32371. r0: C,
  32372. r: D
  32373. })
  32374. }
  32375. T(f, c)
  32376. }))
  32377. }
  32378. function NO(t, e) {
  32379. var n = t.children || [];
  32380. t.children = function (t, e) {
  32381. if (X(e)) {
  32382. var n = z(t, (function (t, e) {
  32383. var n = t.getValue();
  32384. return {
  32385. params: {
  32386. depth: t.depth,
  32387. height: t.height,
  32388. dataIndex: t.dataIndex,
  32389. getValue: function () {
  32390. return n
  32391. }
  32392. },
  32393. index: e
  32394. }
  32395. }));
  32396. return n.sort((function (t, n) {
  32397. return e(t.params, n.params)
  32398. })), z(n, (function (e) {
  32399. return t[e.index]
  32400. }))
  32401. }
  32402. var i = "asc" === e;
  32403. return t.sort((function (t, e) {
  32404. var n = (t.getValue() - e.getValue()) * (i ? 1 : -1);
  32405. return 0 === n ? (t.dataIndex - e.dataIndex) * (i ? -1 : 1) : n
  32406. }))
  32407. }(n, e), n.length && E(t.children, (function (t) {
  32408. NO(t, e)
  32409. }))
  32410. }
  32411. function EO(t) {
  32412. var e = {};
  32413. t.eachSeriesByType("sunburst", (function (t) {
  32414. var n = t.getData(),
  32415. i = n.tree;
  32416. i.eachNode((function (r) {
  32417. var o = r.getModel().getModel("itemStyle").getItemStyle();
  32418. o.fill || (o.fill = function (t, n, i) {
  32419. for (var r = t; r && r.depth > 1;) r = r.parentNode;
  32420. var o = n.getColorFromPalette(r.name || r.dataIndex + "", e);
  32421. return t.depth > 1 && U(o) && (o = $n(o, (t.depth - 1) / (i - 1) * .5)), o
  32422. }(r, t, i.root.height)), A(n.ensureUniqueItemVisual(r.dataIndex, "style"), o)
  32423. }))
  32424. }))
  32425. }
  32426. var zO = {
  32427. color: "fill",
  32428. borderColor: "stroke"
  32429. },
  32430. VO = {
  32431. symbol: 1,
  32432. symbolSize: 1,
  32433. symbolKeepAspect: 1,
  32434. legendIcon: 1,
  32435. visualMeta: 1,
  32436. liftZ: 1,
  32437. decal: 1
  32438. },
  32439. BO = Oo(),
  32440. FO = function (t) {
  32441. function e() {
  32442. var n = null !== t && t.apply(this, arguments) || this;
  32443. return n.type = e.type, n
  32444. }
  32445. return n(e, t), e.prototype.optionUpdated = function () {
  32446. this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0)
  32447. }, e.prototype.getInitialData = function (t, e) {
  32448. return vx(null, this)
  32449. }, e.prototype.getDataParams = function (e, n, i) {
  32450. var r = t.prototype.getDataParams.call(this, e, n);
  32451. return i && (r.info = BO(i).info), r
  32452. }, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  32453. coordinateSystem: "cartesian2d",
  32454. z: 2,
  32455. legendHoverLink: !0,
  32456. clip: !1
  32457. }, e
  32458. }(mg);
  32459. function GO(t, e) {
  32460. return e = e || [0, 0], z(["x", "y"], (function (n, i) {
  32461. var r = this.getAxis(n),
  32462. o = e[i],
  32463. a = t[i] / 2;
  32464. return "category" === r.type ? r.getBandWidth() : Math.abs(r.dataToCoord(o - a) - r.dataToCoord(o + a))
  32465. }), this)
  32466. }
  32467. function WO(t, e) {
  32468. return e = e || [0, 0], z([0, 1], (function (n) {
  32469. var i = e[n],
  32470. r = t[n] / 2,
  32471. o = [],
  32472. a = [];
  32473. return o[n] = i - r, a[n] = i + r, o[1 - n] = a[1 - n] = e[1 - n], Math.abs(this.dataToPoint(o)[n] - this.dataToPoint(a)[n])
  32474. }), this)
  32475. }
  32476. function HO(t, e) {
  32477. var n = this.getAxis(),
  32478. i = e instanceof Array ? e[0] : e,
  32479. r = (t instanceof Array ? t[0] : t) / 2;
  32480. return "category" === n.type ? n.getBandWidth() : Math.abs(n.dataToCoord(i - r) - n.dataToCoord(i + r))
  32481. }
  32482. function YO(t, e) {
  32483. return e = e || [0, 0], z(["Radius", "Angle"], (function (n, i) {
  32484. var r = this["get" + n + "Axis"](),
  32485. o = e[i],
  32486. a = t[i] / 2,
  32487. s = "category" === r.type ? r.getBandWidth() : Math.abs(r.dataToCoord(o - a) - r.dataToCoord(o + a));
  32488. return "Angle" === n && (s = s * Math.PI / 180), s
  32489. }), this)
  32490. }
  32491. function XO(t, e, n, i) {
  32492. return t && (t.legacy || !1 !== t.legacy && !n && !i && "tspan" !== e && ("text" === e || _t(t, "text")))
  32493. }
  32494. function UO(t, e, n) {
  32495. var i, r, o, a = t;
  32496. if ("text" === e) o = a;
  32497. else {
  32498. o = {}, _t(a, "text") && (o.text = a.text), _t(a, "rich") && (o.rich = a.rich), _t(a, "textFill") && (o.fill = a.textFill), _t(a, "textStroke") && (o.stroke = a.textStroke), _t(a, "fontFamily") && (o.fontFamily = a.fontFamily), _t(a, "fontSize") && (o.fontSize = a.fontSize), _t(a, "fontStyle") && (o.fontStyle = a.fontStyle), _t(a, "fontWeight") && (o.fontWeight = a.fontWeight), r = {
  32499. type: "text",
  32500. style: o,
  32501. silent: !0
  32502. }, i = {};
  32503. var s = _t(a, "textPosition");
  32504. n ? i.position = s ? a.textPosition : "inside" : s && (i.position = a.textPosition), _t(a, "textPosition") && (i.position = a.textPosition), _t(a, "textOffset") && (i.offset = a.textOffset), _t(a, "textRotation") && (i.rotation = a.textRotation), _t(a, "textDistance") && (i.distance = a.textDistance)
  32505. }
  32506. return ZO(o, t), E(o.rich, (function (t) {
  32507. ZO(t, t)
  32508. })), {
  32509. textConfig: i,
  32510. textContent: r
  32511. }
  32512. }
  32513. function ZO(t, e) {
  32514. e && (e.font = e.textFont || e.font, _t(e, "textStrokeWidth") && (t.lineWidth = e.textStrokeWidth), _t(e, "textAlign") && (t.align = e.textAlign), _t(e, "textVerticalAlign") && (t.verticalAlign = e.textVerticalAlign), _t(e, "textLineHeight") && (t.lineHeight = e.textLineHeight), _t(e, "textWidth") && (t.width = e.textWidth), _t(e, "textHeight") && (t.height = e.textHeight), _t(e, "textBackgroundColor") && (t.backgroundColor = e.textBackgroundColor), _t(e, "textPadding") && (t.padding = e.textPadding), _t(e, "textBorderColor") && (t.borderColor = e.textBorderColor), _t(e, "textBorderWidth") && (t.borderWidth = e.textBorderWidth), _t(e, "textBorderRadius") && (t.borderRadius = e.textBorderRadius), _t(e, "textBoxShadowColor") && (t.shadowColor = e.textBoxShadowColor), _t(e, "textBoxShadowBlur") && (t.shadowBlur = e.textBoxShadowBlur), _t(e, "textBoxShadowOffsetX") && (t.shadowOffsetX = e.textBoxShadowOffsetX), _t(e, "textBoxShadowOffsetY") && (t.shadowOffsetY = e.textBoxShadowOffsetY))
  32515. }
  32516. function jO(t, e, n) {
  32517. var i = t;
  32518. i.textPosition = i.textPosition || n.position || "inside", null != n.offset && (i.textOffset = n.offset), null != n.rotation && (i.textRotation = n.rotation), null != n.distance && (i.textDistance = n.distance);
  32519. var r = i.textPosition.indexOf("inside") >= 0,
  32520. o = t.fill || "#000";
  32521. qO(i, e);
  32522. var a = null == i.textFill;
  32523. return r ? a && (i.textFill = n.insideFill || "#fff", !i.textStroke && n.insideStroke && (i.textStroke = n.insideStroke), !i.textStroke && (i.textStroke = o), null == i.textStrokeWidth && (i.textStrokeWidth = 2)) : (a && (i.textFill = t.fill || n.outsideFill || "#000"), !i.textStroke && n.outsideStroke && (i.textStroke = n.outsideStroke)), i.text = e.text, i.rich = e.rich, E(e.rich, (function (t) {
  32524. qO(t, t)
  32525. })), i
  32526. }
  32527. function qO(t, e) {
  32528. e && (_t(e, "fill") && (t.textFill = e.fill), _t(e, "stroke") && (t.textStroke = e.fill), _t(e, "lineWidth") && (t.textStrokeWidth = e.lineWidth), _t(e, "font") && (t.font = e.font), _t(e, "fontStyle") && (t.fontStyle = e.fontStyle), _t(e, "fontWeight") && (t.fontWeight = e.fontWeight), _t(e, "fontSize") && (t.fontSize = e.fontSize), _t(e, "fontFamily") && (t.fontFamily = e.fontFamily), _t(e, "align") && (t.textAlign = e.align), _t(e, "verticalAlign") && (t.textVerticalAlign = e.verticalAlign), _t(e, "lineHeight") && (t.textLineHeight = e.lineHeight), _t(e, "width") && (t.textWidth = e.width), _t(e, "height") && (t.textHeight = e.height), _t(e, "backgroundColor") && (t.textBackgroundColor = e.backgroundColor), _t(e, "padding") && (t.textPadding = e.padding), _t(e, "borderColor") && (t.textBorderColor = e.borderColor), _t(e, "borderWidth") && (t.textBorderWidth = e.borderWidth), _t(e, "borderRadius") && (t.textBorderRadius = e.borderRadius), _t(e, "shadowColor") && (t.textBoxShadowColor = e.shadowColor), _t(e, "shadowBlur") && (t.textBoxShadowBlur = e.shadowBlur), _t(e, "shadowOffsetX") && (t.textBoxShadowOffsetX = e.shadowOffsetX), _t(e, "shadowOffsetY") && (t.textBoxShadowOffsetY = e.shadowOffsetY), _t(e, "textShadowColor") && (t.textShadowColor = e.textShadowColor), _t(e, "textShadowBlur") && (t.textShadowBlur = e.textShadowBlur), _t(e, "textShadowOffsetX") && (t.textShadowOffsetX = e.textShadowOffsetX), _t(e, "textShadowOffsetY") && (t.textShadowOffsetY = e.textShadowOffsetY))
  32529. }
  32530. var KO = {
  32531. position: ["x", "y"],
  32532. scale: ["scaleX", "scaleY"],
  32533. origin: ["originX", "originY"]
  32534. },
  32535. $O = G(KO),
  32536. JO = (V(yr, (function (t, e) {
  32537. return t[e] = 1, t
  32538. }), {}), yr.join(", "), ["", "style", "shape", "extra"]),
  32539. QO = Oo();
  32540. function tR(t, e, n, i, r) {
  32541. var o = t + "Animation",
  32542. a = ph(t, i, r) || {},
  32543. s = QO(e).userDuring;
  32544. return a.duration > 0 && (a.during = s ? W(sR, {
  32545. el: e,
  32546. userDuring: s
  32547. }) : null, a.setToFinal = !0, a.scope = t), A(a, n[o]), a
  32548. }
  32549. function eR(t, e, n, i) {
  32550. var r = (i = i || {}).dataIndex,
  32551. o = i.isInit,
  32552. a = i.clearStyle,
  32553. s = n.isAnimationEnabled(),
  32554. l = QO(t),
  32555. u = e.style;
  32556. l.userDuring = e.during;
  32557. var h = {},
  32558. c = {};
  32559. if (function (t, e, n) {
  32560. for (var i = 0; i < $O.length; i++) {
  32561. var r = $O[i],
  32562. o = KO[r],
  32563. a = e[r];
  32564. a && (n[o[0]] = a[0], n[o[1]] = a[1])
  32565. }
  32566. for (i = 0; i < yr.length; i++) {
  32567. var s = yr[i];
  32568. null != e[s] && (n[s] = e[s])
  32569. }
  32570. }(0, e, c), uR("shape", e, c), uR("extra", e, c), !o && s && (function (t, e, n) {
  32571. for (var i = e.transition, r = rR(i) ? yr : bo(i || []), o = 0; o < r.length; o++) {
  32572. var a = r[o];
  32573. if ("style" !== a && "shape" !== a && "extra" !== a) {
  32574. var s = t[a];
  32575. 0, n[a] = s
  32576. }
  32577. }
  32578. }(t, e, h), lR("shape", t, e, h), lR("extra", t, e, h), function (t, e, n, i) {
  32579. if (!n) return;
  32580. var r, o = t.style;
  32581. if (o) {
  32582. var a = n.transition,
  32583. s = e.transition;
  32584. if (a && !rR(a)) {
  32585. var l = bo(a);
  32586. !r && (r = i.style = {});
  32587. for (var u = 0; u < l.length; u++) {
  32588. var h = o[f = l[u]];
  32589. r[f] = h
  32590. }
  32591. } else if (t.getAnimationStyleProps && (rR(s) || rR(a) || P(s, "style") >= 0)) {
  32592. var c = t.getAnimationStyleProps(),
  32593. p = c ? c.style : null;
  32594. if (p) {
  32595. !r && (r = i.style = {});
  32596. var d = G(n);
  32597. for (u = 0; u < d.length; u++) {
  32598. var f;
  32599. if (p[f = d[u]]) {
  32600. h = o[f];
  32601. r[f] = h
  32602. }
  32603. }
  32604. }
  32605. }
  32606. }
  32607. }(t, e, u, h)), c.style = u, function (t, e, n) {
  32608. var i = e.style;
  32609. if (!t.isGroup && i) {
  32610. if (n) {
  32611. t.useStyle({});
  32612. for (var r = t.animators, o = 0; o < r.length; o++) {
  32613. var a = r[o];
  32614. "style" === a.targetName && a.changeTarget(t.style)
  32615. }
  32616. }
  32617. t.setStyle(i)
  32618. }
  32619. e && (e.style = null, e && t.attr(e), e.style = i)
  32620. }(t, c, a), function (t, e) {
  32621. _t(e, "silent") && (t.silent = e.silent), _t(e, "ignore") && (t.ignore = e.ignore), t instanceof Sa && _t(e, "invisible") && (t.invisible = e.invisible);
  32622. t instanceof Is && _t(e, "autoBatch") && (t.autoBatch = e.autoBatch)
  32623. }(t, e), s)
  32624. if (o) {
  32625. var p = {};
  32626. E(JO, (function (t) {
  32627. var n = t ? e[t] : e;
  32628. n && n.enterFrom && (t && (p[t] = p[t] || {}), A(t ? p[t] : p, n.enterFrom))
  32629. }));
  32630. var d = tR("enter", t, e, n, r);
  32631. d.duration > 0 && t.animateFrom(p, d)
  32632. } else ! function (t, e, n, i, r) {
  32633. if (r) {
  32634. var o = tR("update", t, e, i, n);
  32635. o.duration > 0 && t.animateFrom(r, o)
  32636. }
  32637. }(t, e, r || 0, n, h);
  32638. nR(t, e), u ? t.dirty() : t.markRedraw()
  32639. }
  32640. function nR(t, e) {
  32641. for (var n = QO(t).leaveToProps, i = 0; i < JO.length; i++) {
  32642. var r = JO[i],
  32643. o = r ? e[r] : e;
  32644. o && o.leaveTo && (n || (n = QO(t).leaveToProps = {}), r && (n[r] = n[r] || {}), A(r ? n[r] : n, o.leaveTo))
  32645. }
  32646. }
  32647. function iR(t, e, n, i) {
  32648. if (t) {
  32649. var r = t.parent,
  32650. o = QO(t).leaveToProps;
  32651. if (o) {
  32652. var a = tR("update", t, e, n, 0);
  32653. a.done = function () {
  32654. r.remove(t), i && i()
  32655. }, t.animateTo(o, a)
  32656. } else r.remove(t), i && i()
  32657. }
  32658. }
  32659. function rR(t) {
  32660. return "all" === t
  32661. }
  32662. var oR = {},
  32663. aR = {
  32664. setTransform: function (t, e) {
  32665. return oR.el[t] = e, this
  32666. },
  32667. getTransform: function (t) {
  32668. return oR.el[t]
  32669. },
  32670. setShape: function (t, e) {
  32671. var n = oR.el;
  32672. return (n.shape || (n.shape = {}))[t] = e, n.dirtyShape && n.dirtyShape(), this
  32673. },
  32674. getShape: function (t) {
  32675. var e = oR.el.shape;
  32676. if (e) return e[t]
  32677. },
  32678. setStyle: function (t, e) {
  32679. var n = oR.el,
  32680. i = n.style;
  32681. return i && (i[t] = e, n.dirtyStyle && n.dirtyStyle()), this
  32682. },
  32683. getStyle: function (t) {
  32684. var e = oR.el.style;
  32685. if (e) return e[t]
  32686. },
  32687. setExtra: function (t, e) {
  32688. return (oR.el.extra || (oR.el.extra = {}))[t] = e, this
  32689. },
  32690. getExtra: function (t) {
  32691. var e = oR.el.extra;
  32692. if (e) return e[t]
  32693. }
  32694. };
  32695. function sR() {
  32696. var t = this,
  32697. e = t.el;
  32698. if (e) {
  32699. var n = QO(e).userDuring,
  32700. i = t.userDuring;
  32701. n === i ? (oR.el = e, i(aR)) : t.el = t.userDuring = null
  32702. }
  32703. }
  32704. function lR(t, e, n, i) {
  32705. var r = n[t];
  32706. if (r) {
  32707. var o, a = e[t];
  32708. if (a) {
  32709. var s = n.transition,
  32710. l = r.transition;
  32711. if (l)
  32712. if (!o && (o = i[t] = {}), rR(l)) A(o, a);
  32713. else
  32714. for (var u = bo(l), h = 0; h < u.length; h++) {
  32715. var c = a[d = u[h]];
  32716. o[d] = c
  32717. } else if (rR(s) || P(s, t) >= 0) {
  32718. !o && (o = i[t] = {});
  32719. var p = G(a);
  32720. for (h = 0; h < p.length; h++) {
  32721. var d;
  32722. c = a[d = p[h]];
  32723. hR(r[d], c) && (o[d] = c)
  32724. }
  32725. }
  32726. }
  32727. }
  32728. }
  32729. function uR(t, e, n) {
  32730. var i = e[t];
  32731. if (i)
  32732. for (var r = n[t] = {}, o = G(i), a = 0; a < o.length; a++) {
  32733. var s = o[a];
  32734. r[s] = ki(i[s])
  32735. }
  32736. }
  32737. function hR(t, e) {
  32738. return N(t) ? t !== e : null != t && isFinite(t)
  32739. }
  32740. var cR = Oo(),
  32741. pR = ["percent", "easing", "shape", "style", "extra"];
  32742. function dR(t) {
  32743. t.stopAnimation("keyframe"), t.attr(cR(t))
  32744. }
  32745. function fR(t, e, n) {
  32746. if (n.isAnimationEnabled() && e)
  32747. if (Y(e)) E(e, (function (e) {
  32748. fR(t, e, n)
  32749. }));
  32750. else {
  32751. var i = e.keyframes,
  32752. r = e.duration;
  32753. if (n && null == r) {
  32754. var o = ph("enter", n, 0);
  32755. r = o && o.duration
  32756. }
  32757. if (i && r) {
  32758. var a = cR(t);
  32759. E(JO, (function (n) {
  32760. if (!n || t[n]) {
  32761. var o;
  32762. i.sort((function (t, e) {
  32763. return t.percent - e.percent
  32764. })), E(i, (function (i) {
  32765. var s = t.animators,
  32766. l = n ? i[n] : i;
  32767. if (l) {
  32768. var u = G(l);
  32769. if (n || (u = B(u, (function (t) {
  32770. return P(pR, t) < 0
  32771. }))), u.length) {
  32772. o || ((o = t.animate(n, e.loop, !0)).scope = "keyframe");
  32773. for (var h = 0; h < s.length; h++) s[h] !== o && s[h].targetName === o.targetName && s[h].stopTracks(u);
  32774. n && (a[n] = a[n] || {});
  32775. var c = n ? a[n] : a;
  32776. E(u, (function (e) {
  32777. c[e] = ((n ? t[n] : t) || {})[e]
  32778. })), o.whenWithKeys(r * i.percent, l, u, i.easing)
  32779. }
  32780. }
  32781. })), o && o.delay(e.delay || 0).duration(r).start(e.easing)
  32782. }
  32783. }))
  32784. }
  32785. }
  32786. }
  32787. var gR = "emphasis",
  32788. yR = "normal",
  32789. vR = "blur",
  32790. mR = "select",
  32791. xR = [yR, gR, vR, mR],
  32792. _R = {
  32793. normal: ["itemStyle"],
  32794. emphasis: [gR, "itemStyle"],
  32795. blur: [vR, "itemStyle"],
  32796. select: [mR, "itemStyle"]
  32797. },
  32798. bR = {
  32799. normal: ["label"],
  32800. emphasis: [gR, "label"],
  32801. blur: [vR, "label"],
  32802. select: [mR, "label"]
  32803. },
  32804. wR = ["x", "y"],
  32805. SR = {
  32806. normal: {},
  32807. emphasis: {},
  32808. blur: {},
  32809. select: {}
  32810. },
  32811. MR = {
  32812. cartesian2d: function (t) {
  32813. var e = t.master.getRect();
  32814. return {
  32815. coordSys: {
  32816. type: "cartesian2d",
  32817. x: e.x,
  32818. y: e.y,
  32819. width: e.width,
  32820. height: e.height
  32821. },
  32822. api: {
  32823. coord: function (e) {
  32824. return t.dataToPoint(e)
  32825. },
  32826. size: W(GO, t)
  32827. }
  32828. }
  32829. },
  32830. geo: function (t) {
  32831. var e = t.getBoundingRect();
  32832. return {
  32833. coordSys: {
  32834. type: "geo",
  32835. x: e.x,
  32836. y: e.y,
  32837. width: e.width,
  32838. height: e.height,
  32839. zoom: t.getZoom()
  32840. },
  32841. api: {
  32842. coord: function (e) {
  32843. return t.dataToPoint(e)
  32844. },
  32845. size: W(WO, t)
  32846. }
  32847. }
  32848. },
  32849. single: function (t) {
  32850. var e = t.getRect();
  32851. return {
  32852. coordSys: {
  32853. type: "singleAxis",
  32854. x: e.x,
  32855. y: e.y,
  32856. width: e.width,
  32857. height: e.height
  32858. },
  32859. api: {
  32860. coord: function (e) {
  32861. return t.dataToPoint(e)
  32862. },
  32863. size: W(HO, t)
  32864. }
  32865. }
  32866. },
  32867. polar: function (t) {
  32868. var e = t.getRadiusAxis(),
  32869. n = t.getAngleAxis(),
  32870. i = e.getExtent();
  32871. return i[0] > i[1] && i.reverse(), {
  32872. coordSys: {
  32873. type: "polar",
  32874. cx: t.cx,
  32875. cy: t.cy,
  32876. r: i[1],
  32877. r0: i[0]
  32878. },
  32879. api: {
  32880. coord: function (i) {
  32881. var r = e.dataToRadius(i[0]),
  32882. o = n.dataToAngle(i[1]),
  32883. a = t.coordToPoint([r, o]);
  32884. return a.push(r, o * Math.PI / 180), a
  32885. },
  32886. size: W(YO, t)
  32887. }
  32888. }
  32889. },
  32890. calendar: function (t) {
  32891. var e = t.getRect(),
  32892. n = t.getRangeInfo();
  32893. return {
  32894. coordSys: {
  32895. type: "calendar",
  32896. x: e.x,
  32897. y: e.y,
  32898. width: e.width,
  32899. height: e.height,
  32900. cellWidth: t.getCellWidth(),
  32901. cellHeight: t.getCellHeight(),
  32902. rangeInfo: {
  32903. start: n.start,
  32904. end: n.end,
  32905. weeks: n.weeks,
  32906. dayCount: n.allDay
  32907. }
  32908. },
  32909. api: {
  32910. coord: function (e, n) {
  32911. return t.dataToPoint(e, n)
  32912. }
  32913. }
  32914. }
  32915. }
  32916. };
  32917. function IR(t) {
  32918. return t instanceof Is
  32919. }
  32920. function TR(t) {
  32921. return t instanceof Sa
  32922. }
  32923. var CR = function (t) {
  32924. function e() {
  32925. var n = null !== t && t.apply(this, arguments) || this;
  32926. return n.type = e.type, n
  32927. }
  32928. return n(e, t), e.prototype.render = function (t, e, n, i) {
  32929. this._progressiveEls = null;
  32930. var r = this._data,
  32931. o = t.getData(),
  32932. a = this.group,
  32933. s = PR(t, o, e, n);
  32934. r || a.removeAll(), o.diff(r).add((function (e) {
  32935. RR(n, null, e, s(e, i), t, a, o)
  32936. })).remove((function (e) {
  32937. var n = r.getItemGraphicEl(e);
  32938. n && iR(n, BO(n).option, t)
  32939. })).update((function (e, l) {
  32940. var u = r.getItemGraphicEl(l);
  32941. RR(n, u, e, s(e, i), t, a, o)
  32942. })).execute();
  32943. var l = t.get("clip", !0) ? SS(t.coordinateSystem, !1, t) : null;
  32944. l ? a.setClipPath(l) : a.removeClipPath(), this._data = o
  32945. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  32946. this.group.removeAll(), this._data = null
  32947. }, e.prototype.incrementalRender = function (t, e, n, i, r) {
  32948. var o = e.getData(),
  32949. a = PR(e, o, n, i),
  32950. s = this._progressiveEls = [];
  32951. function l(t) {
  32952. t.isGroup || (t.incremental = !0, t.ensureState("emphasis").hoverLayer = !0)
  32953. }
  32954. for (var u = t.start; u < t.end; u++) {
  32955. var h = RR(null, null, u, a(u, r), e, this.group, o);
  32956. h && (h.traverse(l), s.push(h))
  32957. }
  32958. }, e.prototype.eachRendered = function (t) {
  32959. qh(this._progressiveEls || this.group, t)
  32960. }, e.prototype.filterForExposedEvent = function (t, e, n, i) {
  32961. var r = e.element;
  32962. if (null == r || n.name === r) return !0;
  32963. for (;
  32964. (n = n.__hostTarget || n.parent) && n !== this.group;)
  32965. if (n.name === r) return !0;
  32966. return !1
  32967. }, e.type = "custom", e
  32968. }(kg);
  32969. function DR(t) {
  32970. var e, n = t.type;
  32971. if ("path" === n) {
  32972. var i = t.shape,
  32973. r = null != i.width && null != i.height ? {
  32974. x: i.x || 0,
  32975. y: i.y || 0,
  32976. width: i.width,
  32977. height: i.height
  32978. } : null,
  32979. o = YR(i);
  32980. e = Ah(o, null, r, i.layout || "center"), BO(e).customPathData = o
  32981. } else if ("image" === n) e = new ks({}), BO(e).customImagePath = t.style.image;
  32982. else if ("text" === n) e = new Fs({});
  32983. else if ("group" === n) e = new zr;
  32984. else {
  32985. if ("compoundPath" === n) throw new Error('"compoundPath" is not supported yet.');
  32986. var a = Dh(n);
  32987. if (!a) {
  32988. var s = "";
  32989. 0, vo(s)
  32990. }
  32991. e = new a
  32992. }
  32993. return BO(e).customGraphicType = n, e.name = t.name, e.z2EmphasisLift = 1, e.z2SelectLift = 1, e
  32994. }
  32995. function AR(t, e, n, i, r, o, a) {
  32996. dR(e);
  32997. var s = r && r.normal.cfg;
  32998. s && e.setTextConfig(s), i && null == i.transition && (i.transition = wR);
  32999. var l = i && i.style;
  33000. if (l) {
  33001. if ("text" === e.type) {
  33002. var u = l;
  33003. _t(u, "textFill") && (u.fill = u.textFill), _t(u, "textStroke") && (u.stroke = u.textStroke)
  33004. }
  33005. var h = void 0,
  33006. c = IR(e) ? l.decal : null;
  33007. t && c && (c.dirty = !0, h = gv(c, t)), l.__decalPattern = h
  33008. }
  33009. TR(e) && (l && (h = l.__decalPattern) && (l.decal = h));
  33010. eR(e, i, o, {
  33011. dataIndex: n,
  33012. isInit: a,
  33013. clearStyle: !0
  33014. }), fR(e, i.keyframeAnimation, o)
  33015. }
  33016. function kR(t, e, n, i, r) {
  33017. var o = e.isGroup ? null : e,
  33018. a = r && r[t].cfg;
  33019. if (o) {
  33020. var s = o.ensureState(t);
  33021. if (!1 === i) {
  33022. var l = o.getState(t);
  33023. l && (l.style = null)
  33024. } else s.style = i || null;
  33025. a && (s.textConfig = a), Cl(o)
  33026. }
  33027. }
  33028. function LR(t, e, n) {
  33029. var i = n === yR,
  33030. r = i ? e : VR(e, n),
  33031. o = r ? r.z2 : null;
  33032. null != o && ((i ? t : t.ensureState(n)).z2 = o || 0)
  33033. }
  33034. function PR(t, e, n, i) {
  33035. var r = t.get("renderItem"),
  33036. o = t.coordinateSystem,
  33037. a = {};
  33038. o && (a = o.prepareCustoms ? o.prepareCustoms(o) : MR[o.type](o));
  33039. for (var s, l, u = k({
  33040. getWidth: i.getWidth,
  33041. getHeight: i.getHeight,
  33042. getZr: i.getZr,
  33043. getDevicePixelRatio: i.getDevicePixelRatio,
  33044. value: function (t, n) {
  33045. return null == n && (n = s), e.getStore().get(e.getDimensionIndex(t || 0), n)
  33046. },
  33047. style: function (n, i) {
  33048. 0;
  33049. null == i && (i = s);
  33050. var r = e.getItemVisual(i, "style"),
  33051. o = r && r.fill,
  33052. a = r && r.opacity,
  33053. l = m(i, yR).getItemStyle();
  33054. null != o && (l.fill = o), null != a && (l.opacity = a);
  33055. var u = {
  33056. inheritColor: U(o) ? o : "#000"
  33057. },
  33058. h = x(i, yR),
  33059. c = nc(h, null, u, !1, !0);
  33060. c.text = h.getShallow("show") ? rt(t.getFormattedLabel(i, yR), iS(e, i)) : null;
  33061. var p = ic(h, u, !1);
  33062. return b(n, l), l = jO(l, c, p), n && _(l, n), l.legacy = !0, l
  33063. },
  33064. ordinalRawValue: function (t, n) {
  33065. null == n && (n = s), t = t || 0;
  33066. var i = e.getDimensionInfo(t);
  33067. if (!i) {
  33068. var r = e.getDimensionIndex(t);
  33069. return r >= 0 ? e.getStore().get(r, n) : void 0
  33070. }
  33071. var o = e.get(i.name, n),
  33072. a = i && i.ordinalMeta;
  33073. return a ? a.categories[o] : o
  33074. },
  33075. styleEmphasis: function (n, i) {
  33076. 0;
  33077. null == i && (i = s);
  33078. var r = m(i, gR).getItemStyle(),
  33079. o = x(i, gR),
  33080. a = nc(o, null, null, !0, !0);
  33081. a.text = o.getShallow("show") ? ot(t.getFormattedLabel(i, gR), t.getFormattedLabel(i, yR), iS(e, i)) : null;
  33082. var l = ic(o, null, !0);
  33083. return b(n, r), r = jO(r, a, l), n && _(r, n), r.legacy = !0, r
  33084. },
  33085. visual: function (t, n) {
  33086. if (null == n && (n = s), _t(zO, t)) {
  33087. var i = e.getItemVisual(n, "style");
  33088. return i ? i[zO[t]] : null
  33089. }
  33090. if (_t(VO, t)) return e.getItemVisual(n, t)
  33091. },
  33092. barLayout: function (t) {
  33093. if ("cartesian2d" === o.type) {
  33094. return function (t) {
  33095. var e = [],
  33096. n = t.axis,
  33097. i = "axis0";
  33098. if ("category" === n.type) {
  33099. for (var r = n.getBandWidth(), o = 0; o < t.count; o++) e.push(k({
  33100. bandWidth: r,
  33101. axisKey: i,
  33102. stackId: zx + o
  33103. }, t));
  33104. var a = Wx(e),
  33105. s = [];
  33106. for (o = 0; o < t.count; o++) {
  33107. var l = a[i][zx + o];
  33108. l.offsetCenter = l.offset + l.width / 2, s.push(l)
  33109. }
  33110. return s
  33111. }
  33112. }(k({
  33113. axis: o.getBaseAxis()
  33114. }, t))
  33115. }
  33116. },
  33117. currentSeriesIndices: function () {
  33118. return n.getCurrentSeriesIndices()
  33119. },
  33120. font: function (t) {
  33121. return lc(t, n)
  33122. }
  33123. }, a.api || {}), h = {
  33124. context: {},
  33125. seriesId: t.id,
  33126. seriesName: t.name,
  33127. seriesIndex: t.seriesIndex,
  33128. coordSys: a.coordSys,
  33129. dataInsideLength: e.count(),
  33130. encode: OR(t.getData())
  33131. }, c = {}, p = {}, d = {}, f = {}, g = 0; g < xR.length; g++) {
  33132. var y = xR[g];
  33133. d[y] = t.getModel(_R[y]), f[y] = t.getModel(bR[y])
  33134. }
  33135. function v(t) {
  33136. return t === s ? l || (l = e.getItemModel(t)) : e.getItemModel(t)
  33137. }
  33138. function m(t, n) {
  33139. return e.hasItemOption ? t === s ? c[n] || (c[n] = v(t).getModel(_R[n])) : v(t).getModel(_R[n]) : d[n]
  33140. }
  33141. function x(t, n) {
  33142. return e.hasItemOption ? t === s ? p[n] || (p[n] = v(t).getModel(bR[n])) : v(t).getModel(bR[n]) : f[n]
  33143. }
  33144. return function (t, n) {
  33145. return s = t, l = null, c = {}, p = {}, r && r(k({
  33146. dataIndexInside: t,
  33147. dataIndex: e.getRawIndex(t),
  33148. actionType: n ? n.type : null
  33149. }, h), u)
  33150. };
  33151. function _(t, e) {
  33152. for (var n in e) _t(e, n) && (t[n] = e[n])
  33153. }
  33154. function b(t, e) {
  33155. t && (t.textFill && (e.textFill = t.textFill), t.textPosition && (e.textPosition = t.textPosition))
  33156. }
  33157. }
  33158. function OR(t) {
  33159. var e = {};
  33160. return E(t.dimensions, (function (n) {
  33161. var i = t.getDimensionInfo(n);
  33162. if (!i.isExtraCoord) {
  33163. var r = i.coordDim;
  33164. (e[r] = e[r] || [])[i.coordDimIndex] = t.getDimensionIndex(n)
  33165. }
  33166. })), e
  33167. }
  33168. function RR(t, e, n, i, r, o, a) {
  33169. if (i) {
  33170. var s = NR(t, e, n, i, r, o);
  33171. return s && a.setItemGraphicEl(n, s), s && Yl(s, i.focus, i.blurScope, i.emphasisDisabled), s
  33172. }
  33173. o.remove(e)
  33174. }
  33175. function NR(t, e, n, i, r, o) {
  33176. var a = -1,
  33177. s = e;
  33178. e && ER(e, i, r) && (a = P(o.childrenRef(), e), e = null);
  33179. var l, u, h = !e,
  33180. c = e;
  33181. c ? c.clearStates() : (c = DR(i), s && (l = s, (u = c).copyTransform(l), TR(u) && TR(l) && (u.setStyle(l.style), u.z = l.z, u.z2 = l.z2, u.zlevel = l.zlevel, u.invisible = l.invisible, u.ignore = l.ignore, IR(u) && IR(l) && u.setShape(l.shape)))), !1 === i.morph ? c.disableMorphing = !0 : c.disableMorphing && (c.disableMorphing = !1), SR.normal.cfg = SR.normal.conOpt = SR.emphasis.cfg = SR.emphasis.conOpt = SR.blur.cfg = SR.blur.conOpt = SR.select.cfg = SR.select.conOpt = null, SR.isLegacy = !1,
  33182. function (t, e, n, i, r, o) {
  33183. if (t.isGroup) return;
  33184. zR(n, null, o), zR(n, gR, o);
  33185. var a = o.normal.conOpt,
  33186. s = o.emphasis.conOpt,
  33187. l = o.blur.conOpt,
  33188. u = o.select.conOpt;
  33189. if (null != a || null != s || null != u || null != l) {
  33190. var h = t.getTextContent();
  33191. if (!1 === a) h && t.removeTextContent();
  33192. else {
  33193. a = o.normal.conOpt = a || {
  33194. type: "text"
  33195. }, h ? h.clearStates() : (h = DR(a), t.setTextContent(h)), AR(null, h, e, a, null, i, r);
  33196. for (var c = a && a.style, p = 0; p < xR.length; p++) {
  33197. var d = xR[p];
  33198. if (d !== yR) {
  33199. var f = o[d].conOpt;
  33200. kR(d, h, 0, BR(a, f, d), null)
  33201. }
  33202. }
  33203. c ? h.dirty() : h.markRedraw()
  33204. }
  33205. }
  33206. }(c, n, i, r, h, SR),
  33207. function (t, e, n, i, r) {
  33208. var o = n.clipPath;
  33209. if (!1 === o) t && t.getClipPath() && t.removeClipPath();
  33210. else if (o) {
  33211. var a = t.getClipPath();
  33212. a && ER(a, o, i) && (a = null), a || (a = DR(o), t.setClipPath(a)), AR(null, a, e, o, null, i, r)
  33213. }
  33214. }(c, n, i, r, h), AR(t, c, n, i, SR, r, h), _t(i, "info") && (BO(c).info = i.info);
  33215. for (var p = 0; p < xR.length; p++) {
  33216. var d = xR[p];
  33217. if (d !== yR) {
  33218. var f = VR(i, d);
  33219. kR(d, c, 0, BR(i, f, d), SR)
  33220. }
  33221. }
  33222. return function (t, e, n) {
  33223. if (!t.isGroup) {
  33224. var i = t,
  33225. r = n.currentZ,
  33226. o = n.currentZLevel;
  33227. i.z = r, i.zlevel = o;
  33228. var a = e.z2;
  33229. null != a && (i.z2 = a || 0);
  33230. for (var s = 0; s < xR.length; s++) LR(i, e, xR[s])
  33231. }
  33232. }(c, i, r), "group" === i.type && function (t, e, n, i, r) {
  33233. var o = i.children,
  33234. a = o ? o.length : 0,
  33235. s = i.$mergeChildren,
  33236. l = "byName" === s || i.diffChildrenByName,
  33237. u = !1 === s;
  33238. if (!a && !l && !u) return;
  33239. if (l) return h = {
  33240. api: t,
  33241. oldChildren: e.children() || [],
  33242. newChildren: o || [],
  33243. dataIndex: n,
  33244. seriesModel: r,
  33245. group: e
  33246. }, void new Vm(h.oldChildren, h.newChildren, GR, GR, h).add(WR).update(WR).remove(HR).execute();
  33247. var h;
  33248. u && e.removeAll();
  33249. for (var c = 0; c < a; c++) {
  33250. var p = o[c],
  33251. d = e.childAt(c);
  33252. p ? (null == p.ignore && (p.ignore = !1), NR(t, d, n, p, r, e)) : d.ignore = !0
  33253. }
  33254. for (var f = e.childCount() - 1; f >= c; f--) {
  33255. var g = e.childAt(f);
  33256. FR(e, g, r)
  33257. }
  33258. }(t, c, n, i, r), a >= 0 ? o.replaceAt(c, a) : o.add(c), c
  33259. }
  33260. function ER(t, e, n) {
  33261. var i, r = BO(t),
  33262. o = e.type,
  33263. a = e.shape,
  33264. s = e.style;
  33265. return n.isUniversalTransitionEnabled() || null != o && o !== r.customGraphicType || "path" === o && ((i = a) && (_t(i, "pathData") || _t(i, "d"))) && YR(a) !== r.customPathData || "image" === o && _t(s, "image") && s.image !== r.customImagePath
  33266. }
  33267. function zR(t, e, n) {
  33268. var i = e ? VR(t, e) : t,
  33269. r = e ? BR(t, i, gR) : t.style,
  33270. o = t.type,
  33271. a = i ? i.textConfig : null,
  33272. s = t.textContent,
  33273. l = s ? e ? VR(s, e) : s : null;
  33274. if (r && (n.isLegacy || XO(r, o, !!a, !!l))) {
  33275. n.isLegacy = !0;
  33276. var u = UO(r, o, !e);
  33277. !a && u.textConfig && (a = u.textConfig), !l && u.textContent && (l = u.textContent)
  33278. }
  33279. if (!e && l) {
  33280. var h = l;
  33281. !h.type && (h.type = "text")
  33282. }
  33283. var c = e ? n[e] : n.normal;
  33284. c.cfg = a, c.conOpt = l
  33285. }
  33286. function VR(t, e) {
  33287. return e ? t ? t[e] : null : t
  33288. }
  33289. function BR(t, e, n) {
  33290. var i = e && e.style;
  33291. return null == i && n === gR && t && (i = t.styleEmphasis), i
  33292. }
  33293. function FR(t, e, n) {
  33294. e && iR(e, BO(t).option, n)
  33295. }
  33296. function GR(t, e) {
  33297. var n = t && t.name;
  33298. return null != n ? n : "e\0\0" + e
  33299. }
  33300. function WR(t, e) {
  33301. var n = this.context,
  33302. i = null != t ? n.newChildren[t] : null,
  33303. r = null != e ? n.oldChildren[e] : null;
  33304. NR(n.api, r, n.dataIndex, i, n.seriesModel, n.group)
  33305. }
  33306. function HR(t) {
  33307. var e = this.context,
  33308. n = e.oldChildren[t];
  33309. n && iR(n, BO(n).option, e.seriesModel)
  33310. }
  33311. function YR(t) {
  33312. return t && (t.pathData || t.d)
  33313. }
  33314. var XR = Oo(),
  33315. UR = T,
  33316. ZR = W,
  33317. jR = function () {
  33318. function t() {
  33319. this._dragging = !1, this.animationThreshold = 15
  33320. }
  33321. return t.prototype.render = function (t, e, n, i) {
  33322. var r = e.get("value"),
  33323. o = e.get("status");
  33324. if (this._axisModel = t, this._axisPointerModel = e, this._api = n, i || this._lastValue !== r || this._lastStatus !== o) {
  33325. this._lastValue = r, this._lastStatus = o;
  33326. var a = this._group,
  33327. s = this._handle;
  33328. if (!o || "hide" === o) return a && a.hide(), void(s && s.hide());
  33329. a && a.show(), s && s.show();
  33330. var l = {};
  33331. this.makeElOption(l, r, t, e, n);
  33332. var u = l.graphicKey;
  33333. u !== this._lastGraphicKey && this.clear(n), this._lastGraphicKey = u;
  33334. var h = this._moveAnimation = this.determineAnimation(t, e);
  33335. if (a) {
  33336. var c = H(qR, e, h);
  33337. this.updatePointerEl(a, l, c), this.updateLabelEl(a, l, c, e)
  33338. } else a = this._group = new zr, this.createPointerEl(a, l, t, e), this.createLabelEl(a, l, t, e), n.getZr().add(a);
  33339. QR(a, e, !0), this._renderHandle(r)
  33340. }
  33341. }, t.prototype.remove = function (t) {
  33342. this.clear(t)
  33343. }, t.prototype.dispose = function (t) {
  33344. this.clear(t)
  33345. }, t.prototype.determineAnimation = function (t, e) {
  33346. var n = e.get("animation"),
  33347. i = t.axis,
  33348. r = "category" === i.type,
  33349. o = e.get("snap");
  33350. if (!o && !r) return !1;
  33351. if ("auto" === n || null == n) {
  33352. var a = this.animationThreshold;
  33353. if (r && i.getBandWidth() > a) return !0;
  33354. if (o) {
  33355. var s = pI(t).seriesDataCount,
  33356. l = i.getExtent();
  33357. return Math.abs(l[0] - l[1]) / s > a
  33358. }
  33359. return !1
  33360. }
  33361. return !0 === n
  33362. }, t.prototype.makeElOption = function (t, e, n, i, r) {}, t.prototype.createPointerEl = function (t, e, n, i) {
  33363. var r = e.pointer;
  33364. if (r) {
  33365. var o = XR(t).pointerEl = new Kh[r.type](UR(e.pointer));
  33366. t.add(o)
  33367. }
  33368. }, t.prototype.createLabelEl = function (t, e, n, i) {
  33369. if (e.label) {
  33370. var r = XR(t).labelEl = new Fs(UR(e.label));
  33371. t.add(r), $R(r, i)
  33372. }
  33373. }, t.prototype.updatePointerEl = function (t, e, n) {
  33374. var i = XR(t).pointerEl;
  33375. i && e.pointer && (i.setStyle(e.pointer.style), n(i, {
  33376. shape: e.pointer.shape
  33377. }))
  33378. }, t.prototype.updateLabelEl = function (t, e, n, i) {
  33379. var r = XR(t).labelEl;
  33380. r && (r.setStyle(e.label.style), n(r, {
  33381. x: e.label.x,
  33382. y: e.label.y
  33383. }), $R(r, i))
  33384. }, t.prototype._renderHandle = function (t) {
  33385. if (!this._dragging && this.updateHandleTransform) {
  33386. var e, n = this._axisPointerModel,
  33387. i = this._api.getZr(),
  33388. r = this._handle,
  33389. o = n.getModel("handle"),
  33390. a = n.get("status");
  33391. if (!o.get("show") || !a || "hide" === a) return r && i.remove(r), void(this._handle = null);
  33392. this._handle || (e = !0, r = this._handle = Hh(o.get("icon"), {
  33393. cursor: "move",
  33394. draggable: !0,
  33395. onmousemove: function (t) {
  33396. de(t.event)
  33397. },
  33398. onmousedown: ZR(this._onHandleDragMove, this, 0, 0),
  33399. drift: ZR(this._onHandleDragMove, this),
  33400. ondragend: ZR(this._onHandleDragEnd, this)
  33401. }), i.add(r)), QR(r, n, !1), r.setStyle(o.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
  33402. var s = o.get("size");
  33403. Y(s) || (s = [s, s]), r.scaleX = s[0] / 2, r.scaleY = s[1] / 2, Fg(this, "_doDispatchAxisPointer", o.get("throttle") || 0, "fixRate"), this._moveHandleToValue(t, e)
  33404. }
  33405. }, t.prototype._moveHandleToValue = function (t, e) {
  33406. qR(this._axisPointerModel, !e && this._moveAnimation, this._handle, JR(this.getHandleTransform(t, this._axisModel, this._axisPointerModel)))
  33407. }, t.prototype._onHandleDragMove = function (t, e) {
  33408. var n = this._handle;
  33409. if (n) {
  33410. this._dragging = !0;
  33411. var i = this.updateHandleTransform(JR(n), [t, e], this._axisModel, this._axisPointerModel);
  33412. this._payloadInfo = i, n.stopAnimation(), n.attr(JR(i)), XR(n).lastProp = null, this._doDispatchAxisPointer()
  33413. }
  33414. }, t.prototype._doDispatchAxisPointer = function () {
  33415. if (this._handle) {
  33416. var t = this._payloadInfo,
  33417. e = this._axisModel;
  33418. this._api.dispatchAction({
  33419. type: "updateAxisPointer",
  33420. x: t.cursorPoint[0],
  33421. y: t.cursorPoint[1],
  33422. tooltipOption: t.tooltipOption,
  33423. axesInfo: [{
  33424. axisDim: e.axis.dim,
  33425. axisIndex: e.componentIndex
  33426. }]
  33427. })
  33428. }
  33429. }, t.prototype._onHandleDragEnd = function () {
  33430. if (this._dragging = !1, this._handle) {
  33431. var t = this._axisPointerModel.get("value");
  33432. this._moveHandleToValue(t), this._api.dispatchAction({
  33433. type: "hideTip"
  33434. })
  33435. }
  33436. }, t.prototype.clear = function (t) {
  33437. this._lastValue = null, this._lastStatus = null;
  33438. var e = t.getZr(),
  33439. n = this._group,
  33440. i = this._handle;
  33441. e && n && (this._lastGraphicKey = null, n && e.remove(n), i && e.remove(i), this._group = null, this._handle = null, this._payloadInfo = null), Gg(this, "_doDispatchAxisPointer")
  33442. }, t.prototype.doClear = function () {}, t.prototype.buildLabel = function (t, e, n) {
  33443. return {
  33444. x: t[n = n || 0],
  33445. y: t[1 - n],
  33446. width: e[n],
  33447. height: e[1 - n]
  33448. }
  33449. }, t
  33450. }();
  33451. function qR(t, e, n, i) {
  33452. KR(XR(n).lastProp, i) || (XR(n).lastProp = i, e ? fh(n, i, t) : (n.stopAnimation(), n.attr(i)))
  33453. }
  33454. function KR(t, e) {
  33455. if (q(t) && q(e)) {
  33456. var n = !0;
  33457. return E(e, (function (e, i) {
  33458. n = n && KR(t[i], e)
  33459. })), !!n
  33460. }
  33461. return t === e
  33462. }
  33463. function $R(t, e) {
  33464. t[e.get(["label", "show"]) ? "show" : "hide"]()
  33465. }
  33466. function JR(t) {
  33467. return {
  33468. x: t.x || 0,
  33469. y: t.y || 0,
  33470. rotation: t.rotation || 0
  33471. }
  33472. }
  33473. function QR(t, e, n) {
  33474. var i = e.get("z"),
  33475. r = e.get("zlevel");
  33476. t && t.traverse((function (t) {
  33477. "group" !== t.type && (null != i && (t.z = i), null != r && (t.zlevel = r), t.silent = n)
  33478. }))
  33479. }
  33480. function tN(t) {
  33481. var e, n = t.get("type"),
  33482. i = t.getModel(n + "Style");
  33483. return "line" === n ? (e = i.getLineStyle()).fill = null : "shadow" === n && ((e = i.getAreaStyle()).stroke = null), e
  33484. }
  33485. function eN(t, e, n, i, r) {
  33486. var o = nN(n.get("value"), e.axis, e.ecModel, n.get("seriesDataIndices"), {
  33487. precision: n.get(["label", "precision"]),
  33488. formatter: n.get(["label", "formatter"])
  33489. }),
  33490. a = n.getModel("label"),
  33491. s = fp(a.get("padding") || 0),
  33492. l = a.getFont(),
  33493. u = br(o, l),
  33494. h = r.position,
  33495. c = u.width + s[1] + s[3],
  33496. p = u.height + s[0] + s[2],
  33497. d = r.align;
  33498. "right" === d && (h[0] -= c), "center" === d && (h[0] -= c / 2);
  33499. var f = r.verticalAlign;
  33500. "bottom" === f && (h[1] -= p), "middle" === f && (h[1] -= p / 2),
  33501. function (t, e, n, i) {
  33502. var r = i.getWidth(),
  33503. o = i.getHeight();
  33504. t[0] = Math.min(t[0] + e, r) - e, t[1] = Math.min(t[1] + n, o) - n, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0)
  33505. }(h, c, p, i);
  33506. var g = a.get("backgroundColor");
  33507. g && "auto" !== g || (g = e.get(["axisLine", "lineStyle", "color"])), t.label = {
  33508. x: h[0],
  33509. y: h[1],
  33510. style: nc(a, {
  33511. text: o,
  33512. font: l,
  33513. fill: a.getTextColor(),
  33514. padding: s,
  33515. backgroundColor: g
  33516. }),
  33517. z2: 10
  33518. }
  33519. }
  33520. function nN(t, e, n, i, r) {
  33521. t = e.scale.parse(t);
  33522. var o = e.scale.getLabel({
  33523. value: t
  33524. }, {
  33525. precision: r.precision
  33526. }),
  33527. a = r.formatter;
  33528. if (a) {
  33529. var s = {
  33530. value: __(e, {
  33531. value: t
  33532. }),
  33533. axisDimension: e.dim,
  33534. axisIndex: e.index,
  33535. seriesData: []
  33536. };
  33537. E(i, (function (t) {
  33538. var e = n.getSeriesByIndex(t.seriesIndex),
  33539. i = t.dataIndexInside,
  33540. r = e && e.getDataParams(i);
  33541. r && s.seriesData.push(r)
  33542. })), U(a) ? o = a.replace("{value}", o) : X(a) && (o = a(s))
  33543. }
  33544. return o
  33545. }
  33546. function iN(t, e, n) {
  33547. var i = [1, 0, 0, 1, 0, 0];
  33548. return Se(i, i, n.rotation), we(i, i, n.position), zh([t.dataToCoord(e), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], i)
  33549. }
  33550. function rN(t, e, n, i, r, o) {
  33551. var a = iI.innerTextLayout(n.rotation, 0, n.labelDirection);
  33552. n.labelMargin = r.get(["label", "margin"]), eN(e, i, r, o, {
  33553. position: iN(i.axis, t, n),
  33554. align: a.textAlign,
  33555. verticalAlign: a.textVerticalAlign
  33556. })
  33557. }
  33558. function oN(t, e, n) {
  33559. return {
  33560. x1: t[n = n || 0],
  33561. y1: t[1 - n],
  33562. x2: e[n],
  33563. y2: e[1 - n]
  33564. }
  33565. }
  33566. function aN(t, e, n) {
  33567. return {
  33568. x: t[n = n || 0],
  33569. y: t[1 - n],
  33570. width: e[n],
  33571. height: e[1 - n]
  33572. }
  33573. }
  33574. function sN(t, e, n, i, r, o) {
  33575. return {
  33576. cx: t,
  33577. cy: e,
  33578. r0: n,
  33579. r: i,
  33580. startAngle: r,
  33581. endAngle: o,
  33582. clockwise: !0
  33583. }
  33584. }
  33585. var lN = function (t) {
  33586. function e() {
  33587. return null !== t && t.apply(this, arguments) || this
  33588. }
  33589. return n(e, t), e.prototype.makeElOption = function (t, e, n, i, r) {
  33590. var o = n.axis,
  33591. a = o.grid,
  33592. s = i.get("type"),
  33593. l = uN(a, o).getOtherAxis(o).getGlobalExtent(),
  33594. u = o.toGlobalCoord(o.dataToCoord(e, !0));
  33595. if (s && "none" !== s) {
  33596. var h = tN(i),
  33597. c = hN[s](o, u, l);
  33598. c.style = h, t.graphicKey = c.type, t.pointer = c
  33599. }
  33600. rN(e, t, ZM(a.model, n), n, i, r)
  33601. }, e.prototype.getHandleTransform = function (t, e, n) {
  33602. var i = ZM(e.axis.grid.model, e, {
  33603. labelInside: !1
  33604. });
  33605. i.labelMargin = n.get(["handle", "margin"]);
  33606. var r = iN(e.axis, t, i);
  33607. return {
  33608. x: r[0],
  33609. y: r[1],
  33610. rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
  33611. }
  33612. }, e.prototype.updateHandleTransform = function (t, e, n, i) {
  33613. var r = n.axis,
  33614. o = r.grid,
  33615. a = r.getGlobalExtent(!0),
  33616. s = uN(o, r).getOtherAxis(r).getGlobalExtent(),
  33617. l = "x" === r.dim ? 0 : 1,
  33618. u = [t.x, t.y];
  33619. u[l] += e[l], u[l] = Math.min(a[1], u[l]), u[l] = Math.max(a[0], u[l]);
  33620. var h = (s[1] + s[0]) / 2,
  33621. c = [h, h];
  33622. c[l] = u[l];
  33623. return {
  33624. x: u[0],
  33625. y: u[1],
  33626. rotation: t.rotation,
  33627. cursorPoint: c,
  33628. tooltipOption: [{
  33629. verticalAlign: "middle"
  33630. }, {
  33631. align: "center"
  33632. }][l]
  33633. }
  33634. }, e
  33635. }(jR);
  33636. function uN(t, e) {
  33637. var n = {};
  33638. return n[e.dim + "AxisIndex"] = e.index, t.getCartesian(n)
  33639. }
  33640. var hN = {
  33641. line: function (t, e, n) {
  33642. return {
  33643. type: "Line",
  33644. subPixelOptimize: !0,
  33645. shape: oN([e, n[0]], [e, n[1]], cN(t))
  33646. }
  33647. },
  33648. shadow: function (t, e, n) {
  33649. var i = Math.max(1, t.getBandWidth()),
  33650. r = n[1] - n[0];
  33651. return {
  33652. type: "Rect",
  33653. shape: aN([e - i / 2, n[0]], [i, r], cN(t))
  33654. }
  33655. }
  33656. };
  33657. function cN(t) {
  33658. return "x" === t.dim ? 0 : 1
  33659. }
  33660. var pN = function (t) {
  33661. function e() {
  33662. var n = null !== t && t.apply(this, arguments) || this;
  33663. return n.type = e.type, n
  33664. }
  33665. return n(e, t), e.type = "axisPointer", e.defaultOption = {
  33666. show: "auto",
  33667. z: 50,
  33668. type: "line",
  33669. snap: !1,
  33670. triggerTooltip: !0,
  33671. value: null,
  33672. status: null,
  33673. link: [],
  33674. animation: null,
  33675. animationDurationUpdate: 200,
  33676. lineStyle: {
  33677. color: "#B9BEC9",
  33678. width: 1,
  33679. type: "dashed"
  33680. },
  33681. shadowStyle: {
  33682. color: "rgba(210,219,238,0.2)"
  33683. },
  33684. label: {
  33685. show: !0,
  33686. formatter: null,
  33687. precision: "auto",
  33688. margin: 3,
  33689. color: "#fff",
  33690. padding: [5, 7, 5, 7],
  33691. backgroundColor: "auto",
  33692. borderColor: null,
  33693. borderWidth: 0,
  33694. borderRadius: 3
  33695. },
  33696. handle: {
  33697. show: !1,
  33698. 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",
  33699. size: 45,
  33700. margin: 50,
  33701. color: "#333",
  33702. shadowBlur: 3,
  33703. shadowColor: "#aaa",
  33704. shadowOffsetX: 0,
  33705. shadowOffsetY: 2,
  33706. throttle: 40
  33707. }
  33708. }, e
  33709. }(Rp),
  33710. dN = Oo(),
  33711. fN = E;
  33712. function gN(t, e, n) {
  33713. if (!r.node) {
  33714. var i = e.getZr();
  33715. dN(i).records || (dN(i).records = {}),
  33716. function (t, e) {
  33717. if (dN(t).initialized) return;
  33718. function n(n, i) {
  33719. t.on(n, (function (n) {
  33720. var r = function (t) {
  33721. var e = {
  33722. showTip: [],
  33723. hideTip: []
  33724. },
  33725. n = function (i) {
  33726. var r = e[i.type];
  33727. r ? r.push(i) : (i.dispatchAction = n, t.dispatchAction(i))
  33728. };
  33729. return {
  33730. dispatchAction: n,
  33731. pendings: e
  33732. }
  33733. }(e);
  33734. fN(dN(t).records, (function (t) {
  33735. t && i(t, n, r.dispatchAction)
  33736. })),
  33737. function (t, e) {
  33738. var n, i = t.showTip.length,
  33739. r = t.hideTip.length;
  33740. i ? n = t.showTip[i - 1] : r && (n = t.hideTip[r - 1]);
  33741. n && (n.dispatchAction = null, e.dispatchAction(n))
  33742. }(r.pendings, e)
  33743. }))
  33744. }
  33745. dN(t).initialized = !0, n("click", H(vN, "click")), n("mousemove", H(vN, "mousemove")), n("globalout", yN)
  33746. }(i, e), (dN(i).records[t] || (dN(i).records[t] = {})).handler = n
  33747. }
  33748. }
  33749. function yN(t, e, n) {
  33750. t.handler("leave", null, n)
  33751. }
  33752. function vN(t, e, n, i) {
  33753. e.handler(t, n, i)
  33754. }
  33755. function mN(t, e) {
  33756. if (!r.node) {
  33757. var n = e.getZr();
  33758. (dN(n).records || {})[t] && (dN(n).records[t] = null)
  33759. }
  33760. }
  33761. var xN = function (t) {
  33762. function e() {
  33763. var n = null !== t && t.apply(this, arguments) || this;
  33764. return n.type = e.type, n
  33765. }
  33766. return n(e, t), e.prototype.render = function (t, e, n) {
  33767. var i = e.getComponent("tooltip"),
  33768. r = t.get("triggerOn") || i && i.get("triggerOn") || "mousemove|click";
  33769. gN("axisPointer", n, (function (t, e, n) {
  33770. "none" !== r && ("leave" === t || r.indexOf(t) >= 0) && n({
  33771. type: "updateAxisPointer",
  33772. currTrigger: t,
  33773. x: e && e.offsetX,
  33774. y: e && e.offsetY
  33775. })
  33776. }))
  33777. }, e.prototype.remove = function (t, e) {
  33778. mN("axisPointer", e)
  33779. }, e.prototype.dispose = function (t, e) {
  33780. mN("axisPointer", e)
  33781. }, e.type = "axisPointer", e
  33782. }(Tg);
  33783. function _N(t, e) {
  33784. var n, i = [],
  33785. r = t.seriesIndex;
  33786. if (null == r || !(n = e.getSeriesByIndex(r))) return {
  33787. point: []
  33788. };
  33789. var o = n.getData(),
  33790. a = Po(o, t);
  33791. if (null == a || a < 0 || Y(a)) return {
  33792. point: []
  33793. };
  33794. var s = o.getItemGraphicEl(a),
  33795. l = n.coordinateSystem;
  33796. if (n.getTooltipPosition) i = n.getTooltipPosition(a) || [];
  33797. else if (l && l.dataToPoint)
  33798. if (t.isStacked) {
  33799. var u = l.getBaseAxis(),
  33800. h = l.getOtherAxis(u).dim,
  33801. c = u.dim,
  33802. p = "x" === h || "radius" === h ? 1 : 0,
  33803. d = o.mapDimension(c),
  33804. f = [];
  33805. f[p] = o.get(d, a), f[1 - p] = o.get(o.getCalculationInfo("stackResultDimension"), a), i = l.dataToPoint(f) || []
  33806. } else i = l.dataToPoint(o.getValues(z(l.dimensions, (function (t) {
  33807. return o.mapDimension(t)
  33808. })), a)) || [];
  33809. else if (s) {
  33810. var g = s.getBoundingRect().clone();
  33811. g.applyTransform(s.transform), i = [g.x + g.width / 2, g.y + g.height / 2]
  33812. }
  33813. return {
  33814. point: i,
  33815. el: s
  33816. }
  33817. }
  33818. var bN = Oo();
  33819. function wN(t, e, n) {
  33820. var i = t.currTrigger,
  33821. r = [t.x, t.y],
  33822. o = t,
  33823. a = t.dispatchAction || W(n.dispatchAction, n),
  33824. s = e.getComponent("axisPointer").coordSysAxesInfo;
  33825. if (s) {
  33826. CN(r) && (r = _N({
  33827. seriesIndex: o.seriesIndex,
  33828. dataIndex: o.dataIndex
  33829. }, e).point);
  33830. var l = CN(r),
  33831. u = o.axesInfo,
  33832. h = s.axesInfo,
  33833. c = "leave" === i || CN(r),
  33834. p = {},
  33835. d = {},
  33836. f = {
  33837. list: [],
  33838. map: {}
  33839. },
  33840. g = {
  33841. showPointer: H(MN, d),
  33842. showTooltip: H(IN, f)
  33843. };
  33844. E(s.coordSysMap, (function (t, e) {
  33845. var n = l || t.containPoint(r);
  33846. E(s.coordSysAxesInfo[e], (function (t, e) {
  33847. var i = t.axis,
  33848. o = function (t, e) {
  33849. for (var n = 0; n < (t || []).length; n++) {
  33850. var i = t[n];
  33851. if (e.axis.dim === i.axisDim && e.axis.model.componentIndex === i.axisIndex) return i
  33852. }
  33853. }(u, t);
  33854. if (!c && n && (!u || o)) {
  33855. var a = o && o.value;
  33856. null != a || l || (a = i.pointToData(r)), null != a && SN(t, a, g, !1, p)
  33857. }
  33858. }))
  33859. }));
  33860. var y = {};
  33861. return E(h, (function (t, e) {
  33862. var n = t.linkGroup;
  33863. n && !d[e] && E(n.axesInfo, (function (e, i) {
  33864. var r = d[i];
  33865. if (e !== t && r) {
  33866. var o = r.value;
  33867. n.mapper && (o = t.axis.scale.parse(n.mapper(o, TN(e), TN(t)))), y[t.key] = o
  33868. }
  33869. }))
  33870. })), E(y, (function (t, e) {
  33871. SN(h[e], t, g, !0, p)
  33872. })),
  33873. function (t, e, n) {
  33874. var i = n.axesInfo = [];
  33875. E(e, (function (e, n) {
  33876. var r = e.axisPointerModel.option,
  33877. o = t[n];
  33878. o ? (!e.useHandle && (r.status = "show"), r.value = o.value, r.seriesDataIndices = (o.payloadBatch || []).slice()) : !e.useHandle && (r.status = "hide"), "show" === r.status && i.push({
  33879. axisDim: e.axis.dim,
  33880. axisIndex: e.axis.model.componentIndex,
  33881. value: r.value
  33882. })
  33883. }))
  33884. }(d, h, p),
  33885. function (t, e, n, i) {
  33886. if (CN(e) || !t.list.length) return void i({
  33887. type: "hideTip"
  33888. });
  33889. var r = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  33890. i({
  33891. type: "showTip",
  33892. escapeConnect: !0,
  33893. x: e[0],
  33894. y: e[1],
  33895. tooltipOption: n.tooltipOption,
  33896. position: n.position,
  33897. dataIndexInside: r.dataIndexInside,
  33898. dataIndex: r.dataIndex,
  33899. seriesIndex: r.seriesIndex,
  33900. dataByCoordSys: t.list
  33901. })
  33902. }(f, r, t, a),
  33903. function (t, e, n) {
  33904. var i = n.getZr(),
  33905. r = "axisPointerLastHighlights",
  33906. o = bN(i)[r] || {},
  33907. a = bN(i)[r] = {};
  33908. E(t, (function (t, e) {
  33909. var n = t.axisPointerModel.option;
  33910. "show" === n.status && E(n.seriesDataIndices, (function (t) {
  33911. var e = t.seriesIndex + " | " + t.dataIndex;
  33912. a[e] = t
  33913. }))
  33914. }));
  33915. var s = [],
  33916. l = [];
  33917. E(o, (function (t, e) {
  33918. !a[e] && l.push(t)
  33919. })), E(a, (function (t, e) {
  33920. !o[e] && s.push(t)
  33921. })), l.length && n.dispatchAction({
  33922. type: "downplay",
  33923. escapeConnect: !0,
  33924. notBlur: !0,
  33925. batch: l
  33926. }), s.length && n.dispatchAction({
  33927. type: "highlight",
  33928. escapeConnect: !0,
  33929. notBlur: !0,
  33930. batch: s
  33931. })
  33932. }(h, 0, n), p
  33933. }
  33934. }
  33935. function SN(t, e, n, i, r) {
  33936. var o = t.axis;
  33937. if (!o.scale.isBlank() && o.containData(e))
  33938. if (t.involveSeries) {
  33939. var a = function (t, e) {
  33940. var n = e.axis,
  33941. i = n.dim,
  33942. r = t,
  33943. o = [],
  33944. a = Number.MAX_VALUE,
  33945. s = -1;
  33946. return E(e.seriesModels, (function (e, l) {
  33947. var u, h, c = e.getData().mapDimensionsAll(i);
  33948. if (e.getAxisTooltipData) {
  33949. var p = e.getAxisTooltipData(c, t, n);
  33950. h = p.dataIndices, u = p.nestestValue
  33951. } else {
  33952. if (!(h = e.getData().indicesOfNearest(c[0], t, "category" === n.type ? .5 : null)).length) return;
  33953. u = e.getData().get(c[0], h[0])
  33954. }
  33955. if (null != u && isFinite(u)) {
  33956. var d = t - u,
  33957. f = Math.abs(d);
  33958. f <= a && ((f < a || d >= 0 && s < 0) && (a = f, s = d, r = u, o.length = 0), E(h, (function (t) {
  33959. o.push({
  33960. seriesIndex: e.seriesIndex,
  33961. dataIndexInside: t,
  33962. dataIndex: e.getData().getRawIndex(t)
  33963. })
  33964. })))
  33965. }
  33966. })), {
  33967. payloadBatch: o,
  33968. snapToValue: r
  33969. }
  33970. }(e, t),
  33971. s = a.payloadBatch,
  33972. l = a.snapToValue;
  33973. s[0] && null == r.seriesIndex && A(r, s[0]), !i && t.snap && o.containData(l) && null != l && (e = l), n.showPointer(t, e, s), n.showTooltip(t, a, l)
  33974. } else n.showPointer(t, e)
  33975. }
  33976. function MN(t, e, n, i) {
  33977. t[e.key] = {
  33978. value: n,
  33979. payloadBatch: i
  33980. }
  33981. }
  33982. function IN(t, e, n, i) {
  33983. var r = n.payloadBatch,
  33984. o = e.axis,
  33985. a = o.model,
  33986. s = e.axisPointerModel;
  33987. if (e.triggerTooltip && r.length) {
  33988. var l = e.coordSys.model,
  33989. u = fI(l),
  33990. h = t.map[u];
  33991. h || (h = t.map[u] = {
  33992. coordSysId: l.id,
  33993. coordSysIndex: l.componentIndex,
  33994. coordSysType: l.type,
  33995. coordSysMainType: l.mainType,
  33996. dataByAxis: []
  33997. }, t.list.push(h)), h.dataByAxis.push({
  33998. axisDim: o.dim,
  33999. axisIndex: a.componentIndex,
  34000. axisType: a.type,
  34001. axisId: a.id,
  34002. value: i,
  34003. valueLabelOpt: {
  34004. precision: s.get(["label", "precision"]),
  34005. formatter: s.get(["label", "formatter"])
  34006. },
  34007. seriesDataIndices: r.slice()
  34008. })
  34009. }
  34010. }
  34011. function TN(t) {
  34012. var e = t.axis.model,
  34013. n = {},
  34014. i = n.axisDim = t.axis.dim;
  34015. return n.axisIndex = n[i + "AxisIndex"] = e.componentIndex, n.axisName = n[i + "AxisName"] = e.name, n.axisId = n[i + "AxisId"] = e.id, n
  34016. }
  34017. function CN(t) {
  34018. return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1])
  34019. }
  34020. function DN(t) {
  34021. yI.registerAxisPointerClass("CartesianAxisPointer", lN), t.registerComponentModel(pN), t.registerComponentView(xN), t.registerPreprocessor((function (t) {
  34022. if (t) {
  34023. (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {});
  34024. var e = t.axisPointer.link;
  34025. e && !Y(e) && (t.axisPointer.link = [e])
  34026. }
  34027. })), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, (function (t, e) {
  34028. t.getComponent("axisPointer").coordSysAxesInfo = uI(t, e)
  34029. })), t.registerAction({
  34030. type: "updateAxisPointer",
  34031. event: "updateAxisPointer",
  34032. update: ":updateAxisPointer"
  34033. }, wN)
  34034. }
  34035. var AN = function (t) {
  34036. function e() {
  34037. return null !== t && t.apply(this, arguments) || this
  34038. }
  34039. return n(e, t), e.prototype.makeElOption = function (t, e, n, i, r) {
  34040. var o = n.axis;
  34041. "angle" === o.dim && (this.animationThreshold = Math.PI / 18);
  34042. var a = o.polar,
  34043. s = a.getOtherAxis(o).getExtent(),
  34044. l = o.dataToCoord(e),
  34045. u = i.get("type");
  34046. if (u && "none" !== u) {
  34047. var h = tN(i),
  34048. c = kN[u](o, a, l, s);
  34049. c.style = h, t.graphicKey = c.type, t.pointer = c
  34050. }
  34051. var p = function (t, e, n, i, r) {
  34052. var o = e.axis,
  34053. a = o.dataToCoord(t),
  34054. s = i.getAngleAxis().getExtent()[0];
  34055. s = s / 180 * Math.PI;
  34056. var l, u, h, c = i.getRadiusAxis().getExtent();
  34057. if ("radius" === o.dim) {
  34058. var p = [1, 0, 0, 1, 0, 0];
  34059. Se(p, p, s), we(p, p, [i.cx, i.cy]), l = zh([a, -r], p);
  34060. var d = e.getModel("axisLabel").get("rotate") || 0,
  34061. f = iI.innerTextLayout(s, d * Math.PI / 180, -1);
  34062. u = f.textAlign, h = f.textVerticalAlign
  34063. } else {
  34064. var g = c[1];
  34065. l = i.coordToPoint([g + r, a]);
  34066. var y = i.cx,
  34067. v = i.cy;
  34068. u = Math.abs(l[0] - y) / g < .3 ? "center" : l[0] > y ? "left" : "right", h = Math.abs(l[1] - v) / g < .3 ? "middle" : l[1] > v ? "top" : "bottom"
  34069. }
  34070. return {
  34071. position: l,
  34072. align: u,
  34073. verticalAlign: h
  34074. }
  34075. }(e, n, 0, a, i.get(["label", "margin"]));
  34076. eN(t, n, i, r, p)
  34077. }, e
  34078. }(jR);
  34079. var kN = {
  34080. line: function (t, e, n, i) {
  34081. return "angle" === t.dim ? {
  34082. type: "Line",
  34083. shape: oN(e.coordToPoint([i[0], n]), e.coordToPoint([i[1], n]))
  34084. } : {
  34085. type: "Circle",
  34086. shape: {
  34087. cx: e.cx,
  34088. cy: e.cy,
  34089. r: n
  34090. }
  34091. }
  34092. },
  34093. shadow: function (t, e, n, i) {
  34094. var r = Math.max(1, t.getBandWidth()),
  34095. o = Math.PI / 180;
  34096. return "angle" === t.dim ? {
  34097. type: "Sector",
  34098. shape: sN(e.cx, e.cy, i[0], i[1], (-n - r / 2) * o, (r / 2 - n) * o)
  34099. } : {
  34100. type: "Sector",
  34101. shape: sN(e.cx, e.cy, n - r / 2, n + r / 2, 0, 2 * Math.PI)
  34102. }
  34103. }
  34104. },
  34105. LN = function (t) {
  34106. function e() {
  34107. var n = null !== t && t.apply(this, arguments) || this;
  34108. return n.type = e.type, n
  34109. }
  34110. return n(e, t), e.prototype.findAxisModel = function (t) {
  34111. var e;
  34112. return this.ecModel.eachComponent(t, (function (t) {
  34113. t.getCoordSysModel() === this && (e = t)
  34114. }), this), e
  34115. }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
  34116. z: 0,
  34117. center: ["50%", "50%"],
  34118. radius: "80%"
  34119. }, e
  34120. }(Rp),
  34121. PN = function (t) {
  34122. function e() {
  34123. return null !== t && t.apply(this, arguments) || this
  34124. }
  34125. return n(e, t), e.prototype.getCoordSysModel = function () {
  34126. return this.getReferringComponents("polar", zo).models[0]
  34127. }, e.type = "polarAxis", e
  34128. }(Rp);
  34129. R(PN, I_);
  34130. var ON = function (t) {
  34131. function e() {
  34132. var n = null !== t && t.apply(this, arguments) || this;
  34133. return n.type = e.type, n
  34134. }
  34135. return n(e, t), e.type = "angleAxis", e
  34136. }(PN),
  34137. RN = function (t) {
  34138. function e() {
  34139. var n = null !== t && t.apply(this, arguments) || this;
  34140. return n.type = e.type, n
  34141. }
  34142. return n(e, t), e.type = "radiusAxis", e
  34143. }(PN),
  34144. NN = function (t) {
  34145. function e(e, n) {
  34146. return t.call(this, "radius", e, n) || this
  34147. }
  34148. return n(e, t), e.prototype.pointToData = function (t, e) {
  34149. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  34150. }, e
  34151. }(nb);
  34152. NN.prototype.dataToRadius = nb.prototype.dataToCoord, NN.prototype.radiusToData = nb.prototype.coordToData;
  34153. var EN = Oo(),
  34154. zN = function (t) {
  34155. function e(e, n) {
  34156. return t.call(this, "angle", e, n || [0, 360]) || this
  34157. }
  34158. return n(e, t), e.prototype.pointToData = function (t, e) {
  34159. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  34160. }, e.prototype.calculateCategoryInterval = function () {
  34161. var t = this,
  34162. e = t.getLabelModel(),
  34163. n = t.scale,
  34164. i = n.getExtent(),
  34165. r = n.count();
  34166. if (i[1] - i[0] < 1) return 0;
  34167. var o = i[0],
  34168. a = t.dataToCoord(o + 1) - t.dataToCoord(o),
  34169. s = Math.abs(a),
  34170. l = br(null == o ? "" : o + "", e.getFont(), "center", "top"),
  34171. u = Math.max(l.height, 7) / s;
  34172. isNaN(u) && (u = 1 / 0);
  34173. var h = Math.max(0, Math.floor(u)),
  34174. c = EN(t.model),
  34175. p = c.lastAutoInterval,
  34176. d = c.lastTickCount;
  34177. return null != p && null != d && Math.abs(p - h) <= 1 && Math.abs(d - r) <= 1 && p > h ? h = p : (c.lastTickCount = r, c.lastAutoInterval = h), h
  34178. }, e
  34179. }(nb);
  34180. zN.prototype.dataToAngle = nb.prototype.dataToCoord, zN.prototype.angleToData = nb.prototype.coordToData;
  34181. var VN = ["radius", "angle"],
  34182. BN = function () {
  34183. function t(t) {
  34184. this.dimensions = VN, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new NN, this._angleAxis = new zN, this.axisPointerEnabled = !0, this.name = t || "", this._radiusAxis.polar = this._angleAxis.polar = this
  34185. }
  34186. return t.prototype.containPoint = function (t) {
  34187. var e = this.pointToCoord(t);
  34188. return this._radiusAxis.contain(e[0]) && this._angleAxis.contain(e[1])
  34189. }, t.prototype.containData = function (t) {
  34190. return this._radiusAxis.containData(t[0]) && this._angleAxis.containData(t[1])
  34191. }, t.prototype.getAxis = function (t) {
  34192. return this["_" + t + "Axis"]
  34193. }, t.prototype.getAxes = function () {
  34194. return [this._radiusAxis, this._angleAxis]
  34195. }, t.prototype.getAxesByScale = function (t) {
  34196. var e = [],
  34197. n = this._angleAxis,
  34198. i = this._radiusAxis;
  34199. return n.scale.type === t && e.push(n), i.scale.type === t && e.push(i), e
  34200. }, t.prototype.getAngleAxis = function () {
  34201. return this._angleAxis
  34202. }, t.prototype.getRadiusAxis = function () {
  34203. return this._radiusAxis
  34204. }, t.prototype.getOtherAxis = function (t) {
  34205. var e = this._angleAxis;
  34206. return t === e ? this._radiusAxis : e
  34207. }, t.prototype.getBaseAxis = function () {
  34208. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis()
  34209. }, t.prototype.getTooltipAxes = function (t) {
  34210. var e = null != t && "auto" !== t ? this.getAxis(t) : this.getBaseAxis();
  34211. return {
  34212. baseAxes: [e],
  34213. otherAxes: [this.getOtherAxis(e)]
  34214. }
  34215. }, t.prototype.dataToPoint = function (t, e) {
  34216. return this.coordToPoint([this._radiusAxis.dataToRadius(t[0], e), this._angleAxis.dataToAngle(t[1], e)])
  34217. }, t.prototype.pointToData = function (t, e) {
  34218. var n = this.pointToCoord(t);
  34219. return [this._radiusAxis.radiusToData(n[0], e), this._angleAxis.angleToData(n[1], e)]
  34220. }, t.prototype.pointToCoord = function (t) {
  34221. var e = t[0] - this.cx,
  34222. n = t[1] - this.cy,
  34223. i = this.getAngleAxis(),
  34224. r = i.getExtent(),
  34225. o = Math.min(r[0], r[1]),
  34226. a = Math.max(r[0], r[1]);
  34227. i.inverse ? o = a - 360 : a = o + 360;
  34228. var s = Math.sqrt(e * e + n * n);
  34229. e /= s, n /= s;
  34230. for (var l = Math.atan2(-n, e) / Math.PI * 180, u = l < o ? 1 : -1; l < o || l > a;) l += 360 * u;
  34231. return [s, l]
  34232. }, t.prototype.coordToPoint = function (t) {
  34233. var e = t[0],
  34234. n = t[1] / 180 * Math.PI;
  34235. return [Math.cos(n) * e + this.cx, -Math.sin(n) * e + this.cy]
  34236. }, t.prototype.getArea = function () {
  34237. var t = this.getAngleAxis(),
  34238. e = this.getRadiusAxis().getExtent().slice();
  34239. e[0] > e[1] && e.reverse();
  34240. var n = t.getExtent(),
  34241. i = Math.PI / 180;
  34242. return {
  34243. cx: this.cx,
  34244. cy: this.cy,
  34245. r0: e[0],
  34246. r: e[1],
  34247. startAngle: -n[0] * i,
  34248. endAngle: -n[1] * i,
  34249. clockwise: t.inverse,
  34250. contain: function (t, e) {
  34251. var n = t - this.cx,
  34252. i = e - this.cy,
  34253. r = n * n + i * i - 1e-4,
  34254. o = this.r,
  34255. a = this.r0;
  34256. return r <= o * o && r >= a * a
  34257. }
  34258. }
  34259. }, t.prototype.convertToPixel = function (t, e, n) {
  34260. return FN(e) === this ? this.dataToPoint(n) : null
  34261. }, t.prototype.convertFromPixel = function (t, e, n) {
  34262. return FN(e) === this ? this.pointToData(n) : null
  34263. }, t
  34264. }();
  34265. function FN(t) {
  34266. var e = t.seriesModel,
  34267. n = t.polarModel;
  34268. return n && n.coordinateSystem || e && e.coordinateSystem
  34269. }
  34270. function GN(t, e) {
  34271. var n = this,
  34272. i = n.getAngleAxis(),
  34273. r = n.getRadiusAxis();
  34274. if (i.scale.setExtent(1 / 0, -1 / 0), r.scale.setExtent(1 / 0, -1 / 0), t.eachSeries((function (t) {
  34275. if (t.coordinateSystem === n) {
  34276. var e = t.getData();
  34277. E(M_(e, "radius"), (function (t) {
  34278. r.scale.unionExtentFromData(e, t)
  34279. })), E(M_(e, "angle"), (function (t) {
  34280. i.scale.unionExtentFromData(e, t)
  34281. }))
  34282. }
  34283. })), v_(i.scale, i.model), v_(r.scale, r.model), "category" === i.type && !i.onBand) {
  34284. var o = i.getExtent(),
  34285. a = 360 / i.scale.count();
  34286. i.inverse ? o[1] += a : o[1] -= a, i.setExtent(o[0], o[1])
  34287. }
  34288. }
  34289. function WN(t, e) {
  34290. if (t.type = e.get("type"), t.scale = m_(e), t.onBand = e.get("boundaryGap") && "category" === t.type, t.inverse = e.get("inverse"), function (t) {
  34291. return "angleAxis" === t.mainType
  34292. }(e)) {
  34293. t.inverse = t.inverse !== e.get("clockwise");
  34294. var n = e.get("startAngle");
  34295. t.setExtent(n, n + (t.inverse ? -360 : 360))
  34296. }
  34297. e.axis = t, t.model = e
  34298. }
  34299. var HN = {
  34300. dimensions: VN,
  34301. create: function (t, e) {
  34302. var n = [];
  34303. return t.eachComponent("polar", (function (t, i) {
  34304. var r = new BN(i + "");
  34305. r.update = GN;
  34306. var o = r.getRadiusAxis(),
  34307. a = r.getAngleAxis(),
  34308. s = t.findAxisModel("radiusAxis"),
  34309. l = t.findAxisModel("angleAxis");
  34310. WN(o, s), WN(a, l),
  34311. function (t, e, n) {
  34312. var i = e.get("center"),
  34313. r = n.getWidth(),
  34314. o = n.getHeight();
  34315. t.cx = Ur(i[0], r), t.cy = Ur(i[1], o);
  34316. var a = t.getRadiusAxis(),
  34317. s = Math.min(r, o) / 2,
  34318. l = e.get("radius");
  34319. null == l ? l = [0, "100%"] : Y(l) || (l = [0, l]);
  34320. var u = [Ur(l[0], s), Ur(l[1], s)];
  34321. a.inverse ? a.setExtent(u[1], u[0]) : a.setExtent(u[0], u[1])
  34322. }(r, t, e), n.push(r), t.coordinateSystem = r, r.model = t
  34323. })), t.eachSeries((function (t) {
  34324. if ("polar" === t.get("coordinateSystem")) {
  34325. var e = t.getReferringComponents("polar", zo).models[0];
  34326. 0, t.coordinateSystem = e.coordinateSystem
  34327. }
  34328. })), n
  34329. }
  34330. },
  34331. YN = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
  34332. function XN(t, e, n) {
  34333. e[1] > e[0] && (e = e.slice().reverse());
  34334. var i = t.coordToPoint([e[0], n]),
  34335. r = t.coordToPoint([e[1], n]);
  34336. return {
  34337. x1: i[0],
  34338. y1: i[1],
  34339. x2: r[0],
  34340. y2: r[1]
  34341. }
  34342. }
  34343. function UN(t) {
  34344. return t.getRadiusAxis().inverse ? 0 : 1
  34345. }
  34346. function ZN(t) {
  34347. var e = t[0],
  34348. n = t[t.length - 1];
  34349. e && n && Math.abs(Math.abs(e.coord - n.coord) - 360) < 1e-4 && t.pop()
  34350. }
  34351. var jN = function (t) {
  34352. function e() {
  34353. var n = null !== t && t.apply(this, arguments) || this;
  34354. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n
  34355. }
  34356. return n(e, t), e.prototype.render = function (t, e) {
  34357. if (this.group.removeAll(), t.get("show")) {
  34358. var n = t.axis,
  34359. i = n.polar,
  34360. r = i.getRadiusAxis().getExtent(),
  34361. o = n.getTicksCoords(),
  34362. a = n.getMinorTicksCoords(),
  34363. s = z(n.getViewLabels(), (function (t) {
  34364. t = T(t);
  34365. var e = n.scale,
  34366. i = "ordinal" === e.type ? e.getRawOrdinalNumber(t.tickValue) : t.tickValue;
  34367. return t.coord = n.dataToCoord(i), t
  34368. }));
  34369. ZN(s), ZN(o), E(YN, (function (e) {
  34370. !t.get([e, "show"]) || n.scale.isBlank() && "axisLine" !== e || qN[e](this.group, t, i, o, a, r, s)
  34371. }), this)
  34372. }
  34373. }, e.type = "angleAxis", e
  34374. }(yI),
  34375. qN = {
  34376. axisLine: function (t, e, n, i, r, o) {
  34377. var a, s = e.getModel(["axisLine", "lineStyle"]),
  34378. l = UN(n),
  34379. u = l ? 0 : 1;
  34380. (a = 0 === o[u] ? new _u({
  34381. shape: {
  34382. cx: n.cx,
  34383. cy: n.cy,
  34384. r: o[l]
  34385. },
  34386. style: s.getLineStyle(),
  34387. z2: 1,
  34388. silent: !0
  34389. }) : new Bu({
  34390. shape: {
  34391. cx: n.cx,
  34392. cy: n.cy,
  34393. r: o[l],
  34394. r0: o[u]
  34395. },
  34396. style: s.getLineStyle(),
  34397. z2: 1,
  34398. silent: !0
  34399. })).style.fill = null, t.add(a)
  34400. },
  34401. axisTick: function (t, e, n, i, r, o) {
  34402. var a = e.getModel("axisTick"),
  34403. s = (a.get("inside") ? -1 : 1) * a.get("length"),
  34404. l = o[UN(n)],
  34405. u = z(i, (function (t) {
  34406. return new Zu({
  34407. shape: XN(n, [l, l + s], t.coord)
  34408. })
  34409. }));
  34410. t.add(Ph(u, {
  34411. style: k(a.getModel("lineStyle").getLineStyle(), {
  34412. stroke: e.get(["axisLine", "lineStyle", "color"])
  34413. })
  34414. }))
  34415. },
  34416. minorTick: function (t, e, n, i, r, o) {
  34417. if (r.length) {
  34418. for (var a = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (a.get("inside") ? -1 : 1) * s.get("length"), u = o[UN(n)], h = [], c = 0; c < r.length; c++)
  34419. for (var p = 0; p < r[c].length; p++) h.push(new Zu({
  34420. shape: XN(n, [u, u + l], r[c][p].coord)
  34421. }));
  34422. t.add(Ph(h, {
  34423. style: k(s.getModel("lineStyle").getLineStyle(), k(a.getLineStyle(), {
  34424. stroke: e.get(["axisLine", "lineStyle", "color"])
  34425. }))
  34426. }))
  34427. }
  34428. },
  34429. axisLabel: function (t, e, n, i, r, o, a) {
  34430. var s = e.getCategories(!0),
  34431. l = e.getModel("axisLabel"),
  34432. u = l.get("margin"),
  34433. h = e.get("triggerEvent");
  34434. E(a, (function (i, r) {
  34435. var a = l,
  34436. c = i.tickValue,
  34437. p = o[UN(n)],
  34438. d = n.coordToPoint([p + u, i.coord]),
  34439. f = n.cx,
  34440. g = n.cy,
  34441. y = Math.abs(d[0] - f) / p < .3 ? "center" : d[0] > f ? "left" : "right",
  34442. v = Math.abs(d[1] - g) / p < .3 ? "middle" : d[1] > g ? "top" : "bottom";
  34443. if (s && s[c]) {
  34444. var m = s[c];
  34445. q(m) && m.textStyle && (a = new Mc(m.textStyle, l, l.ecModel))
  34446. }
  34447. var x = new Fs({
  34448. silent: iI.isLabelSilent(e),
  34449. style: nc(a, {
  34450. x: d[0],
  34451. y: d[1],
  34452. fill: a.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  34453. text: i.formattedLabel,
  34454. align: y,
  34455. verticalAlign: v
  34456. })
  34457. });
  34458. if (t.add(x), h) {
  34459. var _ = iI.makeAxisEventDataBase(e);
  34460. _.targetType = "axisLabel", _.value = i.rawLabel, Qs(x).eventData = _
  34461. }
  34462. }), this)
  34463. },
  34464. splitLine: function (t, e, n, i, r, o) {
  34465. var a = e.getModel("splitLine").getModel("lineStyle"),
  34466. s = a.get("color"),
  34467. l = 0;
  34468. s = s instanceof Array ? s : [s];
  34469. for (var u = [], h = 0; h < i.length; h++) {
  34470. var c = l++ % s.length;
  34471. u[c] = u[c] || [], u[c].push(new Zu({
  34472. shape: XN(n, o, i[h].coord)
  34473. }))
  34474. }
  34475. for (h = 0; h < u.length; h++) t.add(Ph(u[h], {
  34476. style: k({
  34477. stroke: s[h % s.length]
  34478. }, a.getLineStyle()),
  34479. silent: !0,
  34480. z: e.get("z")
  34481. }))
  34482. },
  34483. minorSplitLine: function (t, e, n, i, r, o) {
  34484. if (r.length) {
  34485. for (var a = e.getModel("minorSplitLine").getModel("lineStyle"), s = [], l = 0; l < r.length; l++)
  34486. for (var u = 0; u < r[l].length; u++) s.push(new Zu({
  34487. shape: XN(n, o, r[l][u].coord)
  34488. }));
  34489. t.add(Ph(s, {
  34490. style: a.getLineStyle(),
  34491. silent: !0,
  34492. z: e.get("z")
  34493. }))
  34494. }
  34495. },
  34496. splitArea: function (t, e, n, i, r, o) {
  34497. if (i.length) {
  34498. var a = e.getModel("splitArea").getModel("areaStyle"),
  34499. s = a.get("color"),
  34500. l = 0;
  34501. s = s instanceof Array ? s : [s];
  34502. for (var u = [], h = Math.PI / 180, c = -i[0].coord * h, p = Math.min(o[0], o[1]), d = Math.max(o[0], o[1]), f = e.get("clockwise"), g = 1, y = i.length; g <= y; g++) {
  34503. var v = g === y ? i[0].coord : i[g].coord,
  34504. m = l++ % s.length;
  34505. u[m] = u[m] || [], u[m].push(new zu({
  34506. shape: {
  34507. cx: n.cx,
  34508. cy: n.cy,
  34509. r0: p,
  34510. r: d,
  34511. startAngle: c,
  34512. endAngle: -v * h,
  34513. clockwise: f
  34514. },
  34515. silent: !0
  34516. })), c = -v * h
  34517. }
  34518. for (g = 0; g < u.length; g++) t.add(Ph(u[g], {
  34519. style: k({
  34520. fill: s[g % s.length]
  34521. }, a.getAreaStyle()),
  34522. silent: !0
  34523. }))
  34524. }
  34525. }
  34526. },
  34527. KN = ["axisLine", "axisTickLabel", "axisName"],
  34528. $N = ["splitLine", "splitArea", "minorSplitLine"],
  34529. JN = function (t) {
  34530. function e() {
  34531. var n = null !== t && t.apply(this, arguments) || this;
  34532. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n
  34533. }
  34534. return n(e, t), e.prototype.render = function (t, e) {
  34535. if (this.group.removeAll(), t.get("show")) {
  34536. var n = this._axisGroup,
  34537. i = this._axisGroup = new zr;
  34538. this.group.add(i);
  34539. var r = t.axis,
  34540. o = r.polar,
  34541. a = o.getAngleAxis(),
  34542. s = r.getTicksCoords(),
  34543. l = r.getMinorTicksCoords(),
  34544. u = a.getExtent()[0],
  34545. h = r.getExtent(),
  34546. c = function (t, e, n) {
  34547. return {
  34548. position: [t.cx, t.cy],
  34549. rotation: n / 180 * Math.PI,
  34550. labelDirection: -1,
  34551. tickDirection: -1,
  34552. nameDirection: 1,
  34553. labelRotate: e.getModel("axisLabel").get("rotate"),
  34554. z2: 1
  34555. }
  34556. }(o, t, u),
  34557. p = new iI(t, c);
  34558. E(KN, p.add, p), i.add(p.getGroup()), Fh(n, i, t), E($N, (function (e) {
  34559. t.get([e, "show"]) && !r.scale.isBlank() && QN[e](this.group, t, o, u, h, s, l)
  34560. }), this)
  34561. }
  34562. }, e.type = "radiusAxis", e
  34563. }(yI),
  34564. QN = {
  34565. splitLine: function (t, e, n, i, r, o) {
  34566. var a = e.getModel("splitLine").getModel("lineStyle"),
  34567. s = a.get("color"),
  34568. l = 0;
  34569. s = s instanceof Array ? s : [s];
  34570. for (var u = [], h = 0; h < o.length; h++) {
  34571. var c = l++ % s.length;
  34572. u[c] = u[c] || [], u[c].push(new _u({
  34573. shape: {
  34574. cx: n.cx,
  34575. cy: n.cy,
  34576. r: Math.max(o[h].coord, 0)
  34577. }
  34578. }))
  34579. }
  34580. for (h = 0; h < u.length; h++) t.add(Ph(u[h], {
  34581. style: k({
  34582. stroke: s[h % s.length],
  34583. fill: null
  34584. }, a.getLineStyle()),
  34585. silent: !0
  34586. }))
  34587. },
  34588. minorSplitLine: function (t, e, n, i, r, o, a) {
  34589. if (a.length) {
  34590. for (var s = e.getModel("minorSplitLine").getModel("lineStyle"), l = [], u = 0; u < a.length; u++)
  34591. for (var h = 0; h < a[u].length; h++) l.push(new _u({
  34592. shape: {
  34593. cx: n.cx,
  34594. cy: n.cy,
  34595. r: a[u][h].coord
  34596. }
  34597. }));
  34598. t.add(Ph(l, {
  34599. style: k({
  34600. fill: null
  34601. }, s.getLineStyle()),
  34602. silent: !0
  34603. }))
  34604. }
  34605. },
  34606. splitArea: function (t, e, n, i, r, o) {
  34607. if (o.length) {
  34608. var a = e.getModel("splitArea").getModel("areaStyle"),
  34609. s = a.get("color"),
  34610. l = 0;
  34611. s = s instanceof Array ? s : [s];
  34612. for (var u = [], h = o[0].coord, c = 1; c < o.length; c++) {
  34613. var p = l++ % s.length;
  34614. u[p] = u[p] || [], u[p].push(new zu({
  34615. shape: {
  34616. cx: n.cx,
  34617. cy: n.cy,
  34618. r0: h,
  34619. r: o[c].coord,
  34620. startAngle: 0,
  34621. endAngle: 2 * Math.PI
  34622. },
  34623. silent: !0
  34624. })), h = o[c].coord
  34625. }
  34626. for (c = 0; c < u.length; c++) t.add(Ph(u[c], {
  34627. style: k({
  34628. fill: s[c % s.length]
  34629. }, a.getAreaStyle()),
  34630. silent: !0
  34631. }))
  34632. }
  34633. }
  34634. };
  34635. function tE(t) {
  34636. return t.get("stack") || "__ec_stack_" + t.seriesIndex
  34637. }
  34638. function eE(t, e) {
  34639. return e.dim + t.model.componentIndex
  34640. }
  34641. function nE(t, e, n) {
  34642. var i = {},
  34643. r = function (t) {
  34644. var e = {};
  34645. E(t, (function (t, n) {
  34646. var i = t.getData(),
  34647. r = t.coordinateSystem,
  34648. o = r.getBaseAxis(),
  34649. a = eE(r, o),
  34650. s = o.getExtent(),
  34651. l = "category" === o.type ? o.getBandWidth() : Math.abs(s[1] - s[0]) / i.count(),
  34652. u = e[a] || {
  34653. bandWidth: l,
  34654. remainedWidth: l,
  34655. autoWidthCount: 0,
  34656. categoryGap: "20%",
  34657. gap: "30%",
  34658. stacks: {}
  34659. },
  34660. h = u.stacks;
  34661. e[a] = u;
  34662. var c = tE(t);
  34663. h[c] || u.autoWidthCount++, h[c] = h[c] || {
  34664. width: 0,
  34665. maxWidth: 0
  34666. };
  34667. var p = Ur(t.get("barWidth"), l),
  34668. d = Ur(t.get("barMaxWidth"), l),
  34669. f = t.get("barGap"),
  34670. g = t.get("barCategoryGap");
  34671. p && !h[c].width && (p = Math.min(u.remainedWidth, p), h[c].width = p, u.remainedWidth -= p), d && (h[c].maxWidth = d), null != f && (u.gap = f), null != g && (u.categoryGap = g)
  34672. }));
  34673. var n = {};
  34674. return E(e, (function (t, e) {
  34675. n[e] = {};
  34676. var i = t.stacks,
  34677. r = t.bandWidth,
  34678. o = Ur(t.categoryGap, r),
  34679. a = Ur(t.gap, 1),
  34680. s = t.remainedWidth,
  34681. l = t.autoWidthCount,
  34682. u = (s - o) / (l + (l - 1) * a);
  34683. u = Math.max(u, 0), E(i, (function (t, e) {
  34684. var n = t.maxWidth;
  34685. n && n < u && (n = Math.min(n, s), t.width && (n = Math.min(n, t.width)), s -= n, t.width = n, l--)
  34686. })), u = (s - o) / (l + (l - 1) * a), u = Math.max(u, 0);
  34687. var h, c = 0;
  34688. E(i, (function (t, e) {
  34689. t.width || (t.width = u), h = t, c += t.width * (1 + a)
  34690. })), h && (c -= h.width * a);
  34691. var p = -c / 2;
  34692. E(i, (function (t, i) {
  34693. n[e][i] = n[e][i] || {
  34694. offset: p,
  34695. width: t.width
  34696. }, p += t.width * (1 + a)
  34697. }))
  34698. })), n
  34699. }(B(e.getSeriesByType(t), (function (t) {
  34700. return !e.isSeriesFiltered(t) && t.coordinateSystem && "polar" === t.coordinateSystem.type
  34701. })));
  34702. e.eachSeriesByType(t, (function (t) {
  34703. if ("polar" === t.coordinateSystem.type) {
  34704. var e = t.getData(),
  34705. n = t.coordinateSystem,
  34706. o = n.getBaseAxis(),
  34707. a = eE(n, o),
  34708. s = tE(t),
  34709. l = r[a][s],
  34710. u = l.offset,
  34711. h = l.width,
  34712. c = n.getOtherAxis(o),
  34713. p = t.coordinateSystem.cx,
  34714. d = t.coordinateSystem.cy,
  34715. f = t.get("barMinHeight") || 0,
  34716. g = t.get("barMinAngle") || 0;
  34717. i[s] = i[s] || [];
  34718. for (var y = e.mapDimension(c.dim), v = e.mapDimension(o.dim), m = gx(e, y), x = "radius" !== o.dim || !t.get("roundCap", !0), _ = c.dataToCoord(0), b = 0, w = e.count(); b < w; b++) {
  34719. var S = e.get(y, b),
  34720. M = e.get(v, b),
  34721. I = S >= 0 ? "p" : "n",
  34722. T = _;
  34723. m && (i[s][M] || (i[s][M] = {
  34724. p: _,
  34725. n: _
  34726. }), T = i[s][M][I]);
  34727. var C = void 0,
  34728. D = void 0,
  34729. A = void 0,
  34730. k = void 0;
  34731. if ("radius" === c.dim) {
  34732. var L = c.dataToCoord(S) - _,
  34733. P = o.dataToCoord(M);
  34734. Math.abs(L) < f && (L = (L < 0 ? -1 : 1) * f), C = T, D = T + L, k = (A = P - u) - h, m && (i[s][M][I] = D)
  34735. } else {
  34736. var O = c.dataToCoord(S, x) - _,
  34737. R = o.dataToCoord(M);
  34738. Math.abs(O) < g && (O = (O < 0 ? -1 : 1) * g), D = (C = R + u) + h, A = T, k = T + O, m && (i[s][M][I] = k)
  34739. }
  34740. e.setItemLayout(b, {
  34741. cx: p,
  34742. cy: d,
  34743. r0: C,
  34744. r: D,
  34745. startAngle: -A * Math.PI / 180,
  34746. endAngle: -k * Math.PI / 180,
  34747. clockwise: A >= k
  34748. })
  34749. }
  34750. }
  34751. }))
  34752. }
  34753. var iE = {
  34754. startAngle: 90,
  34755. clockwise: !0,
  34756. splitNumber: 12,
  34757. axisLabel: {
  34758. rotate: 0
  34759. }
  34760. },
  34761. rE = {
  34762. splitNumber: 5
  34763. },
  34764. oE = function (t) {
  34765. function e() {
  34766. var n = null !== t && t.apply(this, arguments) || this;
  34767. return n.type = e.type, n
  34768. }
  34769. return n(e, t), e.type = "polar", e
  34770. }(Tg);
  34771. function aE(t, e) {
  34772. e = e || {};
  34773. var n = t.coordinateSystem,
  34774. i = t.axis,
  34775. r = {},
  34776. o = i.position,
  34777. a = i.orient,
  34778. s = n.getRect(),
  34779. l = [s.x, s.x + s.width, s.y, s.y + s.height],
  34780. u = {
  34781. horizontal: {
  34782. top: l[2],
  34783. bottom: l[3]
  34784. },
  34785. vertical: {
  34786. left: l[0],
  34787. right: l[1]
  34788. }
  34789. };
  34790. r.position = ["vertical" === a ? u.vertical[o] : l[0], "horizontal" === a ? u.horizontal[o] : l[3]];
  34791. r.rotation = Math.PI / 2 * {
  34792. horizontal: 0,
  34793. vertical: 1
  34794. } [a];
  34795. r.labelDirection = r.tickDirection = r.nameDirection = {
  34796. top: -1,
  34797. bottom: 1,
  34798. right: 1,
  34799. left: -1
  34800. } [o], t.get(["axisTick", "inside"]) && (r.tickDirection = -r.tickDirection), it(e.labelInside, t.get(["axisLabel", "inside"])) && (r.labelDirection = -r.labelDirection);
  34801. var h = e.rotate;
  34802. return null == h && (h = t.get(["axisLabel", "rotate"])), r.labelRotation = "top" === o ? -h : h, r.z2 = 1, r
  34803. }
  34804. var sE = ["axisLine", "axisTickLabel", "axisName"],
  34805. lE = ["splitArea", "splitLine"],
  34806. uE = function (t) {
  34807. function e() {
  34808. var n = null !== t && t.apply(this, arguments) || this;
  34809. return n.type = e.type, n.axisPointerClass = "SingleAxisPointer", n
  34810. }
  34811. return n(e, t), e.prototype.render = function (e, n, i, r) {
  34812. var o = this.group;
  34813. o.removeAll();
  34814. var a = this._axisGroup;
  34815. this._axisGroup = new zr;
  34816. var s = aE(e),
  34817. l = new iI(e, s);
  34818. E(sE, l.add, l), o.add(this._axisGroup), o.add(l.getGroup()), E(lE, (function (t) {
  34819. e.get([t, "show"]) && hE[t](this, this.group, this._axisGroup, e)
  34820. }), this), Fh(a, this._axisGroup, e), t.prototype.render.call(this, e, n, i, r)
  34821. }, e.prototype.remove = function () {
  34822. xI(this)
  34823. }, e.type = "singleAxis", e
  34824. }(yI),
  34825. hE = {
  34826. splitLine: function (t, e, n, i) {
  34827. var r = i.axis;
  34828. if (!r.scale.isBlank()) {
  34829. var o = i.getModel("splitLine"),
  34830. a = o.getModel("lineStyle"),
  34831. s = a.get("color");
  34832. s = s instanceof Array ? s : [s];
  34833. for (var l = a.get("width"), u = i.coordinateSystem.getRect(), h = r.isHorizontal(), c = [], p = 0, d = r.getTicksCoords({
  34834. tickModel: o
  34835. }), f = [], g = [], y = 0; y < d.length; ++y) {
  34836. var v = r.toGlobalCoord(d[y].coord);
  34837. h ? (f[0] = v, f[1] = u.y, g[0] = v, g[1] = u.y + u.height) : (f[0] = u.x, f[1] = v, g[0] = u.x + u.width, g[1] = v);
  34838. var m = new Zu({
  34839. shape: {
  34840. x1: f[0],
  34841. y1: f[1],
  34842. x2: g[0],
  34843. y2: g[1]
  34844. },
  34845. silent: !0
  34846. });
  34847. Rh(m.shape, l);
  34848. var x = p++ % s.length;
  34849. c[x] = c[x] || [], c[x].push(m)
  34850. }
  34851. var _ = a.getLineStyle(["color"]);
  34852. for (y = 0; y < c.length; ++y) e.add(Ph(c[y], {
  34853. style: k({
  34854. stroke: s[y % s.length]
  34855. }, _),
  34856. silent: !0
  34857. }))
  34858. }
  34859. },
  34860. splitArea: function (t, e, n, i) {
  34861. mI(t, n, i, i)
  34862. }
  34863. },
  34864. cE = function (t) {
  34865. function e() {
  34866. var n = null !== t && t.apply(this, arguments) || this;
  34867. return n.type = e.type, n
  34868. }
  34869. return n(e, t), e.prototype.getCoordSysModel = function () {
  34870. return this
  34871. }, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = {
  34872. left: "5%",
  34873. top: "5%",
  34874. right: "5%",
  34875. bottom: "5%",
  34876. type: "value",
  34877. position: "bottom",
  34878. orient: "horizontal",
  34879. axisLine: {
  34880. show: !0,
  34881. lineStyle: {
  34882. width: 1,
  34883. type: "solid"
  34884. }
  34885. },
  34886. tooltip: {
  34887. show: !0
  34888. },
  34889. axisTick: {
  34890. show: !0,
  34891. length: 6,
  34892. lineStyle: {
  34893. width: 1
  34894. }
  34895. },
  34896. axisLabel: {
  34897. show: !0,
  34898. interval: "auto"
  34899. },
  34900. splitLine: {
  34901. show: !0,
  34902. lineStyle: {
  34903. type: "dashed",
  34904. opacity: .2
  34905. }
  34906. }
  34907. }, e
  34908. }(Rp);
  34909. R(cE, I_.prototype);
  34910. var pE = function (t) {
  34911. function e(e, n, i, r, o) {
  34912. var a = t.call(this, e, n, i) || this;
  34913. return a.type = r || "value", a.position = o || "bottom", a
  34914. }
  34915. return n(e, t), e.prototype.isHorizontal = function () {
  34916. var t = this.position;
  34917. return "top" === t || "bottom" === t
  34918. }, e.prototype.pointToData = function (t, e) {
  34919. return this.coordinateSystem.pointToData(t)[0]
  34920. }, e
  34921. }(nb),
  34922. dE = ["single"],
  34923. fE = function () {
  34924. function t(t, e, n) {
  34925. this.type = "single", this.dimension = "single", this.dimensions = dE, this.axisPointerEnabled = !0, this.model = t, this._init(t, e, n)
  34926. }
  34927. return t.prototype._init = function (t, e, n) {
  34928. var i = this.dimension,
  34929. r = new pE(i, m_(t), [0, 0], t.get("type"), t.get("position")),
  34930. o = "category" === r.type;
  34931. r.onBand = o && t.get("boundaryGap"), r.inverse = t.get("inverse"), r.orient = t.get("orient"), t.axis = r, r.model = t, r.coordinateSystem = this, this._axis = r
  34932. }, t.prototype.update = function (t, e) {
  34933. t.eachSeries((function (t) {
  34934. if (t.coordinateSystem === this) {
  34935. var e = t.getData();
  34936. E(e.mapDimensionsAll(this.dimension), (function (t) {
  34937. this._axis.scale.unionExtentFromData(e, t)
  34938. }), this), v_(this._axis.scale, this._axis.model)
  34939. }
  34940. }), this)
  34941. }, t.prototype.resize = function (t, e) {
  34942. this._rect = Cp({
  34943. left: t.get("left"),
  34944. top: t.get("top"),
  34945. right: t.get("right"),
  34946. bottom: t.get("bottom"),
  34947. width: t.get("width"),
  34948. height: t.get("height")
  34949. }, {
  34950. width: e.getWidth(),
  34951. height: e.getHeight()
  34952. }), this._adjustAxis()
  34953. }, t.prototype.getRect = function () {
  34954. return this._rect
  34955. }, t.prototype._adjustAxis = function () {
  34956. var t = this._rect,
  34957. e = this._axis,
  34958. n = e.isHorizontal(),
  34959. i = n ? [0, t.width] : [0, t.height],
  34960. r = e.inverse ? 1 : 0;
  34961. e.setExtent(i[r], i[1 - r]), this._updateAxisTransform(e, n ? t.x : t.y)
  34962. }, t.prototype._updateAxisTransform = function (t, e) {
  34963. var n = t.getExtent(),
  34964. i = n[0] + n[1],
  34965. r = t.isHorizontal();
  34966. t.toGlobalCoord = r ? function (t) {
  34967. return t + e
  34968. } : function (t) {
  34969. return i - t + e
  34970. }, t.toLocalCoord = r ? function (t) {
  34971. return t - e
  34972. } : function (t) {
  34973. return i - t + e
  34974. }
  34975. }, t.prototype.getAxis = function () {
  34976. return this._axis
  34977. }, t.prototype.getBaseAxis = function () {
  34978. return this._axis
  34979. }, t.prototype.getAxes = function () {
  34980. return [this._axis]
  34981. }, t.prototype.getTooltipAxes = function () {
  34982. return {
  34983. baseAxes: [this.getAxis()],
  34984. otherAxes: []
  34985. }
  34986. }, t.prototype.containPoint = function (t) {
  34987. var e = this.getRect(),
  34988. n = this.getAxis();
  34989. return "horizontal" === n.orient ? n.contain(n.toLocalCoord(t[0])) && t[1] >= e.y && t[1] <= e.y + e.height : n.contain(n.toLocalCoord(t[1])) && t[0] >= e.y && t[0] <= e.y + e.height
  34990. }, t.prototype.pointToData = function (t) {
  34991. var e = this.getAxis();
  34992. return [e.coordToData(e.toLocalCoord(t["horizontal" === e.orient ? 0 : 1]))]
  34993. }, t.prototype.dataToPoint = function (t) {
  34994. var e = this.getAxis(),
  34995. n = this.getRect(),
  34996. i = [],
  34997. r = "horizontal" === e.orient ? 0 : 1;
  34998. return t instanceof Array && (t = t[0]), i[r] = e.toGlobalCoord(e.dataToCoord(+t)), i[1 - r] = 0 === r ? n.y + n.height / 2 : n.x + n.width / 2, i
  34999. }, t.prototype.convertToPixel = function (t, e, n) {
  35000. return gE(e) === this ? this.dataToPoint(n) : null
  35001. }, t.prototype.convertFromPixel = function (t, e, n) {
  35002. return gE(e) === this ? this.pointToData(n) : null
  35003. }, t
  35004. }();
  35005. function gE(t) {
  35006. var e = t.seriesModel,
  35007. n = t.singleAxisModel;
  35008. return n && n.coordinateSystem || e && e.coordinateSystem
  35009. }
  35010. var yE = {
  35011. create: function (t, e) {
  35012. var n = [];
  35013. return t.eachComponent("singleAxis", (function (i, r) {
  35014. var o = new fE(i, t, e);
  35015. o.name = "single_" + r, o.resize(i, e), i.coordinateSystem = o, n.push(o)
  35016. })), t.eachSeries((function (t) {
  35017. if ("singleAxis" === t.get("coordinateSystem")) {
  35018. var e = t.getReferringComponents("singleAxis", zo).models[0];
  35019. t.coordinateSystem = e && e.coordinateSystem
  35020. }
  35021. })), n
  35022. },
  35023. dimensions: dE
  35024. },
  35025. vE = ["x", "y"],
  35026. mE = ["width", "height"],
  35027. xE = function (t) {
  35028. function e() {
  35029. return null !== t && t.apply(this, arguments) || this
  35030. }
  35031. return n(e, t), e.prototype.makeElOption = function (t, e, n, i, r) {
  35032. var o = n.axis,
  35033. a = o.coordinateSystem,
  35034. s = wE(a, 1 - bE(o)),
  35035. l = a.dataToPoint(e)[0],
  35036. u = i.get("type");
  35037. if (u && "none" !== u) {
  35038. var h = tN(i),
  35039. c = _E[u](o, l, s);
  35040. c.style = h, t.graphicKey = c.type, t.pointer = c
  35041. }
  35042. rN(e, t, aE(n), n, i, r)
  35043. }, e.prototype.getHandleTransform = function (t, e, n) {
  35044. var i = aE(e, {
  35045. labelInside: !1
  35046. });
  35047. i.labelMargin = n.get(["handle", "margin"]);
  35048. var r = iN(e.axis, t, i);
  35049. return {
  35050. x: r[0],
  35051. y: r[1],
  35052. rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
  35053. }
  35054. }, e.prototype.updateHandleTransform = function (t, e, n, i) {
  35055. var r = n.axis,
  35056. o = r.coordinateSystem,
  35057. a = bE(r),
  35058. s = wE(o, a),
  35059. l = [t.x, t.y];
  35060. l[a] += e[a], l[a] = Math.min(s[1], l[a]), l[a] = Math.max(s[0], l[a]);
  35061. var u = wE(o, 1 - a),
  35062. h = (u[1] + u[0]) / 2,
  35063. c = [h, h];
  35064. return c[a] = l[a], {
  35065. x: l[0],
  35066. y: l[1],
  35067. rotation: t.rotation,
  35068. cursorPoint: c,
  35069. tooltipOption: {
  35070. verticalAlign: "middle"
  35071. }
  35072. }
  35073. }, e
  35074. }(jR),
  35075. _E = {
  35076. line: function (t, e, n) {
  35077. return {
  35078. type: "Line",
  35079. subPixelOptimize: !0,
  35080. shape: oN([e, n[0]], [e, n[1]], bE(t))
  35081. }
  35082. },
  35083. shadow: function (t, e, n) {
  35084. var i = t.getBandWidth(),
  35085. r = n[1] - n[0];
  35086. return {
  35087. type: "Rect",
  35088. shape: aN([e - i / 2, n[0]], [i, r], bE(t))
  35089. }
  35090. }
  35091. };
  35092. function bE(t) {
  35093. return t.isHorizontal() ? 0 : 1
  35094. }
  35095. function wE(t, e) {
  35096. var n = t.getRect();
  35097. return [n[vE[e]], n[vE[e]] + n[mE[e]]]
  35098. }
  35099. var SE = function (t) {
  35100. function e() {
  35101. var n = null !== t && t.apply(this, arguments) || this;
  35102. return n.type = e.type, n
  35103. }
  35104. return n(e, t), e.type = "single", e
  35105. }(Tg);
  35106. var ME = function (t) {
  35107. function e() {
  35108. var n = null !== t && t.apply(this, arguments) || this;
  35109. return n.type = e.type, n
  35110. }
  35111. return n(e, t), e.prototype.init = function (e, n, i) {
  35112. var r = Lp(e);
  35113. t.prototype.init.apply(this, arguments), IE(e, r)
  35114. }, e.prototype.mergeOption = function (e) {
  35115. t.prototype.mergeOption.apply(this, arguments), IE(this.option, e)
  35116. }, e.prototype.getCellSize = function () {
  35117. return this.option.cellSize
  35118. }, e.type = "calendar", e.defaultOption = {
  35119. z: 2,
  35120. left: 80,
  35121. top: 60,
  35122. cellSize: 20,
  35123. orient: "horizontal",
  35124. splitLine: {
  35125. show: !0,
  35126. lineStyle: {
  35127. color: "#000",
  35128. width: 1,
  35129. type: "solid"
  35130. }
  35131. },
  35132. itemStyle: {
  35133. color: "#fff",
  35134. borderWidth: 1,
  35135. borderColor: "#ccc"
  35136. },
  35137. dayLabel: {
  35138. show: !0,
  35139. firstDay: 0,
  35140. position: "start",
  35141. margin: "50%",
  35142. color: "#000"
  35143. },
  35144. monthLabel: {
  35145. show: !0,
  35146. position: "start",
  35147. margin: 5,
  35148. align: "center",
  35149. formatter: null,
  35150. color: "#000"
  35151. },
  35152. yearLabel: {
  35153. show: !0,
  35154. position: null,
  35155. margin: 30,
  35156. formatter: null,
  35157. color: "#ccc",
  35158. fontFamily: "sans-serif",
  35159. fontWeight: "bolder",
  35160. fontSize: 20
  35161. }
  35162. }, e
  35163. }(Rp);
  35164. function IE(t, e) {
  35165. var n, i = t.cellSize;
  35166. 1 === (n = Y(i) ? i : t.cellSize = [i, i]).length && (n[1] = n[0]);
  35167. var r = z([0, 1], (function (t) {
  35168. return function (t, e) {
  35169. return null != t[Mp[e][0]] || null != t[Mp[e][1]] && null != t[Mp[e][2]]
  35170. }(e, t) && (n[t] = "auto"), null != n[t] && "auto" !== n[t]
  35171. }));
  35172. kp(t, e, {
  35173. type: "box",
  35174. ignoreSize: r
  35175. })
  35176. }
  35177. var TE = function (t) {
  35178. function e() {
  35179. var n = null !== t && t.apply(this, arguments) || this;
  35180. return n.type = e.type, n
  35181. }
  35182. return n(e, t), e.prototype.render = function (t, e, n) {
  35183. var i = this.group;
  35184. i.removeAll();
  35185. var r = t.coordinateSystem,
  35186. o = r.getRangeInfo(),
  35187. a = r.getOrient(),
  35188. s = e.getLocaleModel();
  35189. this._renderDayRect(t, o, i), this._renderLines(t, o, a, i), this._renderYearText(t, o, a, i), this._renderMonthText(t, s, a, i), this._renderWeekText(t, s, o, a, i)
  35190. }, e.prototype._renderDayRect = function (t, e, n) {
  35191. for (var i = t.coordinateSystem, r = t.getModel("itemStyle").getItemStyle(), o = i.getCellWidth(), a = i.getCellHeight(), s = e.start.time; s <= e.end.time; s = i.getNextNDay(s, 1).time) {
  35192. var l = i.dataToRect([s], !1).tl,
  35193. u = new zs({
  35194. shape: {
  35195. x: l[0],
  35196. y: l[1],
  35197. width: o,
  35198. height: a
  35199. },
  35200. cursor: "default",
  35201. style: r
  35202. });
  35203. n.add(u)
  35204. }
  35205. }, e.prototype._renderLines = function (t, e, n, i) {
  35206. var r = this,
  35207. o = t.coordinateSystem,
  35208. a = t.getModel(["splitLine", "lineStyle"]).getLineStyle(),
  35209. s = t.get(["splitLine", "show"]),
  35210. l = a.lineWidth;
  35211. this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
  35212. for (var u = e.start, h = 0; u.time <= e.end.time; h++) {
  35213. p(u.formatedDate), 0 === h && (u = o.getDateInfo(e.start.y + "-" + e.start.m));
  35214. var c = u.date;
  35215. c.setMonth(c.getMonth() + 1), u = o.getDateInfo(c)
  35216. }
  35217. function p(e) {
  35218. r._firstDayOfMonth.push(o.getDateInfo(e)), r._firstDayPoints.push(o.dataToRect([e], !1).tl);
  35219. var l = r._getLinePointsOfOneWeek(t, e, n);
  35220. r._tlpoints.push(l[0]), r._blpoints.push(l[l.length - 1]), s && r._drawSplitline(l, a, i)
  35221. }
  35222. p(o.getNextNDay(e.end.time, 1).formatedDate), s && this._drawSplitline(r._getEdgesPoints(r._tlpoints, l, n), a, i), s && this._drawSplitline(r._getEdgesPoints(r._blpoints, l, n), a, i)
  35223. }, e.prototype._getEdgesPoints = function (t, e, n) {
  35224. var i = [t[0].slice(), t[t.length - 1].slice()],
  35225. r = "horizontal" === n ? 0 : 1;
  35226. return i[0][r] = i[0][r] - e / 2, i[1][r] = i[1][r] + e / 2, i
  35227. }, e.prototype._drawSplitline = function (t, e, n) {
  35228. var i = new Yu({
  35229. z2: 20,
  35230. shape: {
  35231. points: t
  35232. },
  35233. style: e
  35234. });
  35235. n.add(i)
  35236. }, e.prototype._getLinePointsOfOneWeek = function (t, e, n) {
  35237. for (var i = t.coordinateSystem, r = i.getDateInfo(e), o = [], a = 0; a < 7; a++) {
  35238. var s = i.getNextNDay(r.time, a),
  35239. l = i.dataToRect([s.time], !1);
  35240. o[2 * s.day] = l.tl, o[2 * s.day + 1] = l["horizontal" === n ? "bl" : "tr"]
  35241. }
  35242. return o
  35243. }, e.prototype._formatterLabel = function (t, e) {
  35244. return U(t) && t ? (n = t, E(e, (function (t, e) {
  35245. n = n.replace("{" + e + "}", i ? re(t) : t)
  35246. })), n) : X(t) ? t(e) : e.nameMap;
  35247. var n, i
  35248. }, e.prototype._yearTextPositionControl = function (t, e, n, i, r) {
  35249. var o = e[0],
  35250. a = e[1],
  35251. s = ["center", "bottom"];
  35252. "bottom" === i ? (a += r, s = ["center", "top"]) : "left" === i ? o -= r : "right" === i ? (o += r, s = ["center", "top"]) : a -= r;
  35253. var l = 0;
  35254. return "left" !== i && "right" !== i || (l = Math.PI / 2), {
  35255. rotation: l,
  35256. x: o,
  35257. y: a,
  35258. style: {
  35259. align: s[0],
  35260. verticalAlign: s[1]
  35261. }
  35262. }
  35263. }, e.prototype._renderYearText = function (t, e, n, i) {
  35264. var r = t.getModel("yearLabel");
  35265. if (r.get("show")) {
  35266. var o = r.get("margin"),
  35267. a = r.get("position");
  35268. a || (a = "horizontal" !== n ? "top" : "left");
  35269. var s = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]],
  35270. l = (s[0][0] + s[1][0]) / 2,
  35271. u = (s[0][1] + s[1][1]) / 2,
  35272. h = "horizontal" === n ? 0 : 1,
  35273. c = {
  35274. top: [l, s[h][1]],
  35275. bottom: [l, s[1 - h][1]],
  35276. left: [s[1 - h][0], u],
  35277. right: [s[h][0], u]
  35278. },
  35279. p = e.start.y; + e.end.y > +e.start.y && (p = p + "-" + e.end.y);
  35280. var d = r.get("formatter"),
  35281. f = {
  35282. start: e.start.y,
  35283. end: e.end.y,
  35284. nameMap: p
  35285. },
  35286. g = this._formatterLabel(d, f),
  35287. y = new Fs({
  35288. z2: 30,
  35289. style: nc(r, {
  35290. text: g
  35291. })
  35292. });
  35293. y.attr(this._yearTextPositionControl(y, c[a], n, a, o)), i.add(y)
  35294. }
  35295. }, e.prototype._monthTextPositionControl = function (t, e, n, i, r) {
  35296. var o = "left",
  35297. a = "top",
  35298. s = t[0],
  35299. l = t[1];
  35300. return "horizontal" === n ? (l += r, e && (o = "center"), "start" === i && (a = "bottom")) : (s += r, e && (a = "middle"), "start" === i && (o = "right")), {
  35301. x: s,
  35302. y: l,
  35303. align: o,
  35304. verticalAlign: a
  35305. }
  35306. }, e.prototype._renderMonthText = function (t, e, n, i) {
  35307. var r = t.getModel("monthLabel");
  35308. if (r.get("show")) {
  35309. var o = r.get("nameMap"),
  35310. a = r.get("margin"),
  35311. s = r.get("position"),
  35312. l = r.get("align"),
  35313. u = [this._tlpoints, this._blpoints];
  35314. o && !U(o) || (o && (e = Nc(o) || e), o = e.get(["time", "monthAbbr"]) || []);
  35315. var h = "start" === s ? 0 : 1,
  35316. c = "horizontal" === n ? 0 : 1;
  35317. a = "start" === s ? -a : a;
  35318. for (var p = "center" === l, d = 0; d < u[h].length - 1; d++) {
  35319. var f = u[h][d].slice(),
  35320. g = this._firstDayOfMonth[d];
  35321. if (p) {
  35322. var y = this._firstDayPoints[d];
  35323. f[c] = (y[c] + u[0][d + 1][c]) / 2
  35324. }
  35325. var v = r.get("formatter"),
  35326. m = o[+g.m - 1],
  35327. x = {
  35328. yyyy: g.y,
  35329. yy: (g.y + "").slice(2),
  35330. MM: g.m,
  35331. M: +g.m,
  35332. nameMap: m
  35333. },
  35334. _ = this._formatterLabel(v, x),
  35335. b = new Fs({
  35336. z2: 30,
  35337. style: A(nc(r, {
  35338. text: _
  35339. }), this._monthTextPositionControl(f, p, n, s, a))
  35340. });
  35341. i.add(b)
  35342. }
  35343. }
  35344. }, e.prototype._weekTextPositionControl = function (t, e, n, i, r) {
  35345. var o = "center",
  35346. a = "middle",
  35347. s = t[0],
  35348. l = t[1],
  35349. u = "start" === n;
  35350. return "horizontal" === e ? (s = s + i + (u ? 1 : -1) * r[0] / 2, o = u ? "right" : "left") : (l = l + i + (u ? 1 : -1) * r[1] / 2, a = u ? "bottom" : "top"), {
  35351. x: s,
  35352. y: l,
  35353. align: o,
  35354. verticalAlign: a
  35355. }
  35356. }, e.prototype._renderWeekText = function (t, e, n, i, r) {
  35357. var o = t.getModel("dayLabel");
  35358. if (o.get("show")) {
  35359. var a = t.coordinateSystem,
  35360. s = o.get("position"),
  35361. l = o.get("nameMap"),
  35362. u = o.get("margin"),
  35363. h = a.getFirstDayOfWeek();
  35364. if (!l || U(l)) l && (e = Nc(l) || e), l = e.get(["time", "dayOfWeekShort"]) || z(e.get(["time", "dayOfWeekAbbr"]), (function (t) {
  35365. return t[0]
  35366. }));
  35367. var c = a.getNextNDay(n.end.time, 7 - n.lweek).time,
  35368. p = [a.getCellWidth(), a.getCellHeight()];
  35369. u = Ur(u, Math.min(p[1], p[0])), "start" === s && (c = a.getNextNDay(n.start.time, -(7 + n.fweek)).time, u = -u);
  35370. for (var d = 0; d < 7; d++) {
  35371. var f, g = a.getNextNDay(c, d),
  35372. y = a.dataToRect([g.time], !1).center;
  35373. f = Math.abs((d + h) % 7);
  35374. var v = new Fs({
  35375. z2: 30,
  35376. style: A(nc(o, {
  35377. text: l[f]
  35378. }), this._weekTextPositionControl(y, i, s, u, p))
  35379. });
  35380. r.add(v)
  35381. }
  35382. }
  35383. }, e.type = "calendar", e
  35384. }(Tg),
  35385. CE = 864e5,
  35386. DE = function () {
  35387. function t(e, n, i) {
  35388. this.type = "calendar", this.dimensions = t.dimensions, this.getDimensionsInfo = t.getDimensionsInfo, this._model = e
  35389. }
  35390. return t.getDimensionsInfo = function () {
  35391. return [{
  35392. name: "time",
  35393. type: "time"
  35394. }, "value"]
  35395. }, t.prototype.getRangeInfo = function () {
  35396. return this._rangeInfo
  35397. }, t.prototype.getModel = function () {
  35398. return this._model
  35399. }, t.prototype.getRect = function () {
  35400. return this._rect
  35401. }, t.prototype.getCellWidth = function () {
  35402. return this._sw
  35403. }, t.prototype.getCellHeight = function () {
  35404. return this._sh
  35405. }, t.prototype.getOrient = function () {
  35406. return this._orient
  35407. }, t.prototype.getFirstDayOfWeek = function () {
  35408. return this._firstDayOfWeek
  35409. }, t.prototype.getDateInfo = function (t) {
  35410. var e = (t = ro(t)).getFullYear(),
  35411. n = t.getMonth() + 1,
  35412. i = n < 10 ? "0" + n : "" + n,
  35413. r = t.getDate(),
  35414. o = r < 10 ? "0" + r : "" + r,
  35415. a = t.getDay();
  35416. return {
  35417. y: e + "",
  35418. m: i,
  35419. d: o,
  35420. day: a = Math.abs((a + 7 - this.getFirstDayOfWeek()) % 7),
  35421. time: t.getTime(),
  35422. formatedDate: e + "-" + i + "-" + o,
  35423. date: t
  35424. }
  35425. }, t.prototype.getNextNDay = function (t, e) {
  35426. return 0 === (e = e || 0) || (t = new Date(this.getDateInfo(t).time)).setDate(t.getDate() + e), this.getDateInfo(t)
  35427. }, t.prototype.update = function (t, e) {
  35428. this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption());
  35429. var n = this._rangeInfo.weeks || 1,
  35430. i = ["width", "height"],
  35431. r = this._model.getCellSize().slice(),
  35432. o = this._model.getBoxLayoutParams(),
  35433. a = "horizontal" === this._orient ? [n, 7] : [7, n];
  35434. E([0, 1], (function (t) {
  35435. u(r, t) && (o[i[t]] = r[t] * a[t])
  35436. }));
  35437. var s = {
  35438. width: e.getWidth(),
  35439. height: e.getHeight()
  35440. },
  35441. l = this._rect = Cp(o, s);
  35442. function u(t, e) {
  35443. return null != t[e] && "auto" !== t[e]
  35444. }
  35445. E([0, 1], (function (t) {
  35446. u(r, t) || (r[t] = l[i[t]] / a[t])
  35447. })), this._sw = r[0], this._sh = r[1]
  35448. }, t.prototype.dataToPoint = function (t, e) {
  35449. Y(t) && (t = t[0]), null == e && (e = !0);
  35450. var n = this.getDateInfo(t),
  35451. i = this._rangeInfo,
  35452. r = n.formatedDate;
  35453. if (e && !(n.time >= i.start.time && n.time < i.end.time + CE)) return [NaN, NaN];
  35454. var o = n.day,
  35455. a = this._getRangeInfo([i.start.time, r]).nthWeek;
  35456. return "vertical" === this._orient ? [this._rect.x + o * this._sw + this._sw / 2, this._rect.y + a * this._sh + this._sh / 2] : [this._rect.x + a * this._sw + this._sw / 2, this._rect.y + o * this._sh + this._sh / 2]
  35457. }, t.prototype.pointToData = function (t) {
  35458. var e = this.pointToDate(t);
  35459. return e && e.time
  35460. }, t.prototype.dataToRect = function (t, e) {
  35461. var n = this.dataToPoint(t, e);
  35462. return {
  35463. contentShape: {
  35464. x: n[0] - (this._sw - this._lineWidth) / 2,
  35465. y: n[1] - (this._sh - this._lineWidth) / 2,
  35466. width: this._sw - this._lineWidth,
  35467. height: this._sh - this._lineWidth
  35468. },
  35469. center: n,
  35470. tl: [n[0] - this._sw / 2, n[1] - this._sh / 2],
  35471. tr: [n[0] + this._sw / 2, n[1] - this._sh / 2],
  35472. br: [n[0] + this._sw / 2, n[1] + this._sh / 2],
  35473. bl: [n[0] - this._sw / 2, n[1] + this._sh / 2]
  35474. }
  35475. }, t.prototype.pointToDate = function (t) {
  35476. var e = Math.floor((t[0] - this._rect.x) / this._sw) + 1,
  35477. n = Math.floor((t[1] - this._rect.y) / this._sh) + 1,
  35478. i = this._rangeInfo.range;
  35479. return "vertical" === this._orient ? this._getDateByWeeksAndDay(n, e - 1, i) : this._getDateByWeeksAndDay(e, n - 1, i)
  35480. }, t.prototype.convertToPixel = function (t, e, n) {
  35481. var i = AE(e);
  35482. return i === this ? i.dataToPoint(n) : null
  35483. }, t.prototype.convertFromPixel = function (t, e, n) {
  35484. var i = AE(e);
  35485. return i === this ? i.pointToData(n) : null
  35486. }, t.prototype.containPoint = function (t) {
  35487. return console.warn("Not implemented."), !1
  35488. }, t.prototype._initRangeOption = function () {
  35489. var t, e = this._model.get("range");
  35490. if (Y(e) && 1 === e.length && (e = e[0]), Y(e)) t = e;
  35491. else {
  35492. var n = e.toString();
  35493. if (/^\d{4}$/.test(n) && (t = [n + "-01-01", n + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(n)) {
  35494. var i = this.getDateInfo(n),
  35495. r = i.date;
  35496. r.setMonth(r.getMonth() + 1);
  35497. var o = this.getNextNDay(r, -1);
  35498. t = [i.formatedDate, o.formatedDate]
  35499. }
  35500. /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n) && (t = [n, n])
  35501. }
  35502. if (!t) return e;
  35503. var a = this._getRangeInfo(t);
  35504. return a.start.time > a.end.time && t.reverse(), t
  35505. }, t.prototype._getRangeInfo = function (t) {
  35506. var e, n = [this.getDateInfo(t[0]), this.getDateInfo(t[1])];
  35507. n[0].time > n[1].time && (e = !0, n.reverse());
  35508. var i = Math.floor(n[1].time / CE) - Math.floor(n[0].time / CE) + 1,
  35509. r = new Date(n[0].time),
  35510. o = r.getDate(),
  35511. a = n[1].date.getDate();
  35512. r.setDate(o + i - 1);
  35513. var s = r.getDate();
  35514. if (s !== a)
  35515. for (var l = r.getTime() - n[1].time > 0 ? 1 : -1;
  35516. (s = r.getDate()) !== a && (r.getTime() - n[1].time) * l > 0;) i -= l, r.setDate(s - l);
  35517. var u = Math.floor((i + n[0].day + 6) / 7),
  35518. h = e ? 1 - u : u - 1;
  35519. return e && n.reverse(), {
  35520. range: [n[0].formatedDate, n[1].formatedDate],
  35521. start: n[0],
  35522. end: n[1],
  35523. allDay: i,
  35524. weeks: u,
  35525. nthWeek: h,
  35526. fweek: n[0].day,
  35527. lweek: n[1].day
  35528. }
  35529. }, t.prototype._getDateByWeeksAndDay = function (t, e, n) {
  35530. var i = this._getRangeInfo(n);
  35531. if (t > i.weeks || 0 === t && e < i.fweek || t === i.weeks && e > i.lweek) return null;
  35532. var r = 7 * (t - 1) - i.fweek + e,
  35533. o = new Date(i.start.time);
  35534. return o.setDate(+i.start.d + r), this.getDateInfo(o)
  35535. }, t.create = function (e, n) {
  35536. var i = [];
  35537. return e.eachComponent("calendar", (function (r) {
  35538. var o = new t(r, e, n);
  35539. i.push(o), r.coordinateSystem = o
  35540. })), e.eachSeries((function (t) {
  35541. "calendar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("calendarIndex") || 0])
  35542. })), i
  35543. }, t.dimensions = ["time", "value"], t
  35544. }();
  35545. function AE(t) {
  35546. var e = t.calendarModel,
  35547. n = t.seriesModel;
  35548. return e ? e.coordinateSystem : n ? n.coordinateSystem : null
  35549. }
  35550. function kE(t, e) {
  35551. var n;
  35552. return E(e, (function (e) {
  35553. null != t[e] && "auto" !== t[e] && (n = !0)
  35554. })), n
  35555. }
  35556. var LE = ["transition", "enterFrom", "leaveTo"],
  35557. PE = LE.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
  35558. function OE(t, e, n) {
  35559. if (n && (!t[n] && e[n] && (t[n] = {}), t = t[n], e = e[n]), t && e)
  35560. for (var i = n ? LE : PE, r = 0; r < i.length; r++) {
  35561. var o = i[r];
  35562. null == t[o] && null != e[o] && (t[o] = e[o])
  35563. }
  35564. }
  35565. var RE = function (t) {
  35566. function e() {
  35567. var n = null !== t && t.apply(this, arguments) || this;
  35568. return n.type = e.type, n.preventAutoZ = !0, n
  35569. }
  35570. return n(e, t), e.prototype.mergeOption = function (e, n) {
  35571. var i = this.option.elements;
  35572. this.option.elements = null, t.prototype.mergeOption.call(this, e, n), this.option.elements = i
  35573. }, e.prototype.optionUpdated = function (t, e) {
  35574. var n = this.option,
  35575. i = (e ? n : t).elements,
  35576. r = n.elements = e ? [] : n.elements,
  35577. o = [];
  35578. this._flatten(i, o, null);
  35579. var a = To(r, o, "normalMerge"),
  35580. s = this._elOptionsToUpdate = [];
  35581. E(a, (function (t, e) {
  35582. var n = t.newOption;
  35583. n && (s.push(n), function (t, e) {
  35584. var n = t.existing;
  35585. if (e.id = t.keyInfo.id, !e.type && n && (e.type = n.type), null == e.parentId) {
  35586. var i = e.parentOption;
  35587. i ? e.parentId = i.id : n && (e.parentId = n.parentId)
  35588. }
  35589. e.parentOption = null
  35590. }(t, n), function (t, e, n) {
  35591. var i = A({}, n),
  35592. r = t[e],
  35593. o = n.$action || "merge";
  35594. "merge" === o ? r ? (C(r, i, !0), kp(r, i, {
  35595. ignoreSize: !0
  35596. }), Pp(n, r), OE(n, r), OE(n, r, "shape"), OE(n, r, "style"), OE(n, r, "extra"), n.clipPath = r.clipPath) : t[e] = i : "replace" === o ? t[e] = i : "remove" === o && r && (t[e] = null)
  35597. }(r, e, n), function (t, e) {
  35598. if (t && (t.hv = e.hv = [kE(e, ["left", "right"]), kE(e, ["top", "bottom"])], "group" === t.type)) {
  35599. var n = t,
  35600. i = e;
  35601. null == n.width && (n.width = i.width = 0), null == n.height && (n.height = i.height = 0)
  35602. }
  35603. }(r[e], n))
  35604. }), this), n.elements = B(r, (function (t) {
  35605. return t && delete t.$action, null != t
  35606. }))
  35607. }, e.prototype._flatten = function (t, e, n) {
  35608. E(t, (function (t) {
  35609. if (t) {
  35610. n && (t.parentOption = n), e.push(t);
  35611. var i = t.children;
  35612. i && i.length && this._flatten(i, e, t), delete t.children
  35613. }
  35614. }), this)
  35615. }, e.prototype.useElOptionsToUpdate = function () {
  35616. var t = this._elOptionsToUpdate;
  35617. return this._elOptionsToUpdate = null, t
  35618. }, e.type = "graphic", e.defaultOption = {
  35619. elements: []
  35620. }, e
  35621. }(Rp),
  35622. NE = {
  35623. path: null,
  35624. compoundPath: null,
  35625. group: zr,
  35626. image: ks,
  35627. text: Fs
  35628. },
  35629. EE = Oo(),
  35630. zE = function (t) {
  35631. function e() {
  35632. var n = null !== t && t.apply(this, arguments) || this;
  35633. return n.type = e.type, n
  35634. }
  35635. return n(e, t), e.prototype.init = function () {
  35636. this._elMap = yt()
  35637. }, e.prototype.render = function (t, e, n) {
  35638. t !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = t, this._updateElements(t), this._relocate(t, n)
  35639. }, e.prototype._updateElements = function (t) {
  35640. var e = t.useElOptionsToUpdate();
  35641. if (e) {
  35642. var n = this._elMap,
  35643. i = this.group,
  35644. r = t.get("z"),
  35645. o = t.get("zlevel");
  35646. E(e, (function (e) {
  35647. var a = Ao(e.id, null),
  35648. s = null != a ? n.get(a) : null,
  35649. l = Ao(e.parentId, null),
  35650. u = null != l ? n.get(l) : i,
  35651. h = e.type,
  35652. c = e.style;
  35653. "text" === h && c && e.hv && e.hv[1] && (c.textVerticalAlign = c.textBaseline = c.verticalAlign = c.align = null);
  35654. var p = e.textContent,
  35655. d = e.textConfig;
  35656. if (c && XO(c, h, !!d, !!p)) {
  35657. var f = UO(c, h, !0);
  35658. !d && f.textConfig && (d = e.textConfig = f.textConfig), !p && f.textContent && (p = f.textContent)
  35659. }
  35660. var g = function (t) {
  35661. return t = A({}, t), E(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(Sp), (function (e) {
  35662. delete t[e]
  35663. })), t
  35664. }(e);
  35665. var y = e.$action || "merge",
  35666. v = "merge" === y,
  35667. m = "replace" === y;
  35668. if (v) {
  35669. var x = s;
  35670. (T = !s) ? x = BE(a, u, e.type, n): (x && (EE(x).isNew = !1), dR(x)), x && (eR(x, g, t, {
  35671. isInit: T
  35672. }), GE(x, e, r, o))
  35673. } else if (m) {
  35674. FE(s, e, n, t);
  35675. var _ = BE(a, u, e.type, n);
  35676. _ && (eR(_, g, t, {
  35677. isInit: !0
  35678. }), GE(_, e, r, o))
  35679. } else "remove" === y && (nR(s, e), FE(s, e, n, t));
  35680. var b = n.get(a);
  35681. if (b && p)
  35682. if (v) {
  35683. var w = b.getTextContent();
  35684. w ? w.attr(p) : b.setTextContent(new Fs(p))
  35685. } else m && b.setTextContent(new Fs(p));
  35686. if (b) {
  35687. var S = e.clipPath;
  35688. if (S) {
  35689. var M = S.type,
  35690. I = void 0,
  35691. T = !1;
  35692. if (v) {
  35693. var C = b.getClipPath();
  35694. I = (T = !C || EE(C).type !== M) ? VE(M) : C
  35695. } else m && (T = !0, I = VE(M));
  35696. b.setClipPath(I), eR(I, S, t, {
  35697. isInit: T
  35698. }), fR(I, S.keyframeAnimation, t)
  35699. }
  35700. var D = EE(b);
  35701. b.setTextConfig(d), D.option = e,
  35702. function (t, e, n) {
  35703. var i = Qs(t).eventData;
  35704. t.silent || t.ignore || i || (i = Qs(t).eventData = {
  35705. componentType: "graphic",
  35706. componentIndex: e.componentIndex,
  35707. name: t.name
  35708. });
  35709. i && (i.info = n.info)
  35710. }(b, t, e), Zh({
  35711. el: b,
  35712. componentModel: t,
  35713. itemName: b.name,
  35714. itemTooltipOption: e.tooltip
  35715. }), fR(b, e.keyframeAnimation, t)
  35716. }
  35717. }))
  35718. }
  35719. }, e.prototype._relocate = function (t, e) {
  35720. for (var n = t.option.elements, i = this.group, r = this._elMap, o = e.getWidth(), a = e.getHeight(), s = ["x", "y"], l = 0; l < n.length; l++) {
  35721. if ((f = null != (d = Ao((p = n[l]).id, null)) ? r.get(d) : null) && f.isGroup) {
  35722. var u = (g = f.parent) === i,
  35723. h = EE(f),
  35724. c = EE(g);
  35725. h.width = Ur(h.option.width, u ? o : c.width) || 0, h.height = Ur(h.option.height, u ? a : c.height) || 0
  35726. }
  35727. }
  35728. for (l = n.length - 1; l >= 0; l--) {
  35729. var p, d, f;
  35730. if (f = null != (d = Ao((p = n[l]).id, null)) ? r.get(d) : null) {
  35731. var g = f.parent,
  35732. y = (c = EE(g), {}),
  35733. v = Dp(f, p, g === i ? {
  35734. width: o,
  35735. height: a
  35736. } : {
  35737. width: c.width,
  35738. height: c.height
  35739. }, null, {
  35740. hv: p.hv,
  35741. boundingMode: p.bounding
  35742. }, y);
  35743. if (!EE(f).isNew && v) {
  35744. for (var m = p.transition, x = {}, _ = 0; _ < s.length; _++) {
  35745. var b = s[_],
  35746. w = y[b];
  35747. m && (rR(m) || P(m, b) >= 0) ? x[b] = w : f[b] = w
  35748. }
  35749. fh(f, x, t, 0)
  35750. } else f.attr(y)
  35751. }
  35752. }
  35753. }, e.prototype._clear = function () {
  35754. var t = this,
  35755. e = this._elMap;
  35756. e.each((function (n) {
  35757. FE(n, EE(n).option, e, t._lastGraphicModel)
  35758. })), this._elMap = yt()
  35759. }, e.prototype.dispose = function () {
  35760. this._clear()
  35761. }, e.type = "graphic", e
  35762. }(Tg);
  35763. function VE(t) {
  35764. var e = _t(NE, t) ? NE[t] : Dh(t);
  35765. var n = new e({});
  35766. return EE(n).type = t, n
  35767. }
  35768. function BE(t, e, n, i) {
  35769. var r = VE(n);
  35770. return e.add(r), i.set(t, r), EE(r).id = t, EE(r).isNew = !0, r
  35771. }
  35772. function FE(t, e, n, i) {
  35773. t && t.parent && ("group" === t.type && t.traverse((function (t) {
  35774. FE(t, e, n, i)
  35775. })), iR(t, e, i), n.removeKey(EE(t).id))
  35776. }
  35777. function GE(t, e, n, i) {
  35778. t.isGroup || E([
  35779. ["cursor", Sa.prototype.cursor],
  35780. ["zlevel", i || 0],
  35781. ["z", n || 0],
  35782. ["z2", 0]
  35783. ], (function (n) {
  35784. var i = n[0];
  35785. _t(e, i) ? t[i] = rt(e[i], n[1]) : null == t[i] && (t[i] = n[1])
  35786. })), E(G(e), (function (n) {
  35787. if (0 === n.indexOf("on")) {
  35788. var i = e[n];
  35789. t[n] = X(i) ? i : null
  35790. }
  35791. })), _t(e, "draggable") && (t.draggable = e.draggable), null != e.name && (t.name = e.name), null != e.id && (t.id = e.id)
  35792. }
  35793. var WE = ["x", "y", "radius", "angle", "single"],
  35794. HE = ["cartesian2d", "polar", "singleAxis"];
  35795. function YE(t) {
  35796. return t + "Axis"
  35797. }
  35798. function XE(t, e) {
  35799. var n, i = yt(),
  35800. r = [],
  35801. o = yt();
  35802. t.eachComponent({
  35803. mainType: "dataZoom",
  35804. query: e
  35805. }, (function (t) {
  35806. o.get(t.uid) || s(t)
  35807. }));
  35808. do {
  35809. n = !1, t.eachComponent("dataZoom", a)
  35810. } while (n);
  35811. function a(t) {
  35812. !o.get(t.uid) && function (t) {
  35813. var e = !1;
  35814. return t.eachTargetAxis((function (t, n) {
  35815. var r = i.get(t);
  35816. r && r[n] && (e = !0)
  35817. })), e
  35818. }(t) && (s(t), n = !0)
  35819. }
  35820. function s(t) {
  35821. o.set(t.uid, !0), r.push(t), t.eachTargetAxis((function (t, e) {
  35822. (i.get(t) || i.set(t, []))[e] = !0
  35823. }))
  35824. }
  35825. return r
  35826. }
  35827. function UE(t) {
  35828. var e = t.ecModel,
  35829. n = {
  35830. infoList: [],
  35831. infoMap: yt()
  35832. };
  35833. return t.eachTargetAxis((function (t, i) {
  35834. var r = e.getComponent(YE(t), i);
  35835. if (r) {
  35836. var o = r.getCoordSysModel();
  35837. if (o) {
  35838. var a = o.uid,
  35839. s = n.infoMap.get(a);
  35840. s || (s = {
  35841. model: o,
  35842. axisModels: []
  35843. }, n.infoList.push(s), n.infoMap.set(a, s)), s.axisModels.push(r)
  35844. }
  35845. }
  35846. })), n
  35847. }
  35848. var ZE = function () {
  35849. function t() {
  35850. this.indexList = [], this.indexMap = []
  35851. }
  35852. return t.prototype.add = function (t) {
  35853. this.indexMap[t] || (this.indexList.push(t), this.indexMap[t] = !0)
  35854. }, t
  35855. }(),
  35856. jE = function (t) {
  35857. function e() {
  35858. var n = null !== t && t.apply(this, arguments) || this;
  35859. return n.type = e.type, n._autoThrottle = !0, n._noTarget = !0, n._rangePropMode = ["percent", "percent"], n
  35860. }
  35861. return n(e, t), e.prototype.init = function (t, e, n) {
  35862. var i = qE(t);
  35863. this.settledOption = i, this.mergeDefaultAndTheme(t, n), this._doInit(i)
  35864. }, e.prototype.mergeOption = function (t) {
  35865. var e = qE(t);
  35866. C(this.option, t, !0), C(this.settledOption, e, !0), this._doInit(e)
  35867. }, e.prototype._doInit = function (t) {
  35868. var e = this.option;
  35869. this._setDefaultThrottle(t), this._updateRangeUse(t);
  35870. var n = this.settledOption;
  35871. E([
  35872. ["start", "startValue"],
  35873. ["end", "endValue"]
  35874. ], (function (t, i) {
  35875. "value" === this._rangePropMode[i] && (e[t[0]] = n[t[0]] = null)
  35876. }), this), this._resetTarget()
  35877. }, e.prototype._resetTarget = function () {
  35878. var t = this.get("orient", !0),
  35879. e = this._targetAxisInfoMap = yt();
  35880. this._fillSpecifiedTargetAxis(e) ? this._orient = t || this._makeAutoOrientByTargetAxis() : (this._orient = t || "horizontal", this._fillAutoTargetAxisByOrient(e, this._orient)), this._noTarget = !0, e.each((function (t) {
  35881. t.indexList.length && (this._noTarget = !1)
  35882. }), this)
  35883. }, e.prototype._fillSpecifiedTargetAxis = function (t) {
  35884. var e = !1;
  35885. return E(WE, (function (n) {
  35886. var i = this.getReferringComponents(YE(n), Vo);
  35887. if (i.specified) {
  35888. e = !0;
  35889. var r = new ZE;
  35890. E(i.models, (function (t) {
  35891. r.add(t.componentIndex)
  35892. })), t.set(n, r)
  35893. }
  35894. }), this), e
  35895. }, e.prototype._fillAutoTargetAxisByOrient = function (t, e) {
  35896. var n = this.ecModel,
  35897. i = !0;
  35898. if (i) {
  35899. var r = "vertical" === e ? "y" : "x";
  35900. o(n.findComponents({
  35901. mainType: r + "Axis"
  35902. }), r)
  35903. }
  35904. i && o(n.findComponents({
  35905. mainType: "singleAxis",
  35906. filter: function (t) {
  35907. return t.get("orient", !0) === e
  35908. }
  35909. }), "single");
  35910. function o(e, n) {
  35911. var r = e[0];
  35912. if (r) {
  35913. var o = new ZE;
  35914. if (o.add(r.componentIndex), t.set(n, o), i = !1, "x" === n || "y" === n) {
  35915. var a = r.getReferringComponents("grid", zo).models[0];
  35916. a && E(e, (function (t) {
  35917. r.componentIndex !== t.componentIndex && a === t.getReferringComponents("grid", zo).models[0] && o.add(t.componentIndex)
  35918. }))
  35919. }
  35920. }
  35921. }
  35922. i && E(WE, (function (e) {
  35923. if (i) {
  35924. var r = n.findComponents({
  35925. mainType: YE(e),
  35926. filter: function (t) {
  35927. return "category" === t.get("type", !0)
  35928. }
  35929. });
  35930. if (r[0]) {
  35931. var o = new ZE;
  35932. o.add(r[0].componentIndex), t.set(e, o), i = !1
  35933. }
  35934. }
  35935. }), this)
  35936. }, e.prototype._makeAutoOrientByTargetAxis = function () {
  35937. var t;
  35938. return this.eachTargetAxis((function (e) {
  35939. !t && (t = e)
  35940. }), this), "y" === t ? "vertical" : "horizontal"
  35941. }, e.prototype._setDefaultThrottle = function (t) {
  35942. if (t.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
  35943. var e = this.ecModel.option;
  35944. this.option.throttle = e.animation && e.animationDurationUpdate > 0 ? 100 : 20
  35945. }
  35946. }, e.prototype._updateRangeUse = function (t) {
  35947. var e = this._rangePropMode,
  35948. n = this.get("rangeMode");
  35949. E([
  35950. ["start", "startValue"],
  35951. ["end", "endValue"]
  35952. ], (function (i, r) {
  35953. var o = null != t[i[0]],
  35954. a = null != t[i[1]];
  35955. o && !a ? e[r] = "percent" : !o && a ? e[r] = "value" : n ? e[r] = n[r] : o && (e[r] = "percent")
  35956. }))
  35957. }, e.prototype.noTarget = function () {
  35958. return this._noTarget
  35959. }, e.prototype.getFirstTargetAxisModel = function () {
  35960. var t;
  35961. return this.eachTargetAxis((function (e, n) {
  35962. null == t && (t = this.ecModel.getComponent(YE(e), n))
  35963. }), this), t
  35964. }, e.prototype.eachTargetAxis = function (t, e) {
  35965. this._targetAxisInfoMap.each((function (n, i) {
  35966. E(n.indexList, (function (n) {
  35967. t.call(e, i, n)
  35968. }))
  35969. }))
  35970. }, e.prototype.getAxisProxy = function (t, e) {
  35971. var n = this.getAxisModel(t, e);
  35972. if (n) return n.__dzAxisProxy
  35973. }, e.prototype.getAxisModel = function (t, e) {
  35974. var n = this._targetAxisInfoMap.get(t);
  35975. if (n && n.indexMap[e]) return this.ecModel.getComponent(YE(t), e)
  35976. }, e.prototype.setRawRange = function (t) {
  35977. var e = this.option,
  35978. n = this.settledOption;
  35979. E([
  35980. ["start", "startValue"],
  35981. ["end", "endValue"]
  35982. ], (function (i) {
  35983. null == t[i[0]] && null == t[i[1]] || (e[i[0]] = n[i[0]] = t[i[0]], e[i[1]] = n[i[1]] = t[i[1]])
  35984. }), this), this._updateRangeUse(t)
  35985. }, e.prototype.setCalculatedRange = function (t) {
  35986. var e = this.option;
  35987. E(["start", "startValue", "end", "endValue"], (function (n) {
  35988. e[n] = t[n]
  35989. }))
  35990. }, e.prototype.getPercentRange = function () {
  35991. var t = this.findRepresentativeAxisProxy();
  35992. if (t) return t.getDataPercentWindow()
  35993. }, e.prototype.getValueRange = function (t, e) {
  35994. if (null != t || null != e) return this.getAxisProxy(t, e).getDataValueWindow();
  35995. var n = this.findRepresentativeAxisProxy();
  35996. return n ? n.getDataValueWindow() : void 0
  35997. }, e.prototype.findRepresentativeAxisProxy = function (t) {
  35998. if (t) return t.__dzAxisProxy;
  35999. for (var e, n = this._targetAxisInfoMap.keys(), i = 0; i < n.length; i++)
  36000. for (var r = n[i], o = this._targetAxisInfoMap.get(r), a = 0; a < o.indexList.length; a++) {
  36001. var s = this.getAxisProxy(r, o.indexList[a]);
  36002. if (s.hostedBy(this)) return s;
  36003. e || (e = s)
  36004. }
  36005. return e
  36006. }, e.prototype.getRangePropMode = function () {
  36007. return this._rangePropMode.slice()
  36008. }, e.prototype.getOrient = function () {
  36009. return this._orient
  36010. }, e.type = "dataZoom", e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"], e.defaultOption = {
  36011. z: 4,
  36012. filterMode: "filter",
  36013. start: 0,
  36014. end: 100
  36015. }, e
  36016. }(Rp);
  36017. function qE(t) {
  36018. var e = {};
  36019. return E(["start", "end", "startValue", "endValue", "throttle"], (function (n) {
  36020. t.hasOwnProperty(n) && (e[n] = t[n])
  36021. })), e
  36022. }
  36023. var KE = function (t) {
  36024. function e() {
  36025. var n = null !== t && t.apply(this, arguments) || this;
  36026. return n.type = e.type, n
  36027. }
  36028. return n(e, t), e.type = "dataZoom.select", e
  36029. }(jE),
  36030. $E = function (t) {
  36031. function e() {
  36032. var n = null !== t && t.apply(this, arguments) || this;
  36033. return n.type = e.type, n
  36034. }
  36035. return n(e, t), e.prototype.render = function (t, e, n, i) {
  36036. this.dataZoomModel = t, this.ecModel = e, this.api = n
  36037. }, e.type = "dataZoom", e
  36038. }(Tg),
  36039. JE = function (t) {
  36040. function e() {
  36041. var n = null !== t && t.apply(this, arguments) || this;
  36042. return n.type = e.type, n
  36043. }
  36044. return n(e, t), e.type = "dataZoom.select", e
  36045. }($E),
  36046. QE = E,
  36047. tz = jr,
  36048. ez = function () {
  36049. function t(t, e, n, i) {
  36050. this._dimName = t, this._axisIndex = e, this.ecModel = i, this._dataZoomModel = n
  36051. }
  36052. return t.prototype.hostedBy = function (t) {
  36053. return this._dataZoomModel === t
  36054. }, t.prototype.getDataValueWindow = function () {
  36055. return this._valueWindow.slice()
  36056. }, t.prototype.getDataPercentWindow = function () {
  36057. return this._percentWindow.slice()
  36058. }, t.prototype.getTargetSeriesModels = function () {
  36059. var t = [];
  36060. return this.ecModel.eachSeries((function (e) {
  36061. if (function (t) {
  36062. var e = t.get("coordinateSystem");
  36063. return P(HE, e) >= 0
  36064. }(e)) {
  36065. var n = YE(this._dimName),
  36066. i = e.getReferringComponents(n, zo).models[0];
  36067. i && this._axisIndex === i.componentIndex && t.push(e)
  36068. }
  36069. }), this), t
  36070. }, t.prototype.getAxisModel = function () {
  36071. return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex)
  36072. }, t.prototype.getMinMaxSpan = function () {
  36073. return T(this._minMaxSpan)
  36074. }, t.prototype.calculateDataWindow = function (t) {
  36075. var e, n = this._dataExtent,
  36076. i = this.getAxisModel().axis.scale,
  36077. r = this._dataZoomModel.getRangePropMode(),
  36078. o = [0, 100],
  36079. a = [],
  36080. s = [];
  36081. QE(["start", "end"], (function (l, u) {
  36082. var h = t[l],
  36083. c = t[l + "Value"];
  36084. "percent" === r[u] ? (null == h && (h = o[u]), c = i.parse(Xr(h, o, n))) : (e = !0, h = Xr(c = null == c ? n[u] : i.parse(c), n, o)), s[u] = null == c || isNaN(c) ? n[u] : c, a[u] = null == h || isNaN(h) ? o[u] : h
  36085. })), tz(s), tz(a);
  36086. var l = this._minMaxSpan;
  36087. function u(t, e, n, r, o) {
  36088. var a = o ? "Span" : "ValueSpan";
  36089. Tk(0, t, n, "all", l["min" + a], l["max" + a]);
  36090. for (var s = 0; s < 2; s++) e[s] = Xr(t[s], n, r, !0), o && (e[s] = i.parse(e[s]))
  36091. }
  36092. return e ? u(s, a, n, o, !1) : u(a, s, o, n, !0), {
  36093. valueWindow: s,
  36094. percentWindow: a
  36095. }
  36096. }, t.prototype.reset = function (t) {
  36097. if (t === this._dataZoomModel) {
  36098. var e = this.getTargetSeriesModels();
  36099. this._dataExtent = function (t, e, n) {
  36100. var i = [1 / 0, -1 / 0];
  36101. QE(n, (function (t) {
  36102. ! function (t, e, n) {
  36103. e && E(M_(e, n), (function (n) {
  36104. var i = e.getApproximateExtent(n);
  36105. i[0] < t[0] && (t[0] = i[0]), i[1] > t[1] && (t[1] = i[1])
  36106. }))
  36107. }(i, t.getData(), e)
  36108. }));
  36109. var r = t.getAxisModel(),
  36110. o = f_(r.axis.scale, r, i).calculate();
  36111. return [o.min, o.max]
  36112. }(this, this._dimName, e), this._updateMinMaxSpan();
  36113. var n = this.calculateDataWindow(t.settledOption);
  36114. this._valueWindow = n.valueWindow, this._percentWindow = n.percentWindow, this._setAxisModel()
  36115. }
  36116. }, t.prototype.filterData = function (t, e) {
  36117. if (t === this._dataZoomModel) {
  36118. var n = this._dimName,
  36119. i = this.getTargetSeriesModels(),
  36120. r = t.get("filterMode"),
  36121. o = this._valueWindow;
  36122. "none" !== r && QE(i, (function (t) {
  36123. var e = t.getData(),
  36124. i = e.mapDimensionsAll(n);
  36125. if (i.length) {
  36126. if ("weakFilter" === r) {
  36127. var a = e.getStore(),
  36128. s = z(i, (function (t) {
  36129. return e.getDimensionIndex(t)
  36130. }), e);
  36131. e.filterSelf((function (t) {
  36132. for (var e, n, r, l = 0; l < i.length; l++) {
  36133. var u = a.get(s[l], t),
  36134. h = !isNaN(u),
  36135. c = u < o[0],
  36136. p = u > o[1];
  36137. if (h && !c && !p) return !0;
  36138. h && (r = !0), c && (e = !0), p && (n = !0)
  36139. }
  36140. return r && e && n
  36141. }))
  36142. } else QE(i, (function (n) {
  36143. if ("empty" === r) t.setData(e = e.map(n, (function (t) {
  36144. return function (t) {
  36145. return t >= o[0] && t <= o[1]
  36146. }(t) ? t : NaN
  36147. })));
  36148. else {
  36149. var i = {};
  36150. i[n] = o, e.selectRange(i)
  36151. }
  36152. }));
  36153. QE(i, (function (t) {
  36154. e.setApproximateExtent(o, t)
  36155. }))
  36156. }
  36157. }))
  36158. }
  36159. }, t.prototype._updateMinMaxSpan = function () {
  36160. var t = this._minMaxSpan = {},
  36161. e = this._dataZoomModel,
  36162. n = this._dataExtent;
  36163. QE(["min", "max"], (function (i) {
  36164. var r = e.get(i + "Span"),
  36165. o = e.get(i + "ValueSpan");
  36166. null != o && (o = this.getAxisModel().axis.scale.parse(o)), null != o ? r = Xr(n[0] + o, n, [0, 100], !0) : null != r && (o = Xr(r, [0, 100], n, !0) - n[0]), t[i + "Span"] = r, t[i + "ValueSpan"] = o
  36167. }), this)
  36168. }, t.prototype._setAxisModel = function () {
  36169. var t = this.getAxisModel(),
  36170. e = this._percentWindow,
  36171. n = this._valueWindow;
  36172. if (e) {
  36173. var i = $r(n, [0, 500]);
  36174. i = Math.min(i, 20);
  36175. var r = t.axis.scale.rawExtentInfo;
  36176. 0 !== e[0] && r.setDeterminedMinMax("min", +n[0].toFixed(i)), 100 !== e[1] && r.setDeterminedMinMax("max", +n[1].toFixed(i)), r.freeze()
  36177. }
  36178. }, t
  36179. }();
  36180. var nz = {
  36181. getTargetSeries: function (t) {
  36182. function e(e) {
  36183. t.eachComponent("dataZoom", (function (n) {
  36184. n.eachTargetAxis((function (i, r) {
  36185. var o = t.getComponent(YE(i), r);
  36186. e(i, r, o, n)
  36187. }))
  36188. }))
  36189. }
  36190. e((function (t, e, n, i) {
  36191. n.__dzAxisProxy = null
  36192. }));
  36193. var n = [];
  36194. e((function (e, i, r, o) {
  36195. r.__dzAxisProxy || (r.__dzAxisProxy = new ez(e, i, o, t), n.push(r.__dzAxisProxy))
  36196. }));
  36197. var i = yt();
  36198. return E(n, (function (t) {
  36199. E(t.getTargetSeriesModels(), (function (t) {
  36200. i.set(t.uid, t)
  36201. }))
  36202. })), i
  36203. },
  36204. overallReset: function (t, e) {
  36205. t.eachComponent("dataZoom", (function (t) {
  36206. t.eachTargetAxis((function (e, n) {
  36207. t.getAxisProxy(e, n).reset(t)
  36208. })), t.eachTargetAxis((function (n, i) {
  36209. t.getAxisProxy(n, i).filterData(t, e)
  36210. }))
  36211. })), t.eachComponent("dataZoom", (function (t) {
  36212. var e = t.findRepresentativeAxisProxy();
  36213. if (e) {
  36214. var n = e.getDataPercentWindow(),
  36215. i = e.getDataValueWindow();
  36216. t.setCalculatedRange({
  36217. start: n[0],
  36218. end: n[1],
  36219. startValue: i[0],
  36220. endValue: i[1]
  36221. })
  36222. }
  36223. }))
  36224. }
  36225. };
  36226. var iz = !1;
  36227. function rz(t) {
  36228. iz || (iz = !0, t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, nz), function (t) {
  36229. t.registerAction("dataZoom", (function (t, e) {
  36230. E(XE(e, t), (function (e) {
  36231. e.setRawRange({
  36232. start: t.start,
  36233. end: t.end,
  36234. startValue: t.startValue,
  36235. endValue: t.endValue
  36236. })
  36237. }))
  36238. }))
  36239. }(t), t.registerSubTypeDefaulter("dataZoom", (function () {
  36240. return "slider"
  36241. })))
  36242. }
  36243. function oz(t) {
  36244. t.registerComponentModel(KE), t.registerComponentView(JE), rz(t)
  36245. }
  36246. var az = function () {},
  36247. sz = {};
  36248. function lz(t, e) {
  36249. sz[t] = e
  36250. }
  36251. function uz(t) {
  36252. return sz[t]
  36253. }
  36254. var hz = function (t) {
  36255. function e() {
  36256. var n = null !== t && t.apply(this, arguments) || this;
  36257. return n.type = e.type, n
  36258. }
  36259. return n(e, t), e.prototype.optionUpdated = function () {
  36260. t.prototype.optionUpdated.apply(this, arguments);
  36261. var e = this.ecModel;
  36262. E(this.option.feature, (function (t, n) {
  36263. var i = uz(n);
  36264. i && (i.getDefaultOption && (i.defaultOption = i.getDefaultOption(e)), C(t, i.defaultOption))
  36265. }))
  36266. }, e.type = "toolbox", e.layoutMode = {
  36267. type: "box",
  36268. ignoreSize: !0
  36269. }, e.defaultOption = {
  36270. show: !0,
  36271. z: 6,
  36272. orient: "horizontal",
  36273. left: "right",
  36274. top: "top",
  36275. backgroundColor: "transparent",
  36276. borderColor: "#ccc",
  36277. borderRadius: 0,
  36278. borderWidth: 0,
  36279. padding: 5,
  36280. itemSize: 15,
  36281. itemGap: 8,
  36282. showTitle: !0,
  36283. iconStyle: {
  36284. borderColor: "#666",
  36285. color: "none"
  36286. },
  36287. emphasis: {
  36288. iconStyle: {
  36289. borderColor: "#3E98C5"
  36290. }
  36291. },
  36292. tooltip: {
  36293. show: !1,
  36294. position: "bottom"
  36295. }
  36296. }, e
  36297. }(Rp);
  36298. function cz(t, e) {
  36299. var n = fp(e.get("padding")),
  36300. i = e.getItemStyle(["color", "opacity"]);
  36301. return i.fill = e.get("backgroundColor"), t = new zs({
  36302. shape: {
  36303. x: t.x - n[3],
  36304. y: t.y - n[0],
  36305. width: t.width + n[1] + n[3],
  36306. height: t.height + n[0] + n[2],
  36307. r: e.get("borderRadius")
  36308. },
  36309. style: i,
  36310. silent: !0,
  36311. z2: -1
  36312. })
  36313. }
  36314. var pz = function (t) {
  36315. function e() {
  36316. return null !== t && t.apply(this, arguments) || this
  36317. }
  36318. return n(e, t), e.prototype.render = function (t, e, n, i) {
  36319. var r = this.group;
  36320. if (r.removeAll(), t.get("show")) {
  36321. var o = +t.get("itemSize"),
  36322. a = "vertical" === t.get("orient"),
  36323. s = t.get("feature") || {},
  36324. l = this._features || (this._features = {}),
  36325. u = [];
  36326. E(s, (function (t, e) {
  36327. u.push(e)
  36328. })), new Vm(this._featureNames || [], u).add(h).update(h).remove(H(h, null)).execute(), this._featureNames = u,
  36329. function (t, e, n) {
  36330. var i = e.getBoxLayoutParams(),
  36331. r = e.get("padding"),
  36332. o = {
  36333. width: n.getWidth(),
  36334. height: n.getHeight()
  36335. },
  36336. a = Cp(i, o, r);
  36337. Tp(e.get("orient"), t, e.get("itemGap"), a.width, a.height), Dp(t, i, o, r)
  36338. }(r, t, n), r.add(cz(r.getBoundingRect(), t)), a || r.eachChild((function (t) {
  36339. var e = t.__title,
  36340. i = t.ensureState("emphasis"),
  36341. a = i.textConfig || (i.textConfig = {}),
  36342. s = t.getTextContent(),
  36343. l = s && s.ensureState("emphasis");
  36344. if (l && !X(l) && e) {
  36345. var u = l.style || (l.style = {}),
  36346. h = br(e, Fs.makeFont(u)),
  36347. c = t.x + r.x,
  36348. p = !1;
  36349. t.y + r.y + o + h.height > n.getHeight() && (a.position = "top", p = !0);
  36350. var d = p ? -5 - h.height : o + 10;
  36351. c + h.width / 2 > n.getWidth() ? (a.position = ["100%", d], u.align = "right") : c - h.width / 2 < 0 && (a.position = [0, d], u.align = "left")
  36352. }
  36353. }))
  36354. }
  36355. function h(h, c) {
  36356. var p, d = u[h],
  36357. f = u[c],
  36358. g = s[d],
  36359. y = new Mc(g, t, t.ecModel);
  36360. if (i && null != i.newTitle && i.featureName === d && (g.title = i.newTitle), d && !f) {
  36361. if (function (t) {
  36362. return 0 === t.indexOf("my")
  36363. }(d)) p = {
  36364. onclick: y.option.onclick,
  36365. featureName: d
  36366. };
  36367. else {
  36368. var v = uz(d);
  36369. if (!v) return;
  36370. p = new v
  36371. }
  36372. l[d] = p
  36373. } else if (!(p = l[f])) return;
  36374. p.uid = Tc("toolbox-feature"), p.model = y, p.ecModel = e, p.api = n;
  36375. var m = p instanceof az;
  36376. d || !f ? !y.get("show") || m && p.unusable ? m && p.remove && p.remove(e, n) : (! function (i, s, l) {
  36377. var u, h, c = i.getModel("iconStyle"),
  36378. p = i.getModel(["emphasis", "iconStyle"]),
  36379. d = s instanceof az && s.getIcons ? s.getIcons() : i.get("icon"),
  36380. f = i.get("title") || {};
  36381. U(d) ? (u = {})[l] = d : u = d;
  36382. U(f) ? (h = {})[l] = f : h = f;
  36383. var g = i.iconPaths = {};
  36384. E(u, (function (l, u) {
  36385. var d = Hh(l, {}, {
  36386. x: -o / 2,
  36387. y: -o / 2,
  36388. width: o,
  36389. height: o
  36390. });
  36391. d.setStyle(c.getItemStyle()), d.ensureState("emphasis").style = p.getItemStyle();
  36392. var f = new Fs({
  36393. style: {
  36394. text: h[u],
  36395. align: p.get("textAlign"),
  36396. borderRadius: p.get("textBorderRadius"),
  36397. padding: p.get("textPadding"),
  36398. fill: null
  36399. },
  36400. ignore: !0
  36401. });
  36402. d.setTextContent(f), Zh({
  36403. el: d,
  36404. componentModel: t,
  36405. itemName: u,
  36406. formatterParamsExtra: {
  36407. title: h[u]
  36408. }
  36409. }), d.__title = h[u], d.on("mouseover", (function () {
  36410. var e = p.getItemStyle(),
  36411. i = a ? null == t.get("right") && "right" !== t.get("left") ? "right" : "left" : null == t.get("bottom") && "bottom" !== t.get("top") ? "bottom" : "top";
  36412. f.setStyle({
  36413. fill: p.get("textFill") || e.fill || e.stroke || "#000",
  36414. backgroundColor: p.get("textBackgroundColor")
  36415. }), d.setTextConfig({
  36416. position: p.get("textPosition") || i
  36417. }), f.ignore = !t.get("showTitle"), n.enterEmphasis(this)
  36418. })).on("mouseout", (function () {
  36419. "emphasis" !== i.get(["iconStatus", u]) && n.leaveEmphasis(this), f.hide()
  36420. })), ("emphasis" === i.get(["iconStatus", u]) ? kl : Ll)(d), r.add(d), d.on("click", W(s.onclick, s, e, n, u)), g[u] = d
  36421. }))
  36422. }(y, p, d), y.setIconStatus = function (t, e) {
  36423. var n = this.option,
  36424. i = this.iconPaths;
  36425. n.iconStatus = n.iconStatus || {}, n.iconStatus[t] = e, i[t] && ("emphasis" === e ? kl : Ll)(i[t])
  36426. }, p instanceof az && p.render && p.render(y, e, n, i)) : m && p.dispose && p.dispose(e, n)
  36427. }
  36428. }, e.prototype.updateView = function (t, e, n, i) {
  36429. E(this._features, (function (t) {
  36430. t instanceof az && t.updateView && t.updateView(t.model, e, n, i)
  36431. }))
  36432. }, e.prototype.remove = function (t, e) {
  36433. E(this._features, (function (n) {
  36434. n instanceof az && n.remove && n.remove(t, e)
  36435. })), this.group.removeAll()
  36436. }, e.prototype.dispose = function (t, e) {
  36437. E(this._features, (function (n) {
  36438. n instanceof az && n.dispose && n.dispose(t, e)
  36439. }))
  36440. }, e.type = "toolbox", e
  36441. }(Tg);
  36442. var dz = function (t) {
  36443. function e() {
  36444. return null !== t && t.apply(this, arguments) || this
  36445. }
  36446. return n(e, t), e.prototype.onclick = function (t, e) {
  36447. var n = this.model,
  36448. i = n.get("name") || t.get("title.0.text") || "echarts",
  36449. o = "svg" === e.getZr().painter.getType(),
  36450. a = o ? "svg" : n.get("type", !0) || "png",
  36451. s = e.getConnectedDataURL({
  36452. type: a,
  36453. backgroundColor: n.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff",
  36454. connectedBackgroundColor: n.get("connectedBackgroundColor"),
  36455. excludeComponents: n.get("excludeComponents"),
  36456. pixelRatio: n.get("pixelRatio")
  36457. }),
  36458. l = r.browser;
  36459. if (X(MouseEvent) && (l.newEdge || !l.ie && !l.edge)) {
  36460. var u = document.createElement("a");
  36461. u.download = i + "." + a, u.target = "_blank", u.href = s;
  36462. var h = new MouseEvent("click", {
  36463. view: document.defaultView,
  36464. bubbles: !0,
  36465. cancelable: !1
  36466. });
  36467. u.dispatchEvent(h)
  36468. } else if (window.navigator.msSaveOrOpenBlob || o) {
  36469. var c = s.split(","),
  36470. p = c[0].indexOf("base64") > -1,
  36471. d = o ? decodeURIComponent(c[1]) : c[1];
  36472. p && (d = window.atob(d));
  36473. var f = i + "." + a;
  36474. if (window.navigator.msSaveOrOpenBlob) {
  36475. for (var g = d.length, y = new Uint8Array(g); g--;) y[g] = d.charCodeAt(g);
  36476. var v = new Blob([y]);
  36477. window.navigator.msSaveOrOpenBlob(v, f)
  36478. } else {
  36479. var m = document.createElement("iframe");
  36480. document.body.appendChild(m);
  36481. var x = m.contentWindow,
  36482. _ = x.document;
  36483. _.open("image/svg+xml", "replace"), _.write(d), _.close(), x.focus(), _.execCommand("SaveAs", !0, f), document.body.removeChild(m)
  36484. }
  36485. } else {
  36486. var b = n.get("lang"),
  36487. w = '<body style="margin:0;"><img src="' + s + '" style="max-width:100%;" title="' + (b && b[0] || "") + '" /></body>',
  36488. S = window.open();
  36489. S.document.write(w), S.document.title = i
  36490. }
  36491. }, e.getDefaultOption = function (t) {
  36492. return {
  36493. show: !0,
  36494. icon: "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",
  36495. title: t.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
  36496. type: "png",
  36497. connectedBackgroundColor: "#fff",
  36498. name: "",
  36499. excludeComponents: ["toolbox"],
  36500. lang: t.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
  36501. }
  36502. }, e
  36503. }(az),
  36504. fz = "__ec_magicType_stack__",
  36505. gz = [
  36506. ["line", "bar"],
  36507. ["stack"]
  36508. ],
  36509. yz = function (t) {
  36510. function e() {
  36511. return null !== t && t.apply(this, arguments) || this
  36512. }
  36513. return n(e, t), e.prototype.getIcons = function () {
  36514. var t = this.model,
  36515. e = t.get("icon"),
  36516. n = {};
  36517. return E(t.get("type"), (function (t) {
  36518. e[t] && (n[t] = e[t])
  36519. })), n
  36520. }, e.getDefaultOption = function (t) {
  36521. return {
  36522. show: !0,
  36523. type: [],
  36524. icon: {
  36525. line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
  36526. bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
  36527. stack: "M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"
  36528. },
  36529. title: t.getLocaleModel().get(["toolbox", "magicType", "title"]),
  36530. option: {},
  36531. seriesIndex: {}
  36532. }
  36533. }, e.prototype.onclick = function (t, e, n) {
  36534. var i = this.model,
  36535. r = i.get(["seriesIndex", n]);
  36536. if (vz[n]) {
  36537. var o, a = {
  36538. series: []
  36539. };
  36540. E(gz, (function (t) {
  36541. P(t, n) >= 0 && E(t, (function (t) {
  36542. i.setIconStatus(t, "normal")
  36543. }))
  36544. })), i.setIconStatus(n, "emphasis"), t.eachComponent({
  36545. mainType: "series",
  36546. query: null == r ? null : {
  36547. seriesIndex: r
  36548. }
  36549. }, (function (t) {
  36550. var e = t.subType,
  36551. r = t.id,
  36552. o = vz[n](e, r, t, i);
  36553. o && (k(o, t.option), a.series.push(o));
  36554. var s = t.coordinateSystem;
  36555. if (s && "cartesian2d" === s.type && ("line" === n || "bar" === n)) {
  36556. var l = s.getAxesByScale("ordinal")[0];
  36557. if (l) {
  36558. var u = l.dim + "Axis",
  36559. h = t.getReferringComponents(u, zo).models[0].componentIndex;
  36560. a[u] = a[u] || [];
  36561. for (var c = 0; c <= h; c++) a[u][h] = a[u][h] || {};
  36562. a[u][h].boundaryGap = "bar" === n
  36563. }
  36564. }
  36565. }));
  36566. var s = n;
  36567. "stack" === n && (o = C({
  36568. stack: i.option.title.tiled,
  36569. tiled: i.option.title.stack
  36570. }, i.option.title), "emphasis" !== i.get(["iconStatus", n]) && (s = "tiled")), e.dispatchAction({
  36571. type: "changeMagicType",
  36572. currentType: s,
  36573. newOption: a,
  36574. newTitle: o,
  36575. featureName: "magicType"
  36576. })
  36577. }
  36578. }, e
  36579. }(az),
  36580. vz = {
  36581. line: function (t, e, n, i) {
  36582. if ("bar" === t) return C({
  36583. id: e,
  36584. type: "line",
  36585. data: n.get("data"),
  36586. stack: n.get("stack"),
  36587. markPoint: n.get("markPoint"),
  36588. markLine: n.get("markLine")
  36589. }, i.get(["option", "line"]) || {}, !0)
  36590. },
  36591. bar: function (t, e, n, i) {
  36592. if ("line" === t) return C({
  36593. id: e,
  36594. type: "bar",
  36595. data: n.get("data"),
  36596. stack: n.get("stack"),
  36597. markPoint: n.get("markPoint"),
  36598. markLine: n.get("markLine")
  36599. }, i.get(["option", "bar"]) || {}, !0)
  36600. },
  36601. stack: function (t, e, n, i) {
  36602. var r = n.get("stack") === fz;
  36603. if ("line" === t || "bar" === t) return i.setIconStatus("stack", r ? "normal" : "emphasis"), C({
  36604. id: e,
  36605. stack: r ? "" : fz
  36606. }, i.get(["option", "stack"]) || {}, !0)
  36607. }
  36608. };
  36609. Mm({
  36610. type: "changeMagicType",
  36611. event: "magicTypeChanged",
  36612. update: "prepareAndUpdate"
  36613. }, (function (t, e) {
  36614. e.mergeOption(t.newOption)
  36615. }));
  36616. var mz = new Array(60).join("-"),
  36617. xz = "\t";
  36618. function _z(t) {
  36619. return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "")
  36620. }
  36621. var bz = new RegExp("[\t]+", "g");
  36622. function wz(t, e) {
  36623. var n = t.split(new RegExp("\n*" + mz + "\n*", "g")),
  36624. i = {
  36625. series: []
  36626. };
  36627. return E(n, (function (t, n) {
  36628. if (function (t) {
  36629. if (t.slice(0, t.indexOf("\n")).indexOf(xz) >= 0) return !0
  36630. }(t)) {
  36631. var r = function (t) {
  36632. for (var e = t.split(/\n+/g), n = [], i = z(_z(e.shift()).split(bz), (function (t) {
  36633. return {
  36634. name: t,
  36635. data: []
  36636. }
  36637. })), r = 0; r < e.length; r++) {
  36638. var o = _z(e[r]).split(bz);
  36639. n.push(o.shift());
  36640. for (var a = 0; a < o.length; a++) i[a] && (i[a].data[r] = o[a])
  36641. }
  36642. return {
  36643. series: i,
  36644. categories: n
  36645. }
  36646. }(t),
  36647. o = e[n],
  36648. a = o.axisDim + "Axis";
  36649. o && (i[a] = i[a] || [], i[a][o.axisIndex] = {
  36650. data: r.categories
  36651. }, i.series = i.series.concat(r.series))
  36652. } else {
  36653. r = function (t) {
  36654. for (var e = t.split(/\n+/g), n = _z(e.shift()), i = [], r = 0; r < e.length; r++) {
  36655. var o = _z(e[r]);
  36656. if (o) {
  36657. var a = o.split(bz),
  36658. s = "",
  36659. l = void 0,
  36660. u = !1;
  36661. isNaN(a[0]) ? (u = !0, s = a[0], a = a.slice(1), i[r] = {
  36662. name: s,
  36663. value: []
  36664. }, l = i[r].value) : l = i[r] = [];
  36665. for (var h = 0; h < a.length; h++) l.push(+a[h]);
  36666. 1 === l.length && (u ? i[r].value = l[0] : i[r] = l[0])
  36667. }
  36668. }
  36669. return {
  36670. name: n,
  36671. data: i
  36672. }
  36673. }(t);
  36674. i.series.push(r)
  36675. }
  36676. })), i
  36677. }
  36678. var Sz = function (t) {
  36679. function e() {
  36680. return null !== t && t.apply(this, arguments) || this
  36681. }
  36682. return n(e, t), e.prototype.onclick = function (t, e) {
  36683. setTimeout((function () {
  36684. e.dispatchAction({
  36685. type: "hideTip"
  36686. })
  36687. }));
  36688. var n = e.getDom(),
  36689. i = this.model;
  36690. this._dom && n.removeChild(this._dom);
  36691. var r = document.createElement("div");
  36692. r.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", r.style.backgroundColor = i.get("backgroundColor") || "#fff";
  36693. var o = document.createElement("h4"),
  36694. a = i.get("lang") || [];
  36695. o.innerHTML = a[0] || i.get("title"), o.style.cssText = "margin:10px 20px", o.style.color = i.get("textColor");
  36696. var s = document.createElement("div"),
  36697. l = document.createElement("textarea");
  36698. s.style.cssText = "overflow:auto";
  36699. var u = i.get("optionToContent"),
  36700. h = i.get("contentToOption"),
  36701. c = function (t) {
  36702. var e, n, i, r = function (t) {
  36703. var e = {},
  36704. n = [],
  36705. i = [];
  36706. return t.eachRawSeries((function (t) {
  36707. var r = t.coordinateSystem;
  36708. if (!r || "cartesian2d" !== r.type && "polar" !== r.type) n.push(t);
  36709. else {
  36710. var o = r.getBaseAxis();
  36711. if ("category" === o.type) {
  36712. var a = o.dim + "_" + o.index;
  36713. e[a] || (e[a] = {
  36714. categoryAxis: o,
  36715. valueAxis: r.getOtherAxis(o),
  36716. series: []
  36717. }, i.push({
  36718. axisDim: o.dim,
  36719. axisIndex: o.index
  36720. })), e[a].series.push(t)
  36721. } else n.push(t)
  36722. }
  36723. })), {
  36724. seriesGroupByCategoryAxis: e,
  36725. other: n,
  36726. meta: i
  36727. }
  36728. }(t);
  36729. return {
  36730. value: B([(n = r.seriesGroupByCategoryAxis, i = [], E(n, (function (t, e) {
  36731. var n = t.categoryAxis,
  36732. r = t.valueAxis.dim,
  36733. o = [" "].concat(z(t.series, (function (t) {
  36734. return t.name
  36735. }))),
  36736. a = [n.model.getCategories()];
  36737. E(t.series, (function (t) {
  36738. var e = t.getRawData();
  36739. a.push(t.getRawData().mapArray(e.mapDimension(r), (function (t) {
  36740. return t
  36741. })))
  36742. }));
  36743. for (var s = [o.join(xz)], l = 0; l < a[0].length; l++) {
  36744. for (var u = [], h = 0; h < a.length; h++) u.push(a[h][l]);
  36745. s.push(u.join(xz))
  36746. }
  36747. i.push(s.join("\n"))
  36748. })), i.join("\n\n" + mz + "\n\n")), (e = r.other, z(e, (function (t) {
  36749. var e = t.getRawData(),
  36750. n = [t.name],
  36751. i = [];
  36752. return e.each(e.dimensions, (function () {
  36753. for (var t = arguments.length, r = arguments[t - 1], o = e.getName(r), a = 0; a < t - 1; a++) i[a] = arguments[a];
  36754. n.push((o ? o + xz : "") + i.join(xz))
  36755. })), n.join("\n")
  36756. })).join("\n\n" + mz + "\n\n"))], (function (t) {
  36757. return !!t.replace(/[\n\t\s]/g, "")
  36758. })).join("\n\n" + mz + "\n\n"),
  36759. meta: r.meta
  36760. }
  36761. }(t);
  36762. if (X(u)) {
  36763. var p = u(e.getOption());
  36764. U(p) ? s.innerHTML = p : J(p) && s.appendChild(p)
  36765. } else {
  36766. l.readOnly = i.get("readOnly");
  36767. var d = l.style;
  36768. d.cssText = "display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none", d.color = i.get("textColor"), d.borderColor = i.get("textareaBorderColor"), d.backgroundColor = i.get("textareaColor"), l.value = c.value, s.appendChild(l)
  36769. }
  36770. var f = c.meta,
  36771. g = document.createElement("div");
  36772. g.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
  36773. var y = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",
  36774. v = document.createElement("div"),
  36775. m = document.createElement("div");
  36776. y += ";background-color:" + i.get("buttonColor"), y += ";color:" + i.get("buttonTextColor");
  36777. var x = this;
  36778. function _() {
  36779. n.removeChild(r), x._dom = null
  36780. }
  36781. pe(v, "click", _), pe(m, "click", (function () {
  36782. if (null == h && null != u || null != h && null == u) _();
  36783. else {
  36784. var t;
  36785. try {
  36786. t = X(h) ? h(s, e.getOption()) : wz(l.value, f)
  36787. } catch (t) {
  36788. throw _(), new Error("Data view format error " + t)
  36789. }
  36790. t && e.dispatchAction({
  36791. type: "changeDataView",
  36792. newOption: t
  36793. }), _()
  36794. }
  36795. })), v.innerHTML = a[1], m.innerHTML = a[2], m.style.cssText = v.style.cssText = y, !i.get("readOnly") && g.appendChild(m), g.appendChild(v), r.appendChild(o), r.appendChild(s), r.appendChild(g), s.style.height = n.clientHeight - 80 + "px", n.appendChild(r), this._dom = r
  36796. }, e.prototype.remove = function (t, e) {
  36797. this._dom && e.getDom().removeChild(this._dom)
  36798. }, e.prototype.dispose = function (t, e) {
  36799. this.remove(t, e)
  36800. }, e.getDefaultOption = function (t) {
  36801. return {
  36802. show: !0,
  36803. readOnly: !1,
  36804. optionToContent: null,
  36805. contentToOption: null,
  36806. icon: "M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",
  36807. title: t.getLocaleModel().get(["toolbox", "dataView", "title"]),
  36808. lang: t.getLocaleModel().get(["toolbox", "dataView", "lang"]),
  36809. backgroundColor: "#fff",
  36810. textColor: "#000",
  36811. textareaColor: "#fff",
  36812. textareaBorderColor: "#333",
  36813. buttonColor: "#c23531",
  36814. buttonTextColor: "#fff"
  36815. }
  36816. }, e
  36817. }(az);
  36818. function Mz(t, e) {
  36819. return z(t, (function (t, n) {
  36820. var i = e && e[n];
  36821. if (q(i) && !Y(i)) {
  36822. q(t) && !Y(t) || (t = {
  36823. value: t
  36824. });
  36825. var r = null != i.name && null == t.name;
  36826. return t = k(t, i), r && delete t.name, t
  36827. }
  36828. return t
  36829. }))
  36830. }
  36831. Mm({
  36832. type: "changeDataView",
  36833. event: "dataViewChanged",
  36834. update: "prepareAndUpdate"
  36835. }, (function (t, e) {
  36836. var n = [];
  36837. E(t.newOption.series, (function (t) {
  36838. var i = e.getSeriesByName(t.name)[0];
  36839. if (i) {
  36840. var r = i.get("data");
  36841. n.push({
  36842. name: t.name,
  36843. data: Mz(t.data, r)
  36844. })
  36845. } else n.push(A({
  36846. type: "scatter"
  36847. }, t))
  36848. })), e.mergeOption(k({
  36849. series: n
  36850. }, t.newOption))
  36851. }));
  36852. var Iz = E,
  36853. Tz = Oo();
  36854. function Cz(t) {
  36855. var e = Tz(t);
  36856. return e.snapshots || (e.snapshots = [{}]), e.snapshots
  36857. }
  36858. var Dz = function (t) {
  36859. function e() {
  36860. return null !== t && t.apply(this, arguments) || this
  36861. }
  36862. return n(e, t), e.prototype.onclick = function (t, e) {
  36863. ! function (t) {
  36864. Tz(t).snapshots = null
  36865. }(t), e.dispatchAction({
  36866. type: "restore",
  36867. from: this.uid
  36868. })
  36869. }, e.getDefaultOption = function (t) {
  36870. return {
  36871. show: !0,
  36872. icon: "M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",
  36873. title: t.getLocaleModel().get(["toolbox", "restore", "title"])
  36874. }
  36875. }, e
  36876. }(az);
  36877. Mm({
  36878. type: "restore",
  36879. event: "restore",
  36880. update: "prepareAndUpdate"
  36881. }, (function (t, e) {
  36882. e.resetOption("recreate")
  36883. }));
  36884. var Az = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"],
  36885. kz = function () {
  36886. function t(t, e, n) {
  36887. var i = this;
  36888. this._targetInfoList = [];
  36889. var r = Pz(e, t);
  36890. E(Oz, (function (t, e) {
  36891. (!n || !n.include || P(n.include, e) >= 0) && t(r, i._targetInfoList)
  36892. }))
  36893. }
  36894. return t.prototype.setOutputRanges = function (t, e) {
  36895. return this.matchOutputRanges(t, e, (function (t, e, n) {
  36896. if ((t.coordRanges || (t.coordRanges = [])).push(e), !t.coordRange) {
  36897. t.coordRange = e;
  36898. var i = Ez[t.brushType](0, n, e);
  36899. t.__rangeOffset = {
  36900. offset: Vz[t.brushType](i.values, t.range, [1, 1]),
  36901. xyMinMax: i.xyMinMax
  36902. }
  36903. }
  36904. })), t
  36905. }, t.prototype.matchOutputRanges = function (t, e, n) {
  36906. E(t, (function (t) {
  36907. var i = this.findTargetInfo(t, e);
  36908. i && !0 !== i && E(i.coordSyses, (function (i) {
  36909. var r = Ez[t.brushType](1, i, t.range, !0);
  36910. n(t, r.values, i, e)
  36911. }))
  36912. }), this)
  36913. }, t.prototype.setInputRanges = function (t, e) {
  36914. E(t, (function (t) {
  36915. var n, i, r, o, a, s = this.findTargetInfo(t, e);
  36916. if (t.range = t.range || [], s && !0 !== s) {
  36917. t.panelId = s.panelId;
  36918. var l = Ez[t.brushType](0, s.coordSys, t.coordRange),
  36919. u = t.__rangeOffset;
  36920. t.range = u ? Vz[t.brushType](l.values, u.offset, (n = l.xyMinMax, i = u.xyMinMax, r = Fz(n), o = Fz(i), a = [r[0] / o[0], r[1] / o[1]], isNaN(a[0]) && (a[0] = 1), isNaN(a[1]) && (a[1] = 1), a)) : l.values
  36921. }
  36922. }), this)
  36923. }, t.prototype.makePanelOpts = function (t, e) {
  36924. return z(this._targetInfoList, (function (n) {
  36925. var i = n.getPanelRect();
  36926. return {
  36927. panelId: n.panelId,
  36928. defaultBrushType: e ? e(n) : null,
  36929. clipPath: DL(i),
  36930. isTargetByCursor: kL(i, t, n.coordSysModel),
  36931. getLinearBrushOtherExtent: AL(i)
  36932. }
  36933. }))
  36934. }, t.prototype.controlSeries = function (t, e, n) {
  36935. var i = this.findTargetInfo(t, n);
  36936. return !0 === i || i && P(i.coordSyses, e.coordinateSystem) >= 0
  36937. }, t.prototype.findTargetInfo = function (t, e) {
  36938. for (var n = this._targetInfoList, i = Pz(e, t), r = 0; r < n.length; r++) {
  36939. var o = n[r],
  36940. a = t.panelId;
  36941. if (a) {
  36942. if (o.panelId === a) return o
  36943. } else
  36944. for (var s = 0; s < Rz.length; s++)
  36945. if (Rz[s](i, o)) return o
  36946. }
  36947. return !0
  36948. }, t
  36949. }();
  36950. function Lz(t) {
  36951. return t[0] > t[1] && t.reverse(), t
  36952. }
  36953. function Pz(t, e) {
  36954. return No(t, e, {
  36955. includeMainTypes: Az
  36956. })
  36957. }
  36958. var Oz = {
  36959. grid: function (t, e) {
  36960. var n = t.xAxisModels,
  36961. i = t.yAxisModels,
  36962. r = t.gridModels,
  36963. o = yt(),
  36964. a = {},
  36965. s = {};
  36966. (n || i || r) && (E(n, (function (t) {
  36967. var e = t.axis.grid.model;
  36968. o.set(e.id, e), a[e.id] = !0
  36969. })), E(i, (function (t) {
  36970. var e = t.axis.grid.model;
  36971. o.set(e.id, e), s[e.id] = !0
  36972. })), E(r, (function (t) {
  36973. o.set(t.id, t), a[t.id] = !0, s[t.id] = !0
  36974. })), o.each((function (t) {
  36975. var r = t.coordinateSystem,
  36976. o = [];
  36977. E(r.getCartesians(), (function (t, e) {
  36978. (P(n, t.getAxis("x").model) >= 0 || P(i, t.getAxis("y").model) >= 0) && o.push(t)
  36979. })), e.push({
  36980. panelId: "grid--" + t.id,
  36981. gridModel: t,
  36982. coordSysModel: t,
  36983. coordSys: o[0],
  36984. coordSyses: o,
  36985. getPanelRect: Nz.grid,
  36986. xAxisDeclared: a[t.id],
  36987. yAxisDeclared: s[t.id]
  36988. })
  36989. })))
  36990. },
  36991. geo: function (t, e) {
  36992. E(t.geoModels, (function (t) {
  36993. var n = t.coordinateSystem;
  36994. e.push({
  36995. panelId: "geo--" + t.id,
  36996. geoModel: t,
  36997. coordSysModel: t,
  36998. coordSys: n,
  36999. coordSyses: [n],
  37000. getPanelRect: Nz.geo
  37001. })
  37002. }))
  37003. }
  37004. },
  37005. Rz = [function (t, e) {
  37006. var n = t.xAxisModel,
  37007. i = t.yAxisModel,
  37008. r = t.gridModel;
  37009. return !r && n && (r = n.axis.grid.model), !r && i && (r = i.axis.grid.model), r && r === e.gridModel
  37010. }, function (t, e) {
  37011. var n = t.geoModel;
  37012. return n && n === e.geoModel
  37013. }],
  37014. Nz = {
  37015. grid: function () {
  37016. return this.coordSys.master.getRect().clone()
  37017. },
  37018. geo: function () {
  37019. var t = this.coordSys,
  37020. e = t.getBoundingRect().clone();
  37021. return e.applyTransform(Eh(t)), e
  37022. }
  37023. },
  37024. Ez = {
  37025. lineX: H(zz, 0),
  37026. lineY: H(zz, 1),
  37027. rect: function (t, e, n, i) {
  37028. var r = t ? e.pointToData([n[0][0], n[1][0]], i) : e.dataToPoint([n[0][0], n[1][0]], i),
  37029. o = t ? e.pointToData([n[0][1], n[1][1]], i) : e.dataToPoint([n[0][1], n[1][1]], i),
  37030. a = [Lz([r[0], o[0]]), Lz([r[1], o[1]])];
  37031. return {
  37032. values: a,
  37033. xyMinMax: a
  37034. }
  37035. },
  37036. polygon: function (t, e, n, i) {
  37037. var r = [
  37038. [1 / 0, -1 / 0],
  37039. [1 / 0, -1 / 0]
  37040. ];
  37041. return {
  37042. values: z(n, (function (n) {
  37043. var o = t ? e.pointToData(n, i) : e.dataToPoint(n, i);
  37044. return r[0][0] = Math.min(r[0][0], o[0]), r[1][0] = Math.min(r[1][0], o[1]), r[0][1] = Math.max(r[0][1], o[0]), r[1][1] = Math.max(r[1][1], o[1]), o
  37045. })),
  37046. xyMinMax: r
  37047. }
  37048. }
  37049. };
  37050. function zz(t, e, n, i) {
  37051. var r = n.getAxis(["x", "y"][t]),
  37052. o = Lz(z([0, 1], (function (t) {
  37053. return e ? r.coordToData(r.toLocalCoord(i[t]), !0) : r.toGlobalCoord(r.dataToCoord(i[t]))
  37054. }))),
  37055. a = [];
  37056. return a[t] = o, a[1 - t] = [NaN, NaN], {
  37057. values: o,
  37058. xyMinMax: a
  37059. }
  37060. }
  37061. var Vz = {
  37062. lineX: H(Bz, 0),
  37063. lineY: H(Bz, 1),
  37064. rect: function (t, e, n) {
  37065. return [
  37066. [t[0][0] - n[0] * e[0][0], t[0][1] - n[0] * e[0][1]],
  37067. [t[1][0] - n[1] * e[1][0], t[1][1] - n[1] * e[1][1]]
  37068. ]
  37069. },
  37070. polygon: function (t, e, n) {
  37071. return z(t, (function (t, i) {
  37072. return [t[0] - n[0] * e[i][0], t[1] - n[1] * e[i][1]]
  37073. }))
  37074. }
  37075. };
  37076. function Bz(t, e, n, i) {
  37077. return [e[0] - i[t] * n[0], e[1] - i[t] * n[1]]
  37078. }
  37079. function Fz(t) {
  37080. return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN]
  37081. }
  37082. var Gz, Wz, Hz = E,
  37083. Yz = _o + "toolbox-dataZoom_",
  37084. Xz = function (t) {
  37085. function e() {
  37086. return null !== t && t.apply(this, arguments) || this
  37087. }
  37088. return n(e, t), e.prototype.render = function (t, e, n, i) {
  37089. this._brushController || (this._brushController = new $k(n.getZr()), this._brushController.on("brush", W(this._onBrush, this)).mount()),
  37090. function (t, e, n, i, r) {
  37091. var o = n._isZoomActive;
  37092. i && "takeGlobalCursor" === i.type && (o = "dataZoomSelect" === i.key && i.dataZoomSelectActive);
  37093. n._isZoomActive = o, t.setIconStatus("zoom", o ? "emphasis" : "normal");
  37094. var a = new kz(Zz(t), e, {
  37095. include: ["grid"]
  37096. }),
  37097. s = a.makePanelOpts(r, (function (t) {
  37098. return t.xAxisDeclared && !t.yAxisDeclared ? "lineX" : !t.xAxisDeclared && t.yAxisDeclared ? "lineY" : "rect"
  37099. }));
  37100. n._brushController.setPanels(s).enableBrush(!(!o || !s.length) && {
  37101. brushType: "auto",
  37102. brushStyle: t.getModel("brushStyle").getItemStyle()
  37103. })
  37104. }(t, e, this, i, n),
  37105. function (t, e) {
  37106. t.setIconStatus("back", function (t) {
  37107. return Cz(t).length
  37108. }(e) > 1 ? "emphasis" : "normal")
  37109. }(t, e)
  37110. }, e.prototype.onclick = function (t, e, n) {
  37111. Uz[n].call(this)
  37112. }, e.prototype.remove = function (t, e) {
  37113. this._brushController && this._brushController.unmount()
  37114. }, e.prototype.dispose = function (t, e) {
  37115. this._brushController && this._brushController.dispose()
  37116. }, e.prototype._onBrush = function (t) {
  37117. var e = t.areas;
  37118. if (t.isEnd && e.length) {
  37119. var n = {},
  37120. i = this.ecModel;
  37121. this._brushController.updateCovers([]), new kz(Zz(this.model), i, {
  37122. include: ["grid"]
  37123. }).matchOutputRanges(e, i, (function (t, e, n) {
  37124. if ("cartesian2d" === n.type) {
  37125. var i = t.brushType;
  37126. "rect" === i ? (r("x", n, e[0]), r("y", n, e[1])) : r({
  37127. lineX: "x",
  37128. lineY: "y"
  37129. } [i], n, e)
  37130. }
  37131. })),
  37132. function (t, e) {
  37133. var n = Cz(t);
  37134. Iz(e, (function (e, i) {
  37135. for (var r = n.length - 1; r >= 0 && !n[r][i]; r--);
  37136. if (r < 0) {
  37137. var o = t.queryComponents({
  37138. mainType: "dataZoom",
  37139. subType: "select",
  37140. id: i
  37141. })[0];
  37142. if (o) {
  37143. var a = o.getPercentRange();
  37144. n[0][i] = {
  37145. dataZoomId: i,
  37146. start: a[0],
  37147. end: a[1]
  37148. }
  37149. }
  37150. }
  37151. })), n.push(e)
  37152. }(i, n), this._dispatchZoomAction(n)
  37153. }
  37154. function r(t, e, r) {
  37155. var o = e.getAxis(t),
  37156. a = o.model,
  37157. s = function (t, e, n) {
  37158. var i;
  37159. return n.eachComponent({
  37160. mainType: "dataZoom",
  37161. subType: "select"
  37162. }, (function (n) {
  37163. n.getAxisModel(t, e.componentIndex) && (i = n)
  37164. })), i
  37165. }(t, a, i),
  37166. l = s.findRepresentativeAxisProxy(a).getMinMaxSpan();
  37167. null == l.minValueSpan && null == l.maxValueSpan || (r = Tk(0, r.slice(), o.scale.getExtent(), 0, l.minValueSpan, l.maxValueSpan)), s && (n[s.id] = {
  37168. dataZoomId: s.id,
  37169. startValue: r[0],
  37170. endValue: r[1]
  37171. })
  37172. }
  37173. }, e.prototype._dispatchZoomAction = function (t) {
  37174. var e = [];
  37175. Hz(t, (function (t, n) {
  37176. e.push(T(t))
  37177. })), e.length && this.api.dispatchAction({
  37178. type: "dataZoom",
  37179. from: this.uid,
  37180. batch: e
  37181. })
  37182. }, e.getDefaultOption = function (t) {
  37183. return {
  37184. show: !0,
  37185. filterMode: "filter",
  37186. icon: {
  37187. zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
  37188. back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
  37189. },
  37190. title: t.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
  37191. brushStyle: {
  37192. borderWidth: 0,
  37193. color: "rgba(210,219,238,0.2)"
  37194. }
  37195. }
  37196. }, e
  37197. }(az),
  37198. Uz = {
  37199. zoom: function () {
  37200. var t = !this._isZoomActive;
  37201. this.api.dispatchAction({
  37202. type: "takeGlobalCursor",
  37203. key: "dataZoomSelect",
  37204. dataZoomSelectActive: t
  37205. })
  37206. },
  37207. back: function () {
  37208. this._dispatchZoomAction(function (t) {
  37209. var e = Cz(t),
  37210. n = e[e.length - 1];
  37211. e.length > 1 && e.pop();
  37212. var i = {};
  37213. return Iz(n, (function (t, n) {
  37214. for (var r = e.length - 1; r >= 0; r--)
  37215. if (t = e[r][n]) {
  37216. i[n] = t;
  37217. break
  37218. }
  37219. })), i
  37220. }(this.ecModel))
  37221. }
  37222. };
  37223. function Zz(t) {
  37224. var e = {
  37225. xAxisIndex: t.get("xAxisIndex", !0),
  37226. yAxisIndex: t.get("yAxisIndex", !0),
  37227. xAxisId: t.get("xAxisId", !0),
  37228. yAxisId: t.get("yAxisId", !0)
  37229. };
  37230. return null == e.xAxisIndex && null == e.xAxisId && (e.xAxisIndex = "all"), null == e.yAxisIndex && null == e.yAxisId && (e.yAxisIndex = "all"), e
  37231. }
  37232. Gz = "dataZoom", Wz = function (t) {
  37233. var e = t.getComponent("toolbox", 0),
  37234. n = ["feature", "dataZoom"];
  37235. if (e && null != e.get(n)) {
  37236. var i = e.getModel(n),
  37237. r = [],
  37238. o = No(t, Zz(i));
  37239. return Hz(o.xAxisModels, (function (t) {
  37240. return a(t, "xAxis", "xAxisIndex")
  37241. })), Hz(o.yAxisModels, (function (t) {
  37242. return a(t, "yAxis", "yAxisIndex")
  37243. })), r
  37244. }
  37245. function a(t, e, n) {
  37246. var o = t.componentIndex,
  37247. a = {
  37248. type: "select",
  37249. $fromToolbox: !0,
  37250. filterMode: i.get("filterMode", !0) || "filter",
  37251. id: Yz + e + o
  37252. };
  37253. a[n] = o, r.push(a)
  37254. }
  37255. }, lt(null == nd.get(Gz) && Wz), nd.set(Gz, Wz);
  37256. var jz = function (t) {
  37257. function e() {
  37258. var n = null !== t && t.apply(this, arguments) || this;
  37259. return n.type = e.type, n
  37260. }
  37261. return n(e, t), e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = {
  37262. z: 60,
  37263. show: !0,
  37264. showContent: !0,
  37265. trigger: "item",
  37266. triggerOn: "mousemove|click",
  37267. alwaysShowContent: !1,
  37268. displayMode: "single",
  37269. renderMode: "auto",
  37270. confine: null,
  37271. showDelay: 0,
  37272. hideDelay: 100,
  37273. transitionDuration: .4,
  37274. enterable: !1,
  37275. backgroundColor: "#fff",
  37276. shadowBlur: 10,
  37277. shadowColor: "rgba(0, 0, 0, .2)",
  37278. shadowOffsetX: 1,
  37279. shadowOffsetY: 2,
  37280. borderRadius: 4,
  37281. borderWidth: 1,
  37282. padding: null,
  37283. extraCssText: "",
  37284. axisPointer: {
  37285. type: "line",
  37286. axis: "auto",
  37287. animation: "auto",
  37288. animationDurationUpdate: 200,
  37289. animationEasingUpdate: "exponentialOut",
  37290. crossStyle: {
  37291. color: "#999",
  37292. width: 1,
  37293. type: "dashed",
  37294. textStyle: {}
  37295. }
  37296. },
  37297. textStyle: {
  37298. color: "#666",
  37299. fontSize: 14
  37300. }
  37301. }, e
  37302. }(Rp);
  37303. function qz(t) {
  37304. var e = t.get("confine");
  37305. return null != e ? !!e : "richText" === t.get("renderMode")
  37306. }
  37307. function Kz(t) {
  37308. if (r.domSupported)
  37309. for (var e = document.documentElement.style, n = 0, i = t.length; n < i; n++)
  37310. if (t[n] in e) return t[n]
  37311. }
  37312. var $z = Kz(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]);
  37313. function Jz(t, e) {
  37314. if (!t) return e;
  37315. e = dp(e, !0);
  37316. var n = t.indexOf(e);
  37317. return (t = -1 === n ? e : "-" + t.slice(0, n) + "-" + e).toLowerCase()
  37318. }
  37319. var Qz = Jz(Kz(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]), "transition"),
  37320. tV = Jz($z, "transform"),
  37321. eV = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (r.transform3dSupported ? "will-change:transform;" : "");
  37322. function nV(t, e, n) {
  37323. var i = t.toFixed(0) + "px",
  37324. o = e.toFixed(0) + "px";
  37325. if (!r.transformSupported) return n ? "top:" + o + ";left:" + i + ";" : [
  37326. ["top", o],
  37327. ["left", i]
  37328. ];
  37329. var a = r.transform3dSupported,
  37330. s = "translate" + (a ? "3d" : "") + "(" + i + "," + o + (a ? ",0" : "") + ")";
  37331. return n ? "top:0;left:0;" + tV + ":" + s + ";" : [
  37332. ["top", 0],
  37333. ["left", 0],
  37334. [$z, s]
  37335. ]
  37336. }
  37337. function iV(t, e, n) {
  37338. var i = [],
  37339. o = t.get("transitionDuration"),
  37340. a = t.get("backgroundColor"),
  37341. s = t.get("shadowBlur"),
  37342. l = t.get("shadowColor"),
  37343. u = t.get("shadowOffsetX"),
  37344. h = t.get("shadowOffsetY"),
  37345. c = t.getModel("textStyle"),
  37346. p = pg(t, "html"),
  37347. d = u + "px " + h + "px " + s + "px " + l;
  37348. return i.push("box-shadow:" + d), e && o && i.push(function (t, e) {
  37349. var n = "cubic-bezier(0.23,1,0.32,1)",
  37350. i = " " + t / 2 + "s " + n,
  37351. o = "opacity" + i + ",visibility" + i;
  37352. return e || (i = " " + t + "s " + n, o += r.transformSupported ? "," + tV + i : ",left" + i + ",top" + i), Qz + ":" + o
  37353. }(o, n)), a && i.push("background-color:" + a), E(["width", "color", "radius"], (function (e) {
  37354. var n = "border-" + e,
  37355. r = dp(n),
  37356. o = t.get(r);
  37357. null != o && i.push(n + ":" + o + ("color" === e ? "" : "px"))
  37358. })), i.push(function (t) {
  37359. var e = [],
  37360. n = t.get("fontSize"),
  37361. i = t.getTextColor();
  37362. i && e.push("color:" + i), e.push("font:" + t.getFont()), n && e.push("line-height:" + Math.round(3 * n / 2) + "px");
  37363. var r = t.get("textShadowColor"),
  37364. o = t.get("textShadowBlur") || 0,
  37365. a = t.get("textShadowOffsetX") || 0,
  37366. s = t.get("textShadowOffsetY") || 0;
  37367. return r && o && e.push("text-shadow:" + a + "px " + s + "px " + o + "px " + r), E(["decoration", "align"], (function (n) {
  37368. var i = t.get(n);
  37369. i && e.push("text-" + n + ":" + i)
  37370. })), e.join(";")
  37371. }(c)), null != p && i.push("padding:" + fp(p).join("px ") + "px"), i.join(";") + ";"
  37372. }
  37373. function rV(t, e, n, i, r) {
  37374. var o = e && e.painter;
  37375. if (n) {
  37376. var a = o && o.getViewportRoot();
  37377. a && function (t, e, n, i, r) {
  37378. te(Qt, e, i, r, !0) && te(t, n, Qt[0], Qt[1])
  37379. }(t, a, document.body, i, r)
  37380. } else {
  37381. t[0] = i, t[1] = r;
  37382. var s = o && o.getViewportRootOffset();
  37383. s && (t[0] += s.offsetLeft, t[1] += s.offsetTop)
  37384. }
  37385. t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight()
  37386. }
  37387. var oV = function () {
  37388. function t(t, e, n) {
  37389. if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, r.wxa) return null;
  37390. var i = document.createElement("div");
  37391. i.domBelongToZr = !0, this.el = i;
  37392. var o = this._zr = e.getZr(),
  37393. a = this._appendToBody = n && n.appendToBody;
  37394. rV(this._styleCoord, o, a, e.getWidth() / 2, e.getHeight() / 2), a ? document.body.appendChild(i) : t.appendChild(i), this._container = t;
  37395. var s = this;
  37396. i.onmouseenter = function () {
  37397. s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0
  37398. }, i.onmousemove = function (t) {
  37399. if (t = t || window.event, !s._enterable) {
  37400. var e = o.handler;
  37401. ce(o.painter.getViewportRoot(), t, !0), e.dispatch("mousemove", t)
  37402. }
  37403. }, i.onmouseleave = function () {
  37404. s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay)
  37405. }
  37406. }
  37407. return t.prototype.update = function (t) {
  37408. var e, n, i, r = this._container,
  37409. o = (n = "position", (i = (e = r).currentStyle || document.defaultView && document.defaultView.getComputedStyle(e)) ? n ? i[n] : i : null),
  37410. a = r.style;
  37411. "absolute" !== a.position && "absolute" !== o && (a.position = "relative");
  37412. var s = t.get("alwaysShowContent");
  37413. s && this._moveIfResized(), this._alwaysShowContent = s, this.el.className = t.get("className") || ""
  37414. }, t.prototype.show = function (t, e) {
  37415. clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
  37416. var n = this.el,
  37417. i = n.style,
  37418. r = this._styleCoord;
  37419. n.innerHTML ? i.cssText = eV + iV(t, !this._firstShow, this._longHide) + nV(r[0], r[1], !0) + "border-color:" + _p(e) + ";" + (t.get("extraCssText") || "") + ";pointer-events:" + (this._enterable ? "auto" : "none") : i.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1
  37420. }, t.prototype.setContent = function (t, e, n, i, r) {
  37421. var o = this.el;
  37422. if (null != t) {
  37423. var a = "";
  37424. if (U(r) && "item" === n.get("trigger") && !qz(n) && (a = function (t, e, n) {
  37425. if (!U(n) || "inside" === n) return "";
  37426. var i = t.get("backgroundColor"),
  37427. r = t.get("borderWidth");
  37428. e = _p(e);
  37429. var o, a, s = "left" === (o = n) ? "right" : "right" === o ? "left" : "top" === o ? "bottom" : "top",
  37430. l = Math.max(1.5 * Math.round(r), 6),
  37431. u = "",
  37432. h = tV + ":";
  37433. P(["left", "right"], s) > -1 ? (u += "top:50%", h += "translateY(-50%) rotate(" + (a = "left" === s ? -225 : -45) + "deg)") : (u += "left:50%", h += "translateX(-50%) rotate(" + (a = "top" === s ? 225 : 45) + "deg)");
  37434. var c = a * Math.PI / 180,
  37435. p = l + r,
  37436. d = p * Math.abs(Math.cos(c)) + p * Math.abs(Math.sin(c)),
  37437. f = e + " solid " + r + "px;";
  37438. return '<div style="' + ["position:absolute;width:" + l + "px;height:" + l + "px;z-index:-1;", (u += ";" + s + ":-" + Math.round(100 * ((d - Math.SQRT2 * r) / 2 + Math.SQRT2 * r - (d - p) / 2)) / 100 + "px") + ";" + h + ";", "border-bottom:" + f, "border-right:" + f, "background-color:" + i + ";"].join("") + '"></div>'
  37439. }(n, i, r)), U(t)) o.innerHTML = t + a;
  37440. else if (t) {
  37441. o.innerHTML = "", Y(t) || (t = [t]);
  37442. for (var s = 0; s < t.length; s++) J(t[s]) && t[s].parentNode !== o && o.appendChild(t[s]);
  37443. if (a && o.childNodes.length) {
  37444. var l = document.createElement("div");
  37445. l.innerHTML = a, o.appendChild(l)
  37446. }
  37447. }
  37448. } else o.innerHTML = ""
  37449. }, t.prototype.setEnterable = function (t) {
  37450. this._enterable = t
  37451. }, t.prototype.getSize = function () {
  37452. var t = this.el;
  37453. return [t.offsetWidth, t.offsetHeight]
  37454. }, t.prototype.moveTo = function (t, e) {
  37455. var n = this._styleCoord;
  37456. if (rV(n, this._zr, this._appendToBody, t, e), null != n[0] && null != n[1]) {
  37457. var i = this.el.style;
  37458. E(nV(n[0], n[1]), (function (t) {
  37459. i[t[0]] = t[1]
  37460. }))
  37461. }
  37462. }, t.prototype._moveIfResized = function () {
  37463. var t = this._styleCoord[2],
  37464. e = this._styleCoord[3];
  37465. this.moveTo(t * this._zr.getWidth(), e * this._zr.getHeight())
  37466. }, t.prototype.hide = function () {
  37467. var t = this,
  37468. e = this.el.style;
  37469. e.visibility = "hidden", e.opacity = "0", r.transform3dSupported && (e.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout((function () {
  37470. return t._longHide = !0
  37471. }), 500)
  37472. }, t.prototype.hideLater = function (t) {
  37473. !this._show || this._inContent && this._enterable || this._alwaysShowContent || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(W(this.hide, this), t)) : this.hide())
  37474. }, t.prototype.isShow = function () {
  37475. return this._show
  37476. }, t.prototype.dispose = function () {
  37477. this.el.parentNode.removeChild(this.el)
  37478. }, t
  37479. }(),
  37480. aV = function () {
  37481. function t(t) {
  37482. this._show = !1, this._styleCoord = [0, 0, 0, 0], this._alwaysShowContent = !1, this._enterable = !0, this._zr = t.getZr(), uV(this._styleCoord, this._zr, t.getWidth() / 2, t.getHeight() / 2)
  37483. }
  37484. return t.prototype.update = function (t) {
  37485. var e = t.get("alwaysShowContent");
  37486. e && this._moveIfResized(), this._alwaysShowContent = e
  37487. }, t.prototype.show = function () {
  37488. this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0
  37489. }, t.prototype.setContent = function (t, e, n, i, r) {
  37490. var o = this;
  37491. q(t) && vo(""), this.el && this._zr.remove(this.el);
  37492. var a = n.getModel("textStyle");
  37493. this.el = new Fs({
  37494. style: {
  37495. rich: e.richTextStyles,
  37496. text: t,
  37497. lineHeight: 22,
  37498. borderWidth: 1,
  37499. borderColor: i,
  37500. textShadowColor: a.get("textShadowColor"),
  37501. fill: n.get(["textStyle", "color"]),
  37502. padding: pg(n, "richText"),
  37503. verticalAlign: "top",
  37504. align: "left"
  37505. },
  37506. z: n.get("z")
  37507. }), E(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], (function (t) {
  37508. o.el.style[t] = n.get(t)
  37509. })), E(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], (function (t) {
  37510. o.el.style[t] = a.get(t) || 0
  37511. })), this._zr.add(this.el);
  37512. var s = this;
  37513. this.el.on("mouseover", (function () {
  37514. s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0
  37515. })), this.el.on("mouseout", (function () {
  37516. s._enterable && s._show && s.hideLater(s._hideDelay), s._inContent = !1
  37517. }))
  37518. }, t.prototype.setEnterable = function (t) {
  37519. this._enterable = t
  37520. }, t.prototype.getSize = function () {
  37521. var t = this.el,
  37522. e = this.el.getBoundingRect(),
  37523. n = lV(t.style);
  37524. return [e.width + n.left + n.right, e.height + n.top + n.bottom]
  37525. }, t.prototype.moveTo = function (t, e) {
  37526. var n = this.el;
  37527. if (n) {
  37528. var i = this._styleCoord;
  37529. uV(i, this._zr, t, e), t = i[0], e = i[1];
  37530. var r = n.style,
  37531. o = sV(r.borderWidth || 0),
  37532. a = lV(r);
  37533. n.x = t + o + a.left, n.y = e + o + a.top, n.markRedraw()
  37534. }
  37535. }, t.prototype._moveIfResized = function () {
  37536. var t = this._styleCoord[2],
  37537. e = this._styleCoord[3];
  37538. this.moveTo(t * this._zr.getWidth(), e * this._zr.getHeight())
  37539. }, t.prototype.hide = function () {
  37540. this.el && this.el.hide(), this._show = !1
  37541. }, t.prototype.hideLater = function (t) {
  37542. !this._show || this._inContent && this._enterable || this._alwaysShowContent || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(W(this.hide, this), t)) : this.hide())
  37543. }, t.prototype.isShow = function () {
  37544. return this._show
  37545. }, t.prototype.dispose = function () {
  37546. this._zr.remove(this.el)
  37547. }, t
  37548. }();
  37549. function sV(t) {
  37550. return Math.max(0, t)
  37551. }
  37552. function lV(t) {
  37553. var e = sV(t.shadowBlur || 0),
  37554. n = sV(t.shadowOffsetX || 0),
  37555. i = sV(t.shadowOffsetY || 0);
  37556. return {
  37557. left: sV(e - n),
  37558. right: sV(e + n),
  37559. top: sV(e - i),
  37560. bottom: sV(e + i)
  37561. }
  37562. }
  37563. function uV(t, e, n, i) {
  37564. t[0] = n, t[1] = i, t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight()
  37565. }
  37566. var hV = new zs({
  37567. shape: {
  37568. x: -1,
  37569. y: -1,
  37570. width: 2,
  37571. height: 2
  37572. }
  37573. }),
  37574. cV = function (t) {
  37575. function e() {
  37576. var n = null !== t && t.apply(this, arguments) || this;
  37577. return n.type = e.type, n
  37578. }
  37579. return n(e, t), e.prototype.init = function (t, e) {
  37580. if (!r.node && e.getDom()) {
  37581. var n, i = t.getComponent("tooltip"),
  37582. o = this._renderMode = "auto" === (n = i.get("renderMode")) ? r.domSupported ? "html" : "richText" : n || "html";
  37583. this._tooltipContent = "richText" === o ? new aV(e) : new oV(e.getDom(), e, {
  37584. appendToBody: i.get("appendToBody", !0)
  37585. })
  37586. }
  37587. }, e.prototype.render = function (t, e, n) {
  37588. if (!r.node && n.getDom()) {
  37589. this.group.removeAll(), this._tooltipModel = t, this._ecModel = e, this._api = n;
  37590. var i = this._tooltipContent;
  37591. i.update(t), i.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow(), "richText" !== this._renderMode && t.get("transitionDuration") ? Fg(this, "_updatePosition", 50, "fixRate") : Gg(this, "_updatePosition")
  37592. }
  37593. }, e.prototype._initGlobalListener = function () {
  37594. var t = this._tooltipModel.get("triggerOn");
  37595. gN("itemTooltip", this._api, W((function (e, n, i) {
  37596. "none" !== t && (t.indexOf(e) >= 0 ? this._tryShow(n, i) : "leave" === e && this._hide(i))
  37597. }), this))
  37598. }, e.prototype._keepShow = function () {
  37599. var t = this._tooltipModel,
  37600. e = this._ecModel,
  37601. n = this._api,
  37602. i = t.get("triggerOn");
  37603. if (null != this._lastX && null != this._lastY && "none" !== i && "click" !== i) {
  37604. var r = this;
  37605. clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout((function () {
  37606. !n.isDisposed() && r.manuallyShowTip(t, e, n, {
  37607. x: r._lastX,
  37608. y: r._lastY,
  37609. dataByCoordSys: r._lastDataByCoordSys
  37610. })
  37611. }))
  37612. }
  37613. }, e.prototype.manuallyShowTip = function (t, e, n, i) {
  37614. if (i.from !== this.uid && !r.node && n.getDom()) {
  37615. var o = dV(i, n);
  37616. this._ticket = "";
  37617. var a = i.dataByCoordSys,
  37618. s = function (t, e, n) {
  37619. var i = Eo(t).queryOptionMap,
  37620. r = i.keys()[0];
  37621. if (!r || "series" === r) return;
  37622. var o = Bo(e, r, i.get(r), {
  37623. useDefault: !1,
  37624. enableAll: !1,
  37625. enableNone: !1
  37626. }),
  37627. a = o.models[0];
  37628. if (!a) return;
  37629. var s, l = n.getViewOfComponentModel(a);
  37630. if (l.group.traverse((function (e) {
  37631. var n = Qs(e).tooltipConfig;
  37632. if (n && n.name === t.name) return s = e, !0
  37633. })), s) return {
  37634. componentMainType: r,
  37635. componentIndex: a.componentIndex,
  37636. el: s
  37637. }
  37638. }(i, e, n);
  37639. if (s) {
  37640. var l = s.el.getBoundingRect().clone();
  37641. l.applyTransform(s.el.transform), this._tryShow({
  37642. offsetX: l.x + l.width / 2,
  37643. offsetY: l.y + l.height / 2,
  37644. target: s.el,
  37645. position: i.position,
  37646. positionDefault: "bottom"
  37647. }, o)
  37648. } else if (i.tooltip && null != i.x && null != i.y) {
  37649. var u = hV;
  37650. u.x = i.x, u.y = i.y, u.update(), Qs(u).tooltipConfig = {
  37651. name: null,
  37652. option: i.tooltip
  37653. }, this._tryShow({
  37654. offsetX: i.x,
  37655. offsetY: i.y,
  37656. target: u
  37657. }, o)
  37658. } else if (a) this._tryShow({
  37659. offsetX: i.x,
  37660. offsetY: i.y,
  37661. position: i.position,
  37662. dataByCoordSys: a,
  37663. tooltipOption: i.tooltipOption
  37664. }, o);
  37665. else if (null != i.seriesIndex) {
  37666. if (this._manuallyAxisShowTip(t, e, n, i)) return;
  37667. var h = _N(i, e),
  37668. c = h.point[0],
  37669. p = h.point[1];
  37670. null != c && null != p && this._tryShow({
  37671. offsetX: c,
  37672. offsetY: p,
  37673. target: h.el,
  37674. position: i.position,
  37675. positionDefault: "bottom"
  37676. }, o)
  37677. } else null != i.x && null != i.y && (n.dispatchAction({
  37678. type: "updateAxisPointer",
  37679. x: i.x,
  37680. y: i.y
  37681. }), this._tryShow({
  37682. offsetX: i.x,
  37683. offsetY: i.y,
  37684. position: i.position,
  37685. target: n.getZr().findHover(i.x, i.y).target
  37686. }, o))
  37687. }
  37688. }, e.prototype.manuallyHideTip = function (t, e, n, i) {
  37689. var r = this._tooltipContent;
  37690. this._tooltipModel && r.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, i.from !== this.uid && this._hide(dV(i, n))
  37691. }, e.prototype._manuallyAxisShowTip = function (t, e, n, i) {
  37692. var r = i.seriesIndex,
  37693. o = i.dataIndex,
  37694. a = e.getComponent("axisPointer").coordSysAxesInfo;
  37695. if (null != r && null != o && null != a) {
  37696. var s = e.getSeriesByIndex(r);
  37697. if (s)
  37698. if ("axis" === pV([s.getData().getItemModel(o), s, (s.coordinateSystem || {}).model], this._tooltipModel).get("trigger")) return n.dispatchAction({
  37699. type: "updateAxisPointer",
  37700. seriesIndex: r,
  37701. dataIndex: o,
  37702. position: i.position
  37703. }), !0
  37704. }
  37705. }, e.prototype._tryShow = function (t, e) {
  37706. var n = t.target;
  37707. if (this._tooltipModel) {
  37708. this._lastX = t.offsetX, this._lastY = t.offsetY;
  37709. var i = t.dataByCoordSys;
  37710. if (i && i.length) this._showAxisTooltip(i, t);
  37711. else if (n) {
  37712. var r, o;
  37713. this._lastDataByCoordSys = null, ky(n, (function (t) {
  37714. return null != Qs(t).dataIndex ? (r = t, !0) : null != Qs(t).tooltipConfig ? (o = t, !0) : void 0
  37715. }), !0), r ? this._showSeriesItemTooltip(t, r, e) : o ? this._showComponentItemTooltip(t, o, e) : this._hide(e)
  37716. } else this._lastDataByCoordSys = null, this._hide(e)
  37717. }
  37718. }, e.prototype._showOrMove = function (t, e) {
  37719. var n = t.get("showDelay");
  37720. e = W(e, this), clearTimeout(this._showTimout), n > 0 ? this._showTimout = setTimeout(e, n) : e()
  37721. }, e.prototype._showAxisTooltip = function (t, e) {
  37722. var n = this._ecModel,
  37723. i = this._tooltipModel,
  37724. r = [e.offsetX, e.offsetY],
  37725. o = pV([e.tooltipOption], i),
  37726. a = this._renderMode,
  37727. s = [],
  37728. l = ng("section", {
  37729. blocks: [],
  37730. noHeader: !0
  37731. }),
  37732. u = [],
  37733. h = new dg;
  37734. E(t, (function (t) {
  37735. E(t.dataByAxis, (function (t) {
  37736. var e = n.getComponent(t.axisDim + "Axis", t.axisIndex),
  37737. r = t.value;
  37738. if (e && null != r) {
  37739. var o = nN(r, e.axis, n, t.seriesDataIndices, t.valueLabelOpt),
  37740. c = ng("section", {
  37741. header: o,
  37742. noHeader: !ut(o),
  37743. sortBlocks: !0,
  37744. blocks: []
  37745. });
  37746. l.blocks.push(c), E(t.seriesDataIndices, (function (l) {
  37747. var p = n.getSeriesByIndex(l.seriesIndex),
  37748. d = l.dataIndexInside,
  37749. f = p.getDataParams(d);
  37750. if (!(f.dataIndex < 0)) {
  37751. f.axisDim = t.axisDim, f.axisIndex = t.axisIndex, f.axisType = t.axisType, f.axisId = t.axisId, f.axisValue = __(e.axis, {
  37752. value: r
  37753. }), f.axisValueLabel = o, f.marker = h.makeTooltipMarker("item", _p(f.color), a);
  37754. var g = mf(p.formatTooltip(d, !0, null)),
  37755. y = g.frag;
  37756. if (y) {
  37757. var v = pV([p], i).get("valueFormatter");
  37758. c.blocks.push(v ? A({
  37759. valueFormatter: v
  37760. }, y) : y)
  37761. }
  37762. g.text && u.push(g.text), s.push(f)
  37763. }
  37764. }))
  37765. }
  37766. }))
  37767. })), l.blocks.reverse(), u.reverse();
  37768. var c = e.position,
  37769. p = o.get("order"),
  37770. d = lg(l, h, a, p, n.get("useUTC"), o.get("textStyle"));
  37771. d && u.unshift(d);
  37772. var f = "richText" === a ? "\n\n" : "<br/>",
  37773. g = u.join(f);
  37774. this._showOrMove(o, (function () {
  37775. this._updateContentNotChangedOnAxis(t, s) ? this._updatePosition(o, c, r[0], r[1], this._tooltipContent, s) : this._showTooltipContent(o, g, s, Math.random() + "", r[0], r[1], c, null, h)
  37776. }))
  37777. }, e.prototype._showSeriesItemTooltip = function (t, e, n) {
  37778. var i = this._ecModel,
  37779. r = Qs(e),
  37780. o = r.seriesIndex,
  37781. a = i.getSeriesByIndex(o),
  37782. s = r.dataModel || a,
  37783. l = r.dataIndex,
  37784. u = r.dataType,
  37785. h = s.getData(u),
  37786. c = this._renderMode,
  37787. p = t.positionDefault,
  37788. d = pV([h.getItemModel(l), s, a && (a.coordinateSystem || {}).model], this._tooltipModel, p ? {
  37789. position: p
  37790. } : null),
  37791. f = d.get("trigger");
  37792. if (null == f || "item" === f) {
  37793. var g = s.getDataParams(l, u),
  37794. y = new dg;
  37795. g.marker = y.makeTooltipMarker("item", _p(g.color), c);
  37796. var v = mf(s.formatTooltip(l, !1, u)),
  37797. m = d.get("order"),
  37798. x = d.get("valueFormatter"),
  37799. _ = v.frag,
  37800. b = _ ? lg(x ? A({
  37801. valueFormatter: x
  37802. }, _) : _, y, c, m, i.get("useUTC"), d.get("textStyle")) : v.text,
  37803. w = "item_" + s.name + "_" + l;
  37804. this._showOrMove(d, (function () {
  37805. this._showTooltipContent(d, b, g, w, t.offsetX, t.offsetY, t.position, t.target, y)
  37806. })), n({
  37807. type: "showTip",
  37808. dataIndexInside: l,
  37809. dataIndex: h.getRawIndex(l),
  37810. seriesIndex: o,
  37811. from: this.uid
  37812. })
  37813. }
  37814. }, e.prototype._showComponentItemTooltip = function (t, e, n) {
  37815. var i = Qs(e),
  37816. r = i.tooltipConfig.option || {};
  37817. if (U(r)) {
  37818. r = {
  37819. content: r,
  37820. formatter: r
  37821. }
  37822. }
  37823. var o = [r],
  37824. a = this._ecModel.getComponent(i.componentMainType, i.componentIndex);
  37825. a && o.push(a), o.push({
  37826. formatter: r.content
  37827. });
  37828. var s = t.positionDefault,
  37829. l = pV(o, this._tooltipModel, s ? {
  37830. position: s
  37831. } : null),
  37832. u = l.get("content"),
  37833. h = Math.random() + "",
  37834. c = new dg;
  37835. this._showOrMove(l, (function () {
  37836. var n = T(l.get("formatterParams") || {});
  37837. this._showTooltipContent(l, u, n, h, t.offsetX, t.offsetY, t.position, e, c)
  37838. })), n({
  37839. type: "showTip",
  37840. from: this.uid
  37841. })
  37842. }, e.prototype._showTooltipContent = function (t, e, n, i, r, o, a, s, l) {
  37843. if (this._ticket = "", t.get("showContent") && t.get("show")) {
  37844. var u = this._tooltipContent;
  37845. u.setEnterable(t.get("enterable"));
  37846. var h = t.get("formatter");
  37847. a = a || t.get("position");
  37848. var c = e,
  37849. p = this._getNearestPoint([r, o], n, t.get("trigger"), t.get("borderColor")).color;
  37850. if (h)
  37851. if (U(h)) {
  37852. var d = t.ecModel.get("useUTC"),
  37853. f = Y(n) ? n[0] : n;
  37854. c = h, f && f.axisType && f.axisType.indexOf("time") >= 0 && (c = qc(f.axisValue, c, d)), c = mp(c, n, !0)
  37855. } else if (X(h)) {
  37856. var g = W((function (e, i) {
  37857. e === this._ticket && (u.setContent(i, l, t, p, a), this._updatePosition(t, a, r, o, u, n, s))
  37858. }), this);
  37859. this._ticket = i, c = h(n, i, g)
  37860. } else c = h;
  37861. u.setContent(c, l, t, p, a), u.show(t, p), this._updatePosition(t, a, r, o, u, n, s)
  37862. }
  37863. }, e.prototype._getNearestPoint = function (t, e, n, i) {
  37864. return "axis" === n || Y(e) ? {
  37865. color: i || ("html" === this._renderMode ? "#fff" : "none")
  37866. } : Y(e) ? void 0 : {
  37867. color: i || e.color || e.borderColor
  37868. }
  37869. }, e.prototype._updatePosition = function (t, e, n, i, r, o, a) {
  37870. var s = this._api.getWidth(),
  37871. l = this._api.getHeight();
  37872. e = e || t.get("position");
  37873. var u = r.getSize(),
  37874. h = t.get("align"),
  37875. c = t.get("verticalAlign"),
  37876. p = a && a.getBoundingRect().clone();
  37877. if (a && p.applyTransform(a.transform), X(e) && (e = e([n, i], o, r.el, p, {
  37878. viewSize: [s, l],
  37879. contentSize: u.slice()
  37880. })), Y(e)) n = Ur(e[0], s), i = Ur(e[1], l);
  37881. else if (q(e)) {
  37882. var d = e;
  37883. d.width = u[0], d.height = u[1];
  37884. var f = Cp(d, {
  37885. width: s,
  37886. height: l
  37887. });
  37888. n = f.x, i = f.y, h = null, c = null
  37889. } else if (U(e) && a) {
  37890. var g = function (t, e, n, i) {
  37891. var r = n[0],
  37892. o = n[1],
  37893. a = Math.ceil(Math.SQRT2 * i) + 8,
  37894. s = 0,
  37895. l = 0,
  37896. u = e.width,
  37897. h = e.height;
  37898. switch (t) {
  37899. case "inside":
  37900. s = e.x + u / 2 - r / 2, l = e.y + h / 2 - o / 2;
  37901. break;
  37902. case "top":
  37903. s = e.x + u / 2 - r / 2, l = e.y - o - a;
  37904. break;
  37905. case "bottom":
  37906. s = e.x + u / 2 - r / 2, l = e.y + h + a;
  37907. break;
  37908. case "left":
  37909. s = e.x - r - a, l = e.y + h / 2 - o / 2;
  37910. break;
  37911. case "right":
  37912. s = e.x + u + a, l = e.y + h / 2 - o / 2
  37913. }
  37914. return [s, l]
  37915. }(e, p, u, t.get("borderWidth"));
  37916. n = g[0], i = g[1]
  37917. } else {
  37918. g = function (t, e, n, i, r, o, a) {
  37919. var s = n.getSize(),
  37920. l = s[0],
  37921. u = s[1];
  37922. null != o && (t + l + o + 2 > i ? t -= l + o : t += o);
  37923. null != a && (e + u + a > r ? e -= u + a : e += a);
  37924. return [t, e]
  37925. }(n, i, r, s, l, h ? null : 20, c ? null : 20);
  37926. n = g[0], i = g[1]
  37927. }
  37928. if (h && (n -= fV(h) ? u[0] / 2 : "right" === h ? u[0] : 0), c && (i -= fV(c) ? u[1] / 2 : "bottom" === c ? u[1] : 0), qz(t)) {
  37929. g = function (t, e, n, i, r) {
  37930. var o = n.getSize(),
  37931. a = o[0],
  37932. s = o[1];
  37933. return t = Math.min(t + a, i) - a, e = Math.min(e + s, r) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e]
  37934. }(n, i, r, s, l);
  37935. n = g[0], i = g[1]
  37936. }
  37937. r.moveTo(n, i)
  37938. }, e.prototype._updateContentNotChangedOnAxis = function (t, e) {
  37939. var n = this._lastDataByCoordSys,
  37940. i = this._cbParamsList,
  37941. r = !!n && n.length === t.length;
  37942. return r && E(n, (function (n, o) {
  37943. var a = n.dataByAxis || [],
  37944. s = (t[o] || {}).dataByAxis || [];
  37945. (r = r && a.length === s.length) && E(a, (function (t, n) {
  37946. var o = s[n] || {},
  37947. a = t.seriesDataIndices || [],
  37948. l = o.seriesDataIndices || [];
  37949. (r = r && t.value === o.value && t.axisType === o.axisType && t.axisId === o.axisId && a.length === l.length) && E(a, (function (t, e) {
  37950. var n = l[e];
  37951. r = r && t.seriesIndex === n.seriesIndex && t.dataIndex === n.dataIndex
  37952. })), i && E(t.seriesDataIndices, (function (t) {
  37953. var n = t.seriesIndex,
  37954. o = e[n],
  37955. a = i[n];
  37956. o && a && a.data !== o.data && (r = !1)
  37957. }))
  37958. }))
  37959. })), this._lastDataByCoordSys = t, this._cbParamsList = e, !!r
  37960. }, e.prototype._hide = function (t) {
  37961. this._lastDataByCoordSys = null, t({
  37962. type: "hideTip",
  37963. from: this.uid
  37964. })
  37965. }, e.prototype.dispose = function (t, e) {
  37966. !r.node && e.getDom() && (Gg(this, "_updatePosition"), this._tooltipContent.dispose(), mN("itemTooltip", e))
  37967. }, e.type = "tooltip", e
  37968. }(Tg);
  37969. function pV(t, e, n) {
  37970. var i, r = e.ecModel;
  37971. n ? (i = new Mc(n, r, r), i = new Mc(e.option, i, r)) : i = e;
  37972. for (var o = t.length - 1; o >= 0; o--) {
  37973. var a = t[o];
  37974. a && (a instanceof Mc && (a = a.get("tooltip", !0)), U(a) && (a = {
  37975. formatter: a
  37976. }), a && (i = new Mc(a, i, r)))
  37977. }
  37978. return i
  37979. }
  37980. function dV(t, e) {
  37981. return t.dispatchAction || W(e.dispatchAction, e)
  37982. }
  37983. function fV(t) {
  37984. return "center" === t || "middle" === t
  37985. }
  37986. var gV = ["rect", "polygon", "keep", "clear"];
  37987. function yV(t, e) {
  37988. var n = bo(t ? t.brush : []);
  37989. if (n.length) {
  37990. var i = [];
  37991. E(n, (function (t) {
  37992. var e = t.hasOwnProperty("toolbox") ? t.toolbox : [];
  37993. e instanceof Array && (i = i.concat(e))
  37994. }));
  37995. var r = t && t.toolbox;
  37996. Y(r) && (r = r[0]), r || (r = {
  37997. feature: {}
  37998. }, t.toolbox = [r]);
  37999. var o = r.feature || (r.feature = {}),
  38000. a = o.brush || (o.brush = {}),
  38001. s = a.type || (a.type = []);
  38002. s.push.apply(s, i),
  38003. function (t) {
  38004. var e = {};
  38005. E(t, (function (t) {
  38006. e[t] = 1
  38007. })), t.length = 0, E(e, (function (e, n) {
  38008. t.push(n)
  38009. }))
  38010. }(s), e && !s.length && s.push.apply(s, gV)
  38011. }
  38012. }
  38013. var vV = E;
  38014. function mV(t) {
  38015. if (t)
  38016. for (var e in t)
  38017. if (t.hasOwnProperty(e)) return !0
  38018. }
  38019. function xV(t, e, n) {
  38020. var i = {};
  38021. return vV(e, (function (e) {
  38022. var r, o = i[e] = ((r = function () {}).prototype.__hidden = r.prototype, new r);
  38023. vV(t[e], (function (t, i) {
  38024. if (_D.isValidType(i)) {
  38025. var r = {
  38026. type: i,
  38027. visual: t
  38028. };
  38029. n && n(r, e), o[i] = new _D(r), "opacity" === i && ((r = T(r)).type = "colorAlpha", o.__hidden.__alphaForOpacity = new _D(r))
  38030. }
  38031. }))
  38032. })), i
  38033. }
  38034. function _V(t, e, n) {
  38035. var i;
  38036. E(n, (function (t) {
  38037. e.hasOwnProperty(t) && mV(e[t]) && (i = !0)
  38038. })), i && E(n, (function (n) {
  38039. e.hasOwnProperty(n) && mV(e[n]) ? t[n] = T(e[n]) : delete t[n]
  38040. }))
  38041. }
  38042. var bV = {
  38043. lineX: wV(0),
  38044. lineY: wV(1),
  38045. rect: {
  38046. point: function (t, e, n) {
  38047. return t && n.boundingRect.contain(t[0], t[1])
  38048. },
  38049. rect: function (t, e, n) {
  38050. return t && n.boundingRect.intersect(t)
  38051. }
  38052. },
  38053. polygon: {
  38054. point: function (t, e, n) {
  38055. return t && n.boundingRect.contain(t[0], t[1]) && A_(n.range, t[0], t[1])
  38056. },
  38057. rect: function (t, e, n) {
  38058. var i = n.range;
  38059. if (!t || i.length <= 1) return !1;
  38060. var r = t.x,
  38061. o = t.y,
  38062. a = t.width,
  38063. s = t.height,
  38064. l = i[0];
  38065. return !!(A_(i, r, o) || A_(i, r + a, o) || A_(i, r, o + s) || A_(i, r + a, o + s) || ze.create(t).contain(l[0], l[1]) || Yh(r, o, r + a, o, i) || Yh(r, o, r, o + s, i) || Yh(r + a, o, r + a, o + s, i) || Yh(r, o + s, r + a, o + s, i)) || void 0
  38066. }
  38067. }
  38068. };
  38069. function wV(t) {
  38070. var e = ["x", "y"],
  38071. n = ["width", "height"];
  38072. return {
  38073. point: function (e, n, i) {
  38074. if (e) {
  38075. var r = i.range;
  38076. return SV(e[t], r)
  38077. }
  38078. },
  38079. rect: function (i, r, o) {
  38080. if (i) {
  38081. var a = o.range,
  38082. s = [i[e[t]], i[e[t]] + i[n[t]]];
  38083. return s[1] < s[0] && s.reverse(), SV(s[0], a) || SV(s[1], a) || SV(a[0], s) || SV(a[1], s)
  38084. }
  38085. }
  38086. }
  38087. }
  38088. function SV(t, e) {
  38089. return e[0] <= t && t <= e[1]
  38090. }
  38091. var MV = ["inBrush", "outOfBrush"],
  38092. IV = "__ecBrushSelect",
  38093. TV = "__ecInBrushSelectEvent";
  38094. function CV(t) {
  38095. t.eachComponent({
  38096. mainType: "brush"
  38097. }, (function (e) {
  38098. (e.brushTargetManager = new kz(e.option, t)).setInputRanges(e.areas, t)
  38099. }))
  38100. }
  38101. function DV(t, e, n) {
  38102. var i, r, o = [];
  38103. t.eachComponent({
  38104. mainType: "brush"
  38105. }, (function (t) {
  38106. n && "takeGlobalCursor" === n.type && t.setBrushOption("brush" === n.key ? n.brushOption : {
  38107. brushType: !1
  38108. })
  38109. })), CV(t), t.eachComponent({
  38110. mainType: "brush"
  38111. }, (function (e, n) {
  38112. var a = {
  38113. brushId: e.id,
  38114. brushIndex: n,
  38115. brushName: e.name,
  38116. areas: T(e.areas),
  38117. selected: []
  38118. };
  38119. o.push(a);
  38120. var s = e.option,
  38121. l = s.brushLink,
  38122. u = [],
  38123. h = [],
  38124. c = [],
  38125. p = !1;
  38126. n || (i = s.throttleType, r = s.throttleDelay);
  38127. var d = z(e.areas, (function (t) {
  38128. var e = LV[t.brushType],
  38129. n = k({
  38130. boundingRect: e ? e(t) : void 0
  38131. }, t);
  38132. return n.selectors = function (t) {
  38133. var e = t.brushType,
  38134. n = {
  38135. point: function (i) {
  38136. return bV[e].point(i, n, t)
  38137. },
  38138. rect: function (i) {
  38139. return bV[e].rect(i, n, t)
  38140. }
  38141. };
  38142. return n
  38143. }(n), n
  38144. })),
  38145. f = xV(e.option, MV, (function (t) {
  38146. t.mappingMethod = "fixed"
  38147. }));
  38148. function g(t) {
  38149. return "all" === l || !!u[t]
  38150. }
  38151. function y(t) {
  38152. return !!t.length
  38153. }
  38154. Y(l) && E(l, (function (t) {
  38155. u[t] = 1
  38156. })), t.eachSeries((function (n, i) {
  38157. var r = c[i] = [];
  38158. "parallel" === n.subType ? function (t, e) {
  38159. var n = t.coordinateSystem;
  38160. p = p || n.hasAxisBrushed(), g(e) && n.eachActiveState(t.getData(), (function (t, e) {
  38161. "active" === t && (h[e] = 1)
  38162. }))
  38163. }(n, i) : function (n, i, r) {
  38164. if (!n.brushSelector || function (t, e) {
  38165. var n = t.option.seriesIndex;
  38166. return null != n && "all" !== n && (Y(n) ? P(n, e) < 0 : e !== n)
  38167. }(e, i)) return;
  38168. if (E(d, (function (i) {
  38169. e.brushTargetManager.controlSeries(i, n, t) && r.push(i), p = p || y(r)
  38170. })), g(i) && y(r)) {
  38171. var o = n.getData();
  38172. o.each((function (t) {
  38173. kV(n, r, o, t) && (h[t] = 1)
  38174. }))
  38175. }
  38176. }(n, i, r)
  38177. })), t.eachSeries((function (t, e) {
  38178. var n = {
  38179. seriesId: t.id,
  38180. seriesIndex: e,
  38181. seriesName: t.name,
  38182. dataIndex: []
  38183. };
  38184. a.selected.push(n);
  38185. var i = c[e],
  38186. r = t.getData(),
  38187. o = g(e) ? function (t) {
  38188. return h[t] ? (n.dataIndex.push(r.getRawIndex(t)), "inBrush") : "outOfBrush"
  38189. } : function (e) {
  38190. return kV(t, i, r, e) ? (n.dataIndex.push(r.getRawIndex(e)), "inBrush") : "outOfBrush"
  38191. };
  38192. (g(e) ? p : y(i)) && function (t, e, n, i, r, o) {
  38193. var a, s = {};
  38194. function l(t) {
  38195. return Iy(n, a, t)
  38196. }
  38197. function u(t, e) {
  38198. Cy(n, a, t, e)
  38199. }
  38200. function h(t, h) {
  38201. a = null == o ? t : h;
  38202. var c = n.getRawDataItem(a);
  38203. if (!c || !1 !== c.visualMap)
  38204. for (var p = i.call(r, t), d = e[p], f = s[p], g = 0, y = f.length; g < y; g++) {
  38205. var v = f[g];
  38206. d[v] && d[v].applyVisual(t, l, u)
  38207. }
  38208. }
  38209. E(t, (function (t) {
  38210. var n = _D.prepareVisualTypes(e[t]);
  38211. s[t] = n
  38212. })), null == o ? n.each(h) : n.each([o], h)
  38213. }(MV, f, r, o)
  38214. }))
  38215. })),
  38216. function (t, e, n, i, r) {
  38217. if (!r) return;
  38218. var o = t.getZr();
  38219. if (o[TV]) return;
  38220. o[IV] || (o[IV] = AV);
  38221. var a = Fg(o, IV, n, e);
  38222. a(t, i)
  38223. }(e, i, r, o, n)
  38224. }
  38225. function AV(t, e) {
  38226. if (!t.isDisposed()) {
  38227. var n = t.getZr();
  38228. n[TV] = !0, t.dispatchAction({
  38229. type: "brushSelect",
  38230. batch: e
  38231. }), n[TV] = !1
  38232. }
  38233. }
  38234. function kV(t, e, n, i) {
  38235. for (var r = 0, o = e.length; r < o; r++) {
  38236. var a = e[r];
  38237. if (t.brushSelector(i, n, a.selectors, a)) return !0
  38238. }
  38239. }
  38240. var LV = {
  38241. rect: function (t) {
  38242. return PV(t.range)
  38243. },
  38244. polygon: function (t) {
  38245. for (var e, n = t.range, i = 0, r = n.length; i < r; i++) {
  38246. e = e || [
  38247. [1 / 0, -1 / 0],
  38248. [1 / 0, -1 / 0]
  38249. ];
  38250. var o = n[i];
  38251. o[0] < e[0][0] && (e[0][0] = o[0]), o[0] > e[0][1] && (e[0][1] = o[0]), o[1] < e[1][0] && (e[1][0] = o[1]), o[1] > e[1][1] && (e[1][1] = o[1])
  38252. }
  38253. return e && PV(e)
  38254. }
  38255. };
  38256. function PV(t) {
  38257. return new ze(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0])
  38258. }
  38259. var OV = function (t) {
  38260. function e() {
  38261. var n = null !== t && t.apply(this, arguments) || this;
  38262. return n.type = e.type, n
  38263. }
  38264. return n(e, t), e.prototype.init = function (t, e) {
  38265. this.ecModel = t, this.api = e, this.model, (this._brushController = new $k(e.getZr())).on("brush", W(this._onBrush, this)).mount()
  38266. }, e.prototype.render = function (t, e, n, i) {
  38267. this.model = t, this._updateController(t, e, n, i)
  38268. }, e.prototype.updateTransform = function (t, e, n, i) {
  38269. CV(e), this._updateController(t, e, n, i)
  38270. }, e.prototype.updateVisual = function (t, e, n, i) {
  38271. this.updateTransform(t, e, n, i)
  38272. }, e.prototype.updateView = function (t, e, n, i) {
  38273. this._updateController(t, e, n, i)
  38274. }, e.prototype._updateController = function (t, e, n, i) {
  38275. (!i || i.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())
  38276. }, e.prototype.dispose = function () {
  38277. this._brushController.dispose()
  38278. }, e.prototype._onBrush = function (t) {
  38279. var e = this.model.id,
  38280. n = this.model.brushTargetManager.setOutputRanges(t.areas, this.ecModel);
  38281. (!t.isEnd || t.removeOnClick) && this.api.dispatchAction({
  38282. type: "brush",
  38283. brushId: e,
  38284. areas: T(n),
  38285. $from: e
  38286. }), t.isEnd && this.api.dispatchAction({
  38287. type: "brushEnd",
  38288. brushId: e,
  38289. areas: T(n),
  38290. $from: e
  38291. })
  38292. }, e.type = "brush", e
  38293. }(Tg),
  38294. RV = function (t) {
  38295. function e() {
  38296. var n = null !== t && t.apply(this, arguments) || this;
  38297. return n.type = e.type, n.areas = [], n.brushOption = {}, n
  38298. }
  38299. return n(e, t), e.prototype.optionUpdated = function (t, e) {
  38300. var n = this.option;
  38301. !e && _V(n, t, ["inBrush", "outOfBrush"]);
  38302. var i = n.inBrush = n.inBrush || {};
  38303. n.outOfBrush = n.outOfBrush || {
  38304. color: "#ddd"
  38305. }, i.hasOwnProperty("liftZ") || (i.liftZ = 5)
  38306. }, e.prototype.setAreas = function (t) {
  38307. t && (this.areas = z(t, (function (t) {
  38308. return NV(this.option, t)
  38309. }), this))
  38310. }, e.prototype.setBrushOption = function (t) {
  38311. this.brushOption = NV(this.option, t), this.brushType = this.brushOption.brushType
  38312. }, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = {
  38313. seriesIndex: "all",
  38314. brushType: "rect",
  38315. brushMode: "single",
  38316. transformable: !0,
  38317. brushStyle: {
  38318. borderWidth: 1,
  38319. color: "rgba(210,219,238,0.3)",
  38320. borderColor: "#D2DBEE"
  38321. },
  38322. throttleType: "fixRate",
  38323. throttleDelay: 0,
  38324. removeOnClick: !0,
  38325. z: 1e4
  38326. }, e
  38327. }(Rp);
  38328. function NV(t, e) {
  38329. return C({
  38330. brushType: t.brushType,
  38331. brushMode: t.brushMode,
  38332. transformable: t.transformable,
  38333. brushStyle: new Mc(t.brushStyle).getItemStyle(),
  38334. removeOnClick: t.removeOnClick,
  38335. z: t.z
  38336. }, e, !0)
  38337. }
  38338. var EV = ["rect", "polygon", "lineX", "lineY", "keep", "clear"],
  38339. zV = function (t) {
  38340. function e() {
  38341. return null !== t && t.apply(this, arguments) || this
  38342. }
  38343. return n(e, t), e.prototype.render = function (t, e, n) {
  38344. var i, r, o;
  38345. e.eachComponent({
  38346. mainType: "brush"
  38347. }, (function (t) {
  38348. i = t.brushType, r = t.brushOption.brushMode || "single", o = o || !!t.areas.length
  38349. })), this._brushType = i, this._brushMode = r, E(t.get("type", !0), (function (e) {
  38350. t.setIconStatus(e, ("keep" === e ? "multiple" === r : "clear" === e ? o : e === i) ? "emphasis" : "normal")
  38351. }))
  38352. }, e.prototype.updateView = function (t, e, n) {
  38353. this.render(t, e, n)
  38354. }, e.prototype.getIcons = function () {
  38355. var t = this.model,
  38356. e = t.get("icon", !0),
  38357. n = {};
  38358. return E(t.get("type", !0), (function (t) {
  38359. e[t] && (n[t] = e[t])
  38360. })), n
  38361. }, e.prototype.onclick = function (t, e, n) {
  38362. var i = this._brushType,
  38363. r = this._brushMode;
  38364. "clear" === n ? (e.dispatchAction({
  38365. type: "axisAreaSelect",
  38366. intervals: []
  38367. }), e.dispatchAction({
  38368. type: "brush",
  38369. command: "clear",
  38370. areas: []
  38371. })) : e.dispatchAction({
  38372. type: "takeGlobalCursor",
  38373. key: "brush",
  38374. brushOption: {
  38375. brushType: "keep" === n ? i : i !== n && n,
  38376. brushMode: "keep" === n ? "multiple" === r ? "single" : "multiple" : r
  38377. }
  38378. })
  38379. }, e.getDefaultOption = function (t) {
  38380. return {
  38381. show: !0,
  38382. type: EV.slice(),
  38383. icon: {
  38384. rect: "M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",
  38385. polygon: "M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",
  38386. lineX: "M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",
  38387. lineY: "M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",
  38388. keep: "M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",
  38389. clear: "M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"
  38390. },
  38391. title: t.getLocaleModel().get(["toolbox", "brush", "title"])
  38392. }
  38393. }, e
  38394. }(az);
  38395. var VV = function (t) {
  38396. function e() {
  38397. var n = null !== t && t.apply(this, arguments) || this;
  38398. return n.type = e.type, n.layoutMode = {
  38399. type: "box",
  38400. ignoreSize: !0
  38401. }, n
  38402. }
  38403. return n(e, t), e.type = "title", e.defaultOption = {
  38404. z: 6,
  38405. show: !0,
  38406. text: "",
  38407. target: "blank",
  38408. subtext: "",
  38409. subtarget: "blank",
  38410. left: 0,
  38411. top: 0,
  38412. backgroundColor: "rgba(0,0,0,0)",
  38413. borderColor: "#ccc",
  38414. borderWidth: 0,
  38415. padding: 5,
  38416. itemGap: 10,
  38417. textStyle: {
  38418. fontSize: 18,
  38419. fontWeight: "bold",
  38420. color: "#464646"
  38421. },
  38422. subtextStyle: {
  38423. fontSize: 12,
  38424. color: "#6E7079"
  38425. }
  38426. }, e
  38427. }(Rp),
  38428. BV = function (t) {
  38429. function e() {
  38430. var n = null !== t && t.apply(this, arguments) || this;
  38431. return n.type = e.type, n
  38432. }
  38433. return n(e, t), e.prototype.render = function (t, e, n) {
  38434. if (this.group.removeAll(), t.get("show")) {
  38435. var i = this.group,
  38436. r = t.getModel("textStyle"),
  38437. o = t.getModel("subtextStyle"),
  38438. a = t.get("textAlign"),
  38439. s = rt(t.get("textBaseline"), t.get("textVerticalAlign")),
  38440. l = new Fs({
  38441. style: nc(r, {
  38442. text: t.get("text"),
  38443. fill: r.getTextColor()
  38444. }, {
  38445. disableBox: !0
  38446. }),
  38447. z2: 10
  38448. }),
  38449. u = l.getBoundingRect(),
  38450. h = t.get("subtext"),
  38451. c = new Fs({
  38452. style: nc(o, {
  38453. text: h,
  38454. fill: o.getTextColor(),
  38455. y: u.height + t.get("itemGap"),
  38456. verticalAlign: "top"
  38457. }, {
  38458. disableBox: !0
  38459. }),
  38460. z2: 10
  38461. }),
  38462. p = t.get("link"),
  38463. d = t.get("sublink"),
  38464. f = t.get("triggerEvent", !0);
  38465. l.silent = !p && !f, c.silent = !d && !f, p && l.on("click", (function () {
  38466. bp(p, "_" + t.get("target"))
  38467. })), d && c.on("click", (function () {
  38468. bp(d, "_" + t.get("subtarget"))
  38469. })), Qs(l).eventData = Qs(c).eventData = f ? {
  38470. componentType: "title",
  38471. componentIndex: t.componentIndex
  38472. } : null, i.add(l), h && i.add(c);
  38473. var g = i.getBoundingRect(),
  38474. y = t.getBoxLayoutParams();
  38475. y.width = g.width, y.height = g.height;
  38476. var v = Cp(y, {
  38477. width: n.getWidth(),
  38478. height: n.getHeight()
  38479. }, t.get("padding"));
  38480. a || ("middle" === (a = t.get("left") || t.get("right")) && (a = "center"), "right" === a ? v.x += v.width : "center" === a && (v.x += v.width / 2)), s || ("center" === (s = t.get("top") || t.get("bottom")) && (s = "middle"), "bottom" === s ? v.y += v.height : "middle" === s && (v.y += v.height / 2), s = s || "top"), i.x = v.x, i.y = v.y, i.markRedraw();
  38481. var m = {
  38482. align: a,
  38483. verticalAlign: s
  38484. };
  38485. l.setStyle(m), c.setStyle(m), g = i.getBoundingRect();
  38486. var x = v.margin,
  38487. _ = t.getItemStyle(["color", "opacity"]);
  38488. _.fill = t.get("backgroundColor");
  38489. var b = new zs({
  38490. shape: {
  38491. x: g.x - x[3],
  38492. y: g.y - x[0],
  38493. width: g.width + x[1] + x[3],
  38494. height: g.height + x[0] + x[2],
  38495. r: t.get("borderRadius")
  38496. },
  38497. style: _,
  38498. subPixelOptimize: !0,
  38499. silent: !0
  38500. });
  38501. i.add(b)
  38502. }
  38503. }, e.type = "title", e
  38504. }(Tg);
  38505. var FV = function (t) {
  38506. function e() {
  38507. var n = null !== t && t.apply(this, arguments) || this;
  38508. return n.type = e.type, n.layoutMode = "box", n
  38509. }
  38510. return n(e, t), e.prototype.init = function (t, e, n) {
  38511. this.mergeDefaultAndTheme(t, n), this._initData()
  38512. }, e.prototype.mergeOption = function (e) {
  38513. t.prototype.mergeOption.apply(this, arguments), this._initData()
  38514. }, e.prototype.setCurrentIndex = function (t) {
  38515. null == t && (t = this.option.currentIndex);
  38516. var e = this._data.count();
  38517. this.option.loop ? t = (t % e + e) % e : (t >= e && (t = e - 1), t < 0 && (t = 0)), this.option.currentIndex = t
  38518. }, e.prototype.getCurrentIndex = function () {
  38519. return this.option.currentIndex
  38520. }, e.prototype.isIndexMax = function () {
  38521. return this.getCurrentIndex() >= this._data.count() - 1
  38522. }, e.prototype.setPlayState = function (t) {
  38523. this.option.autoPlay = !!t
  38524. }, e.prototype.getPlayState = function () {
  38525. return !!this.option.autoPlay
  38526. }, e.prototype._initData = function () {
  38527. var t, e = this.option,
  38528. n = e.data || [],
  38529. i = e.axisType,
  38530. r = this._names = [];
  38531. "category" === i ? (t = [], E(n, (function (e, n) {
  38532. var i, o = Ao(Mo(e), "");
  38533. q(e) ? (i = T(e)).value = n : i = n, t.push(i), r.push(o)
  38534. }))) : t = n;
  38535. var o = {
  38536. category: "ordinal",
  38537. time: "time",
  38538. value: "number"
  38539. } [i] || "number";
  38540. (this._data = new lx([{
  38541. name: "value",
  38542. type: o
  38543. }], this)).initData(t, r)
  38544. }, e.prototype.getData = function () {
  38545. return this._data
  38546. }, e.prototype.getCategories = function () {
  38547. if ("category" === this.get("axisType")) return this._names.slice()
  38548. }, e.type = "timeline", e.defaultOption = {
  38549. z: 4,
  38550. show: !0,
  38551. axisType: "time",
  38552. realtime: !0,
  38553. left: "20%",
  38554. top: null,
  38555. right: "20%",
  38556. bottom: 0,
  38557. width: null,
  38558. height: 40,
  38559. padding: 5,
  38560. controlPosition: "left",
  38561. autoPlay: !1,
  38562. rewind: !1,
  38563. loop: !0,
  38564. playInterval: 2e3,
  38565. currentIndex: 0,
  38566. itemStyle: {},
  38567. label: {
  38568. color: "#000"
  38569. },
  38570. data: []
  38571. }, e
  38572. }(Rp),
  38573. GV = function (t) {
  38574. function e() {
  38575. var n = null !== t && t.apply(this, arguments) || this;
  38576. return n.type = e.type, n
  38577. }
  38578. return n(e, t), e.type = "timeline.slider", e.defaultOption = Cc(FV.defaultOption, {
  38579. backgroundColor: "rgba(0,0,0,0)",
  38580. borderColor: "#ccc",
  38581. borderWidth: 0,
  38582. orient: "horizontal",
  38583. inverse: !1,
  38584. tooltip: {
  38585. trigger: "item"
  38586. },
  38587. symbol: "circle",
  38588. symbolSize: 12,
  38589. lineStyle: {
  38590. show: !0,
  38591. width: 2,
  38592. color: "#DAE1F5"
  38593. },
  38594. label: {
  38595. position: "auto",
  38596. show: !0,
  38597. interval: "auto",
  38598. rotate: 0,
  38599. color: "#A4B1D7"
  38600. },
  38601. itemStyle: {
  38602. color: "#A4B1D7",
  38603. borderWidth: 1
  38604. },
  38605. checkpointStyle: {
  38606. symbol: "circle",
  38607. symbolSize: 15,
  38608. color: "#316bf3",
  38609. borderColor: "#fff",
  38610. borderWidth: 2,
  38611. shadowBlur: 2,
  38612. shadowOffsetX: 1,
  38613. shadowOffsetY: 1,
  38614. shadowColor: "rgba(0, 0, 0, 0.3)",
  38615. animation: !0,
  38616. animationDuration: 300,
  38617. animationEasing: "quinticInOut"
  38618. },
  38619. controlStyle: {
  38620. show: !0,
  38621. showPlayBtn: !0,
  38622. showPrevBtn: !0,
  38623. showNextBtn: !0,
  38624. itemSize: 24,
  38625. itemGap: 12,
  38626. position: "left",
  38627. playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",
  38628. stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",
  38629. nextIcon: "M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",
  38630. prevIcon: "M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",
  38631. prevBtnSize: 18,
  38632. nextBtnSize: 18,
  38633. color: "#A4B1D7",
  38634. borderColor: "#A4B1D7",
  38635. borderWidth: 1
  38636. },
  38637. emphasis: {
  38638. label: {
  38639. show: !0,
  38640. color: "#6f778d"
  38641. },
  38642. itemStyle: {
  38643. color: "#316BF3"
  38644. },
  38645. controlStyle: {
  38646. color: "#316BF3",
  38647. borderColor: "#316BF3",
  38648. borderWidth: 2
  38649. }
  38650. },
  38651. progress: {
  38652. lineStyle: {
  38653. color: "#316BF3"
  38654. },
  38655. itemStyle: {
  38656. color: "#316BF3"
  38657. },
  38658. label: {
  38659. color: "#6f778d"
  38660. }
  38661. },
  38662. data: []
  38663. }), e
  38664. }(FV);
  38665. R(GV, vf.prototype);
  38666. var WV = function (t) {
  38667. function e() {
  38668. var n = null !== t && t.apply(this, arguments) || this;
  38669. return n.type = e.type, n
  38670. }
  38671. return n(e, t), e.type = "timeline", e
  38672. }(Tg),
  38673. HV = function (t) {
  38674. function e(e, n, i, r) {
  38675. var o = t.call(this, e, n, i) || this;
  38676. return o.type = r || "value", o
  38677. }
  38678. return n(e, t), e.prototype.getLabelModel = function () {
  38679. return this.model.getModel("label")
  38680. }, e.prototype.isHorizontal = function () {
  38681. return "horizontal" === this.model.get("orient")
  38682. }, e
  38683. }(nb),
  38684. YV = Math.PI,
  38685. XV = Oo(),
  38686. UV = function (t) {
  38687. function e() {
  38688. var n = null !== t && t.apply(this, arguments) || this;
  38689. return n.type = e.type, n
  38690. }
  38691. return n(e, t), e.prototype.init = function (t, e) {
  38692. this.api = e
  38693. }, e.prototype.render = function (t, e, n) {
  38694. if (this.model = t, this.api = n, this.ecModel = e, this.group.removeAll(), t.get("show", !0)) {
  38695. var i = this._layout(t, n),
  38696. r = this._createGroup("_mainGroup"),
  38697. o = this._createGroup("_labelGroup"),
  38698. a = this._axis = this._createAxis(i, t);
  38699. t.formatTooltip = function (t) {
  38700. return ng("nameValue", {
  38701. noName: !0,
  38702. value: a.scale.getLabel({
  38703. value: t
  38704. })
  38705. })
  38706. }, E(["AxisLine", "AxisTick", "Control", "CurrentPointer"], (function (e) {
  38707. this["_render" + e](i, r, a, t)
  38708. }), this), this._renderAxisLabel(i, o, a, t), this._position(i, t)
  38709. }
  38710. this._doPlayStop(), this._updateTicksStatus()
  38711. }, e.prototype.remove = function () {
  38712. this._clearTimer(), this.group.removeAll()
  38713. }, e.prototype.dispose = function () {
  38714. this._clearTimer()
  38715. }, e.prototype._layout = function (t, e) {
  38716. var n, i, r, o, a = t.get(["label", "position"]),
  38717. s = t.get("orient"),
  38718. l = function (t, e) {
  38719. return Cp(t.getBoxLayoutParams(), {
  38720. width: e.getWidth(),
  38721. height: e.getHeight()
  38722. }, t.get("padding"))
  38723. }(t, e),
  38724. u = {
  38725. horizontal: "center",
  38726. vertical: (n = null == a || "auto" === a ? "horizontal" === s ? l.y + l.height / 2 < e.getHeight() / 2 ? "-" : "+" : l.x + l.width / 2 < e.getWidth() / 2 ? "+" : "-" : U(a) ? {
  38727. horizontal: {
  38728. top: "-",
  38729. bottom: "+"
  38730. },
  38731. vertical: {
  38732. left: "-",
  38733. right: "+"
  38734. }
  38735. } [s][a] : a) >= 0 || "+" === n ? "left" : "right"
  38736. },
  38737. h = {
  38738. horizontal: n >= 0 || "+" === n ? "top" : "bottom",
  38739. vertical: "middle"
  38740. },
  38741. c = {
  38742. horizontal: 0,
  38743. vertical: YV / 2
  38744. },
  38745. p = "vertical" === s ? l.height : l.width,
  38746. d = t.getModel("controlStyle"),
  38747. f = d.get("show", !0),
  38748. g = f ? d.get("itemSize") : 0,
  38749. y = f ? d.get("itemGap") : 0,
  38750. v = g + y,
  38751. m = t.get(["label", "rotate"]) || 0;
  38752. m = m * YV / 180;
  38753. var x = d.get("position", !0),
  38754. _ = f && d.get("showPlayBtn", !0),
  38755. b = f && d.get("showPrevBtn", !0),
  38756. w = f && d.get("showNextBtn", !0),
  38757. S = 0,
  38758. M = p;
  38759. "left" === x || "bottom" === x ? (_ && (i = [0, 0], S += v), b && (r = [S, 0], S += v), w && (o = [M - g, 0], M -= v)) : (_ && (i = [M - g, 0], M -= v), b && (r = [0, 0], S += v), w && (o = [M - g, 0], M -= v));
  38760. var I = [S, M];
  38761. return t.get("inverse") && I.reverse(), {
  38762. viewRect: l,
  38763. mainLength: p,
  38764. orient: s,
  38765. rotation: c[s],
  38766. labelRotation: m,
  38767. labelPosOpt: n,
  38768. labelAlign: t.get(["label", "align"]) || u[s],
  38769. labelBaseline: t.get(["label", "verticalAlign"]) || t.get(["label", "baseline"]) || h[s],
  38770. playPosition: i,
  38771. prevBtnPosition: r,
  38772. nextBtnPosition: o,
  38773. axisExtent: I,
  38774. controlSize: g,
  38775. controlGap: y
  38776. }
  38777. }, e.prototype._position = function (t, e) {
  38778. var n = this._mainGroup,
  38779. i = this._labelGroup,
  38780. r = t.viewRect;
  38781. if ("vertical" === t.orient) {
  38782. var o = [1, 0, 0, 1, 0, 0],
  38783. a = r.x,
  38784. s = r.y + r.height;
  38785. we(o, o, [-a, -s]), Se(o, o, -YV / 2), we(o, o, [a, s]), (r = r.clone()).applyTransform(o)
  38786. }
  38787. var l = y(r),
  38788. u = y(n.getBoundingRect()),
  38789. h = y(i.getBoundingRect()),
  38790. c = [n.x, n.y],
  38791. p = [i.x, i.y];
  38792. p[0] = c[0] = l[0][0];
  38793. var d, f = t.labelPosOpt;
  38794. null == f || U(f) ? (v(c, u, l, 1, d = "+" === f ? 0 : 1), v(p, h, l, 1, 1 - d)) : (v(c, u, l, 1, d = f >= 0 ? 0 : 1), p[1] = c[1] + f);
  38795. function g(t) {
  38796. t.originX = l[0][0] - t.x, t.originY = l[1][0] - t.y
  38797. }
  38798. function y(t) {
  38799. return [
  38800. [t.x, t.x + t.width],
  38801. [t.y, t.y + t.height]
  38802. ]
  38803. }
  38804. function v(t, e, n, i, r) {
  38805. t[i] += n[i][r] - e[i][r]
  38806. }
  38807. n.setPosition(c), i.setPosition(p), n.rotation = i.rotation = t.rotation, g(n), g(i)
  38808. }, e.prototype._createAxis = function (t, e) {
  38809. var n = e.getData(),
  38810. i = e.get("axisType"),
  38811. r = function (t, e) {
  38812. if (e = e || t.get("type"), e) switch (e) {
  38813. case "category":
  38814. return new Lx({
  38815. ordinalMeta: t.getCategories(),
  38816. extent: [1 / 0, -1 / 0]
  38817. });
  38818. case "time":
  38819. return new Zx({
  38820. locale: t.ecModel.getLocaleModel(),
  38821. useUTC: t.ecModel.get("useUTC")
  38822. });
  38823. default:
  38824. return new Ox
  38825. }
  38826. }(e, i);
  38827. r.getTicks = function () {
  38828. return n.mapArray(["value"], (function (t) {
  38829. return {
  38830. value: t
  38831. }
  38832. }))
  38833. };
  38834. var o = n.getDataExtent("value");
  38835. r.setExtent(o[0], o[1]), r.calcNiceTicks();
  38836. var a = new HV("value", r, t.axisExtent, i);
  38837. return a.model = e, a
  38838. }, e.prototype._createGroup = function (t) {
  38839. var e = this[t] = new zr;
  38840. return this.group.add(e), e
  38841. }, e.prototype._renderAxisLine = function (t, e, n, i) {
  38842. var r = n.getExtent();
  38843. if (i.get(["lineStyle", "show"])) {
  38844. var o = new Zu({
  38845. shape: {
  38846. x1: r[0],
  38847. y1: 0,
  38848. x2: r[1],
  38849. y2: 0
  38850. },
  38851. style: A({
  38852. lineCap: "round"
  38853. }, i.getModel("lineStyle").getLineStyle()),
  38854. silent: !0,
  38855. z2: 1
  38856. });
  38857. e.add(o);
  38858. var a = this._progressLine = new Zu({
  38859. shape: {
  38860. x1: r[0],
  38861. x2: this._currentPointer ? this._currentPointer.x : r[0],
  38862. y1: 0,
  38863. y2: 0
  38864. },
  38865. style: k({
  38866. lineCap: "round",
  38867. lineWidth: o.style.lineWidth
  38868. }, i.getModel(["progress", "lineStyle"]).getLineStyle()),
  38869. silent: !0,
  38870. z2: 1
  38871. });
  38872. e.add(a)
  38873. }
  38874. }, e.prototype._renderAxisTick = function (t, e, n, i) {
  38875. var r = this,
  38876. o = i.getData(),
  38877. a = n.scale.getTicks();
  38878. this._tickSymbols = [], E(a, (function (t) {
  38879. var a = n.dataToCoord(t.value),
  38880. s = o.getItemModel(t.value),
  38881. l = s.getModel("itemStyle"),
  38882. u = s.getModel(["emphasis", "itemStyle"]),
  38883. h = s.getModel(["progress", "itemStyle"]),
  38884. c = {
  38885. x: a,
  38886. y: 0,
  38887. onclick: W(r._changeTimeline, r, t.value)
  38888. },
  38889. p = ZV(s, l, e, c);
  38890. p.ensureState("emphasis").style = u.getItemStyle(), p.ensureState("progress").style = h.getItemStyle(), Hl(p);
  38891. var d = Qs(p);
  38892. s.get("tooltip") ? (d.dataIndex = t.value, d.dataModel = i) : d.dataIndex = d.dataModel = null, r._tickSymbols.push(p)
  38893. }))
  38894. }, e.prototype._renderAxisLabel = function (t, e, n, i) {
  38895. var r = this;
  38896. if (n.getLabelModel().get("show")) {
  38897. var o = i.getData(),
  38898. a = n.getViewLabels();
  38899. this._tickLabels = [], E(a, (function (i) {
  38900. var a = i.tickValue,
  38901. s = o.getItemModel(a),
  38902. l = s.getModel("label"),
  38903. u = s.getModel(["emphasis", "label"]),
  38904. h = s.getModel(["progress", "label"]),
  38905. c = n.dataToCoord(i.tickValue),
  38906. p = new Fs({
  38907. x: c,
  38908. y: 0,
  38909. rotation: t.labelRotation - t.rotation,
  38910. onclick: W(r._changeTimeline, r, a),
  38911. silent: !1,
  38912. style: nc(l, {
  38913. text: i.formattedLabel,
  38914. align: t.labelAlign,
  38915. verticalAlign: t.labelBaseline
  38916. })
  38917. });
  38918. p.ensureState("emphasis").style = nc(u), p.ensureState("progress").style = nc(h), e.add(p), Hl(p), XV(p).dataIndex = a, r._tickLabels.push(p)
  38919. }))
  38920. }
  38921. }, e.prototype._renderControl = function (t, e, n, i) {
  38922. var r = t.controlSize,
  38923. o = t.rotation,
  38924. a = i.getModel("controlStyle").getItemStyle(),
  38925. s = i.getModel(["emphasis", "controlStyle"]).getItemStyle(),
  38926. l = i.getPlayState(),
  38927. u = i.get("inverse", !0);
  38928. function h(t, n, l, u) {
  38929. if (t) {
  38930. var h = Ir(rt(i.get(["controlStyle", n + "BtnSize"]), r), r),
  38931. c = function (t, e, n, i) {
  38932. var r = i.style,
  38933. o = Hh(t.get(["controlStyle", e]), i || {}, new ze(n[0], n[1], n[2], n[3]));
  38934. r && o.setStyle(r);
  38935. return o
  38936. }(i, n + "Icon", [0, -h / 2, h, h], {
  38937. x: t[0],
  38938. y: t[1],
  38939. originX: r / 2,
  38940. originY: 0,
  38941. rotation: u ? -o : 0,
  38942. rectHover: !0,
  38943. style: a,
  38944. onclick: l
  38945. });
  38946. c.ensureState("emphasis").style = s, e.add(c), Hl(c)
  38947. }
  38948. }
  38949. h(t.nextBtnPosition, "next", W(this._changeTimeline, this, u ? "-" : "+")), h(t.prevBtnPosition, "prev", W(this._changeTimeline, this, u ? "+" : "-")), h(t.playPosition, l ? "stop" : "play", W(this._handlePlayClick, this, !l), !0)
  38950. }, e.prototype._renderCurrentPointer = function (t, e, n, i) {
  38951. var r = i.getData(),
  38952. o = i.getCurrentIndex(),
  38953. a = r.getItemModel(o).getModel("checkpointStyle"),
  38954. s = this,
  38955. l = {
  38956. onCreate: function (t) {
  38957. t.draggable = !0, t.drift = W(s._handlePointerDrag, s), t.ondragend = W(s._handlePointerDragend, s), jV(t, s._progressLine, o, n, i, !0)
  38958. },
  38959. onUpdate: function (t) {
  38960. jV(t, s._progressLine, o, n, i)
  38961. }
  38962. };
  38963. this._currentPointer = ZV(a, a, this._mainGroup, {}, this._currentPointer, l)
  38964. }, e.prototype._handlePlayClick = function (t) {
  38965. this._clearTimer(), this.api.dispatchAction({
  38966. type: "timelinePlayChange",
  38967. playState: t,
  38968. from: this.uid
  38969. })
  38970. }, e.prototype._handlePointerDrag = function (t, e, n) {
  38971. this._clearTimer(), this._pointerChangeTimeline([n.offsetX, n.offsetY])
  38972. }, e.prototype._handlePointerDragend = function (t) {
  38973. this._pointerChangeTimeline([t.offsetX, t.offsetY], !0)
  38974. }, e.prototype._pointerChangeTimeline = function (t, e) {
  38975. var n = this._toAxisCoord(t)[0],
  38976. i = jr(this._axis.getExtent().slice());
  38977. n > i[1] && (n = i[1]), n < i[0] && (n = i[0]), this._currentPointer.x = n, this._currentPointer.markRedraw();
  38978. var r = this._progressLine;
  38979. r && (r.shape.x2 = n, r.dirty());
  38980. var o = this._findNearestTick(n),
  38981. a = this.model;
  38982. (e || o !== a.getCurrentIndex() && a.get("realtime")) && this._changeTimeline(o)
  38983. }, e.prototype._doPlayStop = function () {
  38984. var t = this;
  38985. this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout((function () {
  38986. var e = t.model;
  38987. t._changeTimeline(e.getCurrentIndex() + (e.get("rewind", !0) ? -1 : 1))
  38988. }), this.model.get("playInterval")))
  38989. }, e.prototype._toAxisCoord = function (t) {
  38990. return zh(t, this._mainGroup.getLocalTransform(), !0)
  38991. }, e.prototype._findNearestTick = function (t) {
  38992. var e, n = this.model.getData(),
  38993. i = 1 / 0,
  38994. r = this._axis;
  38995. return n.each(["value"], (function (n, o) {
  38996. var a = r.dataToCoord(n),
  38997. s = Math.abs(a - t);
  38998. s < i && (i = s, e = o)
  38999. })), e
  39000. }, e.prototype._clearTimer = function () {
  39001. this._timer && (clearTimeout(this._timer), this._timer = null)
  39002. }, e.prototype._changeTimeline = function (t) {
  39003. var e = this.model.getCurrentIndex();
  39004. "+" === t ? t = e + 1 : "-" === t && (t = e - 1), this.api.dispatchAction({
  39005. type: "timelineChange",
  39006. currentIndex: t,
  39007. from: this.uid
  39008. })
  39009. }, e.prototype._updateTicksStatus = function () {
  39010. var t = this.model.getCurrentIndex(),
  39011. e = this._tickSymbols,
  39012. n = this._tickLabels;
  39013. if (e)
  39014. for (var i = 0; i < e.length; i++) e && e[i] && e[i].toggleState("progress", i < t);
  39015. if (n)
  39016. for (i = 0; i < n.length; i++) n && n[i] && n[i].toggleState("progress", XV(n[i]).dataIndex <= t)
  39017. }, e.type = "timeline.slider", e
  39018. }(WV);
  39019. function ZV(t, e, n, i, r, o) {
  39020. var a = e.get("color");
  39021. r ? (r.setColor(a), n.add(r), o && o.onUpdate(r)) : ((r = Wy(t.get("symbol"), -1, -1, 2, 2, a)).setStyle("strokeNoScale", !0), n.add(r), o && o.onCreate(r));
  39022. var s = e.getItemStyle(["color"]);
  39023. r.setStyle(s), i = C({
  39024. rectHover: !0,
  39025. z2: 100
  39026. }, i, !0);
  39027. var l = Hy(t.get("symbolSize"));
  39028. i.scaleX = l[0] / 2, i.scaleY = l[1] / 2;
  39029. var u = Yy(t.get("symbolOffset"), l);
  39030. u && (i.x = (i.x || 0) + u[0], i.y = (i.y || 0) + u[1]);
  39031. var h = t.get("symbolRotate");
  39032. return i.rotation = (h || 0) * Math.PI / 180 || 0, r.attr(i), r.updateTransform(), r
  39033. }
  39034. function jV(t, e, n, i, r, o) {
  39035. if (!t.dragging) {
  39036. var a = r.getModel("checkpointStyle"),
  39037. s = i.dataToCoord(r.getData().get("value", n));
  39038. if (o || !a.get("animation", !0)) t.attr({
  39039. x: s,
  39040. y: 0
  39041. }), e && e.attr({
  39042. shape: {
  39043. x2: s
  39044. }
  39045. });
  39046. else {
  39047. var l = {
  39048. duration: a.get("animationDuration", !0),
  39049. easing: a.get("animationEasing", !0)
  39050. };
  39051. t.stopAnimation(null, !0), t.animateTo({
  39052. x: s,
  39053. y: 0
  39054. }, l), e && e.animateTo({
  39055. shape: {
  39056. x2: s
  39057. }
  39058. }, l)
  39059. }
  39060. }
  39061. }
  39062. function qV(t) {
  39063. var e = t && t.timeline;
  39064. Y(e) || (e = e ? [e] : []), E(e, (function (t) {
  39065. t && function (t) {
  39066. var e = t.type,
  39067. n = {
  39068. number: "value",
  39069. time: "time"
  39070. };
  39071. n[e] && (t.axisType = n[e], delete t.type);
  39072. if (KV(t), $V(t, "controlPosition")) {
  39073. var i = t.controlStyle || (t.controlStyle = {});
  39074. $V(i, "position") || (i.position = t.controlPosition), "none" !== i.position || $V(i, "show") || (i.show = !1, delete i.position), delete t.controlPosition
  39075. }
  39076. E(t.data || [], (function (t) {
  39077. q(t) && !Y(t) && (!$V(t, "value") && $V(t, "name") && (t.value = t.name), KV(t))
  39078. }))
  39079. }(t)
  39080. }))
  39081. }
  39082. function KV(t) {
  39083. var e = t.itemStyle || (t.itemStyle = {}),
  39084. n = e.emphasis || (e.emphasis = {}),
  39085. i = t.label || t.label || {},
  39086. r = i.normal || (i.normal = {}),
  39087. o = {
  39088. normal: 1,
  39089. emphasis: 1
  39090. };
  39091. E(i, (function (t, e) {
  39092. o[e] || $V(r, e) || (r[e] = t)
  39093. })), n.label && !$V(i, "emphasis") && (i.emphasis = n.label, delete n.label)
  39094. }
  39095. function $V(t, e) {
  39096. return t.hasOwnProperty(e)
  39097. }
  39098. function JV(t, e) {
  39099. if (!t) return !1;
  39100. for (var n = Y(t) ? t : [t], i = 0; i < n.length; i++)
  39101. if (n[i] && n[i][e]) return !0;
  39102. return !1
  39103. }
  39104. function QV(t) {
  39105. wo(t, "label", ["show"])
  39106. }
  39107. var tB = Oo(),
  39108. eB = function (t) {
  39109. function e() {
  39110. var n = null !== t && t.apply(this, arguments) || this;
  39111. return n.type = e.type, n.createdBySelf = !1, n
  39112. }
  39113. return n(e, t), e.prototype.init = function (t, e, n) {
  39114. this.mergeDefaultAndTheme(t, n), this._mergeOption(t, n, !1, !0)
  39115. }, e.prototype.isAnimationEnabled = function () {
  39116. if (r.node) return !1;
  39117. var t = this.__hostSeries;
  39118. return this.getShallow("animation") && t && t.isAnimationEnabled()
  39119. }, e.prototype.mergeOption = function (t, e) {
  39120. this._mergeOption(t, e, !1, !1)
  39121. }, e.prototype._mergeOption = function (t, e, n, i) {
  39122. var r = this.mainType;
  39123. n || e.eachSeries((function (t) {
  39124. var n = t.get(this.mainType, !0),
  39125. o = tB(t)[r];
  39126. n && n.data ? (o ? o._mergeOption(n, e, !0) : (i && QV(n), E(n.data, (function (t) {
  39127. t instanceof Array ? (QV(t[0]), QV(t[1])) : QV(t)
  39128. })), A(o = this.createMarkerModelFromSeries(n, this, e), {
  39129. mainType: this.mainType,
  39130. seriesIndex: t.seriesIndex,
  39131. name: t.name,
  39132. createdBySelf: !0
  39133. }), o.__hostSeries = t), tB(t)[r] = o) : tB(t)[r] = null
  39134. }), this)
  39135. }, e.prototype.formatTooltip = function (t, e, n) {
  39136. var i = this.getData(),
  39137. r = this.getRawValue(t),
  39138. o = i.getName(t);
  39139. return ng("section", {
  39140. header: this.name,
  39141. blocks: [ng("nameValue", {
  39142. name: o,
  39143. value: r,
  39144. noName: !o,
  39145. noValue: null == r
  39146. })]
  39147. })
  39148. }, e.prototype.getData = function () {
  39149. return this._data
  39150. }, e.prototype.setData = function (t) {
  39151. this._data = t
  39152. }, e.getMarkerModelFromSeries = function (t, e) {
  39153. return tB(t)[e]
  39154. }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e
  39155. }(Rp);
  39156. R(eB, vf.prototype);
  39157. var nB = function (t) {
  39158. function e() {
  39159. var n = null !== t && t.apply(this, arguments) || this;
  39160. return n.type = e.type, n
  39161. }
  39162. return n(e, t), e.prototype.createMarkerModelFromSeries = function (t, n, i) {
  39163. return new e(t, n, i)
  39164. }, e.type = "markPoint", e.defaultOption = {
  39165. z: 5,
  39166. symbol: "pin",
  39167. symbolSize: 50,
  39168. tooltip: {
  39169. trigger: "item"
  39170. },
  39171. label: {
  39172. show: !0,
  39173. position: "inside"
  39174. },
  39175. itemStyle: {
  39176. borderWidth: 2
  39177. },
  39178. emphasis: {
  39179. label: {
  39180. show: !0
  39181. }
  39182. }
  39183. }, e
  39184. }(eB);
  39185. function iB(t) {
  39186. return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)))
  39187. }
  39188. function rB(t, e, n, i, r, o) {
  39189. var a = [],
  39190. s = gx(e, i) ? e.getCalculationInfo("stackResultDimension") : i,
  39191. l = hB(e, s, t),
  39192. u = e.indicesOfNearest(s, l)[0];
  39193. a[r] = e.get(n, u), a[o] = e.get(s, u);
  39194. var h = e.get(i, u),
  39195. c = qr(e.get(i, u));
  39196. return (c = Math.min(c, 20)) >= 0 && (a[o] = +a[o].toFixed(c)), [a, h]
  39197. }
  39198. var oB = {
  39199. min: H(rB, "min"),
  39200. max: H(rB, "max"),
  39201. average: H(rB, "average"),
  39202. median: H(rB, "median")
  39203. };
  39204. function aB(t, e) {
  39205. if (e) {
  39206. var n = t.getData(),
  39207. i = t.coordinateSystem,
  39208. r = i && i.dimensions;
  39209. if (! function (t) {
  39210. return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y))
  39211. }(e) && !Y(e.coord) && Y(r)) {
  39212. var o = sB(e, n, i, t);
  39213. if ((e = T(e)).type && oB[e.type] && o.baseAxis && o.valueAxis) {
  39214. var a = P(r, o.baseAxis.dim),
  39215. s = P(r, o.valueAxis.dim),
  39216. l = oB[e.type](n, o.baseDataDim, o.valueDataDim, a, s);
  39217. e.coord = l[0], e.value = l[1]
  39218. } else e.coord = [null != e.xAxis ? e.xAxis : e.radiusAxis, null != e.yAxis ? e.yAxis : e.angleAxis]
  39219. }
  39220. if (null != e.coord && Y(r))
  39221. for (var u = e.coord, h = 0; h < 2; h++) oB[u[h]] && (u[h] = hB(n, n.mapDimension(r[h]), u[h]));
  39222. else e.coord = [];
  39223. return e
  39224. }
  39225. }
  39226. function sB(t, e, n, i) {
  39227. var r = {};
  39228. return null != t.valueIndex || null != t.valueDim ? (r.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) : t.valueDim, r.valueAxis = n.getAxis(function (t, e) {
  39229. var n = t.getData().getDimensionInfo(e);
  39230. return n && n.coordDim
  39231. }(i, r.valueDataDim)), r.baseAxis = n.getOtherAxis(r.valueAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim)) : (r.baseAxis = i.getBaseAxis(), r.valueAxis = n.getOtherAxis(r.baseAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim), r.valueDataDim = e.mapDimension(r.valueAxis.dim)), r
  39232. }
  39233. function lB(t, e) {
  39234. return !(t && t.containData && e.coord && !iB(e)) || t.containData(e.coord)
  39235. }
  39236. function uB(t, e) {
  39237. return t ? function (t, n, i, r) {
  39238. return wf(r < 2 ? t.coord && t.coord[r] : t.value, e[r])
  39239. } : function (t, n, i, r) {
  39240. return wf(t.value, e[r])
  39241. }
  39242. }
  39243. function hB(t, e, n) {
  39244. if ("average" === n) {
  39245. var i = 0,
  39246. r = 0;
  39247. return t.each(e, (function (t, e) {
  39248. isNaN(t) || (i += t, r++)
  39249. })), i / r
  39250. }
  39251. return "median" === n ? t.getMedian(e) : t.getDataExtent(e)["max" === n ? 1 : 0]
  39252. }
  39253. var cB = Oo(),
  39254. pB = function (t) {
  39255. function e() {
  39256. var n = null !== t && t.apply(this, arguments) || this;
  39257. return n.type = e.type, n
  39258. }
  39259. return n(e, t), e.prototype.init = function () {
  39260. this.markerGroupMap = yt()
  39261. }, e.prototype.render = function (t, e, n) {
  39262. var i = this,
  39263. r = this.markerGroupMap;
  39264. r.each((function (t) {
  39265. cB(t).keep = !1
  39266. })), e.eachSeries((function (t) {
  39267. var r = eB.getMarkerModelFromSeries(t, i.type);
  39268. r && i.renderSeries(t, r, e, n)
  39269. })), r.each((function (t) {
  39270. !cB(t).keep && i.group.remove(t.group)
  39271. }))
  39272. }, e.prototype.markKeep = function (t) {
  39273. cB(t).keep = !0
  39274. }, e.prototype.toggleBlurSeries = function (t, e) {
  39275. var n = this;
  39276. E(t, (function (t) {
  39277. var i = eB.getMarkerModelFromSeries(t, n.type);
  39278. i && i.getData().eachItemGraphicEl((function (t) {
  39279. t && (e ? Pl(t) : Ol(t))
  39280. }))
  39281. }))
  39282. }, e.type = "marker", e
  39283. }(Tg);
  39284. function dB(t, e, n) {
  39285. var i = e.coordinateSystem;
  39286. t.each((function (r) {
  39287. var o, a = t.getItemModel(r),
  39288. s = Ur(a.get("x"), n.getWidth()),
  39289. l = Ur(a.get("y"), n.getHeight());
  39290. if (isNaN(s) || isNaN(l)) {
  39291. if (e.getMarkerPosition) o = e.getMarkerPosition(t.getValues(t.dimensions, r));
  39292. else if (i) {
  39293. var u = t.get(i.dimensions[0], r),
  39294. h = t.get(i.dimensions[1], r);
  39295. o = i.dataToPoint([u, h])
  39296. }
  39297. } else o = [s, l];
  39298. isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), t.setItemLayout(r, o)
  39299. }))
  39300. }
  39301. var fB = function (t) {
  39302. function e() {
  39303. var n = null !== t && t.apply(this, arguments) || this;
  39304. return n.type = e.type, n
  39305. }
  39306. return n(e, t), e.prototype.updateTransform = function (t, e, n) {
  39307. e.eachSeries((function (t) {
  39308. var e = eB.getMarkerModelFromSeries(t, "markPoint");
  39309. e && (dB(e.getData(), t, n), this.markerGroupMap.get(t.id).updateLayout())
  39310. }), this)
  39311. }, e.prototype.renderSeries = function (t, e, n, i) {
  39312. var r = t.coordinateSystem,
  39313. o = t.id,
  39314. a = t.getData(),
  39315. s = this.markerGroupMap,
  39316. l = s.get(o) || s.set(o, new hS),
  39317. u = function (t, e, n) {
  39318. var i;
  39319. i = t ? z(t && t.dimensions, (function (t) {
  39320. return A(A({}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}), {
  39321. name: t,
  39322. ordinalMeta: null
  39323. })
  39324. })) : [{
  39325. name: "value",
  39326. type: "float"
  39327. }];
  39328. var r = new lx(i, n),
  39329. o = z(n.get("data"), H(aB, e));
  39330. t && (o = B(o, H(lB, t)));
  39331. var a = uB(!!t, i);
  39332. return r.initData(o, null, a), r
  39333. }(r, t, e);
  39334. e.setData(u), dB(e.getData(), t, i), u.each((function (t) {
  39335. var n = u.getItemModel(t),
  39336. i = n.getShallow("symbol"),
  39337. r = n.getShallow("symbolSize"),
  39338. o = n.getShallow("symbolRotate"),
  39339. s = n.getShallow("symbolOffset"),
  39340. l = n.getShallow("symbolKeepAspect");
  39341. if (X(i) || X(r) || X(o) || X(s)) {
  39342. var h = e.getRawValue(t),
  39343. c = e.getDataParams(t);
  39344. X(i) && (i = i(h, c)), X(r) && (r = r(h, c)), X(o) && (o = o(h, c)), X(s) && (s = s(h, c))
  39345. }
  39346. var p = n.getModel("itemStyle").getItemStyle(),
  39347. d = Ty(a, "color");
  39348. p.fill || (p.fill = d), u.setItemVisual(t, {
  39349. symbol: i,
  39350. symbolSize: r,
  39351. symbolRotate: o,
  39352. symbolOffset: s,
  39353. symbolKeepAspect: l,
  39354. style: p
  39355. })
  39356. })), l.updateData(u), this.group.add(l.group), u.eachItemGraphicEl((function (t) {
  39357. t.traverse((function (t) {
  39358. Qs(t).dataModel = e
  39359. }))
  39360. })), this.markKeep(l), l.group.silent = e.get("silent") || t.get("silent")
  39361. }, e.type = "markPoint", e
  39362. }(pB);
  39363. var gB = function (t) {
  39364. function e() {
  39365. var n = null !== t && t.apply(this, arguments) || this;
  39366. return n.type = e.type, n
  39367. }
  39368. return n(e, t), e.prototype.createMarkerModelFromSeries = function (t, n, i) {
  39369. return new e(t, n, i)
  39370. }, e.type = "markLine", e.defaultOption = {
  39371. z: 5,
  39372. symbol: ["circle", "arrow"],
  39373. symbolSize: [8, 16],
  39374. symbolOffset: 0,
  39375. precision: 2,
  39376. tooltip: {
  39377. trigger: "item"
  39378. },
  39379. label: {
  39380. show: !0,
  39381. position: "end",
  39382. distance: 5
  39383. },
  39384. lineStyle: {
  39385. type: "dashed"
  39386. },
  39387. emphasis: {
  39388. label: {
  39389. show: !0
  39390. },
  39391. lineStyle: {
  39392. width: 3
  39393. }
  39394. },
  39395. animationEasing: "linear"
  39396. }, e
  39397. }(eB),
  39398. yB = Oo(),
  39399. vB = function (t, e, n, i) {
  39400. var r, o = t.getData();
  39401. if (Y(i)) r = i;
  39402. else {
  39403. var a = i.type;
  39404. if ("min" === a || "max" === a || "average" === a || "median" === a || null != i.xAxis || null != i.yAxis) {
  39405. var s = void 0,
  39406. l = void 0;
  39407. if (null != i.yAxis || null != i.xAxis) s = e.getAxis(null != i.yAxis ? "y" : "x"), l = it(i.yAxis, i.xAxis);
  39408. else {
  39409. var u = sB(i, o, e, t);
  39410. s = u.valueAxis, l = hB(o, yx(o, u.valueDataDim), a)
  39411. }
  39412. var h = "x" === s.dim ? 0 : 1,
  39413. c = 1 - h,
  39414. p = T(i),
  39415. d = {
  39416. coord: []
  39417. };
  39418. p.type = null, p.coord = [], p.coord[c] = -1 / 0, d.coord[c] = 1 / 0;
  39419. var f = n.get("precision");
  39420. f >= 0 && j(l) && (l = +l.toFixed(Math.min(f, 20))), p.coord[h] = d.coord[h] = l, r = [p, d, {
  39421. type: a,
  39422. valueIndex: i.valueIndex,
  39423. value: l
  39424. }]
  39425. } else r = []
  39426. }
  39427. var g = [aB(t, r[0]), aB(t, r[1]), A({}, r[2])];
  39428. return g[2].type = g[2].type || null, C(g[2], g[0]), C(g[2], g[1]), g
  39429. };
  39430. function mB(t) {
  39431. return !isNaN(t) && !isFinite(t)
  39432. }
  39433. function xB(t, e, n, i) {
  39434. var r = 1 - t,
  39435. o = i.dimensions[t];
  39436. return mB(e[r]) && mB(n[r]) && e[t] === n[t] && i.getAxis(o).containData(e[t])
  39437. }
  39438. function _B(t, e) {
  39439. if ("cartesian2d" === t.type) {
  39440. var n = e[0].coord,
  39441. i = e[1].coord;
  39442. if (n && i && (xB(1, n, i, t) || xB(0, n, i, t))) return !0
  39443. }
  39444. return lB(t, e[0]) && lB(t, e[1])
  39445. }
  39446. function bB(t, e, n, i, r) {
  39447. var o, a = i.coordinateSystem,
  39448. s = t.getItemModel(e),
  39449. l = Ur(s.get("x"), r.getWidth()),
  39450. u = Ur(s.get("y"), r.getHeight());
  39451. if (isNaN(l) || isNaN(u)) {
  39452. if (i.getMarkerPosition) o = i.getMarkerPosition(t.getValues(t.dimensions, e));
  39453. else {
  39454. var h = a.dimensions,
  39455. c = t.get(h[0], e),
  39456. p = t.get(h[1], e);
  39457. o = a.dataToPoint([c, p])
  39458. }
  39459. if (MS(a, "cartesian2d")) {
  39460. var d = a.getAxis("x"),
  39461. f = a.getAxis("y");
  39462. h = a.dimensions;
  39463. mB(t.get(h[0], e)) ? o[0] = d.toGlobalCoord(d.getExtent()[n ? 0 : 1]) : mB(t.get(h[1], e)) && (o[1] = f.toGlobalCoord(f.getExtent()[n ? 0 : 1]))
  39464. }
  39465. isNaN(l) || (o[0] = l), isNaN(u) || (o[1] = u)
  39466. } else o = [l, u];
  39467. t.setItemLayout(e, o)
  39468. }
  39469. var wB = function (t) {
  39470. function e() {
  39471. var n = null !== t && t.apply(this, arguments) || this;
  39472. return n.type = e.type, n
  39473. }
  39474. return n(e, t), e.prototype.updateTransform = function (t, e, n) {
  39475. e.eachSeries((function (t) {
  39476. var e = eB.getMarkerModelFromSeries(t, "markLine");
  39477. if (e) {
  39478. var i = e.getData(),
  39479. r = yB(e).from,
  39480. o = yB(e).to;
  39481. r.each((function (e) {
  39482. bB(r, e, !0, t, n), bB(o, e, !1, t, n)
  39483. })), i.each((function (t) {
  39484. i.setItemLayout(t, [r.getItemLayout(t), o.getItemLayout(t)])
  39485. })), this.markerGroupMap.get(t.id).updateLayout()
  39486. }
  39487. }), this)
  39488. }, e.prototype.renderSeries = function (t, e, n, i) {
  39489. var r = t.coordinateSystem,
  39490. o = t.id,
  39491. a = t.getData(),
  39492. s = this.markerGroupMap,
  39493. l = s.get(o) || s.set(o, new OA);
  39494. this.group.add(l.group);
  39495. var u = function (t, e, n) {
  39496. var i;
  39497. i = t ? z(t && t.dimensions, (function (t) {
  39498. return A(A({}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}), {
  39499. name: t,
  39500. ordinalMeta: null
  39501. })
  39502. })) : [{
  39503. name: "value",
  39504. type: "float"
  39505. }];
  39506. var r = new lx(i, n),
  39507. o = new lx(i, n),
  39508. a = new lx([], n),
  39509. s = z(n.get("data"), H(vB, e, t, n));
  39510. t && (s = B(s, H(_B, t)));
  39511. var l = uB(!!t, i);
  39512. return r.initData(z(s, (function (t) {
  39513. return t[0]
  39514. })), null, l), o.initData(z(s, (function (t) {
  39515. return t[1]
  39516. })), null, l), a.initData(z(s, (function (t) {
  39517. return t[2]
  39518. }))), a.hasItemOption = !0, {
  39519. from: r,
  39520. to: o,
  39521. line: a
  39522. }
  39523. }(r, t, e),
  39524. h = u.from,
  39525. c = u.to,
  39526. p = u.line;
  39527. yB(e).from = h, yB(e).to = c, e.setData(p);
  39528. var d = e.get("symbol"),
  39529. f = e.get("symbolSize"),
  39530. g = e.get("symbolRotate"),
  39531. y = e.get("symbolOffset");
  39532. function v(e, n, r) {
  39533. var o = e.getItemModel(n);
  39534. bB(e, n, r, t, i);
  39535. var s = o.getModel("itemStyle").getItemStyle();
  39536. null == s.fill && (s.fill = Ty(a, "color")), e.setItemVisual(n, {
  39537. symbolKeepAspect: o.get("symbolKeepAspect"),
  39538. symbolOffset: rt(o.get("symbolOffset", !0), y[r ? 0 : 1]),
  39539. symbolRotate: rt(o.get("symbolRotate", !0), g[r ? 0 : 1]),
  39540. symbolSize: rt(o.get("symbolSize"), f[r ? 0 : 1]),
  39541. symbol: rt(o.get("symbol", !0), d[r ? 0 : 1]),
  39542. style: s
  39543. })
  39544. }
  39545. Y(d) || (d = [d, d]), Y(f) || (f = [f, f]), Y(g) || (g = [g, g]), Y(y) || (y = [y, y]), u.from.each((function (t) {
  39546. v(h, t, !0), v(c, t, !1)
  39547. })), p.each((function (t) {
  39548. var e = p.getItemModel(t).getModel("lineStyle").getLineStyle();
  39549. p.setItemLayout(t, [h.getItemLayout(t), c.getItemLayout(t)]), null == e.stroke && (e.stroke = h.getItemVisual(t, "style").fill), p.setItemVisual(t, {
  39550. fromSymbolKeepAspect: h.getItemVisual(t, "symbolKeepAspect"),
  39551. fromSymbolOffset: h.getItemVisual(t, "symbolOffset"),
  39552. fromSymbolRotate: h.getItemVisual(t, "symbolRotate"),
  39553. fromSymbolSize: h.getItemVisual(t, "symbolSize"),
  39554. fromSymbol: h.getItemVisual(t, "symbol"),
  39555. toSymbolKeepAspect: c.getItemVisual(t, "symbolKeepAspect"),
  39556. toSymbolOffset: c.getItemVisual(t, "symbolOffset"),
  39557. toSymbolRotate: c.getItemVisual(t, "symbolRotate"),
  39558. toSymbolSize: c.getItemVisual(t, "symbolSize"),
  39559. toSymbol: c.getItemVisual(t, "symbol"),
  39560. style: e
  39561. })
  39562. })), l.updateData(p), u.line.eachItemGraphicEl((function (t) {
  39563. Qs(t).dataModel = e, t.traverse((function (t) {
  39564. Qs(t).dataModel = e
  39565. }))
  39566. })), this.markKeep(l), l.group.silent = e.get("silent") || t.get("silent")
  39567. }, e.type = "markLine", e
  39568. }(pB);
  39569. var SB = function (t) {
  39570. function e() {
  39571. var n = null !== t && t.apply(this, arguments) || this;
  39572. return n.type = e.type, n
  39573. }
  39574. return n(e, t), e.prototype.createMarkerModelFromSeries = function (t, n, i) {
  39575. return new e(t, n, i)
  39576. }, e.type = "markArea", e.defaultOption = {
  39577. z: 1,
  39578. tooltip: {
  39579. trigger: "item"
  39580. },
  39581. animation: !1,
  39582. label: {
  39583. show: !0,
  39584. position: "top"
  39585. },
  39586. itemStyle: {
  39587. borderWidth: 0
  39588. },
  39589. emphasis: {
  39590. label: {
  39591. show: !0,
  39592. position: "top"
  39593. }
  39594. }
  39595. }, e
  39596. }(eB),
  39597. MB = Oo(),
  39598. IB = function (t, e, n, i) {
  39599. var r = i[0],
  39600. o = i[1];
  39601. if (r && o) {
  39602. var a = aB(t, r),
  39603. s = aB(t, o),
  39604. l = a.coord,
  39605. u = s.coord;
  39606. l[0] = it(l[0], -1 / 0), l[1] = it(l[1], -1 / 0), u[0] = it(u[0], 1 / 0), u[1] = it(u[1], 1 / 0);
  39607. var h = D([{}, a, s]);
  39608. return h.coord = [a.coord, s.coord], h.x0 = a.x, h.y0 = a.y, h.x1 = s.x, h.y1 = s.y, h
  39609. }
  39610. };
  39611. function TB(t) {
  39612. return !isNaN(t) && !isFinite(t)
  39613. }
  39614. function CB(t, e, n, i) {
  39615. var r = 1 - t;
  39616. return TB(e[r]) && TB(n[r])
  39617. }
  39618. function DB(t, e) {
  39619. var n = e.coord[0],
  39620. i = e.coord[1],
  39621. r = {
  39622. coord: n,
  39623. x: e.x0,
  39624. y: e.y0
  39625. },
  39626. o = {
  39627. coord: i,
  39628. x: e.x1,
  39629. y: e.y1
  39630. };
  39631. return MS(t, "cartesian2d") ? !(!n || !i || !CB(1, n, i) && !CB(0, n, i)) || function (t, e, n) {
  39632. return !(t && t.containZone && e.coord && n.coord && !iB(e) && !iB(n)) || t.containZone(e.coord, n.coord)
  39633. }(t, r, o) : lB(t, r) || lB(t, o)
  39634. }
  39635. function AB(t, e, n, i, r) {
  39636. var o, a = i.coordinateSystem,
  39637. s = t.getItemModel(e),
  39638. l = Ur(s.get(n[0]), r.getWidth()),
  39639. u = Ur(s.get(n[1]), r.getHeight());
  39640. if (isNaN(l) || isNaN(u)) {
  39641. if (i.getMarkerPosition) {
  39642. var h = t.getValues(["x0", "y0"], e),
  39643. c = t.getValues(["x1", "y1"], e),
  39644. p = a.clampData(h),
  39645. d = a.clampData(c),
  39646. f = [];
  39647. "x0" === n[0] ? f[0] = p[0] > d[0] ? c[0] : h[0] : f[0] = p[0] > d[0] ? h[0] : c[0], "y0" === n[1] ? f[1] = p[1] > d[1] ? c[1] : h[1] : f[1] = p[1] > d[1] ? h[1] : c[1], o = i.getMarkerPosition(f, n, !0)
  39648. } else {
  39649. var g = [m = t.get(n[0], e), x = t.get(n[1], e)];
  39650. a.clampData && a.clampData(g, g), o = a.dataToPoint(g, !0)
  39651. }
  39652. if (MS(a, "cartesian2d")) {
  39653. var y = a.getAxis("x"),
  39654. v = a.getAxis("y"),
  39655. m = t.get(n[0], e),
  39656. x = t.get(n[1], e);
  39657. TB(m) ? o[0] = y.toGlobalCoord(y.getExtent()["x0" === n[0] ? 0 : 1]) : TB(x) && (o[1] = v.toGlobalCoord(v.getExtent()["y0" === n[1] ? 0 : 1]))
  39658. }
  39659. isNaN(l) || (o[0] = l), isNaN(u) || (o[1] = u)
  39660. } else o = [l, u];
  39661. return o
  39662. }
  39663. var kB = [
  39664. ["x0", "y0"],
  39665. ["x1", "y0"],
  39666. ["x1", "y1"],
  39667. ["x0", "y1"]
  39668. ],
  39669. LB = function (t) {
  39670. function e() {
  39671. var n = null !== t && t.apply(this, arguments) || this;
  39672. return n.type = e.type, n
  39673. }
  39674. return n(e, t), e.prototype.updateTransform = function (t, e, n) {
  39675. e.eachSeries((function (t) {
  39676. var e = eB.getMarkerModelFromSeries(t, "markArea");
  39677. if (e) {
  39678. var i = e.getData();
  39679. i.each((function (e) {
  39680. var r = z(kB, (function (r) {
  39681. return AB(i, e, r, t, n)
  39682. }));
  39683. i.setItemLayout(e, r), i.getItemGraphicEl(e).setShape("points", r)
  39684. }))
  39685. }
  39686. }), this)
  39687. }, e.prototype.renderSeries = function (t, e, n, i) {
  39688. var r = t.coordinateSystem,
  39689. o = t.id,
  39690. a = t.getData(),
  39691. s = this.markerGroupMap,
  39692. l = s.get(o) || s.set(o, {
  39693. group: new zr
  39694. });
  39695. this.group.add(l.group), this.markKeep(l);
  39696. var u = function (t, e, n) {
  39697. var i, r, o = ["x0", "y0", "x1", "y1"];
  39698. if (t) {
  39699. var a = z(t && t.dimensions, (function (t) {
  39700. var n = e.getData();
  39701. return A(A({}, n.getDimensionInfo(n.mapDimension(t)) || {}), {
  39702. name: t,
  39703. ordinalMeta: null
  39704. })
  39705. }));
  39706. r = z(o, (function (t, e) {
  39707. return {
  39708. name: t,
  39709. type: a[e % 2].type
  39710. }
  39711. })), i = new lx(r, n)
  39712. } else i = new lx(r = [{
  39713. name: "value",
  39714. type: "float"
  39715. }], n);
  39716. var s = z(n.get("data"), H(IB, e, t, n));
  39717. t && (s = B(s, H(DB, t)));
  39718. var l = t ? function (t, e, n, i) {
  39719. return wf(t.coord[Math.floor(i / 2)][i % 2], r[i])
  39720. } : function (t, e, n, i) {
  39721. return wf(t.value, r[i])
  39722. };
  39723. return i.initData(s, null, l), i.hasItemOption = !0, i
  39724. }(r, t, e);
  39725. e.setData(u), u.each((function (e) {
  39726. var n = z(kB, (function (n) {
  39727. return AB(u, e, n, t, i)
  39728. })),
  39729. o = r.getAxis("x").scale,
  39730. s = r.getAxis("y").scale,
  39731. l = o.getExtent(),
  39732. h = s.getExtent(),
  39733. c = [o.parse(u.get("x0", e)), o.parse(u.get("x1", e))],
  39734. p = [s.parse(u.get("y0", e)), s.parse(u.get("y1", e))];
  39735. jr(c), jr(p);
  39736. var d = !!(l[0] > c[1] || l[1] < c[0] || h[0] > p[1] || h[1] < p[0]);
  39737. u.setItemLayout(e, {
  39738. points: n,
  39739. allClipped: d
  39740. });
  39741. var f = u.getItemModel(e).getModel("itemStyle").getItemStyle(),
  39742. g = Ty(a, "color");
  39743. f.fill || (f.fill = g, U(f.fill) && (f.fill = ii(f.fill, .4))), f.stroke || (f.stroke = g), u.setItemVisual(e, "style", f)
  39744. })), u.diff(MB(l).data).add((function (t) {
  39745. var e = u.getItemLayout(t);
  39746. if (!e.allClipped) {
  39747. var n = new Wu({
  39748. shape: {
  39749. points: e.points
  39750. }
  39751. });
  39752. u.setItemGraphicEl(t, n), l.group.add(n)
  39753. }
  39754. })).update((function (t, n) {
  39755. var i = MB(l).data.getItemGraphicEl(n),
  39756. r = u.getItemLayout(t);
  39757. r.allClipped ? i && l.group.remove(i) : (i ? fh(i, {
  39758. shape: {
  39759. points: r.points
  39760. }
  39761. }, e, t) : i = new Wu({
  39762. shape: {
  39763. points: r.points
  39764. }
  39765. }), u.setItemGraphicEl(t, i), l.group.add(i))
  39766. })).remove((function (t) {
  39767. var e = MB(l).data.getItemGraphicEl(t);
  39768. l.group.remove(e)
  39769. })).execute(), u.eachItemGraphicEl((function (t, n) {
  39770. var i = u.getItemModel(n),
  39771. r = u.getItemVisual(n, "style");
  39772. t.useStyle(u.getItemVisual(n, "style")), tc(t, ec(i), {
  39773. labelFetcher: e,
  39774. labelDataIndex: n,
  39775. defaultText: u.getName(n) || "",
  39776. inheritColor: U(r.fill) ? ii(r.fill, 1) : "#000"
  39777. }), jl(t, i), Yl(t, null, null, i.get(["emphasis", "disabled"])), Qs(t).dataModel = e
  39778. })), MB(l).data = u, l.group.silent = e.get("silent") || t.get("silent")
  39779. }, e.type = "markArea", e
  39780. }(pB);
  39781. var PB = function (t) {
  39782. function e() {
  39783. var n = null !== t && t.apply(this, arguments) || this;
  39784. return n.type = e.type, n.layoutMode = {
  39785. type: "box",
  39786. ignoreSize: !0
  39787. }, n
  39788. }
  39789. return n(e, t), e.prototype.init = function (t, e, n) {
  39790. this.mergeDefaultAndTheme(t, n), t.selected = t.selected || {}, this._updateSelector(t)
  39791. }, e.prototype.mergeOption = function (e, n) {
  39792. t.prototype.mergeOption.call(this, e, n), this._updateSelector(e)
  39793. }, e.prototype._updateSelector = function (t) {
  39794. var e = t.selector,
  39795. n = this.ecModel;
  39796. !0 === e && (e = t.selector = ["all", "inverse"]), Y(e) && E(e, (function (t, i) {
  39797. U(t) && (t = {
  39798. type: t
  39799. }), e[i] = C(t, function (t, e) {
  39800. return "all" === e ? {
  39801. type: "all",
  39802. title: t.getLocaleModel().get(["legend", "selector", "all"])
  39803. } : "inverse" === e ? {
  39804. type: "inverse",
  39805. title: t.getLocaleModel().get(["legend", "selector", "inverse"])
  39806. } : void 0
  39807. }(n, t.type))
  39808. }))
  39809. }, e.prototype.optionUpdated = function () {
  39810. this._updateData(this.ecModel);
  39811. var t = this._data;
  39812. if (t[0] && "single" === this.get("selectedMode")) {
  39813. for (var e = !1, n = 0; n < t.length; n++) {
  39814. var i = t[n].get("name");
  39815. if (this.isSelected(i)) {
  39816. this.select(i), e = !0;
  39817. break
  39818. }
  39819. }!e && this.select(t[0].get("name"))
  39820. }
  39821. }, e.prototype._updateData = function (t) {
  39822. var e = [],
  39823. n = [];
  39824. t.eachRawSeries((function (i) {
  39825. var r, o = i.name;
  39826. if (n.push(o), i.legendVisualProvider) {
  39827. var a = i.legendVisualProvider.getAllNames();
  39828. t.isSeriesFiltered(i) || (n = n.concat(a)), a.length ? e = e.concat(a) : r = !0
  39829. } else r = !0;
  39830. r && ko(i) && e.push(i.name)
  39831. })), this._availableNames = n;
  39832. var i = this.get("data") || e,
  39833. r = yt(),
  39834. o = z(i, (function (t) {
  39835. return (U(t) || j(t)) && (t = {
  39836. name: t
  39837. }), r.get(t.name) ? null : (r.set(t.name, !0), new Mc(t, this, this.ecModel))
  39838. }), this);
  39839. this._data = B(o, (function (t) {
  39840. return !!t
  39841. }))
  39842. }, e.prototype.getData = function () {
  39843. return this._data
  39844. }, e.prototype.select = function (t) {
  39845. var e = this.option.selected;
  39846. "single" === this.get("selectedMode") && E(this._data, (function (t) {
  39847. e[t.get("name")] = !1
  39848. }));
  39849. e[t] = !0
  39850. }, e.prototype.unSelect = function (t) {
  39851. "single" !== this.get("selectedMode") && (this.option.selected[t] = !1)
  39852. }, e.prototype.toggleSelected = function (t) {
  39853. var e = this.option.selected;
  39854. e.hasOwnProperty(t) || (e[t] = !0), this[e[t] ? "unSelect" : "select"](t)
  39855. }, e.prototype.allSelect = function () {
  39856. var t = this._data,
  39857. e = this.option.selected;
  39858. E(t, (function (t) {
  39859. e[t.get("name", !0)] = !0
  39860. }))
  39861. }, e.prototype.inverseSelect = function () {
  39862. var t = this._data,
  39863. e = this.option.selected;
  39864. E(t, (function (t) {
  39865. var n = t.get("name", !0);
  39866. e.hasOwnProperty(n) || (e[n] = !0), e[n] = !e[n]
  39867. }))
  39868. }, e.prototype.isSelected = function (t) {
  39869. var e = this.option.selected;
  39870. return !(e.hasOwnProperty(t) && !e[t]) && P(this._availableNames, t) >= 0
  39871. }, e.prototype.getOrient = function () {
  39872. return "vertical" === this.get("orient") ? {
  39873. index: 1,
  39874. name: "vertical"
  39875. } : {
  39876. index: 0,
  39877. name: "horizontal"
  39878. }
  39879. }, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = {
  39880. z: 4,
  39881. show: !0,
  39882. orient: "horizontal",
  39883. left: "center",
  39884. top: 0,
  39885. align: "auto",
  39886. backgroundColor: "rgba(0,0,0,0)",
  39887. borderColor: "#ccc",
  39888. borderRadius: 0,
  39889. borderWidth: 0,
  39890. padding: 5,
  39891. itemGap: 10,
  39892. itemWidth: 25,
  39893. itemHeight: 14,
  39894. symbolRotate: "inherit",
  39895. symbolKeepAspect: !0,
  39896. inactiveColor: "#ccc",
  39897. inactiveBorderColor: "#ccc",
  39898. inactiveBorderWidth: "auto",
  39899. itemStyle: {
  39900. color: "inherit",
  39901. opacity: "inherit",
  39902. borderColor: "inherit",
  39903. borderWidth: "auto",
  39904. borderCap: "inherit",
  39905. borderJoin: "inherit",
  39906. borderDashOffset: "inherit",
  39907. borderMiterLimit: "inherit"
  39908. },
  39909. lineStyle: {
  39910. width: "auto",
  39911. color: "inherit",
  39912. inactiveColor: "#ccc",
  39913. inactiveWidth: 2,
  39914. opacity: "inherit",
  39915. type: "inherit",
  39916. cap: "inherit",
  39917. join: "inherit",
  39918. dashOffset: "inherit",
  39919. miterLimit: "inherit"
  39920. },
  39921. textStyle: {
  39922. color: "#333"
  39923. },
  39924. selectedMode: !0,
  39925. selector: !1,
  39926. selectorLabel: {
  39927. show: !0,
  39928. borderRadius: 10,
  39929. padding: [3, 5, 3, 5],
  39930. fontSize: 12,
  39931. fontFamily: "sans-serif",
  39932. color: "#666",
  39933. borderWidth: 1,
  39934. borderColor: "#666"
  39935. },
  39936. emphasis: {
  39937. selectorLabel: {
  39938. show: !0,
  39939. color: "#eee",
  39940. backgroundColor: "#666"
  39941. }
  39942. },
  39943. selectorPosition: "auto",
  39944. selectorItemGap: 7,
  39945. selectorButtonGap: 10,
  39946. tooltip: {
  39947. show: !1
  39948. }
  39949. }, e
  39950. }(Rp),
  39951. OB = H,
  39952. RB = E,
  39953. NB = zr,
  39954. EB = function (t) {
  39955. function e() {
  39956. var n = null !== t && t.apply(this, arguments) || this;
  39957. return n.type = e.type, n.newlineDisabled = !1, n
  39958. }
  39959. return n(e, t), e.prototype.init = function () {
  39960. this.group.add(this._contentGroup = new NB), this.group.add(this._selectorGroup = new NB), this._isFirstRender = !0
  39961. }, e.prototype.getContentGroup = function () {
  39962. return this._contentGroup
  39963. }, e.prototype.getSelectorGroup = function () {
  39964. return this._selectorGroup
  39965. }, e.prototype.render = function (t, e, n) {
  39966. var i = this._isFirstRender;
  39967. if (this._isFirstRender = !1, this.resetInner(), t.get("show", !0)) {
  39968. var r = t.get("align"),
  39969. o = t.get("orient");
  39970. r && "auto" !== r || (r = "right" === t.get("left") && "vertical" === o ? "right" : "left");
  39971. var a = t.get("selector", !0),
  39972. s = t.get("selectorPosition", !0);
  39973. !a || s && "auto" !== s || (s = "horizontal" === o ? "end" : "start"), this.renderInner(r, t, e, n, a, o, s);
  39974. var l = t.getBoxLayoutParams(),
  39975. u = {
  39976. width: n.getWidth(),
  39977. height: n.getHeight()
  39978. },
  39979. h = t.get("padding"),
  39980. c = Cp(l, u, h),
  39981. p = this.layoutInner(t, r, c, i, a, s),
  39982. d = Cp(k({
  39983. width: p.width,
  39984. height: p.height
  39985. }, l), u, h);
  39986. this.group.x = d.x - p.x, this.group.y = d.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = cz(p, t))
  39987. }
  39988. }, e.prototype.resetInner = function () {
  39989. this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll()
  39990. }, e.prototype.renderInner = function (t, e, n, i, r, o, a) {
  39991. var s = this.getContentGroup(),
  39992. l = yt(),
  39993. u = e.get("selectedMode"),
  39994. h = [];
  39995. n.eachRawSeries((function (t) {
  39996. !t.get("legendHoverLink") && h.push(t.id)
  39997. })), RB(e.getData(), (function (r, o) {
  39998. var a = r.get("name");
  39999. if (!this.newlineDisabled && ("" === a || "\n" === a)) {
  40000. var c = new NB;
  40001. return c.newline = !0, void s.add(c)
  40002. }
  40003. var p = n.getSeriesByName(a)[0];
  40004. if (!l.get(a)) {
  40005. if (p) {
  40006. var d = p.getData(),
  40007. f = d.getVisual("legendLineStyle") || {},
  40008. g = d.getVisual("legendIcon"),
  40009. y = d.getVisual("style");
  40010. this._createItem(p, a, o, r, e, t, f, y, g, u, i).on("click", OB(zB, a, null, i, h)).on("mouseover", OB(BB, p.name, null, i, h)).on("mouseout", OB(FB, p.name, null, i, h)), l.set(a, !0)
  40011. } else n.eachRawSeries((function (n) {
  40012. if (!l.get(a) && n.legendVisualProvider) {
  40013. var s = n.legendVisualProvider;
  40014. if (!s.containName(a)) return;
  40015. var c = s.indexOfName(a),
  40016. p = s.getItemVisual(c, "style"),
  40017. d = s.getItemVisual(c, "legendIcon"),
  40018. f = qn(p.fill);
  40019. f && 0 === f[3] && (f[3] = .2, p = A(A({}, p), {
  40020. fill: ri(f, "rgba")
  40021. })), this._createItem(n, a, o, r, e, t, {}, p, d, u, i).on("click", OB(zB, null, a, i, h)).on("mouseover", OB(BB, null, a, i, h)).on("mouseout", OB(FB, null, a, i, h)), l.set(a, !0)
  40022. }
  40023. }), this);
  40024. 0
  40025. }
  40026. }), this), r && this._createSelector(r, e, i, o, a)
  40027. }, e.prototype._createSelector = function (t, e, n, i, r) {
  40028. var o = this.getSelectorGroup();
  40029. RB(t, (function (t) {
  40030. var i = t.type,
  40031. r = new Fs({
  40032. style: {
  40033. x: 0,
  40034. y: 0,
  40035. align: "center",
  40036. verticalAlign: "middle"
  40037. },
  40038. onclick: function () {
  40039. n.dispatchAction({
  40040. type: "all" === i ? "legendAllSelect" : "legendInverseSelect"
  40041. })
  40042. }
  40043. });
  40044. o.add(r), tc(r, {
  40045. normal: e.getModel("selectorLabel"),
  40046. emphasis: e.getModel(["emphasis", "selectorLabel"])
  40047. }, {
  40048. defaultText: t.title
  40049. }), Hl(r)
  40050. }))
  40051. }, e.prototype._createItem = function (t, e, n, i, r, o, a, s, l, u, h) {
  40052. var c = t.visualDrawType,
  40053. p = r.get("itemWidth"),
  40054. d = r.get("itemHeight"),
  40055. f = r.isSelected(e),
  40056. g = i.get("symbolRotate"),
  40057. y = i.get("symbolKeepAspect"),
  40058. v = i.get("icon"),
  40059. m = function (t, e, n, i, r, o, a) {
  40060. function s(t, e) {
  40061. "auto" === t.lineWidth && (t.lineWidth = e.lineWidth > 0 ? 2 : 0), RB(t, (function (n, i) {
  40062. "inherit" === t[i] && (t[i] = e[i])
  40063. }))
  40064. }
  40065. var l = e.getModel("itemStyle"),
  40066. u = l.getItemStyle(),
  40067. h = 0 === t.lastIndexOf("empty", 0) ? "fill" : "stroke",
  40068. c = l.getShallow("decal");
  40069. u.decal = c && "inherit" !== c ? gv(c, a) : i.decal, "inherit" === u.fill && (u.fill = i[r]);
  40070. "inherit" === u.stroke && (u.stroke = i[h]);
  40071. "inherit" === u.opacity && (u.opacity = ("fill" === r ? i : n).opacity);
  40072. s(u, i);
  40073. var p = e.getModel("lineStyle"),
  40074. d = p.getLineStyle();
  40075. if (s(d, n), "auto" === u.fill && (u.fill = i.fill), "auto" === u.stroke && (u.stroke = i.fill), "auto" === d.stroke && (d.stroke = i.fill), !o) {
  40076. var f = e.get("inactiveBorderWidth"),
  40077. g = u[h];
  40078. u.lineWidth = "auto" === f ? i.lineWidth > 0 && g ? 2 : 0 : u.lineWidth, u.fill = e.get("inactiveColor"), u.stroke = e.get("inactiveBorderColor"), d.stroke = p.get("inactiveColor"), d.lineWidth = p.get("inactiveWidth")
  40079. }
  40080. return {
  40081. itemStyle: u,
  40082. lineStyle: d
  40083. }
  40084. }(l = v || l || "roundRect", i, a, s, c, f, h),
  40085. x = new NB,
  40086. _ = i.getModel("textStyle");
  40087. if (!X(t.getLegendIcon) || v && "inherit" !== v) {
  40088. var b = "inherit" === v && t.getData().getVisual("symbol") ? "inherit" === g ? t.getData().getVisual("symbolRotate") : g : 0;
  40089. x.add(function (t) {
  40090. var e = t.icon || "roundRect",
  40091. n = Wy(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill, t.symbolKeepAspect);
  40092. n.setStyle(t.itemStyle), n.rotation = (t.iconRotate || 0) * Math.PI / 180, n.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), e.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = "#fff", n.style.lineWidth = 2);
  40093. return n
  40094. }({
  40095. itemWidth: p,
  40096. itemHeight: d,
  40097. icon: l,
  40098. iconRotate: b,
  40099. itemStyle: m.itemStyle,
  40100. lineStyle: m.lineStyle,
  40101. symbolKeepAspect: y
  40102. }))
  40103. } else x.add(t.getLegendIcon({
  40104. itemWidth: p,
  40105. itemHeight: d,
  40106. icon: l,
  40107. iconRotate: g,
  40108. itemStyle: m.itemStyle,
  40109. lineStyle: m.lineStyle,
  40110. symbolKeepAspect: y
  40111. }));
  40112. var w = "left" === o ? p + 5 : -5,
  40113. S = o,
  40114. M = r.get("formatter"),
  40115. I = e;
  40116. U(M) && M ? I = M.replace("{name}", null != e ? e : "") : X(M) && (I = M(e));
  40117. var T = i.get("inactiveColor");
  40118. x.add(new Fs({
  40119. style: nc(_, {
  40120. text: I,
  40121. x: w,
  40122. y: d / 2,
  40123. fill: f ? _.getTextColor() : T,
  40124. align: S,
  40125. verticalAlign: "middle"
  40126. })
  40127. }));
  40128. var C = new zs({
  40129. shape: x.getBoundingRect(),
  40130. invisible: !0
  40131. }),
  40132. D = i.getModel("tooltip");
  40133. return D.get("show") && Zh({
  40134. el: C,
  40135. componentModel: r,
  40136. itemName: e,
  40137. itemTooltipOption: D.option
  40138. }), x.add(C), x.eachChild((function (t) {
  40139. t.silent = !0
  40140. })), C.silent = !u, this.getContentGroup().add(x), Hl(x), x.__legendDataIndex = n, x
  40141. }, e.prototype.layoutInner = function (t, e, n, i, r, o) {
  40142. var a = this.getContentGroup(),
  40143. s = this.getSelectorGroup();
  40144. Tp(t.get("orient"), a, t.get("itemGap"), n.width, n.height);
  40145. var l = a.getBoundingRect(),
  40146. u = [-l.x, -l.y];
  40147. if (s.markRedraw(), a.markRedraw(), r) {
  40148. Tp("horizontal", s, t.get("selectorItemGap", !0));
  40149. var h = s.getBoundingRect(),
  40150. c = [-h.x, -h.y],
  40151. p = t.get("selectorButtonGap", !0),
  40152. d = t.getOrient().index,
  40153. f = 0 === d ? "width" : "height",
  40154. g = 0 === d ? "height" : "width",
  40155. y = 0 === d ? "y" : "x";
  40156. "end" === o ? c[d] += l[f] + p : u[d] += h[f] + p, c[1 - d] += l[g] / 2 - h[g] / 2, s.x = c[0], s.y = c[1], a.x = u[0], a.y = u[1];
  40157. var v = {
  40158. x: 0,
  40159. y: 0
  40160. };
  40161. return v[f] = l[f] + p + h[f], v[g] = Math.max(l[g], h[g]), v[y] = Math.min(0, h[y] + c[1 - d]), v
  40162. }
  40163. return a.x = u[0], a.y = u[1], this.group.getBoundingRect()
  40164. }, e.prototype.remove = function () {
  40165. this.getContentGroup().removeAll(), this._isFirstRender = !0
  40166. }, e.type = "legend.plain", e
  40167. }(Tg);
  40168. function zB(t, e, n, i) {
  40169. FB(t, e, n, i), n.dispatchAction({
  40170. type: "legendToggleSelect",
  40171. name: null != t ? t : e
  40172. }), BB(t, e, n, i)
  40173. }
  40174. function VB(t) {
  40175. for (var e, n = t.getZr().storage.getDisplayList(), i = 0, r = n.length; i < r && !(e = n[i].states.emphasis);) i++;
  40176. return e && e.hoverLayer
  40177. }
  40178. function BB(t, e, n, i) {
  40179. VB(n) || n.dispatchAction({
  40180. type: "highlight",
  40181. seriesName: t,
  40182. name: e,
  40183. excludeSeriesId: i
  40184. })
  40185. }
  40186. function FB(t, e, n, i) {
  40187. VB(n) || n.dispatchAction({
  40188. type: "downplay",
  40189. seriesName: t,
  40190. name: e,
  40191. excludeSeriesId: i
  40192. })
  40193. }
  40194. function GB(t) {
  40195. var e = t.findComponents({
  40196. mainType: "legend"
  40197. });
  40198. e && e.length && t.filterSeries((function (t) {
  40199. for (var n = 0; n < e.length; n++)
  40200. if (!e[n].isSelected(t.name)) return !1;
  40201. return !0
  40202. }))
  40203. }
  40204. function WB(t, e, n) {
  40205. var i, r = {},
  40206. o = "toggleSelected" === t;
  40207. return n.eachComponent("legend", (function (n) {
  40208. o && null != i ? n[i ? "select" : "unSelect"](e.name) : "allSelect" === t || "inverseSelect" === t ? n[t]() : (n[t](e.name), i = n.isSelected(e.name)), E(n.getData(), (function (t) {
  40209. var e = t.get("name");
  40210. if ("\n" !== e && "" !== e) {
  40211. var i = n.isSelected(e);
  40212. r.hasOwnProperty(e) ? r[e] = r[e] && i : r[e] = i
  40213. }
  40214. }))
  40215. })), "allSelect" === t || "inverseSelect" === t ? {
  40216. selected: r
  40217. } : {
  40218. name: e.name,
  40219. selected: r
  40220. }
  40221. }
  40222. function HB(t) {
  40223. t.registerComponentModel(PB), t.registerComponentView(EB), t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER, GB), t.registerSubTypeDefaulter("legend", (function () {
  40224. return "plain"
  40225. })),
  40226. function (t) {
  40227. t.registerAction("legendToggleSelect", "legendselectchanged", H(WB, "toggleSelected")), t.registerAction("legendAllSelect", "legendselectall", H(WB, "allSelect")), t.registerAction("legendInverseSelect", "legendinverseselect", H(WB, "inverseSelect")), t.registerAction("legendSelect", "legendselected", H(WB, "select")), t.registerAction("legendUnSelect", "legendunselected", H(WB, "unSelect"))
  40228. }(t)
  40229. }
  40230. var YB = function (t) {
  40231. function e() {
  40232. var n = null !== t && t.apply(this, arguments) || this;
  40233. return n.type = e.type, n
  40234. }
  40235. return n(e, t), e.prototype.setScrollDataIndex = function (t) {
  40236. this.option.scrollDataIndex = t
  40237. }, e.prototype.init = function (e, n, i) {
  40238. var r = Lp(e);
  40239. t.prototype.init.call(this, e, n, i), XB(this, e, r)
  40240. }, e.prototype.mergeOption = function (e, n) {
  40241. t.prototype.mergeOption.call(this, e, n), XB(this, this.option, e)
  40242. }, e.type = "legend.scroll", e.defaultOption = Cc(PB.defaultOption, {
  40243. scrollDataIndex: 0,
  40244. pageButtonItemGap: 5,
  40245. pageButtonGap: null,
  40246. pageButtonPosition: "end",
  40247. pageFormatter: "{current}/{total}",
  40248. pageIcons: {
  40249. horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
  40250. vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
  40251. },
  40252. pageIconColor: "#2f4554",
  40253. pageIconInactiveColor: "#aaa",
  40254. pageIconSize: 15,
  40255. pageTextStyle: {
  40256. color: "#333"
  40257. },
  40258. animationDurationUpdate: 800
  40259. }), e
  40260. }(PB);
  40261. function XB(t, e, n) {
  40262. var i = [1, 1];
  40263. i[t.getOrient().index] = 0, kp(e, n, {
  40264. type: "box",
  40265. ignoreSize: !!i
  40266. })
  40267. }
  40268. var UB = zr,
  40269. ZB = ["width", "height"],
  40270. jB = ["x", "y"],
  40271. qB = function (t) {
  40272. function e() {
  40273. var n = null !== t && t.apply(this, arguments) || this;
  40274. return n.type = e.type, n.newlineDisabled = !0, n._currentIndex = 0, n
  40275. }
  40276. return n(e, t), e.prototype.init = function () {
  40277. t.prototype.init.call(this), this.group.add(this._containerGroup = new UB), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new UB)
  40278. }, e.prototype.resetInner = function () {
  40279. t.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null
  40280. }, e.prototype.renderInner = function (e, n, i, r, o, a, s) {
  40281. var l = this;
  40282. t.prototype.renderInner.call(this, e, n, i, r, o, a, s);
  40283. var u = this._controllerGroup,
  40284. h = n.get("pageIconSize", !0),
  40285. c = Y(h) ? h : [h, h];
  40286. d("pagePrev", 0);
  40287. var p = n.getModel("pageTextStyle");
  40288. function d(t, e) {
  40289. var i = t + "DataIndex",
  40290. o = Hh(n.get("pageIcons", !0)[n.getOrient().name][e], {
  40291. onclick: W(l._pageGo, l, i, n, r)
  40292. }, {
  40293. x: -c[0] / 2,
  40294. y: -c[1] / 2,
  40295. width: c[0],
  40296. height: c[1]
  40297. });
  40298. o.name = t, u.add(o)
  40299. }
  40300. u.add(new Fs({
  40301. name: "pageText",
  40302. style: {
  40303. text: "xx/xx",
  40304. fill: p.getTextColor(),
  40305. font: p.getFont(),
  40306. verticalAlign: "middle",
  40307. align: "center"
  40308. },
  40309. silent: !0
  40310. })), d("pageNext", 1)
  40311. }, e.prototype.layoutInner = function (t, e, n, i, r, o) {
  40312. var a = this.getSelectorGroup(),
  40313. s = t.getOrient().index,
  40314. l = ZB[s],
  40315. u = jB[s],
  40316. h = ZB[1 - s],
  40317. c = jB[1 - s];
  40318. r && Tp("horizontal", a, t.get("selectorItemGap", !0));
  40319. var p = t.get("selectorButtonGap", !0),
  40320. d = a.getBoundingRect(),
  40321. f = [-d.x, -d.y],
  40322. g = T(n);
  40323. r && (g[l] = n[l] - d[l] - p);
  40324. var y = this._layoutContentAndController(t, i, g, s, l, h, c, u);
  40325. if (r) {
  40326. if ("end" === o) f[s] += y[l] + p;
  40327. else {
  40328. var v = d[l] + p;
  40329. f[s] -= v, y[u] -= v
  40330. }
  40331. y[l] += d[l] + p, f[1 - s] += y[c] + y[h] / 2 - d[h] / 2, y[h] = Math.max(y[h], d[h]), y[c] = Math.min(y[c], d[c] + f[1 - s]), a.x = f[0], a.y = f[1], a.markRedraw()
  40332. }
  40333. return y
  40334. }, e.prototype._layoutContentAndController = function (t, e, n, i, r, o, a, s) {
  40335. var l = this.getContentGroup(),
  40336. u = this._containerGroup,
  40337. h = this._controllerGroup;
  40338. Tp(t.get("orient"), l, t.get("itemGap"), i ? n.width : null, i ? null : n.height), Tp("horizontal", h, t.get("pageButtonItemGap", !0));
  40339. var c = l.getBoundingRect(),
  40340. p = h.getBoundingRect(),
  40341. d = this._showController = c[r] > n[r],
  40342. f = [-c.x, -c.y];
  40343. e || (f[i] = l[s]);
  40344. var g = [0, 0],
  40345. y = [-p.x, -p.y],
  40346. v = rt(t.get("pageButtonGap", !0), t.get("itemGap", !0));
  40347. d && ("end" === t.get("pageButtonPosition", !0) ? y[i] += n[r] - p[r] : g[i] += p[r] + v);
  40348. y[1 - i] += c[o] / 2 - p[o] / 2, l.setPosition(f), u.setPosition(g), h.setPosition(y);
  40349. var m = {
  40350. x: 0,
  40351. y: 0
  40352. };
  40353. if (m[r] = d ? n[r] : c[r], m[o] = Math.max(c[o], p[o]), m[a] = Math.min(0, p[a] + y[1 - i]), u.__rectSize = n[r], d) {
  40354. var x = {
  40355. x: 0,
  40356. y: 0
  40357. };
  40358. x[r] = Math.max(n[r] - p[r] - v, 0), x[o] = m[o], u.setClipPath(new zs({
  40359. shape: x
  40360. })), u.__rectSize = x[r]
  40361. } else h.eachChild((function (t) {
  40362. t.attr({
  40363. invisible: !0,
  40364. silent: !0
  40365. })
  40366. }));
  40367. var _ = this._getPageInfo(t);
  40368. return null != _.pageIndex && fh(l, {
  40369. x: _.contentPosition[0],
  40370. y: _.contentPosition[1]
  40371. }, d ? t : null), this._updatePageInfoView(t, _), m
  40372. }, e.prototype._pageGo = function (t, e, n) {
  40373. var i = this._getPageInfo(e)[t];
  40374. null != i && n.dispatchAction({
  40375. type: "legendScroll",
  40376. scrollDataIndex: i,
  40377. legendId: e.id
  40378. })
  40379. }, e.prototype._updatePageInfoView = function (t, e) {
  40380. var n = this._controllerGroup;
  40381. E(["pagePrev", "pageNext"], (function (i) {
  40382. var r = null != e[i + "DataIndex"],
  40383. o = n.childOfName(i);
  40384. o && (o.setStyle("fill", r ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), o.cursor = r ? "pointer" : "default")
  40385. }));
  40386. var i = n.childOfName("pageText"),
  40387. r = t.get("pageFormatter"),
  40388. o = e.pageIndex,
  40389. a = null != o ? o + 1 : 0,
  40390. s = e.pageCount;
  40391. i && r && i.setStyle("text", U(r) ? r.replace("{current}", null == a ? "" : a + "").replace("{total}", null == s ? "" : s + "") : r({
  40392. current: a,
  40393. total: s
  40394. }))
  40395. }, e.prototype._getPageInfo = function (t) {
  40396. var e = t.get("scrollDataIndex", !0),
  40397. n = this.getContentGroup(),
  40398. i = this._containerGroup.__rectSize,
  40399. r = t.getOrient().index,
  40400. o = ZB[r],
  40401. a = jB[r],
  40402. s = this._findTargetItemIndex(e),
  40403. l = n.children(),
  40404. u = l[s],
  40405. h = l.length,
  40406. c = h ? 1 : 0,
  40407. p = {
  40408. contentPosition: [n.x, n.y],
  40409. pageCount: c,
  40410. pageIndex: c - 1,
  40411. pagePrevDataIndex: null,
  40412. pageNextDataIndex: null
  40413. };
  40414. if (!u) return p;
  40415. var d = m(u);
  40416. p.contentPosition[r] = -d.s;
  40417. for (var f = s + 1, g = d, y = d, v = null; f <= h; ++f)(!(v = m(l[f])) && y.e > g.s + i || v && !x(v, g.s)) && (g = y.i > g.i ? y : v) && (null == p.pageNextDataIndex && (p.pageNextDataIndex = g.i), ++p.pageCount), y = v;
  40418. for (f = s - 1, g = d, y = d, v = null; f >= -1; --f)(v = m(l[f])) && x(y, v.s) || !(g.i < y.i) || (y = g, null == p.pagePrevDataIndex && (p.pagePrevDataIndex = g.i), ++p.pageCount, ++p.pageIndex), g = v;
  40419. return p;
  40420. function m(t) {
  40421. if (t) {
  40422. var e = t.getBoundingRect(),
  40423. n = e[a] + t[a];
  40424. return {
  40425. s: n,
  40426. e: n + e[o],
  40427. i: t.__legendDataIndex
  40428. }
  40429. }
  40430. }
  40431. function x(t, e) {
  40432. return t.e >= e && t.s <= e + i
  40433. }
  40434. }, e.prototype._findTargetItemIndex = function (t) {
  40435. return this._showController ? (this.getContentGroup().eachChild((function (i, r) {
  40436. var o = i.__legendDataIndex;
  40437. null == n && null != o && (n = r), o === t && (e = r)
  40438. })), null != e ? e : n) : 0;
  40439. var e, n
  40440. }, e.type = "legend.scroll", e
  40441. }(EB);
  40442. function KB(t) {
  40443. Nm(HB), t.registerComponentModel(YB), t.registerComponentView(qB),
  40444. function (t) {
  40445. t.registerAction("legendScroll", "legendscroll", (function (t, e) {
  40446. var n = t.scrollDataIndex;
  40447. null != n && e.eachComponent({
  40448. mainType: "legend",
  40449. subType: "scroll",
  40450. query: t
  40451. }, (function (t) {
  40452. t.setScrollDataIndex(n)
  40453. }))
  40454. }))
  40455. }(t)
  40456. }
  40457. var $B = function (t) {
  40458. function e() {
  40459. var n = null !== t && t.apply(this, arguments) || this;
  40460. return n.type = e.type, n
  40461. }
  40462. return n(e, t), e.type = "dataZoom.inside", e.defaultOption = Cc(jE.defaultOption, {
  40463. disabled: !1,
  40464. zoomLock: !1,
  40465. zoomOnMouseWheel: !0,
  40466. moveOnMouseMove: !0,
  40467. moveOnMouseWheel: !1,
  40468. preventDefaultMouseMove: !0
  40469. }), e
  40470. }(jE),
  40471. JB = Oo();
  40472. function QB(t, e, n) {
  40473. JB(t).coordSysRecordMap.each((function (t) {
  40474. var i = t.dataZoomInfoMap.get(e.uid);
  40475. i && (i.getRange = n)
  40476. }))
  40477. }
  40478. function tF(t, e) {
  40479. if (e) {
  40480. t.removeKey(e.model.uid);
  40481. var n = e.controller;
  40482. n && n.dispose()
  40483. }
  40484. }
  40485. function eF(t, e) {
  40486. t.isDisposed() || t.dispatchAction({
  40487. type: "dataZoom",
  40488. animation: {
  40489. easing: "cubicOut",
  40490. duration: 100
  40491. },
  40492. batch: e
  40493. })
  40494. }
  40495. function nF(t, e, n, i) {
  40496. return t.coordinateSystem.containPoint([n, i])
  40497. }
  40498. function iF(t) {
  40499. t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, (function (t, e) {
  40500. var n = JB(e),
  40501. i = n.coordSysRecordMap || (n.coordSysRecordMap = yt());
  40502. i.each((function (t) {
  40503. t.dataZoomInfoMap = null
  40504. })), t.eachComponent({
  40505. mainType: "dataZoom",
  40506. subType: "inside"
  40507. }, (function (t) {
  40508. E(UE(t).infoList, (function (n) {
  40509. var r = n.model.uid,
  40510. o = i.get(r) || i.set(r, function (t, e) {
  40511. var n = {
  40512. model: e,
  40513. containsPoint: H(nF, e),
  40514. dispatchAction: H(eF, t),
  40515. dataZoomInfoMap: null,
  40516. controller: null
  40517. },
  40518. i = n.controller = new UI(t.getZr());
  40519. return E(["pan", "zoom", "scrollMove"], (function (t) {
  40520. i.on(t, (function (e) {
  40521. var i = [];
  40522. n.dataZoomInfoMap.each((function (r) {
  40523. if (e.isAvailableBehavior(r.model.option)) {
  40524. var o = (r.getRange || {})[t],
  40525. a = o && o(r.dzReferCoordSysInfo, n.model.mainType, n.controller, e);
  40526. !r.model.get("disabled", !0) && a && i.push({
  40527. dataZoomId: r.model.id,
  40528. start: a[0],
  40529. end: a[1]
  40530. })
  40531. }
  40532. })), i.length && n.dispatchAction(i)
  40533. }))
  40534. })), n
  40535. }(e, n.model));
  40536. (o.dataZoomInfoMap || (o.dataZoomInfoMap = yt())).set(t.uid, {
  40537. dzReferCoordSysInfo: n,
  40538. model: t,
  40539. getRange: null
  40540. })
  40541. }))
  40542. })), i.each((function (t) {
  40543. var e, n = t.controller,
  40544. r = t.dataZoomInfoMap;
  40545. if (r) {
  40546. var o = r.keys()[0];
  40547. null != o && (e = r.get(o))
  40548. }
  40549. if (e) {
  40550. var a = function (t) {
  40551. var e, n = "type_",
  40552. i = {
  40553. type_true: 2,
  40554. type_move: 1,
  40555. type_false: 0,
  40556. type_undefined: -1
  40557. },
  40558. r = !0;
  40559. return t.each((function (t) {
  40560. var o = t.model,
  40561. a = !o.get("disabled", !0) && (!o.get("zoomLock", !0) || "move");
  40562. i[n + a] > i[n + e] && (e = a), r = r && o.get("preventDefaultMouseMove", !0)
  40563. })), {
  40564. controlType: e,
  40565. opt: {
  40566. zoomOnMouseWheel: !0,
  40567. moveOnMouseMove: !0,
  40568. moveOnMouseWheel: !0,
  40569. preventDefaultMouseMove: !!r
  40570. }
  40571. }
  40572. }(r);
  40573. n.enable(a.controlType, a.opt), n.setPointerChecker(t.containsPoint), Fg(t, "dispatchAction", e.model.get("throttle", !0), "fixRate")
  40574. } else tF(i, t)
  40575. }))
  40576. }))
  40577. }
  40578. var rF = function (t) {
  40579. function e() {
  40580. var e = null !== t && t.apply(this, arguments) || this;
  40581. return e.type = "dataZoom.inside", e
  40582. }
  40583. return n(e, t), e.prototype.render = function (e, n, i) {
  40584. t.prototype.render.apply(this, arguments), e.noTarget() ? this._clear() : (this.range = e.getPercentRange(), QB(i, e, {
  40585. pan: W(oF.pan, this),
  40586. zoom: W(oF.zoom, this),
  40587. scrollMove: W(oF.scrollMove, this)
  40588. }))
  40589. }, e.prototype.dispose = function () {
  40590. this._clear(), t.prototype.dispose.apply(this, arguments)
  40591. }, e.prototype._clear = function () {
  40592. ! function (t, e) {
  40593. for (var n = JB(t).coordSysRecordMap, i = n.keys(), r = 0; r < i.length; r++) {
  40594. var o = i[r],
  40595. a = n.get(o),
  40596. s = a.dataZoomInfoMap;
  40597. if (s) {
  40598. var l = e.uid;
  40599. s.get(l) && (s.removeKey(l), s.keys().length || tF(n, a))
  40600. }
  40601. }
  40602. }(this.api, this.dataZoomModel), this.range = null
  40603. }, e.type = "dataZoom.inside", e
  40604. }($E),
  40605. oF = {
  40606. zoom: function (t, e, n, i) {
  40607. var r = this.range,
  40608. o = r.slice(),
  40609. a = t.axisModels[0];
  40610. if (a) {
  40611. var s = sF[e](null, [i.originX, i.originY], a, n, t),
  40612. l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (o[1] - o[0]) + o[0],
  40613. u = Math.max(1 / i.scale, 0);
  40614. o[0] = (o[0] - l) * u + l, o[1] = (o[1] - l) * u + l;
  40615. var h = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
  40616. return Tk(0, o, [0, 100], 0, h.minSpan, h.maxSpan), this.range = o, r[0] !== o[0] || r[1] !== o[1] ? o : void 0
  40617. }
  40618. },
  40619. pan: aF((function (t, e, n, i, r, o) {
  40620. var a = sF[i]([o.oldX, o.oldY], [o.newX, o.newY], e, r, n);
  40621. return a.signal * (t[1] - t[0]) * a.pixel / a.pixelLength
  40622. })),
  40623. scrollMove: aF((function (t, e, n, i, r, o) {
  40624. return sF[i]([0, 0], [o.scrollDelta, o.scrollDelta], e, r, n).signal * (t[1] - t[0]) * o.scrollDelta
  40625. }))
  40626. };
  40627. function aF(t) {
  40628. return function (e, n, i, r) {
  40629. var o = this.range,
  40630. a = o.slice(),
  40631. s = e.axisModels[0];
  40632. if (s) return Tk(t(a, s, e, n, i, r), a, [0, 100], "all"), this.range = a, o[0] !== a[0] || o[1] !== a[1] ? a : void 0
  40633. }
  40634. }
  40635. var sF = {
  40636. grid: function (t, e, n, i, r) {
  40637. var o = n.axis,
  40638. a = {},
  40639. s = r.model.coordinateSystem.getRect();
  40640. return t = t || [0, 0], "x" === o.dim ? (a.pixel = e[0] - t[0], a.pixelLength = s.width, a.pixelStart = s.x, a.signal = o.inverse ? 1 : -1) : (a.pixel = e[1] - t[1], a.pixelLength = s.height, a.pixelStart = s.y, a.signal = o.inverse ? -1 : 1), a
  40641. },
  40642. polar: function (t, e, n, i, r) {
  40643. var o = n.axis,
  40644. a = {},
  40645. s = r.model.coordinateSystem,
  40646. l = s.getRadiusAxis().getExtent(),
  40647. u = s.getAngleAxis().getExtent();
  40648. return t = t ? s.pointToCoord(t) : [0, 0], e = s.pointToCoord(e), "radiusAxis" === n.mainType ? (a.pixel = e[0] - t[0], a.pixelLength = l[1] - l[0], a.pixelStart = l[0], a.signal = o.inverse ? 1 : -1) : (a.pixel = e[1] - t[1], a.pixelLength = u[1] - u[0], a.pixelStart = u[0], a.signal = o.inverse ? -1 : 1), a
  40649. },
  40650. singleAxis: function (t, e, n, i, r) {
  40651. var o = n.axis,
  40652. a = r.model.coordinateSystem.getRect(),
  40653. s = {};
  40654. return t = t || [0, 0], "horizontal" === o.orient ? (s.pixel = e[0] - t[0], s.pixelLength = a.width, s.pixelStart = a.x, s.signal = o.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixelLength = a.height, s.pixelStart = a.y, s.signal = o.inverse ? -1 : 1), s
  40655. }
  40656. };
  40657. function lF(t) {
  40658. rz(t), t.registerComponentModel($B), t.registerComponentView(rF), iF(t)
  40659. }
  40660. var uF = function (t) {
  40661. function e() {
  40662. var n = null !== t && t.apply(this, arguments) || this;
  40663. return n.type = e.type, n
  40664. }
  40665. return n(e, t), e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = Cc(jE.defaultOption, {
  40666. show: !0,
  40667. right: "ph",
  40668. top: "ph",
  40669. width: "ph",
  40670. height: "ph",
  40671. left: null,
  40672. bottom: null,
  40673. borderColor: "#d2dbee",
  40674. borderRadius: 3,
  40675. backgroundColor: "rgba(47,69,84,0)",
  40676. dataBackground: {
  40677. lineStyle: {
  40678. color: "#d2dbee",
  40679. width: .5
  40680. },
  40681. areaStyle: {
  40682. color: "#d2dbee",
  40683. opacity: .2
  40684. }
  40685. },
  40686. selectedDataBackground: {
  40687. lineStyle: {
  40688. color: "#8fb0f7",
  40689. width: .5
  40690. },
  40691. areaStyle: {
  40692. color: "#8fb0f7",
  40693. opacity: .2
  40694. }
  40695. },
  40696. fillerColor: "rgba(135,175,274,0.2)",
  40697. handleIcon: "path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",
  40698. handleSize: "100%",
  40699. handleStyle: {
  40700. color: "#fff",
  40701. borderColor: "#ACB8D1"
  40702. },
  40703. moveHandleSize: 7,
  40704. moveHandleIcon: "path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",
  40705. moveHandleStyle: {
  40706. color: "#D2DBEE",
  40707. opacity: .7
  40708. },
  40709. showDetail: !0,
  40710. showDataShadow: "auto",
  40711. realtime: !0,
  40712. zoomLock: !1,
  40713. textStyle: {
  40714. color: "#6E7079"
  40715. },
  40716. brushSelect: !0,
  40717. brushStyle: {
  40718. color: "rgba(135,175,274,0.15)"
  40719. },
  40720. emphasis: {
  40721. handleStyle: {
  40722. borderColor: "#8FB0F7"
  40723. },
  40724. moveHandleStyle: {
  40725. color: "#8FB0F7"
  40726. }
  40727. }
  40728. }), e
  40729. }(jE),
  40730. hF = zs,
  40731. cF = "horizontal",
  40732. pF = "vertical",
  40733. dF = ["line", "bar", "candlestick", "scatter"],
  40734. fF = {
  40735. easing: "cubicOut",
  40736. duration: 100,
  40737. delay: 0
  40738. },
  40739. gF = function (t) {
  40740. function e() {
  40741. var n = null !== t && t.apply(this, arguments) || this;
  40742. return n.type = e.type, n._displayables = {}, n
  40743. }
  40744. return n(e, t), e.prototype.init = function (t, e) {
  40745. this.api = e, this._onBrush = W(this._onBrush, this), this._onBrushEnd = W(this._onBrushEnd, this)
  40746. }, e.prototype.render = function (e, n, i, r) {
  40747. if (t.prototype.render.apply(this, arguments), Fg(this, "_dispatchZoomAction", e.get("throttle"), "fixRate"), this._orient = e.getOrient(), !1 !== e.get("show")) {
  40748. if (e.noTarget()) return this._clear(), void this.group.removeAll();
  40749. r && "dataZoom" === r.type && r.from === this.uid || this._buildView(), this._updateView()
  40750. } else this.group.removeAll()
  40751. }, e.prototype.dispose = function () {
  40752. this._clear(), t.prototype.dispose.apply(this, arguments)
  40753. }, e.prototype._clear = function () {
  40754. Gg(this, "_dispatchZoomAction");
  40755. var t = this.api.getZr();
  40756. t.off("mousemove", this._onBrush), t.off("mouseup", this._onBrushEnd)
  40757. }, e.prototype._buildView = function () {
  40758. var t = this.group;
  40759. t.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
  40760. var e = this._displayables.sliderGroup = new zr;
  40761. this._renderBackground(), this._renderHandle(), this._renderDataShadow(), t.add(e), this._positionGroup()
  40762. }, e.prototype._resetLocation = function () {
  40763. var t = this.dataZoomModel,
  40764. e = this.api,
  40765. n = t.get("brushSelect") ? 7 : 0,
  40766. i = this._findCoordRect(),
  40767. r = {
  40768. width: e.getWidth(),
  40769. height: e.getHeight()
  40770. },
  40771. o = this._orient === cF ? {
  40772. right: r.width - i.x - i.width,
  40773. top: r.height - 30 - 7 - n,
  40774. width: i.width,
  40775. height: 30
  40776. } : {
  40777. right: 7,
  40778. top: i.y,
  40779. width: 30,
  40780. height: i.height
  40781. },
  40782. a = Lp(t.option);
  40783. E(["right", "top", "width", "height"], (function (t) {
  40784. "ph" === a[t] && (a[t] = o[t])
  40785. }));
  40786. var s = Cp(a, r);
  40787. this._location = {
  40788. x: s.x,
  40789. y: s.y
  40790. }, this._size = [s.width, s.height], this._orient === pF && this._size.reverse()
  40791. }, e.prototype._positionGroup = function () {
  40792. var t = this.group,
  40793. e = this._location,
  40794. n = this._orient,
  40795. i = this.dataZoomModel.getFirstTargetAxisModel(),
  40796. r = i && i.get("inverse"),
  40797. o = this._displayables.sliderGroup,
  40798. a = (this._dataShadowInfo || {}).otherAxisInverse;
  40799. o.attr(n !== cF || r ? n === cF && r ? {
  40800. scaleY: a ? 1 : -1,
  40801. scaleX: -1
  40802. } : n !== pF || r ? {
  40803. scaleY: a ? -1 : 1,
  40804. scaleX: -1,
  40805. rotation: Math.PI / 2
  40806. } : {
  40807. scaleY: a ? -1 : 1,
  40808. scaleX: 1,
  40809. rotation: Math.PI / 2
  40810. } : {
  40811. scaleY: a ? 1 : -1,
  40812. scaleX: 1
  40813. });
  40814. var s = t.getBoundingRect([o]);
  40815. t.x = e.x - s.x, t.y = e.y - s.y, t.markRedraw()
  40816. }, e.prototype._getViewExtent = function () {
  40817. return [0, this._size[0]]
  40818. }, e.prototype._renderBackground = function () {
  40819. var t = this.dataZoomModel,
  40820. e = this._size,
  40821. n = this._displayables.sliderGroup,
  40822. i = t.get("brushSelect");
  40823. n.add(new hF({
  40824. silent: !0,
  40825. shape: {
  40826. x: 0,
  40827. y: 0,
  40828. width: e[0],
  40829. height: e[1]
  40830. },
  40831. style: {
  40832. fill: t.get("backgroundColor")
  40833. },
  40834. z2: -40
  40835. }));
  40836. var r = new hF({
  40837. shape: {
  40838. x: 0,
  40839. y: 0,
  40840. width: e[0],
  40841. height: e[1]
  40842. },
  40843. style: {
  40844. fill: "transparent"
  40845. },
  40846. z2: 0,
  40847. onclick: W(this._onClickPanel, this)
  40848. }),
  40849. o = this.api.getZr();
  40850. i ? (r.on("mousedown", this._onBrushStart, this), r.cursor = "crosshair", o.on("mousemove", this._onBrush), o.on("mouseup", this._onBrushEnd)) : (o.off("mousemove", this._onBrush), o.off("mouseup", this._onBrushEnd)), n.add(r)
  40851. }, e.prototype._renderDataShadow = function () {
  40852. var t = this._dataShadowInfo = this._prepareDataShadowInfo();
  40853. if (this._displayables.dataShadowSegs = [], t) {
  40854. var e = this._size,
  40855. n = this._shadowSize || [],
  40856. i = t.series,
  40857. r = i.getRawData(),
  40858. o = i.getShadowDim && i.getShadowDim(),
  40859. a = o && r.getDimensionInfo(o) ? i.getShadowDim() : t.otherDim;
  40860. if (null != a) {
  40861. var s = this._shadowPolygonPts,
  40862. l = this._shadowPolylinePts;
  40863. if (r !== this._shadowData || a !== this._shadowDim || e[0] !== n[0] || e[1] !== n[1]) {
  40864. var u = r.getDataExtent(a),
  40865. h = .3 * (u[1] - u[0]);
  40866. u = [u[0] - h, u[1] + h];
  40867. var c, p = [0, e[1]],
  40868. d = [0, e[0]],
  40869. f = [
  40870. [e[0], 0],
  40871. [0, 0]
  40872. ],
  40873. g = [],
  40874. y = d[1] / (r.count() - 1),
  40875. v = 0,
  40876. m = Math.round(r.count() / e[0]);
  40877. r.each([a], (function (t, e) {
  40878. if (m > 0 && e % m) v += y;
  40879. else {
  40880. var n = null == t || isNaN(t) || "" === t,
  40881. i = n ? 0 : Xr(t, u, p, !0);
  40882. n && !c && e ? (f.push([f[f.length - 1][0], 0]), g.push([g[g.length - 1][0], 0])) : !n && c && (f.push([v, 0]), g.push([v, 0])), f.push([v, i]), g.push([v, i]), v += y, c = n
  40883. }
  40884. })), s = this._shadowPolygonPts = f, l = this._shadowPolylinePts = g
  40885. }
  40886. this._shadowData = r, this._shadowDim = a, this._shadowSize = [e[0], e[1]];
  40887. for (var x = this.dataZoomModel, _ = 0; _ < 3; _++) {
  40888. var b = w(1 === _);
  40889. this._displayables.sliderGroup.add(b), this._displayables.dataShadowSegs.push(b)
  40890. }
  40891. }
  40892. }
  40893. function w(t) {
  40894. var e = x.getModel(t ? "selectedDataBackground" : "dataBackground"),
  40895. n = new zr,
  40896. i = new Wu({
  40897. shape: {
  40898. points: s
  40899. },
  40900. segmentIgnoreThreshold: 1,
  40901. style: e.getModel("areaStyle").getAreaStyle(),
  40902. silent: !0,
  40903. z2: -20
  40904. }),
  40905. r = new Yu({
  40906. shape: {
  40907. points: l
  40908. },
  40909. segmentIgnoreThreshold: 1,
  40910. style: e.getModel("lineStyle").getLineStyle(),
  40911. silent: !0,
  40912. z2: -19
  40913. });
  40914. return n.add(i), n.add(r), n
  40915. }
  40916. }, e.prototype._prepareDataShadowInfo = function () {
  40917. var t = this.dataZoomModel,
  40918. e = t.get("showDataShadow");
  40919. if (!1 !== e) {
  40920. var n, i = this.ecModel;
  40921. return t.eachTargetAxis((function (r, o) {
  40922. E(t.getAxisProxy(r, o).getTargetSeriesModels(), (function (t) {
  40923. if (!(n || !0 !== e && P(dF, t.get("type")) < 0)) {
  40924. var a, s = i.getComponent(YE(r), o).axis,
  40925. l = function (t) {
  40926. var e = {
  40927. x: "y",
  40928. y: "x",
  40929. radius: "angle",
  40930. angle: "radius"
  40931. };
  40932. return e[t]
  40933. }(r),
  40934. u = t.coordinateSystem;
  40935. null != l && u.getOtherAxis && (a = u.getOtherAxis(s).inverse), l = t.getData().mapDimension(l), n = {
  40936. thisAxis: s,
  40937. series: t,
  40938. thisDim: r,
  40939. otherDim: l,
  40940. otherAxisInverse: a
  40941. }
  40942. }
  40943. }), this)
  40944. }), this), n
  40945. }
  40946. }, e.prototype._renderHandle = function () {
  40947. var t = this.group,
  40948. e = this._displayables,
  40949. n = e.handles = [null, null],
  40950. i = e.handleLabels = [null, null],
  40951. r = this._displayables.sliderGroup,
  40952. o = this._size,
  40953. a = this.dataZoomModel,
  40954. s = this.api,
  40955. l = a.get("borderRadius") || 0,
  40956. u = a.get("brushSelect"),
  40957. h = e.filler = new hF({
  40958. silent: u,
  40959. style: {
  40960. fill: a.get("fillerColor")
  40961. },
  40962. textConfig: {
  40963. position: "inside"
  40964. }
  40965. });
  40966. r.add(h), r.add(new hF({
  40967. silent: !0,
  40968. subPixelOptimize: !0,
  40969. shape: {
  40970. x: 0,
  40971. y: 0,
  40972. width: o[0],
  40973. height: o[1],
  40974. r: l
  40975. },
  40976. style: {
  40977. stroke: a.get("dataBackgroundColor") || a.get("borderColor"),
  40978. lineWidth: 1,
  40979. fill: "rgba(0,0,0,0)"
  40980. }
  40981. })), E([0, 1], (function (e) {
  40982. var o = a.get("handleIcon");
  40983. !By[o] && o.indexOf("path://") < 0 && o.indexOf("image://") < 0 && (o = "path://" + o);
  40984. var s = Wy(o, -1, 0, 2, 2, null, !0);
  40985. s.attr({
  40986. cursor: yF(this._orient),
  40987. draggable: !0,
  40988. drift: W(this._onDragMove, this, e),
  40989. ondragend: W(this._onDragEnd, this),
  40990. onmouseover: W(this._showDataInfo, this, !0),
  40991. onmouseout: W(this._showDataInfo, this, !1),
  40992. z2: 5
  40993. });
  40994. var l = s.getBoundingRect(),
  40995. u = a.get("handleSize");
  40996. this._handleHeight = Ur(u, this._size[1]), this._handleWidth = l.width / l.height * this._handleHeight, s.setStyle(a.getModel("handleStyle").getItemStyle()), s.style.strokeNoScale = !0, s.rectHover = !0, s.ensureState("emphasis").style = a.getModel(["emphasis", "handleStyle"]).getItemStyle(), Hl(s);
  40997. var h = a.get("handleColor");
  40998. null != h && (s.style.fill = h), r.add(n[e] = s);
  40999. var c = a.getModel("textStyle");
  41000. t.add(i[e] = new Fs({
  41001. silent: !0,
  41002. invisible: !0,
  41003. style: nc(c, {
  41004. x: 0,
  41005. y: 0,
  41006. text: "",
  41007. verticalAlign: "middle",
  41008. align: "center",
  41009. fill: c.getTextColor(),
  41010. font: c.getFont()
  41011. }),
  41012. z2: 10
  41013. }))
  41014. }), this);
  41015. var c = h;
  41016. if (u) {
  41017. var p = Ur(a.get("moveHandleSize"), o[1]),
  41018. d = e.moveHandle = new zs({
  41019. style: a.getModel("moveHandleStyle").getItemStyle(),
  41020. silent: !0,
  41021. shape: {
  41022. r: [0, 0, 2, 2],
  41023. y: o[1] - .5,
  41024. height: p
  41025. }
  41026. }),
  41027. f = .8 * p,
  41028. g = e.moveHandleIcon = Wy(a.get("moveHandleIcon"), -f / 2, -f / 2, f, f, "#fff", !0);
  41029. g.silent = !0, g.y = o[1] + p / 2 - .5, d.ensureState("emphasis").style = a.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
  41030. var y = Math.min(o[1] / 2, Math.max(p, 10));
  41031. (c = e.moveZone = new zs({
  41032. invisible: !0,
  41033. shape: {
  41034. y: o[1] - y,
  41035. height: p + y
  41036. }
  41037. })).on("mouseover", (function () {
  41038. s.enterEmphasis(d)
  41039. })).on("mouseout", (function () {
  41040. s.leaveEmphasis(d)
  41041. })), r.add(d), r.add(g), r.add(c)
  41042. }
  41043. c.attr({
  41044. draggable: !0,
  41045. cursor: yF(this._orient),
  41046. drift: W(this._onDragMove, this, "all"),
  41047. ondragstart: W(this._showDataInfo, this, !0),
  41048. ondragend: W(this._onDragEnd, this),
  41049. onmouseover: W(this._showDataInfo, this, !0),
  41050. onmouseout: W(this._showDataInfo, this, !1)
  41051. })
  41052. }, e.prototype._resetInterval = function () {
  41053. var t = this._range = this.dataZoomModel.getPercentRange(),
  41054. e = this._getViewExtent();
  41055. this._handleEnds = [Xr(t[0], [0, 100], e, !0), Xr(t[1], [0, 100], e, !0)]
  41056. }, e.prototype._updateInterval = function (t, e) {
  41057. var n = this.dataZoomModel,
  41058. i = this._handleEnds,
  41059. r = this._getViewExtent(),
  41060. o = n.findRepresentativeAxisProxy().getMinMaxSpan(),
  41061. a = [0, 100];
  41062. Tk(e, i, r, n.get("zoomLock") ? "all" : t, null != o.minSpan ? Xr(o.minSpan, a, r, !0) : null, null != o.maxSpan ? Xr(o.maxSpan, a, r, !0) : null);
  41063. var s = this._range,
  41064. l = this._range = jr([Xr(i[0], r, a, !0), Xr(i[1], r, a, !0)]);
  41065. return !s || s[0] !== l[0] || s[1] !== l[1]
  41066. }, e.prototype._updateView = function (t) {
  41067. var e = this._displayables,
  41068. n = this._handleEnds,
  41069. i = jr(n.slice()),
  41070. r = this._size;
  41071. E([0, 1], (function (t) {
  41072. var i = e.handles[t],
  41073. o = this._handleHeight;
  41074. i.attr({
  41075. scaleX: o / 2,
  41076. scaleY: o / 2,
  41077. x: n[t] + (t ? -1 : 1),
  41078. y: r[1] / 2 - o / 2
  41079. })
  41080. }), this), e.filler.setShape({
  41081. x: i[0],
  41082. y: 0,
  41083. width: i[1] - i[0],
  41084. height: r[1]
  41085. });
  41086. var o = {
  41087. x: i[0],
  41088. width: i[1] - i[0]
  41089. };
  41090. e.moveHandle && (e.moveHandle.setShape(o), e.moveZone.setShape(o), e.moveZone.getBoundingRect(), e.moveHandleIcon && e.moveHandleIcon.attr("x", o.x + o.width / 2));
  41091. for (var a = e.dataShadowSegs, s = [0, i[0], i[1], r[0]], l = 0; l < a.length; l++) {
  41092. var u = a[l],
  41093. h = u.getClipPath();
  41094. h || (h = new zs, u.setClipPath(h)), h.setShape({
  41095. x: s[l],
  41096. y: 0,
  41097. width: s[l + 1] - s[l],
  41098. height: r[1]
  41099. })
  41100. }
  41101. this._updateDataInfo(t)
  41102. }, e.prototype._updateDataInfo = function (t) {
  41103. var e = this.dataZoomModel,
  41104. n = this._displayables,
  41105. i = n.handleLabels,
  41106. r = this._orient,
  41107. o = ["", ""];
  41108. if (e.get("showDetail")) {
  41109. var a = e.findRepresentativeAxisProxy();
  41110. if (a) {
  41111. var s = a.getAxisModel().axis,
  41112. l = this._range,
  41113. u = t ? a.calculateDataWindow({
  41114. start: l[0],
  41115. end: l[1]
  41116. }).valueWindow : a.getDataValueWindow();
  41117. o = [this._formatLabel(u[0], s), this._formatLabel(u[1], s)]
  41118. }
  41119. }
  41120. var h = jr(this._handleEnds.slice());
  41121. function c(t) {
  41122. var e = Eh(n.handles[t].parent, this.group),
  41123. a = Vh(0 === t ? "right" : "left", e),
  41124. s = this._handleWidth / 2 + 5,
  41125. l = zh([h[t] + (0 === t ? -s : s), this._size[1] / 2], e);
  41126. i[t].setStyle({
  41127. x: l[0],
  41128. y: l[1],
  41129. verticalAlign: r === cF ? "middle" : a,
  41130. align: r === cF ? a : "center",
  41131. text: o[t]
  41132. })
  41133. }
  41134. c.call(this, 0), c.call(this, 1)
  41135. }, e.prototype._formatLabel = function (t, e) {
  41136. var n = this.dataZoomModel,
  41137. i = n.get("labelFormatter"),
  41138. r = n.get("labelPrecision");
  41139. null != r && "auto" !== r || (r = e.getPixelPrecision());
  41140. var o = null == t || isNaN(t) ? "" : "category" === e.type || "time" === e.type ? e.scale.getLabel({
  41141. value: Math.round(t)
  41142. }) : t.toFixed(Math.min(r, 20));
  41143. return X(i) ? i(t, o) : U(i) ? i.replace("{value}", o) : o
  41144. }, e.prototype._showDataInfo = function (t) {
  41145. t = this._dragging || t;
  41146. var e = this._displayables,
  41147. n = e.handleLabels;
  41148. n[0].attr("invisible", !t), n[1].attr("invisible", !t), e.moveHandle && this.api[t ? "enterEmphasis" : "leaveEmphasis"](e.moveHandle, 1)
  41149. }, e.prototype._onDragMove = function (t, e, n, i) {
  41150. this._dragging = !0, de(i.event);
  41151. var r = zh([e, n], this._displayables.sliderGroup.getLocalTransform(), !0),
  41152. o = this._updateInterval(t, r[0]),
  41153. a = this.dataZoomModel.get("realtime");
  41154. this._updateView(!a), o && a && this._dispatchZoomAction(!0)
  41155. }, e.prototype._onDragEnd = function () {
  41156. this._dragging = !1, this._showDataInfo(!1), !this.dataZoomModel.get("realtime") && this._dispatchZoomAction(!1)
  41157. }, e.prototype._onClickPanel = function (t) {
  41158. var e = this._size,
  41159. n = this._displayables.sliderGroup.transformCoordToLocal(t.offsetX, t.offsetY);
  41160. if (!(n[0] < 0 || n[0] > e[0] || n[1] < 0 || n[1] > e[1])) {
  41161. var i = this._handleEnds,
  41162. r = (i[0] + i[1]) / 2,
  41163. o = this._updateInterval("all", n[0] - r);
  41164. this._updateView(), o && this._dispatchZoomAction(!1)
  41165. }
  41166. }, e.prototype._onBrushStart = function (t) {
  41167. var e = t.offsetX,
  41168. n = t.offsetY;
  41169. this._brushStart = new De(e, n), this._brushing = !0, this._brushStartTime = +new Date
  41170. }, e.prototype._onBrushEnd = function (t) {
  41171. if (this._brushing) {
  41172. var e = this._displayables.brushRect;
  41173. if (this._brushing = !1, e) {
  41174. e.attr("ignore", !0);
  41175. var n = e.shape;
  41176. if (!(+new Date - this._brushStartTime < 200 && Math.abs(n.width) < 5)) {
  41177. var i = this._getViewExtent(),
  41178. r = [0, 100];
  41179. this._range = jr([Xr(n.x, i, r, !0), Xr(n.x + n.width, i, r, !0)]), this._handleEnds = [n.x, n.x + n.width], this._updateView(), this._dispatchZoomAction(!1)
  41180. }
  41181. }
  41182. }
  41183. }, e.prototype._onBrush = function (t) {
  41184. this._brushing && (de(t.event), this._updateBrushRect(t.offsetX, t.offsetY))
  41185. }, e.prototype._updateBrushRect = function (t, e) {
  41186. var n = this._displayables,
  41187. i = this.dataZoomModel,
  41188. r = n.brushRect;
  41189. r || (r = n.brushRect = new hF({
  41190. silent: !0,
  41191. style: i.getModel("brushStyle").getItemStyle()
  41192. }), n.sliderGroup.add(r)), r.attr("ignore", !1);
  41193. var o = this._brushStart,
  41194. a = this._displayables.sliderGroup,
  41195. s = a.transformCoordToLocal(t, e),
  41196. l = a.transformCoordToLocal(o.x, o.y),
  41197. u = this._size;
  41198. s[0] = Math.max(Math.min(u[0], s[0]), 0), r.setShape({
  41199. x: l[0],
  41200. y: 0,
  41201. width: s[0] - l[0],
  41202. height: u[1]
  41203. })
  41204. }, e.prototype._dispatchZoomAction = function (t) {
  41205. var e = this._range;
  41206. this.api.dispatchAction({
  41207. type: "dataZoom",
  41208. from: this.uid,
  41209. dataZoomId: this.dataZoomModel.id,
  41210. animation: t ? fF : null,
  41211. start: e[0],
  41212. end: e[1]
  41213. })
  41214. }, e.prototype._findCoordRect = function () {
  41215. var t, e = UE(this.dataZoomModel).infoList;
  41216. if (!t && e.length) {
  41217. var n = e[0].model.coordinateSystem;
  41218. t = n.getRect && n.getRect()
  41219. }
  41220. if (!t) {
  41221. var i = this.api.getWidth(),
  41222. r = this.api.getHeight();
  41223. t = {
  41224. x: .2 * i,
  41225. y: .2 * r,
  41226. width: .6 * i,
  41227. height: .6 * r
  41228. }
  41229. }
  41230. return t
  41231. }, e.type = "dataZoom.slider", e
  41232. }($E);
  41233. function yF(t) {
  41234. return "vertical" === t ? "ns-resize" : "ew-resize"
  41235. }
  41236. function vF(t) {
  41237. t.registerComponentModel(uF), t.registerComponentView(gF), rz(t)
  41238. }
  41239. var mF = function (t, e, n) {
  41240. var i = T((xF[t] || {})[e]);
  41241. return n && Y(i) ? i[i.length - 1] : i
  41242. },
  41243. xF = {
  41244. color: {
  41245. active: ["#006edd", "#e0ffff"],
  41246. inactive: ["rgba(0,0,0,0)"]
  41247. },
  41248. colorHue: {
  41249. active: [0, 360],
  41250. inactive: [0, 0]
  41251. },
  41252. colorSaturation: {
  41253. active: [.3, 1],
  41254. inactive: [0, 0]
  41255. },
  41256. colorLightness: {
  41257. active: [.9, .5],
  41258. inactive: [0, 0]
  41259. },
  41260. colorAlpha: {
  41261. active: [.3, 1],
  41262. inactive: [0, 0]
  41263. },
  41264. opacity: {
  41265. active: [.3, 1],
  41266. inactive: [0, 0]
  41267. },
  41268. symbol: {
  41269. active: ["circle", "roundRect", "diamond"],
  41270. inactive: ["none"]
  41271. },
  41272. symbolSize: {
  41273. active: [10, 50],
  41274. inactive: [0, 0]
  41275. }
  41276. },
  41277. _F = _D.mapVisual,
  41278. bF = _D.eachVisual,
  41279. wF = Y,
  41280. SF = E,
  41281. MF = jr,
  41282. IF = Xr,
  41283. TF = function (t) {
  41284. function e() {
  41285. var n = null !== t && t.apply(this, arguments) || this;
  41286. return n.type = e.type, n.stateList = ["inRange", "outOfRange"], n.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], n.layoutMode = {
  41287. type: "box",
  41288. ignoreSize: !0
  41289. }, n.dataBound = [-1 / 0, 1 / 0], n.targetVisuals = {}, n.controllerVisuals = {}, n
  41290. }
  41291. return n(e, t), e.prototype.init = function (t, e, n) {
  41292. this.mergeDefaultAndTheme(t, n)
  41293. }, e.prototype.optionUpdated = function (t, e) {
  41294. var n = this.option;
  41295. !e && _V(n, t, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption()
  41296. }, e.prototype.resetVisual = function (t) {
  41297. var e = this.stateList;
  41298. t = W(t, this), this.controllerVisuals = xV(this.option.controller, e, t), this.targetVisuals = xV(this.option.target, e, t)
  41299. }, e.prototype.getItemSymbol = function () {
  41300. return null
  41301. }, e.prototype.getTargetSeriesIndices = function () {
  41302. var t = this.option.seriesIndex,
  41303. e = [];
  41304. return null == t || "all" === t ? this.ecModel.eachSeries((function (t, n) {
  41305. e.push(n)
  41306. })) : e = bo(t), e
  41307. }, e.prototype.eachTargetSeries = function (t, e) {
  41308. E(this.getTargetSeriesIndices(), (function (n) {
  41309. var i = this.ecModel.getSeriesByIndex(n);
  41310. i && t.call(e, i)
  41311. }), this)
  41312. }, e.prototype.isTargetSeries = function (t) {
  41313. var e = !1;
  41314. return this.eachTargetSeries((function (n) {
  41315. n === t && (e = !0)
  41316. })), e
  41317. }, e.prototype.formatValueText = function (t, e, n) {
  41318. var i, r = this.option,
  41319. o = r.precision,
  41320. a = this.dataBound,
  41321. s = r.formatter;
  41322. n = n || ["<", ">"], Y(t) && (t = t.slice(), i = !0);
  41323. var l = e ? t : i ? [u(t[0]), u(t[1])] : u(t);
  41324. return U(s) ? s.replace("{value}", i ? l[0] : l).replace("{value2}", i ? l[1] : l) : X(s) ? i ? s(t[0], t[1]) : s(t) : i ? t[0] === a[0] ? n[0] + " " + l[1] : t[1] === a[1] ? n[1] + " " + l[0] : l[0] + " - " + l[1] : l;
  41325. function u(t) {
  41326. return t === a[0] ? "min" : t === a[1] ? "max" : (+t).toFixed(Math.min(o, 20))
  41327. }
  41328. }, e.prototype.resetExtent = function () {
  41329. var t = this.option,
  41330. e = MF([t.min, t.max]);
  41331. this._dataExtent = e
  41332. }, e.prototype.getDataDimensionIndex = function (t) {
  41333. var e = this.option.dimension;
  41334. if (null != e) return t.getDimensionIndex(e);
  41335. for (var n = t.dimensions, i = n.length - 1; i >= 0; i--) {
  41336. var r = n[i],
  41337. o = t.getDimensionInfo(r);
  41338. if (!o.isCalculationCoord) return o.storeDimIndex
  41339. }
  41340. }, e.prototype.getExtent = function () {
  41341. return this._dataExtent.slice()
  41342. }, e.prototype.completeVisualOption = function () {
  41343. var t = this.ecModel,
  41344. e = this.option,
  41345. n = {
  41346. inRange: e.inRange,
  41347. outOfRange: e.outOfRange
  41348. },
  41349. i = e.target || (e.target = {}),
  41350. r = e.controller || (e.controller = {});
  41351. C(i, n), C(r, n);
  41352. var o = this.isCategory();
  41353. function a(n) {
  41354. wF(e.color) && !n.inRange && (n.inRange = {
  41355. color: e.color.slice().reverse()
  41356. }), n.inRange = n.inRange || {
  41357. color: t.get("gradientColor")
  41358. }
  41359. }
  41360. a.call(this, i), a.call(this, r),
  41361. function (t, e, n) {
  41362. var i = t[e],
  41363. r = t[n];
  41364. i && !r && (r = t[n] = {}, SF(i, (function (t, e) {
  41365. if (_D.isValidType(e)) {
  41366. var n = mF(e, "inactive", o);
  41367. null != n && (r[e] = n, "color" !== e || r.hasOwnProperty("opacity") || r.hasOwnProperty("colorAlpha") || (r.opacity = [0, 0]))
  41368. }
  41369. })))
  41370. }.call(this, i, "inRange", "outOfRange"),
  41371. function (t) {
  41372. var e = (t.inRange || {}).symbol || (t.outOfRange || {}).symbol,
  41373. n = (t.inRange || {}).symbolSize || (t.outOfRange || {}).symbolSize,
  41374. i = this.get("inactiveColor"),
  41375. r = this.getItemSymbol() || "roundRect";
  41376. SF(this.stateList, (function (a) {
  41377. var s = this.itemSize,
  41378. l = t[a];
  41379. l || (l = t[a] = {
  41380. color: o ? i : [i]
  41381. }), null == l.symbol && (l.symbol = e && T(e) || (o ? r : [r])), null == l.symbolSize && (l.symbolSize = n && T(n) || (o ? s[0] : [s[0], s[0]])), l.symbol = _F(l.symbol, (function (t) {
  41382. return "none" === t ? r : t
  41383. }));
  41384. var u = l.symbolSize;
  41385. if (null != u) {
  41386. var h = -1 / 0;
  41387. bF(u, (function (t) {
  41388. t > h && (h = t)
  41389. })), l.symbolSize = _F(u, (function (t) {
  41390. return IF(t, [0, h], [0, s[0]], !0)
  41391. }))
  41392. }
  41393. }), this)
  41394. }.call(this, r)
  41395. }, e.prototype.resetItemSize = function () {
  41396. this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))]
  41397. }, e.prototype.isCategory = function () {
  41398. return !!this.option.categories
  41399. }, e.prototype.setSelected = function (t) {}, e.prototype.getSelected = function () {
  41400. return null
  41401. }, e.prototype.getValueState = function (t) {
  41402. return null
  41403. }, e.prototype.getVisualMeta = function (t) {
  41404. return null
  41405. }, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = {
  41406. show: !0,
  41407. z: 4,
  41408. seriesIndex: "all",
  41409. min: 0,
  41410. max: 200,
  41411. left: 0,
  41412. right: null,
  41413. top: null,
  41414. bottom: 0,
  41415. itemWidth: null,
  41416. itemHeight: null,
  41417. inverse: !1,
  41418. orient: "vertical",
  41419. backgroundColor: "rgba(0,0,0,0)",
  41420. borderColor: "#ccc",
  41421. contentColor: "#5793f3",
  41422. inactiveColor: "#aaa",
  41423. borderWidth: 0,
  41424. padding: 5,
  41425. textGap: 10,
  41426. precision: 0,
  41427. textStyle: {
  41428. color: "#333"
  41429. }
  41430. }, e
  41431. }(Rp),
  41432. CF = [20, 140],
  41433. DF = function (t) {
  41434. function e() {
  41435. var n = null !== t && t.apply(this, arguments) || this;
  41436. return n.type = e.type, n
  41437. }
  41438. return n(e, t), e.prototype.optionUpdated = function (e, n) {
  41439. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual((function (t) {
  41440. t.mappingMethod = "linear", t.dataExtent = this.getExtent()
  41441. })), this._resetRange()
  41442. }, e.prototype.resetItemSize = function () {
  41443. t.prototype.resetItemSize.apply(this, arguments);
  41444. var e = this.itemSize;
  41445. (null == e[0] || isNaN(e[0])) && (e[0] = CF[0]), (null == e[1] || isNaN(e[1])) && (e[1] = CF[1])
  41446. }, e.prototype._resetRange = function () {
  41447. var t = this.getExtent(),
  41448. e = this.option.range;
  41449. !e || e.auto ? (t.auto = 1, this.option.range = t) : Y(e) && (e[0] > e[1] && e.reverse(), e[0] = Math.max(e[0], t[0]), e[1] = Math.min(e[1], t[1]))
  41450. }, e.prototype.completeVisualOption = function () {
  41451. t.prototype.completeVisualOption.apply(this, arguments), E(this.stateList, (function (t) {
  41452. var e = this.option.controller[t].symbolSize;
  41453. e && e[0] !== e[1] && (e[0] = e[1] / 3)
  41454. }), this)
  41455. }, e.prototype.setSelected = function (t) {
  41456. this.option.range = t.slice(), this._resetRange()
  41457. }, e.prototype.getSelected = function () {
  41458. var t = this.getExtent(),
  41459. e = jr((this.get("range") || []).slice());
  41460. return e[0] > t[1] && (e[0] = t[1]), e[1] > t[1] && (e[1] = t[1]), e[0] < t[0] && (e[0] = t[0]), e[1] < t[0] && (e[1] = t[0]), e
  41461. }, e.prototype.getValueState = function (t) {
  41462. var e = this.option.range,
  41463. n = this.getExtent();
  41464. return (e[0] <= n[0] || e[0] <= t) && (e[1] >= n[1] || t <= e[1]) ? "inRange" : "outOfRange"
  41465. }, e.prototype.findTargetDataIndices = function (t) {
  41466. var e = [];
  41467. return this.eachTargetSeries((function (n) {
  41468. var i = [],
  41469. r = n.getData();
  41470. r.each(this.getDataDimensionIndex(r), (function (e, n) {
  41471. t[0] <= e && e <= t[1] && i.push(n)
  41472. }), this), e.push({
  41473. seriesId: n.id,
  41474. dataIndex: i
  41475. })
  41476. }), this), e
  41477. }, e.prototype.getVisualMeta = function (t) {
  41478. var e = AF(this, "outOfRange", this.getExtent()),
  41479. n = AF(this, "inRange", this.option.range.slice()),
  41480. i = [];
  41481. function r(e, n) {
  41482. i.push({
  41483. value: e,
  41484. color: t(e, n)
  41485. })
  41486. }
  41487. for (var o = 0, a = 0, s = n.length, l = e.length; a < l && (!n.length || e[a] <= n[0]); a++) e[a] < n[o] && r(e[a], "outOfRange");
  41488. for (var u = 1; o < s; o++, u = 0) u && i.length && r(n[o], "outOfRange"), r(n[o], "inRange");
  41489. for (u = 1; a < l; a++)(!n.length || n[n.length - 1] < e[a]) && (u && (i.length && r(i[i.length - 1].value, "outOfRange"), u = 0), r(e[a], "outOfRange"));
  41490. var h = i.length;
  41491. return {
  41492. stops: i,
  41493. outerColors: [h ? i[0].color : "transparent", h ? i[h - 1].color : "transparent"]
  41494. }
  41495. }, e.type = "visualMap.continuous", e.defaultOption = Cc(TF.defaultOption, {
  41496. align: "auto",
  41497. calculable: !1,
  41498. hoverLink: !0,
  41499. realtime: !0,
  41500. handleIcon: "path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",
  41501. handleSize: "120%",
  41502. handleStyle: {
  41503. borderColor: "#fff",
  41504. borderWidth: 1
  41505. },
  41506. indicatorIcon: "circle",
  41507. indicatorSize: "50%",
  41508. indicatorStyle: {
  41509. borderColor: "#fff",
  41510. borderWidth: 2,
  41511. shadowBlur: 2,
  41512. shadowOffsetX: 1,
  41513. shadowOffsetY: 1,
  41514. shadowColor: "rgba(0,0,0,0.2)"
  41515. }
  41516. }), e
  41517. }(TF);
  41518. function AF(t, e, n) {
  41519. if (n[0] === n[1]) return n.slice();
  41520. for (var i = (n[1] - n[0]) / 200, r = n[0], o = [], a = 0; a <= 200 && r < n[1]; a++) o.push(r), r += i;
  41521. return o.push(n[1]), o
  41522. }
  41523. var kF = function (t) {
  41524. function e() {
  41525. var n = null !== t && t.apply(this, arguments) || this;
  41526. return n.type = e.type, n.autoPositionValues = {
  41527. left: 1,
  41528. right: 1,
  41529. top: 1,
  41530. bottom: 1
  41531. }, n
  41532. }
  41533. return n(e, t), e.prototype.init = function (t, e) {
  41534. this.ecModel = t, this.api = e
  41535. }, e.prototype.render = function (t, e, n, i) {
  41536. this.visualMapModel = t, !1 !== t.get("show") ? this.doRender(t, e, n, i) : this.group.removeAll()
  41537. }, e.prototype.renderBackground = function (t) {
  41538. var e = this.visualMapModel,
  41539. n = fp(e.get("padding") || 0),
  41540. i = t.getBoundingRect();
  41541. t.add(new zs({
  41542. z2: -1,
  41543. silent: !0,
  41544. shape: {
  41545. x: i.x - n[3],
  41546. y: i.y - n[0],
  41547. width: i.width + n[3] + n[1],
  41548. height: i.height + n[0] + n[2]
  41549. },
  41550. style: {
  41551. fill: e.get("backgroundColor"),
  41552. stroke: e.get("borderColor"),
  41553. lineWidth: e.get("borderWidth")
  41554. }
  41555. }))
  41556. }, e.prototype.getControllerVisual = function (t, e, n) {
  41557. var i = (n = n || {}).forceState,
  41558. r = this.visualMapModel,
  41559. o = {};
  41560. if ("color" === e) {
  41561. var a = r.get("contentColor");
  41562. o.color = a
  41563. }
  41564. function s(t) {
  41565. return o[t]
  41566. }
  41567. function l(t, e) {
  41568. o[t] = e
  41569. }
  41570. var u = r.controllerVisuals[i || r.getValueState(t)];
  41571. return E(_D.prepareVisualTypes(u), (function (i) {
  41572. var r = u[i];
  41573. n.convertOpacityToAlpha && "opacity" === i && (i = "colorAlpha", r = u.__alphaForOpacity), _D.dependsOn(i, e) && r && r.applyVisual(t, s, l)
  41574. })), o[e]
  41575. }, e.prototype.positionGroup = function (t) {
  41576. var e = this.visualMapModel,
  41577. n = this.api;
  41578. Dp(t, e.getBoxLayoutParams(), {
  41579. width: n.getWidth(),
  41580. height: n.getHeight()
  41581. })
  41582. }, e.prototype.doRender = function (t, e, n, i) {}, e.type = "visualMap", e
  41583. }(Tg),
  41584. LF = [
  41585. ["left", "right", "width"],
  41586. ["top", "bottom", "height"]
  41587. ];
  41588. function PF(t, e, n) {
  41589. var i = t.option,
  41590. r = i.align;
  41591. if (null != r && "auto" !== r) return r;
  41592. for (var o = {
  41593. width: e.getWidth(),
  41594. height: e.getHeight()
  41595. }, a = "horizontal" === i.orient ? 1 : 0, s = LF[a], l = [0, null, 10], u = {}, h = 0; h < 3; h++) u[LF[1 - a][h]] = l[h], u[s[h]] = 2 === h ? n[0] : i[s[h]];
  41596. var c = [
  41597. ["x", "width", 3],
  41598. ["y", "height", 0]
  41599. ][a],
  41600. p = Cp(u, o, i.padding);
  41601. return s[(p.margin[c[2]] || 0) + p[c[0]] + .5 * p[c[1]] < .5 * o[c[1]] ? 0 : 1]
  41602. }
  41603. function OF(t, e) {
  41604. return E(t || [], (function (t) {
  41605. null != t.dataIndex && (t.dataIndexInside = t.dataIndex, t.dataIndex = null), t.highlightKey = "visualMap" + (e ? e.componentIndex : "")
  41606. })), t
  41607. }
  41608. var RF = Xr,
  41609. NF = E,
  41610. EF = Math.min,
  41611. zF = Math.max,
  41612. VF = function (t) {
  41613. function e() {
  41614. var n = null !== t && t.apply(this, arguments) || this;
  41615. return n.type = e.type, n._shapes = {}, n._dataInterval = [], n._handleEnds = [], n._hoverLinkDataIndices = [], n
  41616. }
  41617. return n(e, t), e.prototype.doRender = function (t, e, n, i) {
  41618. this._api = n, i && "selectDataRange" === i.type && i.from === this.uid || this._buildView()
  41619. }, e.prototype._buildView = function () {
  41620. this.group.removeAll();
  41621. var t = this.visualMapModel,
  41622. e = this.group;
  41623. this._orient = t.get("orient"), this._useHandle = t.get("calculable"), this._resetInterval(), this._renderBar(e);
  41624. var n = t.get("text");
  41625. this._renderEndsText(e, n, 0), this._renderEndsText(e, n, 1), this._updateView(!0), this.renderBackground(e), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(e)
  41626. }, e.prototype._renderEndsText = function (t, e, n) {
  41627. if (e) {
  41628. var i = e[1 - n];
  41629. i = null != i ? i + "" : "";
  41630. var r = this.visualMapModel,
  41631. o = r.get("textGap"),
  41632. a = r.itemSize,
  41633. s = this._shapes.mainGroup,
  41634. l = this._applyTransform([a[0] / 2, 0 === n ? -o : a[1] + o], s),
  41635. u = this._applyTransform(0 === n ? "bottom" : "top", s),
  41636. h = this._orient,
  41637. c = this.visualMapModel.textStyleModel;
  41638. this.group.add(new Fs({
  41639. style: nc(c, {
  41640. x: l[0],
  41641. y: l[1],
  41642. verticalAlign: "horizontal" === h ? "middle" : u,
  41643. align: "horizontal" === h ? u : "center",
  41644. text: i
  41645. })
  41646. }))
  41647. }
  41648. }, e.prototype._renderBar = function (t) {
  41649. var e = this.visualMapModel,
  41650. n = this._shapes,
  41651. i = e.itemSize,
  41652. r = this._orient,
  41653. o = this._useHandle,
  41654. a = PF(e, this.api, i),
  41655. s = n.mainGroup = this._createBarGroup(a),
  41656. l = new zr;
  41657. s.add(l), l.add(n.outOfRange = BF()), l.add(n.inRange = BF(null, o ? GF(this._orient) : null, W(this._dragHandle, this, "all", !1), W(this._dragHandle, this, "all", !0))), l.setClipPath(new zs({
  41658. shape: {
  41659. x: 0,
  41660. y: 0,
  41661. width: i[0],
  41662. height: i[1],
  41663. r: 3
  41664. }
  41665. }));
  41666. var u = e.textStyleModel.getTextRect("国"),
  41667. h = zF(u.width, u.height);
  41668. o && (n.handleThumbs = [], n.handleLabels = [], n.handleLabelPoints = [], this._createHandle(e, s, 0, i, h, r), this._createHandle(e, s, 1, i, h, r)), this._createIndicator(e, s, i, h, r), t.add(s)
  41669. }, e.prototype._createHandle = function (t, e, n, i, r, o) {
  41670. var a = W(this._dragHandle, this, n, !1),
  41671. s = W(this._dragHandle, this, n, !0),
  41672. l = Ir(t.get("handleSize"), i[0]),
  41673. u = Wy(t.get("handleIcon"), -l / 2, -l / 2, l, l, null, !0),
  41674. h = GF(this._orient);
  41675. u.attr({
  41676. cursor: h,
  41677. draggable: !0,
  41678. drift: a,
  41679. ondragend: s,
  41680. onmousemove: function (t) {
  41681. de(t.event)
  41682. }
  41683. }), u.x = i[0] / 2, u.useStyle(t.getModel("handleStyle").getItemStyle()), u.setStyle({
  41684. strokeNoScale: !0,
  41685. strokeFirst: !0
  41686. }), u.style.lineWidth *= 2, u.ensureState("emphasis").style = t.getModel(["emphasis", "handleStyle"]).getItemStyle(), ql(u, !0), e.add(u);
  41687. var c = this.visualMapModel.textStyleModel,
  41688. p = new Fs({
  41689. cursor: h,
  41690. draggable: !0,
  41691. drift: a,
  41692. onmousemove: function (t) {
  41693. de(t.event)
  41694. },
  41695. ondragend: s,
  41696. style: nc(c, {
  41697. x: 0,
  41698. y: 0,
  41699. text: ""
  41700. })
  41701. });
  41702. p.ensureState("blur").style = {
  41703. opacity: .1
  41704. }, p.stateTransition = {
  41705. duration: 200
  41706. }, this.group.add(p);
  41707. var d = [l, 0],
  41708. f = this._shapes;
  41709. f.handleThumbs[n] = u, f.handleLabelPoints[n] = d, f.handleLabels[n] = p
  41710. }, e.prototype._createIndicator = function (t, e, n, i, r) {
  41711. var o = Ir(t.get("indicatorSize"), n[0]),
  41712. a = Wy(t.get("indicatorIcon"), -o / 2, -o / 2, o, o, null, !0);
  41713. a.attr({
  41714. cursor: "move",
  41715. invisible: !0,
  41716. silent: !0,
  41717. x: n[0] / 2
  41718. });
  41719. var s = t.getModel("indicatorStyle").getItemStyle();
  41720. if (a instanceof ks) {
  41721. var l = a.style;
  41722. a.useStyle(A({
  41723. image: l.image,
  41724. x: l.x,
  41725. y: l.y,
  41726. width: l.width,
  41727. height: l.height
  41728. }, s))
  41729. } else a.useStyle(s);
  41730. e.add(a);
  41731. var u = this.visualMapModel.textStyleModel,
  41732. h = new Fs({
  41733. silent: !0,
  41734. invisible: !0,
  41735. style: nc(u, {
  41736. x: 0,
  41737. y: 0,
  41738. text: ""
  41739. })
  41740. });
  41741. this.group.add(h);
  41742. var c = [("horizontal" === r ? i / 2 : 6) + n[0] / 2, 0],
  41743. p = this._shapes;
  41744. p.indicator = a, p.indicatorLabel = h, p.indicatorLabelPoint = c, this._firstShowIndicator = !0
  41745. }, e.prototype._dragHandle = function (t, e, n, i) {
  41746. if (this._useHandle) {
  41747. if (this._dragging = !e, !e) {
  41748. var r = this._applyTransform([n, i], this._shapes.mainGroup, !0);
  41749. this._updateInterval(t, r[1]), this._hideIndicator(), this._updateView()
  41750. }
  41751. e === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
  41752. type: "selectDataRange",
  41753. from: this.uid,
  41754. visualMapId: this.visualMapModel.id,
  41755. selected: this._dataInterval.slice()
  41756. }), e ? !this._hovering && this._clearHoverLinkToSeries() : FF(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[t], !1)
  41757. }
  41758. }, e.prototype._resetInterval = function () {
  41759. var t = this.visualMapModel,
  41760. e = this._dataInterval = t.getSelected(),
  41761. n = t.getExtent(),
  41762. i = [0, t.itemSize[1]];
  41763. this._handleEnds = [RF(e[0], n, i, !0), RF(e[1], n, i, !0)]
  41764. }, e.prototype._updateInterval = function (t, e) {
  41765. e = e || 0;
  41766. var n = this.visualMapModel,
  41767. i = this._handleEnds,
  41768. r = [0, n.itemSize[1]];
  41769. Tk(e, i, r, t, 0);
  41770. var o = n.getExtent();
  41771. this._dataInterval = [RF(i[0], r, o, !0), RF(i[1], r, o, !0)]
  41772. }, e.prototype._updateView = function (t) {
  41773. var e = this.visualMapModel,
  41774. n = e.getExtent(),
  41775. i = this._shapes,
  41776. r = [0, e.itemSize[1]],
  41777. o = t ? r : this._handleEnds,
  41778. a = this._createBarVisual(this._dataInterval, n, o, "inRange"),
  41779. s = this._createBarVisual(n, n, r, "outOfRange");
  41780. i.inRange.setStyle({
  41781. fill: a.barColor
  41782. }).setShape("points", a.barPoints), i.outOfRange.setStyle({
  41783. fill: s.barColor
  41784. }).setShape("points", s.barPoints), this._updateHandle(o, a)
  41785. }, e.prototype._createBarVisual = function (t, e, n, i) {
  41786. var r = {
  41787. forceState: i,
  41788. convertOpacityToAlpha: !0
  41789. },
  41790. o = this._makeColorGradient(t, r),
  41791. a = [this.getControllerVisual(t[0], "symbolSize", r), this.getControllerVisual(t[1], "symbolSize", r)],
  41792. s = this._createBarPoints(n, a);
  41793. return {
  41794. barColor: new nh(0, 0, 0, 1, o),
  41795. barPoints: s,
  41796. handlesColor: [o[0].color, o[o.length - 1].color]
  41797. }
  41798. }, e.prototype._makeColorGradient = function (t, e) {
  41799. var n = [],
  41800. i = (t[1] - t[0]) / 100;
  41801. n.push({
  41802. color: this.getControllerVisual(t[0], "color", e),
  41803. offset: 0
  41804. });
  41805. for (var r = 1; r < 100; r++) {
  41806. var o = t[0] + i * r;
  41807. if (o > t[1]) break;
  41808. n.push({
  41809. color: this.getControllerVisual(o, "color", e),
  41810. offset: r / 100
  41811. })
  41812. }
  41813. return n.push({
  41814. color: this.getControllerVisual(t[1], "color", e),
  41815. offset: 1
  41816. }), n
  41817. }, e.prototype._createBarPoints = function (t, e) {
  41818. var n = this.visualMapModel.itemSize;
  41819. return [
  41820. [n[0] - e[0], t[0]],
  41821. [n[0], t[0]],
  41822. [n[0], t[1]],
  41823. [n[0] - e[1], t[1]]
  41824. ]
  41825. }, e.prototype._createBarGroup = function (t) {
  41826. var e = this._orient,
  41827. n = this.visualMapModel.get("inverse");
  41828. return new zr("horizontal" !== e || n ? "horizontal" === e && n ? {
  41829. scaleX: "bottom" === t ? -1 : 1,
  41830. rotation: -Math.PI / 2
  41831. } : "vertical" !== e || n ? {
  41832. scaleX: "left" === t ? 1 : -1
  41833. } : {
  41834. scaleX: "left" === t ? 1 : -1,
  41835. scaleY: -1
  41836. } : {
  41837. scaleX: "bottom" === t ? 1 : -1,
  41838. rotation: Math.PI / 2
  41839. })
  41840. }, e.prototype._updateHandle = function (t, e) {
  41841. if (this._useHandle) {
  41842. var n = this._shapes,
  41843. i = this.visualMapModel,
  41844. r = n.handleThumbs,
  41845. o = n.handleLabels,
  41846. a = i.itemSize,
  41847. s = i.getExtent();
  41848. NF([0, 1], (function (l) {
  41849. var u = r[l];
  41850. u.setStyle("fill", e.handlesColor[l]), u.y = t[l];
  41851. var h = RF(t[l], [0, a[1]], s, !0),
  41852. c = this.getControllerVisual(h, "symbolSize");
  41853. u.scaleX = u.scaleY = c / a[0], u.x = a[0] - c / 2;
  41854. var p = zh(n.handleLabelPoints[l], Eh(u, this.group));
  41855. o[l].setStyle({
  41856. x: p[0],
  41857. y: p[1],
  41858. text: i.formatValueText(this._dataInterval[l]),
  41859. verticalAlign: "middle",
  41860. align: "vertical" === this._orient ? this._applyTransform("left", n.mainGroup) : "center"
  41861. })
  41862. }), this)
  41863. }
  41864. }, e.prototype._showIndicator = function (t, e, n, i) {
  41865. var r = this.visualMapModel,
  41866. o = r.getExtent(),
  41867. a = r.itemSize,
  41868. s = [0, a[1]],
  41869. l = this._shapes,
  41870. u = l.indicator;
  41871. if (u) {
  41872. u.attr("invisible", !1);
  41873. var h = this.getControllerVisual(t, "color", {
  41874. convertOpacityToAlpha: !0
  41875. }),
  41876. c = this.getControllerVisual(t, "symbolSize"),
  41877. p = RF(t, o, s, !0),
  41878. d = a[0] - c / 2,
  41879. f = {
  41880. x: u.x,
  41881. y: u.y
  41882. };
  41883. u.y = p, u.x = d;
  41884. var g = zh(l.indicatorLabelPoint, Eh(u, this.group)),
  41885. y = l.indicatorLabel;
  41886. y.attr("invisible", !1);
  41887. var v = this._applyTransform("left", l.mainGroup),
  41888. m = "horizontal" === this._orient;
  41889. y.setStyle({
  41890. text: (n || "") + r.formatValueText(e),
  41891. verticalAlign: m ? v : "middle",
  41892. align: m ? "center" : v
  41893. });
  41894. var x = {
  41895. x: d,
  41896. y: p,
  41897. style: {
  41898. fill: h
  41899. }
  41900. },
  41901. _ = {
  41902. style: {
  41903. x: g[0],
  41904. y: g[1]
  41905. }
  41906. };
  41907. if (r.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
  41908. var b = {
  41909. duration: 100,
  41910. easing: "cubicInOut",
  41911. additive: !0
  41912. };
  41913. u.x = f.x, u.y = f.y, u.animateTo(x, b), y.animateTo(_, b)
  41914. } else u.attr(x), y.attr(_);
  41915. this._firstShowIndicator = !1;
  41916. var w = this._shapes.handleLabels;
  41917. if (w)
  41918. for (var S = 0; S < w.length; S++) this._api.enterBlur(w[S])
  41919. }
  41920. }, e.prototype._enableHoverLinkToSeries = function () {
  41921. var t = this;
  41922. this._shapes.mainGroup.on("mousemove", (function (e) {
  41923. if (t._hovering = !0, !t._dragging) {
  41924. var n = t.visualMapModel.itemSize,
  41925. i = t._applyTransform([e.offsetX, e.offsetY], t._shapes.mainGroup, !0, !0);
  41926. i[1] = EF(zF(0, i[1]), n[1]), t._doHoverLinkToSeries(i[1], 0 <= i[0] && i[0] <= n[0])
  41927. }
  41928. })).on("mouseout", (function () {
  41929. t._hovering = !1, !t._dragging && t._clearHoverLinkToSeries()
  41930. }))
  41931. }, e.prototype._enableHoverLinkFromSeries = function () {
  41932. var t = this.api.getZr();
  41933. this.visualMapModel.option.hoverLink ? (t.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), t.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries()
  41934. }, e.prototype._doHoverLinkToSeries = function (t, e) {
  41935. var n = this.visualMapModel,
  41936. i = n.itemSize;
  41937. if (n.option.hoverLink) {
  41938. var r = [0, i[1]],
  41939. o = n.getExtent();
  41940. t = EF(zF(r[0], t), r[1]);
  41941. var a = function (t, e, n) {
  41942. var i = 6,
  41943. r = t.get("hoverLinkDataSize");
  41944. r && (i = RF(r, e, n, !0) / 2);
  41945. return i
  41946. }(n, o, r),
  41947. s = [t - a, t + a],
  41948. l = RF(t, r, o, !0),
  41949. u = [RF(s[0], r, o, !0), RF(s[1], r, o, !0)];
  41950. s[0] < r[0] && (u[0] = -1 / 0), s[1] > r[1] && (u[1] = 1 / 0), e && (u[0] === -1 / 0 ? this._showIndicator(l, u[1], "< ", a) : u[1] === 1 / 0 ? this._showIndicator(l, u[0], "> ", a) : this._showIndicator(l, l, "≈ ", a));
  41951. var h = this._hoverLinkDataIndices,
  41952. c = [];
  41953. (e || FF(n)) && (c = this._hoverLinkDataIndices = n.findTargetDataIndices(u));
  41954. var p = function (t, e) {
  41955. var n = {},
  41956. i = {};
  41957. return r(t || [], n), r(e || [], i, n), [o(n), o(i)];
  41958. function r(t, e, n) {
  41959. for (var i = 0, r = t.length; i < r; i++) {
  41960. var o = Ao(t[i].seriesId, null);
  41961. if (null == o) return;
  41962. for (var a = bo(t[i].dataIndex), s = n && n[o], l = 0, u = a.length; l < u; l++) {
  41963. var h = a[l];
  41964. s && s[h] ? s[h] = null : (e[o] || (e[o] = {}))[h] = 1
  41965. }
  41966. }
  41967. }
  41968. function o(t, e) {
  41969. var n = [];
  41970. for (var i in t)
  41971. if (t.hasOwnProperty(i) && null != t[i])
  41972. if (e) n.push(+i);
  41973. else {
  41974. var r = o(t[i], !0);
  41975. r.length && n.push({
  41976. seriesId: i,
  41977. dataIndex: r
  41978. })
  41979. } return n
  41980. }
  41981. }(h, c);
  41982. this._dispatchHighDown("downplay", OF(p[0], n)), this._dispatchHighDown("highlight", OF(p[1], n))
  41983. }
  41984. }, e.prototype._hoverLinkFromSeriesMouseOver = function (t) {
  41985. var e;
  41986. if (ky(t.target, (function (t) {
  41987. var n = Qs(t);
  41988. if (null != n.dataIndex) return e = n, !0
  41989. }), !0), e) {
  41990. var n = this.ecModel.getSeriesByIndex(e.seriesIndex),
  41991. i = this.visualMapModel;
  41992. if (i.isTargetSeries(n)) {
  41993. var r = n.getData(e.dataType),
  41994. o = r.getStore().get(i.getDataDimensionIndex(r), e.dataIndex);
  41995. isNaN(o) || this._showIndicator(o, o)
  41996. }
  41997. }
  41998. }, e.prototype._hideIndicator = function () {
  41999. var t = this._shapes;
  42000. t.indicator && t.indicator.attr("invisible", !0), t.indicatorLabel && t.indicatorLabel.attr("invisible", !0);
  42001. var e = this._shapes.handleLabels;
  42002. if (e)
  42003. for (var n = 0; n < e.length; n++) this._api.leaveBlur(e[n])
  42004. }, e.prototype._clearHoverLinkToSeries = function () {
  42005. this._hideIndicator();
  42006. var t = this._hoverLinkDataIndices;
  42007. this._dispatchHighDown("downplay", OF(t, this.visualMapModel)), t.length = 0
  42008. }, e.prototype._clearHoverLinkFromSeries = function () {
  42009. this._hideIndicator();
  42010. var t = this.api.getZr();
  42011. t.off("mouseover", this._hoverLinkFromSeriesMouseOver), t.off("mouseout", this._hideIndicator)
  42012. }, e.prototype._applyTransform = function (t, e, n, i) {
  42013. var r = Eh(e, i ? null : this.group);
  42014. return Y(t) ? zh(t, r, n) : Vh(t, r, n)
  42015. }, e.prototype._dispatchHighDown = function (t, e) {
  42016. e && e.length && this.api.dispatchAction({
  42017. type: t,
  42018. batch: e
  42019. })
  42020. }, e.prototype.dispose = function () {
  42021. this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries()
  42022. }, e.prototype.remove = function () {
  42023. this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries()
  42024. }, e.type = "visualMap.continuous", e
  42025. }(kF);
  42026. function BF(t, e, n, i) {
  42027. return new Wu({
  42028. shape: {
  42029. points: t
  42030. },
  42031. draggable: !!n,
  42032. cursor: e,
  42033. drift: n,
  42034. onmousemove: function (t) {
  42035. de(t.event)
  42036. },
  42037. ondragend: i
  42038. })
  42039. }
  42040. function FF(t) {
  42041. var e = t.get("hoverLinkOnHandle");
  42042. return !!(null == e ? t.get("realtime") : e)
  42043. }
  42044. function GF(t) {
  42045. return "vertical" === t ? "ns-resize" : "ew-resize"
  42046. }
  42047. var WF = {
  42048. type: "selectDataRange",
  42049. event: "dataRangeSelected",
  42050. update: "update"
  42051. },
  42052. HF = function (t, e) {
  42053. e.eachComponent({
  42054. mainType: "visualMap",
  42055. query: t
  42056. }, (function (e) {
  42057. e.setSelected(t.selected)
  42058. }))
  42059. },
  42060. YF = [{
  42061. createOnAllSeries: !0,
  42062. reset: function (t, e) {
  42063. var n = [];
  42064. return e.eachComponent("visualMap", (function (e) {
  42065. var i, r, o, a, s, l = t.pipelineContext;
  42066. !e.isTargetSeries(t) || l && l.large || n.push((i = e.stateList, r = e.targetVisuals, o = W(e.getValueState, e), a = e.getDataDimensionIndex(t.getData()), s = {}, E(i, (function (t) {
  42067. var e = _D.prepareVisualTypes(r[t]);
  42068. s[t] = e
  42069. })), {
  42070. progress: function (t, e) {
  42071. var n, i;
  42072. function l(t) {
  42073. return Iy(e, i, t)
  42074. }
  42075. function u(t, n) {
  42076. Cy(e, i, t, n)
  42077. }
  42078. null != a && (n = e.getDimensionIndex(a));
  42079. for (var h = e.getStore(); null != (i = t.next());) {
  42080. var c = e.getRawDataItem(i);
  42081. if (!c || !1 !== c.visualMap)
  42082. for (var p = null != a ? h.get(n, i) : i, d = o(p), f = r[d], g = s[d], y = 0, v = g.length; y < v; y++) {
  42083. var m = g[y];
  42084. f[m] && f[m].applyVisual(p, l, u)
  42085. }
  42086. }
  42087. }
  42088. }))
  42089. })), n
  42090. }
  42091. }, {
  42092. createOnAllSeries: !0,
  42093. reset: function (t, e) {
  42094. var n = t.getData(),
  42095. i = [];
  42096. e.eachComponent("visualMap", (function (e) {
  42097. if (e.isTargetSeries(t)) {
  42098. var r = e.getVisualMeta(W(XF, null, t, e)) || {
  42099. stops: [],
  42100. outerColors: []
  42101. },
  42102. o = e.getDataDimensionIndex(n);
  42103. o >= 0 && (r.dimension = o, i.push(r))
  42104. }
  42105. })), t.getData().setVisual("visualMeta", i)
  42106. }
  42107. }];
  42108. function XF(t, e, n, i) {
  42109. for (var r = e.targetVisuals[i], o = _D.prepareVisualTypes(r), a = {
  42110. color: Ty(t.getData(), "color")
  42111. }, s = 0, l = o.length; s < l; s++) {
  42112. var u = o[s],
  42113. h = r["opacity" === u ? "__alphaForOpacity" : u];
  42114. h && h.applyVisual(n, c, p)
  42115. }
  42116. return a.color;
  42117. function c(t) {
  42118. return a[t]
  42119. }
  42120. function p(t, e) {
  42121. a[t] = e
  42122. }
  42123. }
  42124. var UF = E;
  42125. function ZF(t) {
  42126. var e = t && t.visualMap;
  42127. Y(e) || (e = e ? [e] : []), UF(e, (function (t) {
  42128. if (t) {
  42129. jF(t, "splitList") && !jF(t, "pieces") && (t.pieces = t.splitList, delete t.splitList);
  42130. var e = t.pieces;
  42131. e && Y(e) && UF(e, (function (t) {
  42132. q(t) && (jF(t, "start") && !jF(t, "min") && (t.min = t.start), jF(t, "end") && !jF(t, "max") && (t.max = t.end))
  42133. }))
  42134. }
  42135. }))
  42136. }
  42137. function jF(t, e) {
  42138. return t && t.hasOwnProperty && t.hasOwnProperty(e)
  42139. }
  42140. var qF = !1;
  42141. function KF(t) {
  42142. qF || (qF = !0, t.registerSubTypeDefaulter("visualMap", (function (t) {
  42143. return t.categories || (t.pieces ? t.pieces.length > 0 : t.splitNumber > 0) && !t.calculable ? "piecewise" : "continuous"
  42144. })), t.registerAction(WF, HF), E(YF, (function (e) {
  42145. t.registerVisual(t.PRIORITY.VISUAL.COMPONENT, e)
  42146. })), t.registerPreprocessor(ZF))
  42147. }
  42148. function $F(t) {
  42149. t.registerComponentModel(DF), t.registerComponentView(VF), KF(t)
  42150. }
  42151. var JF = function (t) {
  42152. function e() {
  42153. var n = null !== t && t.apply(this, arguments) || this;
  42154. return n.type = e.type, n._pieceList = [], n
  42155. }
  42156. return n(e, t), e.prototype.optionUpdated = function (e, n) {
  42157. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
  42158. var i = this._mode = this._determineMode();
  42159. this._pieceList = [], QF[this._mode].call(this, this._pieceList), this._resetSelected(e, n);
  42160. var r = this.option.categories;
  42161. this.resetVisual((function (t, e) {
  42162. "categories" === i ? (t.mappingMethod = "category", t.categories = T(r)) : (t.dataExtent = this.getExtent(), t.mappingMethod = "piecewise", t.pieceList = z(this._pieceList, (function (t) {
  42163. return t = T(t), "inRange" !== e && (t.visual = null), t
  42164. })))
  42165. }))
  42166. }, e.prototype.completeVisualOption = function () {
  42167. var e = this.option,
  42168. n = {},
  42169. i = _D.listVisualTypes(),
  42170. r = this.isCategory();
  42171. function o(t, e, n) {
  42172. return t && t[e] && t[e].hasOwnProperty(n)
  42173. }
  42174. E(e.pieces, (function (t) {
  42175. E(i, (function (e) {
  42176. t.hasOwnProperty(e) && (n[e] = 1)
  42177. }))
  42178. })), E(n, (function (t, n) {
  42179. var i = !1;
  42180. E(this.stateList, (function (t) {
  42181. i = i || o(e, t, n) || o(e.target, t, n)
  42182. }), this), !i && E(this.stateList, (function (t) {
  42183. (e[t] || (e[t] = {}))[n] = mF(n, "inRange" === t ? "active" : "inactive", r)
  42184. }))
  42185. }), this), t.prototype.completeVisualOption.apply(this, arguments)
  42186. }, e.prototype._resetSelected = function (t, e) {
  42187. var n = this.option,
  42188. i = this._pieceList,
  42189. r = (e ? n : t).selected || {};
  42190. if (n.selected = r, E(i, (function (t, e) {
  42191. var n = this.getSelectedMapKey(t);
  42192. r.hasOwnProperty(n) || (r[n] = !0)
  42193. }), this), "single" === n.selectedMode) {
  42194. var o = !1;
  42195. E(i, (function (t, e) {
  42196. var n = this.getSelectedMapKey(t);
  42197. r[n] && (o ? r[n] = !1 : o = !0)
  42198. }), this)
  42199. }
  42200. }, e.prototype.getItemSymbol = function () {
  42201. return this.get("itemSymbol")
  42202. }, e.prototype.getSelectedMapKey = function (t) {
  42203. return "categories" === this._mode ? t.value + "" : t.index + ""
  42204. }, e.prototype.getPieceList = function () {
  42205. return this._pieceList
  42206. }, e.prototype._determineMode = function () {
  42207. var t = this.option;
  42208. return t.pieces && t.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber"
  42209. }, e.prototype.setSelected = function (t) {
  42210. this.option.selected = T(t)
  42211. }, e.prototype.getValueState = function (t) {
  42212. var e = _D.findPieceIndex(t, this._pieceList);
  42213. return null != e && this.option.selected[this.getSelectedMapKey(this._pieceList[e])] ? "inRange" : "outOfRange"
  42214. }, e.prototype.findTargetDataIndices = function (t) {
  42215. var e = [],
  42216. n = this._pieceList;
  42217. return this.eachTargetSeries((function (i) {
  42218. var r = [],
  42219. o = i.getData();
  42220. o.each(this.getDataDimensionIndex(o), (function (e, i) {
  42221. _D.findPieceIndex(e, n) === t && r.push(i)
  42222. }), this), e.push({
  42223. seriesId: i.id,
  42224. dataIndex: r
  42225. })
  42226. }), this), e
  42227. }, e.prototype.getRepresentValue = function (t) {
  42228. var e;
  42229. if (this.isCategory()) e = t.value;
  42230. else if (null != t.value) e = t.value;
  42231. else {
  42232. var n = t.interval || [];
  42233. e = n[0] === -1 / 0 && n[1] === 1 / 0 ? 0 : (n[0] + n[1]) / 2
  42234. }
  42235. return e
  42236. }, e.prototype.getVisualMeta = function (t) {
  42237. if (!this.isCategory()) {
  42238. var e = [],
  42239. n = ["", ""],
  42240. i = this,
  42241. r = this._pieceList.slice();
  42242. if (r.length) {
  42243. var o = r[0].interval[0];
  42244. o !== -1 / 0 && r.unshift({
  42245. interval: [-1 / 0, o]
  42246. }), (o = r[r.length - 1].interval[1]) !== 1 / 0 && r.push({
  42247. interval: [o, 1 / 0]
  42248. })
  42249. } else r.push({
  42250. interval: [-1 / 0, 1 / 0]
  42251. });
  42252. var a = -1 / 0;
  42253. return E(r, (function (t) {
  42254. var e = t.interval;
  42255. e && (e[0] > a && s([a, e[0]], "outOfRange"), s(e.slice()), a = e[1])
  42256. }), this), {
  42257. stops: e,
  42258. outerColors: n
  42259. }
  42260. }
  42261. function s(r, o) {
  42262. var a = i.getRepresentValue({
  42263. interval: r
  42264. });
  42265. o || (o = i.getValueState(a));
  42266. var s = t(a, o);
  42267. r[0] === -1 / 0 ? n[0] = s : r[1] === 1 / 0 ? n[1] = s : e.push({
  42268. value: r[0],
  42269. color: s
  42270. }, {
  42271. value: r[1],
  42272. color: s
  42273. })
  42274. }
  42275. }, e.type = "visualMap.piecewise", e.defaultOption = Cc(TF.defaultOption, {
  42276. selected: null,
  42277. minOpen: !1,
  42278. maxOpen: !1,
  42279. align: "auto",
  42280. itemWidth: 20,
  42281. itemHeight: 14,
  42282. itemSymbol: "roundRect",
  42283. pieces: null,
  42284. categories: null,
  42285. splitNumber: 5,
  42286. selectedMode: "multiple",
  42287. itemGap: 10,
  42288. hoverLink: !0
  42289. }), e
  42290. }(TF),
  42291. QF = {
  42292. splitNumber: function (t) {
  42293. var e = this.option,
  42294. n = Math.min(e.precision, 20),
  42295. i = this.getExtent(),
  42296. r = e.splitNumber;
  42297. r = Math.max(parseInt(r, 10), 1), e.splitNumber = r;
  42298. for (var o = (i[1] - i[0]) / r; + o.toFixed(n) !== o && n < 5;) n++;
  42299. e.precision = n, o = +o.toFixed(n), e.minOpen && t.push({
  42300. interval: [-1 / 0, i[0]],
  42301. close: [0, 0]
  42302. });
  42303. for (var a = 0, s = i[0]; a < r; s += o, a++) {
  42304. var l = a === r - 1 ? i[1] : s + o;
  42305. t.push({
  42306. interval: [s, l],
  42307. close: [1, 1]
  42308. })
  42309. }
  42310. e.maxOpen && t.push({
  42311. interval: [i[1], 1 / 0],
  42312. close: [0, 0]
  42313. }), uo(t), E(t, (function (t, e) {
  42314. t.index = e, t.text = this.formatValueText(t.interval)
  42315. }), this)
  42316. },
  42317. categories: function (t) {
  42318. var e = this.option;
  42319. E(e.categories, (function (e) {
  42320. t.push({
  42321. text: this.formatValueText(e, !0),
  42322. value: e
  42323. })
  42324. }), this), tG(e, t)
  42325. },
  42326. pieces: function (t) {
  42327. var e = this.option;
  42328. E(e.pieces, (function (e, n) {
  42329. q(e) || (e = {
  42330. value: e
  42331. });
  42332. var i = {
  42333. text: "",
  42334. index: n
  42335. };
  42336. if (null != e.label && (i.text = e.label), e.hasOwnProperty("value")) {
  42337. var r = i.value = e.value;
  42338. i.interval = [r, r], i.close = [1, 1]
  42339. } else {
  42340. for (var o = i.interval = [], a = i.close = [0, 0], s = [1, 0, 1], l = [-1 / 0, 1 / 0], u = [], h = 0; h < 2; h++) {
  42341. for (var c = [
  42342. ["gte", "gt", "min"],
  42343. ["lte", "lt", "max"]
  42344. ][h], p = 0; p < 3 && null == o[h]; p++) o[h] = e[c[p]], a[h] = s[p], u[h] = 2 === p;
  42345. null == o[h] && (o[h] = l[h])
  42346. }
  42347. u[0] && o[1] === 1 / 0 && (a[0] = 0), u[1] && o[0] === -1 / 0 && (a[1] = 0), o[0] === o[1] && a[0] && a[1] && (i.value = o[0])
  42348. }
  42349. i.visual = _D.retrieveVisuals(e), t.push(i)
  42350. }), this), tG(e, t), uo(t), E(t, (function (t) {
  42351. var e = t.close,
  42352. n = [
  42353. ["<", "≤"][e[1]],
  42354. [">", "≥"][e[0]]
  42355. ];
  42356. t.text = t.text || this.formatValueText(null != t.value ? t.value : t.interval, !1, n)
  42357. }), this)
  42358. }
  42359. };
  42360. function tG(t, e) {
  42361. var n = t.inverse;
  42362. ("vertical" === t.orient ? !n : n) && e.reverse()
  42363. }
  42364. var eG = function (t) {
  42365. function e() {
  42366. var n = null !== t && t.apply(this, arguments) || this;
  42367. return n.type = e.type, n
  42368. }
  42369. return n(e, t), e.prototype.doRender = function () {
  42370. var t = this.group;
  42371. t.removeAll();
  42372. var e = this.visualMapModel,
  42373. n = e.get("textGap"),
  42374. i = e.textStyleModel,
  42375. r = i.getFont(),
  42376. o = i.getTextColor(),
  42377. a = this._getItemAlign(),
  42378. s = e.itemSize,
  42379. l = this._getViewData(),
  42380. u = l.endsText,
  42381. h = it(e.get("showLabel", !0), !u);
  42382. u && this._renderEndsText(t, u[0], s, h, a), E(l.viewPieceList, (function (i) {
  42383. var l = i.piece,
  42384. u = new zr;
  42385. u.onclick = W(this._onItemClick, this, l), this._enableHoverLink(u, i.indexInModelPieceList);
  42386. var c = e.getRepresentValue(l);
  42387. if (this._createItemSymbol(u, c, [0, 0, s[0], s[1]]), h) {
  42388. var p = this.visualMapModel.getValueState(c);
  42389. u.add(new Fs({
  42390. style: {
  42391. x: "right" === a ? -n : s[0] + n,
  42392. y: s[1] / 2,
  42393. text: l.text,
  42394. verticalAlign: "middle",
  42395. align: a,
  42396. font: r,
  42397. fill: o,
  42398. opacity: "outOfRange" === p ? .5 : 1
  42399. }
  42400. }))
  42401. }
  42402. t.add(u)
  42403. }), this), u && this._renderEndsText(t, u[1], s, h, a), Tp(e.get("orient"), t, e.get("itemGap")), this.renderBackground(t), this.positionGroup(t)
  42404. }, e.prototype._enableHoverLink = function (t, e) {
  42405. var n = this;
  42406. t.on("mouseover", (function () {
  42407. return i("highlight")
  42408. })).on("mouseout", (function () {
  42409. return i("downplay")
  42410. }));
  42411. var i = function (t) {
  42412. var i = n.visualMapModel;
  42413. i.option.hoverLink && n.api.dispatchAction({
  42414. type: t,
  42415. batch: OF(i.findTargetDataIndices(e), i)
  42416. })
  42417. }
  42418. }, e.prototype._getItemAlign = function () {
  42419. var t = this.visualMapModel,
  42420. e = t.option;
  42421. if ("vertical" === e.orient) return PF(t, this.api, t.itemSize);
  42422. var n = e.align;
  42423. return n && "auto" !== n || (n = "left"), n
  42424. }, e.prototype._renderEndsText = function (t, e, n, i, r) {
  42425. if (e) {
  42426. var o = new zr,
  42427. a = this.visualMapModel.textStyleModel;
  42428. o.add(new Fs({
  42429. style: nc(a, {
  42430. x: i ? "right" === r ? n[0] : 0 : n[0] / 2,
  42431. y: n[1] / 2,
  42432. verticalAlign: "middle",
  42433. align: i ? r : "center",
  42434. text: e
  42435. })
  42436. })), t.add(o)
  42437. }
  42438. }, e.prototype._getViewData = function () {
  42439. var t = this.visualMapModel,
  42440. e = z(t.getPieceList(), (function (t, e) {
  42441. return {
  42442. piece: t,
  42443. indexInModelPieceList: e
  42444. }
  42445. })),
  42446. n = t.get("text"),
  42447. i = t.get("orient"),
  42448. r = t.get("inverse");
  42449. return ("horizontal" === i ? r : !r) ? e.reverse() : n && (n = n.slice().reverse()), {
  42450. viewPieceList: e,
  42451. endsText: n
  42452. }
  42453. }, e.prototype._createItemSymbol = function (t, e, n) {
  42454. t.add(Wy(this.getControllerVisual(e, "symbol"), n[0], n[1], n[2], n[3], this.getControllerVisual(e, "color")))
  42455. }, e.prototype._onItemClick = function (t) {
  42456. var e = this.visualMapModel,
  42457. n = e.option,
  42458. i = n.selectedMode;
  42459. if (i) {
  42460. var r = T(n.selected),
  42461. o = e.getSelectedMapKey(t);
  42462. "single" === i || !0 === i ? (r[o] = !0, E(r, (function (t, e) {
  42463. r[e] = e === o
  42464. }))) : r[o] = !r[o], this.api.dispatchAction({
  42465. type: "selectDataRange",
  42466. from: this.uid,
  42467. visualMapId: this.visualMapModel.id,
  42468. selected: r
  42469. })
  42470. }
  42471. }, e.type = "visualMap.piecewise", e
  42472. }(kF);
  42473. function nG(t) {
  42474. t.registerComponentModel(JF), t.registerComponentView(eG), KF(t)
  42475. }
  42476. var iG = {
  42477. label: {
  42478. enabled: !0
  42479. },
  42480. decal: {
  42481. show: !1
  42482. }
  42483. },
  42484. rG = Oo(),
  42485. oG = {};
  42486. function aG(t, e) {
  42487. var n = t.getModel("aria");
  42488. if (n.get("enabled")) {
  42489. var i = T(iG);
  42490. C(i.label, t.getLocaleModel().get("aria"), !1), C(n.option, i, !1),
  42491. function () {
  42492. if (n.getModel("decal").get("show")) {
  42493. var e = yt();
  42494. t.eachSeries((function (t) {
  42495. if (!t.isColorBySeries()) {
  42496. var n = e.get(t.type);
  42497. n || (n = {}, e.set(t.type, n)), rG(t).scope = n
  42498. }
  42499. })), t.eachRawSeries((function (e) {
  42500. if (!t.isSeriesFiltered(e))
  42501. if (X(e.enableAriaDecal)) e.enableAriaDecal();
  42502. else {
  42503. var n = e.getData();
  42504. if (e.isColorBySeries()) {
  42505. var i = ud(e.ecModel, e.name, oG, t.getSeriesCount()),
  42506. r = n.getVisual("decal");
  42507. n.setVisual("decal", u(r, i))
  42508. } else {
  42509. var o = e.getRawData(),
  42510. a = {},
  42511. s = rG(e).scope;
  42512. n.each((function (t) {
  42513. var e = n.getRawIndex(t);
  42514. a[e] = t
  42515. }));
  42516. var l = o.count();
  42517. o.each((function (t) {
  42518. var i = a[t],
  42519. r = o.getName(t) || t + "",
  42520. h = ud(e.ecModel, r, s, l),
  42521. c = n.getItemVisual(i, "decal");
  42522. n.setItemVisual(i, "decal", u(c, h))
  42523. }))
  42524. }
  42525. }
  42526. function u(t, e) {
  42527. var n = t ? A(A({}, e), t) : e;
  42528. return n.dirty = !0, n
  42529. }
  42530. }))
  42531. }
  42532. }(),
  42533. function () {
  42534. var i = t.getLocaleModel().get("aria"),
  42535. o = n.getModel("label");
  42536. if (o.option = k(o.option, i), !o.get("enabled")) return;
  42537. var a = e.getZr().dom;
  42538. if (o.get("description")) return void a.setAttribute("aria-label", o.get("description"));
  42539. var s, l = t.getSeriesCount(),
  42540. u = o.get(["data", "maxCount"]) || 10,
  42541. h = o.get(["series", "maxCount"]) || 10,
  42542. c = Math.min(l, h);
  42543. if (l < 1) return;
  42544. var p = function () {
  42545. var e = t.get("title");
  42546. e && e.length && (e = e[0]);
  42547. return e && e.text
  42548. }();
  42549. s = p ? r(o.get(["general", "withTitle"]), {
  42550. title: p
  42551. }) : o.get(["general", "withoutTitle"]);
  42552. var d = [];
  42553. s += r(l > 1 ? o.get(["series", "multiple", "prefix"]) : o.get(["series", "single", "prefix"]), {
  42554. seriesCount: l
  42555. }), t.eachSeries((function (e, n) {
  42556. if (n < c) {
  42557. var i = void 0,
  42558. a = e.get("name") ? "withName" : "withoutName";
  42559. i = r(i = l > 1 ? o.get(["series", "multiple", a]) : o.get(["series", "single", a]), {
  42560. seriesId: e.seriesIndex,
  42561. seriesName: e.get("name"),
  42562. seriesType: (x = e.subType, t.getLocaleModel().get(["series", "typeNames"])[x] || "自定义图")
  42563. });
  42564. var s = e.getData();
  42565. if (s.count() > u) i += r(o.get(["data", "partialData"]), {
  42566. displayCnt: u
  42567. });
  42568. else i += o.get(["data", "allData"]);
  42569. for (var h = o.get(["data", "separator", "middle"]), p = o.get(["data", "separator", "end"]), f = [], g = 0; g < s.count(); g++)
  42570. if (g < u) {
  42571. var y = s.getName(g),
  42572. v = s.getValues(g),
  42573. m = o.get(["data", y ? "withName" : "withoutName"]);
  42574. f.push(r(m, {
  42575. name: y,
  42576. value: v.join(h)
  42577. }))
  42578. } i += f.join(h) + p, d.push(i)
  42579. }
  42580. var x
  42581. }));
  42582. var f = o.getModel(["series", "multiple", "separator"]),
  42583. g = f.get("middle"),
  42584. y = f.get("end");
  42585. s += d.join(g) + y, a.setAttribute("aria-label", s)
  42586. }()
  42587. }
  42588. function r(t, e) {
  42589. if (!U(t)) return t;
  42590. var n = t;
  42591. return E(e, (function (t, e) {
  42592. n = n.replace(new RegExp("\\{\\s*" + e + "\\s*\\}", "g"), t)
  42593. })), n
  42594. }
  42595. }
  42596. function sG(t) {
  42597. if (t && t.aria) {
  42598. var e = t.aria;
  42599. null != e.show && (e.enabled = e.show), e.label = e.label || {}, E(["description", "general", "series", "data"], (function (t) {
  42600. null != e[t] && (e.label[t] = e[t])
  42601. }))
  42602. }
  42603. }
  42604. var lG = {
  42605. value: "eq",
  42606. "<": "lt",
  42607. "<=": "lte",
  42608. ">": "gt",
  42609. ">=": "gte",
  42610. "=": "eq",
  42611. "!=": "ne",
  42612. "<>": "ne"
  42613. },
  42614. uG = function () {
  42615. function t(t) {
  42616. if (null == (this._condVal = U(t) ? new RegExp(t) : et(t) ? t : null)) {
  42617. var e = "";
  42618. 0, vo(e)
  42619. }
  42620. }
  42621. return t.prototype.evaluate = function (t) {
  42622. var e = typeof t;
  42623. return U(e) ? this._condVal.test(t) : !!j(e) && this._condVal.test(t + "")
  42624. }, t
  42625. }(),
  42626. hG = function () {
  42627. function t() {}
  42628. return t.prototype.evaluate = function () {
  42629. return this.value
  42630. }, t
  42631. }(),
  42632. cG = function () {
  42633. function t() {}
  42634. return t.prototype.evaluate = function () {
  42635. for (var t = this.children, e = 0; e < t.length; e++)
  42636. if (!t[e].evaluate()) return !1;
  42637. return !0
  42638. }, t
  42639. }(),
  42640. pG = function () {
  42641. function t() {}
  42642. return t.prototype.evaluate = function () {
  42643. for (var t = this.children, e = 0; e < t.length; e++)
  42644. if (t[e].evaluate()) return !0;
  42645. return !1
  42646. }, t
  42647. }(),
  42648. dG = function () {
  42649. function t() {}
  42650. return t.prototype.evaluate = function () {
  42651. return !this.child.evaluate()
  42652. }, t
  42653. }(),
  42654. fG = function () {
  42655. function t() {}
  42656. return t.prototype.evaluate = function () {
  42657. for (var t = !!this.valueParser, e = (0, this.getValue)(this.valueGetterParam), n = t ? this.valueParser(e) : null, i = 0; i < this.subCondList.length; i++)
  42658. if (!this.subCondList[i].evaluate(t ? n : e)) return !1;
  42659. return !0
  42660. }, t
  42661. }();
  42662. function gG(t, e) {
  42663. if (!0 === t || !1 === t) {
  42664. var n = new hG;
  42665. return n.value = t, n
  42666. }
  42667. var i = "";
  42668. return vG(t) || vo(i), t.and ? yG("and", t, e) : t.or ? yG("or", t, e) : t.not ? function (t, e) {
  42669. var n = t.not,
  42670. i = "";
  42671. 0;
  42672. vG(n) || vo(i);
  42673. var r = new dG;
  42674. r.child = gG(n, e), r.child || vo(i);
  42675. return r
  42676. }(t, e) : function (t, e) {
  42677. for (var n = "", i = e.prepareGetValue(t), r = [], o = G(t), a = t.parser, s = a ? Mf(a) : null, l = 0; l < o.length; l++) {
  42678. var u = o[l];
  42679. if ("parser" !== u && !e.valueGetterAttrMap.get(u)) {
  42680. var h = _t(lG, u) ? lG[u] : u,
  42681. c = t[u],
  42682. p = s ? s(c) : c,
  42683. d = Af(h, p) || "reg" === h && new uG(p);
  42684. d || vo(n), r.push(d)
  42685. }
  42686. }
  42687. r.length || vo(n);
  42688. var f = new fG;
  42689. return f.valueGetterParam = i, f.valueParser = s, f.getValue = e.getValue, f.subCondList = r, f
  42690. }(t, e)
  42691. }
  42692. function yG(t, e, n) {
  42693. var i = e[t],
  42694. r = "";
  42695. Y(i) || vo(r), i.length || vo(r);
  42696. var o = "and" === t ? new cG : new pG;
  42697. return o.children = z(i, (function (t) {
  42698. return gG(t, n)
  42699. })), o.children.length || vo(r), o
  42700. }
  42701. function vG(t) {
  42702. return q(t) && !N(t)
  42703. }
  42704. var mG = function () {
  42705. function t(t, e) {
  42706. this._cond = gG(t, e)
  42707. }
  42708. return t.prototype.evaluate = function () {
  42709. return this._cond.evaluate()
  42710. }, t
  42711. }();
  42712. var xG = {
  42713. type: "echarts:filter",
  42714. transform: function (t) {
  42715. for (var e, n, i, r = t.upstream, o = (n = t.config, i = {
  42716. valueGetterAttrMap: yt({
  42717. dimension: !0
  42718. }),
  42719. prepareGetValue: function (t) {
  42720. var e = "",
  42721. n = t.dimension;
  42722. _t(t, "dimension") || vo(e);
  42723. var i = r.getDimensionInfo(n);
  42724. return i || vo(e), {
  42725. dimIdx: i.index
  42726. }
  42727. },
  42728. getValue: function (t) {
  42729. return r.retrieveValueFromItem(e, t.dimIdx)
  42730. }
  42731. }, new mG(n, i)), a = [], s = 0, l = r.count(); s < l; s++) e = r.getRawDataItem(s), o.evaluate() && a.push(e);
  42732. return {
  42733. data: a
  42734. }
  42735. }
  42736. };
  42737. var _G = {
  42738. type: "echarts:sort",
  42739. transform: function (t) {
  42740. var e = t.upstream,
  42741. n = t.config,
  42742. i = "",
  42743. r = bo(n);
  42744. r.length || vo(i);
  42745. var o = [];
  42746. E(r, (function (t) {
  42747. var n = t.dimension,
  42748. r = t.order,
  42749. a = t.parser,
  42750. s = t.incomparable;
  42751. if (null == n && vo(i), "asc" !== r && "desc" !== r && vo(i), s && "min" !== s && "max" !== s) {
  42752. var l = "";
  42753. 0, vo(l)
  42754. }
  42755. if ("asc" !== r && "desc" !== r) {
  42756. var u = "";
  42757. 0, vo(u)
  42758. }
  42759. var h = e.getDimensionInfo(n);
  42760. h || vo(i);
  42761. var c = a ? Mf(a) : null;
  42762. a && !c && vo(i), o.push({
  42763. dimIdx: h.index,
  42764. parser: c,
  42765. comparator: new Cf(r, s)
  42766. })
  42767. }));
  42768. var a = e.sourceFormat;
  42769. a !== Fp && a !== Gp && vo(i);
  42770. for (var s = [], l = 0, u = e.count(); l < u; l++) s.push(e.getRawDataItem(l));
  42771. return s.sort((function (t, n) {
  42772. for (var i = 0; i < o.length; i++) {
  42773. var r = o[i],
  42774. a = e.retrieveValueFromItem(t, r.dimIdx),
  42775. s = e.retrieveValueFromItem(n, r.dimIdx);
  42776. r.parser && (a = r.parser(a), s = r.parser(s));
  42777. var l = r.comparator.evaluate(a, s);
  42778. if (0 !== l) return l
  42779. }
  42780. return 0
  42781. })), {
  42782. data: s
  42783. }
  42784. }
  42785. };
  42786. var bG = function (t) {
  42787. function e() {
  42788. var e = null !== t && t.apply(this, arguments) || this;
  42789. return e.type = "dataset", e
  42790. }
  42791. return n(e, t), e.prototype.init = function (e, n, i) {
  42792. t.prototype.init.call(this, e, n, i), this._sourceManager = new jf(this), qf(this)
  42793. }, e.prototype.mergeOption = function (e, n) {
  42794. t.prototype.mergeOption.call(this, e, n), qf(this)
  42795. }, e.prototype.optionUpdated = function () {
  42796. this._sourceManager.dirty()
  42797. }, e.prototype.getSourceManager = function () {
  42798. return this._sourceManager
  42799. }, e.type = "dataset", e.defaultOption = {
  42800. seriesLayoutBy: Xp
  42801. }, e
  42802. }(Rp),
  42803. wG = function (t) {
  42804. function e() {
  42805. var e = null !== t && t.apply(this, arguments) || this;
  42806. return e.type = "dataset", e
  42807. }
  42808. return n(e, t), e.type = "dataset", e
  42809. }(Tg);
  42810. var SG = os.CMD;
  42811. function MG(t, e) {
  42812. return Math.abs(t - e) < 1e-5
  42813. }
  42814. function IG(t) {
  42815. var e, n, i, r, o, a = t.data,
  42816. s = t.len(),
  42817. l = [],
  42818. u = 0,
  42819. h = 0,
  42820. c = 0,
  42821. p = 0;
  42822. function d(t, n) {
  42823. e && e.length > 2 && l.push(e), e = [t, n]
  42824. }
  42825. function f(t, n, i, r) {
  42826. MG(t, i) && MG(n, r) || e.push(t, n, i, r, i, r)
  42827. }
  42828. function g(t, n, i, r, o, a) {
  42829. var s = Math.abs(n - t),
  42830. l = 4 * Math.tan(s / 4) / 3,
  42831. u = n < t ? -1 : 1,
  42832. h = Math.cos(t),
  42833. c = Math.sin(t),
  42834. p = Math.cos(n),
  42835. d = Math.sin(n),
  42836. f = h * o + i,
  42837. g = c * a + r,
  42838. y = p * o + i,
  42839. v = d * a + r,
  42840. m = o * l * u,
  42841. x = a * l * u;
  42842. e.push(f - m * c, g + x * h, y + m * d, v - x * p, y, v)
  42843. }
  42844. for (var y = 0; y < s;) {
  42845. var v = a[y++],
  42846. m = 1 === y;
  42847. switch (m && (c = u = a[y], p = h = a[y + 1], v !== SG.L && v !== SG.C && v !== SG.Q || (e = [c, p])), v) {
  42848. case SG.M:
  42849. u = c = a[y++], h = p = a[y++], d(c, p);
  42850. break;
  42851. case SG.L:
  42852. f(u, h, n = a[y++], i = a[y++]), u = n, h = i;
  42853. break;
  42854. case SG.C:
  42855. e.push(a[y++], a[y++], a[y++], a[y++], u = a[y++], h = a[y++]);
  42856. break;
  42857. case SG.Q:
  42858. n = a[y++], i = a[y++], r = a[y++], o = a[y++], e.push(u + 2 / 3 * (n - u), h + 2 / 3 * (i - h), r + 2 / 3 * (n - r), o + 2 / 3 * (i - o), r, o), u = r, h = o;
  42859. break;
  42860. case SG.A:
  42861. var x = a[y++],
  42862. _ = a[y++],
  42863. b = a[y++],
  42864. w = a[y++],
  42865. S = a[y++],
  42866. M = a[y++] + S;
  42867. y += 1;
  42868. var I = !a[y++];
  42869. n = Math.cos(S) * b + x, i = Math.sin(S) * w + _, m ? d(c = n, p = i) : f(u, h, n, i), u = Math.cos(M) * b + x, h = Math.sin(M) * w + _;
  42870. for (var T = (I ? -1 : 1) * Math.PI / 2, C = S; I ? C > M : C < M; C += T) {
  42871. g(C, I ? Math.max(C + T, M) : Math.min(C + T, M), x, _, b, w)
  42872. }
  42873. break;
  42874. case SG.R:
  42875. c = u = a[y++], p = h = a[y++], n = c + a[y++], i = p + a[y++], d(n, p), f(n, p, n, i), f(n, i, c, i), f(c, i, c, p), f(c, p, n, p);
  42876. break;
  42877. case SG.Z:
  42878. e && f(u, h, c, p), u = c, h = p
  42879. }
  42880. }
  42881. return e && e.length > 2 && l.push(e), l
  42882. }
  42883. function TG(t, e, n, i, r, o, a, s, l, u) {
  42884. if (MG(t, n) && MG(e, i) && MG(r, a) && MG(o, s)) l.push(a, s);
  42885. else {
  42886. var h = 2 / u,
  42887. c = h * h,
  42888. p = a - t,
  42889. d = s - e,
  42890. f = Math.sqrt(p * p + d * d);
  42891. p /= f, d /= f;
  42892. var g = n - t,
  42893. y = i - e,
  42894. v = r - a,
  42895. m = o - s,
  42896. x = g * g + y * y,
  42897. _ = v * v + m * m;
  42898. if (x < c && _ < c) l.push(a, s);
  42899. else {
  42900. var b = p * g + d * y,
  42901. w = -p * v - d * m;
  42902. if (x - b * b < c && b >= 0 && _ - w * w < c && w >= 0) l.push(a, s);
  42903. else {
  42904. var S = [],
  42905. M = [];
  42906. wn(t, n, r, a, .5, S), wn(e, i, o, s, .5, M), TG(S[0], M[0], S[1], M[1], S[2], M[2], S[3], M[3], l, u), TG(S[4], M[4], S[5], M[5], S[6], M[6], S[7], M[7], l, u)
  42907. }
  42908. }
  42909. }
  42910. }
  42911. function CG(t, e, n) {
  42912. var i = t[e],
  42913. r = t[1 - e],
  42914. o = Math.abs(i / r),
  42915. a = Math.ceil(Math.sqrt(o * n)),
  42916. s = Math.floor(n / a);
  42917. 0 === s && (s = 1, a = n);
  42918. for (var l = [], u = 0; u < a; u++) l.push(s);
  42919. var h = n - a * s;
  42920. if (h > 0)
  42921. for (u = 0; u < h; u++) l[u % a] += 1;
  42922. return l
  42923. }
  42924. function DG(t, e, n) {
  42925. for (var i = t.r0, r = t.r, o = t.startAngle, a = t.endAngle, s = Math.abs(a - o), l = s * r, u = r - i, h = l > Math.abs(u), c = CG([l, u], h ? 0 : 1, e), p = (h ? s : u) / c.length, d = 0; d < c.length; d++)
  42926. for (var f = (h ? u : s) / c[d], g = 0; g < c[d]; g++) {
  42927. var y = {};
  42928. h ? (y.startAngle = o + p * d, y.endAngle = o + p * (d + 1), y.r0 = i + f * g, y.r = i + f * (g + 1)) : (y.startAngle = o + f * g, y.endAngle = o + f * (g + 1), y.r0 = i + p * d, y.r = i + p * (d + 1)), y.clockwise = t.clockwise, y.cx = t.cx, y.cy = t.cy, n.push(y)
  42929. }
  42930. }
  42931. function AG(t, e, n, i) {
  42932. return t * i - n * e
  42933. }
  42934. function kG(t, e, n, i, r, o, a, s) {
  42935. var l = n - t,
  42936. u = i - e,
  42937. h = a - r,
  42938. c = s - o,
  42939. p = AG(h, c, l, u);
  42940. if (Math.abs(p) < 1e-6) return null;
  42941. var d = AG(t - r, e - o, h, c) / p;
  42942. return d < 0 || d > 1 ? null : new De(d * l + t, d * u + e)
  42943. }
  42944. function LG(t, e, n) {
  42945. var i = new De;
  42946. De.sub(i, n, e), i.normalize();
  42947. var r = new De;
  42948. return De.sub(r, t, e), r.dot(i)
  42949. }
  42950. function PG(t, e) {
  42951. var n = t[t.length - 1];
  42952. n && n[0] === e[0] && n[1] === e[1] || t.push(e)
  42953. }
  42954. function OG(t) {
  42955. var e = t.points,
  42956. n = [],
  42957. i = [];
  42958. Ra(e, n, i);
  42959. var r = new ze(n[0], n[1], i[0] - n[0], i[1] - n[1]),
  42960. o = r.width,
  42961. a = r.height,
  42962. s = r.x,
  42963. l = r.y,
  42964. u = new De,
  42965. h = new De;
  42966. return o > a ? (u.x = h.x = s + o / 2, u.y = l, h.y = l + a) : (u.y = h.y = l + a / 2, u.x = s, h.x = s + o),
  42967. function (t, e, n) {
  42968. for (var i = t.length, r = [], o = 0; o < i; o++) {
  42969. var a = t[o],
  42970. s = t[(o + 1) % i],
  42971. l = kG(a[0], a[1], s[0], s[1], e.x, e.y, n.x, n.y);
  42972. l && r.push({
  42973. projPt: LG(l, e, n),
  42974. pt: l,
  42975. idx: o
  42976. })
  42977. }
  42978. if (r.length < 2) return [{
  42979. points: t
  42980. }, {
  42981. points: t
  42982. }];
  42983. r.sort((function (t, e) {
  42984. return t.projPt - e.projPt
  42985. }));
  42986. var u = r[0],
  42987. h = r[r.length - 1];
  42988. if (h.idx < u.idx) {
  42989. var c = u;
  42990. u = h, h = c
  42991. }
  42992. var p = [u.pt.x, u.pt.y],
  42993. d = [h.pt.x, h.pt.y],
  42994. f = [p],
  42995. g = [d];
  42996. for (o = u.idx + 1; o <= h.idx; o++) PG(f, t[o].slice());
  42997. for (PG(f, d), PG(f, p), o = h.idx + 1; o <= u.idx + i; o++) PG(g, t[o % i].slice());
  42998. return PG(g, p), PG(g, d), [{
  42999. points: f
  43000. }, {
  43001. points: g
  43002. }]
  43003. }(e, u, h)
  43004. }
  43005. function RG(t, e, n, i) {
  43006. if (1 === n) i.push(e);
  43007. else {
  43008. var r = Math.floor(n / 2),
  43009. o = t(e);
  43010. RG(t, o[0], r, i), RG(t, o[1], n - r, i)
  43011. }
  43012. return i
  43013. }
  43014. function NG(t, e) {
  43015. e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel
  43016. }
  43017. function EG(t, e) {
  43018. var n, i = [],
  43019. r = t.shape;
  43020. switch (t.type) {
  43021. case "rect":
  43022. ! function (t, e, n) {
  43023. for (var i = t.width, r = t.height, o = i > r, a = CG([i, r], o ? 0 : 1, e), s = o ? "width" : "height", l = o ? "height" : "width", u = o ? "x" : "y", h = o ? "y" : "x", c = t[s] / a.length, p = 0; p < a.length; p++)
  43024. for (var d = t[l] / a[p], f = 0; f < a[p]; f++) {
  43025. var g = {};
  43026. g[u] = p * c, g[h] = f * d, g[s] = c, g[l] = d, g.x += t.x, g.y += t.y, n.push(g)
  43027. }
  43028. }(r, e, i), n = zs;
  43029. break;
  43030. case "sector":
  43031. DG(r, e, i), n = zu;
  43032. break;
  43033. case "circle":
  43034. DG({
  43035. r0: 0,
  43036. r: r.r,
  43037. startAngle: 0,
  43038. endAngle: 2 * Math.PI,
  43039. cx: r.cx,
  43040. cy: r.cy
  43041. }, e, i), n = zu;
  43042. break;
  43043. default:
  43044. var o = t.getComputedTransform(),
  43045. a = o ? Math.sqrt(Math.max(o[0] * o[0] + o[1] * o[1], o[2] * o[2] + o[3] * o[3])) : 1,
  43046. s = z(function (t, e) {
  43047. var n = IG(t),
  43048. i = [];
  43049. e = e || 1;
  43050. for (var r = 0; r < n.length; r++) {
  43051. var o = n[r],
  43052. a = [],
  43053. s = o[0],
  43054. l = o[1];
  43055. a.push(s, l);
  43056. for (var u = 2; u < o.length;) {
  43057. var h = o[u++],
  43058. c = o[u++],
  43059. p = o[u++],
  43060. d = o[u++],
  43061. f = o[u++],
  43062. g = o[u++];
  43063. TG(s, l, h, c, p, d, f, g, a, e), s = f, l = g
  43064. }
  43065. i.push(a)
  43066. }
  43067. return i
  43068. }(t.getUpdatedPathProxy(), a), (function (t) {
  43069. return function (t) {
  43070. for (var e = [], n = 0; n < t.length;) e.push([t[n++], t[n++]]);
  43071. return e
  43072. }(t)
  43073. })),
  43074. l = s.length;
  43075. if (0 === l) RG(OG, {
  43076. points: s[0]
  43077. }, e, i);
  43078. else if (l === e)
  43079. for (var u = 0; u < l; u++) i.push({
  43080. points: s[u]
  43081. });
  43082. else {
  43083. var h = 0,
  43084. c = z(s, (function (t) {
  43085. var e = [],
  43086. n = [];
  43087. Ra(t, e, n);
  43088. var i = (n[1] - e[1]) * (n[0] - e[0]);
  43089. return h += i, {
  43090. poly: t,
  43091. area: i
  43092. }
  43093. }));
  43094. c.sort((function (t, e) {
  43095. return e.area - t.area
  43096. }));
  43097. var p = e;
  43098. for (u = 0; u < l; u++) {
  43099. var d = c[u];
  43100. if (p <= 0) break;
  43101. var f = u === l - 1 ? p : Math.ceil(d.area / h * e);
  43102. f < 0 || (RG(OG, {
  43103. points: d.poly
  43104. }, f, i), p -= f)
  43105. }
  43106. }
  43107. n = Wu
  43108. }
  43109. if (!n) return function (t, e) {
  43110. for (var n = [], i = 0; i < e; i++) n.push(mu(t));
  43111. return n
  43112. }(t, e);
  43113. var g = [];
  43114. for (u = 0; u < i.length; u++) {
  43115. var y = new n;
  43116. y.setShape(i[u]), NG(t, y), g.push(y)
  43117. }
  43118. return g
  43119. }
  43120. function zG(t, e) {
  43121. var n = t.length,
  43122. i = e.length;
  43123. if (n === i) return [t, e];
  43124. for (var r = [], o = [], a = n < i ? t : e, s = Math.min(n, i), l = Math.abs(i - n) / 6, u = (s - 2) / 6, h = Math.ceil(l / u) + 1, c = [a[0], a[1]], p = l, d = 2; d < s;) {
  43125. var f = a[d - 2],
  43126. g = a[d - 1],
  43127. y = a[d++],
  43128. v = a[d++],
  43129. m = a[d++],
  43130. x = a[d++],
  43131. _ = a[d++],
  43132. b = a[d++];
  43133. if (p <= 0) c.push(y, v, m, x, _, b);
  43134. else {
  43135. for (var w = Math.min(p, h - 1) + 1, S = 1; S <= w; S++) {
  43136. var M = S / w;
  43137. wn(f, y, m, _, M, r), wn(g, v, x, b, M, o), f = r[3], g = o[3], c.push(r[1], o[1], r[2], o[2], f, g), y = r[5], v = o[5], m = r[6], x = o[6]
  43138. }
  43139. p -= w - 1
  43140. }
  43141. }
  43142. return a === t ? [c, e] : [t, c]
  43143. }
  43144. function VG(t, e) {
  43145. for (var n = t.length, i = t[n - 2], r = t[n - 1], o = [], a = 0; a < e.length;) o[a++] = i, o[a++] = r;
  43146. return o
  43147. }
  43148. function BG(t) {
  43149. for (var e = 0, n = 0, i = 0, r = t.length, o = 0, a = r - 2; o < r; a = o, o += 2) {
  43150. var s = t[a],
  43151. l = t[a + 1],
  43152. u = t[o],
  43153. h = t[o + 1],
  43154. c = s * h - u * l;
  43155. e += c, n += (s + u) * c, i += (l + h) * c
  43156. }
  43157. return 0 === e ? [t[0] || 0, t[1] || 0] : [n / e / 3, i / e / 3, e]
  43158. }
  43159. function FG(t, e, n, i) {
  43160. for (var r = (t.length - 2) / 6, o = 1 / 0, a = 0, s = t.length, l = s - 2, u = 0; u < r; u++) {
  43161. for (var h = 6 * u, c = 0, p = 0; p < s; p += 2) {
  43162. var d = 0 === p ? h : (h + p - 2) % l + 2,
  43163. f = t[d] - n[0],
  43164. g = t[d + 1] - n[1],
  43165. y = e[p] - i[0] - f,
  43166. v = e[p + 1] - i[1] - g;
  43167. c += y * y + v * v
  43168. }
  43169. c < o && (o = c, a = u)
  43170. }
  43171. return a
  43172. }
  43173. function GG(t) {
  43174. for (var e = [], n = t.length, i = 0; i < n; i += 2) e[i] = t[n - i - 2], e[i + 1] = t[n - i - 1];
  43175. return e
  43176. }
  43177. function WG(t) {
  43178. return t.__isCombineMorphing
  43179. }
  43180. var HG = "__mOriginal_";
  43181. function YG(t, e, n) {
  43182. var i = HG + e,
  43183. r = t[i] || t[e];
  43184. t[i] || (t[i] = t[e]);
  43185. var o = n.replace,
  43186. a = n.after,
  43187. s = n.before;
  43188. t[e] = function () {
  43189. var t, e = arguments;
  43190. return s && s.apply(this, e), t = o ? o.apply(this, e) : r.apply(this, e), a && a.apply(this, e), t
  43191. }
  43192. }
  43193. function XG(t, e) {
  43194. var n = HG + e;
  43195. t[n] && (t[e] = t[n], t[n] = null)
  43196. }
  43197. function UG(t, e) {
  43198. for (var n = 0; n < t.length; n++)
  43199. for (var i = t[n], r = 0; r < i.length;) {
  43200. var o = i[r],
  43201. a = i[r + 1];
  43202. i[r++] = e[0] * o + e[2] * a + e[4], i[r++] = e[1] * o + e[3] * a + e[5]
  43203. }
  43204. }
  43205. function ZG(t, e) {
  43206. var n = t.getUpdatedPathProxy(),
  43207. i = e.getUpdatedPathProxy(),
  43208. r = function (t, e) {
  43209. for (var n, i, r, o = [], a = [], s = 0; s < Math.max(t.length, e.length); s++) {
  43210. var l = t[s],
  43211. u = e[s],
  43212. h = void 0,
  43213. c = void 0;
  43214. l ? u ? (i = h = (n = zG(l, u))[0], r = c = n[1]) : (c = VG(r || l, l), h = l) : (h = VG(i || u, u), c = u), o.push(h), a.push(c)
  43215. }
  43216. return [o, a]
  43217. }(IG(n), IG(i)),
  43218. o = r[0],
  43219. a = r[1],
  43220. s = t.getComputedTransform(),
  43221. l = e.getComputedTransform();
  43222. s && UG(o, s), l && UG(a, l), YG(e, "updateTransform", {
  43223. replace: function () {
  43224. this.transform = null
  43225. }
  43226. }), e.transform = null;
  43227. var u = function (t, e, n, i) {
  43228. for (var r, o = [], a = 0; a < t.length; a++) {
  43229. var s = t[a],
  43230. l = e[a],
  43231. u = BG(s),
  43232. h = BG(l);
  43233. null == r && (r = u[2] < 0 != h[2] < 0);
  43234. var c = [],
  43235. p = [],
  43236. d = 0,
  43237. f = 1 / 0,
  43238. g = [],
  43239. y = s.length;
  43240. r && (s = GG(s));
  43241. for (var v = 6 * FG(s, l, u, h), m = y - 2, x = 0; x < m; x += 2) {
  43242. var _ = (v + x) % m + 2;
  43243. c[x + 2] = s[_] - u[0], c[x + 3] = s[_ + 1] - u[1]
  43244. }
  43245. if (c[0] = s[v] - u[0], c[1] = s[v + 1] - u[1], n > 0)
  43246. for (var b = i / n, w = -i / 2; w <= i / 2; w += b) {
  43247. var S = Math.sin(w),
  43248. M = Math.cos(w),
  43249. I = 0;
  43250. for (x = 0; x < s.length; x += 2) {
  43251. var T = c[x],
  43252. C = c[x + 1],
  43253. D = l[x] - h[0],
  43254. A = l[x + 1] - h[1],
  43255. k = D * M - A * S,
  43256. L = D * S + A * M;
  43257. g[x] = k, g[x + 1] = L;
  43258. var P = k - T,
  43259. O = L - C;
  43260. I += P * P + O * O
  43261. }
  43262. if (I < f) {
  43263. f = I, d = w;
  43264. for (var R = 0; R < g.length; R++) p[R] = g[R]
  43265. }
  43266. } else
  43267. for (var N = 0; N < y; N += 2) p[N] = l[N] - h[0], p[N + 1] = l[N + 1] - h[1];
  43268. o.push({
  43269. from: c,
  43270. to: p,
  43271. fromCp: u,
  43272. toCp: h,
  43273. rotation: -d
  43274. })
  43275. }
  43276. return o
  43277. }(o, a, 10, Math.PI),
  43278. h = [];
  43279. YG(e, "buildPath", {
  43280. replace: function (t) {
  43281. for (var n = e.__morphT, i = 1 - n, r = [], o = 0; o < u.length; o++) {
  43282. var a = u[o],
  43283. s = a.from,
  43284. l = a.to,
  43285. c = a.rotation * n,
  43286. p = a.fromCp,
  43287. d = a.toCp,
  43288. f = Math.sin(c),
  43289. g = Math.cos(c);
  43290. Gt(r, p, d, n);
  43291. for (var y = 0; y < s.length; y += 2) {
  43292. var v = s[y],
  43293. m = s[y + 1],
  43294. x = v * i + (S = l[y]) * n,
  43295. _ = m * i + (M = l[y + 1]) * n;
  43296. h[y] = x * g - _ * f + r[0], h[y + 1] = x * f + _ * g + r[1]
  43297. }
  43298. var b = h[0],
  43299. w = h[1];
  43300. t.moveTo(b, w);
  43301. for (y = 2; y < s.length;) {
  43302. var S = h[y++],
  43303. M = h[y++],
  43304. I = h[y++],
  43305. T = h[y++],
  43306. C = h[y++],
  43307. D = h[y++];
  43308. b === S && w === M && I === C && T === D ? t.lineTo(C, D) : t.bezierCurveTo(S, M, I, T, C, D), b = C, w = D
  43309. }
  43310. }
  43311. }
  43312. })
  43313. }
  43314. function jG(t, e, n) {
  43315. if (!t || !e) return e;
  43316. var i = n.done,
  43317. r = n.during;
  43318. return ZG(t, e), e.__morphT = 0, e.animateTo({
  43319. __morphT: 1
  43320. }, k({
  43321. during: function (t) {
  43322. e.dirtyShape(), r && r(t)
  43323. },
  43324. done: function () {
  43325. XG(e, "buildPath"), XG(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape(), i && i()
  43326. }
  43327. }, n)), e
  43328. }
  43329. function qG(t, e, n, i, r, o) {
  43330. t = r === n ? 0 : Math.round(32767 * (t - n) / (r - n)), e = o === i ? 0 : Math.round(32767 * (e - i) / (o - i));
  43331. for (var a, s = 0, l = 32768; l > 0; l /= 2) {
  43332. var u = 0,
  43333. h = 0;
  43334. (t & l) > 0 && (u = 1), (e & l) > 0 && (h = 1), s += l * l * (3 * u ^ h), 0 === h && (1 === u && (t = l - 1 - t, e = l - 1 - e), a = t, t = e, e = a)
  43335. }
  43336. return s
  43337. }
  43338. function KG(t) {
  43339. var e = 1 / 0,
  43340. n = 1 / 0,
  43341. i = -1 / 0,
  43342. r = -1 / 0,
  43343. o = z(t, (function (t) {
  43344. var o = t.getBoundingRect(),
  43345. a = t.getComputedTransform(),
  43346. s = o.x + o.width / 2 + (a ? a[4] : 0),
  43347. l = o.y + o.height / 2 + (a ? a[5] : 0);
  43348. return e = Math.min(s, e), n = Math.min(l, n), i = Math.max(s, i), r = Math.max(l, r), [s, l]
  43349. }));
  43350. return z(o, (function (o, a) {
  43351. return {
  43352. cp: o,
  43353. z: qG(o[0], o[1], e, n, i, r),
  43354. path: t[a]
  43355. }
  43356. })).sort((function (t, e) {
  43357. return t.z - e.z
  43358. })).map((function (t) {
  43359. return t.path
  43360. }))
  43361. }
  43362. function $G(t) {
  43363. return EG(t.path, t.count)
  43364. }
  43365. function JG(t) {
  43366. return Y(t[0])
  43367. }
  43368. function QG(t, e) {
  43369. for (var n = [], i = t.length, r = 0; r < i; r++) n.push({
  43370. one: t[r],
  43371. many: []
  43372. });
  43373. for (r = 0; r < e.length; r++) {
  43374. var o = e[r].length,
  43375. a = void 0;
  43376. for (a = 0; a < o; a++) n[a % i].many.push(e[r][a])
  43377. }
  43378. var s = 0;
  43379. for (r = i - 1; r >= 0; r--)
  43380. if (!n[r].many.length) {
  43381. var l = n[s].many;
  43382. if (l.length <= 1) {
  43383. if (!s) return n;
  43384. s = 0
  43385. }
  43386. o = l.length;
  43387. var u = Math.ceil(o / 2);
  43388. n[r].many = l.slice(u, o), n[s].many = l.slice(0, u), s++
  43389. } return n
  43390. }
  43391. var tW = {
  43392. clone: function (t) {
  43393. for (var e = [], n = 1 - Math.pow(1 - t.path.style.opacity, 1 / t.count), i = 0; i < t.count; i++) {
  43394. var r = mu(t.path);
  43395. r.setStyle("opacity", n), e.push(r)
  43396. }
  43397. return e
  43398. },
  43399. split: null
  43400. };
  43401. function eW(t, e, n, i, r, o) {
  43402. if (t.length && e.length) {
  43403. var a = ph("update", i, r);
  43404. if (a && a.duration > 0) {
  43405. var s, l, u = i.getModel("universalTransition").get("delay"),
  43406. h = Object.assign({
  43407. setToFinal: !0
  43408. }, a);
  43409. JG(t) && (s = t, l = e), JG(e) && (s = e, l = t);
  43410. for (var c = s ? s === t : t.length > e.length, p = s ? QG(l, s) : QG(c ? e : t, [c ? t : e]), d = 0, f = 0; f < p.length; f++) d += p[f].many.length;
  43411. var g = 0;
  43412. for (f = 0; f < p.length; f++) y(p[f], c, g, d), g += p[f].many.length
  43413. }
  43414. }
  43415. function y(t, e, i, r, a) {
  43416. var s = t.many,
  43417. l = t.one;
  43418. if (1 !== s.length || a)
  43419. for (var c = k({
  43420. dividePath: tW[n],
  43421. individualDelay: u && function (t, e, n, o) {
  43422. return u(t + i, r)
  43423. }
  43424. }, h), p = e ? function (t, e, n) {
  43425. var i = [];
  43426. ! function t(e) {
  43427. for (var n = 0; n < e.length; n++) {
  43428. var r = e[n];
  43429. WG(r) ? t(r.childrenRef()) : r instanceof Is && i.push(r)
  43430. }
  43431. }(t);
  43432. var r = i.length;
  43433. if (!r) return {
  43434. fromIndividuals: [],
  43435. toIndividuals: [],
  43436. count: 0
  43437. };
  43438. var o = (n.dividePath || $G)({
  43439. path: e,
  43440. count: r
  43441. });
  43442. if (o.length !== r) return console.error("Invalid morphing: unmatched splitted path"), {
  43443. fromIndividuals: [],
  43444. toIndividuals: [],
  43445. count: 0
  43446. };
  43447. i = KG(i), o = KG(o);
  43448. for (var a = n.done, s = n.during, l = n.individualDelay, u = new gr, h = 0; h < r; h++) {
  43449. var c = i[h],
  43450. p = o[h];
  43451. p.parent = e, p.copyTransform(u), l || ZG(c, p)
  43452. }
  43453. function d(t) {
  43454. for (var e = 0; e < o.length; e++) o[e].addSelfToZr(t)
  43455. }
  43456. function f() {
  43457. e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, XG(e, "addSelfToZr"), XG(e, "removeSelfFromZr")
  43458. }
  43459. e.__isCombineMorphing = !0, e.childrenRef = function () {
  43460. return o
  43461. }, YG(e, "addSelfToZr", {
  43462. after: function (t) {
  43463. d(t)
  43464. }
  43465. }), YG(e, "removeSelfFromZr", {
  43466. after: function (t) {
  43467. for (var e = 0; e < o.length; e++) o[e].removeSelfFromZr(t)
  43468. }
  43469. });
  43470. var g = o.length;
  43471. if (l) {
  43472. var y = g,
  43473. v = function () {
  43474. 0 == --y && (f(), a && a())
  43475. };
  43476. for (h = 0; h < g; h++) {
  43477. var m = l ? k({
  43478. delay: (n.delay || 0) + l(h, g, i[h], o[h]),
  43479. done: v
  43480. }, n) : n;
  43481. jG(i[h], o[h], m)
  43482. }
  43483. } else e.__morphT = 0, e.animateTo({
  43484. __morphT: 1
  43485. }, k({
  43486. during: function (t) {
  43487. for (var n = 0; n < g; n++) {
  43488. var i = o[n];
  43489. i.__morphT = e.__morphT, i.dirtyShape()
  43490. }
  43491. s && s(t)
  43492. },
  43493. done: function () {
  43494. f();
  43495. for (var e = 0; e < t.length; e++) XG(t[e], "updateTransform");
  43496. a && a()
  43497. }
  43498. }, n));
  43499. return e.__zr && d(e.__zr), {
  43500. fromIndividuals: i,
  43501. toIndividuals: o,
  43502. count: g
  43503. }
  43504. }(s, l, c) : function (t, e, n) {
  43505. var i = e.length,
  43506. r = [],
  43507. o = n.dividePath || $G;
  43508. if (WG(t)) {
  43509. ! function t(e) {
  43510. for (var n = 0; n < e.length; n++) {
  43511. var i = e[n];
  43512. WG(i) ? t(i.childrenRef()) : i instanceof Is && r.push(i)
  43513. }
  43514. }(t.childrenRef());
  43515. var a = r.length;
  43516. if (a < i)
  43517. for (var s = 0, l = a; l < i; l++) r.push(mu(r[s++ % a]));
  43518. r.length = i
  43519. } else {
  43520. r = o({
  43521. path: t,
  43522. count: i
  43523. });
  43524. var u = t.getComputedTransform();
  43525. for (l = 0; l < r.length; l++) r[l].setLocalTransform(u);
  43526. if (r.length !== i) return console.error("Invalid morphing: unmatched splitted path"), {
  43527. fromIndividuals: [],
  43528. toIndividuals: [],
  43529. count: 0
  43530. }
  43531. }
  43532. r = KG(r), e = KG(e);
  43533. var h = n.individualDelay;
  43534. for (l = 0; l < i; l++) {
  43535. var c = h ? k({
  43536. delay: (n.delay || 0) + h(l, i, r[l], e[l])
  43537. }, n) : n;
  43538. jG(r[l], e[l], c)
  43539. }
  43540. return {
  43541. fromIndividuals: r,
  43542. toIndividuals: e,
  43543. count: e.length
  43544. }
  43545. }(l, s, c), d = p.fromIndividuals, f = p.toIndividuals, g = d.length, v = 0; v < g; v++) {
  43546. m = u ? k({
  43547. delay: u(v, g)
  43548. }, h) : h;
  43549. o(d[v], f[v], e ? s[v] : t.one, e ? t.one : s[v], m)
  43550. } else {
  43551. var m, x = e ? s[0] : l,
  43552. _ = e ? l : s[0];
  43553. if (WG(x)) y({
  43554. many: [x],
  43555. one: _
  43556. }, !0, i, r, !0);
  43557. else jG(x, _, m = u ? k({
  43558. delay: u(i, r)
  43559. }, h) : h), o(x, _, x, _, m)
  43560. }
  43561. }
  43562. }
  43563. function nW(t) {
  43564. if (!t) return [];
  43565. if (Y(t)) {
  43566. for (var e = [], n = 0; n < t.length; n++) e.push(nW(t[n]));
  43567. return e
  43568. }
  43569. var i = [];
  43570. return t.traverse((function (t) {
  43571. t instanceof Is && !t.disableMorphing && !t.invisible && !t.ignore && i.push(t)
  43572. })), i
  43573. }
  43574. var iW = Oo();
  43575. function rW(t) {
  43576. var e = [];
  43577. return E(t, (function (t) {
  43578. var n = t.data;
  43579. if (!(n.count() > 1e4))
  43580. for (var i = n.getIndices(), r = function (t) {
  43581. for (var e = t.dimensions, n = 0; n < e.length; n++) {
  43582. var i = t.getDimensionInfo(e[n]);
  43583. if (i && 0 === i.otherDims.itemGroupId) return e[n]
  43584. }
  43585. }(n), o = 0; o < i.length; o++) e.push({
  43586. dataGroupId: t.dataGroupId,
  43587. data: n,
  43588. dim: t.dim || r,
  43589. divide: t.divide,
  43590. dataIndex: o
  43591. })
  43592. })), e
  43593. }
  43594. function oW(t, e, n) {
  43595. t.traverse((function (t) {
  43596. t instanceof Is && gh(t, {
  43597. style: {
  43598. opacity: 0
  43599. }
  43600. }, e, {
  43601. dataIndex: n,
  43602. isFrom: !0
  43603. })
  43604. }))
  43605. }
  43606. function aW(t) {
  43607. if (t.parent) {
  43608. var e = t.getComputedTransform();
  43609. t.setLocalTransform(e), t.parent.remove(t)
  43610. }
  43611. }
  43612. function sW(t) {
  43613. t.stopAnimation(), t.isGroup && t.traverse((function (t) {
  43614. t.stopAnimation()
  43615. }))
  43616. }
  43617. function lW(t, e, n) {
  43618. var i = ph("update", n, e);
  43619. i && t.traverse((function (t) {
  43620. if (t instanceof Sa) {
  43621. var e = function (t) {
  43622. return ch(t).oldStyle
  43623. }(t);
  43624. e && t.animateFrom({
  43625. style: e
  43626. }, i)
  43627. }
  43628. }))
  43629. }
  43630. function uW(t, e, n) {
  43631. var i = rW(t),
  43632. r = rW(e);
  43633. function o(t, e, n, i, r) {
  43634. (n || t) && e.animateFrom({
  43635. style: n && n !== t ? A(A({}, n.style), t.style) : t.style
  43636. }, r)
  43637. }
  43638. function a(t) {
  43639. for (var e = 0; e < t.length; e++)
  43640. if (t[e].dim) return t[e].dim
  43641. }
  43642. var s = a(i),
  43643. l = a(r),
  43644. u = !1;
  43645. function h(t, e) {
  43646. return function (n) {
  43647. var i = n.data,
  43648. r = n.dataIndex;
  43649. if (e) return i.getId(r);
  43650. var o = n.dataGroupId,
  43651. a = t ? s || l : l || s,
  43652. u = a && i.getDimensionInfo(a),
  43653. h = u && u.ordinalMeta;
  43654. if (u) {
  43655. var c = i.get(u.name, r);
  43656. return h && h.categories[c] || c + ""
  43657. }
  43658. var p = i.getRawDataItem(r);
  43659. return p && p.groupId ? p.groupId + "" : o || i.getId(r)
  43660. }
  43661. }
  43662. var c = function (t, e) {
  43663. var n = t.length;
  43664. if (n !== e.length) return !1;
  43665. for (var i = 0; i < n; i++) {
  43666. var r = t[i],
  43667. o = e[i];
  43668. if (r.data.getId(r.dataIndex) !== o.data.getId(o.dataIndex)) return !1
  43669. }
  43670. return !0
  43671. }(i, r),
  43672. p = {};
  43673. if (!c)
  43674. for (var d = 0; d < r.length; d++) {
  43675. var f = r[d],
  43676. g = f.data.getItemGraphicEl(f.dataIndex);
  43677. g && (p[g.id] = !0)
  43678. }
  43679. function y(t, e) {
  43680. var n = i[e],
  43681. a = r[t],
  43682. s = a.data.hostModel,
  43683. l = n.data.getItemGraphicEl(n.dataIndex),
  43684. h = a.data.getItemGraphicEl(a.dataIndex);
  43685. l !== h ? l && p[l.id] || h && (sW(h), l ? (sW(l), aW(l), u = !0, eW(nW(l), nW(h), a.divide, s, t, o)) : oW(h, s, t)) : h && lW(h, a.dataIndex, s)
  43686. }
  43687. new Vm(i, r, h(!0, c), h(!1, c), null, "multiple").update(y).updateManyToOne((function (t, e) {
  43688. var n = r[t],
  43689. a = n.data,
  43690. s = a.hostModel,
  43691. l = a.getItemGraphicEl(n.dataIndex),
  43692. h = B(z(e, (function (t) {
  43693. return i[t].data.getItemGraphicEl(i[t].dataIndex)
  43694. })), (function (t) {
  43695. return t && t !== l && !p[t.id]
  43696. }));
  43697. l && (sW(l), h.length ? (E(h, (function (t) {
  43698. sW(t), aW(t)
  43699. })), u = !0, eW(nW(h), nW(l), n.divide, s, t, o)) : oW(l, s, n.dataIndex))
  43700. })).updateOneToMany((function (t, e) {
  43701. var n = i[e],
  43702. a = n.data.getItemGraphicEl(n.dataIndex);
  43703. if (!a || !p[a.id]) {
  43704. var s = B(z(t, (function (t) {
  43705. return r[t].data.getItemGraphicEl(r[t].dataIndex)
  43706. })), (function (t) {
  43707. return t && t !== a
  43708. })),
  43709. l = r[t[0]].data.hostModel;
  43710. s.length && (E(s, (function (t) {
  43711. return sW(t)
  43712. })), a ? (sW(a), aW(a), u = !0, eW(nW(a), nW(s), n.divide, l, t[0], o)) : E(s, (function (e) {
  43713. return oW(e, l, t[0])
  43714. })))
  43715. }
  43716. })).updateManyToMany((function (t, e) {
  43717. new Vm(e, t, (function (t) {
  43718. return i[t].data.getId(i[t].dataIndex)
  43719. }), (function (t) {
  43720. return r[t].data.getId(r[t].dataIndex)
  43721. })).update((function (n, i) {
  43722. y(t[n], e[i])
  43723. })).execute()
  43724. })).execute(), u && E(e, (function (t) {
  43725. var e = t.data.hostModel,
  43726. i = e && n.getViewOfSeriesModel(e),
  43727. r = ph("update", e, 0);
  43728. i && e.isAnimationEnabled() && r && r.duration > 0 && i.group.traverse((function (t) {
  43729. t instanceof Is && !t.animators.length && t.animateFrom({
  43730. style: {
  43731. opacity: 0
  43732. }
  43733. }, r)
  43734. }))
  43735. }))
  43736. }
  43737. function hW(t) {
  43738. var e = t.getModel("universalTransition").get("seriesKey");
  43739. return e || t.id
  43740. }
  43741. function cW(t) {
  43742. return Y(t) ? t.sort().join(",") : t
  43743. }
  43744. function pW(t) {
  43745. if (t.hostModel) return t.hostModel.getModel("universalTransition").get("divideShape")
  43746. }
  43747. function dW(t, e) {
  43748. for (var n = 0; n < t.length; n++) {
  43749. if (null != e.seriesIndex && e.seriesIndex === t[n].seriesIndex || null != e.seriesId && e.seriesId === t[n].id) return n
  43750. }
  43751. }
  43752. Nm([function (t) {
  43753. t.registerPainter("canvas", eS)
  43754. }]), Nm([function (t) {
  43755. t.registerPainter("svg", jw)
  43756. }]), Nm([function (t) {
  43757. t.registerChartView(NS), t.registerSeriesModel(nS), t.registerLayout(ES("line", !0)), t.registerVisual({
  43758. seriesType: "line",
  43759. reset: function (t) {
  43760. var e = t.getData(),
  43761. n = t.getModel("lineStyle").getLineStyle();
  43762. n && !n.stroke && (n.stroke = e.getVisual("style").fill), e.setVisual("legendLineStyle", n)
  43763. }
  43764. }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, BS("line"))
  43765. }, function (t) {
  43766. t.registerChartView(qS), t.registerSeriesModel(GS), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, H(Hx, "bar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Yx("bar")), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, BS("bar")), t.registerAction({
  43767. type: "changeAxisOrder",
  43768. event: "changeAxisOrder",
  43769. update: "update"
  43770. }, (function (t, e) {
  43771. var n = t.componentType || "series";
  43772. e.eachComponent({
  43773. mainType: n,
  43774. query: t
  43775. }, (function (e) {
  43776. t.sortInfo && e.axis.setCategorySortInfo(t.sortInfo)
  43777. }))
  43778. }))
  43779. }, function (t) {
  43780. t.registerChartView(SM), t.registerSeriesModel(CM), Dy("pie", t.registerAction), t.registerLayout(H(gM, "pie")), t.registerProcessor(yM("pie")), t.registerProcessor(function (t) {
  43781. return {
  43782. seriesType: t,
  43783. reset: function (t, e) {
  43784. var n = t.getData();
  43785. n.filterSelf((function (t) {
  43786. var e = n.mapDimension("value"),
  43787. i = n.get(e, t);
  43788. return !(j(i) && !isNaN(i) && i < 0)
  43789. }))
  43790. }
  43791. }
  43792. }("pie"))
  43793. }, function (t) {
  43794. Nm(DI), t.registerSeriesModel(DM), t.registerChartView(PM), t.registerLayout(ES("scatter"))
  43795. }, function (t) {
  43796. Nm(WI), t.registerChartView(OI), t.registerSeriesModel(RI), t.registerLayout(AI), t.registerProcessor(yM("radar")), t.registerPreprocessor(PI)
  43797. }, function (t) {
  43798. Nm(vC), t.registerChartView(JT), t.registerSeriesModel(QT), t.registerLayout(eC), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, tC), Dy("map", t.registerAction)
  43799. }, function (t) {
  43800. t.registerChartView(AC), t.registerSeriesModel($C), t.registerLayout(QC), t.registerVisual(tD),
  43801. function (t) {
  43802. t.registerAction({
  43803. type: "treeExpandAndCollapse",
  43804. event: "treeExpandAndCollapse",
  43805. update: "update"
  43806. }, (function (t, e) {
  43807. e.eachComponent({
  43808. mainType: "series",
  43809. subType: "tree",
  43810. query: t
  43811. }, (function (e) {
  43812. var n = t.dataIndex,
  43813. i = e.getData().tree.getNodeByDataIndex(n);
  43814. i.isExpand = !i.isExpand
  43815. }))
  43816. })), t.registerAction({
  43817. type: "treeRoam",
  43818. event: "treeRoam",
  43819. update: "none"
  43820. }, (function (t, e, n) {
  43821. e.eachComponent({
  43822. mainType: "series",
  43823. subType: "tree",
  43824. query: t
  43825. }, (function (e) {
  43826. var i = fC(e.coordinateSystem, t, void 0, n);
  43827. e.setCenter && e.setCenter(i.center), e.setZoom && e.setZoom(i.zoom)
  43828. }))
  43829. }))
  43830. }(t)
  43831. }, function (t) {
  43832. t.registerSeriesModel(iD), t.registerChartView(yD), t.registerVisual(OD), t.registerLayout(UD),
  43833. function (t) {
  43834. for (var e = 0; e < eD.length; e++) t.registerAction({
  43835. type: eD[e],
  43836. update: "updateView"
  43837. }, bt);
  43838. t.registerAction({
  43839. type: "treemapRootToNode",
  43840. update: "updateView"
  43841. }, (function (t, e) {
  43842. e.eachComponent({
  43843. mainType: "series",
  43844. subType: "treemap",
  43845. query: t
  43846. }, (function (e, n) {
  43847. var i = ZC(t, ["treemapZoomToNode", "treemapRootToNode"], e);
  43848. if (i) {
  43849. var r = e.getViewRoot();
  43850. r && (t.direction = qC(r, i.node) ? "rollUp" : "drillDown"), e.resetViewRoot(i.node)
  43851. }
  43852. }))
  43853. }))
  43854. }(t)
  43855. }, function (t) {
  43856. t.registerChartView(UA), t.registerSeriesModel(QA), t.registerProcessor(JD), t.registerVisual(QD), t.registerVisual(eA), t.registerLayout(cA), t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT, xA), t.registerLayout(bA), t.registerCoordinateSystem("graphView", {
  43857. dimensions: iC.dimensions,
  43858. create: wA
  43859. }), t.registerAction({
  43860. type: "focusNodeAdjacency",
  43861. event: "focusNodeAdjacency",
  43862. update: "series:focusNodeAdjacency"
  43863. }, bt), t.registerAction({
  43864. type: "unfocusNodeAdjacency",
  43865. event: "unfocusNodeAdjacency",
  43866. update: "series:unfocusNodeAdjacency"
  43867. }, bt), t.registerAction(tk, (function (t, e, n) {
  43868. e.eachComponent({
  43869. mainType: "series",
  43870. query: t
  43871. }, (function (e) {
  43872. var i = fC(e.coordinateSystem, t, void 0, n);
  43873. e.setCenter && e.setCenter(i.center), e.setZoom && e.setZoom(i.zoom)
  43874. }))
  43875. }))
  43876. }, function (t) {
  43877. t.registerChartView(rk), t.registerSeriesModel(ok)
  43878. }, function (t) {
  43879. t.registerChartView(lk), t.registerSeriesModel(uk), t.registerLayout(hk), t.registerProcessor(yM("funnel"))
  43880. }, function (t) {
  43881. Nm(EL), t.registerChartView(ck), t.registerSeriesModel(yk), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, xk)
  43882. }, function (t) {
  43883. t.registerChartView(BL), t.registerSeriesModel(FL), t.registerLayout(GL), t.registerVisual(QL), t.registerAction({
  43884. type: "dragNode",
  43885. event: "dragnode",
  43886. update: "update"
  43887. }, (function (t, e) {
  43888. e.eachComponent({
  43889. mainType: "series",
  43890. subType: "sankey",
  43891. query: t
  43892. }, (function (e) {
  43893. e.setNodePosition(t.dataIndex, [t.localX, t.localY])
  43894. }))
  43895. }))
  43896. }, function (t) {
  43897. t.registerSeriesModel(eP), t.registerChartView(nP), t.registerLayout(uP), t.registerTransform(hP)
  43898. }, function (t) {
  43899. t.registerChartView(pP), t.registerSeriesModel(SP), t.registerPreprocessor(MP), t.registerVisual(kP), t.registerLayout(LP)
  43900. }, function (t) {
  43901. t.registerChartView(NP), t.registerSeriesModel(EP), t.registerLayout(ES("effectScatter"))
  43902. }, function (t) {
  43903. t.registerChartView(YP), t.registerSeriesModel(jP), t.registerLayout(HP), t.registerVisual(KP)
  43904. }, function (t) {
  43905. t.registerChartView(QP), t.registerSeriesModel(tO)
  43906. }, function (t) {
  43907. t.registerChartView(rO), t.registerSeriesModel(wO), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, H(Hx, "pictorialBar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Yx("pictorialBar"))
  43908. }, function (t) {
  43909. t.registerChartView(SO), t.registerSeriesModel(MO), t.registerLayout(IO), t.registerProcessor(yM("themeRiver"))
  43910. }, function (t) {
  43911. t.registerChartView(kO), t.registerSeriesModel(LO), t.registerLayout(H(RO, "sunburst")), t.registerProcessor(H(yM, "sunburst")), t.registerVisual(EO),
  43912. function (t) {
  43913. t.registerAction({
  43914. type: DO,
  43915. update: "updateView"
  43916. }, (function (t, e) {
  43917. e.eachComponent({
  43918. mainType: "series",
  43919. subType: "sunburst",
  43920. query: t
  43921. }, (function (e, n) {
  43922. var i = ZC(t, [DO], e);
  43923. if (i) {
  43924. var r = e.getViewRoot();
  43925. r && (t.direction = qC(r, i.node) ? "rollUp" : "drillDown"), e.resetViewRoot(i.node)
  43926. }
  43927. }))
  43928. })), t.registerAction({
  43929. type: AO,
  43930. update: "none"
  43931. }, (function (t, e, n) {
  43932. t = A({}, t), e.eachComponent({
  43933. mainType: "series",
  43934. subType: "sunburst",
  43935. query: t
  43936. }, (function (e) {
  43937. var n = ZC(t, [AO], e);
  43938. n && (t.dataIndex = n.node.dataIndex)
  43939. })), n.dispatchAction(A(t, {
  43940. type: "highlight"
  43941. }))
  43942. })), t.registerAction({
  43943. type: "sunburstUnhighlight",
  43944. update: "updateView"
  43945. }, (function (t, e, n) {
  43946. t = A({}, t), n.dispatchAction(A(t, {
  43947. type: "downplay"
  43948. }))
  43949. }))
  43950. }(t)
  43951. }, function (t) {
  43952. t.registerChartView(CR), t.registerSeriesModel(FO)
  43953. }]), Nm((function (t) {
  43954. Nm(DI), Nm(DN)
  43955. })), Nm((function (t) {
  43956. Nm(DN), yI.registerAxisPointerClass("PolarAxisPointer", AN), t.registerCoordinateSystem("polar", HN), t.registerComponentModel(LN), t.registerComponentView(oE), FM(t, "angle", ON, iE), FM(t, "radius", RN, rE), t.registerComponentView(jN), t.registerComponentView(JN), t.registerLayout(H(nE, "bar"))
  43957. })), Nm(vC), Nm((function (t) {
  43958. Nm(DN), yI.registerAxisPointerClass("SingleAxisPointer", xE), t.registerComponentView(SE), t.registerComponentView(uE), t.registerComponentModel(cE), FM(t, "single", cE, cE.defaultOption), t.registerCoordinateSystem("single", yE)
  43959. })), Nm(EL), Nm((function (t) {
  43960. t.registerComponentModel(ME), t.registerComponentView(TE), t.registerCoordinateSystem("calendar", DE)
  43961. })), Nm((function (t) {
  43962. t.registerComponentModel(RE), t.registerComponentView(zE), t.registerPreprocessor((function (t) {
  43963. var e = t.graphic;
  43964. Y(e) ? e[0] && e[0].elements ? t.graphic = [t.graphic[0]] : t.graphic = [{
  43965. elements: e
  43966. }] : e && !e.elements && (t.graphic = [{
  43967. elements: [e]
  43968. }])
  43969. }))
  43970. })), Nm((function (t) {
  43971. t.registerComponentModel(hz), t.registerComponentView(pz), lz("saveAsImage", dz), lz("magicType", yz), lz("dataView", Sz), lz("dataZoom", Xz), lz("restore", Dz), Nm(oz)
  43972. })), Nm((function (t) {
  43973. Nm(DN), t.registerComponentModel(jz), t.registerComponentView(cV), t.registerAction({
  43974. type: "showTip",
  43975. event: "showTip",
  43976. update: "tooltip:manuallyShowTip"
  43977. }, bt), t.registerAction({
  43978. type: "hideTip",
  43979. event: "hideTip",
  43980. update: "tooltip:manuallyHideTip"
  43981. }, bt)
  43982. })), Nm(DN), Nm((function (t) {
  43983. t.registerComponentView(OV), t.registerComponentModel(RV), t.registerPreprocessor(yV), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, DV), t.registerAction({
  43984. type: "brush",
  43985. event: "brush",
  43986. update: "updateVisual"
  43987. }, (function (t, e) {
  43988. e.eachComponent({
  43989. mainType: "brush",
  43990. query: t
  43991. }, (function (e) {
  43992. e.setAreas(t.areas)
  43993. }))
  43994. })), t.registerAction({
  43995. type: "brushSelect",
  43996. event: "brushSelected",
  43997. update: "none"
  43998. }, bt), t.registerAction({
  43999. type: "brushEnd",
  44000. event: "brushEnd",
  44001. update: "none"
  44002. }, bt), lz("brush", zV)
  44003. })), Nm((function (t) {
  44004. t.registerComponentModel(VV), t.registerComponentView(BV)
  44005. })), Nm((function (t) {
  44006. t.registerComponentModel(GV), t.registerComponentView(UV), t.registerSubTypeDefaulter("timeline", (function () {
  44007. return "slider"
  44008. })),
  44009. function (t) {
  44010. t.registerAction({
  44011. type: "timelineChange",
  44012. event: "timelineChanged",
  44013. update: "prepareAndUpdate"
  44014. }, (function (t, e, n) {
  44015. var i = e.getComponent("timeline");
  44016. return i && null != t.currentIndex && (i.setCurrentIndex(t.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1), n.dispatchAction({
  44017. type: "timelinePlayChange",
  44018. playState: !1,
  44019. from: t.from
  44020. }))), e.resetOption("timeline", {
  44021. replaceMerge: i.get("replaceMerge", !0)
  44022. }), k({
  44023. currentIndex: i.option.currentIndex
  44024. }, t)
  44025. })), t.registerAction({
  44026. type: "timelinePlayChange",
  44027. event: "timelinePlayChanged",
  44028. update: "update"
  44029. }, (function (t, e) {
  44030. var n = e.getComponent("timeline");
  44031. n && null != t.playState && n.setPlayState(t.playState)
  44032. }))
  44033. }(t), t.registerPreprocessor(qV)
  44034. })), Nm((function (t) {
  44035. t.registerComponentModel(nB), t.registerComponentView(fB), t.registerPreprocessor((function (t) {
  44036. JV(t.series, "markPoint") && (t.markPoint = t.markPoint || {})
  44037. }))
  44038. })), Nm((function (t) {
  44039. t.registerComponentModel(gB), t.registerComponentView(wB), t.registerPreprocessor((function (t) {
  44040. JV(t.series, "markLine") && (t.markLine = t.markLine || {})
  44041. }))
  44042. })), Nm((function (t) {
  44043. t.registerComponentModel(SB), t.registerComponentView(LB), t.registerPreprocessor((function (t) {
  44044. JV(t.series, "markArea") && (t.markArea = t.markArea || {})
  44045. }))
  44046. })), Nm((function (t) {
  44047. Nm(HB), Nm(KB)
  44048. })), Nm((function (t) {
  44049. Nm(lF), Nm(vF)
  44050. })), Nm(lF), Nm(vF), Nm((function (t) {
  44051. Nm($F), Nm(nG)
  44052. })), Nm($F), Nm(nG), Nm((function (t) {
  44053. t.registerPreprocessor(sG), t.registerVisual(t.PRIORITY.VISUAL.ARIA, aG)
  44054. })), Nm((function (t) {
  44055. t.registerTransform(xG), t.registerTransform(_G)
  44056. })), Nm((function (t) {
  44057. t.registerComponentModel(bG), t.registerComponentView(wG)
  44058. })), Nm((function (t) {
  44059. t.registerUpdateLifecycle("series:beforeupdate", (function (t, e, n) {
  44060. E(bo(n.seriesTransition), (function (t) {
  44061. E(bo(t.to), (function (t) {
  44062. for (var e = n.updatedSeries, i = 0; i < e.length; i++)(null != t.seriesIndex && t.seriesIndex === e[i].seriesIndex || null != t.seriesId && t.seriesId === e[i].id) && (e[i][vg] = !0)
  44063. }))
  44064. }))
  44065. })), t.registerUpdateLifecycle("series:transition", (function (t, e, n) {
  44066. var i = iW(e);
  44067. if (i.oldSeries && n.updatedSeries && n.optionChanged) {
  44068. var r = n.seriesTransition;
  44069. if (r) E(bo(r), (function (t) {
  44070. ! function (t, e, n, i) {
  44071. var r = [],
  44072. o = [];
  44073. E(bo(t.from), (function (t) {
  44074. var n = dW(e.oldSeries, t);
  44075. n >= 0 && r.push({
  44076. dataGroupId: e.oldDataGroupIds[n],
  44077. data: e.oldData[n],
  44078. divide: pW(e.oldData[n]),
  44079. dim: t.dimension
  44080. })
  44081. })), E(bo(t.to), (function (t) {
  44082. var i = dW(n.updatedSeries, t);
  44083. if (i >= 0) {
  44084. var r = n.updatedSeries[i].getData();
  44085. o.push({
  44086. dataGroupId: e.oldDataGroupIds[i],
  44087. data: r,
  44088. divide: pW(r),
  44089. dim: t.dimension
  44090. })
  44091. }
  44092. })), r.length > 0 && o.length > 0 && uW(r, o, i)
  44093. }(t, i, n, e)
  44094. }));
  44095. else {
  44096. var o = function (t, e) {
  44097. var n = yt(),
  44098. i = yt(),
  44099. r = yt();
  44100. return E(t.oldSeries, (function (e, n) {
  44101. var o = t.oldDataGroupIds[n],
  44102. a = t.oldData[n],
  44103. s = hW(e),
  44104. l = cW(s);
  44105. i.set(l, {
  44106. dataGroupId: o,
  44107. data: a
  44108. }), Y(s) && E(s, (function (t) {
  44109. r.set(t, {
  44110. key: l,
  44111. dataGroupId: o,
  44112. data: a
  44113. })
  44114. }))
  44115. })), E(e.updatedSeries, (function (t) {
  44116. if (t.isUniversalTransitionEnabled() && t.isAnimationEnabled()) {
  44117. var e = t.get("dataGroupId"),
  44118. o = t.getData(),
  44119. a = hW(t),
  44120. s = cW(a),
  44121. l = i.get(s);
  44122. if (l) n.set(s, {
  44123. oldSeries: [{
  44124. dataGroupId: l.dataGroupId,
  44125. divide: pW(l.data),
  44126. data: l.data
  44127. }],
  44128. newSeries: [{
  44129. dataGroupId: e,
  44130. divide: pW(o),
  44131. data: o
  44132. }]
  44133. });
  44134. else if (Y(a)) {
  44135. var u = [];
  44136. E(a, (function (t) {
  44137. var e = i.get(t);
  44138. e.data && u.push({
  44139. dataGroupId: e.dataGroupId,
  44140. divide: pW(e.data),
  44141. data: e.data
  44142. })
  44143. })), u.length && n.set(s, {
  44144. oldSeries: u,
  44145. newSeries: [{
  44146. dataGroupId: e,
  44147. data: o,
  44148. divide: pW(o)
  44149. }]
  44150. })
  44151. } else {
  44152. var h = r.get(a);
  44153. if (h) {
  44154. var c = n.get(h.key);
  44155. c || (c = {
  44156. oldSeries: [{
  44157. dataGroupId: h.dataGroupId,
  44158. data: h.data,
  44159. divide: pW(h.data)
  44160. }],
  44161. newSeries: []
  44162. }, n.set(h.key, c)), c.newSeries.push({
  44163. dataGroupId: e,
  44164. data: o,
  44165. divide: pW(o)
  44166. })
  44167. }
  44168. }
  44169. }
  44170. })), n
  44171. }(i, n);
  44172. E(o.keys(), (function (t) {
  44173. var n = o.get(t);
  44174. uW(n.oldSeries, n.newSeries, e)
  44175. }))
  44176. }
  44177. E(n.updatedSeries, (function (t) {
  44178. t[vg] && (t[vg] = !1)
  44179. }))
  44180. }
  44181. for (var a = t.getSeries(), s = i.oldSeries = [], l = i.oldDataGroupIds = [], u = i.oldData = [], h = 0; h < a.length; h++) {
  44182. var c = a[h].getData();
  44183. c.count() < 1e4 && (s.push(a[h]), l.push(a[h].get("dataGroupId")), u.push(c))
  44184. }
  44185. }))
  44186. })), Nm((function (t) {
  44187. t.registerUpdateLifecycle("series:beforeupdate", (function (t, e, n) {
  44188. var i = Gb(e).labelManager;
  44189. i || (i = Gb(e).labelManager = new Fb), i.clearLabels()
  44190. })), t.registerUpdateLifecycle("series:layoutlabels", (function (t, e, n) {
  44191. var i = Gb(e).labelManager;
  44192. n.updatedSeries.forEach((function (t) {
  44193. i.addLabelsOfSeries(e.getViewOfSeriesModel(t))
  44194. })), i.updateLayoutConfig(e), i.layout(e), i.processLabelsOverall()
  44195. }))
  44196. })), t.Axis = nb, t.ChartView = kg, t.ComponentModel = Rp, t.ComponentView = Tg, t.List = lx, t.Model = Mc, t.PRIORITY = Mv, t.SeriesModel = mg, t.color = ai, t.connect = function (t) {
  44197. if (Y(t)) {
  44198. var e = t;
  44199. t = null, E(e, (function (e) {
  44200. null != e.group && (t = e.group)
  44201. })), t = t || "g_" + dm++, E(e, (function (e) {
  44202. e.group = t
  44203. }))
  44204. }
  44205. return cm[t] = !0, t
  44206. }, t.dataTool = {}, t.dependencies = {
  44207. zrender: "5.4.3"
  44208. }, t.disConnect = gm, t.disconnect = ym, t.dispose = function (t) {
  44209. U(t) ? t = hm[t] : t instanceof Qv || (t = vm(t)), t instanceof Qv && !t.isDisposed() && t.dispose()
  44210. }, t.env = r, t.extendChartView = function (t) {
  44211. var e = kg.extend(t);
  44212. return kg.registerClass(e), e
  44213. }, t.extendComponentModel = function (t) {
  44214. var e = Rp.extend(t);
  44215. return Rp.registerClass(e), e
  44216. }, t.extendComponentView = function (t) {
  44217. var e = Tg.extend(t);
  44218. return Tg.registerClass(e), e
  44219. }, t.extendSeriesModel = function (t) {
  44220. var e = mg.extend(t);
  44221. return mg.registerClass(e), e
  44222. }, t.format = Y_, t.getCoordinateSystemDimensions = function (t) {
  44223. var e = xd.get(t);
  44224. if (e) return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice()
  44225. }, t.getInstanceByDom = vm, t.getInstanceById = function (t) {
  44226. return hm[t]
  44227. }, t.getMap = function (t) {
  44228. var e = bv("getMap");
  44229. return e && e(t)
  44230. }, t.graphic = H_, t.helper = C_, t.init = function (t, e, n) {
  44231. var i = !(n && n.ssr);
  44232. if (i) {
  44233. 0;
  44234. var r = vm(t);
  44235. if (r) return r;
  44236. 0
  44237. }
  44238. var o = new Qv(t, e, n);
  44239. return o.id = "ec_" + pm++, hm[o.id] = o, i && Fo(t, fm, o.id), jv(o), xv.trigger("afterinit", o), o
  44240. }, t.innerDrawElementOnCanvas = hv, t.matrix = Ce, t.number = G_, t.parseGeoJSON = F_, t.parseGeoJson = F_, t.registerAction = Mm, t.registerCoordinateSystem = Im, t.registerLayout = Tm, t.registerLoading = km, t.registerLocale = Rc, t.registerMap = Lm, t.registerPostInit = bm, t.registerPostUpdate = wm, t.registerPreprocessor = xm, t.registerProcessor = _m, t.registerTheme = mm, t.registerTransform = Pm, t.registerUpdateLifecycle = Sm, t.registerVisual = Cm, t.setCanvasCreator = function (t) {
  44241. c({
  44242. createCanvas: t
  44243. })
  44244. }, t.setPlatformAPI = c, t.throttle = Bg, t.time = W_, t.use = Nm, t.util = X_, t.vector = Xt, t.version = "5.4.2", t.zrUtil = St, t.zrender = Hr, Object.defineProperty(t, "__esModule", {
  44245. value: !0
  44246. })
  44247. }));